From eb2a8a0b2088e3209d5e2344b390a13d43ecc9ac Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 5 Jan 2023 21:14:27 +0000 Subject: [PATCH 1/2] chore(bazel): update gapic-generator-php to v1.6.4 PiperOrigin-RevId: 499941754 Source-Link: https://github.com/googleapis/googleapis/commit/71b5bbcb2e8343bf08de56ccd239d308327a114f Source-Link: https://github.com/googleapis/googleapis-gen/commit/113c51b303b47fe8315c536260da50a92c277b39 Copy-Tag: eyJwIjoiRG9tYWlucy8uT3dsQm90LnlhbWwiLCJoIjoiMTEzYzUxYjMwM2I0N2ZlODMxNWM1MzYyNjBkYTUwYTkyYzI3N2IzOSJ9 Copy-Tag: eyJwIjoiRXJyb3JSZXBvcnRpbmcvLk93bEJvdC55YW1sIiwiaCI6IjExM2M1MWIzMDNiNDdmZTgzMTVjNTM2MjYwZGE1MGE5MmMyNzdiMzkifQ== Copy-Tag: eyJwIjoiRXNzZW50aWFsQ29udGFjdHMvLk93bEJvdC55YW1sIiwiaCI6IjExM2M1MWIzMDNiNDdmZTgzMTVjNTM2MjYwZGE1MGE5MmMyNzdiMzkifQ== Copy-Tag: eyJwIjoiRXZlbnRhcmMvLk93bEJvdC55YW1sIiwiaCI6IjExM2M1MWIzMDNiNDdmZTgzMTVjNTM2MjYwZGE1MGE5MmMyNzdiMzkifQ== Copy-Tag: eyJwIjoiRXZlbnRhcmNQdWJsaXNoaW5nLy5Pd2xCb3QueWFtbCIsImgiOiIxMTNjNTFiMzAzYjQ3ZmU4MzE1YzUzNjI2MGRhNTBhOTJjMjc3YjM5In0= Copy-Tag: eyJwIjoiRmlsZXN0b3JlLy5Pd2xCb3QueWFtbCIsImgiOiIxMTNjNTFiMzAzYjQ3ZmU4MzE1YzUzNjI2MGRhNTBhOTJjMjc3YjM5In0= Copy-Tag: eyJwIjoiRmlyZXN0b3JlLy5Pd2xCb3QueWFtbCIsImgiOiIxMTNjNTFiMzAzYjQ3ZmU4MzE1YzUzNjI2MGRhNTBhOTJjMjc3YjM5In0= Copy-Tag: eyJwIjoiRnVuY3Rpb25zLy5Pd2xCb3QueWFtbCIsImgiOiIxMTNjNTFiMzAzYjQ3ZmU4MzE1YzUzNjI2MGRhNTBhOTJjMjc3YjM5In0= Copy-Tag: eyJwIjoiR1N1aXRlQWRkT25zLy5Pd2xCb3QueWFtbCIsImgiOiIxMTNjNTFiMzAzYjQ3ZmU4MzE1YzUzNjI2MGRhNTBhOTJjMjc3YjM5In0= Copy-Tag: eyJwIjoiR2FtaW5nLy5Pd2xCb3QueWFtbCIsImgiOiIxMTNjNTFiMzAzYjQ3ZmU4MzE1YzUzNjI2MGRhNTBhOTJjMjc3YjM5In0= Copy-Tag: eyJwIjoiR2tlQmFja3VwLy5Pd2xCb3QueWFtbCIsImgiOiIxMTNjNTFiMzAzYjQ3ZmU4MzE1YzUzNjI2MGRhNTBhOTJjMjc3YjM5In0= Copy-Tag: eyJwIjoiR2tlSHViLy5Pd2xCb3QueWFtbCIsImgiOiIxMTNjNTFiMzAzYjQ3ZmU4MzE1YzUzNjI2MGRhNTBhOTJjMjc3YjM5In0= Copy-Tag: eyJwIjoiR3JhZmVhcy8uT3dsQm90LnlhbWwiLCJoIjoiMTEzYzUxYjMwM2I0N2ZlODMxNWM1MzYyNjBkYTUwYTkyYzI3N2IzOSJ9 Copy-Tag: eyJwIjoiSWFtLy5Pd2xCb3QueWFtbCIsImgiOiIxMTNjNTFiMzAzYjQ3ZmU4MzE1YzUzNjI2MGRhNTBhOTJjMjc3YjM5In0= Copy-Tag: eyJwIjoiSWFtQ3JlZGVudGlhbHMvLk93bEJvdC55YW1sIiwiaCI6IjExM2M1MWIzMDNiNDdmZTgzMTVjNTM2MjYwZGE1MGE5MmMyNzdiMzkifQ== Copy-Tag: eyJwIjoiSWFwLy5Pd2xCb3QueWFtbCIsImgiOiIxMTNjNTFiMzAzYjQ3ZmU4MzE1YzUzNjI2MGRhNTBhOTJjMjc3YjM5In0= Copy-Tag: eyJwIjoiSWRzLy5Pd2xCb3QueWFtbCIsImgiOiIxMTNjNTFiMzAzYjQ3ZmU4MzE1YzUzNjI2MGRhNTBhOTJjMjc3YjM5In0= Copy-Tag: eyJwIjoiSW90Ly5Pd2xCb3QueWFtbCIsImgiOiIxMTNjNTFiMzAzYjQ3ZmU4MzE1YzUzNjI2MGRhNTBhOTJjMjc3YjM5In0= Copy-Tag: eyJwIjoiS21zLy5Pd2xCb3QueWFtbCIsImgiOiIxMTNjNTFiMzAzYjQ3ZmU4MzE1YzUzNjI2MGRhNTBhOTJjMjc3YjM5In0= Copy-Tag: eyJwIjoiTGFuZ3VhZ2UvLk93bEJvdC55YW1sIiwiaCI6IjExM2M1MWIzMDNiNDdmZTgzMTVjNTM2MjYwZGE1MGE5MmMyNzdiMzkifQ== --- .../Google/Cloud/Domains/V1Alpha2/Domains.php | Bin 0 -> 13231 bytes .../Domains/V1alpha2/AuthorizationCode.php | 71 + .../ConfigureContactSettingsRequest.php | 239 ++ .../V1alpha2/ConfigureDnsSettingsRequest.php | 221 ++ .../ConfigureManagementSettingsRequest.php | 167 ++ .../Cloud/Domains/V1alpha2/ContactNotice.php | 55 + .../Cloud/Domains/V1alpha2/ContactPrivacy.php | 81 + .../Domains/V1alpha2/ContactSettings.php | 222 ++ .../V1alpha2/ContactSettings/Contact.php | 190 ++ .../V1alpha2/ContactSettings_Contact.php | 16 + .../V1alpha2/DeleteRegistrationRequest.php | 71 + .../Cloud/Domains/V1alpha2/DnsSettings.php | 146 + .../V1alpha2/DnsSettings/CustomDns.php | 120 + .../Domains/V1alpha2/DnsSettings/DsRecord.php | 174 ++ .../DnsSettings/DsRecord/Algorithm.php | 170 ++ .../DnsSettings/DsRecord/DigestType.php | 79 + .../Domains/V1alpha2/DnsSettings/DsState.php | 68 + .../V1alpha2/DnsSettings/GlueRecord.php | 159 + .../V1alpha2/DnsSettings/GoogleDomainsDns.php | 165 ++ .../V1alpha2/DnsSettings_CustomDns.php | 16 + .../Domains/V1alpha2/DnsSettings_DsRecord.php | 16 + .../DnsSettings_DsRecord_Algorithm.php | 16 + .../DnsSettings_DsRecord_DigestType.php | 16 + .../Domains/V1alpha2/DnsSettings_DsState.php | 16 + .../V1alpha2/DnsSettings_GlueRecord.php | 16 + .../V1alpha2/DnsSettings_GoogleDomainsDns.php | 16 + .../Cloud/Domains/V1alpha2/DomainNotice.php | 58 + .../Domains/V1alpha2/DomainsGrpcClient.php | 341 +++ .../V1alpha2/ExportRegistrationRequest.php | 71 + .../V1alpha2/GetRegistrationRequest.php | 71 + .../V1alpha2/ListRegistrationsRequest.php | 225 ++ .../V1alpha2/ListRegistrationsResponse.php | 105 + .../Domains/V1alpha2/ManagementSettings.php | 101 + .../ManagementSettings/RenewalMethod.php | 70 + .../ManagementSettings_RenewalMethod.php | 16 + .../Domains/V1alpha2/OperationMetadata.php | 257 ++ .../V1alpha2/RegisterDomainRequest.php | 289 ++ .../Domains/V1alpha2/RegisterParameters.php | 221 ++ .../RegisterParameters/Availability.php | 81 + .../RegisterParameters_Availability.php | 16 + .../Cloud/Domains/V1alpha2/Registration.php | 573 ++++ .../Domains/V1alpha2/Registration/Issue.php | 71 + .../Domains/V1alpha2/Registration/State.php | 108 + .../Domains/V1alpha2/Registration_Issue.php | 16 + .../Domains/V1alpha2/Registration_State.php | 16 + .../ResetAuthorizationCodeRequest.php | 71 + .../RetrieveAuthorizationCodeRequest.php | 71 + .../RetrieveRegisterParametersRequest.php | 101 + .../RetrieveRegisterParametersResponse.php | 77 + .../RetrieveTransferParametersRequest.php | 101 + .../RetrieveTransferParametersResponse.php | 77 + .../Domains/V1alpha2/SearchDomainsRequest.php | 101 + .../V1alpha2/SearchDomainsResponse.php | 67 + .../V1alpha2/TransferDomainRequest.php | 311 ++ .../Domains/V1alpha2/TransferLockState.php | 61 + .../Domains/V1alpha2/TransferParameters.php | 255 ++ .../V1alpha2/UpdateRegistrationRequest.php | 129 + .../configure_contact_settings.php | 88 + .../DomainsClient/configure_dns_settings.php | 87 + .../configure_management_settings.php | 87 + .../DomainsClient/delete_registration.php | 94 + .../DomainsClient/export_registration.php | 87 + .../DomainsClient/get_registration.php | 67 + .../DomainsClient/list_registrations.php | 72 + .../DomainsClient/register_domain.php | 160 + .../reset_authorization_code.php | 74 + .../retrieve_authorization_code.php | 75 + .../retrieve_register_parameters.php | 69 + .../retrieve_transfer_parameters.php | 73 + .../V1alpha2/DomainsClient/search_domains.php | 72 + .../DomainsClient/transfer_domain.php | 168 ++ .../DomainsClient/update_registration.php | 74 + .../v1alpha2/src/V1alpha2/DomainsClient.php | 36 + .../src/V1alpha2/Gapic/DomainsGapicClient.php | 1473 ++++++++++ .../v1alpha2/src/V1alpha2/gapic_metadata.json | 93 + .../resources/domains_client_config.json | 119 + .../resources/domains_descriptor_config.php | 98 + .../resources/domains_rest_client_config.php | 271 ++ .../tests/Unit/V1alpha2/DomainsClientTest.php | 1625 +++++++++++ .../Google/Cloud/Domains/V1Beta1/Domains.php | Bin 0 -> 13146 bytes .../Domains/V1beta1/AuthorizationCode.php | 71 + .../ConfigureContactSettingsRequest.php | 239 ++ .../V1beta1/ConfigureDnsSettingsRequest.php | 221 ++ .../ConfigureManagementSettingsRequest.php | 167 ++ .../Cloud/Domains/V1beta1/ContactNotice.php | 55 + .../Cloud/Domains/V1beta1/ContactPrivacy.php | 81 + .../Cloud/Domains/V1beta1/ContactSettings.php | 222 ++ .../V1beta1/ContactSettings/Contact.php | 190 ++ .../V1beta1/ContactSettings_Contact.php | 16 + .../V1beta1/DeleteRegistrationRequest.php | 71 + .../Cloud/Domains/V1beta1/DnsSettings.php | 146 + .../Domains/V1beta1/DnsSettings/CustomDns.php | 120 + .../Domains/V1beta1/DnsSettings/DsRecord.php | 174 ++ .../DnsSettings/DsRecord/Algorithm.php | 170 ++ .../DnsSettings/DsRecord/DigestType.php | 79 + .../Domains/V1beta1/DnsSettings/DsState.php | 68 + .../V1beta1/DnsSettings/GlueRecord.php | 159 + .../V1beta1/DnsSettings/GoogleDomainsDns.php | 165 ++ .../Domains/V1beta1/DnsSettings_CustomDns.php | 16 + .../Domains/V1beta1/DnsSettings_DsRecord.php | 16 + .../DnsSettings_DsRecord_Algorithm.php | 16 + .../DnsSettings_DsRecord_DigestType.php | 16 + .../Domains/V1beta1/DnsSettings_DsState.php | 16 + .../V1beta1/DnsSettings_GlueRecord.php | 16 + .../V1beta1/DnsSettings_GoogleDomainsDns.php | 16 + .../Cloud/Domains/V1beta1/DomainNotice.php | 58 + .../Domains/V1beta1/DomainsGrpcClient.php | 341 +++ .../V1beta1/ExportRegistrationRequest.php | 71 + .../V1beta1/GetRegistrationRequest.php | 71 + .../V1beta1/ListRegistrationsRequest.php | 225 ++ .../V1beta1/ListRegistrationsResponse.php | 105 + .../Domains/V1beta1/ManagementSettings.php | 101 + .../ManagementSettings/RenewalMethod.php | 70 + .../ManagementSettings_RenewalMethod.php | 16 + .../Domains/V1beta1/OperationMetadata.php | 257 ++ .../Domains/V1beta1/RegisterDomainRequest.php | 289 ++ .../Domains/V1beta1/RegisterParameters.php | 221 ++ .../RegisterParameters/Availability.php | 81 + .../RegisterParameters_Availability.php | 16 + .../Cloud/Domains/V1beta1/Registration.php | 573 ++++ .../Domains/V1beta1/Registration/Issue.php | 71 + .../Domains/V1beta1/Registration/State.php | 108 + .../Domains/V1beta1/Registration_Issue.php | 16 + .../Domains/V1beta1/Registration_State.php | 16 + .../V1beta1/ResetAuthorizationCodeRequest.php | 71 + .../RetrieveAuthorizationCodeRequest.php | 71 + .../RetrieveRegisterParametersRequest.php | 101 + .../RetrieveRegisterParametersResponse.php | 77 + .../RetrieveTransferParametersRequest.php | 101 + .../RetrieveTransferParametersResponse.php | 77 + .../Domains/V1beta1/SearchDomainsRequest.php | 101 + .../Domains/V1beta1/SearchDomainsResponse.php | 67 + .../Domains/V1beta1/TransferDomainRequest.php | 311 ++ .../Domains/V1beta1/TransferLockState.php | 61 + .../Domains/V1beta1/TransferParameters.php | 255 ++ .../V1beta1/UpdateRegistrationRequest.php | 129 + .../configure_contact_settings.php | 88 + .../DomainsClient/configure_dns_settings.php | 87 + .../configure_management_settings.php | 87 + .../DomainsClient/delete_registration.php | 94 + .../DomainsClient/export_registration.php | 87 + .../DomainsClient/get_registration.php | 67 + .../DomainsClient/list_registrations.php | 72 + .../V1beta1/DomainsClient/register_domain.php | 160 + .../reset_authorization_code.php | 74 + .../retrieve_authorization_code.php | 75 + .../retrieve_register_parameters.php | 69 + .../retrieve_transfer_parameters.php | 73 + .../V1beta1/DomainsClient/search_domains.php | 72 + .../V1beta1/DomainsClient/transfer_domain.php | 168 ++ .../DomainsClient/update_registration.php | 74 + .../v1beta1/src/V1beta1/DomainsClient.php | 36 + .../src/V1beta1/Gapic/DomainsGapicClient.php | 1473 ++++++++++ .../v1beta1/src/V1beta1/gapic_metadata.json | 93 + .../resources/domains_client_config.json | 119 + .../resources/domains_descriptor_config.php | 98 + .../resources/domains_rest_client_config.php | 271 ++ .../tests/Unit/V1beta1/DomainsClientTest.php | 1625 +++++++++++ .../Clouderrorreporting/V1Beta1/Common.php | Bin 0 -> 2312 bytes .../V1Beta1/ErrorGroupService.php | 42 + .../V1Beta1/ErrorStatsService.php | Bin 0 -> 5156 bytes .../V1Beta1/ReportErrorsService.php | 46 + .../V1beta1/DeleteEventsRequest.php | 83 + .../V1beta1/DeleteEventsResponse.php | 33 + .../ErrorReporting/V1beta1/ErrorContext.php | 206 ++ .../ErrorReporting/V1beta1/ErrorEvent.php | 207 ++ .../ErrorReporting/V1beta1/ErrorGroup.php | 181 ++ .../V1beta1/ErrorGroupOrder.php | 76 + .../V1beta1/ErrorGroupServiceGrpcClient.php | 66 + .../V1beta1/ErrorGroupStats.php | 488 ++++ .../V1beta1/ErrorStatsServiceGrpcClient.php | 81 + .../V1beta1/GetGroupRequest.php | 83 + .../V1beta1/HttpRequestContext.php | 252 ++ .../V1beta1/ListEventsRequest.php | 289 ++ .../V1beta1/ListEventsResponse.php | 153 + .../V1beta1/ListGroupStatsRequest.php | 493 ++++ .../V1beta1/ListGroupStatsResponse.php | 165 ++ .../ErrorReporting/V1beta1/QueryTimeRange.php | 68 + .../V1beta1/QueryTimeRange/Period.php | 90 + .../V1beta1/QueryTimeRange_Period.php | 16 + .../V1beta1/ReportErrorEventRequest.php | 127 + .../V1beta1/ReportErrorEventResponse.php | 34 + .../V1beta1/ReportErrorsServiceGrpcClient.php | 66 + .../V1beta1/ReportedErrorEvent.php | 295 ++ .../V1beta1/ResolutionStatus.php | 78 + .../ErrorReporting/V1beta1/ServiceContext.php | 180 ++ .../V1beta1/ServiceContextFilter.php | 150 + .../ErrorReporting/V1beta1/SourceLocation.php | 150 + .../ErrorReporting/V1beta1/TimedCount.php | 157 + .../V1beta1/TimedCountAlignment.php | 71 + .../ErrorReporting/V1beta1/TrackingIssue.php | 71 + .../V1beta1/UpdateGroupRequest.php | 77 + .../ErrorGroupServiceClient/get_group.php | 71 + .../ErrorGroupServiceClient/update_group.php | 57 + .../ErrorStatsServiceClient/delete_events.php | 71 + .../ErrorStatsServiceClient/list_events.php | 78 + .../list_group_stats.php | 76 + .../report_error_event.php | 120 + .../src/V1beta1/ErrorGroupServiceClient.php | 36 + .../src/V1beta1/ErrorStatsServiceClient.php | 36 + .../Gapic/ErrorGroupServiceGapicClient.php | 340 +++ .../Gapic/ErrorStatsServiceGapicClient.php | 530 ++++ .../Gapic/ReportErrorsServiceGapicClient.php | 316 ++ .../src/V1beta1/ReportErrorsServiceClient.php | 36 + .../v1beta1/src/V1beta1/gapic_metadata.json | 66 + .../error_group_service_client_config.json | 45 + .../error_group_service_descriptor_config.php | 7 + ...error_group_service_rest_client_config.php | 33 + .../error_stats_service_client_config.json | 50 + .../error_stats_service_descriptor_config.php | 28 + ...error_stats_service_rest_client_config.php | 45 + .../report_errors_service_client_config.json | 37 + ...eport_errors_service_descriptor_config.php | 7 + ...port_errors_service_rest_client_config.php | 21 + .../V1beta1/ErrorGroupServiceClientTest.php | 185 ++ .../V1beta1/ErrorStatsServiceClientTest.php | 263 ++ .../V1beta1/ReportErrorsServiceClientTest.php | 133 + .../Cloud/Essentialcontacts/V1/Enums.php | Bin 0 -> 1167 bytes .../Cloud/Essentialcontacts/V1/Service.php | 86 + .../V1/ComputeContactsRequest.php | 209 ++ .../V1/ComputeContactsResponse.php | 121 + .../Cloud/EssentialContacts/V1/Contact.php | 283 ++ .../V1/CreateContactRequest.php | 123 + .../V1/DeleteContactRequest.php | 79 + .../V1/EssentialContactsServiceGrpcClient.php | 144 + .../V1/GetContactRequest.php | 79 + .../V1/ListContactsRequest.php | 167 ++ .../V1/ListContactsResponse.php | 113 + .../V1/NotificationCategory.php | 113 + .../V1/SendTestMessageRequest.php | 167 ++ .../V1/UpdateContactRequest.php | 133 + .../EssentialContacts/V1/ValidationState.php | 64 + .../compute_contacts.php | 75 + .../create_contact.php | 71 + .../delete_contact.php | 67 + .../get_contact.php | 69 + .../list_contacts.php | 73 + .../send_test_message.php | 89 + .../update_contact.php | 57 + .../src/V1/EssentialContactsServiceClient.php | 34 + .../EssentialContactsServiceGapicClient.php | 820 ++++++ .../v1/src/V1/gapic_metadata.json | 53 + ...ential_contacts_service_client_config.json | 79 + ...ial_contacts_service_descriptor_config.php | 28 + ...al_contacts_service_rest_client_config.php | 166 ++ .../V1/EssentialContactsServiceClientTest.php | 523 ++++ .../Google/Cloud/Eventarc/V1/Channel.php | Bin 0 -> 1619 bytes .../Cloud/Eventarc/V1/ChannelConnection.php | 39 + .../Google/Cloud/Eventarc/V1/Discovery.php | 44 + .../Google/Cloud/Eventarc/V1/Eventarc.php | 173 ++ .../Cloud/Eventarc/V1/GoogleChannelConfig.php | 37 + .../Google/Cloud/Eventarc/V1/Trigger.php | Bin 0 -> 3016 bytes .../src/Google/Cloud/Eventarc/V1/Channel.php | 420 +++ .../Cloud/Eventarc/V1/Channel/State.php | 82 + .../Cloud/Eventarc/V1/ChannelConnection.php | 284 ++ .../Cloud/Eventarc/V1/Channel_State.php | 16 + .../src/Google/Cloud/Eventarc/V1/CloudRun.php | 155 + .../V1/CreateChannelConnectionRequest.php | 145 + .../Eventarc/V1/CreateChannelRequest.php | 183 ++ .../Eventarc/V1/CreateTriggerRequest.php | 183 ++ .../V1/DeleteChannelConnectionRequest.php | 67 + .../Eventarc/V1/DeleteChannelRequest.php | 105 + .../Eventarc/V1/DeleteTriggerRequest.php | 181 ++ .../Google/Cloud/Eventarc/V1/Destination.php | 192 ++ .../Google/Cloud/Eventarc/V1/EventFilter.php | 155 + .../Google/Cloud/Eventarc/V1/EventType.php | 201 ++ .../Cloud/Eventarc/V1/EventarcGrpcClient.php | 306 ++ .../Cloud/Eventarc/V1/FilteringAttribute.php | 178 ++ .../src/Google/Cloud/Eventarc/V1/GKE.php | 223 ++ .../V1/GetChannelConnectionRequest.php | 67 + .../Cloud/Eventarc/V1/GetChannelRequest.php | 67 + .../V1/GetGoogleChannelConfigRequest.php | 67 + .../Cloud/Eventarc/V1/GetProviderRequest.php | 67 + .../Cloud/Eventarc/V1/GetTriggerRequest.php | 67 + .../Cloud/Eventarc/V1/GoogleChannelConfig.php | 165 ++ .../V1/ListChannelConnectionsRequest.php | 151 + .../V1/ListChannelConnectionsResponse.php | 147 + .../Cloud/Eventarc/V1/ListChannelsRequest.php | 197 ++ .../Eventarc/V1/ListChannelsResponse.php | 139 + .../Eventarc/V1/ListProvidersRequest.php | 227 ++ .../Eventarc/V1/ListProvidersResponse.php | 139 + .../Cloud/Eventarc/V1/ListTriggersRequest.php | 239 ++ .../Eventarc/V1/ListTriggersResponse.php | 139 + .../Cloud/Eventarc/V1/OperationMetadata.php | 303 ++ .../src/Google/Cloud/Eventarc/V1/Provider.php | 139 + .../src/Google/Cloud/Eventarc/V1/Pubsub.php | 129 + .../Cloud/Eventarc/V1/StateCondition.php | 101 + .../Google/Cloud/Eventarc/V1/Transport.php | 79 + .../src/Google/Cloud/Eventarc/V1/Trigger.php | 569 ++++ .../Eventarc/V1/UpdateChannelRequest.php | 167 ++ .../V1/UpdateGoogleChannelConfigRequest.php | 129 + .../Eventarc/V1/UpdateTriggerRequest.php | 205 ++ .../V1/EventarcClient/create_channel.php | 95 + .../create_channel_connection.php | 110 + .../V1/EventarcClient/create_trigger.php | 120 + .../V1/EventarcClient/delete_channel.php | 81 + .../delete_channel_connection.php | 82 + .../V1/EventarcClient/delete_trigger.php | 81 + .../samples/V1/EventarcClient/get_channel.php | 66 + .../EventarcClient/get_channel_connection.php | 70 + .../get_google_channel_config.php | 66 + .../V1/EventarcClient/get_iam_policy.php | 67 + .../V1/EventarcClient/get_location.php | 53 + .../V1/EventarcClient/get_provider.php | 66 + .../samples/V1/EventarcClient/get_trigger.php | 66 + .../list_channel_connections.php | 71 + .../V1/EventarcClient/list_channels.php | 71 + .../V1/EventarcClient/list_locations.php | 58 + .../V1/EventarcClient/list_providers.php | 71 + .../V1/EventarcClient/list_triggers.php | 71 + .../V1/EventarcClient/set_iam_policy.php | 73 + .../EventarcClient/test_iam_permissions.php | 80 + .../V1/EventarcClient/update_channel.php | 78 + .../update_google_channel_config.php | 70 + .../V1/EventarcClient/update_trigger.php | 78 + .../Eventarc/v1/src/V1/EventarcClient.php | 34 + .../v1/src/V1/Gapic/EventarcGapicClient.php | 1993 +++++++++++++ .../Eventarc/v1/src/V1/gapic_metadata.json | 133 + .../V1/resources/eventarc_client_config.json | 137 + .../resources/eventarc_descriptor_config.php | 138 + .../resources/eventarc_rest_client_config.php | 381 +++ .../v1/tests/Unit/V1/EventarcClientTest.php | 2136 ++++++++++++++ .../Eventarc/Publishing/V1/Publisher.php | 44 + .../PublishChannelConnectionEventsRequest.php | 159 + ...PublishChannelConnectionEventsResponse.php | 33 + .../Publishing/V1/PublishEventsRequest.php | 159 + .../Publishing/V1/PublishEventsResponse.php | 33 + .../Publishing/V1/PublisherGrpcClient.php | 87 + .../publish_channel_connection_events.php | 53 + .../V1/PublisherClient/publish_events.php | 53 + .../v1/src/V1/Gapic/PublisherGapicClient.php | 298 ++ .../v1/src/V1/PublisherClient.php | 34 + .../v1/src/V1/gapic_metadata.json | 28 + .../V1/resources/publisher_client_config.json | 42 + .../resources/publisher_descriptor_config.php | 7 + .../publisher_rest_client_config.php | 33 + .../v1/tests/Unit/V1/PublisherClientTest.php | 166 ++ .../Filestore/V1/CloudFilestoreService.php | Bin 0 -> 8126 bytes .../src/Google/Cloud/Filestore/V1/Backup.php | 524 ++++ .../Cloud/Filestore/V1/Backup/State.php | 79 + .../Cloud/Filestore/V1/Backup_State.php | 16 + .../V1/CloudFilestoreManagerGrpcClient.php | 227 ++ .../Filestore/V1/CreateBackupRequest.php | 173 ++ .../Filestore/V1/CreateInstanceRequest.php | 157 + .../Filestore/V1/DeleteBackupRequest.php | 71 + .../Filestore/V1/DeleteInstanceRequest.php | 71 + .../Cloud/Filestore/V1/FileShareConfig.php | 191 ++ .../Cloud/Filestore/V1/GetBackupRequest.php | 71 + .../Cloud/Filestore/V1/GetInstanceRequest.php | 71 + .../Google/Cloud/Filestore/V1/Instance.php | 470 +++ .../Cloud/Filestore/V1/Instance/State.php | 96 + .../Cloud/Filestore/V1/Instance/Tier.php | 90 + .../Cloud/Filestore/V1/Instance_State.php | 16 + .../Cloud/Filestore/V1/Instance_Tier.php | 16 + .../Cloud/Filestore/V1/ListBackupsRequest.php | 227 ++ .../Filestore/V1/ListBackupsResponse.php | 159 + .../Filestore/V1/ListInstancesRequest.php | 223 ++ .../Filestore/V1/ListInstancesResponse.php | 155 + .../Cloud/Filestore/V1/NetworkConfig.php | 217 ++ .../V1/NetworkConfig/AddressMode.php | 57 + .../V1/NetworkConfig_AddressMode.php | 16 + .../Cloud/Filestore/V1/NfsExportOptions.php | 271 ++ .../V1/NfsExportOptions/AccessMode.php | 64 + .../V1/NfsExportOptions/SquashMode.php | 64 + .../V1/NfsExportOptions_AccessMode.php | 16 + .../V1/NfsExportOptions_SquashMode.php | 16 + .../Filestore/V1/RestoreInstanceRequest.php | 155 + .../Filestore/V1/UpdateBackupRequest.php | 125 + .../Filestore/V1/UpdateInstanceRequest.php | 141 + .../create_backup.php | 91 + .../create_instance.php | 89 + .../delete_backup.php | 76 + .../delete_instance.php | 76 + .../get_backup.php | 67 + .../get_instance.php | 67 + .../list_backups.php | 77 + .../list_instances.php | 76 + .../restore_instance.php | 86 + .../update_backup.php | 70 + .../update_instance.php | 65 + .../v1/src/V1/CloudFilestoreManagerClient.php | 34 + .../CloudFilestoreManagerGapicClient.php | 1156 ++++++++ .../Filestore/v1/src/V1/gapic_metadata.json | 73 + ...cloud_filestore_manager_client_config.json | 119 + ...ud_filestore_manager_descriptor_config.php | 98 + ...d_filestore_manager_rest_client_config.php | 217 ++ .../V1/CloudFilestoreManagerClientTest.php | 1233 ++++++++ .../Google/Firestore/Admin/V1/Database.php | Bin 0 -> 1722 bytes .../Google/Firestore/Admin/V1/Field.php | Bin 0 -> 1674 bytes .../Firestore/Admin/V1/FirestoreAdmin.php | 115 + .../Google/Firestore/Admin/V1/Index.php | Bin 0 -> 1705 bytes .../Google/Firestore/Admin/V1/Location.php | 28 + .../Google/Firestore/Admin/V1/Operation.php | Bin 0 -> 3272 bytes .../Firestore/Admin/V1/CreateIndexRequest.php | 115 + .../Cloud/Firestore/Admin/V1/Database.php | 317 ++ .../V1/Database/AppEngineIntegrationMode.php | 68 + .../Admin/V1/Database/ConcurrencyMode.php | 77 + .../Admin/V1/Database/DatabaseType.php | 67 + .../V1/Database_AppEngineIntegrationMode.php | 16 + .../Admin/V1/Database_ConcurrencyMode.php | 16 + .../Admin/V1/Database_DatabaseType.php | 16 + .../Firestore/Admin/V1/DeleteIndexRequest.php | 71 + .../Admin/V1/ExportDocumentsMetadata.php | 316 ++ .../Admin/V1/ExportDocumentsRequest.php | 167 ++ .../Admin/V1/ExportDocumentsResponse.php | 75 + .../Google/Cloud/Firestore/Admin/V1/Field.php | 261 ++ .../Firestore/Admin/V1/Field/IndexConfig.php | 208 ++ .../Firestore/Admin/V1/Field/TtlConfig.php | 74 + .../Admin/V1/Field/TtlConfig/State.php | 78 + .../Admin/V1/FieldOperationMetadata.php | 368 +++ .../IndexConfigDelta.php | 114 + .../IndexConfigDelta/ChangeType.php | 64 + .../FieldOperationMetadata/TtlConfigDelta.php | 70 + .../TtlConfigDelta/ChangeType.php | 64 + ...ieldOperationMetadata_IndexConfigDelta.php | 16 + ...onMetadata_IndexConfigDelta_ChangeType.php | 16 + .../FieldOperationMetadata_TtlConfigDelta.php | 16 + ...tionMetadata_TtlConfigDelta_ChangeType.php | 16 + .../Firestore/Admin/V1/Field_IndexConfig.php | 16 + .../Firestore/Admin/V1/Field_TtlConfig.php | 16 + .../Admin/V1/Field_TtlConfig_State.php | 16 + .../Admin/V1/FirestoreAdminGrpcClient.php | 275 ++ .../Firestore/Admin/V1/GetDatabaseRequest.php | 71 + .../Firestore/Admin/V1/GetFieldRequest.php | 71 + .../Firestore/Admin/V1/GetIndexRequest.php | 71 + .../Admin/V1/ImportDocumentsMetadata.php | 316 ++ .../Admin/V1/ImportDocumentsRequest.php | 159 + .../Google/Cloud/Firestore/Admin/V1/Index.php | 234 ++ .../Firestore/Admin/V1/Index/IndexField.php | 158 + .../Admin/V1/Index/IndexField/ArrayConfig.php | 57 + .../Admin/V1/Index/IndexField/Order.php | 64 + .../Firestore/Admin/V1/Index/QueryScope.php | 69 + .../Cloud/Firestore/Admin/V1/Index/State.php | 86 + .../Admin/V1/IndexOperationMetadata.php | 286 ++ .../Firestore/Admin/V1/Index_IndexField.php | 16 + .../Admin/V1/Index_IndexField_ArrayConfig.php | 16 + .../Admin/V1/Index_IndexField_Order.php | 16 + .../Firestore/Admin/V1/Index_QueryScope.php | 16 + .../Cloud/Firestore/Admin/V1/Index_State.php | 16 + .../Admin/V1/ListDatabasesRequest.php | 71 + .../Admin/V1/ListDatabasesResponse.php | 67 + .../Firestore/Admin/V1/ListFieldsRequest.php | 197 ++ .../Firestore/Admin/V1/ListFieldsResponse.php | 105 + .../Firestore/Admin/V1/ListIndexesRequest.php | 181 ++ .../Admin/V1/ListIndexesResponse.php | 105 + .../Firestore/Admin/V1/LocationMetadata.php | 33 + .../Firestore/Admin/V1/OperationState.php | 98 + .../Cloud/Firestore/Admin/V1/Progress.php | 103 + .../Admin/V1/UpdateDatabaseMetadata.php | 33 + .../Admin/V1/UpdateDatabaseRequest.php | 121 + .../Firestore/Admin/V1/UpdateFieldRequest.php | 125 + .../V1/FirestoreAdminClient/create_index.php | 88 + .../V1/FirestoreAdminClient/delete_index.php | 70 + .../FirestoreAdminClient/export_documents.php | 89 + .../V1/FirestoreAdminClient/get_database.php | 67 + .../V1/FirestoreAdminClient/get_field.php | 72 + .../V1/FirestoreAdminClient/get_index.php | 72 + .../FirestoreAdminClient/import_documents.php | 80 + .../FirestoreAdminClient/list_databases.php | 67 + .../V1/FirestoreAdminClient/list_fields.php | 81 + .../V1/FirestoreAdminClient/list_indexes.php | 76 + .../FirestoreAdminClient/update_database.php | 68 + .../V1/FirestoreAdminClient/update_field.php | 118 + .../v1/Admin/src/V1/FirestoreAdminClient.php | 34 + .../V1/Gapic/FirestoreAdminGapicClient.php | 1237 ++++++++ .../v1/Admin/src/V1/gapic_metadata.json | 78 + .../firestore_admin_client_config.json | 106 + .../firestore_admin_descriptor_config.php | 78 + .../firestore_admin_rest_client_config.php | 195 ++ .../Unit/V1/FirestoreAdminClientTest.php | 1116 +++++++ .../Google/Firestore/V1/AggregationResult.php | 33 + .../Google/Firestore/V1/Common.php | Bin 0 -> 1297 bytes .../Google/Firestore/V1/Document.php | Bin 0 -> 1931 bytes .../Google/Firestore/V1/Firestore.php | Bin 0 -> 10729 bytes .../GPBMetadata/Google/Firestore/V1/Query.php | Bin 0 -> 3478 bytes .../GPBMetadata/Google/Firestore/V1/Write.php | Bin 0 -> 2521 bytes .../Cloud/Firestore/V1/AggregationResult.php | 82 + .../Google/Cloud/Firestore/V1/ArrayValue.php | 67 + .../Firestore/V1/BatchGetDocumentsRequest.php | 289 ++ .../V1/BatchGetDocumentsResponse.php | 209 ++ .../Cloud/Firestore/V1/BatchWriteRequest.php | 151 + .../Cloud/Firestore/V1/BatchWriteResponse.php | 117 + .../Firestore/V1/BeginTransactionRequest.php | 119 + .../Firestore/V1/BeginTransactionResponse.php | 67 + .../Cloud/Firestore/V1/CommitRequest.php | 143 + .../Cloud/Firestore/V1/CommitResponse.php | 123 + .../Firestore/V1/CreateDocumentRequest.php | 243 ++ .../src/Google/Cloud/Firestore/V1/Cursor.php | 113 + .../Firestore/V1/DeleteDocumentRequest.php | 119 + .../Google/Cloud/Firestore/V1/Document.php | 290 ++ .../Cloud/Firestore/V1/DocumentChange.php | 153 + .../Cloud/Firestore/V1/DocumentDelete.php | 153 + .../Cloud/Firestore/V1/DocumentMask.php | 75 + .../Cloud/Firestore/V1/DocumentRemove.php | 154 + .../Cloud/Firestore/V1/DocumentTransform.php | 109 + .../V1/DocumentTransform/FieldTransform.php | 413 +++ .../FieldTransform/ServerValue.php | 59 + .../V1/DocumentTransform_FieldTransform.php | 16 + ...ntTransform_FieldTransform_ServerValue.php | 16 + .../Cloud/Firestore/V1/ExistenceFilter.php | 109 + .../Firestore/V1/FirestoreGrpcClient.php | 302 ++ .../Cloud/Firestore/V1/GetDocumentRequest.php | 201 ++ .../Firestore/V1/ListCollectionIdsRequest.php | 196 ++ .../V1/ListCollectionIdsResponse.php | 101 + .../Firestore/V1/ListDocumentsRequest.php | 411 +++ .../Firestore/V1/ListDocumentsResponse.php | 101 + .../Cloud/Firestore/V1/ListenRequest.php | 180 ++ .../Cloud/Firestore/V1/ListenResponse.php | 219 ++ .../Google/Cloud/Firestore/V1/MapValue.php | 83 + .../Firestore/V1/PartitionQueryRequest.php | 357 +++ .../Firestore/V1/PartitionQueryResponse.php | 161 ++ .../Cloud/Firestore/V1/Precondition.php | 114 + .../Cloud/Firestore/V1/RollbackRequest.php | 105 + .../V1/RunAggregationQueryRequest.php | 252 ++ .../V1/RunAggregationQueryResponse.php | 167 ++ .../Cloud/Firestore/V1/RunQueryRequest.php | 252 ++ .../Cloud/Firestore/V1/RunQueryResponse.php | 270 ++ .../V1/StructuredAggregationQuery.php | 117 + .../Aggregation.php | 216 ++ .../Aggregation/Count.php | 163 ++ ...StructuredAggregationQuery_Aggregation.php | 16 + ...uredAggregationQuery_Aggregation_Count.php | 16 + .../Cloud/Firestore/V1/StructuredQuery.php | 580 ++++ .../V1/StructuredQuery/CollectionSelector.php | 116 + .../V1/StructuredQuery/CompositeFilter.php | 112 + .../CompositeFilter/Operator.php | 61 + .../V1/StructuredQuery/Direction.php | 64 + .../V1/StructuredQuery/FieldFilter.php | 158 + .../StructuredQuery/FieldFilter/Operator.php | 143 + .../V1/StructuredQuery/FieldReference.php | 78 + .../Firestore/V1/StructuredQuery/Filter.php | 144 + .../Firestore/V1/StructuredQuery/Order.php | 114 + .../V1/StructuredQuery/Projection.php | 78 + .../V1/StructuredQuery/UnaryFilter.php | 112 + .../StructuredQuery/UnaryFilter/Operator.php | 84 + .../V1/StructuredQuery_CollectionSelector.php | 16 + .../V1/StructuredQuery_CompositeFilter.php | 16 + ...ructuredQuery_CompositeFilter_Operator.php | 16 + .../V1/StructuredQuery_Direction.php | 16 + .../V1/StructuredQuery_FieldFilter.php | 16 + .../StructuredQuery_FieldFilter_Operator.php | 16 + .../V1/StructuredQuery_FieldReference.php | 16 + .../Firestore/V1/StructuredQuery_Filter.php | 16 + .../Firestore/V1/StructuredQuery_Order.php | 16 + .../V1/StructuredQuery_Projection.php | 16 + .../V1/StructuredQuery_UnaryFilter.php | 16 + .../StructuredQuery_UnaryFilter_Operator.php | 16 + .../src/Google/Cloud/Firestore/V1/Target.php | 261 ++ .../Firestore/V1/Target/DocumentsTarget.php | 82 + .../Cloud/Firestore/V1/Target/QueryTarget.php | 132 + .../Cloud/Firestore/V1/TargetChange.php | 267 ++ .../V1/TargetChange/TargetChangeType.php | 86 + .../V1/TargetChange_TargetChangeType.php | 16 + .../Firestore/V1/Target_DocumentsTarget.php | 16 + .../Cloud/Firestore/V1/Target_QueryTarget.php | 16 + .../Cloud/Firestore/V1/TransactionOptions.php | 108 + .../V1/TransactionOptions/PBReadOnly.php | 84 + .../V1/TransactionOptions/ReadOnly.php | 9 + .../V1/TransactionOptions/ReadWrite.php | 70 + .../V1/TransactionOptions_ReadOnly.php | 16 + .../V1/TransactionOptions_ReadWrite.php | 16 + .../Firestore/V1/UpdateDocumentRequest.php | 245 ++ .../src/Google/Cloud/Firestore/V1/Value.php | 435 +++ .../src/Google/Cloud/Firestore/V1/Write.php | 314 ++ .../Cloud/Firestore/V1/WriteRequest.php | 277 ++ .../Cloud/Firestore/V1/WriteResponse.php | 203 ++ .../Google/Cloud/Firestore/V1/WriteResult.php | 127 + .../FirestoreClient/batch_get_documents.php | 82 + .../V1/FirestoreClient/batch_write.php | 61 + .../V1/FirestoreClient/begin_transaction.php | 66 + .../v1/samples/V1/FirestoreClient/commit.php | 70 + .../V1/FirestoreClient/create_document.php | 76 + .../V1/FirestoreClient/delete_document.php | 64 + .../V1/FirestoreClient/get_document.php | 66 + .../FirestoreClient/list_collection_ids.php | 72 + .../V1/FirestoreClient/list_documents.php | 78 + .../v1/samples/V1/FirestoreClient/listen.php | 77 + .../V1/FirestoreClient/partition_query.php | 60 + .../samples/V1/FirestoreClient/rollback.php | 66 + .../FirestoreClient/run_aggregation_query.php | 86 + .../samples/V1/FirestoreClient/run_query.php | 75 + .../V1/FirestoreClient/update_document.php | 58 + .../v1/samples/V1/FirestoreClient/write.php | 78 + .../Firestore/v1/src/V1/FirestoreClient.php | 34 + .../v1/src/V1/Gapic/FirestoreGapicClient.php | 1312 +++++++++ .../Firestore/v1/src/V1/gapic_metadata.json | 98 + .../V1/resources/firestore_client_config.json | 174 ++ .../resources/firestore_descriptor_config.php | 63 + .../firestore_rest_client_config.php | 272 ++ .../v1/tests/Unit/V1/FirestoreClientTest.php | 1219 ++++++++ .../Google/Cloud/Functions/V1/Functions.php | Bin 0 -> 8448 bytes .../Google/Cloud/Functions/V1/Operations.php | Bin 0 -> 1278 bytes .../Functions/V1/CallFunctionRequest.php | 101 + .../Functions/V1/CallFunctionResponse.php | 143 + .../Cloud/Functions/V1/CloudFunction.php | 1587 ++++++++++ .../V1/CloudFunction/DockerRegistry.php | 69 + .../V1/CloudFunction/IngressSettings.php | 73 + .../VpcConnectorEgressSettings.php | 67 + .../Functions/V1/CloudFunctionStatus.php | 83 + .../V1/CloudFunction_DockerRegistry.php | 16 + .../V1/CloudFunction_IngressSettings.php | 16 + ...oudFunction_VpcConnectorEgressSettings.php | 16 + .../V1/CloudFunctionsServiceGrpcClient.php | 241 ++ .../Functions/V1/CreateFunctionRequest.php | 115 + .../Functions/V1/DeleteFunctionRequest.php | 67 + .../Cloud/Functions/V1/EventTrigger.php | 292 ++ .../Cloud/Functions/V1/FailurePolicy.php | 76 + .../Functions/V1/FailurePolicy/Retry.php | 40 + .../Functions/V1/FailurePolicy_Retry.php | 16 + .../V1/GenerateDownloadUrlRequest.php | 109 + .../V1/GenerateDownloadUrlResponse.php | 71 + .../Functions/V1/GenerateUploadUrlRequest.php | 161 ++ .../V1/GenerateUploadUrlResponse.php | 75 + .../Cloud/Functions/V1/GetFunctionRequest.php | 67 + .../Cloud/Functions/V1/HttpsTrigger.php | 101 + .../V1/HttpsTrigger/SecurityLevel.php | 70 + .../V1/HttpsTrigger_SecurityLevel.php | 16 + .../Functions/V1/ListFunctionsRequest.php | 167 ++ .../Functions/V1/ListFunctionsResponse.php | 151 + .../Functions/V1/OperationMetadataV1.php | 349 +++ .../Cloud/Functions/V1/OperationType.php | 68 + .../Cloud/Functions/V1/SecretEnvVar.php | 191 ++ .../Cloud/Functions/V1/SecretVolume.php | 213 ++ .../V1/SecretVolume/SecretVersion.php | 124 + .../V1/SecretVolume_SecretVersion.php | 16 + .../Cloud/Functions/V1/SourceRepository.php | 150 + .../Functions/V1/UpdateFunctionRequest.php | 121 + .../call_function.php | 75 + .../create_function.php | 84 + .../delete_function.php | 81 + .../generate_download_url.php | 57 + .../generate_upload_url.php | 77 + .../get_function.php | 70 + .../get_iam_policy.php | 68 + .../list_functions.php | 58 + .../set_iam_policy.php | 70 + .../test_iam_permissions.php | 77 + .../update_function.php | 68 + .../v1/src/V1/CloudFunctionsServiceClient.php | 34 + .../CloudFunctionsServiceGapicClient.php | 1055 +++++++ .../Functions/v1/src/V1/gapic_metadata.json | 73 + ...cloud_functions_service_client_config.json | 100 + ...ud_functions_service_descriptor_config.php | 48 + ...d_functions_service_rest_client_config.php | 168 ++ .../V1/CloudFunctionsServiceClientTest.php | 1021 +++++++ .../Google/Cloud/Functions/V2/Functions.php | Bin 0 -> 10714 bytes .../Google/Cloud/Functions/V2/BuildConfig.php | 442 +++ .../Functions/V2/CreateFunctionRequest.php | 161 ++ .../Functions/V2/DeleteFunctionRequest.php | 67 + .../Google/Cloud/Functions/V2/Environment.php | 61 + .../Google/Cloud/Functions/V2/EventFilter.php | 147 + .../Cloud/Functions/V2/EventTrigger.php | 374 +++ .../Functions/V2/EventTrigger/RetryPolicy.php | 66 + .../Functions/V2/EventTrigger_RetryPolicy.php | 16 + .../V2/FunctionServiceGrpcClient.php | 190 ++ .../Cloud/Functions/V2/Function_State.php | 16 + .../V2/GenerateDownloadUrlRequest.php | 71 + .../V2/GenerateDownloadUrlResponse.php | 71 + .../Functions/V2/GenerateUploadUrlRequest.php | 71 + .../V2/GenerateUploadUrlResponse.php | 139 + .../Cloud/Functions/V2/GetFunctionRequest.php | 67 + .../Functions/V2/ListFunctionsRequest.php | 247 ++ .../Functions/V2/ListFunctionsResponse.php | 143 + .../Functions/V2/ListRuntimesRequest.php | 109 + .../Functions/V2/ListRuntimesResponse.php | 67 + .../V2/ListRuntimesResponse/Runtime.php | 207 ++ .../V2/ListRuntimesResponse/RuntimeStage.php | 92 + .../V2/ListRuntimesResponse_Runtime.php | 16 + .../V2/ListRuntimesResponse_RuntimeStage.php | 16 + .../Cloud/Functions/V2/OperationMetadata.php | 381 +++ .../Google/Cloud/Functions/V2/PBFunction.php | 430 +++ .../Cloud/Functions/V2/PBFunction/State.php | 86 + .../Google/Cloud/Functions/V2/RepoSource.php | 309 ++ .../Cloud/Functions/V2/SecretEnvVar.php | 191 ++ .../Cloud/Functions/V2/SecretVolume.php | 203 ++ .../V2/SecretVolume/SecretVersion.php | 124 + .../V2/SecretVolume_SecretVersion.php | 16 + .../Cloud/Functions/V2/ServiceConfig.php | 676 +++++ .../V2/ServiceConfig/IngressSettings.php | 73 + .../VpcConnectorEgressSettings.php | 67 + .../V2/ServiceConfig_IngressSettings.php | 16 + ...rviceConfig_VpcConnectorEgressSettings.php | 16 + .../src/Google/Cloud/Functions/V2/Source.php | 111 + .../Cloud/Functions/V2/SourceProvenance.php | 130 + .../src/Google/Cloud/Functions/V2/Stage.php | 237 ++ .../Google/Cloud/Functions/V2/Stage/Name.php | 92 + .../Google/Cloud/Functions/V2/Stage/State.php | 71 + .../Google/Cloud/Functions/V2/Stage_Name.php | 16 + .../Google/Cloud/Functions/V2/Stage_State.php | 16 + .../Cloud/Functions/V2/StateMessage.php | 135 + .../Functions/V2/StateMessage/Severity.php | 71 + .../Functions/V2/StateMessage_Severity.php | 16 + .../Cloud/Functions/V2/StorageSource.php | 155 + .../Functions/V2/UpdateFunctionRequest.php | 129 + .../FunctionServiceClient/create_function.php | 84 + .../FunctionServiceClient/delete_function.php | 77 + .../generate_download_url.php | 71 + .../generate_upload_url.php | 89 + .../V2/FunctionServiceClient/get_function.php | 66 + .../FunctionServiceClient/get_iam_policy.php | 67 + .../FunctionServiceClient/list_functions.php | 76 + .../FunctionServiceClient/list_locations.php | 58 + .../FunctionServiceClient/list_runtimes.php | 67 + .../FunctionServiceClient/set_iam_policy.php | 73 + .../test_iam_permissions.php | 80 + .../FunctionServiceClient/update_function.php | 68 + .../v2/src/V2/FunctionServiceClient.php | 34 + .../V2/Gapic/FunctionServiceGapicClient.php | 1093 +++++++ .../Functions/v2/src/V2/gapic_metadata.json | 78 + .../function_service_client_config.json | 82 + .../function_service_descriptor_config.php | 58 + .../function_service_rest_client_config.php | 176 ++ .../Unit/V2/FunctionServiceClientTest.php | 997 +++++++ .../Cloud/Gsuiteaddons/V1/Gsuiteaddons.php | 116 + .../Google/Cloud/GSuiteAddOns/V1/AddOns.php | 385 +++ .../Cloud/GSuiteAddOns/V1/Authorization.php | 147 + .../V1/CreateDeploymentRequest.php | 153 + .../V1/DeleteDeploymentRequest.php | 109 + .../Cloud/GSuiteAddOns/V1/Deployment.php | 195 ++ .../V1/GSuiteAddOnsGrpcClient.php | 201 ++ .../V1/GetAuthorizationRequest.php | 75 + .../GSuiteAddOns/V1/GetDeploymentRequest.php | 71 + .../V1/GetInstallStatusRequest.php | 71 + .../V1/InstallDeploymentRequest.php | 71 + .../Cloud/GSuiteAddOns/V1/InstallStatus.php | 142 + .../V1/ListDeploymentsRequest.php | 163 ++ .../V1/ListDeploymentsResponse.php | 105 + .../V1/ReplaceDeploymentRequest.php | 77 + .../V1/UninstallDeploymentRequest.php | 71 + .../GSuiteAddOnsClient/create_deployment.php | 74 + .../GSuiteAddOnsClient/delete_deployment.php | 66 + .../GSuiteAddOnsClient/get_authorization.php | 69 + .../V1/GSuiteAddOnsClient/get_deployment.php | 68 + .../GSuiteAddOnsClient/get_install_status.php | 68 + .../GSuiteAddOnsClient/install_deployment.php | 68 + .../GSuiteAddOnsClient/list_deployments.php | 73 + .../GSuiteAddOnsClient/replace_deployment.php | 56 + .../uninstall_deployment.php | 68 + .../v1/src/V1/GSuiteAddOnsClient.php | 34 + .../src/V1/Gapic/GSuiteAddOnsGapicClient.php | 777 +++++ .../v1/src/V1/gapic_metadata.json | 63 + .../g_suite_add_ons_client_config.json | 100 + .../g_suite_add_ons_descriptor_config.php | 18 + .../g_suite_add_ons_rest_client_config.php | 116 + .../tests/Unit/V1/GSuiteAddOnsClientTest.php | 622 ++++ .../Google/Cloud/Gaming/V1/Common.php | Bin 0 -> 3371 bytes .../Cloud/Gaming/V1/GameServerClusters.php | Bin 0 -> 4910 bytes .../Gaming/V1/GameServerClustersService.php | 43 + .../Cloud/Gaming/V1/GameServerConfigs.php | 73 + .../Gaming/V1/GameServerConfigsService.php | 39 + .../Cloud/Gaming/V1/GameServerDeployments.php | Bin 0 -> 4147 bytes .../V1/GameServerDeploymentsService.php | 45 + .../Google/Cloud/Gaming/V1/Realms.php | 75 + .../Google/Cloud/Gaming/V1/RealmsService.php | 42 + .../V1/CreateGameServerClusterRequest.php | 149 + .../V1/CreateGameServerConfigRequest.php | 149 + .../V1/CreateGameServerDeploymentRequest.php | 149 + .../Cloud/Gaming/V1/CreateRealmRequest.php | 149 + .../V1/DeleteGameServerClusterRequest.php | 71 + .../V1/DeleteGameServerConfigRequest.php | 71 + .../V1/DeleteGameServerDeploymentRequest.php | 71 + .../Cloud/Gaming/V1/DeleteRealmRequest.php | 71 + .../Cloud/Gaming/V1/DeployedFleetDetails.php | 121 + .../V1/DeployedFleetDetails/DeployedFleet.php | 200 ++ .../DeployedFleet/DeployedFleetStatus.php | 181 ++ .../DeployedFleetAutoscaler.php | 152 + .../V1/DeployedFleetDetails_DeployedFleet.php | 16 + ...edFleetDetails_DeployedFleetAutoscaler.php | 16 + ...ails_DeployedFleet_DeployedFleetStatus.php | 16 + .../Gaming/V1/FetchDeploymentStateRequest.php | 71 + .../V1/FetchDeploymentStateResponse.php | 101 + .../DeployedClusterState.php | 108 + ...mentStateResponse_DeployedClusterState.php | 16 + .../Google/Cloud/Gaming/V1/FleetConfig.php | 105 + .../Cloud/Gaming/V1/GameServerCluster.php | 369 +++ .../V1/GameServerClusterConnectionInfo.php | 117 + .../Cloud/Gaming/V1/GameServerClusterView.php | 64 + .../GameServerClustersServiceGrpcClient.php | 157 + .../Cloud/Gaming/V1/GameServerConfig.php | 311 ++ .../Gaming/V1/GameServerConfigOverride.php | 117 + .../V1/GameServerConfigsServiceGrpcClient.php | 99 + .../Cloud/Gaming/V1/GameServerDeployment.php | 273 ++ .../Gaming/V1/GameServerDeploymentRollout.php | 290 ++ ...GameServerDeploymentsServiceGrpcClient.php | 179 ++ .../Gaming/V1/GetGameServerClusterRequest.php | 125 + .../Gaming/V1/GetGameServerConfigRequest.php | 71 + .../V1/GetGameServerDeploymentRequest.php | 71 + .../GetGameServerDeploymentRolloutRequest.php | 72 + .../Cloud/Gaming/V1/GetRealmRequest.php | 71 + .../Cloud/Gaming/V1/GkeClusterReference.php | 95 + .../Gaming/V1/KubernetesClusterState.php | 253 ++ .../InstallationState.php | 108 + ...bernetesClusterState_InstallationState.php | 16 + .../Google/Cloud/Gaming/V1/LabelSelector.php | 67 + .../V1/ListGameServerClustersRequest.php | 281 ++ .../V1/ListGameServerClustersResponse.php | 139 + .../V1/ListGameServerConfigsRequest.php | 227 ++ .../V1/ListGameServerConfigsResponse.php | 139 + .../V1/ListGameServerDeploymentsRequest.php | 231 ++ .../V1/ListGameServerDeploymentsResponse.php | 139 + .../Cloud/Gaming/V1/ListRealmsRequest.php | 231 ++ .../Cloud/Gaming/V1/ListRealmsResponse.php | 139 + .../Cloud/Gaming/V1/OperationMetadata.php | 383 +++ .../Cloud/Gaming/V1/OperationStatus.php | 133 + .../Gaming/V1/OperationStatus/ErrorCode.php | 61 + .../Gaming/V1/OperationStatus_ErrorCode.php | 16 + .../PreviewCreateGameServerClusterRequest.php | 236 ++ ...PreviewCreateGameServerClusterResponse.php | 160 + .../PreviewDeleteGameServerClusterRequest.php | 115 + ...PreviewDeleteGameServerClusterResponse.php | 112 + ...viewGameServerDeploymentRolloutRequest.php | 181 ++ ...iewGameServerDeploymentRolloutResponse.php | 146 + .../Gaming/V1/PreviewRealmUpdateRequest.php | 177 ++ .../Gaming/V1/PreviewRealmUpdateResponse.php | 111 + .../PreviewUpdateGameServerClusterRequest.php | 177 ++ ...PreviewUpdateGameServerClusterResponse.php | 111 + .../src/Google/Cloud/Gaming/V1/Realm.php | 307 ++ .../Google/Cloud/Gaming/V1/RealmSelector.php | 67 + .../Gaming/V1/RealmsServiceGrpcClient.php | 126 + .../Google/Cloud/Gaming/V1/ScalingConfig.php | 181 ++ .../src/Google/Cloud/Gaming/V1/Schedule.php | 219 ++ .../src/Google/Cloud/Gaming/V1/SpecSource.php | 109 + .../Google/Cloud/Gaming/V1/TargetDetails.php | 143 + .../V1/TargetDetails/TargetFleetDetails.php | 124 + .../TargetFleetDetails/TargetFleet.php | 118 + .../TargetFleetAutoscaler.php | 118 + .../V1/TargetDetails_TargetFleetDetails.php | 16 + ...Details_TargetFleetDetails_TargetFleet.php | 16 + ...rgetFleetDetails_TargetFleetAutoscaler.php | 16 + .../Google/Cloud/Gaming/V1/TargetState.php | 67 + .../V1/UpdateGameServerClusterRequest.php | 133 + .../V1/UpdateGameServerDeploymentRequest.php | 134 + ...dateGameServerDeploymentRolloutRequest.php | 134 + .../Cloud/Gaming/V1/UpdateRealmRequest.php | 133 + .../create_game_server_cluster.php | 97 + .../delete_game_server_cluster.php | 81 + .../get_game_server_cluster.php | 72 + .../list_game_server_clusters.php | 72 + .../preview_create_game_server_cluster.php | 91 + .../preview_delete_game_server_cluster.php | 72 + .../preview_update_game_server_cluster.php | 78 + .../update_game_server_cluster.php | 89 + .../create_game_server_config.php | 94 + .../delete_game_server_config.php | 82 + .../get_game_server_config.php | 72 + .../list_game_server_configs.php | 77 + .../create_game_server_deployment.php | 88 + .../delete_game_server_deployment.php | 80 + .../fetch_deployment_state.php | 68 + .../get_game_server_deployment.php | 71 + .../get_game_server_deployment_rollout.php | 71 + .../list_game_server_deployments.php | 72 + ...preview_game_server_deployment_rollout.php | 58 + .../update_game_server_deployment.php | 73 + .../update_game_server_deployment_rollout.php | 79 + .../V1/RealmsServiceClient/create_realm.php | 92 + .../V1/RealmsServiceClient/delete_realm.php | 76 + .../V1/RealmsServiceClient/get_realm.php | 67 + .../V1/RealmsServiceClient/list_realms.php | 72 + .../preview_realm_update.php | 74 + .../V1/RealmsServiceClient/update_realm.php | 85 + .../V1/GameServerClustersServiceClient.php | 34 + .../src/V1/GameServerConfigsServiceClient.php | 34 + .../V1/GameServerDeploymentsServiceClient.php | 34 + .../GameServerClustersServiceGapicClient.php | 861 ++++++ .../GameServerConfigsServiceGapicClient.php | 603 ++++ ...ameServerDeploymentsServiceGapicClient.php | 921 ++++++ .../src/V1/Gapic/RealmsServiceGapicClient.php | 722 +++++ .../Gaming/v1/src/V1/RealmsServiceClient.php | 34 + .../Gaming/v1/src/V1/gapic_metadata.json | 180 ++ ...server_clusters_service_client_config.json | 94 + ...ver_clusters_service_descriptor_config.php | 48 + ...er_clusters_service_rest_client_config.php | 217 ++ ..._server_configs_service_client_config.json | 64 + ...rver_configs_service_descriptor_config.php | 38 + ...ver_configs_service_rest_client_config.php | 165 ++ ...ver_deployments_service_client_config.json | 89 + ..._deployments_service_descriptor_config.php | 58 + ...deployments_service_rest_client_config.php | 233 ++ .../realms_service_client_config.json | 74 + .../realms_service_descriptor_config.php | 48 + .../realms_service_rest_client_config.php | 194 ++ .../GameServerClustersServiceClientTest.php | 786 +++++ .../V1/GameServerConfigsServiceClientTest.php | 443 +++ ...GameServerDeploymentsServiceClientTest.php | 887 ++++++ .../tests/Unit/V1/RealmsServiceClientTest.php | 658 +++++ .../Google/Cloud/Gkebackup/V1/Backup.php | Bin 0 -> 2893 bytes .../Google/Cloud/Gkebackup/V1/BackupPlan.php | Bin 0 -> 2426 bytes .../Google/Cloud/Gkebackup/V1/Common.php | 40 + .../Google/Cloud/Gkebackup/V1/Gkebackup.php | 228 ++ .../Google/Cloud/Gkebackup/V1/Restore.php | Bin 0 -> 3776 bytes .../Google/Cloud/Gkebackup/V1/RestorePlan.php | 49 + .../Google/Cloud/Gkebackup/V1/Volume.php | Bin 0 -> 2979 bytes .../src/Google/Cloud/GkeBackup/V1/Backup.php | 1170 ++++++++ .../GkeBackup/V1/Backup/ClusterMetadata.php | 233 ++ .../Cloud/GkeBackup/V1/Backup/State.php | 88 + .../GkeBackup/V1/BackupForGKEGrpcClient.php | 396 +++ .../Google/Cloud/GkeBackup/V1/BackupPlan.php | 605 ++++ .../GkeBackup/V1/BackupPlan/BackupConfig.php | 288 ++ .../V1/BackupPlan/RetentionPolicy.php | 222 ++ .../GkeBackup/V1/BackupPlan/Schedule.php | 121 + .../GkeBackup/V1/BackupPlan_BackupConfig.php | 16 + .../V1/BackupPlan_RetentionPolicy.php | 16 + .../GkeBackup/V1/BackupPlan_Schedule.php | 16 + .../GkeBackup/V1/Backup_ClusterMetadata.php | 16 + .../Cloud/GkeBackup/V1/Backup_State.php | 16 + .../GkeBackup/V1/CreateBackupPlanRequest.php | 173 ++ .../GkeBackup/V1/CreateBackupRequest.php | 173 ++ .../GkeBackup/V1/CreateRestorePlanRequest.php | 173 ++ .../GkeBackup/V1/CreateRestoreRequest.php | 173 ++ .../GkeBackup/V1/DeleteBackupPlanRequest.php | 113 + .../GkeBackup/V1/DeleteBackupRequest.php | 155 + .../GkeBackup/V1/DeleteRestorePlanRequest.php | 155 + .../GkeBackup/V1/DeleteRestoreRequest.php | 155 + .../Cloud/GkeBackup/V1/EncryptionKey.php | 72 + .../GkeBackup/V1/GetBackupPlanRequest.php | 71 + .../Cloud/GkeBackup/V1/GetBackupRequest.php | 71 + .../GkeBackup/V1/GetRestorePlanRequest.php | 71 + .../Cloud/GkeBackup/V1/GetRestoreRequest.php | 71 + .../GkeBackup/V1/GetVolumeBackupRequest.php | 71 + .../GkeBackup/V1/GetVolumeRestoreRequest.php | 71 + .../GkeBackup/V1/ListBackupPlansRequest.php | 247 ++ .../GkeBackup/V1/ListBackupPlansResponse.php | 151 + .../Cloud/GkeBackup/V1/ListBackupsRequest.php | 247 ++ .../GkeBackup/V1/ListBackupsResponse.php | 109 + .../GkeBackup/V1/ListRestorePlansRequest.php | 247 ++ .../GkeBackup/V1/ListRestorePlansResponse.php | 151 + .../GkeBackup/V1/ListRestoresRequest.php | 247 ++ .../GkeBackup/V1/ListRestoresResponse.php | 147 + .../GkeBackup/V1/ListVolumeBackupsRequest.php | 247 ++ .../V1/ListVolumeBackupsResponse.php | 117 + .../V1/ListVolumeRestoresRequest.php | 247 ++ .../V1/ListVolumeRestoresResponse.php | 117 + .../Cloud/GkeBackup/V1/NamespacedName.php | 101 + .../Cloud/GkeBackup/V1/NamespacedNames.php | 67 + .../Google/Cloud/GkeBackup/V1/Namespaces.php | 67 + .../Cloud/GkeBackup/V1/OperationMetadata.php | 303 ++ .../src/Google/Cloud/GkeBackup/V1/Restore.php | 729 +++++ .../Cloud/GkeBackup/V1/Restore/State.php | 88 + .../Cloud/GkeBackup/V1/RestoreConfig.php | 382 +++ .../ClusterResourceConflictPolicy.php | 69 + .../ClusterResourceRestoreScope.php | 82 + .../GkeBackup/V1/RestoreConfig/GroupKind.php | 118 + .../NamespacedResourceRestoreMode.php | 75 + .../V1/RestoreConfig/SubstitutionRule.php | 312 ++ .../RestoreConfig/VolumeDataRestorePolicy.php | 77 + ...reConfig_ClusterResourceConflictPolicy.php | 16 + ...toreConfig_ClusterResourceRestoreScope.php | 16 + .../GkeBackup/V1/RestoreConfig_GroupKind.php | 16 + ...reConfig_NamespacedResourceRestoreMode.php | 16 + .../V1/RestoreConfig_SubstitutionRule.php | 16 + .../RestoreConfig_VolumeDataRestorePolicy.php | 16 + .../Google/Cloud/GkeBackup/V1/RestorePlan.php | 477 +++ .../Cloud/GkeBackup/V1/Restore_State.php | 16 + .../GkeBackup/V1/UpdateBackupPlanRequest.php | 157 + .../GkeBackup/V1/UpdateBackupRequest.php | 153 + .../GkeBackup/V1/UpdateRestorePlanRequest.php | 153 + .../GkeBackup/V1/UpdateRestoreRequest.php | 153 + .../Cloud/GkeBackup/V1/VolumeBackup.php | 578 ++++ .../Cloud/GkeBackup/V1/VolumeBackup/State.php | 98 + .../V1/VolumeBackup/VolumeBackupFormat.php | 57 + .../Cloud/GkeBackup/V1/VolumeBackup_State.php | 16 + .../V1/VolumeBackup_VolumeBackupFormat.php | 16 + .../Cloud/GkeBackup/V1/VolumeRestore.php | 530 ++++ .../GkeBackup/V1/VolumeRestore/State.php | 86 + .../GkeBackup/V1/VolumeRestore/VolumeType.php | 57 + .../GkeBackup/V1/VolumeRestore_State.php | 16 + .../GkeBackup/V1/VolumeRestore_VolumeType.php | 16 + .../V1/BackupForGKEClient/create_backup.php | 79 + .../BackupForGKEClient/create_backup_plan.php | 107 + .../V1/BackupForGKEClient/create_restore.php | 106 + .../create_restore_plan.php | 127 + .../V1/BackupForGKEClient/delete_backup.php | 81 + .../BackupForGKEClient/delete_backup_plan.php | 76 + .../V1/BackupForGKEClient/delete_restore.php | 81 + .../delete_restore_plan.php | 76 + .../V1/BackupForGKEClient/get_backup.php | 72 + .../V1/BackupForGKEClient/get_backup_plan.php | 67 + .../V1/BackupForGKEClient/get_restore.php | 72 + .../BackupForGKEClient/get_restore_plan.php | 67 + .../BackupForGKEClient/get_volume_backup.php | 73 + .../BackupForGKEClient/get_volume_restore.php | 73 + .../BackupForGKEClient/list_backup_plans.php | 72 + .../V1/BackupForGKEClient/list_backups.php | 72 + .../BackupForGKEClient/list_restore_plans.php | 72 + .../V1/BackupForGKEClient/list_restores.php | 72 + .../list_volume_backups.php | 77 + .../list_volume_restores.php | 77 + .../V1/BackupForGKEClient/update_backup.php | 68 + .../BackupForGKEClient/update_backup_plan.php | 91 + .../V1/BackupForGKEClient/update_restore.php | 90 + .../update_restore_plan.php | 107 + .../v1/src/V1/BackupForGKEClient.php | 34 + .../src/V1/Gapic/BackupForGKEGapicClient.php | 2238 ++++++++++++++ .../GkeBackup/v1/src/V1/gapic_metadata.json | 138 + .../backup_for_gke_client_config.json | 184 ++ .../backup_for_gke_descriptor_config.php | 188 ++ .../backup_for_gke_rest_client_config.php | 478 +++ .../tests/Unit/V1/BackupForGKEClientTest.php | 2568 +++++++++++++++++ .../Cloud/Gkehub/V1Beta1/Membership.php | Bin 0 -> 8786 bytes .../Cloud/GkeHub/V1beta1/ApplianceCluster.php | 76 + .../Google/Cloud/GkeHub/V1beta1/Authority.php | 231 ++ .../Cloud/GkeHub/V1beta1/ConnectAgent.php | 168 ++ .../GkeHub/V1beta1/ConnectAgentResource.php | 112 + .../V1beta1/CreateMembershipRequest.php | 247 ++ .../V1beta1/DeleteMembershipRequest.php | 145 + .../Cloud/GkeHub/V1beta1/EdgeCluster.php | 75 + .../GenerateConnectManifestRequest.php | 261 ++ .../GenerateConnectManifestResponse.php | 72 + .../GenerateExclusivityManifestRequest.php | 155 + .../GenerateExclusivityManifestResponse.php | 109 + .../GkeHub/V1beta1/GetMembershipRequest.php | 71 + .../Cloud/GkeHub/V1beta1/GkeCluster.php | 113 + .../GkeHubMembershipServiceGrpcClient.php | 185 ++ .../GkeHub/V1beta1/KubernetesMetadata.php | 272 ++ .../GkeHub/V1beta1/KubernetesResource.php | 245 ++ .../GkeHub/V1beta1/ListMembershipsRequest.php | 267 ++ .../V1beta1/ListMembershipsResponse.php | 143 + .../Cloud/GkeHub/V1beta1/Membership.php | 623 ++++ .../V1beta1/Membership/InfrastructureType.php | 70 + .../GkeHub/V1beta1/MembershipEndpoint.php | 326 +++ .../Cloud/GkeHub/V1beta1/MembershipState.php | 157 + .../GkeHub/V1beta1/MembershipState/Code.php | 85 + .../GkeHub/V1beta1/MembershipState_Code.php | 16 + .../V1beta1/Membership_InfrastructureType.php | 16 + .../GkeHub/V1beta1/MultiCloudCluster.php | 121 + .../Cloud/GkeHub/V1beta1/OnPremCluster.php | 185 ++ .../V1beta1/OnPremCluster/ClusterType.php | 78 + .../V1beta1/OnPremCluster_ClusterType.php | 16 + .../GkeHub/V1beta1/OperationMetadata.php | 303 ++ .../Cloud/GkeHub/V1beta1/ResourceManifest.php | 114 + .../Cloud/GkeHub/V1beta1/ResourceOptions.php | 163 ++ .../Google/Cloud/GkeHub/V1beta1/TypeMeta.php | 102 + .../V1beta1/UpdateMembershipRequest.php | 265 ++ .../V1beta1/ValidateExclusivityRequest.php | 148 + .../V1beta1/ValidateExclusivityResponse.php | 93 + .../create_membership.php | 100 + .../delete_membership.php | 84 + .../generate_connect_manifest.php | 74 + .../generate_exclusivity_manifest.php | 82 + .../get_iam_policy.php | 67 + .../get_location.php | 53 + .../get_membership.php | 71 + .../list_locations.php | 58 + .../list_memberships.php | 72 + .../set_iam_policy.php | 73 + .../test_iam_permissions.php | 80 + .../update_membership.php | 92 + .../validate_exclusivity.php | 74 + .../GkeHubMembershipServiceGapicClient.php | 1305 +++++++++ .../V1beta1/GkeHubMembershipServiceClient.php | 36 + .../v1beta1/src/V1beta1/gapic_metadata.json | 83 + ..._hub_membership_service_client_config.json | 99 + ...b_membership_service_descriptor_config.php | 58 + ..._membership_service_rest_client_config.php | 213 ++ .../GkeHubMembershipServiceClientTest.php | 1084 +++++++ .../GPBMetadata/Grafeas/V1/Attestation.php | 40 + .../src/GPBMetadata/Grafeas/V1/Build.php | 39 + .../src/GPBMetadata/Grafeas/V1/Common.php | Bin 0 -> 1213 bytes .../src/GPBMetadata/Grafeas/V1/Compliance.php | Bin 0 -> 1315 bytes .../proto/src/GPBMetadata/Grafeas/V1/Cvss.php | Bin 0 -> 3353 bytes .../src/GPBMetadata/Grafeas/V1/Deployment.php | Bin 0 -> 1084 bytes .../src/GPBMetadata/Grafeas/V1/Discovery.php | Bin 0 -> 1786 bytes .../Grafeas/V1/DsseAttestation.php | Bin 0 -> 1079 bytes .../src/GPBMetadata/Grafeas/V1/Grafeas.php | Bin 0 -> 8039 bytes .../src/GPBMetadata/Grafeas/V1/Image.php | 44 + .../Grafeas/V1/IntotoProvenance.php | 54 + .../Grafeas/V1/IntotoStatement.php | Bin 0 -> 1374 bytes .../src/GPBMetadata/Grafeas/V1/Package.php | Bin 0 -> 1945 bytes .../src/GPBMetadata/Grafeas/V1/Provenance.php | Bin 0 -> 2688 bytes .../src/GPBMetadata/Grafeas/V1/Severity.php | Bin 0 -> 744 bytes .../GPBMetadata/Grafeas/V1/SlsaProvenance.php | 61 + .../Grafeas/V1/SlsaProvenanceZeroTwo.php | 71 + .../src/GPBMetadata/Grafeas/V1/Upgrade.php | 60 + .../GPBMetadata/Grafeas/V1/Vulnerability.php | 94 + .../v1/proto/src/Grafeas/V1/AliasContext.php | 101 + .../src/Grafeas/V1/AliasContext/Kind.php | 72 + .../src/Grafeas/V1/AliasContext_Kind.php | 16 + .../v1/proto/src/Grafeas/V1/Architecture.php | 61 + .../v1/proto/src/Grafeas/V1/Artifact.php | 159 + .../proto/src/Grafeas/V1/AttestationNote.php | 84 + .../src/Grafeas/V1/AttestationNote/Hint.php | 80 + .../src/Grafeas/V1/AttestationNote_Hint.php | 16 + .../src/Grafeas/V1/AttestationOccurrence.php | 190 ++ .../Grafeas/V1/BatchCreateNotesRequest.php | 105 + .../Grafeas/V1/BatchCreateNotesResponse.php | 67 + .../V1/BatchCreateOccurrencesRequest.php | 105 + .../V1/BatchCreateOccurrencesResponse.php | 67 + .../v1/proto/src/Grafeas/V1/BuildNote.php | 68 + .../proto/src/Grafeas/V1/BuildOccurrence.php | 251 ++ .../proto/src/Grafeas/V1/BuildProvenance.php | 528 ++++ .../v1/proto/src/Grafeas/V1/BuilderConfig.php | 58 + .../Grafeas/v1/proto/src/Grafeas/V1/CVSS.php | 382 +++ .../src/Grafeas/V1/CVSS/AttackComplexity.php | 56 + .../src/Grafeas/V1/CVSS/AttackVector.php | 66 + .../src/Grafeas/V1/CVSS/Authentication.php | 61 + .../v1/proto/src/Grafeas/V1/CVSS/Impact.php | 61 + .../Grafeas/V1/CVSS/PrivilegesRequired.php | 61 + .../v1/proto/src/Grafeas/V1/CVSS/Scope.php | 56 + .../src/Grafeas/V1/CVSS/UserInteraction.php | 56 + .../v1/proto/src/Grafeas/V1/CVSSVersion.php | 55 + .../src/Grafeas/V1/CVSS_AttackComplexity.php | 16 + .../src/Grafeas/V1/CVSS_AttackVector.php | 16 + .../src/Grafeas/V1/CVSS_Authentication.php | 16 + .../v1/proto/src/Grafeas/V1/CVSS_Impact.php | 16 + .../Grafeas/V1/CVSS_PrivilegesRequired.php | 16 + .../v1/proto/src/Grafeas/V1/CVSS_Scope.php | 16 + .../src/Grafeas/V1/CVSS_UserInteraction.php | 16 + .../v1/proto/src/Grafeas/V1/CVSSv3.php | 353 +++ .../Grafeas/V1/CVSSv3/AttackComplexity.php | 56 + .../src/Grafeas/V1/CVSSv3/AttackVector.php | 66 + .../v1/proto/src/Grafeas/V1/CVSSv3/Impact.php | 61 + .../Grafeas/V1/CVSSv3/PrivilegesRequired.php | 61 + .../v1/proto/src/Grafeas/V1/CVSSv3/Scope.php | 56 + .../src/Grafeas/V1/CVSSv3/UserInteraction.php | 56 + .../Grafeas/V1/CVSSv3_AttackComplexity.php | 16 + .../src/Grafeas/V1/CVSSv3_AttackVector.php | 16 + .../v1/proto/src/Grafeas/V1/CVSSv3_Impact.php | 16 + .../Grafeas/V1/CVSSv3_PrivilegesRequired.php | 16 + .../v1/proto/src/Grafeas/V1/CVSSv3_Scope.php | 16 + .../src/Grafeas/V1/CVSSv3_UserInteraction.php | 16 + .../src/Grafeas/V1/CloudRepoSourceContext.php | 153 + .../v1/proto/src/Grafeas/V1/Command.php | 249 ++ .../v1/proto/src/Grafeas/V1/Completeness.php | 148 + .../proto/src/Grafeas/V1/ComplianceNote.php | 272 ++ .../V1/ComplianceNote/CisBenchmark.php | 90 + .../V1/ComplianceNote_CisBenchmark.php | 16 + .../src/Grafeas/V1/ComplianceOccurrence.php | 88 + .../src/Grafeas/V1/ComplianceVersion.php | 148 + .../src/Grafeas/V1/CreateNoteRequest.php | 149 + .../Grafeas/V1/CreateOccurrenceRequest.php | 115 + .../src/Grafeas/V1/DSSEAttestationNote.php | 75 + .../V1/DSSEAttestationNote/DSSEHint.php | 80 + .../V1/DSSEAttestationNote_DSSEHint.php | 16 + .../Grafeas/V1/DSSEAttestationOccurrence.php | 119 + .../src/Grafeas/V1/DeleteNoteRequest.php | 71 + .../Grafeas/V1/DeleteOccurrenceRequest.php | 71 + .../proto/src/Grafeas/V1/DeploymentNote.php | 67 + .../src/Grafeas/V1/DeploymentOccurrence.php | 295 ++ .../V1/DeploymentOccurrence/Platform.php | 71 + .../V1/DeploymentOccurrence_Platform.php | 16 + .../v1/proto/src/Grafeas/V1/Digest.php | 101 + .../v1/proto/src/Grafeas/V1/DiscoveryNote.php | 73 + .../src/Grafeas/V1/DiscoveryOccurrence.php | 350 +++ .../DiscoveryOccurrence/AnalysisCompleted.php | 64 + .../V1/DiscoveryOccurrence/AnalysisStatus.php | 94 + .../ContinuousAnalysis.php | 64 + .../DiscoveryOccurrence_AnalysisCompleted.php | 16 + .../V1/DiscoveryOccurrence_AnalysisStatus.php | 16 + ...DiscoveryOccurrence_ContinuousAnalysis.php | 16 + .../v1/proto/src/Grafeas/V1/Distribution.php | 256 ++ .../v1/proto/src/Grafeas/V1/Envelope.php | 116 + .../src/Grafeas/V1/EnvelopeSignature.php | 85 + .../v1/proto/src/Grafeas/V1/FileHashes.php | 68 + .../v1/proto/src/Grafeas/V1/FileLocation.php | 71 + .../v1/proto/src/Grafeas/V1/Fingerprint.php | 151 + .../src/Grafeas/V1/GerritSourceContext.php | 184 ++ .../proto/src/Grafeas/V1/GetNoteRequest.php | 71 + .../Grafeas/V1/GetOccurrenceNoteRequest.php | 71 + .../src/Grafeas/V1/GetOccurrenceRequest.php | 71 + .../proto/src/Grafeas/V1/GitSourceContext.php | 102 + .../src/Grafeas/V1/GrafeasGrpcClient.php | 263 ++ .../Grafeas/v1/proto/src/Grafeas/V1/Hash.php | 101 + .../v1/proto/src/Grafeas/V1/ImageNote.php | 119 + .../proto/src/Grafeas/V1/ImageOccurrence.php | 197 ++ .../proto/src/Grafeas/V1/InTotoProvenance.php | 214 ++ .../proto/src/Grafeas/V1/InTotoStatement.php | 224 ++ .../Grafeas/v1/proto/src/Grafeas/V1/Jwt.php | 73 + .../Grafeas/v1/proto/src/Grafeas/V1/Layer.php | 105 + .../v1/proto/src/Grafeas/V1/License.php | 117 + .../Grafeas/V1/ListNoteOccurrencesRequest.php | 173 ++ .../V1/ListNoteOccurrencesResponse.php | 101 + .../proto/src/Grafeas/V1/ListNotesRequest.php | 177 ++ .../src/Grafeas/V1/ListNotesResponse.php | 109 + .../src/Grafeas/V1/ListOccurrencesRequest.php | 177 ++ .../Grafeas/V1/ListOccurrencesResponse.php | 109 + .../v1/proto/src/Grafeas/V1/Location.php | 154 + .../v1/proto/src/Grafeas/V1/Metadata.php | 249 ++ .../proto/src/Grafeas/V1/NonCompliantFile.php | 135 + .../Grafeas/v1/proto/src/Grafeas/V1/Note.php | 724 +++++ .../v1/proto/src/Grafeas/V1/NoteKind.php | 117 + .../v1/proto/src/Grafeas/V1/Occurrence.php | 701 +++++ .../v1/proto/src/Grafeas/V1/PackageNote.php | 451 +++ .../src/Grafeas/V1/PackageOccurrence.php | 311 ++ .../v1/proto/src/Grafeas/V1/ProjectRepoId.php | 102 + .../v1/proto/src/Grafeas/V1/Recipe.php | 273 ++ .../v1/proto/src/Grafeas/V1/RelatedUrl.php | 101 + .../v1/proto/src/Grafeas/V1/RepoId.php | 108 + .../v1/proto/src/Grafeas/V1/Severity.php | 82 + .../v1/proto/src/Grafeas/V1/Signature.php | 192 ++ .../proto/src/Grafeas/V1/SlsaProvenance.php | 214 ++ .../Grafeas/V1/SlsaProvenance/Material.php | 88 + .../Grafeas/V1/SlsaProvenance/SlsaBuilder.php | 61 + .../V1/SlsaProvenance/SlsaCompleteness.php | 151 + .../V1/SlsaProvenance/SlsaMetadata.php | 252 ++ .../Grafeas/V1/SlsaProvenance/SlsaRecipe.php | 296 ++ .../src/Grafeas/V1/SlsaProvenanceZeroTwo.php | 235 ++ .../V1/SlsaProvenanceZeroTwo/SlsaBuilder.php | 64 + .../SlsaCompleteness.php | 118 + .../SlsaConfigSource.php | 118 + .../SlsaProvenanceZeroTwo/SlsaInvocation.php | 147 + .../V1/SlsaProvenanceZeroTwo/SlsaMaterial.php | 91 + .../V1/SlsaProvenanceZeroTwo/SlsaMetadata.php | 201 ++ .../V1/SlsaProvenanceZeroTwo_SlsaBuilder.php | 16 + ...SlsaProvenanceZeroTwo_SlsaCompleteness.php | 16 + ...SlsaProvenanceZeroTwo_SlsaConfigSource.php | 16 + .../SlsaProvenanceZeroTwo_SlsaInvocation.php | 16 + .../V1/SlsaProvenanceZeroTwo_SlsaMaterial.php | 16 + .../V1/SlsaProvenanceZeroTwo_SlsaMetadata.php | 16 + .../Grafeas/V1/SlsaProvenance_Material.php | 16 + .../Grafeas/V1/SlsaProvenance_SlsaBuilder.php | 16 + .../V1/SlsaProvenance_SlsaCompleteness.php | 16 + .../V1/SlsaProvenance_SlsaMetadata.php | 16 + .../Grafeas/V1/SlsaProvenance_SlsaRecipe.php | 16 + .../v1/proto/src/Grafeas/V1/Source.php | 215 ++ .../v1/proto/src/Grafeas/V1/SourceContext.php | 176 ++ .../v1/proto/src/Grafeas/V1/Subject.php | 104 + .../src/Grafeas/V1/UpdateNoteRequest.php | 159 + .../Grafeas/V1/UpdateOccurrenceRequest.php | 159 + .../src/Grafeas/V1/UpgradeDistribution.php | 187 ++ .../v1/proto/src/Grafeas/V1/UpgradeNote.php | 196 ++ .../src/Grafeas/V1/UpgradeOccurrence.php | 215 ++ .../v1/proto/src/Grafeas/V1/Version.php | 269 ++ .../src/Grafeas/V1/Version/VersionKind.php | 71 + .../src/Grafeas/V1/Version_VersionKind.php | 16 + .../src/Grafeas/V1/VulnerabilityNote.php | 315 ++ .../Grafeas/V1/VulnerabilityNote/Detail.php | 645 +++++ .../V1/VulnerabilityNote/WindowsDetail.php | 186 ++ .../WindowsDetail/KnowledgeBase.php | 106 + .../Grafeas/V1/VulnerabilityNote_Detail.php | 16 + .../V1/VulnerabilityNote_WindowsDetail.php | 16 + ...bilityNote_WindowsDetail_KnowledgeBase.php | 16 + .../Grafeas/V1/VulnerabilityOccurrence.php | 469 +++ .../VulnerabilityOccurrence/PackageIssue.php | 429 +++ .../VulnerabilityOccurrence_PackageIssue.php | 16 + .../v1/proto/src/Grafeas/V1/WindowsUpdate.php | 298 ++ .../src/Grafeas/V1/WindowsUpdate/Category.php | 104 + .../src/Grafeas/V1/WindowsUpdate/Identity.php | 104 + .../src/Grafeas/V1/WindowsUpdate_Category.php | 16 + .../src/Grafeas/V1/WindowsUpdate_Identity.php | 16 + .../V1/GrafeasClient/batch_create_notes.php | 70 + .../batch_create_occurrences.php | 71 + .../samples/V1/GrafeasClient/create_note.php | 72 + .../V1/GrafeasClient/create_occurrence.php | 70 + .../samples/V1/GrafeasClient/delete_note.php | 65 + .../V1/GrafeasClient/delete_occurrence.php | 67 + .../v1/samples/V1/GrafeasClient/get_note.php | 67 + .../V1/GrafeasClient/get_occurrence.php | 67 + .../V1/GrafeasClient/get_occurrence_note.php | 68 + .../GrafeasClient/list_note_occurrences.php | 74 + .../samples/V1/GrafeasClient/list_notes.php | 72 + .../V1/GrafeasClient/list_occurrences.php | 72 + .../samples/V1/GrafeasClient/update_note.php | 70 + .../V1/GrafeasClient/update_occurrence.php | 70 + .../v1/src/V1/Gapic/GrafeasGapicClient.php | 1031 +++++++ .../Grafeas/v1/src/V1/GrafeasClient.php | 34 + .../Grafeas/v1/src/V1/gapic_metadata.json | 88 + .../V1/resources/grafeas_client_config.json | 115 + .../resources/grafeas_descriptor_config.php | 38 + .../resources/grafeas_rest_client_config.php | 172 ++ .../v1/tests/Unit/V1/GrafeasClientTest.php | 990 +++++++ .../src/GPBMetadata/Google/Iam/V2/Deny.php | 34 + .../src/GPBMetadata/Google/Iam/V2/Policy.php | Bin 0 -> 3121 bytes .../Cloud/Iam/V2/CreatePolicyRequest.php | 185 ++ .../Cloud/Iam/V2/DeletePolicyRequest.php | 141 + .../src/Google/Cloud/Iam/V2/DenyRule.php | 425 +++ .../Google/Cloud/Iam/V2/GetPolicyRequest.php | 91 + .../Cloud/Iam/V2/ListPoliciesRequest.php | 175 ++ .../Cloud/Iam/V2/ListPoliciesResponse.php | 105 + .../Cloud/Iam/V2/PoliciesGrpcClient.php | 124 + .../proto/src/Google/Cloud/Iam/V2/Policy.php | 505 ++++ .../Cloud/Iam/V2/PolicyOperationMetadata.php | 77 + .../src/Google/Cloud/Iam/V2/PolicyRule.php | 113 + .../Cloud/Iam/V2/UpdatePolicyRequest.php | 89 + .../V2/PoliciesClient/create_policy.php | 90 + .../V2/PoliciesClient/delete_policy.php | 86 + .../samples/V2/PoliciesClient/get_policy.php | 74 + .../V2/PoliciesClient/list_policies.php | 85 + .../V2/PoliciesClient/update_policy.php | 78 + .../v2/src/V2/Gapic/PoliciesGapicClient.php | 598 ++++ .../Iam/v2/src/V2/PoliciesClient.php | 34 + .../Iam/v2/src/V2/gapic_metadata.json | 43 + .../V2/resources/policies_client_config.json | 59 + .../resources/policies_descriptor_config.php | 48 + .../resources/policies_rest_client_config.php | 80 + .../v2/tests/Unit/V2/PoliciesClientTest.php | 595 ++++ .../Google/Iam/Credentials/V1/Common.php | 66 + .../Iam/Credentials/V1/Iamcredentials.php | 36 + .../V1/GenerateAccessTokenRequest.php | 245 ++ .../V1/GenerateAccessTokenResponse.php | 113 + .../Credentials/V1/GenerateIdTokenRequest.php | 219 ++ .../V1/GenerateIdTokenResponse.php | 65 + .../V1/IAMCredentialsGrpcClient.php | 103 + .../Iam/Credentials/V1/SignBlobRequest.php | 177 ++ .../Iam/Credentials/V1/SignBlobResponse.php | 99 + .../Iam/Credentials/V1/SignJwtRequest.php | 177 ++ .../Iam/Credentials/V1/SignJwtResponse.php | 99 + .../generate_access_token.php | 77 + .../generate_id_token.php | 72 + .../V1/IAMCredentialsClient/sign_blob.php | 71 + .../V1/IAMCredentialsClient/sign_jwt.php | 71 + .../V1/Gapic/IAMCredentialsGapicClient.php | 517 ++++ .../v1/src/V1/IAMCredentialsClient.php | 34 + .../v1/src/V1/gapic_metadata.json | 38 + .../iam_credentials_client_config.json | 55 + .../iam_credentials_descriptor_config.php | 7 + .../iam_credentials_rest_client_config.php | 57 + .../Unit/V1/IAMCredentialsClientTest.php | 324 +++ .../Google/Cloud/Iap/V1/Service.php | Bin 0 -> 9409 bytes .../Cloud/Iap/V1/AccessDeniedPageSettings.php | 261 ++ .../Google/Cloud/Iap/V1/AccessSettings.php | 253 ++ .../Cloud/Iap/V1/AllowedDomainsSettings.php | 112 + .../Cloud/Iap/V1/ApplicationSettings.php | 242 ++ .../Iap/V1/AttributePropagationSettings.php | 252 ++ .../OutputCredentials.php | 75 + ...ePropagationSettings_OutputCredentials.php | 16 + .../proto/src/Google/Cloud/Iap/V1/Brand.php | 182 ++ .../src/Google/Cloud/Iap/V1/CorsSettings.php | 111 + .../Cloud/Iap/V1/CreateBrandRequest.php | 115 + .../CreateIdentityAwareProxyClientRequest.php | 123 + .../Iap/V1/CreateTunnelDestGroupRequest.php | 165 ++ .../src/Google/Cloud/Iap/V1/CsmSettings.php | 113 + .../DeleteIdentityAwareProxyClientRequest.php | 75 + .../Iap/V1/DeleteTunnelDestGroupRequest.php | 75 + .../src/Google/Cloud/Iap/V1/GcipSettings.php | 170 ++ .../Google/Cloud/Iap/V1/GetBrandRequest.php | 71 + .../Cloud/Iap/V1/GetIapSettingsRequest.php | 75 + .../V1/GetIdentityAwareProxyClientRequest.php | 75 + .../Iap/V1/GetTunnelDestGroupRequest.php | 75 + .../src/Google/Cloud/Iap/V1/IapSettings.php | 155 + ...entityAwareProxyAdminServiceGrpcClient.php | 199 ++ .../Cloud/Iap/V1/IdentityAwareProxyClient.php | 135 + ...entityAwareProxyOAuthServiceGrpcClient.php | 170 ++ .../Google/Cloud/Iap/V1/ListBrandsRequest.php | 71 + .../Cloud/Iap/V1/ListBrandsResponse.php | 67 + .../ListIdentityAwareProxyClientsRequest.php | 167 ++ .../ListIdentityAwareProxyClientsResponse.php | 105 + .../Iap/V1/ListTunnelDestGroupsRequest.php | 175 ++ .../Iap/V1/ListTunnelDestGroupsResponse.php | 105 + .../src/Google/Cloud/Iap/V1/OAuthSettings.php | 129 + .../Google/Cloud/Iap/V1/ReauthSettings.php | 153 + .../Cloud/Iap/V1/ReauthSettings/Method.php | 71 + .../Iap/V1/ReauthSettings/PolicyType.php | 69 + .../Cloud/Iap/V1/ReauthSettings_Method.php | 16 + .../Iap/V1/ReauthSettings_PolicyType.php | 16 + ...tIdentityAwareProxyClientSecretRequest.php | 75 + .../Google/Cloud/Iap/V1/TunnelDestGroup.php | 143 + .../Cloud/Iap/V1/UpdateIapSettingsRequest.php | 137 + .../Iap/V1/UpdateTunnelDestGroupRequest.php | 129 + .../create_tunnel_dest_group.php | 92 + .../delete_tunnel_dest_group.php | 70 + .../get_iam_policy.php | 69 + .../get_iap_settings.php | 67 + .../get_tunnel_dest_group.php | 72 + .../list_tunnel_dest_groups.php | 79 + .../set_iam_policy.php | 72 + .../test_iam_permissions.php | 77 + .../update_iap_settings.php | 70 + .../update_tunnel_dest_group.php | 71 + .../create_brand.php | 76 + .../create_identity_aware_proxy_client.php | 76 + .../delete_identity_aware_proxy_client.php | 67 + .../get_brand.php | 66 + .../get_identity_aware_proxy_client.php | 68 + .../list_brands.php | 66 + .../list_identity_aware_proxy_clients.php | 71 + ...set_identity_aware_proxy_client_secret.php | 68 + ...ntityAwareProxyAdminServiceGapicClient.php | 791 +++++ ...ntityAwareProxyOAuthServiceGapicClient.php | 538 ++++ .../IdentityAwareProxyAdminServiceClient.php | 34 + .../IdentityAwareProxyOAuthServiceClient.php | 34 + .../Iap/v1/src/V1/gapic_metadata.json | 117 + ...are_proxy_admin_service_client_config.json | 82 + ..._proxy_admin_service_descriptor_config.php | 18 + ...proxy_admin_service_rest_client_config.php | 130 + ...re_proxy_o_auth_service_client_config.json | 72 + ...proxy_o_auth_service_descriptor_config.php | 18 + ...roxy_o_auth_service_rest_client_config.php | 100 + ...entityAwareProxyAdminServiceClientTest.php | 701 +++++ ...entityAwareProxyOAuthServiceClientTest.php | 580 ++++ .../GPBMetadata/Google/Cloud/Ids/V1/Ids.php | Bin 0 -> 3693 bytes .../Cloud/Ids/V1/CreateEndpointRequest.php | 237 ++ .../Cloud/Ids/V1/DeleteEndpointRequest.php | 139 + .../src/Google/Cloud/Ids/V1/Endpoint.php | 432 +++ .../Google/Cloud/Ids/V1/Endpoint/Severity.php | 85 + .../Google/Cloud/Ids/V1/Endpoint/State.php | 71 + .../Google/Cloud/Ids/V1/Endpoint_Severity.php | 16 + .../Google/Cloud/Ids/V1/Endpoint_State.php | 16 + .../Cloud/Ids/V1/GetEndpointRequest.php | 69 + .../src/Google/Cloud/Ids/V1/IDSGrpcClient.php | 95 + .../Cloud/Ids/V1/ListEndpointsRequest.php | 225 ++ .../Cloud/Ids/V1/ListEndpointsResponse.php | 137 + .../Google/Cloud/Ids/V1/OperationMetadata.php | 303 ++ .../samples/V1/IDSClient/create_endpoint.php | 100 + .../samples/V1/IDSClient/delete_endpoint.php | 75 + .../v1/samples/V1/IDSClient/get_endpoint.php | 67 + .../samples/V1/IDSClient/list_endpoints.php | 71 + .../Ids/v1/src/V1/Gapic/IDSGapicClient.php | 634 ++++ owl-bot-staging/Ids/v1/src/V1/IDSClient.php | 34 + .../Ids/v1/src/V1/gapic_metadata.json | 38 + .../src/V1/resources/ids_client_config.json | 74 + .../V1/resources/ids_descriptor_config.php | 38 + .../V1/resources/ids_rest_client_config.php | 165 ++ .../Ids/v1/tests/Unit/V1/IDSClientTest.php | 468 +++ .../Google/Cloud/Iot/V1/DeviceManager.php | Bin 0 -> 9166 bytes .../Google/Cloud/Iot/V1/Resources.php | Bin 0 -> 4609 bytes .../Iot/V1/BindDeviceToGatewayRequest.php | 151 + .../Iot/V1/BindDeviceToGatewayResponse.php | 33 + .../Iot/V1/CreateDeviceRegistryRequest.php | 123 + .../Cloud/Iot/V1/CreateDeviceRequest.php | 127 + .../Iot/V1/DeleteDeviceRegistryRequest.php | 71 + .../Cloud/Iot/V1/DeleteDeviceRequest.php | 75 + .../proto/src/Google/Cloud/Iot/V1/Device.php | 891 ++++++ .../src/Google/Cloud/Iot/V1/DeviceConfig.php | 237 ++ .../Google/Cloud/Iot/V1/DeviceCredential.php | 157 + .../Cloud/Iot/V1/DeviceManagerGrpcClient.php | 341 +++ .../Google/Cloud/Iot/V1/DeviceRegistry.php | 435 +++ .../src/Google/Cloud/Iot/V1/DeviceState.php | 115 + .../Cloud/Iot/V1/EventNotificationConfig.php | 117 + .../Google/Cloud/Iot/V1/GatewayAuthMethod.php | 74 + .../src/Google/Cloud/Iot/V1/GatewayConfig.php | 187 ++ .../Cloud/Iot/V1/GatewayListOptions.php | 165 ++ .../src/Google/Cloud/Iot/V1/GatewayType.php | 61 + .../Cloud/Iot/V1/GetDeviceRegistryRequest.php | 71 + .../Google/Cloud/Iot/V1/GetDeviceRequest.php | 127 + .../src/Google/Cloud/Iot/V1/HttpConfig.php | 71 + .../src/Google/Cloud/Iot/V1/HttpState.php | 63 + .../V1/ListDeviceConfigVersionsRequest.php | 117 + .../V1/ListDeviceConfigVersionsResponse.php | 71 + .../Iot/V1/ListDeviceRegistriesRequest.php | 159 + .../Iot/V1/ListDeviceRegistriesResponse.php | 109 + .../Cloud/Iot/V1/ListDeviceStatesRequest.php | 117 + .../Cloud/Iot/V1/ListDeviceStatesResponse.php | 71 + .../Cloud/Iot/V1/ListDevicesRequest.php | 335 +++ .../Cloud/Iot/V1/ListDevicesResponse.php | 105 + .../src/Google/Cloud/Iot/V1/LogLevel.php | 80 + .../V1/ModifyCloudToDeviceConfigRequest.php | 159 + .../src/Google/Cloud/Iot/V1/MqttConfig.php | 71 + .../src/Google/Cloud/Iot/V1/MqttState.php | 62 + .../Cloud/Iot/V1/PublicKeyCertificate.php | 145 + .../Iot/V1/PublicKeyCertificateFormat.php | 57 + .../Cloud/Iot/V1/PublicKeyCredential.php | 101 + .../Google/Cloud/Iot/V1/PublicKeyFormat.php | 87 + .../Cloud/Iot/V1/RegistryCredential.php | 75 + .../Iot/V1/SendCommandToDeviceRequest.php | 159 + .../Iot/V1/SendCommandToDeviceResponse.php | 33 + .../Cloud/Iot/V1/StateNotificationConfig.php | 71 + .../Iot/V1/UnbindDeviceFromGatewayRequest.php | 151 + .../V1/UnbindDeviceFromGatewayResponse.php | 33 + .../Iot/V1/UpdateDeviceRegistryRequest.php | 145 + .../Cloud/Iot/V1/UpdateDeviceRequest.php | 145 + .../Cloud/Iot/V1/X509CertificateDetails.php | 257 ++ .../bind_device_to_gateway.php | 77 + .../V1/DeviceManagerClient/create_device.php | 71 + .../create_device_registry.php | 70 + .../V1/DeviceManagerClient/delete_device.php | 71 + .../delete_device_registry.php | 65 + .../V1/DeviceManagerClient/get_device.php | 73 + .../get_device_registry.php | 67 + .../V1/DeviceManagerClient/get_iam_policy.php | 68 + .../list_device_config_versions.php | 74 + .../list_device_registries.php | 72 + .../list_device_states.php | 74 + .../V1/DeviceManagerClient/list_devices.php | 72 + .../modify_cloud_to_device_config.php | 77 + .../send_command_to_device.php | 87 + .../V1/DeviceManagerClient/set_iam_policy.php | 70 + .../test_iam_permissions.php | 76 + .../unbind_device_from_gateway.php | 77 + .../V1/DeviceManagerClient/update_device.php | 58 + .../update_device_registry.php | 58 + .../Iot/v1/src/V1/DeviceManagerClient.php | 34 + .../src/V1/Gapic/DeviceManagerGapicClient.php | 1337 +++++++++ .../Iot/v1/src/V1/gapic_metadata.json | 113 + .../device_manager_client_config.json | 154 + .../device_manager_descriptor_config.php | 28 + .../device_manager_rest_client_config.php | 320 ++ .../tests/Unit/V1/DeviceManagerClientTest.php | 1290 +++++++++ .../Google/Cloud/Kms/V1/EkmService.php | 86 + .../Google/Cloud/Kms/V1/Resources.php | Bin 0 -> 6758 bytes .../Google/Cloud/Kms/V1/Service.php | Bin 0 -> 13400 bytes .../Cloud/Kms/V1/AsymmetricDecryptRequest.php | 297 ++ .../Kms/V1/AsymmetricDecryptResponse.php | 339 +++ .../Cloud/Kms/V1/AsymmetricSignRequest.php | 544 ++++ .../Cloud/Kms/V1/AsymmetricSignResponse.php | 463 +++ .../src/Google/Cloud/Kms/V1/Certificate.php | 388 +++ .../Cloud/Kms/V1/CreateCryptoKeyRequest.php | 220 ++ .../Kms/V1/CreateCryptoKeyVersionRequest.php | 124 + .../Kms/V1/CreateEkmConnectionRequest.php | 162 ++ .../Cloud/Kms/V1/CreateImportJobRequest.php | 162 ++ .../Cloud/Kms/V1/CreateKeyRingRequest.php | 162 ++ .../src/Google/Cloud/Kms/V1/CryptoKey.php | 676 +++++ .../Kms/V1/CryptoKey/CryptoKeyPurpose.php | 93 + .../Google/Cloud/Kms/V1/CryptoKeyVersion.php | 731 +++++ .../CryptoKeyVersionAlgorithm.php | 280 ++ .../CryptoKeyVersionState.php | 125 + .../CryptoKeyVersion/CryptoKeyVersionView.php | 67 + .../Cloud/Kms/V1/CryptoKeyVersionTemplate.php | 150 + ...toKeyVersion_CryptoKeyVersionAlgorithm.php | 16 + ...CryptoKeyVersion_CryptoKeyVersionState.php | 16 + .../CryptoKeyVersion_CryptoKeyVersionView.php | 16 + .../Kms/V1/CryptoKey_CryptoKeyPurpose.php | 16 + .../Google/Cloud/Kms/V1/DecryptRequest.php | 510 ++++ .../Google/Cloud/Kms/V1/DecryptResponse.php | 315 ++ .../Kms/V1/DestroyCryptoKeyVersionRequest.php | 72 + .../proto/src/Google/Cloud/Kms/V1/Digest.php | 141 + .../src/Google/Cloud/Kms/V1/EkmConnection.php | 222 ++ .../Kms/V1/EkmConnection/ServiceResolver.php | 206 ++ .../Kms/V1/EkmConnection_ServiceResolver.php | 16 + .../Cloud/Kms/V1/EkmServiceGrpcClient.php | 101 + .../Google/Cloud/Kms/V1/EncryptRequest.php | 594 ++++ .../Google/Cloud/Kms/V1/EncryptResponse.php | 471 +++ .../Kms/V1/ExternalProtectionLevelOptions.php | 122 + .../Kms/V1/GenerateRandomBytesRequest.php | 156 + .../Kms/V1/GenerateRandomBytesResponse.php | 211 ++ .../Cloud/Kms/V1/GetCryptoKeyRequest.php | 72 + .../Kms/V1/GetCryptoKeyVersionRequest.php | 72 + .../Cloud/Kms/V1/GetEkmConnectionRequest.php | 72 + .../Cloud/Kms/V1/GetImportJobRequest.php | 72 + .../Google/Cloud/Kms/V1/GetKeyRingRequest.php | 72 + .../Cloud/Kms/V1/GetPublicKeyRequest.php | 72 + .../Kms/V1/ImportCryptoKeyVersionRequest.php | 491 ++++ .../src/Google/Cloud/Kms/V1/ImportJob.php | 549 ++++ .../Cloud/Kms/V1/ImportJob/ImportJobState.php | 79 + .../Cloud/Kms/V1/ImportJob/ImportMethod.php | 120 + .../Kms/V1/ImportJob/WrappingPublicKey.php | 88 + .../Cloud/Kms/V1/ImportJob_ImportJobState.php | 16 + .../Cloud/Kms/V1/ImportJob_ImportMethod.php | 16 + .../Kms/V1/ImportJob_WrappingPublicKey.php | 16 + .../Kms/V1/KeyManagementServiceGrpcClient.php | 530 ++++ .../Cloud/Kms/V1/KeyOperationAttestation.php | 151 + .../AttestationFormat.php | 68 + .../CertificateChains.php | 140 + ...OperationAttestation_AttestationFormat.php | 16 + ...OperationAttestation_CertificateChains.php | 16 + .../proto/src/Google/Cloud/Kms/V1/KeyRing.php | 124 + .../Kms/V1/ListCryptoKeyVersionsRequest.php | 298 ++ .../Kms/V1/ListCryptoKeyVersionsResponse.php | 152 + .../Cloud/Kms/V1/ListCryptoKeysRequest.php | 294 ++ .../Cloud/Kms/V1/ListCryptoKeysResponse.php | 148 + .../Kms/V1/ListEkmConnectionsRequest.php | 264 ++ .../Kms/V1/ListEkmConnectionsResponse.php | 148 + .../Cloud/Kms/V1/ListImportJobsRequest.php | 260 ++ .../Cloud/Kms/V1/ListImportJobsResponse.php | 148 + .../Cloud/Kms/V1/ListKeyRingsRequest.php | 264 ++ .../Cloud/Kms/V1/ListKeyRingsResponse.php | 148 + .../Google/Cloud/Kms/V1/LocationMetadata.php | 126 + .../Google/Cloud/Kms/V1/MacSignRequest.php | 281 ++ .../Google/Cloud/Kms/V1/MacSignResponse.php | 377 +++ .../Google/Cloud/Kms/V1/MacVerifyRequest.php | 486 ++++ .../Google/Cloud/Kms/V1/MacVerifyResponse.php | 386 +++ .../Google/Cloud/Kms/V1/ProtectionLevel.php | 77 + .../src/Google/Cloud/Kms/V1/PublicKey.php | 354 +++ .../Kms/V1/RestoreCryptoKeyVersionRequest.php | 72 + .../UpdateCryptoKeyPrimaryVersionRequest.php | 110 + .../Cloud/Kms/V1/UpdateCryptoKeyRequest.php | 122 + .../Kms/V1/UpdateCryptoKeyVersionRequest.php | 126 + .../Kms/V1/UpdateEkmConnectionRequest.php | 126 + .../create_ekm_connection.php | 79 + .../EkmServiceClient/get_ekm_connection.php | 68 + .../V1/EkmServiceClient/get_iam_policy.php | 67 + .../V1/EkmServiceClient/get_location.php | 53 + .../EkmServiceClient/list_ekm_connections.php | 73 + .../V1/EkmServiceClient/list_locations.php | 58 + .../V1/EkmServiceClient/set_iam_policy.php | 73 + .../EkmServiceClient/test_iam_permissions.php | 80 + .../update_ekm_connection.php | 58 + .../asymmetric_decrypt.php | 82 + .../asymmetric_sign.php | 82 + .../create_crypto_key.php | 82 + .../create_crypto_key_version.php | 84 + .../create_import_job.php | 105 + .../create_key_ring.php | 75 + .../V1/KeyManagementServiceClient/decrypt.php | 79 + .../destroy_crypto_key_version.php | 93 + .../V1/KeyManagementServiceClient/encrypt.php | 86 + .../generate_random_bytes.php | 54 + .../get_crypto_key.php | 74 + .../get_crypto_key_version.php | 74 + .../get_iam_policy.php | 67 + .../get_import_job.php | 72 + .../get_key_ring.php | 67 + .../get_location.php | 53 + .../get_public_key.php | 78 + .../import_crypto_key_version.php | 100 + .../list_crypto_key_versions.php | 78 + .../list_crypto_keys.php | 72 + .../list_import_jobs.php | 72 + .../list_key_rings.php | 73 + .../list_locations.php | 58 + .../KeyManagementServiceClient/mac_sign.php | 79 + .../KeyManagementServiceClient/mac_verify.php | 83 + .../restore_crypto_key_version.php | 81 + .../set_iam_policy.php | 73 + .../test_iam_permissions.php | 80 + .../update_crypto_key.php | 58 + .../update_crypto_key_primary_version.php | 85 + .../update_crypto_key_version.php | 69 + .../Kms/v1/src/V1/EkmServiceClient.php | 34 + .../v1/src/V1/Gapic/EkmServiceGapicClient.php | 797 +++++ .../Gapic/KeyManagementServiceGapicClient.php | 2551 ++++++++++++++++ .../v1/src/V1/KeyManagementServiceClient.php | 34 + .../Kms/v1/src/V1/gapic_metadata.json | 227 ++ .../resources/ekm_service_client_config.json | 71 + .../ekm_service_descriptor_config.php | 28 + .../ekm_service_rest_client_config.php | 185 ++ .../key_management_service_client_config.json | 181 ++ ...y_management_service_descriptor_config.php | 58 + ..._management_service_rest_client_config.php | 452 +++ .../v1/tests/Unit/V1/EkmServiceClientTest.php | 645 +++++ .../V1/KeyManagementServiceClientTest.php | 2155 ++++++++++++++ .../Cloud/Language/V1/LanguageService.php | Bin 0 -> 9584 bytes .../Language/V1/AnalyzeEntitiesRequest.php | 111 + .../Language/V1/AnalyzeEntitiesResponse.php | 109 + .../V1/AnalyzeEntitySentimentRequest.php | 111 + .../V1/AnalyzeEntitySentimentResponse.php | 109 + .../Language/V1/AnalyzeSentimentRequest.php | 111 + .../Language/V1/AnalyzeSentimentResponse.php | 153 + .../Language/V1/AnalyzeSyntaxRequest.php | 111 + .../Language/V1/AnalyzeSyntaxResponse.php | 143 + .../Cloud/Language/V1/AnnotateTextRequest.php | 156 + .../V1/AnnotateTextRequest/Features.php | 255 ++ .../V1/AnnotateTextRequest_Features.php | 16 + .../Language/V1/AnnotateTextResponse.php | 279 ++ .../Language/V1/ClassificationCategory.php | 109 + .../V1/ClassificationModelOptions.php | 117 + .../V1/ClassificationModelOptions/V1Model.php | 36 + .../V1/ClassificationModelOptions/V2Model.php | 70 + .../V2Model/ContentCategoriesVersion.php | 65 + .../V1/ClassificationModelOptions_V1Model.php | 16 + .../V1/ClassificationModelOptions_V2Model.php | 16 + ...tions_V2Model_ContentCategoriesVersion.php | 16 + .../Cloud/Language/V1/ClassifyTextRequest.php | 125 + .../Language/V1/ClassifyTextResponse.php | 67 + .../Cloud/Language/V1/DependencyEdge.php | 119 + .../Language/V1/DependencyEdge/Label.php | 628 ++++ .../Language/V1/DependencyEdge_Label.php | 16 + .../src/Google/Cloud/Language/V1/Document.php | 220 ++ .../Cloud/Language/V1/Document/Type.php | 64 + .../Cloud/Language/V1/Document_Type.php | 16 + .../Google/Cloud/Language/V1/EncodingType.php | 79 + .../src/Google/Cloud/Language/V1/Entity.php | 293 ++ .../Google/Cloud/Language/V1/Entity/Type.php | 163 ++ .../Cloud/Language/V1/EntityMention.php | 168 ++ .../Cloud/Language/V1/EntityMention/Type.php | 64 + .../Cloud/Language/V1/EntityMention_Type.php | 16 + .../Google/Cloud/Language/V1/Entity_Type.php | 16 + .../Language/V1/LanguageServiceGrpcClient.php | 132 + .../Google/Cloud/Language/V1/PartOfSpeech.php | 443 +++ .../Cloud/Language/V1/PartOfSpeech/Aspect.php | 71 + .../Cloud/Language/V1/PartOfSpeech/Form.php | 130 + .../Cloud/Language/V1/PartOfSpeech/Gender.php | 71 + .../Cloud/Language/V1/PartOfSpeech/Mood.php | 92 + .../Cloud/Language/V1/PartOfSpeech/Number.php | 71 + .../Cloud/Language/V1/PartOfSpeech/PBCase.php | 150 + .../Cloud/Language/V1/PartOfSpeech/Person.php | 78 + .../Cloud/Language/V1/PartOfSpeech/Proper.php | 64 + .../Language/V1/PartOfSpeech/Reciprocity.php | 65 + .../Cloud/Language/V1/PartOfSpeech/Tag.php | 141 + .../Cloud/Language/V1/PartOfSpeech/Tense.php | 92 + .../Cloud/Language/V1/PartOfSpeech/Voice.php | 72 + .../Cloud/Language/V1/PartOfSpeech_Aspect.php | 16 + .../Cloud/Language/V1/PartOfSpeech_Case.php | 16 + .../Cloud/Language/V1/PartOfSpeech_Form.php | 16 + .../Cloud/Language/V1/PartOfSpeech_Gender.php | 16 + .../Cloud/Language/V1/PartOfSpeech_Mood.php | 16 + .../Cloud/Language/V1/PartOfSpeech_Number.php | 16 + .../Cloud/Language/V1/PartOfSpeech_Person.php | 16 + .../Cloud/Language/V1/PartOfSpeech_Proper.php | 16 + .../Language/V1/PartOfSpeech_Reciprocity.php | 16 + .../Cloud/Language/V1/PartOfSpeech_Tag.php | 16 + .../Cloud/Language/V1/PartOfSpeech_Tense.php | 16 + .../Cloud/Language/V1/PartOfSpeech_Voice.php | 16 + .../src/Google/Cloud/Language/V1/Sentence.php | 129 + .../Google/Cloud/Language/V1/Sentiment.php | 114 + .../src/Google/Cloud/Language/V1/TextSpan.php | 105 + .../src/Google/Cloud/Language/V1/Token.php | 199 ++ .../analyze_entities.php | 59 + .../analyze_entity_sentiment.php | 58 + .../analyze_sentiment.php | 57 + .../LanguageServiceClient/analyze_syntax.php | 59 + .../LanguageServiceClient/annotate_text.php | 60 + .../LanguageServiceClient/classify_text.php | 57 + .../V1/Gapic/LanguageServiceGapicClient.php | 428 +++ .../v1/src/V1/LanguageServiceClient.php | 34 + .../Language/v1/src/V1/gapic_metadata.json | 48 + .../language_service_client_config.json | 65 + .../language_service_descriptor_config.php | 7 + .../language_service_rest_client_config.php | 39 + .../Unit/V1/LanguageServiceClientTest.php | 430 +++ .../Language/V1Beta2/LanguageService.php | Bin 0 -> 10213 bytes .../V1beta2/AnalyzeEntitiesRequest.php | 111 + .../V1beta2/AnalyzeEntitiesResponse.php | 109 + .../V1beta2/AnalyzeEntitySentimentRequest.php | 111 + .../AnalyzeEntitySentimentResponse.php | 109 + .../V1beta2/AnalyzeSentimentRequest.php | 115 + .../V1beta2/AnalyzeSentimentResponse.php | 153 + .../Language/V1beta2/AnalyzeSyntaxRequest.php | 111 + .../V1beta2/AnalyzeSyntaxResponse.php | 143 + .../Language/V1beta2/AnnotateTextRequest.php | 156 + .../V1beta2/AnnotateTextRequest/Features.php | 268 ++ .../V1beta2/AnnotateTextRequest_Features.php | 16 + .../Language/V1beta2/AnnotateTextResponse.php | 279 ++ .../V1beta2/ClassificationCategory.php | 109 + .../V1beta2/ClassificationModelOptions.php | 117 + .../ClassificationModelOptions/V1Model.php | 36 + .../ClassificationModelOptions/V2Model.php | 70 + .../V2Model/ContentCategoriesVersion.php | 65 + .../ClassificationModelOptions_V1Model.php | 16 + .../ClassificationModelOptions_V2Model.php | 16 + ...tions_V2Model_ContentCategoriesVersion.php | 16 + .../Language/V1beta2/ClassifyTextRequest.php | 125 + .../Language/V1beta2/ClassifyTextResponse.php | 67 + .../Cloud/Language/V1beta2/DependencyEdge.php | 117 + .../Language/V1beta2/DependencyEdge/Label.php | 628 ++++ .../Language/V1beta2/DependencyEdge_Label.php | 16 + .../Cloud/Language/V1beta2/Document.php | 300 ++ .../V1beta2/Document/BoilerplateHandling.php | 65 + .../Cloud/Language/V1beta2/Document/Type.php | 64 + .../V1beta2/Document_BoilerplateHandling.php | 16 + .../Cloud/Language/V1beta2/Document_Type.php | 16 + .../Cloud/Language/V1beta2/EncodingType.php | 79 + .../Google/Cloud/Language/V1beta2/Entity.php | 293 ++ .../Cloud/Language/V1beta2/Entity/Type.php | 163 ++ .../Cloud/Language/V1beta2/EntityMention.php | 168 ++ .../Language/V1beta2/EntityMention/Type.php | 64 + .../Language/V1beta2/EntityMention_Type.php | 16 + .../Cloud/Language/V1beta2/Entity_Type.php | 16 + .../V1beta2/LanguageServiceGrpcClient.php | 132 + .../Cloud/Language/V1beta2/PartOfSpeech.php | 441 +++ .../Language/V1beta2/PartOfSpeech/Aspect.php | 71 + .../Language/V1beta2/PartOfSpeech/Form.php | 130 + .../Language/V1beta2/PartOfSpeech/Gender.php | 71 + .../Language/V1beta2/PartOfSpeech/Mood.php | 92 + .../Language/V1beta2/PartOfSpeech/Number.php | 71 + .../Language/V1beta2/PartOfSpeech/PBCase.php | 150 + .../Language/V1beta2/PartOfSpeech/Person.php | 78 + .../Language/V1beta2/PartOfSpeech/Proper.php | 64 + .../V1beta2/PartOfSpeech/Reciprocity.php | 65 + .../Language/V1beta2/PartOfSpeech/Tag.php | 141 + .../Language/V1beta2/PartOfSpeech/Tense.php | 92 + .../Language/V1beta2/PartOfSpeech/Voice.php | 72 + .../Language/V1beta2/PartOfSpeech_Aspect.php | 16 + .../Language/V1beta2/PartOfSpeech_Case.php | 16 + .../Language/V1beta2/PartOfSpeech_Form.php | 16 + .../Language/V1beta2/PartOfSpeech_Gender.php | 16 + .../Language/V1beta2/PartOfSpeech_Mood.php | 16 + .../Language/V1beta2/PartOfSpeech_Number.php | 16 + .../Language/V1beta2/PartOfSpeech_Person.php | 16 + .../Language/V1beta2/PartOfSpeech_Proper.php | 16 + .../V1beta2/PartOfSpeech_Reciprocity.php | 16 + .../Language/V1beta2/PartOfSpeech_Tag.php | 16 + .../Language/V1beta2/PartOfSpeech_Tense.php | 16 + .../Language/V1beta2/PartOfSpeech_Voice.php | 16 + .../Cloud/Language/V1beta2/Sentence.php | 129 + .../Cloud/Language/V1beta2/Sentiment.php | 115 + .../Cloud/Language/V1beta2/TextSpan.php | 105 + .../Google/Cloud/Language/V1beta2/Token.php | 199 ++ .../analyze_entities.php | 59 + .../analyze_entity_sentiment.php | 58 + .../analyze_sentiment.php | 57 + .../LanguageServiceClient/analyze_syntax.php | 59 + .../LanguageServiceClient/annotate_text.php | 60 + .../LanguageServiceClient/classify_text.php | 57 + .../Gapic/LanguageServiceGapicClient.php | 447 +++ .../src/V1beta2/LanguageServiceClient.php | 36 + .../v1beta2/src/V1beta2/gapic_metadata.json | 48 + .../language_service_client_config.json | 65 + .../language_service_descriptor_config.php | 7 + .../language_service_rest_client_config.php | 39 + .../V1beta2/LanguageServiceClientTest.php | 430 +++ 1771 files changed, 256190 insertions(+) create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/GPBMetadata/Google/Cloud/Domains/V1Alpha2/Domains.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/AuthorizationCode.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureContactSettingsRequest.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureDnsSettingsRequest.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureManagementSettingsRequest.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactNotice.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactPrivacy.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings/Contact.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings_Contact.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DeleteRegistrationRequest.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/CustomDns.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/Algorithm.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/DigestType.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsState.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GlueRecord.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GoogleDomainsDns.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_CustomDns.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_DsRecord.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_DsRecord_Algorithm.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_DsRecord_DigestType.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_DsState.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_GlueRecord.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_GoogleDomainsDns.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DomainNotice.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DomainsGrpcClient.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ExportRegistrationRequest.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/GetRegistrationRequest.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsRequest.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsResponse.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings/RenewalMethod.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings_RenewalMethod.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/OperationMetadata.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterDomainRequest.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters/Availability.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters_Availability.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/Issue.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/State.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration_Issue.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration_State.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ResetAuthorizationCodeRequest.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveAuthorizationCodeRequest.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersRequest.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersResponse.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersRequest.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersResponse.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsRequest.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsResponse.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferDomainRequest.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferLockState.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferParameters.php create mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/UpdateRegistrationRequest.php create mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_contact_settings.php create mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_dns_settings.php create mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_management_settings.php create mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/delete_registration.php create mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/export_registration.php create mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/get_registration.php create mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/list_registrations.php create mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/register_domain.php create mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/reset_authorization_code.php create mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_authorization_code.php create mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_register_parameters.php create mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_transfer_parameters.php create mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/search_domains.php create mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/transfer_domain.php create mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/update_registration.php create mode 100644 owl-bot-staging/Domains/v1alpha2/src/V1alpha2/DomainsClient.php create mode 100644 owl-bot-staging/Domains/v1alpha2/src/V1alpha2/Gapic/DomainsGapicClient.php create mode 100644 owl-bot-staging/Domains/v1alpha2/src/V1alpha2/gapic_metadata.json create mode 100644 owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_client_config.json create mode 100644 owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_descriptor_config.php create mode 100644 owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_rest_client_config.php create mode 100644 owl-bot-staging/Domains/v1alpha2/tests/Unit/V1alpha2/DomainsClientTest.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/GPBMetadata/Google/Cloud/Domains/V1Beta1/Domains.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/AuthorizationCode.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureContactSettingsRequest.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureDnsSettingsRequest.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureManagementSettingsRequest.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactNotice.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactPrivacy.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings/Contact.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings_Contact.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DeleteRegistrationRequest.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/CustomDns.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/Algorithm.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/DigestType.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsState.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GlueRecord.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GoogleDomainsDns.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_CustomDns.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_DsRecord.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_DsRecord_Algorithm.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_DsRecord_DigestType.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_DsState.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_GlueRecord.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_GoogleDomainsDns.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DomainNotice.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DomainsGrpcClient.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ExportRegistrationRequest.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/GetRegistrationRequest.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsRequest.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsResponse.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings/RenewalMethod.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings_RenewalMethod.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/OperationMetadata.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterDomainRequest.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters/Availability.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters_Availability.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/Issue.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/State.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration_Issue.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration_State.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ResetAuthorizationCodeRequest.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveAuthorizationCodeRequest.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersRequest.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersResponse.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersRequest.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersResponse.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsRequest.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsResponse.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferDomainRequest.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferLockState.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferParameters.php create mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/UpdateRegistrationRequest.php create mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_contact_settings.php create mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_dns_settings.php create mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_management_settings.php create mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/delete_registration.php create mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/export_registration.php create mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/get_registration.php create mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/list_registrations.php create mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/register_domain.php create mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/reset_authorization_code.php create mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_authorization_code.php create mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_register_parameters.php create mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_transfer_parameters.php create mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/search_domains.php create mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/transfer_domain.php create mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/update_registration.php create mode 100644 owl-bot-staging/Domains/v1beta1/src/V1beta1/DomainsClient.php create mode 100644 owl-bot-staging/Domains/v1beta1/src/V1beta1/Gapic/DomainsGapicClient.php create mode 100644 owl-bot-staging/Domains/v1beta1/src/V1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_client_config.json create mode 100644 owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_descriptor_config.php create mode 100644 owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_rest_client_config.php create mode 100644 owl-bot-staging/Domains/v1beta1/tests/Unit/V1beta1/DomainsClientTest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ReportErrorsService.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorStatsServiceClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorGroupServiceGapicClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_client_config.json create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_descriptor_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php create mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/GPBMetadata/Google/Cloud/Essentialcontacts/V1/Enums.php create mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/GPBMetadata/Google/Cloud/Essentialcontacts/V1/Service.php create mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsRequest.php create mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsResponse.php create mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/Contact.php create mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/CreateContactRequest.php create mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/DeleteContactRequest.php create mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/EssentialContactsServiceGrpcClient.php create mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/GetContactRequest.php create mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsRequest.php create mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsResponse.php create mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/NotificationCategory.php create mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/SendTestMessageRequest.php create mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/UpdateContactRequest.php create mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ValidationState.php create mode 100644 owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/compute_contacts.php create mode 100644 owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/create_contact.php create mode 100644 owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/delete_contact.php create mode 100644 owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/get_contact.php create mode 100644 owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/list_contacts.php create mode 100644 owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/send_test_message.php create mode 100644 owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/update_contact.php create mode 100644 owl-bot-staging/EssentialContacts/v1/src/V1/EssentialContactsServiceClient.php create mode 100644 owl-bot-staging/EssentialContacts/v1/src/V1/Gapic/EssentialContactsServiceGapicClient.php create mode 100644 owl-bot-staging/EssentialContacts/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_client_config.json create mode 100644 owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_descriptor_config.php create mode 100644 owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_rest_client_config.php create mode 100644 owl-bot-staging/EssentialContacts/v1/tests/Unit/V1/EssentialContactsServiceClientTest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Channel.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/ChannelConnection.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Discovery.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Eventarc.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Trigger.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel/State.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ChannelConnection.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel_State.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CloudRun.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelConnectionRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateTriggerRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelConnectionRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteTriggerRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Destination.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventFilter.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventType.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventarcGrpcClient.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/FilteringAttribute.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GKE.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelConnectionRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetGoogleChannelConfigRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetProviderRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetTriggerRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsResponse.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsResponse.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersResponse.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersResponse.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/OperationMetadata.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Provider.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Pubsub.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/StateCondition.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Transport.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Trigger.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateChannelRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateGoogleChannelConfigRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateTriggerRequest.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel_connection.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_trigger.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel_connection.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_trigger.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel_connection.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_google_channel_config.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_iam_policy.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_location.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_provider.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_trigger.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channel_connections.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channels.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_locations.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_providers.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_triggers.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/set_iam_policy.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_channel.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_google_channel_config.php create mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_trigger.php create mode 100644 owl-bot-staging/Eventarc/v1/src/V1/EventarcClient.php create mode 100644 owl-bot-staging/Eventarc/v1/src/V1/Gapic/EventarcGapicClient.php create mode 100644 owl-bot-staging/Eventarc/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_client_config.json create mode 100644 owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_descriptor_config.php create mode 100644 owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_rest_client_config.php create mode 100644 owl-bot-staging/Eventarc/v1/tests/Unit/V1/EventarcClientTest.php create mode 100644 owl-bot-staging/EventarcPublishing/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/Publishing/V1/Publisher.php create mode 100644 owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsRequest.php create mode 100644 owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsResponse.php create mode 100644 owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsRequest.php create mode 100644 owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsResponse.php create mode 100644 owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublisherGrpcClient.php create mode 100644 owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_channel_connection_events.php create mode 100644 owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_events.php create mode 100644 owl-bot-staging/EventarcPublishing/v1/src/V1/Gapic/PublisherGapicClient.php create mode 100644 owl-bot-staging/EventarcPublishing/v1/src/V1/PublisherClient.php create mode 100644 owl-bot-staging/EventarcPublishing/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_client_config.json create mode 100644 owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_descriptor_config.php create mode 100644 owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_rest_client_config.php create mode 100644 owl-bot-staging/EventarcPublishing/v1/tests/Unit/V1/PublisherClientTest.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/GPBMetadata/Google/Cloud/Filestore/V1/CloudFilestoreService.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup/State.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup_State.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CloudFilestoreManagerGrpcClient.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateBackupRequest.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateInstanceRequest.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteBackupRequest.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteInstanceRequest.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/FileShareConfig.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetBackupRequest.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetInstanceRequest.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/State.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/Tier.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance_State.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance_Tier.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsRequest.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsResponse.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesRequest.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesResponse.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig/AddressMode.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig_AddressMode.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/AccessMode.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/SquashMode.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions_AccessMode.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions_SquashMode.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/RestoreInstanceRequest.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateBackupRequest.php create mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateInstanceRequest.php create mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_backup.php create mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_instance.php create mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_backup.php create mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_instance.php create mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_backup.php create mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_instance.php create mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_backups.php create mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_instances.php create mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/restore_instance.php create mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_backup.php create mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_instance.php create mode 100644 owl-bot-staging/Filestore/v1/src/V1/CloudFilestoreManagerClient.php create mode 100644 owl-bot-staging/Filestore/v1/src/V1/Gapic/CloudFilestoreManagerGapicClient.php create mode 100644 owl-bot-staging/Filestore/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_client_config.json create mode 100644 owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_descriptor_config.php create mode 100644 owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_rest_client_config.php create mode 100644 owl-bot-staging/Filestore/v1/tests/Unit/V1/CloudFilestoreManagerClientTest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database_AppEngineIntegrationMode.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database_ConcurrencyMode.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database_DatabaseType.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata_IndexConfigDelta.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata_IndexConfigDelta_ChangeType.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata_TtlConfigDelta.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata_TtlConfigDelta_ChangeType.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field_IndexConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field_TtlConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field_TtlConfig_State.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FirestoreAdminGrpcClient.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_IndexField.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_IndexField_ArrayConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_IndexField_Order.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_QueryScope.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_State.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/FirestoreAdminClient.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/Gapic/FirestoreAdminGapicClient.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/FirestoreAdminClientTest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform_FieldTransform.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform_FieldTransform_ServerValue.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/FirestoreGrpcClient.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery_Aggregation.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery_Aggregation_Count.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_CollectionSelector.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_CompositeFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_CompositeFilter_Operator.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_Direction.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_FieldFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_FieldFilter_Operator.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_FieldReference.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_Filter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_Order.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_Projection.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_UnaryFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_UnaryFilter_Operator.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange_TargetChangeType.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target_DocumentsTarget.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target_QueryTarget.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadOnly.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions_ReadOnly.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions_ReadWrite.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php create mode 100644 owl-bot-staging/Firestore/v1/src/V1/FirestoreClient.php create mode 100644 owl-bot-staging/Firestore/v1/src/V1/Gapic/FirestoreGapicClient.php create mode 100644 owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json create mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php create mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php create mode 100644 owl-bot-staging/Firestore/v1/tests/Unit/V1/FirestoreClientTest.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/GPBMetadata/Google/Cloud/Functions/V1/Functions.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/GPBMetadata/Google/Cloud/Functions/V1/Operations.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionRequest.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionResponse.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/DockerRegistry.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/IngressSettings.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/VpcConnectorEgressSettings.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunctionStatus.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction_DockerRegistry.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction_IngressSettings.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction_VpcConnectorEgressSettings.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunctionsServiceGrpcClient.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CreateFunctionRequest.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/DeleteFunctionRequest.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/EventTrigger.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy/Retry.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy_Retry.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateDownloadUrlRequest.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateDownloadUrlResponse.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlRequest.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlResponse.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GetFunctionRequest.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger/SecurityLevel.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger_SecurityLevel.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/ListFunctionsRequest.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/ListFunctionsResponse.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationMetadataV1.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationType.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretEnvVar.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume/SecretVersion.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume_SecretVersion.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SourceRepository.php create mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/UpdateFunctionRequest.php create mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/call_function.php create mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/create_function.php create mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/delete_function.php create mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_download_url.php create mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_upload_url.php create mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_function.php create mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/list_functions.php create mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/update_function.php create mode 100644 owl-bot-staging/Functions/v1/src/V1/CloudFunctionsServiceClient.php create mode 100644 owl-bot-staging/Functions/v1/src/V1/Gapic/CloudFunctionsServiceGapicClient.php create mode 100644 owl-bot-staging/Functions/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_client_config.json create mode 100644 owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_descriptor_config.php create mode 100644 owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_rest_client_config.php create mode 100644 owl-bot-staging/Functions/v1/tests/Unit/V1/CloudFunctionsServiceClientTest.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/GPBMetadata/Google/Cloud/Functions/V2/Functions.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/BuildConfig.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/CreateFunctionRequest.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/DeleteFunctionRequest.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Environment.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventFilter.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger/RetryPolicy.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger_RetryPolicy.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/FunctionServiceGrpcClient.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Function_State.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlRequest.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlResponse.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlRequest.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlResponse.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GetFunctionRequest.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsRequest.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsResponse.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesRequest.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/Runtime.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/RuntimeStage.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse_Runtime.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse_RuntimeStage.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/OperationMetadata.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction/State.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/RepoSource.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretEnvVar.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume/SecretVersion.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume_SecretVersion.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/IngressSettings.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/VpcConnectorEgressSettings.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig_IngressSettings.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig_VpcConnectorEgressSettings.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Source.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SourceProvenance.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/Name.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/State.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage_Name.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage_State.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage/Severity.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage_Severity.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StorageSource.php create mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/UpdateFunctionRequest.php create mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/create_function.php create mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/delete_function.php create mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_download_url.php create mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_upload_url.php create mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_function.php create mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_functions.php create mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_locations.php create mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_runtimes.php create mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/update_function.php create mode 100644 owl-bot-staging/Functions/v2/src/V2/FunctionServiceClient.php create mode 100644 owl-bot-staging/Functions/v2/src/V2/Gapic/FunctionServiceGapicClient.php create mode 100644 owl-bot-staging/Functions/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/Functions/v2/src/V2/resources/function_service_client_config.json create mode 100644 owl-bot-staging/Functions/v2/src/V2/resources/function_service_descriptor_config.php create mode 100644 owl-bot-staging/Functions/v2/src/V2/resources/function_service_rest_client_config.php create mode 100644 owl-bot-staging/Functions/v2/tests/Unit/V2/FunctionServiceClientTest.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/GPBMetadata/Google/Cloud/Gsuiteaddons/V1/Gsuiteaddons.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/AddOns.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Authorization.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/CreateDeploymentRequest.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/DeleteDeploymentRequest.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Deployment.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GSuiteAddOnsGrpcClient.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetAuthorizationRequest.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetDeploymentRequest.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetInstallStatusRequest.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallDeploymentRequest.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallStatus.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsRequest.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsResponse.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ReplaceDeploymentRequest.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/UninstallDeploymentRequest.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/create_deployment.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/delete_deployment.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_authorization.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_deployment.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_install_status.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/install_deployment.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/list_deployments.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/replace_deployment.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/uninstall_deployment.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/src/V1/GSuiteAddOnsClient.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/src/V1/Gapic/GSuiteAddOnsGapicClient.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_client_config.json create mode 100644 owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_descriptor_config.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_rest_client_config.php create mode 100644 owl-bot-staging/GSuiteAddOns/v1/tests/Unit/V1/GSuiteAddOnsClientTest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/Common.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerClusters.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerClustersService.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerConfigs.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerConfigsService.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerDeployments.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerDeploymentsService.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/Realms.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/RealmsService.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerClusterRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerConfigRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerDeploymentRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateRealmRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerClusterRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerConfigRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerDeploymentRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteRealmRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet/DeployedFleetStatus.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleetAutoscaler.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails_DeployedFleet.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails_DeployedFleetAutoscaler.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails_DeployedFleet_DeployedFleetStatus.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse/DeployedClusterState.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse_DeployedClusterState.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FleetConfig.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerCluster.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterConnectionInfo.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterView.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClustersServiceGrpcClient.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfig.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigOverride.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigsServiceGrpcClient.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeployment.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentRollout.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentsServiceGrpcClient.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerClusterRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerConfigRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRolloutRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetRealmRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GkeClusterReference.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState/InstallationState.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState_InstallationState.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/LabelSelector.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersResponse.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsResponse.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsResponse.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsResponse.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationMetadata.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus/ErrorCode.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus_ErrorCode.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewCreateGameServerClusterRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewCreateGameServerClusterResponse.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterResponse.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutResponse.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateResponse.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterResponse.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Realm.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmSelector.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmsServiceGrpcClient.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ScalingConfig.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Schedule.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/SpecSource.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleet.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleetAutoscaler.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails_TargetFleetDetails.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails_TargetFleetDetails_TargetFleet.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails_TargetFleetDetails_TargetFleetAutoscaler.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetState.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerClusterRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRolloutRequest.php create mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateRealmRequest.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/create_game_server_cluster.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/delete_game_server_cluster.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/get_game_server_cluster.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/list_game_server_clusters.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_create_game_server_cluster.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_delete_game_server_cluster.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_update_game_server_cluster.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/update_game_server_cluster.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/create_game_server_config.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/delete_game_server_config.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/get_game_server_config.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/list_game_server_configs.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/create_game_server_deployment.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/delete_game_server_deployment.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/fetch_deployment_state.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment_rollout.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/list_game_server_deployments.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/preview_game_server_deployment_rollout.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment_rollout.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/create_realm.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/delete_realm.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/get_realm.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/list_realms.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/preview_realm_update.php create mode 100644 owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/update_realm.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/GameServerClustersServiceClient.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/GameServerConfigsServiceClient.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/GameServerDeploymentsServiceClient.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerClustersServiceGapicClient.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerConfigsServiceGapicClient.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerDeploymentsServiceGapicClient.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/Gapic/RealmsServiceGapicClient.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/RealmsServiceClient.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_clusters_service_client_config.json create mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_clusters_service_descriptor_config.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_clusters_service_rest_client_config.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_client_config.json create mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_descriptor_config.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_rest_client_config.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_client_config.json create mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_descriptor_config.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_rest_client_config.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_client_config.json create mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_descriptor_config.php create mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_rest_client_config.php create mode 100644 owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerClustersServiceClientTest.php create mode 100644 owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerConfigsServiceClientTest.php create mode 100644 owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerDeploymentsServiceClientTest.php create mode 100644 owl-bot-staging/Gaming/v1/tests/Unit/V1/RealmsServiceClientTest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Backup.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/BackupPlan.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Common.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Gkebackup.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Restore.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/RestorePlan.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Volume.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/ClusterMetadata.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/State.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupForGKEGrpcClient.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/BackupConfig.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/RetentionPolicy.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/Schedule.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan_BackupConfig.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan_RetentionPolicy.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan_Schedule.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup_ClusterMetadata.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup_State.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupPlanRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestorePlanRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestoreRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupPlanRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestorePlanRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestoreRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/EncryptionKey.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupPlanRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestorePlanRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestoreRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeBackupRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeRestoreRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansResponse.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsResponse.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansResponse.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresResponse.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsResponse.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresResponse.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedName.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedNames.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Namespaces.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/OperationMetadata.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore/State.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceConflictPolicy.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceRestoreScope.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/GroupKind.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/NamespacedResourceRestoreMode.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/SubstitutionRule.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/VolumeDataRestorePolicy.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_ClusterResourceConflictPolicy.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_ClusterResourceRestoreScope.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_GroupKind.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_NamespacedResourceRestoreMode.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_SubstitutionRule.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_VolumeDataRestorePolicy.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestorePlan.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore_State.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupPlanRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestorePlanRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestoreRequest.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/State.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/VolumeBackupFormat.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup_State.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup_VolumeBackupFormat.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/State.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/VolumeType.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore_State.php create mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore_VolumeType.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup_plan.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore_plan.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup_plan.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore_plan.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup_plan.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore_plan.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_backup.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_restore.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backup_plans.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backups.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restore_plans.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restores.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_backups.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_restores.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup_plan.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore.php create mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore_plan.php create mode 100644 owl-bot-staging/GkeBackup/v1/src/V1/BackupForGKEClient.php create mode 100644 owl-bot-staging/GkeBackup/v1/src/V1/Gapic/BackupForGKEGapicClient.php create mode 100644 owl-bot-staging/GkeBackup/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_client_config.json create mode 100644 owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_descriptor_config.php create mode 100644 owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_rest_client_config.php create mode 100644 owl-bot-staging/GkeBackup/v1/tests/Unit/V1/BackupForGKEClientTest.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1Beta1/Membership.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ApplianceCluster.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Authority.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgent.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgentResource.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/CreateMembershipRequest.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/DeleteMembershipRequest.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/EdgeCluster.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestRequest.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestResponse.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestRequest.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestResponse.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GetMembershipRequest.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeCluster.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeHubMembershipServiceGrpcClient.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesMetadata.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesResource.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsRequest.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsResponse.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership/InfrastructureType.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipEndpoint.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState/Code.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState_Code.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership_InfrastructureType.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MultiCloudCluster.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster/ClusterType.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster_ClusterType.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OperationMetadata.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceManifest.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceOptions.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/TypeMeta.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/UpdateMembershipRequest.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityRequest.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityResponse.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/create_membership.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/delete_membership.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_connect_manifest.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_exclusivity_manifest.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_location.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_membership.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_locations.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_memberships.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/update_membership.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/validate_exclusivity.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/src/V1beta1/Gapic/GkeHubMembershipServiceGapicClient.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/src/V1beta1/GkeHubMembershipServiceClient.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/src/V1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/GkeHub/v1beta1/src/V1beta1/resources/gke_hub_membership_service_client_config.json create mode 100644 owl-bot-staging/GkeHub/v1beta1/src/V1beta1/resources/gke_hub_membership_service_descriptor_config.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php create mode 100644 owl-bot-staging/GkeHub/v1beta1/tests/Unit/V1beta1/GkeHubMembershipServiceClientTest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Attestation.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Build.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Common.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Compliance.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Cvss.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Deployment.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Discovery.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/DsseAttestation.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Grafeas.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Image.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoProvenance.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoStatement.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Package.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Provenance.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Severity.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenance.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenanceZeroTwo.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Upgrade.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Vulnerability.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext/Kind.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext_Kind.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Architecture.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Artifact.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote/Hint.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote_Hint.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationOccurrence.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesRequest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesResponse.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesRequest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesResponse.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildNote.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildOccurrence.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildProvenance.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuilderConfig.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackComplexity.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackVector.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Authentication.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Impact.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/PrivilegesRequired.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Scope.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/UserInteraction.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSVersion.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_AttackComplexity.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_AttackVector.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_Authentication.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_Impact.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_PrivilegesRequired.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_Scope.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_UserInteraction.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackComplexity.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackVector.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Impact.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/PrivilegesRequired.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Scope.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/UserInteraction.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_AttackComplexity.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_AttackVector.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_Impact.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_PrivilegesRequired.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_Scope.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_UserInteraction.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CloudRepoSourceContext.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Command.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Completeness.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote/CisBenchmark.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote_CisBenchmark.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceOccurrence.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceVersion.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateNoteRequest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateOccurrenceRequest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote/DSSEHint.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote_DSSEHint.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationOccurrence.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteNoteRequest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteOccurrenceRequest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentNote.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence/Platform.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence_Platform.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Digest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryNote.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisCompleted.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisStatus.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/ContinuousAnalysis.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence_AnalysisCompleted.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence_AnalysisStatus.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence_ContinuousAnalysis.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Distribution.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Envelope.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/EnvelopeSignature.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileHashes.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileLocation.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Fingerprint.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GerritSourceContext.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetNoteRequest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceNoteRequest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceRequest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GitSourceContext.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GrafeasGrpcClient.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Hash.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageNote.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageOccurrence.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoProvenance.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoStatement.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Jwt.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Layer.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/License.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesRequest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesResponse.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesRequest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesResponse.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesRequest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesResponse.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Location.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Metadata.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NonCompliantFile.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Note.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NoteKind.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Occurrence.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageNote.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageOccurrence.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ProjectRepoId.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Recipe.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RelatedUrl.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RepoId.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Severity.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Signature.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/Material.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaBuilder.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaCompleteness.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaMetadata.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaRecipe.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaBuilder.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaCompleteness.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaConfigSource.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaInvocation.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMaterial.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMetadata.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaBuilder.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaCompleteness.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaConfigSource.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaInvocation.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaMaterial.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaMetadata.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance_Material.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance_SlsaBuilder.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance_SlsaCompleteness.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance_SlsaMetadata.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance_SlsaRecipe.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Source.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SourceContext.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Subject.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateNoteRequest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateOccurrenceRequest.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeDistribution.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeNote.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeOccurrence.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version/VersionKind.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version_VersionKind.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/Detail.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail/KnowledgeBase.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote_Detail.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote_WindowsDetail.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote_WindowsDetail_KnowledgeBase.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence/PackageIssue.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence_PackageIssue.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Category.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Identity.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate_Category.php create mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate_Identity.php create mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_notes.php create mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_occurrences.php create mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_note.php create mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_occurrence.php create mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_note.php create mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_occurrence.php create mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_note.php create mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence.php create mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence_note.php create mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_note_occurrences.php create mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_notes.php create mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_occurrences.php create mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_note.php create mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_occurrence.php create mode 100644 owl-bot-staging/Grafeas/v1/src/V1/Gapic/GrafeasGapicClient.php create mode 100644 owl-bot-staging/Grafeas/v1/src/V1/GrafeasClient.php create mode 100644 owl-bot-staging/Grafeas/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_client_config.json create mode 100644 owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_descriptor_config.php create mode 100644 owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_rest_client_config.php create mode 100644 owl-bot-staging/Grafeas/v1/tests/Unit/V1/GrafeasClientTest.php create mode 100644 owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Deny.php create mode 100644 owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Policy.php create mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/CreatePolicyRequest.php create mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DeletePolicyRequest.php create mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DenyRule.php create mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/GetPolicyRequest.php create mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesRequest.php create mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesResponse.php create mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PoliciesGrpcClient.php create mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/Policy.php create mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyOperationMetadata.php create mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyRule.php create mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/UpdatePolicyRequest.php create mode 100644 owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/create_policy.php create mode 100644 owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/delete_policy.php create mode 100644 owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/get_policy.php create mode 100644 owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/list_policies.php create mode 100644 owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/update_policy.php create mode 100644 owl-bot-staging/Iam/v2/src/V2/Gapic/PoliciesGapicClient.php create mode 100644 owl-bot-staging/Iam/v2/src/V2/PoliciesClient.php create mode 100644 owl-bot-staging/Iam/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/Iam/v2/src/V2/resources/policies_client_config.json create mode 100644 owl-bot-staging/Iam/v2/src/V2/resources/policies_descriptor_config.php create mode 100644 owl-bot-staging/Iam/v2/src/V2/resources/policies_rest_client_config.php create mode 100644 owl-bot-staging/Iam/v2/tests/Unit/V2/PoliciesClientTest.php create mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Common.php create mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Iamcredentials.php create mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenRequest.php create mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenResponse.php create mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenRequest.php create mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenResponse.php create mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/IAMCredentialsGrpcClient.php create mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobRequest.php create mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobResponse.php create mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtRequest.php create mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtResponse.php create mode 100644 owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_access_token.php create mode 100644 owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_id_token.php create mode 100644 owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_blob.php create mode 100644 owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_jwt.php create mode 100644 owl-bot-staging/IamCredentials/v1/src/V1/Gapic/IAMCredentialsGapicClient.php create mode 100644 owl-bot-staging/IamCredentials/v1/src/V1/IAMCredentialsClient.php create mode 100644 owl-bot-staging/IamCredentials/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_client_config.json create mode 100644 owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_descriptor_config.php create mode 100644 owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_rest_client_config.php create mode 100644 owl-bot-staging/IamCredentials/v1/tests/Unit/V1/IAMCredentialsClientTest.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/GPBMetadata/Google/Cloud/Iap/V1/Service.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessDeniedPageSettings.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessSettings.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AllowedDomainsSettings.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ApplicationSettings.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings/OutputCredentials.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings_OutputCredentials.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/Brand.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CorsSettings.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateBrandRequest.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateIdentityAwareProxyClientRequest.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateTunnelDestGroupRequest.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CsmSettings.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteIdentityAwareProxyClientRequest.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteTunnelDestGroupRequest.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GcipSettings.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetBrandRequest.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIapSettingsRequest.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIdentityAwareProxyClientRequest.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetTunnelDestGroupRequest.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IapSettings.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyAdminServiceGrpcClient.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyClient.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyOAuthServiceGrpcClient.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsRequest.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsResponse.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsRequest.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsResponse.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsRequest.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsResponse.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/OAuthSettings.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/Method.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/PolicyType.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings_Method.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings_PolicyType.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ResetIdentityAwareProxyClientSecretRequest.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/TunnelDestGroup.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateIapSettingsRequest.php create mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateTunnelDestGroupRequest.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/create_tunnel_dest_group.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/delete_tunnel_dest_group.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iap_settings.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_tunnel_dest_group.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/list_tunnel_dest_groups.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_iap_settings.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_tunnel_dest_group.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_brand.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_identity_aware_proxy_client.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/delete_identity_aware_proxy_client.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_brand.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_identity_aware_proxy_client.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_brands.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_identity_aware_proxy_clients.php create mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/reset_identity_aware_proxy_client_secret.php create mode 100644 owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyAdminServiceGapicClient.php create mode 100644 owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyOAuthServiceGapicClient.php create mode 100644 owl-bot-staging/Iap/v1/src/V1/IdentityAwareProxyAdminServiceClient.php create mode 100644 owl-bot-staging/Iap/v1/src/V1/IdentityAwareProxyOAuthServiceClient.php create mode 100644 owl-bot-staging/Iap/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_client_config.json create mode 100644 owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_descriptor_config.php create mode 100644 owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php create mode 100644 owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_client_config.json create mode 100644 owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_descriptor_config.php create mode 100644 owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php create mode 100644 owl-bot-staging/Iap/v1/tests/Unit/V1/IdentityAwareProxyAdminServiceClientTest.php create mode 100644 owl-bot-staging/Iap/v1/tests/Unit/V1/IdentityAwareProxyOAuthServiceClientTest.php create mode 100644 owl-bot-staging/Ids/v1/proto/src/GPBMetadata/Google/Cloud/Ids/V1/Ids.php create mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/CreateEndpointRequest.php create mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/DeleteEndpointRequest.php create mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint.php create mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/Severity.php create mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/State.php create mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint_Severity.php create mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint_State.php create mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/GetEndpointRequest.php create mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/IDSGrpcClient.php create mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsRequest.php create mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsResponse.php create mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/OperationMetadata.php create mode 100644 owl-bot-staging/Ids/v1/samples/V1/IDSClient/create_endpoint.php create mode 100644 owl-bot-staging/Ids/v1/samples/V1/IDSClient/delete_endpoint.php create mode 100644 owl-bot-staging/Ids/v1/samples/V1/IDSClient/get_endpoint.php create mode 100644 owl-bot-staging/Ids/v1/samples/V1/IDSClient/list_endpoints.php create mode 100644 owl-bot-staging/Ids/v1/src/V1/Gapic/IDSGapicClient.php create mode 100644 owl-bot-staging/Ids/v1/src/V1/IDSClient.php create mode 100644 owl-bot-staging/Ids/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Ids/v1/src/V1/resources/ids_client_config.json create mode 100644 owl-bot-staging/Ids/v1/src/V1/resources/ids_descriptor_config.php create mode 100644 owl-bot-staging/Ids/v1/src/V1/resources/ids_rest_client_config.php create mode 100644 owl-bot-staging/Ids/v1/tests/Unit/V1/IDSClientTest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/DeviceManager.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/Resources.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/BindDeviceToGatewayRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/BindDeviceToGatewayResponse.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRegistryRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRegistryRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/Device.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceConfig.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceCredential.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceManagerGrpcClient.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceRegistry.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceState.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/EventNotificationConfig.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayAuthMethod.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayConfig.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayListOptions.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayType.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRegistryRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpConfig.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpState.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsResponse.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesResponse.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesResponse.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesResponse.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/LogLevel.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ModifyCloudToDeviceConfigRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttConfig.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttState.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificate.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificateFormat.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCredential.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyFormat.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/RegistryCredential.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceResponse.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/StateNotificationConfig.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayResponse.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRegistryRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRequest.php create mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/X509CertificateDetails.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/bind_device_to_gateway.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device_registry.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device_registry.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device_registry.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_iam_policy.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_config_versions.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_registries.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_states.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_devices.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/modify_cloud_to_device_config.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/send_command_to_device.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/set_iam_policy.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/unbind_device_from_gateway.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device.php create mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device_registry.php create mode 100644 owl-bot-staging/Iot/v1/src/V1/DeviceManagerClient.php create mode 100644 owl-bot-staging/Iot/v1/src/V1/Gapic/DeviceManagerGapicClient.php create mode 100644 owl-bot-staging/Iot/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Iot/v1/src/V1/resources/device_manager_client_config.json create mode 100644 owl-bot-staging/Iot/v1/src/V1/resources/device_manager_descriptor_config.php create mode 100644 owl-bot-staging/Iot/v1/src/V1/resources/device_manager_rest_client_config.php create mode 100644 owl-bot-staging/Iot/v1/tests/Unit/V1/DeviceManagerClientTest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/EkmService.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Resources.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Service.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion_CryptoKeyVersionAlgorithm.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion_CryptoKeyVersionState.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion_CryptoKeyVersionView.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey_CryptoKeyPurpose.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection_ServiceResolver.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmServiceGrpcClient.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob_ImportJobState.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob_ImportMethod.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob_WrappingPublicKey.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyManagementServiceGrpcClient.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation_AttestationFormat.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation_CertificateChains.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyRing.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php create mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php create mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/EkmServiceClient.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/Gapic/EkmServiceGapicClient.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/Gapic/KeyManagementServiceGapicClient.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/KeyManagementServiceClient.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_client_config.json create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_descriptor_config.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php create mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php create mode 100644 owl-bot-staging/Kms/v1/tests/Unit/V1/EkmServiceClientTest.php create mode 100644 owl-bot-staging/Kms/v1/tests/Unit/V1/KeyManagementServiceClientTest.php create mode 100644 owl-bot-staging/Language/v1/proto/src/GPBMetadata/Google/Cloud/Language/V1/LanguageService.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesRequest.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesResponse.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentRequest.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentResponse.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentRequest.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentResponse.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxRequest.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxResponse.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest/Features.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest_Features.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextResponse.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationCategory.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V1Model.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions_V1Model.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions_V2Model.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions_V2Model_ContentCategoriesVersion.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextRequest.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextResponse.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge/Label.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge_Label.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document/Type.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document_Type.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EncodingType.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity/Type.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention/Type.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention_Type.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity_Type.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/LanguageServiceGrpcClient.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Aspect.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Form.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Gender.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Mood.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Number.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/PBCase.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Person.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Proper.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Reciprocity.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tag.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tense.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Voice.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Aspect.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Case.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Form.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Gender.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Mood.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Number.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Person.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Proper.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Reciprocity.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Tag.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Tense.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Voice.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentence.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentiment.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/TextSpan.php create mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Token.php create mode 100644 owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entities.php create mode 100644 owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entity_sentiment.php create mode 100644 owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_sentiment.php create mode 100644 owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_syntax.php create mode 100644 owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/annotate_text.php create mode 100644 owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/classify_text.php create mode 100644 owl-bot-staging/Language/v1/src/V1/Gapic/LanguageServiceGapicClient.php create mode 100644 owl-bot-staging/Language/v1/src/V1/LanguageServiceClient.php create mode 100644 owl-bot-staging/Language/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Language/v1/src/V1/resources/language_service_client_config.json create mode 100644 owl-bot-staging/Language/v1/src/V1/resources/language_service_descriptor_config.php create mode 100644 owl-bot-staging/Language/v1/src/V1/resources/language_service_rest_client_config.php create mode 100644 owl-bot-staging/Language/v1/tests/Unit/V1/LanguageServiceClientTest.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/GPBMetadata/Google/Cloud/Language/V1Beta2/LanguageService.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesRequest.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesResponse.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentRequest.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentResponse.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentRequest.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentResponse.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxRequest.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxResponse.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest/Features.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest_Features.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextResponse.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationCategory.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V1Model.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions_V1Model.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions_V2Model.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions_V2Model_ContentCategoriesVersion.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextRequest.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextResponse.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge/Label.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge_Label.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/BoilerplateHandling.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/Type.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document_BoilerplateHandling.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document_Type.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EncodingType.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity/Type.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention/Type.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention_Type.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity_Type.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/LanguageServiceGrpcClient.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Aspect.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Form.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Gender.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Mood.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Number.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/PBCase.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Person.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Proper.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Reciprocity.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tag.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tense.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Voice.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Aspect.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Case.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Form.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Gender.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Mood.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Number.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Person.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Proper.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Reciprocity.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Tag.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Tense.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Voice.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentence.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentiment.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/TextSpan.php create mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Token.php create mode 100644 owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entities.php create mode 100644 owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entity_sentiment.php create mode 100644 owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_sentiment.php create mode 100644 owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_syntax.php create mode 100644 owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/annotate_text.php create mode 100644 owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/classify_text.php create mode 100644 owl-bot-staging/Language/v1beta2/src/V1beta2/Gapic/LanguageServiceGapicClient.php create mode 100644 owl-bot-staging/Language/v1beta2/src/V1beta2/LanguageServiceClient.php create mode 100644 owl-bot-staging/Language/v1beta2/src/V1beta2/gapic_metadata.json create mode 100644 owl-bot-staging/Language/v1beta2/src/V1beta2/resources/language_service_client_config.json create mode 100644 owl-bot-staging/Language/v1beta2/src/V1beta2/resources/language_service_descriptor_config.php create mode 100644 owl-bot-staging/Language/v1beta2/src/V1beta2/resources/language_service_rest_client_config.php create mode 100644 owl-bot-staging/Language/v1beta2/tests/Unit/V1beta2/LanguageServiceClientTest.php diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/GPBMetadata/Google/Cloud/Domains/V1Alpha2/Domains.php b/owl-bot-staging/Domains/v1alpha2/proto/src/GPBMetadata/Google/Cloud/Domains/V1Alpha2/Domains.php new file mode 100644 index 0000000000000000000000000000000000000000..d89449a6e416bd26002cf9df0b10316efc486b8a GIT binary patch literal 13231 zcmd5@O>7&-6%I-L@kyeo@lR-_iRpEM*osV6w4K;;oMc6=BqkC`kdzW9YBwu#MQuzi z+1;gVB`{hP=%GM+X^R3yQS{QBdg!62qV1)J9&%`l_Ga`DG(8n9a_S{$ioTiIT`vE; zq~!qh!6J9(y?O7=`oZ)m0-Ak7x4nT)rHaGTHKZBsCi?qoOXyYmG*&t|lw>Myr~vHVza`HF->(v!?Updqo#%QEP)pnVoh1_W9HKV2LnqJ$snJrlh-eOzKU=yfeJS zE^S#um$j6G=J2%Tqo%sE+0fOa5ornyoT)BWtA=V0SWM=hmtWCrZ^W^#^Q~f_UUc1s zI?wa)`B&kE5h9d4%?Bq~I4A6IPB`H_|D?@JX=)hp)O~nl&!6+W*rPro@7hjc4>;=? zfZDO-VZXXyzpA&FJK1oT+aBcP8J0*e9+P~Q165+&r5ufl|8nl06gO~pf_^2t(4&SwoK>dLNKH)CPsGo5;A6nQonrKDTN z5y`>H14UPA>H+$lY^s)piNTBkvx=XVn=WO^CM2)HOjS4AjHVf*1t0M;y6JM*glMIq zTS~cSX0%jsFmEqcJ@)(hR7z&nXP8CVPKt?n}&9%RE}a1 zwx*Yd6SKgH*m}-ihH3ArOhf37dc*^P%)jB}z0E{!QBBx=lR2IvU zyp<~zq;z&QD`lcjkQkgQN^99txhR&i`J7yka+z#yEgB$C!pV*|t73KoNrL1QL~(Sk zv?>+d;URJoPPk9)p<@JKLQI#l+fsA_r3;s~aOzwJxlEE7n3CQq8)RxC65f&J-zvfilhLYMr&`FKBRc#;ne_I|xD{3HmZkALs%K*YcX@2*mp z4^(TvQDu22l6uu=)q8nil3;wWWkWVRt~cQ%W<%Y?Hc>`F@5nsqjG?1OQeXC&qHI%c zAR+S(;cb}hn1nn7^F=8qy(woZm#RNz3*~ToMA2O)WsjEH`d*~BsMvPC^pCGq^@D-Nr1!p{||4*lGj=*z` zHNhF){c_fCz)TH;NjB6F3EF_u5CjlvYki;Q}{0by5cau#N2k;2?(9I6I2L5P>J zAXx*bn(mZAHszHOrp%c3guf3!v|Fjc6Ng9^rf_2JMAUqdRBEJYnH%v$y3wIS=#h2c z3Ga_%Fy&}PPQWClJK0id%x}g?0m4eX)-W_{|A3{vNb1%|a&vPfM286}VI!f{u<4X( zLt@A5E04l6!`RSvltf^HGes}LmPPn!5W?*#&%$YOV=Z6Ime)7C!VD8=u_SJ0u3>CV zKrpk8`F9dRnUWX{(GOBO9UUXnFo~l|>*7*$oJ3&;U*}3v`U-n8LGz^jy8U#L=41Xe zb?wFIRQv0-rBoCsOXR(lFO{P+G`CA>WLm(X$deMxwjW-(eia|$|Ir8|%cQPdTe=ZF zLBcRDWv*Vm9*rXRsVo+jqLeO2{}aGJq1r@ zvTIVQESGN=x@*G}j4?$6wA|R@1!;Yu(qFl{w1lSOZ>Wr8^JRcFH!{f?2=8Ol$=gP^ zp$y{lh}Jy3>a?QRh|y>a+s|M0Jf|KWMu8_YCW``EQ!^#GU$vcwGx!FrkT2rjtz2Pi zWg}Z!#}XK@shoH1H^G$%ZJ>yr(3aSyo4?7XW|7o?>sl{ z^>bSxEdH$15o&O{Ya+9WaE3}-e(ny~V>A^5OBRAKyj)EWxv^1=f=ej859f=jWoYUl zmPNXq^S*V|i*;_~JP~;;B`pvhHn*R~)T{h9IlVdw{|v%u=P_SKN6i~BfhNVR6!WO? z%JAz&R$+!O3*Qaf@%e&Jd~z{333r+_M0nFABZQ?@FvHPI7D@SW;)>)L4Uyo49eXYp z+9*X*i$3z$A!f6=3^PaQ?DZqMMXIQ=aTdqK;laX;VLDv&(=dxW9S!kIRc`3@qZr+s zPk9~8X>r@`=UD!Wcd&kQw;jxF+dD#P7zgX+EBqTB%z6BO=U{z&gL~NVe1qrsfxfW; zL}}qh$jHo zkj?^ooYn^R$ZFhCbzU@RKe?yXF@M_qtM@D{ z11KDqgnfiiJ11yT3${R z5Nt92GKDbh4C)qj2g6Lb$TiD4!oLC_VA|T#YAr+U-KIZGzVON@1{egk@qMjd9qN^= zTi-zdXqUd92H+`IU(XKwF)G@P0&)#UK>@p#ayZp`!1|E2Yt+ZRfs#S zVNd>d#O{}KMvG}-7oNsLIMwi~mbc{j9PS@6MQ2Q^_ zS(vM|47yW5SdgEA8Emb>i0gFXhzy9p1Bb_n4EJBqan|CGxS-u@!4K5>^l`#@1ebd{ zu^AX+ogDLC;Wq)8b5Et6y9^}RdC)0Qb$@ooj~{b@Q3(^bViw@i^YMPwCs$_h-HxjM>d$&`6h^X@9CnH!9x=%)A=g2fC;T5P@cx*ifDc| zC*w7fY`Pm`LtKBoR4&PdqO_40=?P9?;Vqc8b+9*acxK>;)|bi7^KhY$3bL4{fq{oh zYtp8a!;_tbBFs7Q;hs^D3vkXoVcN*2-{_05A?&x6qi-3ehOnRgIhgwN8ARwfz)$`f zfY}brgZP2$9i#24Fz{^jrA4`#_)`=X9})^y7~l3MT_MJ;q4K`onJ zVCaDuaX_9$h76G(2J!S}Akso!bGFq3&!l}ontAaU9BeC?%nIA2{ODFN2CDc#Jms3C z%GR9WyX3O~M4Sr7eS!F`VdrpX<)3y8;JG%DaPyJyy#Uir5?=FY$MK#aSD5E|)mRQJ zJP_lYbkQjQ^d`=t7ccopJl}mq!WG6%j$W^DqRUf#hV_bGQpYI6dPP4DkKZeLXBp%b z-wi^<89k&|bPjh6;Nuk^9@{G{`{0&&#T7rVSX8`4l;I#lIm(}~w)VgY#P8-v4~1iu z>rSi;NH={5ZEsj-QFMd6^oUXPK(s+t^4kEM=)x(8-%)PYct;(-{*xyR4zvoZeKeqF zzXP&B(i`Dsa^e01k%1`W+jz;K7ZD+TrtKwhwD57&A8}VLr!pSXdxcAkqQ!CtVEsUh zc{we5keH#|^VdNSEYSz-@JmDP2EUhfNbCHHTjyQjodMPvc6pa8gW)6=Rk)6i?o*!xfb>E>zS*gl zWJoJnEUTu4S3E`UZ=R=-iSv}?yl z;sTuJm!#TPU8RGjbwv8?puZ7>v(DC`cMtA&cWof0qw>fHFhY~9^*iLYXRW>7J9O%B zb_+dPJrFy}6Wt`7>5tTrmwj?%f3jmMFKi!Q`F_YF3xE#g=U@LwJi~WP-4_P_EGG6X zt7$GLlXvglwGH9kCZMe*{~5~VW?ixN8pgrO5uC?6mk&4DiVZ`U1^QEuLg4L;?W(m# zUD0cahEYq_RGl5kB>5{k=YU_l+_XjConQo4o_8w@& IeYg+sKe9SqTL1t6 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/AuthorizationCode.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/AuthorizationCode.php new file mode 100644 index 000000000000..d5d6139e31d1 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/AuthorizationCode.php @@ -0,0 +1,71 @@ +google.cloud.domains.v1alpha2.AuthorizationCode + */ +class AuthorizationCode extends \Google\Protobuf\Internal\Message +{ + /** + * The Authorization Code in ASCII. It can be used to transfer the domain + * to or from another registrar. + * + * Generated from protobuf field string code = 1; + */ + protected $code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $code + * The Authorization Code in ASCII. It can be used to transfer the domain + * to or from another registrar. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * The Authorization Code in ASCII. It can be used to transfer the domain + * to or from another registrar. + * + * Generated from protobuf field string code = 1; + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * The Authorization Code in ASCII. It can be used to transfer the domain + * to or from another registrar. + * + * 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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureContactSettingsRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureContactSettingsRequest.php new file mode 100644 index 000000000000..3538366302eb --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureContactSettingsRequest.php @@ -0,0 +1,239 @@ +google.cloud.domains.v1alpha2.ConfigureContactSettingsRequest + */ +class ConfigureContactSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` whose contact settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $registration = ''; + /** + * Fields of the `ContactSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings contact_settings = 2; + */ + protected $contact_settings = null; + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the registrant contact is being updated, the + * `update_mask` is `"registrant_contact"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in `contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 4; + */ + private $contact_notices; + /** + * Validate the request without actually updating the contact settings. + * + * Generated from protobuf field bool validate_only = 5; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $registration + * Required. The name of the `Registration` whose contact settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * @type \Google\Cloud\Domains\V1alpha2\ContactSettings $contact_settings + * Fields of the `ContactSettings` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the registrant contact is being updated, the + * `update_mask` is `"registrant_contact"`. + * @type array|\Google\Protobuf\Internal\RepeatedField $contact_notices + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in `contact_settings`. + * @type bool $validate_only + * Validate the request without actually updating the contact settings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` whose contact settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRegistration() + { + return $this->registration; + } + + /** + * Required. The name of the `Registration` whose contact settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkString($var, True); + $this->registration = $var; + + return $this; + } + + /** + * Fields of the `ContactSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings contact_settings = 2; + * @return \Google\Cloud\Domains\V1alpha2\ContactSettings|null + */ + public function getContactSettings() + { + return $this->contact_settings; + } + + public function hasContactSettings() + { + return isset($this->contact_settings); + } + + public function clearContactSettings() + { + unset($this->contact_settings); + } + + /** + * Fields of the `ContactSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings contact_settings = 2; + * @param \Google\Cloud\Domains\V1alpha2\ContactSettings $var + * @return $this + */ + public function setContactSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ContactSettings::class); + $this->contact_settings = $var; + + return $this; + } + + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the registrant contact is being updated, the + * `update_mask` is `"registrant_contact"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 describing which fields to update as a comma-separated list. + * For example, if only the registrant contact is being updated, the + * `update_mask` is `"registrant_contact"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in `contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContactNotices() + { + return $this->contact_notices; + } + + /** + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in `contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContactNotices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\ContactNotice::class); + $this->contact_notices = $arr; + + return $this; + } + + /** + * Validate the request without actually updating the contact settings. + * + * Generated from protobuf field bool validate_only = 5; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Validate the request without actually updating the contact settings. + * + * Generated from protobuf field bool validate_only = 5; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureDnsSettingsRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureDnsSettingsRequest.php new file mode 100644 index 000000000000..89f1df4e9c88 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureDnsSettingsRequest.php @@ -0,0 +1,221 @@ +google.cloud.domains.v1alpha2.ConfigureDnsSettingsRequest + */ +class ConfigureDnsSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` whose DNS settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $registration = ''; + /** + * Fields of the `DnsSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings dns_settings = 2; + */ + protected $dns_settings = null; + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the name servers are being updated for an existing + * Custom DNS configuration, the `update_mask` is + * `"custom_dns.name_servers"`. + * When changing the DNS provider from one type to another, pass the new + * provider's field name as part of the field mask. For example, when changing + * from a Google Domains DNS configuration to a Custom DNS configuration, the + * `update_mask` is `"custom_dns"`. // + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Validate the request without actually updating the DNS settings. + * + * Generated from protobuf field bool validate_only = 4; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $registration + * Required. The name of the `Registration` whose DNS settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * @type \Google\Cloud\Domains\V1alpha2\DnsSettings $dns_settings + * Fields of the `DnsSettings` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the name servers are being updated for an existing + * Custom DNS configuration, the `update_mask` is + * `"custom_dns.name_servers"`. + * When changing the DNS provider from one type to another, pass the new + * provider's field name as part of the field mask. For example, when changing + * from a Google Domains DNS configuration to a Custom DNS configuration, the + * `update_mask` is `"custom_dns"`. // + * @type bool $validate_only + * Validate the request without actually updating the DNS settings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` whose DNS settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRegistration() + { + return $this->registration; + } + + /** + * Required. The name of the `Registration` whose DNS settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkString($var, True); + $this->registration = $var; + + return $this; + } + + /** + * Fields of the `DnsSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings dns_settings = 2; + * @return \Google\Cloud\Domains\V1alpha2\DnsSettings|null + */ + public function getDnsSettings() + { + return $this->dns_settings; + } + + public function hasDnsSettings() + { + return isset($this->dns_settings); + } + + public function clearDnsSettings() + { + unset($this->dns_settings); + } + + /** + * Fields of the `DnsSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings dns_settings = 2; + * @param \Google\Cloud\Domains\V1alpha2\DnsSettings $var + * @return $this + */ + public function setDnsSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\DnsSettings::class); + $this->dns_settings = $var; + + return $this; + } + + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the name servers are being updated for an existing + * Custom DNS configuration, the `update_mask` is + * `"custom_dns.name_servers"`. + * When changing the DNS provider from one type to another, pass the new + * provider's field name as part of the field mask. For example, when changing + * from a Google Domains DNS configuration to a Custom DNS configuration, the + * `update_mask` is `"custom_dns"`. // + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 describing which fields to update as a comma-separated list. + * For example, if only the name servers are being updated for an existing + * Custom DNS configuration, the `update_mask` is + * `"custom_dns.name_servers"`. + * When changing the DNS provider from one type to another, pass the new + * provider's field name as part of the field mask. For example, when changing + * from a Google Domains DNS configuration to a Custom DNS configuration, the + * `update_mask` is `"custom_dns"`. // + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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; + } + + /** + * Validate the request without actually updating the DNS settings. + * + * Generated from protobuf field bool validate_only = 4; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Validate the request without actually updating the DNS settings. + * + * Generated from protobuf field bool validate_only = 4; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureManagementSettingsRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureManagementSettingsRequest.php new file mode 100644 index 000000000000..1a12a52cd259 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureManagementSettingsRequest.php @@ -0,0 +1,167 @@ +google.cloud.domains.v1alpha2.ConfigureManagementSettingsRequest + */ +class ConfigureManagementSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` whose management settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $registration = ''; + /** + * Fields of the `ManagementSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings management_settings = 2; + */ + protected $management_settings = null; + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the transfer lock is being updated, the `update_mask` + * is `"transfer_lock_state"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $registration + * Required. The name of the `Registration` whose management settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * @type \Google\Cloud\Domains\V1alpha2\ManagementSettings $management_settings + * Fields of the `ManagementSettings` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the transfer lock is being updated, the `update_mask` + * is `"transfer_lock_state"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` whose management settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRegistration() + { + return $this->registration; + } + + /** + * Required. The name of the `Registration` whose management settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkString($var, True); + $this->registration = $var; + + return $this; + } + + /** + * Fields of the `ManagementSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings management_settings = 2; + * @return \Google\Cloud\Domains\V1alpha2\ManagementSettings|null + */ + public function getManagementSettings() + { + return $this->management_settings; + } + + public function hasManagementSettings() + { + return isset($this->management_settings); + } + + public function clearManagementSettings() + { + unset($this->management_settings); + } + + /** + * Fields of the `ManagementSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings management_settings = 2; + * @param \Google\Cloud\Domains\V1alpha2\ManagementSettings $var + * @return $this + */ + public function setManagementSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ManagementSettings::class); + $this->management_settings = $var; + + return $this; + } + + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the transfer lock is being updated, the `update_mask` + * is `"transfer_lock_state"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 describing which fields to update as a comma-separated list. + * For example, if only the transfer lock is being updated, the `update_mask` + * is `"transfer_lock_state"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactNotice.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactNotice.php new file mode 100644 index 000000000000..c4104fa0eb67 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactNotice.php @@ -0,0 +1,55 @@ +google.cloud.domains.v1alpha2.ContactNotice + */ +class ContactNotice +{ + /** + * The notice is undefined. + * + * Generated from protobuf enum CONTACT_NOTICE_UNSPECIFIED = 0; + */ + const CONTACT_NOTICE_UNSPECIFIED = 0; + /** + * Required when setting the `privacy` field of `ContactSettings` to + * `PUBLIC_CONTACT_DATA`, which exposes contact data publicly. + * + * Generated from protobuf enum PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT = 1; + */ + const PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT = 1; + + private static $valueToName = [ + self::CONTACT_NOTICE_UNSPECIFIED => 'CONTACT_NOTICE_UNSPECIFIED', + self::PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT => 'PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactPrivacy.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactPrivacy.php new file mode 100644 index 000000000000..f50a78c509fc --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactPrivacy.php @@ -0,0 +1,81 @@ +google.cloud.domains.v1alpha2.ContactPrivacy + */ +class ContactPrivacy +{ + /** + * The contact privacy settings are undefined. + * + * Generated from protobuf enum CONTACT_PRIVACY_UNSPECIFIED = 0; + */ + const CONTACT_PRIVACY_UNSPECIFIED = 0; + /** + * All the data from `ContactSettings` is publicly available. When setting + * this option, you must also provide a + * `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the + * request. + * + * Generated from protobuf enum PUBLIC_CONTACT_DATA = 1; + */ + const PUBLIC_CONTACT_DATA = 1; + /** + * None of the data from `ContactSettings` is publicly available. Instead, + * proxy contact data is published for your domain. Email sent to the proxy + * email address is forwarded to the registrant's email address. Cloud Domains + * provides this privacy proxy service at no additional cost. + * + * Generated from protobuf enum PRIVATE_CONTACT_DATA = 2; + */ + const PRIVATE_CONTACT_DATA = 2; + /** + * Some data from `ContactSettings` is publicly available. The actual + * information redacted depends on the domain. For details, see [the + * registration privacy + * article](https://support.google.com/domains/answer/3251242). + * + * Generated from protobuf enum REDACTED_CONTACT_DATA = 3; + */ + const REDACTED_CONTACT_DATA = 3; + + private static $valueToName = [ + self::CONTACT_PRIVACY_UNSPECIFIED => 'CONTACT_PRIVACY_UNSPECIFIED', + self::PUBLIC_CONTACT_DATA => 'PUBLIC_CONTACT_DATA', + self::PRIVATE_CONTACT_DATA => 'PRIVATE_CONTACT_DATA', + self::REDACTED_CONTACT_DATA => 'REDACTED_CONTACT_DATA', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings.php new file mode 100644 index 000000000000..bcfaa0bec763 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings.php @@ -0,0 +1,222 @@ +google.cloud.domains.v1alpha2.ContactSettings + */ +class ContactSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Privacy setting for the contacts associated with the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactPrivacy privacy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $privacy = 0; + /** + * Required. The registrant contact for the `Registration`. + * *Caution: Anyone with access to this email address, phone number, + * and/or postal address can take control of the domain.* + * *Warning: For new `Registration`s, the registrant receives an email + * confirmation that they must complete within 15 days to avoid domain + * suspension.* + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact registrant_contact = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $registrant_contact = null; + /** + * Required. The administrative contact for the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact admin_contact = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $admin_contact = null; + /** + * Required. The technical contact for the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact technical_contact = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $technical_contact = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $privacy + * Required. Privacy setting for the contacts associated with the `Registration`. + * @type \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $registrant_contact + * Required. The registrant contact for the `Registration`. + * *Caution: Anyone with access to this email address, phone number, + * and/or postal address can take control of the domain.* + * *Warning: For new `Registration`s, the registrant receives an email + * confirmation that they must complete within 15 days to avoid domain + * suspension.* + * @type \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $admin_contact + * Required. The administrative contact for the `Registration`. + * @type \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $technical_contact + * Required. The technical contact for the `Registration`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. Privacy setting for the contacts associated with the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactPrivacy privacy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getPrivacy() + { + return $this->privacy; + } + + /** + * Required. Privacy setting for the contacts associated with the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactPrivacy privacy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setPrivacy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\ContactPrivacy::class); + $this->privacy = $var; + + return $this; + } + + /** + * Required. The registrant contact for the `Registration`. + * *Caution: Anyone with access to this email address, phone number, + * and/or postal address can take control of the domain.* + * *Warning: For new `Registration`s, the registrant receives an email + * confirmation that they must complete within 15 days to avoid domain + * suspension.* + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact registrant_contact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact|null + */ + public function getRegistrantContact() + { + return $this->registrant_contact; + } + + public function hasRegistrantContact() + { + return isset($this->registrant_contact); + } + + public function clearRegistrantContact() + { + unset($this->registrant_contact); + } + + /** + * Required. The registrant contact for the `Registration`. + * *Caution: Anyone with access to this email address, phone number, + * and/or postal address can take control of the domain.* + * *Warning: For new `Registration`s, the registrant receives an email + * confirmation that they must complete within 15 days to avoid domain + * suspension.* + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact registrant_contact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $var + * @return $this + */ + public function setRegistrantContact($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact::class); + $this->registrant_contact = $var; + + return $this; + } + + /** + * Required. The administrative contact for the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact admin_contact = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact|null + */ + public function getAdminContact() + { + return $this->admin_contact; + } + + public function hasAdminContact() + { + return isset($this->admin_contact); + } + + public function clearAdminContact() + { + unset($this->admin_contact); + } + + /** + * Required. The administrative contact for the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact admin_contact = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $var + * @return $this + */ + public function setAdminContact($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact::class); + $this->admin_contact = $var; + + return $this; + } + + /** + * Required. The technical contact for the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact technical_contact = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact|null + */ + public function getTechnicalContact() + { + return $this->technical_contact; + } + + public function hasTechnicalContact() + { + return isset($this->technical_contact); + } + + public function clearTechnicalContact() + { + unset($this->technical_contact); + } + + /** + * Required. The technical contact for the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact technical_contact = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $var + * @return $this + */ + public function setTechnicalContact($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact::class); + $this->technical_contact = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings/Contact.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings/Contact.php new file mode 100644 index 000000000000..d06d25d193e3 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings/Contact.php @@ -0,0 +1,190 @@ +google.cloud.domains.v1alpha2.ContactSettings.Contact + */ +class Contact extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Postal address of the contact. + * + * Generated from protobuf field .google.type.PostalAddress postal_address = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $postal_address = null; + /** + * Required. Email address of the contact. + * + * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $email = ''; + /** + * Required. Phone number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * + * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $phone_number = ''; + /** + * Fax number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * + * Generated from protobuf field string fax_number = 4; + */ + protected $fax_number = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\PostalAddress $postal_address + * Required. Postal address of the contact. + * @type string $email + * Required. Email address of the contact. + * @type string $phone_number + * Required. Phone number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * @type string $fax_number + * Fax number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. Postal address of the contact. + * + * Generated from protobuf field .google.type.PostalAddress postal_address = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\PostalAddress|null + */ + public function getPostalAddress() + { + return $this->postal_address; + } + + public function hasPostalAddress() + { + return isset($this->postal_address); + } + + public function clearPostalAddress() + { + unset($this->postal_address); + } + + /** + * Required. Postal address of the contact. + * + * Generated from protobuf field .google.type.PostalAddress postal_address = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\PostalAddress $var + * @return $this + */ + public function setPostalAddress($var) + { + GPBUtil::checkMessage($var, \Google\Type\PostalAddress::class); + $this->postal_address = $var; + + return $this; + } + + /** + * Required. Email address of the contact. + * + * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Required. Email address of the contact. + * + * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * Required. Phone number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * + * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPhoneNumber() + { + return $this->phone_number; + } + + /** + * Required. Phone number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * + * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPhoneNumber($var) + { + GPBUtil::checkString($var, True); + $this->phone_number = $var; + + return $this; + } + + /** + * Fax number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * + * Generated from protobuf field string fax_number = 4; + * @return string + */ + public function getFaxNumber() + { + return $this->fax_number; + } + + /** + * Fax number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * + * Generated from protobuf field string fax_number = 4; + * @param string $var + * @return $this + */ + public function setFaxNumber($var) + { + GPBUtil::checkString($var, True); + $this->fax_number = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Contact::class, \Google\Cloud\Domains\V1alpha2\ContactSettings_Contact::class); + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings_Contact.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings_Contact.php new file mode 100644 index 000000000000..5e0fa4955390 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings_Contact.php @@ -0,0 +1,16 @@ +google.cloud.domains.v1alpha2.DeleteRegistrationRequest + */ +class DeleteRegistrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` to delete, + * in the format `projects/*/locations/*/registrations/*`. + * + * 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 name of the `Registration` to delete, + * in the format `projects/*/locations/*/registrations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` to delete, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated 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 `Registration` to delete, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings.php new file mode 100644 index 000000000000..6358bd0ed983 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings.php @@ -0,0 +1,146 @@ +google.cloud.domains.v1alpha2.DnsSettings + */ +class DnsSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The list of glue records for this `Registration`. Commonly empty. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.GlueRecord glue_records = 4; + */ + private $glue_records; + protected $dns_provider; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Domains\V1alpha2\DnsSettings\CustomDns $custom_dns + * An arbitrary DNS provider identified by its name servers. + * @type \Google\Cloud\Domains\V1alpha2\DnsSettings\GoogleDomainsDns $google_domains_dns + * The free DNS zone provided by + * [Google Domains](https://domains.google/). + * @type array<\Google\Cloud\Domains\V1alpha2\DnsSettings\GlueRecord>|\Google\Protobuf\Internal\RepeatedField $glue_records + * The list of glue records for this `Registration`. Commonly empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * An arbitrary DNS provider identified by its name servers. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.CustomDns custom_dns = 1; + * @return \Google\Cloud\Domains\V1alpha2\DnsSettings\CustomDns|null + */ + public function getCustomDns() + { + return $this->readOneof(1); + } + + public function hasCustomDns() + { + return $this->hasOneof(1); + } + + /** + * An arbitrary DNS provider identified by its name servers. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.CustomDns custom_dns = 1; + * @param \Google\Cloud\Domains\V1alpha2\DnsSettings\CustomDns $var + * @return $this + */ + public function setCustomDns($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\DnsSettings\CustomDns::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The free DNS zone provided by + * [Google Domains](https://domains.google/). + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.GoogleDomainsDns google_domains_dns = 2; + * @return \Google\Cloud\Domains\V1alpha2\DnsSettings\GoogleDomainsDns|null + */ + public function getGoogleDomainsDns() + { + return $this->readOneof(2); + } + + public function hasGoogleDomainsDns() + { + return $this->hasOneof(2); + } + + /** + * The free DNS zone provided by + * [Google Domains](https://domains.google/). + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.GoogleDomainsDns google_domains_dns = 2; + * @param \Google\Cloud\Domains\V1alpha2\DnsSettings\GoogleDomainsDns $var + * @return $this + */ + public function setGoogleDomainsDns($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\DnsSettings\GoogleDomainsDns::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The list of glue records for this `Registration`. Commonly empty. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.GlueRecord glue_records = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGlueRecords() + { + return $this->glue_records; + } + + /** + * The list of glue records for this `Registration`. Commonly empty. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.GlueRecord glue_records = 4; + * @param array<\Google\Cloud\Domains\V1alpha2\DnsSettings\GlueRecord>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGlueRecords($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1alpha2\DnsSettings\GlueRecord::class); + $this->glue_records = $arr; + + return $this; + } + + /** + * @return string + */ + public function getDnsProvider() + { + return $this->whichOneof("dns_provider"); + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/CustomDns.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/CustomDns.php new file mode 100644 index 000000000000..e071d7558638 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/CustomDns.php @@ -0,0 +1,120 @@ +google.cloud.domains.v1alpha2.DnsSettings.CustomDns + */ +class CustomDns extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. + * + * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $name_servers; + /** + * The list of DS records for this domain, which are used to enable DNSSEC. + * The domain's DNS provider can provide the values to set here. If this + * field is empty, DNSSEC is disabled. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.DsRecord ds_records = 2; + */ + private $ds_records; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $name_servers + * Required. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. + * @type array<\Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $ds_records + * The list of DS records for this domain, which are used to enable DNSSEC. + * The domain's DNS provider can provide the values to set here. If this + * field is empty, DNSSEC is disabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. + * + * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNameServers() + { + return $this->name_servers; + } + + /** + * Required. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. + * + * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNameServers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->name_servers = $arr; + + return $this; + } + + /** + * The list of DS records for this domain, which are used to enable DNSSEC. + * The domain's DNS provider can provide the values to set here. If this + * field is empty, DNSSEC is disabled. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.DsRecord ds_records = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDsRecords() + { + return $this->ds_records; + } + + /** + * The list of DS records for this domain, which are used to enable DNSSEC. + * The domain's DNS provider can provide the values to set here. If this + * field is empty, DNSSEC is disabled. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.DsRecord ds_records = 2; + * @param array<\Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDsRecords($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord::class); + $this->ds_records = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CustomDns::class, \Google\Cloud\Domains\V1alpha2\DnsSettings_CustomDns::class); + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord.php new file mode 100644 index 000000000000..72a0148d4880 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord.php @@ -0,0 +1,174 @@ +google.cloud.domains.v1alpha2.DnsSettings.DsRecord + */ +class DsRecord extends \Google\Protobuf\Internal\Message +{ + /** + * The key tag of the record. Must be set in range 0 -- 65535. + * + * Generated from protobuf field int32 key_tag = 1; + */ + protected $key_tag = 0; + /** + * The algorithm used to generate the referenced DNSKEY. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsRecord.Algorithm algorithm = 2; + */ + protected $algorithm = 0; + /** + * The hash function used to generate the digest of the referenced DNSKEY. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsRecord.DigestType digest_type = 3; + */ + protected $digest_type = 0; + /** + * The digest generated from the referenced DNSKEY. + * + * Generated from protobuf field string digest = 4; + */ + protected $digest = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $key_tag + * The key tag of the record. Must be set in range 0 -- 65535. + * @type int $algorithm + * The algorithm used to generate the referenced DNSKEY. + * @type int $digest_type + * The hash function used to generate the digest of the referenced DNSKEY. + * @type string $digest + * The digest generated from the referenced DNSKEY. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * The key tag of the record. Must be set in range 0 -- 65535. + * + * Generated from protobuf field int32 key_tag = 1; + * @return int + */ + public function getKeyTag() + { + return $this->key_tag; + } + + /** + * The key tag of the record. Must be set in range 0 -- 65535. + * + * Generated from protobuf field int32 key_tag = 1; + * @param int $var + * @return $this + */ + public function setKeyTag($var) + { + GPBUtil::checkInt32($var); + $this->key_tag = $var; + + return $this; + } + + /** + * The algorithm used to generate the referenced DNSKEY. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsRecord.Algorithm algorithm = 2; + * @return int + */ + public function getAlgorithm() + { + return $this->algorithm; + } + + /** + * The algorithm used to generate the referenced DNSKEY. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsRecord.Algorithm algorithm = 2; + * @param int $var + * @return $this + */ + public function setAlgorithm($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord\Algorithm::class); + $this->algorithm = $var; + + return $this; + } + + /** + * The hash function used to generate the digest of the referenced DNSKEY. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsRecord.DigestType digest_type = 3; + * @return int + */ + public function getDigestType() + { + return $this->digest_type; + } + + /** + * The hash function used to generate the digest of the referenced DNSKEY. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsRecord.DigestType digest_type = 3; + * @param int $var + * @return $this + */ + public function setDigestType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord\DigestType::class); + $this->digest_type = $var; + + return $this; + } + + /** + * The digest generated from the referenced DNSKEY. + * + * Generated from protobuf field string digest = 4; + * @return string + */ + public function getDigest() + { + return $this->digest; + } + + /** + * The digest generated from the referenced DNSKEY. + * + * Generated from protobuf field string digest = 4; + * @param string $var + * @return $this + */ + public function setDigest($var) + { + GPBUtil::checkString($var, True); + $this->digest = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DsRecord::class, \Google\Cloud\Domains\V1alpha2\DnsSettings_DsRecord::class); + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/Algorithm.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/Algorithm.php new file mode 100644 index 000000000000..3df3453dfaac --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/Algorithm.php @@ -0,0 +1,170 @@ +google.cloud.domains.v1alpha2.DnsSettings.DsRecord.Algorithm + */ +class Algorithm +{ + /** + * The algorithm is unspecified. + * + * Generated from protobuf enum ALGORITHM_UNSPECIFIED = 0; + */ + const ALGORITHM_UNSPECIFIED = 0; + /** + * RSA/MD5. Cannot be used for new deployments. + * + * Generated from protobuf enum RSAMD5 = 1; + */ + const RSAMD5 = 1; + /** + * Diffie-Hellman. Cannot be used for new deployments. + * + * Generated from protobuf enum DH = 2; + */ + const DH = 2; + /** + * DSA/SHA1. Not recommended for new deployments. + * + * Generated from protobuf enum DSA = 3; + */ + const DSA = 3; + /** + * ECC. Not recommended for new deployments. + * + * Generated from protobuf enum ECC = 4; + */ + const ECC = 4; + /** + * RSA/SHA-1. Not recommended for new deployments. + * + * Generated from protobuf enum RSASHA1 = 5; + */ + const RSASHA1 = 5; + /** + * DSA-NSEC3-SHA1. Not recommended for new deployments. + * + * Generated from protobuf enum DSANSEC3SHA1 = 6; + */ + const DSANSEC3SHA1 = 6; + /** + * RSA/SHA1-NSEC3-SHA1. Not recommended for new deployments. + * + * Generated from protobuf enum RSASHA1NSEC3SHA1 = 7; + */ + const RSASHA1NSEC3SHA1 = 7; + /** + * RSA/SHA-256. + * + * Generated from protobuf enum RSASHA256 = 8; + */ + const RSASHA256 = 8; + /** + * RSA/SHA-512. + * + * Generated from protobuf enum RSASHA512 = 10; + */ + const RSASHA512 = 10; + /** + * GOST R 34.10-2001. + * + * Generated from protobuf enum ECCGOST = 12; + */ + const ECCGOST = 12; + /** + * ECDSA Curve P-256 with SHA-256. + * + * Generated from protobuf enum ECDSAP256SHA256 = 13; + */ + const ECDSAP256SHA256 = 13; + /** + * ECDSA Curve P-384 with SHA-384. + * + * Generated from protobuf enum ECDSAP384SHA384 = 14; + */ + const ECDSAP384SHA384 = 14; + /** + * Ed25519. + * + * Generated from protobuf enum ED25519 = 15; + */ + const ED25519 = 15; + /** + * Ed448. + * + * Generated from protobuf enum ED448 = 16; + */ + const ED448 = 16; + /** + * Reserved for Indirect Keys. Cannot be used for new deployments. + * + * Generated from protobuf enum INDIRECT = 252; + */ + const INDIRECT = 252; + /** + * Private algorithm. Cannot be used for new deployments. + * + * Generated from protobuf enum PRIVATEDNS = 253; + */ + const PRIVATEDNS = 253; + /** + * Private algorithm OID. Cannot be used for new deployments. + * + * Generated from protobuf enum PRIVATEOID = 254; + */ + const PRIVATEOID = 254; + + private static $valueToName = [ + self::ALGORITHM_UNSPECIFIED => 'ALGORITHM_UNSPECIFIED', + self::RSAMD5 => 'RSAMD5', + self::DH => 'DH', + self::DSA => 'DSA', + self::ECC => 'ECC', + self::RSASHA1 => 'RSASHA1', + self::DSANSEC3SHA1 => 'DSANSEC3SHA1', + self::RSASHA1NSEC3SHA1 => 'RSASHA1NSEC3SHA1', + self::RSASHA256 => 'RSASHA256', + self::RSASHA512 => 'RSASHA512', + self::ECCGOST => 'ECCGOST', + self::ECDSAP256SHA256 => 'ECDSAP256SHA256', + self::ECDSAP384SHA384 => 'ECDSAP384SHA384', + self::ED25519 => 'ED25519', + self::ED448 => 'ED448', + self::INDIRECT => 'INDIRECT', + self::PRIVATEDNS => 'PRIVATEDNS', + self::PRIVATEOID => 'PRIVATEOID', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Algorithm::class, \Google\Cloud\Domains\V1alpha2\DnsSettings_DsRecord_Algorithm::class); + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/DigestType.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/DigestType.php new file mode 100644 index 000000000000..f01322aa7de1 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/DigestType.php @@ -0,0 +1,79 @@ +google.cloud.domains.v1alpha2.DnsSettings.DsRecord.DigestType + */ +class DigestType +{ + /** + * The DigestType is unspecified. + * + * Generated from protobuf enum DIGEST_TYPE_UNSPECIFIED = 0; + */ + const DIGEST_TYPE_UNSPECIFIED = 0; + /** + * SHA-1. Not recommended for new deployments. + * + * Generated from protobuf enum SHA1 = 1; + */ + const SHA1 = 1; + /** + * SHA-256. + * + * Generated from protobuf enum SHA256 = 2; + */ + const SHA256 = 2; + /** + * GOST R 34.11-94. + * + * Generated from protobuf enum GOST3411 = 3; + */ + const GOST3411 = 3; + /** + * SHA-384. + * + * Generated from protobuf enum SHA384 = 4; + */ + const SHA384 = 4; + + private static $valueToName = [ + self::DIGEST_TYPE_UNSPECIFIED => 'DIGEST_TYPE_UNSPECIFIED', + self::SHA1 => 'SHA1', + self::SHA256 => 'SHA256', + self::GOST3411 => 'GOST3411', + self::SHA384 => 'SHA384', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DigestType::class, \Google\Cloud\Domains\V1alpha2\DnsSettings_DsRecord_DigestType::class); + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsState.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsState.php new file mode 100644 index 000000000000..899066f15a66 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsState.php @@ -0,0 +1,68 @@ +google.cloud.domains.v1alpha2.DnsSettings.DsState + */ +class DsState +{ + /** + * DS state is unspecified. + * + * Generated from protobuf enum DS_STATE_UNSPECIFIED = 0; + */ + const DS_STATE_UNSPECIFIED = 0; + /** + * DNSSEC is disabled for this domain. No DS records for this domain are + * published in the parent DNS zone. + * + * Generated from protobuf enum DS_RECORDS_UNPUBLISHED = 1; + */ + const DS_RECORDS_UNPUBLISHED = 1; + /** + * DNSSEC is enabled for this domain. Appropriate DS records for this domain + * are published in the parent DNS zone. This option is valid only if the + * DNS zone referenced in the `Registration`'s `dns_provider` field is + * already DNSSEC-signed. + * + * Generated from protobuf enum DS_RECORDS_PUBLISHED = 2; + */ + const DS_RECORDS_PUBLISHED = 2; + + private static $valueToName = [ + self::DS_STATE_UNSPECIFIED => 'DS_STATE_UNSPECIFIED', + self::DS_RECORDS_UNPUBLISHED => 'DS_RECORDS_UNPUBLISHED', + self::DS_RECORDS_PUBLISHED => 'DS_RECORDS_PUBLISHED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DsState::class, \Google\Cloud\Domains\V1alpha2\DnsSettings_DsState::class); + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GlueRecord.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GlueRecord.php new file mode 100644 index 000000000000..408db83faf91 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GlueRecord.php @@ -0,0 +1,159 @@ +google.cloud.domains.v1alpha2.DnsSettings.GlueRecord + */ +class GlueRecord extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Domain name of the host in Punycode format. + * + * Generated from protobuf field string host_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $host_name = ''; + /** + * List of IPv4 addresses corresponding to this host in the standard decimal + * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and + * `ipv6_address` must be set. + * + * Generated from protobuf field repeated string ipv4_addresses = 2; + */ + private $ipv4_addresses; + /** + * List of IPv6 addresses corresponding to this host in the standard + * hexadecimal format (e.g. `2001:db8::`). At least one of + * `ipv4_address` and `ipv6_address` must be set. + * + * Generated from protobuf field repeated string ipv6_addresses = 3; + */ + private $ipv6_addresses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $host_name + * Required. Domain name of the host in Punycode format. + * @type array|\Google\Protobuf\Internal\RepeatedField $ipv4_addresses + * List of IPv4 addresses corresponding to this host in the standard decimal + * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and + * `ipv6_address` must be set. + * @type array|\Google\Protobuf\Internal\RepeatedField $ipv6_addresses + * List of IPv6 addresses corresponding to this host in the standard + * hexadecimal format (e.g. `2001:db8::`). At least one of + * `ipv4_address` and `ipv6_address` must be set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. Domain name of the host in Punycode format. + * + * Generated from protobuf field string host_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHostName() + { + return $this->host_name; + } + + /** + * Required. Domain name of the host in Punycode format. + * + * Generated from protobuf field string host_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHostName($var) + { + GPBUtil::checkString($var, True); + $this->host_name = $var; + + return $this; + } + + /** + * List of IPv4 addresses corresponding to this host in the standard decimal + * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and + * `ipv6_address` must be set. + * + * Generated from protobuf field repeated string ipv4_addresses = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpv4Addresses() + { + return $this->ipv4_addresses; + } + + /** + * List of IPv4 addresses corresponding to this host in the standard decimal + * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and + * `ipv6_address` must be set. + * + * Generated from protobuf field repeated string ipv4_addresses = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpv4Addresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ipv4_addresses = $arr; + + return $this; + } + + /** + * List of IPv6 addresses corresponding to this host in the standard + * hexadecimal format (e.g. `2001:db8::`). At least one of + * `ipv4_address` and `ipv6_address` must be set. + * + * Generated from protobuf field repeated string ipv6_addresses = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpv6Addresses() + { + return $this->ipv6_addresses; + } + + /** + * List of IPv6 addresses corresponding to this host in the standard + * hexadecimal format (e.g. `2001:db8::`). At least one of + * `ipv4_address` and `ipv6_address` must be set. + * + * Generated from protobuf field repeated string ipv6_addresses = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpv6Addresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ipv6_addresses = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GlueRecord::class, \Google\Cloud\Domains\V1alpha2\DnsSettings_GlueRecord::class); + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GoogleDomainsDns.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GoogleDomainsDns.php new file mode 100644 index 000000000000..0eec4b52da89 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GoogleDomainsDns.php @@ -0,0 +1,165 @@ +google.cloud.domains.v1alpha2.DnsSettings.GoogleDomainsDns + */ +class GoogleDomainsDns extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. This field is automatically populated with the name + * servers assigned to the Google Domains DNS zone. + * + * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $name_servers; + /** + * Required. The state of DS records for this domain. Used to enable or disable + * automatic DNSSEC. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsState ds_state = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ds_state = 0; + /** + * Output only. The list of DS records published for this domain. The list is + * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, + * otherwise it remains empty. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.DsRecord ds_records = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $ds_records; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $name_servers + * Output only. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. This field is automatically populated with the name + * servers assigned to the Google Domains DNS zone. + * @type int $ds_state + * Required. The state of DS records for this domain. Used to enable or disable + * automatic DNSSEC. + * @type array<\Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $ds_records + * Output only. The list of DS records published for this domain. The list is + * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, + * otherwise it remains empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Output only. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. This field is automatically populated with the name + * servers assigned to the Google Domains DNS zone. + * + * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNameServers() + { + return $this->name_servers; + } + + /** + * Output only. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. This field is automatically populated with the name + * servers assigned to the Google Domains DNS zone. + * + * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNameServers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->name_servers = $arr; + + return $this; + } + + /** + * Required. The state of DS records for this domain. Used to enable or disable + * automatic DNSSEC. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsState ds_state = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDsState() + { + return $this->ds_state; + } + + /** + * Required. The state of DS records for this domain. Used to enable or disable + * automatic DNSSEC. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsState ds_state = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDsState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\DnsSettings\DsState::class); + $this->ds_state = $var; + + return $this; + } + + /** + * Output only. The list of DS records published for this domain. The list is + * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, + * otherwise it remains empty. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.DsRecord ds_records = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDsRecords() + { + return $this->ds_records; + } + + /** + * Output only. The list of DS records published for this domain. The list is + * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, + * otherwise it remains empty. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.DsRecord ds_records = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDsRecords($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord::class); + $this->ds_records = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GoogleDomainsDns::class, \Google\Cloud\Domains\V1alpha2\DnsSettings_GoogleDomainsDns::class); + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_CustomDns.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_CustomDns.php new file mode 100644 index 000000000000..a0f4ab4b92a1 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_CustomDns.php @@ -0,0 +1,16 @@ +google.cloud.domains.v1alpha2.DomainNotice + */ +class DomainNotice +{ + /** + * The notice is undefined. + * + * Generated from protobuf enum DOMAIN_NOTICE_UNSPECIFIED = 0; + */ + const DOMAIN_NOTICE_UNSPECIFIED = 0; + /** + * Indicates that the domain is preloaded on the HTTP Strict Transport + * Security list in browsers. Serving a website on such domain requires + * an SSL certificate. For details, see + * [how to get an SSL + * certificate](https://support.google.com/domains/answer/7638036). + * + * Generated from protobuf enum HSTS_PRELOADED = 1; + */ + const HSTS_PRELOADED = 1; + + private static $valueToName = [ + self::DOMAIN_NOTICE_UNSPECIFIED => 'DOMAIN_NOTICE_UNSPECIFIED', + self::HSTS_PRELOADED => 'HSTS_PRELOADED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DomainsGrpcClient.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DomainsGrpcClient.php new file mode 100644 index 000000000000..ec51b6209034 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DomainsGrpcClient.php @@ -0,0 +1,341 @@ +_simpleRequest('/google.cloud.domains.v1alpha2.Domains/SearchDomains', + $argument, + ['\Google\Cloud\Domains\V1alpha2\SearchDomainsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets parameters needed to register a new domain name, including price and + * up-to-date availability. Use the returned values to call `RegisterDomain`. + * @param \Google\Cloud\Domains\V1alpha2\RetrieveRegisterParametersRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RetrieveRegisterParameters(\Google\Cloud\Domains\V1alpha2\RetrieveRegisterParametersRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/RetrieveRegisterParameters', + $argument, + ['\Google\Cloud\Domains\V1alpha2\RetrieveRegisterParametersResponse', 'decode'], + $metadata, $options); + } + + /** + * Registers a new domain name and creates a corresponding `Registration` + * resource. + * + * Call `RetrieveRegisterParameters` first to check availability of the domain + * name and determine parameters like price that are needed to build a call to + * this method. + * + * A successful call creates a `Registration` resource in state + * `REGISTRATION_PENDING`, which resolves to `ACTIVE` within 1-2 + * minutes, indicating that the domain was successfully registered. If the + * resource ends up in state `REGISTRATION_FAILED`, it indicates that the + * domain was not registered successfully, and you can safely delete the + * resource and retry registration. + * @param \Google\Cloud\Domains\V1alpha2\RegisterDomainRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RegisterDomain(\Google\Cloud\Domains\V1alpha2\RegisterDomainRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/RegisterDomain', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Gets parameters needed to transfer a domain name from another registrar to + * Cloud Domains. For domains managed by Google Domains, transferring to Cloud + * Domains is not supported. + * + * + * Use the returned values to call `TransferDomain`. + * @param \Google\Cloud\Domains\V1alpha2\RetrieveTransferParametersRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RetrieveTransferParameters(\Google\Cloud\Domains\V1alpha2\RetrieveTransferParametersRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/RetrieveTransferParameters', + $argument, + ['\Google\Cloud\Domains\V1alpha2\RetrieveTransferParametersResponse', 'decode'], + $metadata, $options); + } + + /** + * Transfers a domain name from another registrar to Cloud Domains. For + * domains managed by Google Domains, transferring to Cloud Domains is not + * supported. + * + * + * Before calling this method, go to the domain's current registrar to unlock + * the domain for transfer and retrieve the domain's transfer authorization + * code. Then call `RetrieveTransferParameters` to confirm that the domain is + * unlocked and to get values needed to build a call to this method. + * + * A successful call creates a `Registration` resource in state + * `TRANSFER_PENDING`. It can take several days to complete the transfer + * process. The registrant can often speed up this process by approving the + * transfer through the current registrar, either by clicking a link in an + * email from the registrar or by visiting the registrar's website. + * + * A few minutes after transfer approval, the resource transitions to state + * `ACTIVE`, indicating that the transfer was successful. If the transfer is + * rejected or the request expires without being approved, the resource can + * end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete + * the resource and retry the transfer. + * @param \Google\Cloud\Domains\V1alpha2\TransferDomainRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function TransferDomain(\Google\Cloud\Domains\V1alpha2\TransferDomainRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/TransferDomain', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists the `Registration` resources in a project. + * @param \Google\Cloud\Domains\V1alpha2\ListRegistrationsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListRegistrations(\Google\Cloud\Domains\V1alpha2\ListRegistrationsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/ListRegistrations', + $argument, + ['\Google\Cloud\Domains\V1alpha2\ListRegistrationsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets the details of a `Registration` resource. + * @param \Google\Cloud\Domains\V1alpha2\GetRegistrationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetRegistration(\Google\Cloud\Domains\V1alpha2\GetRegistrationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/GetRegistration', + $argument, + ['\Google\Cloud\Domains\V1alpha2\Registration', 'decode'], + $metadata, $options); + } + + /** + * Updates select fields of a `Registration` resource, notably `labels`. To + * update other fields, use the appropriate custom update method: + * + * * To update management settings, see `ConfigureManagementSettings` + * * To update DNS configuration, see `ConfigureDnsSettings` + * * To update contact information, see `ConfigureContactSettings` + * @param \Google\Cloud\Domains\V1alpha2\UpdateRegistrationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateRegistration(\Google\Cloud\Domains\V1alpha2\UpdateRegistrationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/UpdateRegistration', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates a `Registration`'s management settings. + * @param \Google\Cloud\Domains\V1alpha2\ConfigureManagementSettingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ConfigureManagementSettings(\Google\Cloud\Domains\V1alpha2\ConfigureManagementSettingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/ConfigureManagementSettings', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates a `Registration`'s DNS settings. + * @param \Google\Cloud\Domains\V1alpha2\ConfigureDnsSettingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ConfigureDnsSettings(\Google\Cloud\Domains\V1alpha2\ConfigureDnsSettingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/ConfigureDnsSettings', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates a `Registration`'s contact settings. Some changes require + * confirmation by the domain's registrant contact . + * @param \Google\Cloud\Domains\V1alpha2\ConfigureContactSettingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ConfigureContactSettings(\Google\Cloud\Domains\V1alpha2\ConfigureContactSettingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/ConfigureContactSettings', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Exports a `Registration` resource, such that it is no longer managed by + * Cloud Domains. + * + * When an active domain is successfully exported, you can continue to use the + * domain in [Google Domains](https://domains.google/) until it expires. The + * calling user becomes the domain's sole owner in Google Domains, and + * permissions for the domain are subsequently managed there. The domain does + * not renew automatically unless the new owner sets up billing in Google + * Domains. + * @param \Google\Cloud\Domains\V1alpha2\ExportRegistrationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ExportRegistration(\Google\Cloud\Domains\V1alpha2\ExportRegistrationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/ExportRegistration', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a `Registration` resource. + * + * This method works on any `Registration` resource using [Subscription or + * Commitment billing](/domains/pricing#billing-models), provided that the + * resource was created at least 1 day in the past. + * + * For `Registration` resources using + * [Monthly billing](/domains/pricing#billing-models), this method works if: + * + * * `state` is `EXPORTED` with `expire_time` in the past + * * `state` is `REGISTRATION_FAILED` + * * `state` is `TRANSFER_FAILED` + * + * When an active registration is successfully deleted, you can continue to + * use the domain in [Google Domains](https://domains.google/) until it + * expires. The calling user becomes the domain's sole owner in Google + * Domains, and permissions for the domain are subsequently managed there. The + * domain does not renew automatically unless the new owner sets up billing in + * Google Domains. + * @param \Google\Cloud\Domains\V1alpha2\DeleteRegistrationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteRegistration(\Google\Cloud\Domains\V1alpha2\DeleteRegistrationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/DeleteRegistration', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Gets the authorization code of the `Registration` for the purpose of + * transferring the domain to another registrar. + * + * You can call this method only after 60 days have elapsed since the initial + * domain registration. + * @param \Google\Cloud\Domains\V1alpha2\RetrieveAuthorizationCodeRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RetrieveAuthorizationCode(\Google\Cloud\Domains\V1alpha2\RetrieveAuthorizationCodeRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/RetrieveAuthorizationCode', + $argument, + ['\Google\Cloud\Domains\V1alpha2\AuthorizationCode', 'decode'], + $metadata, $options); + } + + /** + * Resets the authorization code of the `Registration` to a new random string. + * + * You can call this method only after 60 days have elapsed since the initial + * domain registration. + * @param \Google\Cloud\Domains\V1alpha2\ResetAuthorizationCodeRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ResetAuthorizationCode(\Google\Cloud\Domains\V1alpha2\ResetAuthorizationCodeRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/ResetAuthorizationCode', + $argument, + ['\Google\Cloud\Domains\V1alpha2\AuthorizationCode', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ExportRegistrationRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ExportRegistrationRequest.php new file mode 100644 index 000000000000..54533db3cc90 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ExportRegistrationRequest.php @@ -0,0 +1,71 @@ +google.cloud.domains.v1alpha2.ExportRegistrationRequest + */ +class ExportRegistrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` to export, + * in the format `projects/*/locations/*/registrations/*`. + * + * 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 name of the `Registration` to export, + * in the format `projects/*/locations/*/registrations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` to export, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated 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 `Registration` to export, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/GetRegistrationRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/GetRegistrationRequest.php new file mode 100644 index 000000000000..793e3a1ab317 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/GetRegistrationRequest.php @@ -0,0 +1,71 @@ +google.cloud.domains.v1alpha2.GetRegistrationRequest + */ +class GetRegistrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` to get, in the format + * `projects/*/locations/*/registrations/*`. + * + * 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 name of the `Registration` to get, in the format + * `projects/*/locations/*/registrations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` to get, in the format + * `projects/*/locations/*/registrations/*`. + * + * Generated 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 `Registration` to get, in the format + * `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsRequest.php new file mode 100644 index 000000000000..899e43a4a253 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsRequest.php @@ -0,0 +1,225 @@ +google.cloud.domains.v1alpha2.ListRegistrationsRequest + */ +class ListRegistrationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which to list `Registration`s, 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 results to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * When set to the `next_page_token` from a prior response, provides the next + * page of results. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter expression to restrict the `Registration`s returned. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, a boolean, or an enum value. The comparison operator should be one + * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. + * For example, to filter to a specific domain name, use an expression like + * `domainName="example.com"`. You can also check for the existence of a + * field; for example, to find domains using custom DNS settings, use an + * expression like `dnsSettings.customDns:*`. + * You can also create compound filters by combining expressions with the + * `AND` and `OR` operators. For example, to find domains that are suspended + * or have specific issues flagged, use an expression like + * `(state=SUSPENDED) OR (issue:*)`. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which to list `Registration`s, specified in + * the format `projects/*/locations/*`. + * @type int $page_size + * Maximum number of results to return. + * @type string $page_token + * When set to the `next_page_token` from a prior response, provides the next + * page of results. + * @type string $filter + * Filter expression to restrict the `Registration`s returned. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, a boolean, or an enum value. The comparison operator should be one + * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. + * For example, to filter to a specific domain name, use an expression like + * `domainName="example.com"`. You can also check for the existence of a + * field; for example, to find domains using custom DNS settings, use an + * expression like `dnsSettings.customDns:*`. + * You can also create compound filters by combining expressions with the + * `AND` and `OR` operators. For example, to find domains that are suspended + * or have specific issues flagged, use an expression like + * `(state=SUSPENDED) OR (issue:*)`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which to list `Registration`s, 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 to list `Registration`s, 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 results to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * 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; + } + + /** + * When set to the `next_page_token` from a prior response, provides the next + * page of results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * When set to the `next_page_token` from a prior response, provides the next + * page 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; + } + + /** + * Filter expression to restrict the `Registration`s returned. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, a boolean, or an enum value. The comparison operator should be one + * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. + * For example, to filter to a specific domain name, use an expression like + * `domainName="example.com"`. You can also check for the existence of a + * field; for example, to find domains using custom DNS settings, use an + * expression like `dnsSettings.customDns:*`. + * You can also create compound filters by combining expressions with the + * `AND` and `OR` operators. For example, to find domains that are suspended + * or have specific issues flagged, use an expression like + * `(state=SUSPENDED) OR (issue:*)`. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter expression to restrict the `Registration`s returned. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, a boolean, or an enum value. The comparison operator should be one + * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. + * For example, to filter to a specific domain name, use an expression like + * `domainName="example.com"`. You can also check for the existence of a + * field; for example, to find domains using custom DNS settings, use an + * expression like `dnsSettings.customDns:*`. + * You can also create compound filters by combining expressions with the + * `AND` and `OR` operators. For example, to find domains that are suspended + * or have specific issues flagged, use an expression like + * `(state=SUSPENDED) OR (issue:*)`. + * + * 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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsResponse.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsResponse.php new file mode 100644 index 000000000000..44864a869126 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsResponse.php @@ -0,0 +1,105 @@ +google.cloud.domains.v1alpha2.ListRegistrationsResponse + */ +class ListRegistrationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of `Registration`s. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.Registration registrations = 1; + */ + private $registrations; + /** + * When present, there are more results to retrieve. Set `page_token` to this + * value on a subsequent call 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\Domains\V1alpha2\Registration>|\Google\Protobuf\Internal\RepeatedField $registrations + * A list of `Registration`s. + * @type string $next_page_token + * When present, there are more results to retrieve. Set `page_token` to this + * value on a subsequent call to get the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * A list of `Registration`s. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.Registration registrations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRegistrations() + { + return $this->registrations; + } + + /** + * A list of `Registration`s. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.Registration registrations = 1; + * @param array<\Google\Cloud\Domains\V1alpha2\Registration>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRegistrations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1alpha2\Registration::class); + $this->registrations = $arr; + + return $this; + } + + /** + * When present, there are more results to retrieve. Set `page_token` to this + * value on a subsequent call 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; + } + + /** + * When present, there are more results to retrieve. Set `page_token` to this + * value on a subsequent call 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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings.php new file mode 100644 index 000000000000..e66af21800b7 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings.php @@ -0,0 +1,101 @@ +google.cloud.domains.v1alpha2.ManagementSettings + */ +class ManagementSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The renewal method for this `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings.RenewalMethod renewal_method = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $renewal_method = 0; + /** + * Controls whether the domain can be transferred to another registrar. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferLockState transfer_lock_state = 4; + */ + protected $transfer_lock_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $renewal_method + * Output only. The renewal method for this `Registration`. + * @type int $transfer_lock_state + * Controls whether the domain can be transferred to another registrar. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The renewal method for this `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings.RenewalMethod renewal_method = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRenewalMethod() + { + return $this->renewal_method; + } + + /** + * Output only. The renewal method for this `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings.RenewalMethod renewal_method = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRenewalMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\ManagementSettings\RenewalMethod::class); + $this->renewal_method = $var; + + return $this; + } + + /** + * Controls whether the domain can be transferred to another registrar. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferLockState transfer_lock_state = 4; + * @return int + */ + public function getTransferLockState() + { + return $this->transfer_lock_state; + } + + /** + * Controls whether the domain can be transferred to another registrar. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferLockState transfer_lock_state = 4; + * @param int $var + * @return $this + */ + public function setTransferLockState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\TransferLockState::class); + $this->transfer_lock_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings/RenewalMethod.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings/RenewalMethod.php new file mode 100644 index 000000000000..d6a71724a36b --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings/RenewalMethod.php @@ -0,0 +1,70 @@ +google.cloud.domains.v1alpha2.ManagementSettings.RenewalMethod + */ +class RenewalMethod +{ + /** + * The renewal method is undefined. + * + * Generated from protobuf enum RENEWAL_METHOD_UNSPECIFIED = 0; + */ + const RENEWAL_METHOD_UNSPECIFIED = 0; + /** + * The domain is automatically renewed each year . + * To disable automatic renewals, delete the resource by calling + * `DeleteRegistration` or export it by calling `ExportRegistration`. + * + * Generated from protobuf enum AUTOMATIC_RENEWAL = 1; + */ + const AUTOMATIC_RENEWAL = 1; + /** + * The domain must be explicitly renewed each year before its + * `expire_time`. This option is only available when the `Registration` + * is in state `EXPORTED`. + * To manage the domain's current billing and + * renewal settings, go to [Google Domains](https://domains.google/). + * + * Generated from protobuf enum MANUAL_RENEWAL = 2; + */ + const MANUAL_RENEWAL = 2; + + private static $valueToName = [ + self::RENEWAL_METHOD_UNSPECIFIED => 'RENEWAL_METHOD_UNSPECIFIED', + self::AUTOMATIC_RENEWAL => 'AUTOMATIC_RENEWAL', + self::MANUAL_RENEWAL => 'MANUAL_RENEWAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RenewalMethod::class, \Google\Cloud\Domains\V1alpha2\ManagementSettings_RenewalMethod::class); + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings_RenewalMethod.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings_RenewalMethod.php new file mode 100644 index 000000000000..267801c6deec --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings_RenewalMethod.php @@ -0,0 +1,16 @@ +google.cloud.domains.v1alpha2.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_detail = 5; + */ + protected $status_detail = ''; + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 6; + */ + 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 + * Server-defined resource path for the target of the operation. + * @type string $verb + * Name of the verb executed by the operation. + * @type string $status_detail + * Human-readable status of the operation, if any. + * @type string $api_version + * API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::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_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; + } + + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 6; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 6; + * @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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterDomainRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterDomainRequest.php new file mode 100644 index 000000000000..6d9d6ec676fc --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterDomainRequest.php @@ -0,0 +1,289 @@ +google.cloud.domains.v1alpha2.RegisterDomainRequest + */ +class RegisterDomainRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the `Registration`. 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. The complete `Registration` resource to be created. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $registration = null; + /** + * The list of domain notices that you acknowledge. Call + * `RetrieveRegisterParameters` to see the notices that need acknowledgement. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DomainNotice domain_notices = 3; + */ + private $domain_notices; + /** + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 4; + */ + private $contact_notices; + /** + * Required. Yearly price to register or renew the domain. + * The value that should be put here can be obtained from + * RetrieveRegisterParameters or SearchDomains calls. + * + * Generated from protobuf field .google.type.Money yearly_price = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $yearly_price = null; + /** + * When true, only validation is performed, without actually registering + * the domain. Follows: + * https://cloud.google.com/apis/design/design_patterns#request_validation + * + * Generated from protobuf field bool validate_only = 6; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the `Registration`. Must be in the + * format `projects/*/locations/*`. + * @type \Google\Cloud\Domains\V1alpha2\Registration $registration + * Required. The complete `Registration` resource to be created. + * @type array|\Google\Protobuf\Internal\RepeatedField $domain_notices + * The list of domain notices that you acknowledge. Call + * `RetrieveRegisterParameters` to see the notices that need acknowledgement. + * @type array|\Google\Protobuf\Internal\RepeatedField $contact_notices + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * @type \Google\Type\Money $yearly_price + * Required. Yearly price to register or renew the domain. + * The value that should be put here can be obtained from + * RetrieveRegisterParameters or SearchDomains calls. + * @type bool $validate_only + * When true, only validation is performed, without actually registering + * the domain. Follows: + * https://cloud.google.com/apis/design/design_patterns#request_validation + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the `Registration`. 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 `Registration`. 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. The complete `Registration` resource to be created. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Domains\V1alpha2\Registration|null + */ + public function getRegistration() + { + return $this->registration; + } + + public function hasRegistration() + { + return isset($this->registration); + } + + public function clearRegistration() + { + unset($this->registration); + } + + /** + * Required. The complete `Registration` resource to be created. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Domains\V1alpha2\Registration $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\Registration::class); + $this->registration = $var; + + return $this; + } + + /** + * The list of domain notices that you acknowledge. Call + * `RetrieveRegisterParameters` to see the notices that need acknowledgement. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DomainNotice domain_notices = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDomainNotices() + { + return $this->domain_notices; + } + + /** + * The list of domain notices that you acknowledge. Call + * `RetrieveRegisterParameters` to see the notices that need acknowledgement. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DomainNotice domain_notices = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDomainNotices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\DomainNotice::class); + $this->domain_notices = $arr; + + return $this; + } + + /** + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContactNotices() + { + return $this->contact_notices; + } + + /** + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContactNotices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\ContactNotice::class); + $this->contact_notices = $arr; + + return $this; + } + + /** + * Required. Yearly price to register or renew the domain. + * The value that should be put here can be obtained from + * RetrieveRegisterParameters or SearchDomains calls. + * + * Generated from protobuf field .google.type.Money yearly_price = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\Money|null + */ + public function getYearlyPrice() + { + return $this->yearly_price; + } + + public function hasYearlyPrice() + { + return isset($this->yearly_price); + } + + public function clearYearlyPrice() + { + unset($this->yearly_price); + } + + /** + * Required. Yearly price to register or renew the domain. + * The value that should be put here can be obtained from + * RetrieveRegisterParameters or SearchDomains calls. + * + * Generated from protobuf field .google.type.Money yearly_price = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\Money $var + * @return $this + */ + public function setYearlyPrice($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->yearly_price = $var; + + return $this; + } + + /** + * When true, only validation is performed, without actually registering + * the domain. Follows: + * https://cloud.google.com/apis/design/design_patterns#request_validation + * + * Generated from protobuf field bool validate_only = 6; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * When true, only validation is performed, without actually registering + * the domain. Follows: + * https://cloud.google.com/apis/design/design_patterns#request_validation + * + * Generated from protobuf field bool validate_only = 6; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters.php new file mode 100644 index 000000000000..4914dbebd423 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters.php @@ -0,0 +1,221 @@ +google.cloud.domains.v1alpha2.RegisterParameters + */ +class RegisterParameters extends \Google\Protobuf\Internal\Message +{ + /** + * The domain name. Unicode domain names are expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1; + */ + protected $domain_name = ''; + /** + * Indicates whether the domain is available for registration. This value is + * accurate when obtained by calling `RetrieveRegisterParameters`, but is + * approximate when obtained by calling `SearchDomains`. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.RegisterParameters.Availability availability = 2; + */ + protected $availability = 0; + /** + * Contact privacy options that the domain supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 3; + */ + private $supported_privacy; + /** + * Notices about special properties of the domain. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DomainNotice domain_notices = 4; + */ + private $domain_notices; + /** + * Price to register or renew the domain for one year. + * + * Generated from protobuf field .google.type.Money yearly_price = 5; + */ + protected $yearly_price = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $domain_name + * The domain name. Unicode domain names are expressed in Punycode format. + * @type int $availability + * Indicates whether the domain is available for registration. This value is + * accurate when obtained by calling `RetrieveRegisterParameters`, but is + * approximate when obtained by calling `SearchDomains`. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_privacy + * Contact privacy options that the domain supports. + * @type array|\Google\Protobuf\Internal\RepeatedField $domain_notices + * Notices about special properties of the domain. + * @type \Google\Type\Money $yearly_price + * Price to register or renew the domain for one year. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * The domain name. Unicode domain names are expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1; + * @return string + */ + public function getDomainName() + { + return $this->domain_name; + } + + /** + * The domain name. Unicode domain names are expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1; + * @param string $var + * @return $this + */ + public function setDomainName($var) + { + GPBUtil::checkString($var, True); + $this->domain_name = $var; + + return $this; + } + + /** + * Indicates whether the domain is available for registration. This value is + * accurate when obtained by calling `RetrieveRegisterParameters`, but is + * approximate when obtained by calling `SearchDomains`. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.RegisterParameters.Availability availability = 2; + * @return int + */ + public function getAvailability() + { + return $this->availability; + } + + /** + * Indicates whether the domain is available for registration. This value is + * accurate when obtained by calling `RetrieveRegisterParameters`, but is + * approximate when obtained by calling `SearchDomains`. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.RegisterParameters.Availability availability = 2; + * @param int $var + * @return $this + */ + public function setAvailability($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\RegisterParameters\Availability::class); + $this->availability = $var; + + return $this; + } + + /** + * Contact privacy options that the domain supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedPrivacy() + { + return $this->supported_privacy; + } + + /** + * Contact privacy options that the domain supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedPrivacy($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\ContactPrivacy::class); + $this->supported_privacy = $arr; + + return $this; + } + + /** + * Notices about special properties of the domain. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DomainNotice domain_notices = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDomainNotices() + { + return $this->domain_notices; + } + + /** + * Notices about special properties of the domain. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DomainNotice domain_notices = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDomainNotices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\DomainNotice::class); + $this->domain_notices = $arr; + + return $this; + } + + /** + * Price to register or renew the domain for one year. + * + * Generated from protobuf field .google.type.Money yearly_price = 5; + * @return \Google\Type\Money|null + */ + public function getYearlyPrice() + { + return $this->yearly_price; + } + + public function hasYearlyPrice() + { + return isset($this->yearly_price); + } + + public function clearYearlyPrice() + { + unset($this->yearly_price); + } + + /** + * Price to register or renew the domain for one year. + * + * Generated from protobuf field .google.type.Money yearly_price = 5; + * @param \Google\Type\Money $var + * @return $this + */ + public function setYearlyPrice($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->yearly_price = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters/Availability.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters/Availability.php new file mode 100644 index 000000000000..75cebb5a5131 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters/Availability.php @@ -0,0 +1,81 @@ +google.cloud.domains.v1alpha2.RegisterParameters.Availability + */ +class Availability +{ + /** + * The availability is unspecified. + * + * Generated from protobuf enum AVAILABILITY_UNSPECIFIED = 0; + */ + const AVAILABILITY_UNSPECIFIED = 0; + /** + * The domain is available for registration. + * + * Generated from protobuf enum AVAILABLE = 1; + */ + const AVAILABLE = 1; + /** + * The domain is not available for registration. Generally this means it is + * already registered to another party. + * + * Generated from protobuf enum UNAVAILABLE = 2; + */ + const UNAVAILABLE = 2; + /** + * The domain is not currently supported by Cloud Domains, but may + * be available elsewhere. + * + * Generated from protobuf enum UNSUPPORTED = 3; + */ + const UNSUPPORTED = 3; + /** + * Cloud Domains is unable to determine domain availability, generally + * due to system maintenance at the domain name registry. + * + * Generated from protobuf enum UNKNOWN = 4; + */ + const UNKNOWN = 4; + + private static $valueToName = [ + self::AVAILABILITY_UNSPECIFIED => 'AVAILABILITY_UNSPECIFIED', + self::AVAILABLE => 'AVAILABLE', + self::UNAVAILABLE => 'UNAVAILABLE', + self::UNSUPPORTED => 'UNSUPPORTED', + self::UNKNOWN => 'UNKNOWN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Availability::class, \Google\Cloud\Domains\V1alpha2\RegisterParameters_Availability::class); + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters_Availability.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters_Availability.php new file mode 100644 index 000000000000..ff936a73c696 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters_Availability.php @@ -0,0 +1,16 @@ +google.cloud.domains.v1alpha2.Registration + */ +class Registration extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of the `Registration` resource, in the format + * `projects/*/locations/*/registrations/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $domain_name = ''; + /** + * Output only. The creation timestamp of the `Registration` resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The expiration timestamp of the `Registration`. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. The state of the `Registration` + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The set of issues with the `Registration` that require attention. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.Registration.Issue issues = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $issues; + /** + * Set of labels associated with the `Registration`. + * + * Generated from protobuf field map labels = 9; + */ + private $labels; + /** + * Settings for management of the `Registration`, including renewal, billing, + * and transfer. You cannot update these with the `UpdateRegistration` + * method. To update these settings, use the `ConfigureManagementSettings` + * method. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings management_settings = 10; + */ + protected $management_settings = null; + /** + * Settings controlling the DNS configuration of the `Registration`. You + * cannot update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureDnsSettings` method. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings dns_settings = 11; + */ + protected $dns_settings = null; + /** + * Required. Settings for contact information linked to the `Registration`. You cannot + * update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureContactSettings` method. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings contact_settings = 12 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $contact_settings = null; + /** + * Output only. Pending contact settings for the `Registration`. Updates to the + * `contact_settings` field that change its `registrant_contact` or `privacy` + * fields require email confirmation by the `registrant_contact` + * before taking effect. This field is set only if there are pending updates + * to the `contact_settings` that have not been confirmed. To confirm the + * changes, the `registrant_contact` must follow the instructions in the + * email they receive. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings pending_contact_settings = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pending_contact_settings = null; + /** + * Output only. Set of options for the `contact_settings.privacy` field that this + * `Registration` supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $supported_privacy; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Name of the `Registration` resource, in the format + * `projects/*/locations/*/registrations/`. + * @type string $domain_name + * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation timestamp of the `Registration` resource. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. The expiration timestamp of the `Registration`. + * @type int $state + * Output only. The state of the `Registration` + * @type array|\Google\Protobuf\Internal\RepeatedField $issues + * Output only. The set of issues with the `Registration` that require attention. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Set of labels associated with the `Registration`. + * @type \Google\Cloud\Domains\V1alpha2\ManagementSettings $management_settings + * Settings for management of the `Registration`, including renewal, billing, + * and transfer. You cannot update these with the `UpdateRegistration` + * method. To update these settings, use the `ConfigureManagementSettings` + * method. + * @type \Google\Cloud\Domains\V1alpha2\DnsSettings $dns_settings + * Settings controlling the DNS configuration of the `Registration`. You + * cannot update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureDnsSettings` method. + * @type \Google\Cloud\Domains\V1alpha2\ContactSettings $contact_settings + * Required. Settings for contact information linked to the `Registration`. You cannot + * update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureContactSettings` method. + * @type \Google\Cloud\Domains\V1alpha2\ContactSettings $pending_contact_settings + * Output only. Pending contact settings for the `Registration`. Updates to the + * `contact_settings` field that change its `registrant_contact` or `privacy` + * fields require email confirmation by the `registrant_contact` + * before taking effect. This field is set only if there are pending updates + * to the `contact_settings` that have not been confirmed. To confirm the + * changes, the `registrant_contact` must follow the instructions in the + * email they receive. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_privacy + * Output only. Set of options for the `contact_settings.privacy` field that this + * `Registration` supports. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of the `Registration` resource, in the format + * `projects/*/locations/*/registrations/`. + * + * 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 `Registration` resource, in the format + * `projects/*/locations/*/registrations/`. + * + * 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; + } + + /** + * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getDomainName() + { + return $this->domain_name; + } + + /** + * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setDomainName($var) + { + GPBUtil::checkString($var, True); + $this->domain_name = $var; + + return $this; + } + + /** + * Output only. The creation timestamp of the `Registration` resource. + * + * 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 creation timestamp of the `Registration` resource. + * + * 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 expiration timestamp of the `Registration`. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.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. The expiration timestamp of the `Registration`. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.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; + } + + /** + * Output only. The state of the `Registration` + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the `Registration` + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\Registration\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The set of issues with the `Registration` that require attention. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.Registration.Issue issues = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIssues() + { + return $this->issues; + } + + /** + * Output only. The set of issues with the `Registration` that require attention. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.Registration.Issue issues = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIssues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\Registration\Issue::class); + $this->issues = $arr; + + return $this; + } + + /** + * Set of labels associated with the `Registration`. + * + * Generated from protobuf field map labels = 9; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Set of labels associated with the `Registration`. + * + * 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; + } + + /** + * Settings for management of the `Registration`, including renewal, billing, + * and transfer. You cannot update these with the `UpdateRegistration` + * method. To update these settings, use the `ConfigureManagementSettings` + * method. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings management_settings = 10; + * @return \Google\Cloud\Domains\V1alpha2\ManagementSettings|null + */ + public function getManagementSettings() + { + return $this->management_settings; + } + + public function hasManagementSettings() + { + return isset($this->management_settings); + } + + public function clearManagementSettings() + { + unset($this->management_settings); + } + + /** + * Settings for management of the `Registration`, including renewal, billing, + * and transfer. You cannot update these with the `UpdateRegistration` + * method. To update these settings, use the `ConfigureManagementSettings` + * method. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings management_settings = 10; + * @param \Google\Cloud\Domains\V1alpha2\ManagementSettings $var + * @return $this + */ + public function setManagementSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ManagementSettings::class); + $this->management_settings = $var; + + return $this; + } + + /** + * Settings controlling the DNS configuration of the `Registration`. You + * cannot update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureDnsSettings` method. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings dns_settings = 11; + * @return \Google\Cloud\Domains\V1alpha2\DnsSettings|null + */ + public function getDnsSettings() + { + return $this->dns_settings; + } + + public function hasDnsSettings() + { + return isset($this->dns_settings); + } + + public function clearDnsSettings() + { + unset($this->dns_settings); + } + + /** + * Settings controlling the DNS configuration of the `Registration`. You + * cannot update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureDnsSettings` method. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings dns_settings = 11; + * @param \Google\Cloud\Domains\V1alpha2\DnsSettings $var + * @return $this + */ + public function setDnsSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\DnsSettings::class); + $this->dns_settings = $var; + + return $this; + } + + /** + * Required. Settings for contact information linked to the `Registration`. You cannot + * update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureContactSettings` method. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings contact_settings = 12 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Domains\V1alpha2\ContactSettings|null + */ + public function getContactSettings() + { + return $this->contact_settings; + } + + public function hasContactSettings() + { + return isset($this->contact_settings); + } + + public function clearContactSettings() + { + unset($this->contact_settings); + } + + /** + * Required. Settings for contact information linked to the `Registration`. You cannot + * update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureContactSettings` method. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings contact_settings = 12 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Domains\V1alpha2\ContactSettings $var + * @return $this + */ + public function setContactSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ContactSettings::class); + $this->contact_settings = $var; + + return $this; + } + + /** + * Output only. Pending contact settings for the `Registration`. Updates to the + * `contact_settings` field that change its `registrant_contact` or `privacy` + * fields require email confirmation by the `registrant_contact` + * before taking effect. This field is set only if there are pending updates + * to the `contact_settings` that have not been confirmed. To confirm the + * changes, the `registrant_contact` must follow the instructions in the + * email they receive. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings pending_contact_settings = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Domains\V1alpha2\ContactSettings|null + */ + public function getPendingContactSettings() + { + return $this->pending_contact_settings; + } + + public function hasPendingContactSettings() + { + return isset($this->pending_contact_settings); + } + + public function clearPendingContactSettings() + { + unset($this->pending_contact_settings); + } + + /** + * Output only. Pending contact settings for the `Registration`. Updates to the + * `contact_settings` field that change its `registrant_contact` or `privacy` + * fields require email confirmation by the `registrant_contact` + * before taking effect. This field is set only if there are pending updates + * to the `contact_settings` that have not been confirmed. To confirm the + * changes, the `registrant_contact` must follow the instructions in the + * email they receive. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings pending_contact_settings = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Domains\V1alpha2\ContactSettings $var + * @return $this + */ + public function setPendingContactSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ContactSettings::class); + $this->pending_contact_settings = $var; + + return $this; + } + + /** + * Output only. Set of options for the `contact_settings.privacy` field that this + * `Registration` supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedPrivacy() + { + return $this->supported_privacy; + } + + /** + * Output only. Set of options for the `contact_settings.privacy` field that this + * `Registration` supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedPrivacy($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\ContactPrivacy::class); + $this->supported_privacy = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/Issue.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/Issue.php new file mode 100644 index 000000000000..98ac3f378de6 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/Issue.php @@ -0,0 +1,71 @@ +google.cloud.domains.v1alpha2.Registration.Issue + */ +class Issue +{ + /** + * The issue is undefined. + * + * Generated from protobuf enum ISSUE_UNSPECIFIED = 0; + */ + const ISSUE_UNSPECIFIED = 0; + /** + * Contact the Cloud Support team to resolve a problem with this domain. + * + * Generated from protobuf enum CONTACT_SUPPORT = 1; + */ + const CONTACT_SUPPORT = 1; + /** + * [ICANN](https://icann.org/) requires verification of the email address + * in the `Registration`'s `contact_settings.registrant_contact` field. To + * verify the email address, follow the + * instructions in the email the `registrant_contact` receives following + * registration. If you do not complete email verification within + * 15 days of registration, the domain is suspended. To resend the + * verification email, call ConfigureContactSettings and provide the current + * `registrant_contact.email`. + * + * Generated from protobuf enum UNVERIFIED_EMAIL = 2; + */ + const UNVERIFIED_EMAIL = 2; + + private static $valueToName = [ + self::ISSUE_UNSPECIFIED => 'ISSUE_UNSPECIFIED', + self::CONTACT_SUPPORT => 'CONTACT_SUPPORT', + self::UNVERIFIED_EMAIL => 'UNVERIFIED_EMAIL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Issue::class, \Google\Cloud\Domains\V1alpha2\Registration_Issue::class); + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/State.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/State.php new file mode 100644 index 000000000000..93589982f064 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/State.php @@ -0,0 +1,108 @@ +google.cloud.domains.v1alpha2.Registration.State + */ +class State +{ + /** + * The state is undefined. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The domain is being registered. + * + * Generated from protobuf enum REGISTRATION_PENDING = 1; + */ + const REGISTRATION_PENDING = 1; + /** + * The domain registration failed. You can delete resources in this state + * to allow registration to be retried. + * + * Generated from protobuf enum REGISTRATION_FAILED = 2; + */ + const REGISTRATION_FAILED = 2; + /** + * The domain is being transferred from another registrar to Cloud Domains. + * + * Generated from protobuf enum TRANSFER_PENDING = 3; + */ + const TRANSFER_PENDING = 3; + /** + * The attempt to transfer the domain from another registrar to + * Cloud Domains failed. You can delete resources in this state and retry + * the transfer. + * + * Generated from protobuf enum TRANSFER_FAILED = 4; + */ + const TRANSFER_FAILED = 4; + /** + * The domain is registered and operational. The domain renews automatically + * as long as it remains in this state. + * + * Generated from protobuf enum ACTIVE = 6; + */ + const ACTIVE = 6; + /** + * The domain is suspended and inoperative. For more details, see the + * `issues` field. + * + * Generated from protobuf enum SUSPENDED = 7; + */ + const SUSPENDED = 7; + /** + * The domain is no longer managed with Cloud Domains. It may have been + * transferred to another registrar or exported for management in + * [Google Domains](https://domains.google/). You can no longer update it + * with this API, and information shown about it may be stale. Domains in + * this state are not automatically renewed by Cloud Domains. + * + * Generated from protobuf enum EXPORTED = 8; + */ + const EXPORTED = 8; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::REGISTRATION_PENDING => 'REGISTRATION_PENDING', + self::REGISTRATION_FAILED => 'REGISTRATION_FAILED', + self::TRANSFER_PENDING => 'TRANSFER_PENDING', + self::TRANSFER_FAILED => 'TRANSFER_FAILED', + self::ACTIVE => 'ACTIVE', + self::SUSPENDED => 'SUSPENDED', + self::EXPORTED => 'EXPORTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Domains\V1alpha2\Registration_State::class); + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration_Issue.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration_Issue.php new file mode 100644 index 000000000000..7d1b709a2ee1 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration_Issue.php @@ -0,0 +1,16 @@ +google.cloud.domains.v1alpha2.ResetAuthorizationCodeRequest + */ +class ResetAuthorizationCodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` whose authorization code is being reset, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $registration = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $registration + * Required. The name of the `Registration` whose authorization code is being reset, + * in the format `projects/*/locations/*/registrations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` whose authorization code is being reset, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRegistration() + { + return $this->registration; + } + + /** + * Required. The name of the `Registration` whose authorization code is being reset, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkString($var, True); + $this->registration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveAuthorizationCodeRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveAuthorizationCodeRequest.php new file mode 100644 index 000000000000..80758d4364a6 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveAuthorizationCodeRequest.php @@ -0,0 +1,71 @@ +google.cloud.domains.v1alpha2.RetrieveAuthorizationCodeRequest + */ +class RetrieveAuthorizationCodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` whose authorization code is being retrieved, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $registration = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $registration + * Required. The name of the `Registration` whose authorization code is being retrieved, + * in the format `projects/*/locations/*/registrations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` whose authorization code is being retrieved, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRegistration() + { + return $this->registration; + } + + /** + * Required. The name of the `Registration` whose authorization code is being retrieved, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkString($var, True); + $this->registration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersRequest.php new file mode 100644 index 000000000000..d41b31cbf124 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersRequest.php @@ -0,0 +1,101 @@ +google.cloud.domains.v1alpha2.RetrieveRegisterParametersRequest + */ +class RetrieveRegisterParametersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $domain_name = ''; + /** + * Required. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $domain_name + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * @type string $location + * Required. The location. Must be in the format `projects/*/locations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDomainName() + { + return $this->domain_name; + } + + /** + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1 [(.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. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Required. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersResponse.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersResponse.php new file mode 100644 index 000000000000..d7e6d18a0c46 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersResponse.php @@ -0,0 +1,77 @@ +google.cloud.domains.v1alpha2.RetrieveRegisterParametersResponse + */ +class RetrieveRegisterParametersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Parameters to use when calling the `RegisterDomain` method. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.RegisterParameters register_parameters = 1; + */ + protected $register_parameters = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Domains\V1alpha2\RegisterParameters $register_parameters + * Parameters to use when calling the `RegisterDomain` method. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Parameters to use when calling the `RegisterDomain` method. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.RegisterParameters register_parameters = 1; + * @return \Google\Cloud\Domains\V1alpha2\RegisterParameters|null + */ + public function getRegisterParameters() + { + return $this->register_parameters; + } + + public function hasRegisterParameters() + { + return isset($this->register_parameters); + } + + public function clearRegisterParameters() + { + unset($this->register_parameters); + } + + /** + * Parameters to use when calling the `RegisterDomain` method. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.RegisterParameters register_parameters = 1; + * @param \Google\Cloud\Domains\V1alpha2\RegisterParameters $var + * @return $this + */ + public function setRegisterParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\RegisterParameters::class); + $this->register_parameters = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersRequest.php new file mode 100644 index 000000000000..7be00fd2c465 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersRequest.php @@ -0,0 +1,101 @@ +google.cloud.domains.v1alpha2.RetrieveTransferParametersRequest + */ +class RetrieveTransferParametersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $domain_name = ''; + /** + * Required. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $domain_name + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * @type string $location + * Required. The location. Must be in the format `projects/*/locations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDomainName() + { + return $this->domain_name; + } + + /** + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1 [(.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. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Required. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersResponse.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersResponse.php new file mode 100644 index 000000000000..daa94d3fe315 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersResponse.php @@ -0,0 +1,77 @@ +google.cloud.domains.v1alpha2.RetrieveTransferParametersResponse + */ +class RetrieveTransferParametersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Parameters to use when calling the `TransferDomain` method. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferParameters transfer_parameters = 1; + */ + protected $transfer_parameters = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Domains\V1alpha2\TransferParameters $transfer_parameters + * Parameters to use when calling the `TransferDomain` method. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Parameters to use when calling the `TransferDomain` method. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferParameters transfer_parameters = 1; + * @return \Google\Cloud\Domains\V1alpha2\TransferParameters|null + */ + public function getTransferParameters() + { + return $this->transfer_parameters; + } + + public function hasTransferParameters() + { + return isset($this->transfer_parameters); + } + + public function clearTransferParameters() + { + unset($this->transfer_parameters); + } + + /** + * Parameters to use when calling the `TransferDomain` method. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferParameters transfer_parameters = 1; + * @param \Google\Cloud\Domains\V1alpha2\TransferParameters $var + * @return $this + */ + public function setTransferParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\TransferParameters::class); + $this->transfer_parameters = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsRequest.php new file mode 100644 index 000000000000..9ea67c0cc8e1 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsRequest.php @@ -0,0 +1,101 @@ +google.cloud.domains.v1alpha2.SearchDomainsRequest + */ +class SearchDomainsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. String used to search for available domain names. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * Required. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query + * Required. String used to search for available domain names. + * @type string $location + * Required. The location. Must be in the format `projects/*/locations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. String used to search for available domain names. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. String used to search for available domain names. + * + * 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; + } + + /** + * Required. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Required. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsResponse.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsResponse.php new file mode 100644 index 000000000000..0e15e16ab2c8 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsResponse.php @@ -0,0 +1,67 @@ +google.cloud.domains.v1alpha2.SearchDomainsResponse + */ +class SearchDomainsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Results of the domain name search. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.RegisterParameters register_parameters = 1; + */ + private $register_parameters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Domains\V1alpha2\RegisterParameters>|\Google\Protobuf\Internal\RepeatedField $register_parameters + * Results of the domain name search. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Results of the domain name search. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.RegisterParameters register_parameters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRegisterParameters() + { + return $this->register_parameters; + } + + /** + * Results of the domain name search. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.RegisterParameters register_parameters = 1; + * @param array<\Google\Cloud\Domains\V1alpha2\RegisterParameters>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRegisterParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1alpha2\RegisterParameters::class); + $this->register_parameters = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferDomainRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferDomainRequest.php new file mode 100644 index 000000000000..eee617feba40 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferDomainRequest.php @@ -0,0 +1,311 @@ +google.cloud.domains.v1alpha2.TransferDomainRequest + */ +class TransferDomainRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the `Registration`. 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. The complete `Registration` resource to be created. + * You can leave `registration.dns_settings` unset to import the + * domain's current DNS configuration from its current registrar. Use this + * option only if you are sure that the domain's current DNS service + * does not cease upon transfer, as is often the case for DNS services + * provided for free by the registrar. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $registration = null; + /** + * The list of contact notices that you acknowledge. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 3; + */ + private $contact_notices; + /** + * Required. Acknowledgement of the price to transfer or renew the domain for one year. + * Call `RetrieveTransferParameters` to obtain the price, which you must + * acknowledge. + * + * Generated from protobuf field .google.type.Money yearly_price = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $yearly_price = null; + /** + * The domain's transfer authorization code. You can obtain this from the + * domain's current registrar. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.AuthorizationCode authorization_code = 5; + */ + protected $authorization_code = null; + /** + * Validate the request without actually transferring the domain. + * + * Generated from protobuf field bool validate_only = 6; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the `Registration`. Must be in the + * format `projects/*/locations/*`. + * @type \Google\Cloud\Domains\V1alpha2\Registration $registration + * Required. The complete `Registration` resource to be created. + * You can leave `registration.dns_settings` unset to import the + * domain's current DNS configuration from its current registrar. Use this + * option only if you are sure that the domain's current DNS service + * does not cease upon transfer, as is often the case for DNS services + * provided for free by the registrar. + * @type array|\Google\Protobuf\Internal\RepeatedField $contact_notices + * The list of contact notices that you acknowledge. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * @type \Google\Type\Money $yearly_price + * Required. Acknowledgement of the price to transfer or renew the domain for one year. + * Call `RetrieveTransferParameters` to obtain the price, which you must + * acknowledge. + * @type \Google\Cloud\Domains\V1alpha2\AuthorizationCode $authorization_code + * The domain's transfer authorization code. You can obtain this from the + * domain's current registrar. + * @type bool $validate_only + * Validate the request without actually transferring the domain. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the `Registration`. 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 `Registration`. 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. The complete `Registration` resource to be created. + * You can leave `registration.dns_settings` unset to import the + * domain's current DNS configuration from its current registrar. Use this + * option only if you are sure that the domain's current DNS service + * does not cease upon transfer, as is often the case for DNS services + * provided for free by the registrar. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Domains\V1alpha2\Registration|null + */ + public function getRegistration() + { + return $this->registration; + } + + public function hasRegistration() + { + return isset($this->registration); + } + + public function clearRegistration() + { + unset($this->registration); + } + + /** + * Required. The complete `Registration` resource to be created. + * You can leave `registration.dns_settings` unset to import the + * domain's current DNS configuration from its current registrar. Use this + * option only if you are sure that the domain's current DNS service + * does not cease upon transfer, as is often the case for DNS services + * provided for free by the registrar. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Domains\V1alpha2\Registration $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\Registration::class); + $this->registration = $var; + + return $this; + } + + /** + * The list of contact notices that you acknowledge. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContactNotices() + { + return $this->contact_notices; + } + + /** + * The list of contact notices that you acknowledge. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContactNotices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\ContactNotice::class); + $this->contact_notices = $arr; + + return $this; + } + + /** + * Required. Acknowledgement of the price to transfer or renew the domain for one year. + * Call `RetrieveTransferParameters` to obtain the price, which you must + * acknowledge. + * + * Generated from protobuf field .google.type.Money yearly_price = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\Money|null + */ + public function getYearlyPrice() + { + return $this->yearly_price; + } + + public function hasYearlyPrice() + { + return isset($this->yearly_price); + } + + public function clearYearlyPrice() + { + unset($this->yearly_price); + } + + /** + * Required. Acknowledgement of the price to transfer or renew the domain for one year. + * Call `RetrieveTransferParameters` to obtain the price, which you must + * acknowledge. + * + * Generated from protobuf field .google.type.Money yearly_price = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\Money $var + * @return $this + */ + public function setYearlyPrice($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->yearly_price = $var; + + return $this; + } + + /** + * The domain's transfer authorization code. You can obtain this from the + * domain's current registrar. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.AuthorizationCode authorization_code = 5; + * @return \Google\Cloud\Domains\V1alpha2\AuthorizationCode|null + */ + public function getAuthorizationCode() + { + return $this->authorization_code; + } + + public function hasAuthorizationCode() + { + return isset($this->authorization_code); + } + + public function clearAuthorizationCode() + { + unset($this->authorization_code); + } + + /** + * The domain's transfer authorization code. You can obtain this from the + * domain's current registrar. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.AuthorizationCode authorization_code = 5; + * @param \Google\Cloud\Domains\V1alpha2\AuthorizationCode $var + * @return $this + */ + public function setAuthorizationCode($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\AuthorizationCode::class); + $this->authorization_code = $var; + + return $this; + } + + /** + * Validate the request without actually transferring the domain. + * + * Generated from protobuf field bool validate_only = 6; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Validate the request without actually transferring the domain. + * + * Generated from protobuf field bool validate_only = 6; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferLockState.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferLockState.php new file mode 100644 index 000000000000..1dcdc4f16a0d --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferLockState.php @@ -0,0 +1,61 @@ +google.cloud.domains.v1alpha2.TransferLockState + */ +class TransferLockState +{ + /** + * The state is unspecified. + * + * Generated from protobuf enum TRANSFER_LOCK_STATE_UNSPECIFIED = 0; + */ + const TRANSFER_LOCK_STATE_UNSPECIFIED = 0; + /** + * The domain is unlocked and can be transferred to another registrar. + * + * Generated from protobuf enum UNLOCKED = 1; + */ + const UNLOCKED = 1; + /** + * The domain is locked and cannot be transferred to another registrar. + * + * Generated from protobuf enum LOCKED = 2; + */ + const LOCKED = 2; + + private static $valueToName = [ + self::TRANSFER_LOCK_STATE_UNSPECIFIED => 'TRANSFER_LOCK_STATE_UNSPECIFIED', + self::UNLOCKED => 'UNLOCKED', + self::LOCKED => 'LOCKED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferParameters.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferParameters.php new file mode 100644 index 000000000000..8cb3b9431ef2 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferParameters.php @@ -0,0 +1,255 @@ +google.cloud.domains.v1alpha2.TransferParameters + */ +class TransferParameters extends \Google\Protobuf\Internal\Message +{ + /** + * The domain name. Unicode domain names are expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1; + */ + protected $domain_name = ''; + /** + * The registrar that currently manages the domain. + * + * Generated from protobuf field string current_registrar = 2; + */ + protected $current_registrar = ''; + /** + * The name servers that currently store the configuration of the domain. + * + * Generated from protobuf field repeated string name_servers = 3; + */ + private $name_servers; + /** + * Indicates whether the domain is protected by a transfer lock. For a + * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, + * go to its current registrar. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferLockState transfer_lock_state = 4; + */ + protected $transfer_lock_state = 0; + /** + * Contact privacy options that the domain supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 5; + */ + private $supported_privacy; + /** + * Price to transfer or renew the domain for one year. + * + * Generated from protobuf field .google.type.Money yearly_price = 6; + */ + protected $yearly_price = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $domain_name + * The domain name. Unicode domain names are expressed in Punycode format. + * @type string $current_registrar + * The registrar that currently manages the domain. + * @type array|\Google\Protobuf\Internal\RepeatedField $name_servers + * The name servers that currently store the configuration of the domain. + * @type int $transfer_lock_state + * Indicates whether the domain is protected by a transfer lock. For a + * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, + * go to its current registrar. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_privacy + * Contact privacy options that the domain supports. + * @type \Google\Type\Money $yearly_price + * Price to transfer or renew the domain for one year. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * The domain name. Unicode domain names are expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1; + * @return string + */ + public function getDomainName() + { + return $this->domain_name; + } + + /** + * The domain name. Unicode domain names are expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1; + * @param string $var + * @return $this + */ + public function setDomainName($var) + { + GPBUtil::checkString($var, True); + $this->domain_name = $var; + + return $this; + } + + /** + * The registrar that currently manages the domain. + * + * Generated from protobuf field string current_registrar = 2; + * @return string + */ + public function getCurrentRegistrar() + { + return $this->current_registrar; + } + + /** + * The registrar that currently manages the domain. + * + * Generated from protobuf field string current_registrar = 2; + * @param string $var + * @return $this + */ + public function setCurrentRegistrar($var) + { + GPBUtil::checkString($var, True); + $this->current_registrar = $var; + + return $this; + } + + /** + * The name servers that currently store the configuration of the domain. + * + * Generated from protobuf field repeated string name_servers = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNameServers() + { + return $this->name_servers; + } + + /** + * The name servers that currently store the configuration of the domain. + * + * Generated from protobuf field repeated string name_servers = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNameServers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->name_servers = $arr; + + return $this; + } + + /** + * Indicates whether the domain is protected by a transfer lock. For a + * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, + * go to its current registrar. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferLockState transfer_lock_state = 4; + * @return int + */ + public function getTransferLockState() + { + return $this->transfer_lock_state; + } + + /** + * Indicates whether the domain is protected by a transfer lock. For a + * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, + * go to its current registrar. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferLockState transfer_lock_state = 4; + * @param int $var + * @return $this + */ + public function setTransferLockState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\TransferLockState::class); + $this->transfer_lock_state = $var; + + return $this; + } + + /** + * Contact privacy options that the domain supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedPrivacy() + { + return $this->supported_privacy; + } + + /** + * Contact privacy options that the domain supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedPrivacy($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\ContactPrivacy::class); + $this->supported_privacy = $arr; + + return $this; + } + + /** + * Price to transfer or renew the domain for one year. + * + * Generated from protobuf field .google.type.Money yearly_price = 6; + * @return \Google\Type\Money|null + */ + public function getYearlyPrice() + { + return $this->yearly_price; + } + + public function hasYearlyPrice() + { + return isset($this->yearly_price); + } + + public function clearYearlyPrice() + { + unset($this->yearly_price); + } + + /** + * Price to transfer or renew the domain for one year. + * + * Generated from protobuf field .google.type.Money yearly_price = 6; + * @param \Google\Type\Money $var + * @return $this + */ + public function setYearlyPrice($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->yearly_price = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/UpdateRegistrationRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/UpdateRegistrationRequest.php new file mode 100644 index 000000000000..6d7be0e71f25 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/UpdateRegistrationRequest.php @@ -0,0 +1,129 @@ +google.cloud.domains.v1alpha2.UpdateRegistrationRequest + */ +class UpdateRegistrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Fields of the `Registration` to update. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 1; + */ + protected $registration = null; + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the labels are being updated, the `update_mask` is + * `"labels"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Domains\V1alpha2\Registration $registration + * Fields of the `Registration` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the labels are being updated, the `update_mask` is + * `"labels"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Fields of the `Registration` to update. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 1; + * @return \Google\Cloud\Domains\V1alpha2\Registration|null + */ + public function getRegistration() + { + return $this->registration; + } + + public function hasRegistration() + { + return isset($this->registration); + } + + public function clearRegistration() + { + unset($this->registration); + } + + /** + * Fields of the `Registration` to update. + * + * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 1; + * @param \Google\Cloud\Domains\V1alpha2\Registration $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\Registration::class); + $this->registration = $var; + + return $this; + } + + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the labels are being updated, the `update_mask` is + * `"labels"`. + * + * 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 field mask describing which fields to update as a comma-separated list. + * For example, if only the labels are being updated, the `update_mask` is + * `"labels"`. + * + * 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/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_contact_settings.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_contact_settings.php new file mode 100644 index 000000000000..07d16b703d45 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_contact_settings.php @@ -0,0 +1,88 @@ +configureContactSettings($formattedRegistration, $updateMask); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Registration $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRegistration = DomainsClient::registrationName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRATION]' + ); + + configure_contact_settings_sample($formattedRegistration); +} +// [END domains_v1alpha2_generated_Domains_ConfigureContactSettings_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_dns_settings.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_dns_settings.php new file mode 100644 index 000000000000..eb51a826d4a5 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_dns_settings.php @@ -0,0 +1,87 @@ +configureDnsSettings($formattedRegistration, $updateMask); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Registration $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRegistration = DomainsClient::registrationName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRATION]' + ); + + configure_dns_settings_sample($formattedRegistration); +} +// [END domains_v1alpha2_generated_Domains_ConfigureDnsSettings_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_management_settings.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_management_settings.php new file mode 100644 index 000000000000..3f4262d5ef62 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_management_settings.php @@ -0,0 +1,87 @@ +configureManagementSettings($formattedRegistration, $updateMask); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Registration $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRegistration = DomainsClient::registrationName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRATION]' + ); + + configure_management_settings_sample($formattedRegistration); +} +// [END domains_v1alpha2_generated_Domains_ConfigureManagementSettings_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/delete_registration.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/delete_registration.php new file mode 100644 index 000000000000..570959c75f59 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/delete_registration.php @@ -0,0 +1,94 @@ +deleteRegistration($formattedName); + $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 = DomainsClient::registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + + delete_registration_sample($formattedName); +} +// [END domains_v1alpha2_generated_Domains_DeleteRegistration_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/export_registration.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/export_registration.php new file mode 100644 index 000000000000..fa8cc638dc96 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/export_registration.php @@ -0,0 +1,87 @@ +exportRegistration($formattedName); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Registration $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DomainsClient::registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + + export_registration_sample($formattedName); +} +// [END domains_v1alpha2_generated_Domains_ExportRegistration_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/get_registration.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/get_registration.php new file mode 100644 index 000000000000..d22f33295be6 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/get_registration.php @@ -0,0 +1,67 @@ +getRegistration($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DomainsClient::registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + + get_registration_sample($formattedName); +} +// [END domains_v1alpha2_generated_Domains_GetRegistration_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/list_registrations.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/list_registrations.php new file mode 100644 index 000000000000..1fb8ee027719 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/list_registrations.php @@ -0,0 +1,72 @@ +listRegistrations($formattedParent); + + /** @var Registration $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 = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_registrations_sample($formattedParent); +} +// [END domains_v1alpha2_generated_Domains_ListRegistrations_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/register_domain.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/register_domain.php new file mode 100644 index 000000000000..5cb968695577 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/register_domain.php @@ -0,0 +1,160 @@ +setPostalAddress($registrationContactSettingsRegistrantContactPostalAddress) + ->setEmail($registrationContactSettingsRegistrantContactEmail) + ->setPhoneNumber($registrationContactSettingsRegistrantContactPhoneNumber); + $registrationContactSettingsAdminContactPostalAddress = new PostalAddress(); + $registrationContactSettingsAdminContact = (new Contact()) + ->setPostalAddress($registrationContactSettingsAdminContactPostalAddress) + ->setEmail($registrationContactSettingsAdminContactEmail) + ->setPhoneNumber($registrationContactSettingsAdminContactPhoneNumber); + $registrationContactSettingsTechnicalContactPostalAddress = new PostalAddress(); + $registrationContactSettingsTechnicalContact = (new Contact()) + ->setPostalAddress($registrationContactSettingsTechnicalContactPostalAddress) + ->setEmail($registrationContactSettingsTechnicalContactEmail) + ->setPhoneNumber($registrationContactSettingsTechnicalContactPhoneNumber); + $registrationContactSettings = (new ContactSettings()) + ->setPrivacy($registrationContactSettingsPrivacy) + ->setRegistrantContact($registrationContactSettingsRegistrantContact) + ->setAdminContact($registrationContactSettingsAdminContact) + ->setTechnicalContact($registrationContactSettingsTechnicalContact); + $registration = (new Registration()) + ->setDomainName($registrationDomainName) + ->setContactSettings($registrationContactSettings); + $yearlyPrice = new Money(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $domainsClient->registerDomain($formattedParent, $registration, $yearlyPrice); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Registration $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); + $registrationDomainName = '[DOMAIN_NAME]'; + $registrationContactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; + $registrationContactSettingsRegistrantContactEmail = '[EMAIL]'; + $registrationContactSettingsRegistrantContactPhoneNumber = '[PHONE_NUMBER]'; + $registrationContactSettingsAdminContactEmail = '[EMAIL]'; + $registrationContactSettingsAdminContactPhoneNumber = '[PHONE_NUMBER]'; + $registrationContactSettingsTechnicalContactEmail = '[EMAIL]'; + $registrationContactSettingsTechnicalContactPhoneNumber = '[PHONE_NUMBER]'; + + register_domain_sample( + $formattedParent, + $registrationDomainName, + $registrationContactSettingsPrivacy, + $registrationContactSettingsRegistrantContactEmail, + $registrationContactSettingsRegistrantContactPhoneNumber, + $registrationContactSettingsAdminContactEmail, + $registrationContactSettingsAdminContactPhoneNumber, + $registrationContactSettingsTechnicalContactEmail, + $registrationContactSettingsTechnicalContactPhoneNumber + ); +} +// [END domains_v1alpha2_generated_Domains_RegisterDomain_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/reset_authorization_code.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/reset_authorization_code.php new file mode 100644 index 000000000000..e151c787c78c --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/reset_authorization_code.php @@ -0,0 +1,74 @@ +resetAuthorizationCode($formattedRegistration); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRegistration = DomainsClient::registrationName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRATION]' + ); + + reset_authorization_code_sample($formattedRegistration); +} +// [END domains_v1alpha2_generated_Domains_ResetAuthorizationCode_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_authorization_code.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_authorization_code.php new file mode 100644 index 000000000000..c26c483a9374 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_authorization_code.php @@ -0,0 +1,75 @@ +retrieveAuthorizationCode($formattedRegistration); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRegistration = DomainsClient::registrationName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRATION]' + ); + + retrieve_authorization_code_sample($formattedRegistration); +} +// [END domains_v1alpha2_generated_Domains_RetrieveAuthorizationCode_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_register_parameters.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_register_parameters.php new file mode 100644 index 000000000000..ac895294259f --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_register_parameters.php @@ -0,0 +1,69 @@ +retrieveRegisterParameters($domainName, $formattedLocation); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = '[DOMAIN_NAME]'; + $formattedLocation = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); + + retrieve_register_parameters_sample($domainName, $formattedLocation); +} +// [END domains_v1alpha2_generated_Domains_RetrieveRegisterParameters_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_transfer_parameters.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_transfer_parameters.php new file mode 100644 index 000000000000..916d5c220084 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_transfer_parameters.php @@ -0,0 +1,73 @@ +retrieveTransferParameters($domainName, $formattedLocation); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = '[DOMAIN_NAME]'; + $formattedLocation = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); + + retrieve_transfer_parameters_sample($domainName, $formattedLocation); +} +// [END domains_v1alpha2_generated_Domains_RetrieveTransferParameters_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/search_domains.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/search_domains.php new file mode 100644 index 000000000000..b5239352b28b --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/search_domains.php @@ -0,0 +1,72 @@ +searchDomains($query, $formattedLocation); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $query = '[QUERY]'; + $formattedLocation = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); + + search_domains_sample($query, $formattedLocation); +} +// [END domains_v1alpha2_generated_Domains_SearchDomains_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/transfer_domain.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/transfer_domain.php new file mode 100644 index 000000000000..848574220086 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/transfer_domain.php @@ -0,0 +1,168 @@ +setPostalAddress($registrationContactSettingsRegistrantContactPostalAddress) + ->setEmail($registrationContactSettingsRegistrantContactEmail) + ->setPhoneNumber($registrationContactSettingsRegistrantContactPhoneNumber); + $registrationContactSettingsAdminContactPostalAddress = new PostalAddress(); + $registrationContactSettingsAdminContact = (new Contact()) + ->setPostalAddress($registrationContactSettingsAdminContactPostalAddress) + ->setEmail($registrationContactSettingsAdminContactEmail) + ->setPhoneNumber($registrationContactSettingsAdminContactPhoneNumber); + $registrationContactSettingsTechnicalContactPostalAddress = new PostalAddress(); + $registrationContactSettingsTechnicalContact = (new Contact()) + ->setPostalAddress($registrationContactSettingsTechnicalContactPostalAddress) + ->setEmail($registrationContactSettingsTechnicalContactEmail) + ->setPhoneNumber($registrationContactSettingsTechnicalContactPhoneNumber); + $registrationContactSettings = (new ContactSettings()) + ->setPrivacy($registrationContactSettingsPrivacy) + ->setRegistrantContact($registrationContactSettingsRegistrantContact) + ->setAdminContact($registrationContactSettingsAdminContact) + ->setTechnicalContact($registrationContactSettingsTechnicalContact); + $registration = (new Registration()) + ->setDomainName($registrationDomainName) + ->setContactSettings($registrationContactSettings); + $yearlyPrice = new Money(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $domainsClient->transferDomain($formattedParent, $registration, $yearlyPrice); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Registration $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); + $registrationDomainName = '[DOMAIN_NAME]'; + $registrationContactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; + $registrationContactSettingsRegistrantContactEmail = '[EMAIL]'; + $registrationContactSettingsRegistrantContactPhoneNumber = '[PHONE_NUMBER]'; + $registrationContactSettingsAdminContactEmail = '[EMAIL]'; + $registrationContactSettingsAdminContactPhoneNumber = '[PHONE_NUMBER]'; + $registrationContactSettingsTechnicalContactEmail = '[EMAIL]'; + $registrationContactSettingsTechnicalContactPhoneNumber = '[PHONE_NUMBER]'; + + transfer_domain_sample( + $formattedParent, + $registrationDomainName, + $registrationContactSettingsPrivacy, + $registrationContactSettingsRegistrantContactEmail, + $registrationContactSettingsRegistrantContactPhoneNumber, + $registrationContactSettingsAdminContactEmail, + $registrationContactSettingsAdminContactPhoneNumber, + $registrationContactSettingsTechnicalContactEmail, + $registrationContactSettingsTechnicalContactPhoneNumber + ); +} +// [END domains_v1alpha2_generated_Domains_TransferDomain_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/update_registration.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/update_registration.php new file mode 100644 index 000000000000..f51f705b6e3c --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/update_registration.php @@ -0,0 +1,74 @@ +updateRegistration($updateMask); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Registration $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + 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 domains_v1alpha2_generated_Domains_UpdateRegistration_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/DomainsClient.php b/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/DomainsClient.php new file mode 100644 index 000000000000..367c0bcb90af --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/DomainsClient.php @@ -0,0 +1,36 @@ +registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $updateMask = new FieldMask(); + * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureContactSettings'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->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. + * + * @experimental + */ +class DomainsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.domains.v1alpha2.Domains'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'domains.googleapis.com'; + + /** 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 $locationNameTemplate; + + private static $registrationNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/domains_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/domains_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/domains_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/domains_rest_client_config.php', + ], + ], + ]; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getRegistrationNameTemplate() + { + if (self::$registrationNameTemplate == null) { + self::$registrationNameTemplate = new PathTemplate('projects/{project}/locations/{location}/registrations/{registration}'); + } + + return self::$registrationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), + 'registration' => self::getRegistrationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * 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. + * + * @experimental + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a registration + * resource. + * + * @param string $project + * @param string $location + * @param string $registration + * + * @return string The formatted registration resource. + * + * @experimental + */ + public static function registrationName($project, $location, $registration) + { + return self::getRegistrationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'registration' => $registration, + ]); + } + + /** + * 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} + * - registration: projects/{project}/locations/{location}/registrations/{registration} + * + * 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. + * + * @experimental + */ + 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"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + * + * @experimental + */ + 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 + * + * @experimental + */ + 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; + } + + /** + * 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 'domains.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Updates a `Registration`'s contact settings. Some changes require + * confirmation by the domain's registrant contact . + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $updateMask = new FieldMask(); + * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureContactSettings'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $registration Required. The name of the `Registration` whose contact settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the registrant contact is being updated, the + * `update_mask` is `"registrant_contact"`. + * @param array $optionalArgs { + * Optional. + * + * @type ContactSettings $contactSettings + * Fields of the `ContactSettings` to update. + * @type int[] $contactNotices + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in `contact_settings`. + * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1alpha2\ContactNotice} + * @type bool $validateOnly + * Validate the request without actually updating the contact settings. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function configureContactSettings($registration, $updateMask, array $optionalArgs = []) + { + $request = new ConfigureContactSettingsRequest(); + $requestParamHeaders = []; + $request->setRegistration($registration); + $request->setUpdateMask($updateMask); + $requestParamHeaders['registration'] = $registration; + if (isset($optionalArgs['contactSettings'])) { + $request->setContactSettings($optionalArgs['contactSettings']); + } + + if (isset($optionalArgs['contactNotices'])) { + $request->setContactNotices($optionalArgs['contactNotices']); + } + + 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->startOperationsCall('ConfigureContactSettings', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates a `Registration`'s DNS settings. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $updateMask = new FieldMask(); + * $operationResponse = $domainsClient->configureDnsSettings($formattedRegistration, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->configureDnsSettings($formattedRegistration, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureDnsSettings'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $registration Required. The name of the `Registration` whose DNS settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the name servers are being updated for an existing + * Custom DNS configuration, the `update_mask` is + * `"custom_dns.name_servers"`. + * + * When changing the DNS provider from one type to another, pass the new + * provider's field name as part of the field mask. For example, when changing + * from a Google Domains DNS configuration to a Custom DNS configuration, the + * `update_mask` is `"custom_dns"`. // + * @param array $optionalArgs { + * Optional. + * + * @type DnsSettings $dnsSettings + * Fields of the `DnsSettings` to update. + * @type bool $validateOnly + * Validate the request without actually updating the DNS settings. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function configureDnsSettings($registration, $updateMask, array $optionalArgs = []) + { + $request = new ConfigureDnsSettingsRequest(); + $requestParamHeaders = []; + $request->setRegistration($registration); + $request->setUpdateMask($updateMask); + $requestParamHeaders['registration'] = $registration; + if (isset($optionalArgs['dnsSettings'])) { + $request->setDnsSettings($optionalArgs['dnsSettings']); + } + + 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->startOperationsCall('ConfigureDnsSettings', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates a `Registration`'s management settings. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $updateMask = new FieldMask(); + * $operationResponse = $domainsClient->configureManagementSettings($formattedRegistration, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->configureManagementSettings($formattedRegistration, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureManagementSettings'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $registration Required. The name of the `Registration` whose management settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the transfer lock is being updated, the `update_mask` + * is `"transfer_lock_state"`. + * @param array $optionalArgs { + * Optional. + * + * @type ManagementSettings $managementSettings + * Fields of the `ManagementSettings` 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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function configureManagementSettings($registration, $updateMask, array $optionalArgs = []) + { + $request = new ConfigureManagementSettingsRequest(); + $requestParamHeaders = []; + $request->setRegistration($registration); + $request->setUpdateMask($updateMask); + $requestParamHeaders['registration'] = $registration; + if (isset($optionalArgs['managementSettings'])) { + $request->setManagementSettings($optionalArgs['managementSettings']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ConfigureManagementSettings', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a `Registration` resource. + * + * This method works on any `Registration` resource using [Subscription or + * Commitment billing](/domains/pricing#billing-models), provided that the + * resource was created at least 1 day in the past. + * + * For `Registration` resources using + * [Monthly billing](/domains/pricing#billing-models), this method works if: + * + * * `state` is `EXPORTED` with `expire_time` in the past + * * `state` is `REGISTRATION_FAILED` + * * `state` is `TRANSFER_FAILED` + * + * When an active registration is successfully deleted, you can continue to + * use the domain in [Google Domains](https://domains.google/) until it + * expires. The calling user becomes the domain's sole owner in Google + * Domains, and permissions for the domain are subsequently managed there. The + * domain does not renew automatically unless the new owner sets up billing in + * Google Domains. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedName = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $operationResponse = $domainsClient->deleteRegistration($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->deleteRegistration($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'deleteRegistration'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the `Registration` to delete, + * in the format `projects/*/locations/*/registrations/*`. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function deleteRegistration($name, array $optionalArgs = []) + { + $request = new DeleteRegistrationRequest(); + $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->startOperationsCall('DeleteRegistration', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Exports a `Registration` resource, such that it is no longer managed by + * Cloud Domains. + * + * When an active domain is successfully exported, you can continue to use the + * domain in [Google Domains](https://domains.google/) until it expires. The + * calling user becomes the domain's sole owner in Google Domains, and + * permissions for the domain are subsequently managed there. The domain does + * not renew automatically unless the new owner sets up billing in Google + * Domains. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedName = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $operationResponse = $domainsClient->exportRegistration($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->exportRegistration($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'exportRegistration'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the `Registration` to export, + * in the format `projects/*/locations/*/registrations/*`. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function exportRegistration($name, array $optionalArgs = []) + { + $request = new ExportRegistrationRequest(); + $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->startOperationsCall('ExportRegistration', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets the details of a `Registration` resource. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedName = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $response = $domainsClient->getRegistration($formattedName); + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the `Registration` to get, in the format + * `projects/*/locations/*/registrations/*`. + * @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\Domains\V1alpha2\Registration + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getRegistration($name, array $optionalArgs = []) + { + $request = new GetRegistrationRequest(); + $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('GetRegistration', Registration::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the `Registration` resources in a project. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedParent = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $domainsClient->listRegistrations($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $domainsClient->listRegistrations($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and location from which to list `Registration`s, specified in + * the format `projects/*/locations/*`. + * @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 + * Filter expression to restrict the `Registration`s returned. + * + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, a boolean, or an enum value. The comparison operator should be one + * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. + * + * For example, to filter to a specific domain name, use an expression like + * `domainName="example.com"`. You can also check for the existence of a + * field; for example, to find domains using custom DNS settings, use an + * expression like `dnsSettings.customDns:*`. + * + * You can also create compound filters by combining expressions with the + * `AND` and `OR` operators. For example, to find domains that are suspended + * or have specific issues flagged, use an expression like + * `(state=SUSPENDED) OR (issue:*)`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 + * + * @experimental + */ + public function listRegistrations($parent, array $optionalArgs = []) + { + $request = new ListRegistrationsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListRegistrations', $optionalArgs, ListRegistrationsResponse::class, $request); + } + + /** + * Registers a new domain name and creates a corresponding `Registration` + * resource. + * + * Call `RetrieveRegisterParameters` first to check availability of the domain + * name and determine parameters like price that are needed to build a call to + * this method. + * + * A successful call creates a `Registration` resource in state + * `REGISTRATION_PENDING`, which resolves to `ACTIVE` within 1-2 + * minutes, indicating that the domain was successfully registered. If the + * resource ends up in state `REGISTRATION_FAILED`, it indicates that the + * domain was not registered successfully, and you can safely delete the + * resource and retry registration. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedParent = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); + * $registration = new Registration(); + * $yearlyPrice = new Money(); + * $operationResponse = $domainsClient->registerDomain($formattedParent, $registration, $yearlyPrice); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->registerDomain($formattedParent, $registration, $yearlyPrice); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'registerDomain'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the `Registration`. Must be in the + * format `projects/*/locations/*`. + * @param Registration $registration Required. The complete `Registration` resource to be created. + * @param Money $yearlyPrice Required. Yearly price to register or renew the domain. + * The value that should be put here can be obtained from + * RetrieveRegisterParameters or SearchDomains calls. + * @param array $optionalArgs { + * Optional. + * + * @type int[] $domainNotices + * The list of domain notices that you acknowledge. Call + * `RetrieveRegisterParameters` to see the notices that need acknowledgement. + * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1alpha2\DomainNotice} + * @type int[] $contactNotices + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1alpha2\ContactNotice} + * @type bool $validateOnly + * When true, only validation is performed, without actually registering + * the domain. Follows: + * https://cloud.google.com/apis/design/design_patterns#request_validation + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function registerDomain($parent, $registration, $yearlyPrice, array $optionalArgs = []) + { + $request = new RegisterDomainRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setRegistration($registration); + $request->setYearlyPrice($yearlyPrice); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['domainNotices'])) { + $request->setDomainNotices($optionalArgs['domainNotices']); + } + + if (isset($optionalArgs['contactNotices'])) { + $request->setContactNotices($optionalArgs['contactNotices']); + } + + 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->startOperationsCall('RegisterDomain', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Resets the authorization code of the `Registration` to a new random string. + * + * You can call this method only after 60 days have elapsed since the initial + * domain registration. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $response = $domainsClient->resetAuthorizationCode($formattedRegistration); + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $registration Required. The name of the `Registration` whose authorization code is being reset, + * in the format `projects/*/locations/*/registrations/*`. + * @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\Domains\V1alpha2\AuthorizationCode + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function resetAuthorizationCode($registration, array $optionalArgs = []) + { + $request = new ResetAuthorizationCodeRequest(); + $requestParamHeaders = []; + $request->setRegistration($registration); + $requestParamHeaders['registration'] = $registration; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ResetAuthorizationCode', AuthorizationCode::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the authorization code of the `Registration` for the purpose of + * transferring the domain to another registrar. + * + * You can call this method only after 60 days have elapsed since the initial + * domain registration. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $response = $domainsClient->retrieveAuthorizationCode($formattedRegistration); + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $registration Required. The name of the `Registration` whose authorization code is being retrieved, + * in the format `projects/*/locations/*/registrations/*`. + * @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\Domains\V1alpha2\AuthorizationCode + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function retrieveAuthorizationCode($registration, array $optionalArgs = []) + { + $request = new RetrieveAuthorizationCodeRequest(); + $requestParamHeaders = []; + $request->setRegistration($registration); + $requestParamHeaders['registration'] = $registration; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RetrieveAuthorizationCode', AuthorizationCode::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets parameters needed to register a new domain name, including price and + * up-to-date availability. Use the returned values to call `RegisterDomain`. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $domainName = 'domain_name'; + * $formattedLocation = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); + * $response = $domainsClient->retrieveRegisterParameters($domainName, $formattedLocation); + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $domainName Required. The domain name. Unicode domain names must be expressed in Punycode format. + * @param string $location Required. The location. Must be in the format `projects/*/locations/*`. + * @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\Domains\V1alpha2\RetrieveRegisterParametersResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function retrieveRegisterParameters($domainName, $location, array $optionalArgs = []) + { + $request = new RetrieveRegisterParametersRequest(); + $requestParamHeaders = []; + $request->setDomainName($domainName); + $request->setLocation($location); + $requestParamHeaders['location'] = $location; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RetrieveRegisterParameters', RetrieveRegisterParametersResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets parameters needed to transfer a domain name from another registrar to + * Cloud Domains. For domains managed by Google Domains, transferring to Cloud + * Domains is not supported. + * + * + * Use the returned values to call `TransferDomain`. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $domainName = 'domain_name'; + * $formattedLocation = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); + * $response = $domainsClient->retrieveTransferParameters($domainName, $formattedLocation); + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $domainName Required. The domain name. Unicode domain names must be expressed in Punycode format. + * @param string $location Required. The location. Must be in the format `projects/*/locations/*`. + * @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\Domains\V1alpha2\RetrieveTransferParametersResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function retrieveTransferParameters($domainName, $location, array $optionalArgs = []) + { + $request = new RetrieveTransferParametersRequest(); + $requestParamHeaders = []; + $request->setDomainName($domainName); + $request->setLocation($location); + $requestParamHeaders['location'] = $location; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RetrieveTransferParameters', RetrieveTransferParametersResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Searches for available domain names similar to the provided query. + * + * Availability results from this method are approximate; call + * `RetrieveRegisterParameters` on a domain before registering to confirm + * availability. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $query = 'query'; + * $formattedLocation = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); + * $response = $domainsClient->searchDomains($query, $formattedLocation); + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $query Required. String used to search for available domain names. + * @param string $location Required. The location. Must be in the format `projects/*/locations/*`. + * @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\Domains\V1alpha2\SearchDomainsResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function searchDomains($query, $location, array $optionalArgs = []) + { + $request = new SearchDomainsRequest(); + $requestParamHeaders = []; + $request->setQuery($query); + $request->setLocation($location); + $requestParamHeaders['location'] = $location; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SearchDomains', SearchDomainsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Transfers a domain name from another registrar to Cloud Domains. For + * domains managed by Google Domains, transferring to Cloud Domains is not + * supported. + * + * + * Before calling this method, go to the domain's current registrar to unlock + * the domain for transfer and retrieve the domain's transfer authorization + * code. Then call `RetrieveTransferParameters` to confirm that the domain is + * unlocked and to get values needed to build a call to this method. + * + * A successful call creates a `Registration` resource in state + * `TRANSFER_PENDING`. It can take several days to complete the transfer + * process. The registrant can often speed up this process by approving the + * transfer through the current registrar, either by clicking a link in an + * email from the registrar or by visiting the registrar's website. + * + * A few minutes after transfer approval, the resource transitions to state + * `ACTIVE`, indicating that the transfer was successful. If the transfer is + * rejected or the request expires without being approved, the resource can + * end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete + * the resource and retry the transfer. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedParent = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); + * $registration = new Registration(); + * $yearlyPrice = new Money(); + * $operationResponse = $domainsClient->transferDomain($formattedParent, $registration, $yearlyPrice); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->transferDomain($formattedParent, $registration, $yearlyPrice); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'transferDomain'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the `Registration`. Must be in the + * format `projects/*/locations/*`. + * @param Registration $registration Required. The complete `Registration` resource to be created. + * + * You can leave `registration.dns_settings` unset to import the + * domain's current DNS configuration from its current registrar. Use this + * option only if you are sure that the domain's current DNS service + * does not cease upon transfer, as is often the case for DNS services + * provided for free by the registrar. + * @param Money $yearlyPrice Required. Acknowledgement of the price to transfer or renew the domain for one year. + * Call `RetrieveTransferParameters` to obtain the price, which you must + * acknowledge. + * @param array $optionalArgs { + * Optional. + * + * @type int[] $contactNotices + * The list of contact notices that you acknowledge. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1alpha2\ContactNotice} + * @type AuthorizationCode $authorizationCode + * The domain's transfer authorization code. You can obtain this from the + * domain's current registrar. + * @type bool $validateOnly + * Validate the request without actually transferring the domain. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function transferDomain($parent, $registration, $yearlyPrice, array $optionalArgs = []) + { + $request = new TransferDomainRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setRegistration($registration); + $request->setYearlyPrice($yearlyPrice); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['contactNotices'])) { + $request->setContactNotices($optionalArgs['contactNotices']); + } + + if (isset($optionalArgs['authorizationCode'])) { + $request->setAuthorizationCode($optionalArgs['authorizationCode']); + } + + 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->startOperationsCall('TransferDomain', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates select fields of a `Registration` resource, notably `labels`. To + * update other fields, use the appropriate custom update method: + * + * * To update management settings, see `ConfigureManagementSettings` + * * To update DNS configuration, see `ConfigureDnsSettings` + * * To update contact information, see `ConfigureContactSettings` + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $updateMask = new FieldMask(); + * $operationResponse = $domainsClient->updateRegistration($updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->updateRegistration($updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'updateRegistration'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the labels are being updated, the `update_mask` is + * `"labels"`. + * @param array $optionalArgs { + * Optional. + * + * @type Registration $registration + * Fields of the `Registration` 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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateRegistration($updateMask, array $optionalArgs = []) + { + $request = new UpdateRegistrationRequest(); + $requestParamHeaders = []; + $request->setUpdateMask($updateMask); + if (isset($optionalArgs['registration'])) { + $request->setRegistration($optionalArgs['registration']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateRegistration', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/gapic_metadata.json b/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/gapic_metadata.json new file mode 100644 index 000000000000..63eb4208305c --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/gapic_metadata.json @@ -0,0 +1,93 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.domains.v1alpha2", + "libraryPackage": "Google\\Cloud\\Domains\\V1alpha2", + "services": { + "Domains": { + "clients": { + "grpc": { + "libraryClient": "DomainsGapicClient", + "rpcs": { + "ConfigureContactSettings": { + "methods": [ + "configureContactSettings" + ] + }, + "ConfigureDnsSettings": { + "methods": [ + "configureDnsSettings" + ] + }, + "ConfigureManagementSettings": { + "methods": [ + "configureManagementSettings" + ] + }, + "DeleteRegistration": { + "methods": [ + "deleteRegistration" + ] + }, + "ExportRegistration": { + "methods": [ + "exportRegistration" + ] + }, + "GetRegistration": { + "methods": [ + "getRegistration" + ] + }, + "ListRegistrations": { + "methods": [ + "listRegistrations" + ] + }, + "RegisterDomain": { + "methods": [ + "registerDomain" + ] + }, + "ResetAuthorizationCode": { + "methods": [ + "resetAuthorizationCode" + ] + }, + "RetrieveAuthorizationCode": { + "methods": [ + "retrieveAuthorizationCode" + ] + }, + "RetrieveRegisterParameters": { + "methods": [ + "retrieveRegisterParameters" + ] + }, + "RetrieveTransferParameters": { + "methods": [ + "retrieveTransferParameters" + ] + }, + "SearchDomains": { + "methods": [ + "searchDomains" + ] + }, + "TransferDomain": { + "methods": [ + "transferDomain" + ] + }, + "UpdateRegistration": { + "methods": [ + "updateRegistration" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_client_config.json b/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_client_config.json new file mode 100644 index 000000000000..6bfd4a2253d4 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_client_config.json @@ -0,0 +1,119 @@ +{ + "interfaces": { + "google.cloud.domains.v1alpha2.Domains": { + "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": { + "ConfigureContactSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ConfigureDnsSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ConfigureManagementSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteRegistration": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ExportRegistration": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetRegistration": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListRegistrations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RegisterDomain": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ResetAuthorizationCode": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RetrieveAuthorizationCode": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RetrieveRegisterParameters": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RetrieveTransferParameters": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SearchDomains": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TransferDomain": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateRegistration": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_descriptor_config.php b/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_descriptor_config.php new file mode 100644 index 000000000000..2adf181e173d --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_descriptor_config.php @@ -0,0 +1,98 @@ + [ + 'google.cloud.domains.v1alpha2.Domains' => [ + 'ConfigureContactSettings' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Domains\V1alpha2\Registration', + 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ConfigureDnsSettings' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Domains\V1alpha2\Registration', + 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ConfigureManagementSettings' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Domains\V1alpha2\Registration', + 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteRegistration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ExportRegistration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Domains\V1alpha2\Registration', + 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'RegisterDomain' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Domains\V1alpha2\Registration', + 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'TransferDomain' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Domains\V1alpha2\Registration', + 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateRegistration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Domains\V1alpha2\Registration', + 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListRegistrations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRegistrations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_rest_client_config.php b/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_rest_client_config.php new file mode 100644 index 000000000000..a9a9f76ad3c4 --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_rest_client_config.php @@ -0,0 +1,271 @@ + [ + 'google.cloud.domains.v1alpha2.Domains' => [ + 'ConfigureContactSettings' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha2/{registration=projects/*/locations/*/registrations/*}:configureContactSettings', + 'body' => '*', + 'placeholders' => [ + 'registration' => [ + 'getters' => [ + 'getRegistration', + ], + ], + ], + ], + 'ConfigureDnsSettings' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha2/{registration=projects/*/locations/*/registrations/*}:configureDnsSettings', + 'body' => '*', + 'placeholders' => [ + 'registration' => [ + 'getters' => [ + 'getRegistration', + ], + ], + ], + ], + 'ConfigureManagementSettings' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha2/{registration=projects/*/locations/*/registrations/*}:configureManagementSettings', + 'body' => '*', + 'placeholders' => [ + 'registration' => [ + 'getters' => [ + 'getRegistration', + ], + ], + ], + ], + 'DeleteRegistration' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1alpha2/{name=projects/*/locations/*/registrations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportRegistration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha2/{name=projects/*/locations/*/registrations/*}:export', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRegistration' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha2/{name=projects/*/locations/*/registrations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListRegistrations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha2/{parent=projects/*/locations/*}/registrations', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RegisterDomain' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha2/{parent=projects/*/locations/*}/registrations:register', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ResetAuthorizationCode' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha2/{registration=projects/*/locations/*/registrations/*}:resetAuthorizationCode', + 'body' => '*', + 'placeholders' => [ + 'registration' => [ + 'getters' => [ + 'getRegistration', + ], + ], + ], + ], + 'RetrieveAuthorizationCode' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha2/{registration=projects/*/locations/*/registrations/*}:retrieveAuthorizationCode', + 'placeholders' => [ + 'registration' => [ + 'getters' => [ + 'getRegistration', + ], + ], + ], + ], + 'RetrieveRegisterParameters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha2/{location=projects/*/locations/*}/registrations:retrieveRegisterParameters', + 'placeholders' => [ + 'location' => [ + 'getters' => [ + 'getLocation', + ], + ], + ], + ], + 'RetrieveTransferParameters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha2/{location=projects/*/locations/*}/registrations:retrieveTransferParameters', + 'placeholders' => [ + 'location' => [ + 'getters' => [ + 'getLocation', + ], + ], + ], + ], + 'SearchDomains' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha2/{location=projects/*/locations/*}/registrations:searchDomains', + 'placeholders' => [ + 'location' => [ + 'getters' => [ + 'getLocation', + ], + ], + ], + ], + 'TransferDomain' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha2/{parent=projects/*/locations/*}/registrations:transfer', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateRegistration' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1alpha2/{registration.name=projects/*/locations/*/registrations/*}', + 'body' => 'registration', + 'placeholders' => [ + 'registration.name' => [ + 'getters' => [ + 'getRegistration', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha2/{resource=projects/*/locations/*/registrations/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha2/{resource=projects/*/locations/*/registrations/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha2/{resource=projects/*/locations/*/registrations/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha2/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Domains/v1alpha2/tests/Unit/V1alpha2/DomainsClientTest.php b/owl-bot-staging/Domains/v1alpha2/tests/Unit/V1alpha2/DomainsClientTest.php new file mode 100644 index 000000000000..fdfe157aeccf --- /dev/null +++ b/owl-bot-staging/Domains/v1alpha2/tests/Unit/V1alpha2/DomainsClientTest.php @@ -0,0 +1,1625 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DomainsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DomainsClient($options); + } + + /** @test */ + public function configureContactSettingsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/configureContactSettingsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name); + $expectedResponse->setDomainName($domainName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/configureContactSettingsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $updateMask = new FieldMask(); + $response = $gapicClient->configureContactSettings($formattedRegistration, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1alpha2.Domains/ConfigureContactSettings', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRegistration(); + $this->assertProtobufEquals($formattedRegistration, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/configureContactSettingsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function configureContactSettingsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/configureContactSettingsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $updateMask = new FieldMask(); + $response = $gapicClient->configureContactSettings($formattedRegistration, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/configureContactSettingsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function configureDnsSettingsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/configureDnsSettingsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name); + $expectedResponse->setDomainName($domainName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/configureDnsSettingsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $updateMask = new FieldMask(); + $response = $gapicClient->configureDnsSettings($formattedRegistration, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1alpha2.Domains/ConfigureDnsSettings', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRegistration(); + $this->assertProtobufEquals($formattedRegistration, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/configureDnsSettingsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function configureDnsSettingsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/configureDnsSettingsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $updateMask = new FieldMask(); + $response = $gapicClient->configureDnsSettings($formattedRegistration, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/configureDnsSettingsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function configureManagementSettingsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/configureManagementSettingsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name); + $expectedResponse->setDomainName($domainName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/configureManagementSettingsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $updateMask = new FieldMask(); + $response = $gapicClient->configureManagementSettings($formattedRegistration, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1alpha2.Domains/ConfigureManagementSettings', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRegistration(); + $this->assertProtobufEquals($formattedRegistration, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/configureManagementSettingsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function configureManagementSettingsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/configureManagementSettingsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $updateMask = new FieldMask(); + $response = $gapicClient->configureManagementSettings($formattedRegistration, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/configureManagementSettingsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRegistrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRegistrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteRegistrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $response = $gapicClient->deleteRegistration($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1alpha2.Domains/DeleteRegistration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRegistrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRegistrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRegistrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $response = $gapicClient->deleteRegistration($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRegistrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function exportRegistrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportRegistrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name2); + $expectedResponse->setDomainName($domainName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportRegistrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $response = $gapicClient->exportRegistration($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1alpha2.Domains/ExportRegistration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportRegistrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function exportRegistrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportRegistrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $response = $gapicClient->exportRegistration($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportRegistrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getRegistrationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name2); + $expectedResponse->setDomainName($domainName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $response = $gapicClient->getRegistration($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1alpha2.Domains/GetRegistration', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRegistrationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + try { + $gapicClient->getRegistration($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 listRegistrationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $registrationsElement = new Registration(); + $registrations = [ + $registrationsElement, + ]; + $expectedResponse = new ListRegistrationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRegistrations($registrations); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listRegistrations($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRegistrations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1alpha2.Domains/ListRegistrations', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRegistrationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listRegistrations($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 registerDomainTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/registerDomainTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name); + $expectedResponse->setDomainName($domainName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/registerDomainTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $registration = new Registration(); + $registrationDomainName = 'registrationDomainName1873916680'; + $registration->setDomainName($registrationDomainName); + $registrationContactSettings = new ContactSettings(); + $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; + $registrationContactSettings->setPrivacy($contactSettingsPrivacy); + $contactSettingsRegistrantContact = new Contact(); + $registrantContactPostalAddress = new PostalAddress(); + $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); + $registrantContactEmail = 'registrantContactEmail1001340839'; + $contactSettingsRegistrantContact->setEmail($registrantContactEmail); + $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; + $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); + $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); + $contactSettingsAdminContact = new Contact(); + $adminContactPostalAddress = new PostalAddress(); + $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); + $adminContactEmail = 'adminContactEmail1687004235'; + $contactSettingsAdminContact->setEmail($adminContactEmail); + $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; + $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); + $registrationContactSettings->setAdminContact($contactSettingsAdminContact); + $contactSettingsTechnicalContact = new Contact(); + $technicalContactPostalAddress = new PostalAddress(); + $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); + $technicalContactEmail = 'technicalContactEmail-221168807'; + $contactSettingsTechnicalContact->setEmail($technicalContactEmail); + $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; + $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); + $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); + $registration->setContactSettings($registrationContactSettings); + $yearlyPrice = new Money(); + $response = $gapicClient->registerDomain($formattedParent, $registration, $yearlyPrice); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1alpha2.Domains/RegisterDomain', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRegistration(); + $this->assertProtobufEquals($registration, $actualValue); + $actualValue = $actualApiRequestObject->getYearlyPrice(); + $this->assertProtobufEquals($yearlyPrice, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/registerDomainTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function registerDomainExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/registerDomainTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $registration = new Registration(); + $registrationDomainName = 'registrationDomainName1873916680'; + $registration->setDomainName($registrationDomainName); + $registrationContactSettings = new ContactSettings(); + $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; + $registrationContactSettings->setPrivacy($contactSettingsPrivacy); + $contactSettingsRegistrantContact = new Contact(); + $registrantContactPostalAddress = new PostalAddress(); + $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); + $registrantContactEmail = 'registrantContactEmail1001340839'; + $contactSettingsRegistrantContact->setEmail($registrantContactEmail); + $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; + $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); + $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); + $contactSettingsAdminContact = new Contact(); + $adminContactPostalAddress = new PostalAddress(); + $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); + $adminContactEmail = 'adminContactEmail1687004235'; + $contactSettingsAdminContact->setEmail($adminContactEmail); + $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; + $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); + $registrationContactSettings->setAdminContact($contactSettingsAdminContact); + $contactSettingsTechnicalContact = new Contact(); + $technicalContactPostalAddress = new PostalAddress(); + $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); + $technicalContactEmail = 'technicalContactEmail-221168807'; + $contactSettingsTechnicalContact->setEmail($technicalContactEmail); + $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; + $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); + $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); + $registration->setContactSettings($registrationContactSettings); + $yearlyPrice = new Money(); + $response = $gapicClient->registerDomain($formattedParent, $registration, $yearlyPrice); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/registerDomainTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resetAuthorizationCodeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $code = 'code3059181'; + $expectedResponse = new AuthorizationCode(); + $expectedResponse->setCode($code); + $transport->addResponse($expectedResponse); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $response = $gapicClient->resetAuthorizationCode($formattedRegistration); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1alpha2.Domains/ResetAuthorizationCode', $actualFuncCall); + $actualValue = $actualRequestObject->getRegistration(); + $this->assertProtobufEquals($formattedRegistration, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetAuthorizationCodeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + try { + $gapicClient->resetAuthorizationCode($formattedRegistration); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveAuthorizationCodeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $code = 'code3059181'; + $expectedResponse = new AuthorizationCode(); + $expectedResponse->setCode($code); + $transport->addResponse($expectedResponse); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $response = $gapicClient->retrieveAuthorizationCode($formattedRegistration); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1alpha2.Domains/RetrieveAuthorizationCode', $actualFuncCall); + $actualValue = $actualRequestObject->getRegistration(); + $this->assertProtobufEquals($formattedRegistration, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveAuthorizationCodeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + try { + $gapicClient->retrieveAuthorizationCode($formattedRegistration); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveRegisterParametersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RetrieveRegisterParametersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $domainName = 'domainName104118566'; + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->retrieveRegisterParameters($domainName, $formattedLocation); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1alpha2.Domains/RetrieveRegisterParameters', $actualFuncCall); + $actualValue = $actualRequestObject->getDomainName(); + $this->assertProtobufEquals($domainName, $actualValue); + $actualValue = $actualRequestObject->getLocation(); + $this->assertProtobufEquals($formattedLocation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveRegisterParametersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $domainName = 'domainName104118566'; + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->retrieveRegisterParameters($domainName, $formattedLocation); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveTransferParametersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RetrieveTransferParametersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $domainName = 'domainName104118566'; + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->retrieveTransferParameters($domainName, $formattedLocation); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1alpha2.Domains/RetrieveTransferParameters', $actualFuncCall); + $actualValue = $actualRequestObject->getDomainName(); + $this->assertProtobufEquals($domainName, $actualValue); + $actualValue = $actualRequestObject->getLocation(); + $this->assertProtobufEquals($formattedLocation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveTransferParametersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $domainName = 'domainName104118566'; + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->retrieveTransferParameters($domainName, $formattedLocation); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchDomainsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SearchDomainsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $query = 'query107944136'; + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->searchDomains($query, $formattedLocation); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1alpha2.Domains/SearchDomains', $actualFuncCall); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $actualValue = $actualRequestObject->getLocation(); + $this->assertProtobufEquals($formattedLocation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchDomainsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $query = 'query107944136'; + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->searchDomains($query, $formattedLocation); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function transferDomainTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/transferDomainTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name); + $expectedResponse->setDomainName($domainName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/transferDomainTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $registration = new Registration(); + $registrationDomainName = 'registrationDomainName1873916680'; + $registration->setDomainName($registrationDomainName); + $registrationContactSettings = new ContactSettings(); + $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; + $registrationContactSettings->setPrivacy($contactSettingsPrivacy); + $contactSettingsRegistrantContact = new Contact(); + $registrantContactPostalAddress = new PostalAddress(); + $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); + $registrantContactEmail = 'registrantContactEmail1001340839'; + $contactSettingsRegistrantContact->setEmail($registrantContactEmail); + $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; + $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); + $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); + $contactSettingsAdminContact = new Contact(); + $adminContactPostalAddress = new PostalAddress(); + $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); + $adminContactEmail = 'adminContactEmail1687004235'; + $contactSettingsAdminContact->setEmail($adminContactEmail); + $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; + $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); + $registrationContactSettings->setAdminContact($contactSettingsAdminContact); + $contactSettingsTechnicalContact = new Contact(); + $technicalContactPostalAddress = new PostalAddress(); + $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); + $technicalContactEmail = 'technicalContactEmail-221168807'; + $contactSettingsTechnicalContact->setEmail($technicalContactEmail); + $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; + $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); + $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); + $registration->setContactSettings($registrationContactSettings); + $yearlyPrice = new Money(); + $response = $gapicClient->transferDomain($formattedParent, $registration, $yearlyPrice); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1alpha2.Domains/TransferDomain', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRegistration(); + $this->assertProtobufEquals($registration, $actualValue); + $actualValue = $actualApiRequestObject->getYearlyPrice(); + $this->assertProtobufEquals($yearlyPrice, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/transferDomainTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function transferDomainExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/transferDomainTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $registration = new Registration(); + $registrationDomainName = 'registrationDomainName1873916680'; + $registration->setDomainName($registrationDomainName); + $registrationContactSettings = new ContactSettings(); + $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; + $registrationContactSettings->setPrivacy($contactSettingsPrivacy); + $contactSettingsRegistrantContact = new Contact(); + $registrantContactPostalAddress = new PostalAddress(); + $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); + $registrantContactEmail = 'registrantContactEmail1001340839'; + $contactSettingsRegistrantContact->setEmail($registrantContactEmail); + $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; + $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); + $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); + $contactSettingsAdminContact = new Contact(); + $adminContactPostalAddress = new PostalAddress(); + $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); + $adminContactEmail = 'adminContactEmail1687004235'; + $contactSettingsAdminContact->setEmail($adminContactEmail); + $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; + $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); + $registrationContactSettings->setAdminContact($contactSettingsAdminContact); + $contactSettingsTechnicalContact = new Contact(); + $technicalContactPostalAddress = new PostalAddress(); + $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); + $technicalContactEmail = 'technicalContactEmail-221168807'; + $contactSettingsTechnicalContact->setEmail($technicalContactEmail); + $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; + $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); + $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); + $registration->setContactSettings($registrationContactSettings); + $yearlyPrice = new Money(); + $response = $gapicClient->transferDomain($formattedParent, $registration, $yearlyPrice); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/transferDomainTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateRegistrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRegistrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name); + $expectedResponse->setDomainName($domainName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateRegistrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $response = $gapicClient->updateRegistration($updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1alpha2.Domains/UpdateRegistration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRegistrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateRegistrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRegistrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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(); + $response = $gapicClient->updateRegistration($updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRegistrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/GPBMetadata/Google/Cloud/Domains/V1Beta1/Domains.php b/owl-bot-staging/Domains/v1beta1/proto/src/GPBMetadata/Google/Cloud/Domains/V1Beta1/Domains.php new file mode 100644 index 0000000000000000000000000000000000000000..824429d87b60c75a7eeeeb97652f117c05ca5d9c GIT binary patch literal 13146 zcmd5@O>7&-6%I-L@kyeo@lR;w$MiZuY(*w3`X{y=Cs~mziLpeo{Bayt=wd~#sEx@b zyStRF1V(`ZMGx(z@TEXe6b0H#fL?lPiynF?dN7bnd#W#WfnHh^J@nF|Xo|j>*qTBmXYgdgnjfT}IH)_%C*3OP< zM9YnOQ>&>)EE-K^qnT_mDy7oJvq)+-T1Hu2j#e9uYE6xoYmHVVUTM@7O*i9vOWUfY zEIHp}j4gn!)K#;ol-1~3ZeDhf|lAtE%N1k&c|dU@uGAX*<#L zT*l?)9wBc=Eu*D+SC2*w)oK~~4JJ2b@X-CV)yHCDQ`-`Cy+N(e(9PxLwoYvp2N5P~ znyOo)(X47}t+Jx-DtlVP7>zWq+72_ckQ)uXYP57+)2mzACUw)%lyvuwNxi9<_lB3) zr7ddcv6fPA4o_R$Z>n3H4PD(IktWx`m1<(8VyNZ;o5}q1;yaq{jX2kJzEup<^RBy4 z=XnD@{VFUBAD`r9J~zfDHGJE1@PbQv<{-@$N zxeU`~L&YpBQ>h{Wd^nw$k8#cUBB)f%bv4cssniEe&9JE^hNDWsI88WeWD@6x5?^vw z>AR&duUfGJrQ>T$Frk@dOEn`?(ZGmo(v*<1S%rz3vaQz4ND$dfC$5el%?2Zsbj#Q$ zn{d3Y=t@$Q-9(J2`(5ro9_74S{>=J`Vsg3*&oAt))ho*Dw38`GlYNV4S%VISF%xqF9vV zQl^lTlIhj7lnTE^is=m`@skq}#@U&| zs+4!92gq?a=8oD^#|XfLm@KAmOW_HWE?6kx(wP);nItnXCEdwo^F{nNC8S}TxhoYj zT_}{g#YFDOY^I3Jh%Zz_we|i|NHOjoa#XoUAK8zclq=S>aUmptJ_XFwU+h2i@fj!-Qr6$)^ zYqwEh=_ZtT=kPu6<%GF`vB544x$t=2fa910brTyy8O6LO^Hej2P8v$Y4_~2Z6K)_K za}D7x%yz6nUWNI*l#xCVH{?yJxSmaQISp=-SSn^W(PfgdJrnnXKxk9Ul#t39^9#QP znD$0&8r#U0X*KFHMn3b~>BObO1@@4~l8hEd)?XlZfbiXw?agK^sqarGmWOA##+u#~ z?{+!o_hF`raU>gRxnWey$QVnSmq*}<)OkicuS3uknw*9iT9z>58GEWh^$+mEdj@I3d~ z7)&`jkz+84Sx&Z;D)X3el7*mBt2PYH+O4x}7fQT6iqzazG11{c^4KEilkS9oF8%ooJX)D?`W3Gk=Z zG3ic1AXN~<0s28oCc|T78YXd8VO?AbkCQOW;Nwg|N?u|k6Er#6kK3b@Gzs(3#FeYz zsrJ_^ONlU0mdJZ8TPTKSXhN5g$TWvjktZdXZ4X|$b{Plp|8R(rr4m=JEL{&DBS9FK zQkO4Z3x|>WR2r*EUP>0j|MB52LN1@ajWsBhDTF`w4rJ4*@PB>6hX5Y?y#z0&(rZ$o zC>KA>br*yw7-Ne1XpOPO^V6b2rN4A}X$eimpHLac=8FJpZcvg_5ZuKMllO>j_vpv* zkk;J0?DU=3cF{l#+T&L}I*?kX- zsp-U(!vmm8oS6NcXM-=ptWv3Ky33Mx+ecwpf;meq@9J6^i>f0jjjba|I{!@{OxmK8 zw;=8RnblXn7qb(4cr|V*V6d8Gg5j z1T%b7_@UPh&4t55lS{!VxW}wOh_^{H!crWwnm}E zn};YQ8;;fK!AHS!!!ReU439-@<-XY zAPh?o3UF#o?XW`I2wn{CO;&|oAL{%qJo3TmQj-R@R|tpkdtG^tR)*<8>B`H9!hJ2q zUZw!0ojBb}?jV#g7nNrDM);c#1WZ^vTD4`Uy~lA!Jh6{>!Ie?;KL}0ZC)feir&q9U zbq_)}yVU)=4_m8u{C;>tFrqmiXozI!C3Q?yS z?8*F&*hi0NVH;k-%Qe;dBG>p)00_5^x0%LsdB?Q}>!L{kW|TcVlPKF-O|$k{0t_Vv zpc=i*W1@!%S?dR9^I|{J=@SpH-3=-4B?r{2j)wI7u&t!<5zKU`@iIij+XxtoE9s4N z@xv|z24NEW>4t=-^kXnx%Crake82{x@f;tZ5J)L=E0g^o6CPuTu+yovd(!@UbQl zSog*pSNN3==G=>B=j{X%@4UU^{XlOycW>{=B23|R4!`T;srRti*lSsefo~Dmy%&mv z80|Liyl63@7-`FtEBH19p7UuY4AMQt^R-ODT)Y!!N0Z>f*CAxr75nOjoWUAvUtcf? zEZOaFc-g|hpQP-}ONm9114K4x*7?MbnC{8El)@VkDb@KXuzl~sFx@8`K#>~I>>h)!Z{dj; z<)n*F+NUqoEP8>F$Ku)U_Z?hW+@$Dr2q&sMHD^eN=%sW_GNeQFWANM^qIZ#l9OB!4 z2syKdbBNB_j`jl_;>SmI2+O{UWe#y^kV7mg-nz-)j-h zAnBiD`q0^qu*Rb28oByx(ep&KAyo299~|pKBglZu*{eYcsy^@QKK967ns4U7#2AAOo!0OW~+6z(v2uU9^x$wyo|JEjEe{%NT%ETy`)3h=I7itvT(P*ZHC?2uxMndx;eyTyv<&9IT}^HV=W zTwU=4eMQUxdB}hh@IiD#+UaN9PFq{T2hYo`x)fl>y3k>)GFS209qLa$AibE*ptRIW zF{F`9mP}WKn{5+~l!)+!OoX49Ay`@+D&agu9eeSmK|1zQ45=gUgs&}l>fIc6Q~fbGa^vvK*q`dCnhT{PYu*n~WRBmV`TYBj#Z&xD)P3>)J2AFv zSxs{}9>0J8zHJ5ftpM6n^52YHY}OQOr(x7r?gRa~$)WaIu@MF{M}L@+^W9C_K3Z+m z6ula27}a=H)!8LWoIj#V_WyOt4O{T-2{!-I8}8fli~OeHq)$ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/AuthorizationCode.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/AuthorizationCode.php new file mode 100644 index 000000000000..18a20a20e223 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/AuthorizationCode.php @@ -0,0 +1,71 @@ +google.cloud.domains.v1beta1.AuthorizationCode + */ +class AuthorizationCode extends \Google\Protobuf\Internal\Message +{ + /** + * The Authorization Code in ASCII. It can be used to transfer the domain + * to or from another registrar. + * + * Generated from protobuf field string code = 1; + */ + protected $code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $code + * The Authorization Code in ASCII. It can be used to transfer the domain + * to or from another registrar. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * The Authorization Code in ASCII. It can be used to transfer the domain + * to or from another registrar. + * + * Generated from protobuf field string code = 1; + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * The Authorization Code in ASCII. It can be used to transfer the domain + * to or from another registrar. + * + * 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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureContactSettingsRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureContactSettingsRequest.php new file mode 100644 index 000000000000..a6eb4ec7efc6 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureContactSettingsRequest.php @@ -0,0 +1,239 @@ +google.cloud.domains.v1beta1.ConfigureContactSettingsRequest + */ +class ConfigureContactSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` whose contact settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $registration = ''; + /** + * Fields of the `ContactSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings contact_settings = 2; + */ + protected $contact_settings = null; + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the registrant contact is being updated, the + * `update_mask` is `"registrant_contact"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in `contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 4; + */ + private $contact_notices; + /** + * Validate the request without actually updating the contact settings. + * + * Generated from protobuf field bool validate_only = 5; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $registration + * Required. The name of the `Registration` whose contact settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * @type \Google\Cloud\Domains\V1beta1\ContactSettings $contact_settings + * Fields of the `ContactSettings` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the registrant contact is being updated, the + * `update_mask` is `"registrant_contact"`. + * @type array|\Google\Protobuf\Internal\RepeatedField $contact_notices + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in `contact_settings`. + * @type bool $validate_only + * Validate the request without actually updating the contact settings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` whose contact settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRegistration() + { + return $this->registration; + } + + /** + * Required. The name of the `Registration` whose contact settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkString($var, True); + $this->registration = $var; + + return $this; + } + + /** + * Fields of the `ContactSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings contact_settings = 2; + * @return \Google\Cloud\Domains\V1beta1\ContactSettings|null + */ + public function getContactSettings() + { + return $this->contact_settings; + } + + public function hasContactSettings() + { + return isset($this->contact_settings); + } + + public function clearContactSettings() + { + unset($this->contact_settings); + } + + /** + * Fields of the `ContactSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings contact_settings = 2; + * @param \Google\Cloud\Domains\V1beta1\ContactSettings $var + * @return $this + */ + public function setContactSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ContactSettings::class); + $this->contact_settings = $var; + + return $this; + } + + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the registrant contact is being updated, the + * `update_mask` is `"registrant_contact"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 describing which fields to update as a comma-separated list. + * For example, if only the registrant contact is being updated, the + * `update_mask` is `"registrant_contact"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in `contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContactNotices() + { + return $this->contact_notices; + } + + /** + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in `contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContactNotices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\ContactNotice::class); + $this->contact_notices = $arr; + + return $this; + } + + /** + * Validate the request without actually updating the contact settings. + * + * Generated from protobuf field bool validate_only = 5; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Validate the request without actually updating the contact settings. + * + * Generated from protobuf field bool validate_only = 5; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureDnsSettingsRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureDnsSettingsRequest.php new file mode 100644 index 000000000000..08d2543b1b9d --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureDnsSettingsRequest.php @@ -0,0 +1,221 @@ +google.cloud.domains.v1beta1.ConfigureDnsSettingsRequest + */ +class ConfigureDnsSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` whose DNS settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $registration = ''; + /** + * Fields of the `DnsSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings dns_settings = 2; + */ + protected $dns_settings = null; + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the name servers are being updated for an existing + * Custom DNS configuration, the `update_mask` is + * `"custom_dns.name_servers"`. + * When changing the DNS provider from one type to another, pass the new + * provider's field name as part of the field mask. For example, when changing + * from a Google Domains DNS configuration to a Custom DNS configuration, the + * `update_mask` is `"custom_dns"`. // + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Validate the request without actually updating the DNS settings. + * + * Generated from protobuf field bool validate_only = 4; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $registration + * Required. The name of the `Registration` whose DNS settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * @type \Google\Cloud\Domains\V1beta1\DnsSettings $dns_settings + * Fields of the `DnsSettings` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the name servers are being updated for an existing + * Custom DNS configuration, the `update_mask` is + * `"custom_dns.name_servers"`. + * When changing the DNS provider from one type to another, pass the new + * provider's field name as part of the field mask. For example, when changing + * from a Google Domains DNS configuration to a Custom DNS configuration, the + * `update_mask` is `"custom_dns"`. // + * @type bool $validate_only + * Validate the request without actually updating the DNS settings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` whose DNS settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRegistration() + { + return $this->registration; + } + + /** + * Required. The name of the `Registration` whose DNS settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkString($var, True); + $this->registration = $var; + + return $this; + } + + /** + * Fields of the `DnsSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings dns_settings = 2; + * @return \Google\Cloud\Domains\V1beta1\DnsSettings|null + */ + public function getDnsSettings() + { + return $this->dns_settings; + } + + public function hasDnsSettings() + { + return isset($this->dns_settings); + } + + public function clearDnsSettings() + { + unset($this->dns_settings); + } + + /** + * Fields of the `DnsSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings dns_settings = 2; + * @param \Google\Cloud\Domains\V1beta1\DnsSettings $var + * @return $this + */ + public function setDnsSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\DnsSettings::class); + $this->dns_settings = $var; + + return $this; + } + + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the name servers are being updated for an existing + * Custom DNS configuration, the `update_mask` is + * `"custom_dns.name_servers"`. + * When changing the DNS provider from one type to another, pass the new + * provider's field name as part of the field mask. For example, when changing + * from a Google Domains DNS configuration to a Custom DNS configuration, the + * `update_mask` is `"custom_dns"`. // + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 describing which fields to update as a comma-separated list. + * For example, if only the name servers are being updated for an existing + * Custom DNS configuration, the `update_mask` is + * `"custom_dns.name_servers"`. + * When changing the DNS provider from one type to another, pass the new + * provider's field name as part of the field mask. For example, when changing + * from a Google Domains DNS configuration to a Custom DNS configuration, the + * `update_mask` is `"custom_dns"`. // + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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; + } + + /** + * Validate the request without actually updating the DNS settings. + * + * Generated from protobuf field bool validate_only = 4; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Validate the request without actually updating the DNS settings. + * + * Generated from protobuf field bool validate_only = 4; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureManagementSettingsRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureManagementSettingsRequest.php new file mode 100644 index 000000000000..f19dfe7e7121 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureManagementSettingsRequest.php @@ -0,0 +1,167 @@ +google.cloud.domains.v1beta1.ConfigureManagementSettingsRequest + */ +class ConfigureManagementSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` whose management settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $registration = ''; + /** + * Fields of the `ManagementSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings management_settings = 2; + */ + protected $management_settings = null; + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the transfer lock is being updated, the `update_mask` + * is `"transfer_lock_state"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $registration + * Required. The name of the `Registration` whose management settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * @type \Google\Cloud\Domains\V1beta1\ManagementSettings $management_settings + * Fields of the `ManagementSettings` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the transfer lock is being updated, the `update_mask` + * is `"transfer_lock_state"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` whose management settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRegistration() + { + return $this->registration; + } + + /** + * Required. The name of the `Registration` whose management settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkString($var, True); + $this->registration = $var; + + return $this; + } + + /** + * Fields of the `ManagementSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings management_settings = 2; + * @return \Google\Cloud\Domains\V1beta1\ManagementSettings|null + */ + public function getManagementSettings() + { + return $this->management_settings; + } + + public function hasManagementSettings() + { + return isset($this->management_settings); + } + + public function clearManagementSettings() + { + unset($this->management_settings); + } + + /** + * Fields of the `ManagementSettings` to update. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings management_settings = 2; + * @param \Google\Cloud\Domains\V1beta1\ManagementSettings $var + * @return $this + */ + public function setManagementSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ManagementSettings::class); + $this->management_settings = $var; + + return $this; + } + + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the transfer lock is being updated, the `update_mask` + * is `"transfer_lock_state"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 describing which fields to update as a comma-separated list. + * For example, if only the transfer lock is being updated, the `update_mask` + * is `"transfer_lock_state"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactNotice.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactNotice.php new file mode 100644 index 000000000000..95d19bbb5b3b --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactNotice.php @@ -0,0 +1,55 @@ +google.cloud.domains.v1beta1.ContactNotice + */ +class ContactNotice +{ + /** + * The notice is undefined. + * + * Generated from protobuf enum CONTACT_NOTICE_UNSPECIFIED = 0; + */ + const CONTACT_NOTICE_UNSPECIFIED = 0; + /** + * Required when setting the `privacy` field of `ContactSettings` to + * `PUBLIC_CONTACT_DATA`, which exposes contact data publicly. + * + * Generated from protobuf enum PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT = 1; + */ + const PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT = 1; + + private static $valueToName = [ + self::CONTACT_NOTICE_UNSPECIFIED => 'CONTACT_NOTICE_UNSPECIFIED', + self::PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT => 'PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactPrivacy.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactPrivacy.php new file mode 100644 index 000000000000..9324a94243e1 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactPrivacy.php @@ -0,0 +1,81 @@ +google.cloud.domains.v1beta1.ContactPrivacy + */ +class ContactPrivacy +{ + /** + * The contact privacy settings are undefined. + * + * Generated from protobuf enum CONTACT_PRIVACY_UNSPECIFIED = 0; + */ + const CONTACT_PRIVACY_UNSPECIFIED = 0; + /** + * All the data from `ContactSettings` is publicly available. When setting + * this option, you must also provide a + * `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the + * request. + * + * Generated from protobuf enum PUBLIC_CONTACT_DATA = 1; + */ + const PUBLIC_CONTACT_DATA = 1; + /** + * None of the data from `ContactSettings` is publicly available. Instead, + * proxy contact data is published for your domain. Email sent to the proxy + * email address is forwarded to the registrant's email address. Cloud Domains + * provides this privacy proxy service at no additional cost. + * + * Generated from protobuf enum PRIVATE_CONTACT_DATA = 2; + */ + const PRIVATE_CONTACT_DATA = 2; + /** + * Some data from `ContactSettings` is publicly available. The actual + * information redacted depends on the domain. For details, see [the + * registration privacy + * article](https://support.google.com/domains/answer/3251242). + * + * Generated from protobuf enum REDACTED_CONTACT_DATA = 3; + */ + const REDACTED_CONTACT_DATA = 3; + + private static $valueToName = [ + self::CONTACT_PRIVACY_UNSPECIFIED => 'CONTACT_PRIVACY_UNSPECIFIED', + self::PUBLIC_CONTACT_DATA => 'PUBLIC_CONTACT_DATA', + self::PRIVATE_CONTACT_DATA => 'PRIVATE_CONTACT_DATA', + self::REDACTED_CONTACT_DATA => 'REDACTED_CONTACT_DATA', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings.php new file mode 100644 index 000000000000..49086fe471b0 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings.php @@ -0,0 +1,222 @@ +google.cloud.domains.v1beta1.ContactSettings + */ +class ContactSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Privacy setting for the contacts associated with the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactPrivacy privacy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $privacy = 0; + /** + * Required. The registrant contact for the `Registration`. + * *Caution: Anyone with access to this email address, phone number, + * and/or postal address can take control of the domain.* + * *Warning: For new `Registration`s, the registrant receives an email + * confirmation that they must complete within 15 days to avoid domain + * suspension.* + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact registrant_contact = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $registrant_contact = null; + /** + * Required. The administrative contact for the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact admin_contact = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $admin_contact = null; + /** + * Required. The technical contact for the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact technical_contact = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $technical_contact = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $privacy + * Required. Privacy setting for the contacts associated with the `Registration`. + * @type \Google\Cloud\Domains\V1beta1\ContactSettings\Contact $registrant_contact + * Required. The registrant contact for the `Registration`. + * *Caution: Anyone with access to this email address, phone number, + * and/or postal address can take control of the domain.* + * *Warning: For new `Registration`s, the registrant receives an email + * confirmation that they must complete within 15 days to avoid domain + * suspension.* + * @type \Google\Cloud\Domains\V1beta1\ContactSettings\Contact $admin_contact + * Required. The administrative contact for the `Registration`. + * @type \Google\Cloud\Domains\V1beta1\ContactSettings\Contact $technical_contact + * Required. The technical contact for the `Registration`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. Privacy setting for the contacts associated with the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactPrivacy privacy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getPrivacy() + { + return $this->privacy; + } + + /** + * Required. Privacy setting for the contacts associated with the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactPrivacy privacy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setPrivacy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\ContactPrivacy::class); + $this->privacy = $var; + + return $this; + } + + /** + * Required. The registrant contact for the `Registration`. + * *Caution: Anyone with access to this email address, phone number, + * and/or postal address can take control of the domain.* + * *Warning: For new `Registration`s, the registrant receives an email + * confirmation that they must complete within 15 days to avoid domain + * suspension.* + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact registrant_contact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Domains\V1beta1\ContactSettings\Contact|null + */ + public function getRegistrantContact() + { + return $this->registrant_contact; + } + + public function hasRegistrantContact() + { + return isset($this->registrant_contact); + } + + public function clearRegistrantContact() + { + unset($this->registrant_contact); + } + + /** + * Required. The registrant contact for the `Registration`. + * *Caution: Anyone with access to this email address, phone number, + * and/or postal address can take control of the domain.* + * *Warning: For new `Registration`s, the registrant receives an email + * confirmation that they must complete within 15 days to avoid domain + * suspension.* + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact registrant_contact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Domains\V1beta1\ContactSettings\Contact $var + * @return $this + */ + public function setRegistrantContact($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ContactSettings\Contact::class); + $this->registrant_contact = $var; + + return $this; + } + + /** + * Required. The administrative contact for the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact admin_contact = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Domains\V1beta1\ContactSettings\Contact|null + */ + public function getAdminContact() + { + return $this->admin_contact; + } + + public function hasAdminContact() + { + return isset($this->admin_contact); + } + + public function clearAdminContact() + { + unset($this->admin_contact); + } + + /** + * Required. The administrative contact for the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact admin_contact = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Domains\V1beta1\ContactSettings\Contact $var + * @return $this + */ + public function setAdminContact($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ContactSettings\Contact::class); + $this->admin_contact = $var; + + return $this; + } + + /** + * Required. The technical contact for the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact technical_contact = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Domains\V1beta1\ContactSettings\Contact|null + */ + public function getTechnicalContact() + { + return $this->technical_contact; + } + + public function hasTechnicalContact() + { + return isset($this->technical_contact); + } + + public function clearTechnicalContact() + { + unset($this->technical_contact); + } + + /** + * Required. The technical contact for the `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact technical_contact = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Domains\V1beta1\ContactSettings\Contact $var + * @return $this + */ + public function setTechnicalContact($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ContactSettings\Contact::class); + $this->technical_contact = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings/Contact.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings/Contact.php new file mode 100644 index 000000000000..2836ffe5f282 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings/Contact.php @@ -0,0 +1,190 @@ +google.cloud.domains.v1beta1.ContactSettings.Contact + */ +class Contact extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Postal address of the contact. + * + * Generated from protobuf field .google.type.PostalAddress postal_address = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $postal_address = null; + /** + * Required. Email address of the contact. + * + * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $email = ''; + /** + * Required. Phone number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * + * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $phone_number = ''; + /** + * Fax number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * + * Generated from protobuf field string fax_number = 4; + */ + protected $fax_number = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\PostalAddress $postal_address + * Required. Postal address of the contact. + * @type string $email + * Required. Email address of the contact. + * @type string $phone_number + * Required. Phone number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * @type string $fax_number + * Fax number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. Postal address of the contact. + * + * Generated from protobuf field .google.type.PostalAddress postal_address = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\PostalAddress|null + */ + public function getPostalAddress() + { + return $this->postal_address; + } + + public function hasPostalAddress() + { + return isset($this->postal_address); + } + + public function clearPostalAddress() + { + unset($this->postal_address); + } + + /** + * Required. Postal address of the contact. + * + * Generated from protobuf field .google.type.PostalAddress postal_address = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\PostalAddress $var + * @return $this + */ + public function setPostalAddress($var) + { + GPBUtil::checkMessage($var, \Google\Type\PostalAddress::class); + $this->postal_address = $var; + + return $this; + } + + /** + * Required. Email address of the contact. + * + * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Required. Email address of the contact. + * + * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * Required. Phone number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * + * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPhoneNumber() + { + return $this->phone_number; + } + + /** + * Required. Phone number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * + * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPhoneNumber($var) + { + GPBUtil::checkString($var, True); + $this->phone_number = $var; + + return $this; + } + + /** + * Fax number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * + * Generated from protobuf field string fax_number = 4; + * @return string + */ + public function getFaxNumber() + { + return $this->fax_number; + } + + /** + * Fax number of the contact in international format. For example, + * `"+1-800-555-0123"`. + * + * Generated from protobuf field string fax_number = 4; + * @param string $var + * @return $this + */ + public function setFaxNumber($var) + { + GPBUtil::checkString($var, True); + $this->fax_number = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Contact::class, \Google\Cloud\Domains\V1beta1\ContactSettings_Contact::class); + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings_Contact.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings_Contact.php new file mode 100644 index 000000000000..1dde8a4b83d0 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings_Contact.php @@ -0,0 +1,16 @@ +google.cloud.domains.v1beta1.DeleteRegistrationRequest + */ +class DeleteRegistrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` to delete, + * in the format `projects/*/locations/*/registrations/*`. + * + * 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 name of the `Registration` to delete, + * in the format `projects/*/locations/*/registrations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` to delete, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated 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 `Registration` to delete, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings.php new file mode 100644 index 000000000000..bb2f49d3e819 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings.php @@ -0,0 +1,146 @@ +google.cloud.domains.v1beta1.DnsSettings + */ +class DnsSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The list of glue records for this `Registration`. Commonly empty. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.GlueRecord glue_records = 4; + */ + private $glue_records; + protected $dns_provider; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Domains\V1beta1\DnsSettings\CustomDns $custom_dns + * An arbitrary DNS provider identified by its name servers. + * @type \Google\Cloud\Domains\V1beta1\DnsSettings\GoogleDomainsDns $google_domains_dns + * The free DNS zone provided by + * [Google Domains](https://domains.google/). + * @type array<\Google\Cloud\Domains\V1beta1\DnsSettings\GlueRecord>|\Google\Protobuf\Internal\RepeatedField $glue_records + * The list of glue records for this `Registration`. Commonly empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * An arbitrary DNS provider identified by its name servers. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.CustomDns custom_dns = 1; + * @return \Google\Cloud\Domains\V1beta1\DnsSettings\CustomDns|null + */ + public function getCustomDns() + { + return $this->readOneof(1); + } + + public function hasCustomDns() + { + return $this->hasOneof(1); + } + + /** + * An arbitrary DNS provider identified by its name servers. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.CustomDns custom_dns = 1; + * @param \Google\Cloud\Domains\V1beta1\DnsSettings\CustomDns $var + * @return $this + */ + public function setCustomDns($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\DnsSettings\CustomDns::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The free DNS zone provided by + * [Google Domains](https://domains.google/). + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.GoogleDomainsDns google_domains_dns = 2; + * @return \Google\Cloud\Domains\V1beta1\DnsSettings\GoogleDomainsDns|null + */ + public function getGoogleDomainsDns() + { + return $this->readOneof(2); + } + + public function hasGoogleDomainsDns() + { + return $this->hasOneof(2); + } + + /** + * The free DNS zone provided by + * [Google Domains](https://domains.google/). + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.GoogleDomainsDns google_domains_dns = 2; + * @param \Google\Cloud\Domains\V1beta1\DnsSettings\GoogleDomainsDns $var + * @return $this + */ + public function setGoogleDomainsDns($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\DnsSettings\GoogleDomainsDns::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The list of glue records for this `Registration`. Commonly empty. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.GlueRecord glue_records = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGlueRecords() + { + return $this->glue_records; + } + + /** + * The list of glue records for this `Registration`. Commonly empty. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.GlueRecord glue_records = 4; + * @param array<\Google\Cloud\Domains\V1beta1\DnsSettings\GlueRecord>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGlueRecords($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1beta1\DnsSettings\GlueRecord::class); + $this->glue_records = $arr; + + return $this; + } + + /** + * @return string + */ + public function getDnsProvider() + { + return $this->whichOneof("dns_provider"); + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/CustomDns.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/CustomDns.php new file mode 100644 index 000000000000..1650693d6a8d --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/CustomDns.php @@ -0,0 +1,120 @@ +google.cloud.domains.v1beta1.DnsSettings.CustomDns + */ +class CustomDns extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. + * + * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $name_servers; + /** + * The list of DS records for this domain, which are used to enable DNSSEC. + * The domain's DNS provider can provide the values to set here. If this + * field is empty, DNSSEC is disabled. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.DsRecord ds_records = 2; + */ + private $ds_records; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $name_servers + * Required. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. + * @type array<\Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $ds_records + * The list of DS records for this domain, which are used to enable DNSSEC. + * The domain's DNS provider can provide the values to set here. If this + * field is empty, DNSSEC is disabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. + * + * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNameServers() + { + return $this->name_servers; + } + + /** + * Required. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. + * + * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNameServers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->name_servers = $arr; + + return $this; + } + + /** + * The list of DS records for this domain, which are used to enable DNSSEC. + * The domain's DNS provider can provide the values to set here. If this + * field is empty, DNSSEC is disabled. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.DsRecord ds_records = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDsRecords() + { + return $this->ds_records; + } + + /** + * The list of DS records for this domain, which are used to enable DNSSEC. + * The domain's DNS provider can provide the values to set here. If this + * field is empty, DNSSEC is disabled. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.DsRecord ds_records = 2; + * @param array<\Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDsRecords($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord::class); + $this->ds_records = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CustomDns::class, \Google\Cloud\Domains\V1beta1\DnsSettings_CustomDns::class); + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord.php new file mode 100644 index 000000000000..db8290eefe45 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord.php @@ -0,0 +1,174 @@ +google.cloud.domains.v1beta1.DnsSettings.DsRecord + */ +class DsRecord extends \Google\Protobuf\Internal\Message +{ + /** + * The key tag of the record. Must be set in range 0 -- 65535. + * + * Generated from protobuf field int32 key_tag = 1; + */ + protected $key_tag = 0; + /** + * The algorithm used to generate the referenced DNSKEY. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsRecord.Algorithm algorithm = 2; + */ + protected $algorithm = 0; + /** + * The hash function used to generate the digest of the referenced DNSKEY. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsRecord.DigestType digest_type = 3; + */ + protected $digest_type = 0; + /** + * The digest generated from the referenced DNSKEY. + * + * Generated from protobuf field string digest = 4; + */ + protected $digest = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $key_tag + * The key tag of the record. Must be set in range 0 -- 65535. + * @type int $algorithm + * The algorithm used to generate the referenced DNSKEY. + * @type int $digest_type + * The hash function used to generate the digest of the referenced DNSKEY. + * @type string $digest + * The digest generated from the referenced DNSKEY. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * The key tag of the record. Must be set in range 0 -- 65535. + * + * Generated from protobuf field int32 key_tag = 1; + * @return int + */ + public function getKeyTag() + { + return $this->key_tag; + } + + /** + * The key tag of the record. Must be set in range 0 -- 65535. + * + * Generated from protobuf field int32 key_tag = 1; + * @param int $var + * @return $this + */ + public function setKeyTag($var) + { + GPBUtil::checkInt32($var); + $this->key_tag = $var; + + return $this; + } + + /** + * The algorithm used to generate the referenced DNSKEY. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsRecord.Algorithm algorithm = 2; + * @return int + */ + public function getAlgorithm() + { + return $this->algorithm; + } + + /** + * The algorithm used to generate the referenced DNSKEY. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsRecord.Algorithm algorithm = 2; + * @param int $var + * @return $this + */ + public function setAlgorithm($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord\Algorithm::class); + $this->algorithm = $var; + + return $this; + } + + /** + * The hash function used to generate the digest of the referenced DNSKEY. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsRecord.DigestType digest_type = 3; + * @return int + */ + public function getDigestType() + { + return $this->digest_type; + } + + /** + * The hash function used to generate the digest of the referenced DNSKEY. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsRecord.DigestType digest_type = 3; + * @param int $var + * @return $this + */ + public function setDigestType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord\DigestType::class); + $this->digest_type = $var; + + return $this; + } + + /** + * The digest generated from the referenced DNSKEY. + * + * Generated from protobuf field string digest = 4; + * @return string + */ + public function getDigest() + { + return $this->digest; + } + + /** + * The digest generated from the referenced DNSKEY. + * + * Generated from protobuf field string digest = 4; + * @param string $var + * @return $this + */ + public function setDigest($var) + { + GPBUtil::checkString($var, True); + $this->digest = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DsRecord::class, \Google\Cloud\Domains\V1beta1\DnsSettings_DsRecord::class); + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/Algorithm.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/Algorithm.php new file mode 100644 index 000000000000..8685ec7b55b0 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/Algorithm.php @@ -0,0 +1,170 @@ +google.cloud.domains.v1beta1.DnsSettings.DsRecord.Algorithm + */ +class Algorithm +{ + /** + * The algorithm is unspecified. + * + * Generated from protobuf enum ALGORITHM_UNSPECIFIED = 0; + */ + const ALGORITHM_UNSPECIFIED = 0; + /** + * RSA/MD5. Cannot be used for new deployments. + * + * Generated from protobuf enum RSAMD5 = 1; + */ + const RSAMD5 = 1; + /** + * Diffie-Hellman. Cannot be used for new deployments. + * + * Generated from protobuf enum DH = 2; + */ + const DH = 2; + /** + * DSA/SHA1. Not recommended for new deployments. + * + * Generated from protobuf enum DSA = 3; + */ + const DSA = 3; + /** + * ECC. Not recommended for new deployments. + * + * Generated from protobuf enum ECC = 4; + */ + const ECC = 4; + /** + * RSA/SHA-1. Not recommended for new deployments. + * + * Generated from protobuf enum RSASHA1 = 5; + */ + const RSASHA1 = 5; + /** + * DSA-NSEC3-SHA1. Not recommended for new deployments. + * + * Generated from protobuf enum DSANSEC3SHA1 = 6; + */ + const DSANSEC3SHA1 = 6; + /** + * RSA/SHA1-NSEC3-SHA1. Not recommended for new deployments. + * + * Generated from protobuf enum RSASHA1NSEC3SHA1 = 7; + */ + const RSASHA1NSEC3SHA1 = 7; + /** + * RSA/SHA-256. + * + * Generated from protobuf enum RSASHA256 = 8; + */ + const RSASHA256 = 8; + /** + * RSA/SHA-512. + * + * Generated from protobuf enum RSASHA512 = 10; + */ + const RSASHA512 = 10; + /** + * GOST R 34.10-2001. + * + * Generated from protobuf enum ECCGOST = 12; + */ + const ECCGOST = 12; + /** + * ECDSA Curve P-256 with SHA-256. + * + * Generated from protobuf enum ECDSAP256SHA256 = 13; + */ + const ECDSAP256SHA256 = 13; + /** + * ECDSA Curve P-384 with SHA-384. + * + * Generated from protobuf enum ECDSAP384SHA384 = 14; + */ + const ECDSAP384SHA384 = 14; + /** + * Ed25519. + * + * Generated from protobuf enum ED25519 = 15; + */ + const ED25519 = 15; + /** + * Ed448. + * + * Generated from protobuf enum ED448 = 16; + */ + const ED448 = 16; + /** + * Reserved for Indirect Keys. Cannot be used for new deployments. + * + * Generated from protobuf enum INDIRECT = 252; + */ + const INDIRECT = 252; + /** + * Private algorithm. Cannot be used for new deployments. + * + * Generated from protobuf enum PRIVATEDNS = 253; + */ + const PRIVATEDNS = 253; + /** + * Private algorithm OID. Cannot be used for new deployments. + * + * Generated from protobuf enum PRIVATEOID = 254; + */ + const PRIVATEOID = 254; + + private static $valueToName = [ + self::ALGORITHM_UNSPECIFIED => 'ALGORITHM_UNSPECIFIED', + self::RSAMD5 => 'RSAMD5', + self::DH => 'DH', + self::DSA => 'DSA', + self::ECC => 'ECC', + self::RSASHA1 => 'RSASHA1', + self::DSANSEC3SHA1 => 'DSANSEC3SHA1', + self::RSASHA1NSEC3SHA1 => 'RSASHA1NSEC3SHA1', + self::RSASHA256 => 'RSASHA256', + self::RSASHA512 => 'RSASHA512', + self::ECCGOST => 'ECCGOST', + self::ECDSAP256SHA256 => 'ECDSAP256SHA256', + self::ECDSAP384SHA384 => 'ECDSAP384SHA384', + self::ED25519 => 'ED25519', + self::ED448 => 'ED448', + self::INDIRECT => 'INDIRECT', + self::PRIVATEDNS => 'PRIVATEDNS', + self::PRIVATEOID => 'PRIVATEOID', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Algorithm::class, \Google\Cloud\Domains\V1beta1\DnsSettings_DsRecord_Algorithm::class); + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/DigestType.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/DigestType.php new file mode 100644 index 000000000000..cdc987629ae4 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/DigestType.php @@ -0,0 +1,79 @@ +google.cloud.domains.v1beta1.DnsSettings.DsRecord.DigestType + */ +class DigestType +{ + /** + * The DigestType is unspecified. + * + * Generated from protobuf enum DIGEST_TYPE_UNSPECIFIED = 0; + */ + const DIGEST_TYPE_UNSPECIFIED = 0; + /** + * SHA-1. Not recommended for new deployments. + * + * Generated from protobuf enum SHA1 = 1; + */ + const SHA1 = 1; + /** + * SHA-256. + * + * Generated from protobuf enum SHA256 = 2; + */ + const SHA256 = 2; + /** + * GOST R 34.11-94. + * + * Generated from protobuf enum GOST3411 = 3; + */ + const GOST3411 = 3; + /** + * SHA-384. + * + * Generated from protobuf enum SHA384 = 4; + */ + const SHA384 = 4; + + private static $valueToName = [ + self::DIGEST_TYPE_UNSPECIFIED => 'DIGEST_TYPE_UNSPECIFIED', + self::SHA1 => 'SHA1', + self::SHA256 => 'SHA256', + self::GOST3411 => 'GOST3411', + self::SHA384 => 'SHA384', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DigestType::class, \Google\Cloud\Domains\V1beta1\DnsSettings_DsRecord_DigestType::class); + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsState.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsState.php new file mode 100644 index 000000000000..c201dec2b64e --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsState.php @@ -0,0 +1,68 @@ +google.cloud.domains.v1beta1.DnsSettings.DsState + */ +class DsState +{ + /** + * DS state is unspecified. + * + * Generated from protobuf enum DS_STATE_UNSPECIFIED = 0; + */ + const DS_STATE_UNSPECIFIED = 0; + /** + * DNSSEC is disabled for this domain. No DS records for this domain are + * published in the parent DNS zone. + * + * Generated from protobuf enum DS_RECORDS_UNPUBLISHED = 1; + */ + const DS_RECORDS_UNPUBLISHED = 1; + /** + * DNSSEC is enabled for this domain. Appropriate DS records for this domain + * are published in the parent DNS zone. This option is valid only if the + * DNS zone referenced in the `Registration`'s `dns_provider` field is + * already DNSSEC-signed. + * + * Generated from protobuf enum DS_RECORDS_PUBLISHED = 2; + */ + const DS_RECORDS_PUBLISHED = 2; + + private static $valueToName = [ + self::DS_STATE_UNSPECIFIED => 'DS_STATE_UNSPECIFIED', + self::DS_RECORDS_UNPUBLISHED => 'DS_RECORDS_UNPUBLISHED', + self::DS_RECORDS_PUBLISHED => 'DS_RECORDS_PUBLISHED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DsState::class, \Google\Cloud\Domains\V1beta1\DnsSettings_DsState::class); + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GlueRecord.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GlueRecord.php new file mode 100644 index 000000000000..a6c0d7883c9c --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GlueRecord.php @@ -0,0 +1,159 @@ +google.cloud.domains.v1beta1.DnsSettings.GlueRecord + */ +class GlueRecord extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Domain name of the host in Punycode format. + * + * Generated from protobuf field string host_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $host_name = ''; + /** + * List of IPv4 addresses corresponding to this host in the standard decimal + * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and + * `ipv6_address` must be set. + * + * Generated from protobuf field repeated string ipv4_addresses = 2; + */ + private $ipv4_addresses; + /** + * List of IPv6 addresses corresponding to this host in the standard + * hexadecimal format (e.g. `2001:db8::`). At least one of + * `ipv4_address` and `ipv6_address` must be set. + * + * Generated from protobuf field repeated string ipv6_addresses = 3; + */ + private $ipv6_addresses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $host_name + * Required. Domain name of the host in Punycode format. + * @type array|\Google\Protobuf\Internal\RepeatedField $ipv4_addresses + * List of IPv4 addresses corresponding to this host in the standard decimal + * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and + * `ipv6_address` must be set. + * @type array|\Google\Protobuf\Internal\RepeatedField $ipv6_addresses + * List of IPv6 addresses corresponding to this host in the standard + * hexadecimal format (e.g. `2001:db8::`). At least one of + * `ipv4_address` and `ipv6_address` must be set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. Domain name of the host in Punycode format. + * + * Generated from protobuf field string host_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHostName() + { + return $this->host_name; + } + + /** + * Required. Domain name of the host in Punycode format. + * + * Generated from protobuf field string host_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHostName($var) + { + GPBUtil::checkString($var, True); + $this->host_name = $var; + + return $this; + } + + /** + * List of IPv4 addresses corresponding to this host in the standard decimal + * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and + * `ipv6_address` must be set. + * + * Generated from protobuf field repeated string ipv4_addresses = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpv4Addresses() + { + return $this->ipv4_addresses; + } + + /** + * List of IPv4 addresses corresponding to this host in the standard decimal + * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and + * `ipv6_address` must be set. + * + * Generated from protobuf field repeated string ipv4_addresses = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpv4Addresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ipv4_addresses = $arr; + + return $this; + } + + /** + * List of IPv6 addresses corresponding to this host in the standard + * hexadecimal format (e.g. `2001:db8::`). At least one of + * `ipv4_address` and `ipv6_address` must be set. + * + * Generated from protobuf field repeated string ipv6_addresses = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpv6Addresses() + { + return $this->ipv6_addresses; + } + + /** + * List of IPv6 addresses corresponding to this host in the standard + * hexadecimal format (e.g. `2001:db8::`). At least one of + * `ipv4_address` and `ipv6_address` must be set. + * + * Generated from protobuf field repeated string ipv6_addresses = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpv6Addresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ipv6_addresses = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GlueRecord::class, \Google\Cloud\Domains\V1beta1\DnsSettings_GlueRecord::class); + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GoogleDomainsDns.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GoogleDomainsDns.php new file mode 100644 index 000000000000..630f80b1f07e --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GoogleDomainsDns.php @@ -0,0 +1,165 @@ +google.cloud.domains.v1beta1.DnsSettings.GoogleDomainsDns + */ +class GoogleDomainsDns extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. This field is automatically populated with the name + * servers assigned to the Google Domains DNS zone. + * + * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $name_servers; + /** + * Required. The state of DS records for this domain. Used to enable or disable + * automatic DNSSEC. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsState ds_state = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ds_state = 0; + /** + * Output only. The list of DS records published for this domain. The list is + * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, + * otherwise it remains empty. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.DsRecord ds_records = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $ds_records; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $name_servers + * Output only. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. This field is automatically populated with the name + * servers assigned to the Google Domains DNS zone. + * @type int $ds_state + * Required. The state of DS records for this domain. Used to enable or disable + * automatic DNSSEC. + * @type array<\Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $ds_records + * Output only. The list of DS records published for this domain. The list is + * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, + * otherwise it remains empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Output only. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. This field is automatically populated with the name + * servers assigned to the Google Domains DNS zone. + * + * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNameServers() + { + return $this->name_servers; + } + + /** + * Output only. A list of name servers that store the DNS zone for this domain. Each name + * server is a domain name, with Unicode domain names expressed in + * Punycode format. This field is automatically populated with the name + * servers assigned to the Google Domains DNS zone. + * + * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNameServers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->name_servers = $arr; + + return $this; + } + + /** + * Required. The state of DS records for this domain. Used to enable or disable + * automatic DNSSEC. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsState ds_state = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDsState() + { + return $this->ds_state; + } + + /** + * Required. The state of DS records for this domain. Used to enable or disable + * automatic DNSSEC. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsState ds_state = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDsState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\DnsSettings\DsState::class); + $this->ds_state = $var; + + return $this; + } + + /** + * Output only. The list of DS records published for this domain. The list is + * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, + * otherwise it remains empty. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.DsRecord ds_records = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDsRecords() + { + return $this->ds_records; + } + + /** + * Output only. The list of DS records published for this domain. The list is + * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, + * otherwise it remains empty. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.DsRecord ds_records = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDsRecords($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord::class); + $this->ds_records = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GoogleDomainsDns::class, \Google\Cloud\Domains\V1beta1\DnsSettings_GoogleDomainsDns::class); + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_CustomDns.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_CustomDns.php new file mode 100644 index 000000000000..882fc0641a52 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_CustomDns.php @@ -0,0 +1,16 @@ +google.cloud.domains.v1beta1.DomainNotice + */ +class DomainNotice +{ + /** + * The notice is undefined. + * + * Generated from protobuf enum DOMAIN_NOTICE_UNSPECIFIED = 0; + */ + const DOMAIN_NOTICE_UNSPECIFIED = 0; + /** + * Indicates that the domain is preloaded on the HTTP Strict Transport + * Security list in browsers. Serving a website on such domain requires + * an SSL certificate. For details, see + * [how to get an SSL + * certificate](https://support.google.com/domains/answer/7638036). + * + * Generated from protobuf enum HSTS_PRELOADED = 1; + */ + const HSTS_PRELOADED = 1; + + private static $valueToName = [ + self::DOMAIN_NOTICE_UNSPECIFIED => 'DOMAIN_NOTICE_UNSPECIFIED', + self::HSTS_PRELOADED => 'HSTS_PRELOADED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DomainsGrpcClient.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DomainsGrpcClient.php new file mode 100644 index 000000000000..d9ca6f6b1493 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DomainsGrpcClient.php @@ -0,0 +1,341 @@ +_simpleRequest('/google.cloud.domains.v1beta1.Domains/SearchDomains', + $argument, + ['\Google\Cloud\Domains\V1beta1\SearchDomainsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets parameters needed to register a new domain name, including price and + * up-to-date availability. Use the returned values to call `RegisterDomain`. + * @param \Google\Cloud\Domains\V1beta1\RetrieveRegisterParametersRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RetrieveRegisterParameters(\Google\Cloud\Domains\V1beta1\RetrieveRegisterParametersRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/RetrieveRegisterParameters', + $argument, + ['\Google\Cloud\Domains\V1beta1\RetrieveRegisterParametersResponse', 'decode'], + $metadata, $options); + } + + /** + * Registers a new domain name and creates a corresponding `Registration` + * resource. + * + * Call `RetrieveRegisterParameters` first to check availability of the domain + * name and determine parameters like price that are needed to build a call to + * this method. + * + * A successful call creates a `Registration` resource in state + * `REGISTRATION_PENDING`, which resolves to `ACTIVE` within 1-2 + * minutes, indicating that the domain was successfully registered. If the + * resource ends up in state `REGISTRATION_FAILED`, it indicates that the + * domain was not registered successfully, and you can safely delete the + * resource and retry registration. + * @param \Google\Cloud\Domains\V1beta1\RegisterDomainRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RegisterDomain(\Google\Cloud\Domains\V1beta1\RegisterDomainRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/RegisterDomain', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Gets parameters needed to transfer a domain name from another registrar to + * Cloud Domains. For domains managed by Google Domains, transferring to Cloud + * Domains is not supported. + * + * + * Use the returned values to call `TransferDomain`. + * @param \Google\Cloud\Domains\V1beta1\RetrieveTransferParametersRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RetrieveTransferParameters(\Google\Cloud\Domains\V1beta1\RetrieveTransferParametersRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/RetrieveTransferParameters', + $argument, + ['\Google\Cloud\Domains\V1beta1\RetrieveTransferParametersResponse', 'decode'], + $metadata, $options); + } + + /** + * Transfers a domain name from another registrar to Cloud Domains. For + * domains managed by Google Domains, transferring to Cloud Domains is not + * supported. + * + * + * Before calling this method, go to the domain's current registrar to unlock + * the domain for transfer and retrieve the domain's transfer authorization + * code. Then call `RetrieveTransferParameters` to confirm that the domain is + * unlocked and to get values needed to build a call to this method. + * + * A successful call creates a `Registration` resource in state + * `TRANSFER_PENDING`. It can take several days to complete the transfer + * process. The registrant can often speed up this process by approving the + * transfer through the current registrar, either by clicking a link in an + * email from the registrar or by visiting the registrar's website. + * + * A few minutes after transfer approval, the resource transitions to state + * `ACTIVE`, indicating that the transfer was successful. If the transfer is + * rejected or the request expires without being approved, the resource can + * end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete + * the resource and retry the transfer. + * @param \Google\Cloud\Domains\V1beta1\TransferDomainRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function TransferDomain(\Google\Cloud\Domains\V1beta1\TransferDomainRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/TransferDomain', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists the `Registration` resources in a project. + * @param \Google\Cloud\Domains\V1beta1\ListRegistrationsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListRegistrations(\Google\Cloud\Domains\V1beta1\ListRegistrationsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/ListRegistrations', + $argument, + ['\Google\Cloud\Domains\V1beta1\ListRegistrationsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets the details of a `Registration` resource. + * @param \Google\Cloud\Domains\V1beta1\GetRegistrationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetRegistration(\Google\Cloud\Domains\V1beta1\GetRegistrationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/GetRegistration', + $argument, + ['\Google\Cloud\Domains\V1beta1\Registration', 'decode'], + $metadata, $options); + } + + /** + * Updates select fields of a `Registration` resource, notably `labels`. To + * update other fields, use the appropriate custom update method: + * + * * To update management settings, see `ConfigureManagementSettings` + * * To update DNS configuration, see `ConfigureDnsSettings` + * * To update contact information, see `ConfigureContactSettings` + * @param \Google\Cloud\Domains\V1beta1\UpdateRegistrationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateRegistration(\Google\Cloud\Domains\V1beta1\UpdateRegistrationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/UpdateRegistration', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates a `Registration`'s management settings. + * @param \Google\Cloud\Domains\V1beta1\ConfigureManagementSettingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ConfigureManagementSettings(\Google\Cloud\Domains\V1beta1\ConfigureManagementSettingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/ConfigureManagementSettings', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates a `Registration`'s DNS settings. + * @param \Google\Cloud\Domains\V1beta1\ConfigureDnsSettingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ConfigureDnsSettings(\Google\Cloud\Domains\V1beta1\ConfigureDnsSettingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/ConfigureDnsSettings', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates a `Registration`'s contact settings. Some changes require + * confirmation by the domain's registrant contact . + * @param \Google\Cloud\Domains\V1beta1\ConfigureContactSettingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ConfigureContactSettings(\Google\Cloud\Domains\V1beta1\ConfigureContactSettingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/ConfigureContactSettings', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Exports a `Registration` resource, such that it is no longer managed by + * Cloud Domains. + * + * When an active domain is successfully exported, you can continue to use the + * domain in [Google Domains](https://domains.google/) until it expires. The + * calling user becomes the domain's sole owner in Google Domains, and + * permissions for the domain are subsequently managed there. The domain does + * not renew automatically unless the new owner sets up billing in Google + * Domains. + * @param \Google\Cloud\Domains\V1beta1\ExportRegistrationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ExportRegistration(\Google\Cloud\Domains\V1beta1\ExportRegistrationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/ExportRegistration', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a `Registration` resource. + * + * This method works on any `Registration` resource using [Subscription or + * Commitment billing](/domains/pricing#billing-models), provided that the + * resource was created at least 1 day in the past. + * + * For `Registration` resources using + * [Monthly billing](/domains/pricing#billing-models), this method works if: + * + * * `state` is `EXPORTED` with `expire_time` in the past + * * `state` is `REGISTRATION_FAILED` + * * `state` is `TRANSFER_FAILED` + * + * When an active registration is successfully deleted, you can continue to + * use the domain in [Google Domains](https://domains.google/) until it + * expires. The calling user becomes the domain's sole owner in Google + * Domains, and permissions for the domain are subsequently managed there. The + * domain does not renew automatically unless the new owner sets up billing in + * Google Domains. + * @param \Google\Cloud\Domains\V1beta1\DeleteRegistrationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteRegistration(\Google\Cloud\Domains\V1beta1\DeleteRegistrationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/DeleteRegistration', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Gets the authorization code of the `Registration` for the purpose of + * transferring the domain to another registrar. + * + * You can call this method only after 60 days have elapsed since the initial + * domain registration. + * @param \Google\Cloud\Domains\V1beta1\RetrieveAuthorizationCodeRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RetrieveAuthorizationCode(\Google\Cloud\Domains\V1beta1\RetrieveAuthorizationCodeRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/RetrieveAuthorizationCode', + $argument, + ['\Google\Cloud\Domains\V1beta1\AuthorizationCode', 'decode'], + $metadata, $options); + } + + /** + * Resets the authorization code of the `Registration` to a new random string. + * + * You can call this method only after 60 days have elapsed since the initial + * domain registration. + * @param \Google\Cloud\Domains\V1beta1\ResetAuthorizationCodeRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ResetAuthorizationCode(\Google\Cloud\Domains\V1beta1\ResetAuthorizationCodeRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/ResetAuthorizationCode', + $argument, + ['\Google\Cloud\Domains\V1beta1\AuthorizationCode', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ExportRegistrationRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ExportRegistrationRequest.php new file mode 100644 index 000000000000..8ece729ad5d4 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ExportRegistrationRequest.php @@ -0,0 +1,71 @@ +google.cloud.domains.v1beta1.ExportRegistrationRequest + */ +class ExportRegistrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` to export, + * in the format `projects/*/locations/*/registrations/*`. + * + * 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 name of the `Registration` to export, + * in the format `projects/*/locations/*/registrations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` to export, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated 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 `Registration` to export, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/GetRegistrationRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/GetRegistrationRequest.php new file mode 100644 index 000000000000..a8145f693ba4 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/GetRegistrationRequest.php @@ -0,0 +1,71 @@ +google.cloud.domains.v1beta1.GetRegistrationRequest + */ +class GetRegistrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` to get, in the format + * `projects/*/locations/*/registrations/*`. + * + * 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 name of the `Registration` to get, in the format + * `projects/*/locations/*/registrations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` to get, in the format + * `projects/*/locations/*/registrations/*`. + * + * Generated 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 `Registration` to get, in the format + * `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsRequest.php new file mode 100644 index 000000000000..35be80495617 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsRequest.php @@ -0,0 +1,225 @@ +google.cloud.domains.v1beta1.ListRegistrationsRequest + */ +class ListRegistrationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which to list `Registration`s, 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 results to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * When set to the `next_page_token` from a prior response, provides the next + * page of results. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter expression to restrict the `Registration`s returned. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, a boolean, or an enum value. The comparison operator should be one + * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. + * For example, to filter to a specific domain name, use an expression like + * `domainName="example.com"`. You can also check for the existence of a + * field; for example, to find domains using custom DNS settings, use an + * expression like `dnsSettings.customDns:*`. + * You can also create compound filters by combining expressions with the + * `AND` and `OR` operators. For example, to find domains that are suspended + * or have specific issues flagged, use an expression like + * `(state=SUSPENDED) OR (issue:*)`. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which to list `Registration`s, specified in + * the format `projects/*/locations/*`. + * @type int $page_size + * Maximum number of results to return. + * @type string $page_token + * When set to the `next_page_token` from a prior response, provides the next + * page of results. + * @type string $filter + * Filter expression to restrict the `Registration`s returned. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, a boolean, or an enum value. The comparison operator should be one + * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. + * For example, to filter to a specific domain name, use an expression like + * `domainName="example.com"`. You can also check for the existence of a + * field; for example, to find domains using custom DNS settings, use an + * expression like `dnsSettings.customDns:*`. + * You can also create compound filters by combining expressions with the + * `AND` and `OR` operators. For example, to find domains that are suspended + * or have specific issues flagged, use an expression like + * `(state=SUSPENDED) OR (issue:*)`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which to list `Registration`s, 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 to list `Registration`s, 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 results to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * 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; + } + + /** + * When set to the `next_page_token` from a prior response, provides the next + * page of results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * When set to the `next_page_token` from a prior response, provides the next + * page 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; + } + + /** + * Filter expression to restrict the `Registration`s returned. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, a boolean, or an enum value. The comparison operator should be one + * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. + * For example, to filter to a specific domain name, use an expression like + * `domainName="example.com"`. You can also check for the existence of a + * field; for example, to find domains using custom DNS settings, use an + * expression like `dnsSettings.customDns:*`. + * You can also create compound filters by combining expressions with the + * `AND` and `OR` operators. For example, to find domains that are suspended + * or have specific issues flagged, use an expression like + * `(state=SUSPENDED) OR (issue:*)`. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter expression to restrict the `Registration`s returned. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, a boolean, or an enum value. The comparison operator should be one + * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. + * For example, to filter to a specific domain name, use an expression like + * `domainName="example.com"`. You can also check for the existence of a + * field; for example, to find domains using custom DNS settings, use an + * expression like `dnsSettings.customDns:*`. + * You can also create compound filters by combining expressions with the + * `AND` and `OR` operators. For example, to find domains that are suspended + * or have specific issues flagged, use an expression like + * `(state=SUSPENDED) OR (issue:*)`. + * + * 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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsResponse.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsResponse.php new file mode 100644 index 000000000000..294db21f90e8 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsResponse.php @@ -0,0 +1,105 @@ +google.cloud.domains.v1beta1.ListRegistrationsResponse + */ +class ListRegistrationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of `Registration`s. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.Registration registrations = 1; + */ + private $registrations; + /** + * When present, there are more results to retrieve. Set `page_token` to this + * value on a subsequent call 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\Domains\V1beta1\Registration>|\Google\Protobuf\Internal\RepeatedField $registrations + * A list of `Registration`s. + * @type string $next_page_token + * When present, there are more results to retrieve. Set `page_token` to this + * value on a subsequent call to get the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * A list of `Registration`s. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.Registration registrations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRegistrations() + { + return $this->registrations; + } + + /** + * A list of `Registration`s. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.Registration registrations = 1; + * @param array<\Google\Cloud\Domains\V1beta1\Registration>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRegistrations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1beta1\Registration::class); + $this->registrations = $arr; + + return $this; + } + + /** + * When present, there are more results to retrieve. Set `page_token` to this + * value on a subsequent call 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; + } + + /** + * When present, there are more results to retrieve. Set `page_token` to this + * value on a subsequent call 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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings.php new file mode 100644 index 000000000000..bebbc13d72ab --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings.php @@ -0,0 +1,101 @@ +google.cloud.domains.v1beta1.ManagementSettings + */ +class ManagementSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The renewal method for this `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings.RenewalMethod renewal_method = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $renewal_method = 0; + /** + * Controls whether the domain can be transferred to another registrar. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.TransferLockState transfer_lock_state = 4; + */ + protected $transfer_lock_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $renewal_method + * Output only. The renewal method for this `Registration`. + * @type int $transfer_lock_state + * Controls whether the domain can be transferred to another registrar. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The renewal method for this `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings.RenewalMethod renewal_method = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRenewalMethod() + { + return $this->renewal_method; + } + + /** + * Output only. The renewal method for this `Registration`. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings.RenewalMethod renewal_method = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRenewalMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\ManagementSettings\RenewalMethod::class); + $this->renewal_method = $var; + + return $this; + } + + /** + * Controls whether the domain can be transferred to another registrar. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.TransferLockState transfer_lock_state = 4; + * @return int + */ + public function getTransferLockState() + { + return $this->transfer_lock_state; + } + + /** + * Controls whether the domain can be transferred to another registrar. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.TransferLockState transfer_lock_state = 4; + * @param int $var + * @return $this + */ + public function setTransferLockState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\TransferLockState::class); + $this->transfer_lock_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings/RenewalMethod.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings/RenewalMethod.php new file mode 100644 index 000000000000..4114f4769e46 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings/RenewalMethod.php @@ -0,0 +1,70 @@ +google.cloud.domains.v1beta1.ManagementSettings.RenewalMethod + */ +class RenewalMethod +{ + /** + * The renewal method is undefined. + * + * Generated from protobuf enum RENEWAL_METHOD_UNSPECIFIED = 0; + */ + const RENEWAL_METHOD_UNSPECIFIED = 0; + /** + * The domain is automatically renewed each year . + * To disable automatic renewals, delete the resource by calling + * `DeleteRegistration` or export it by calling `ExportRegistration`. + * + * Generated from protobuf enum AUTOMATIC_RENEWAL = 1; + */ + const AUTOMATIC_RENEWAL = 1; + /** + * The domain must be explicitly renewed each year before its + * `expire_time`. This option is only available when the `Registration` + * is in state `EXPORTED`. + * To manage the domain's current billing and + * renewal settings, go to [Google Domains](https://domains.google/). + * + * Generated from protobuf enum MANUAL_RENEWAL = 2; + */ + const MANUAL_RENEWAL = 2; + + private static $valueToName = [ + self::RENEWAL_METHOD_UNSPECIFIED => 'RENEWAL_METHOD_UNSPECIFIED', + self::AUTOMATIC_RENEWAL => 'AUTOMATIC_RENEWAL', + self::MANUAL_RENEWAL => 'MANUAL_RENEWAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RenewalMethod::class, \Google\Cloud\Domains\V1beta1\ManagementSettings_RenewalMethod::class); + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings_RenewalMethod.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings_RenewalMethod.php new file mode 100644 index 000000000000..ca48efe927f2 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings_RenewalMethod.php @@ -0,0 +1,16 @@ +google.cloud.domains.v1beta1.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_detail = 5; + */ + protected $status_detail = ''; + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 6; + */ + 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 + * Server-defined resource path for the target of the operation. + * @type string $verb + * Name of the verb executed by the operation. + * @type string $status_detail + * Human-readable status of the operation, if any. + * @type string $api_version + * API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::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_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; + } + + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 6; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 6; + * @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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterDomainRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterDomainRequest.php new file mode 100644 index 000000000000..8dbb302ce09d --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterDomainRequest.php @@ -0,0 +1,289 @@ +google.cloud.domains.v1beta1.RegisterDomainRequest + */ +class RegisterDomainRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the `Registration`. 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. The complete `Registration` resource to be created. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $registration = null; + /** + * The list of domain notices that you acknowledge. Call + * `RetrieveRegisterParameters` to see the notices that need acknowledgement. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DomainNotice domain_notices = 3; + */ + private $domain_notices; + /** + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 4; + */ + private $contact_notices; + /** + * Required. Yearly price to register or renew the domain. + * The value that should be put here can be obtained from + * RetrieveRegisterParameters or SearchDomains calls. + * + * Generated from protobuf field .google.type.Money yearly_price = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $yearly_price = null; + /** + * When true, only validation is performed, without actually registering + * the domain. Follows: + * https://cloud.google.com/apis/design/design_patterns#request_validation + * + * Generated from protobuf field bool validate_only = 6; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the `Registration`. Must be in the + * format `projects/*/locations/*`. + * @type \Google\Cloud\Domains\V1beta1\Registration $registration + * Required. The complete `Registration` resource to be created. + * @type array|\Google\Protobuf\Internal\RepeatedField $domain_notices + * The list of domain notices that you acknowledge. Call + * `RetrieveRegisterParameters` to see the notices that need acknowledgement. + * @type array|\Google\Protobuf\Internal\RepeatedField $contact_notices + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * @type \Google\Type\Money $yearly_price + * Required. Yearly price to register or renew the domain. + * The value that should be put here can be obtained from + * RetrieveRegisterParameters or SearchDomains calls. + * @type bool $validate_only + * When true, only validation is performed, without actually registering + * the domain. Follows: + * https://cloud.google.com/apis/design/design_patterns#request_validation + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the `Registration`. 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 `Registration`. 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. The complete `Registration` resource to be created. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Domains\V1beta1\Registration|null + */ + public function getRegistration() + { + return $this->registration; + } + + public function hasRegistration() + { + return isset($this->registration); + } + + public function clearRegistration() + { + unset($this->registration); + } + + /** + * Required. The complete `Registration` resource to be created. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Domains\V1beta1\Registration $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\Registration::class); + $this->registration = $var; + + return $this; + } + + /** + * The list of domain notices that you acknowledge. Call + * `RetrieveRegisterParameters` to see the notices that need acknowledgement. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DomainNotice domain_notices = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDomainNotices() + { + return $this->domain_notices; + } + + /** + * The list of domain notices that you acknowledge. Call + * `RetrieveRegisterParameters` to see the notices that need acknowledgement. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DomainNotice domain_notices = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDomainNotices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\DomainNotice::class); + $this->domain_notices = $arr; + + return $this; + } + + /** + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContactNotices() + { + return $this->contact_notices; + } + + /** + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContactNotices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\ContactNotice::class); + $this->contact_notices = $arr; + + return $this; + } + + /** + * Required. Yearly price to register or renew the domain. + * The value that should be put here can be obtained from + * RetrieveRegisterParameters or SearchDomains calls. + * + * Generated from protobuf field .google.type.Money yearly_price = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\Money|null + */ + public function getYearlyPrice() + { + return $this->yearly_price; + } + + public function hasYearlyPrice() + { + return isset($this->yearly_price); + } + + public function clearYearlyPrice() + { + unset($this->yearly_price); + } + + /** + * Required. Yearly price to register or renew the domain. + * The value that should be put here can be obtained from + * RetrieveRegisterParameters or SearchDomains calls. + * + * Generated from protobuf field .google.type.Money yearly_price = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\Money $var + * @return $this + */ + public function setYearlyPrice($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->yearly_price = $var; + + return $this; + } + + /** + * When true, only validation is performed, without actually registering + * the domain. Follows: + * https://cloud.google.com/apis/design/design_patterns#request_validation + * + * Generated from protobuf field bool validate_only = 6; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * When true, only validation is performed, without actually registering + * the domain. Follows: + * https://cloud.google.com/apis/design/design_patterns#request_validation + * + * Generated from protobuf field bool validate_only = 6; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters.php new file mode 100644 index 000000000000..71076173be67 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters.php @@ -0,0 +1,221 @@ +google.cloud.domains.v1beta1.RegisterParameters + */ +class RegisterParameters extends \Google\Protobuf\Internal\Message +{ + /** + * The domain name. Unicode domain names are expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1; + */ + protected $domain_name = ''; + /** + * Indicates whether the domain is available for registration. This value is + * accurate when obtained by calling `RetrieveRegisterParameters`, but is + * approximate when obtained by calling `SearchDomains`. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.RegisterParameters.Availability availability = 2; + */ + protected $availability = 0; + /** + * Contact privacy options that the domain supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 3; + */ + private $supported_privacy; + /** + * Notices about special properties of the domain. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DomainNotice domain_notices = 4; + */ + private $domain_notices; + /** + * Price to register or renew the domain for one year. + * + * Generated from protobuf field .google.type.Money yearly_price = 5; + */ + protected $yearly_price = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $domain_name + * The domain name. Unicode domain names are expressed in Punycode format. + * @type int $availability + * Indicates whether the domain is available for registration. This value is + * accurate when obtained by calling `RetrieveRegisterParameters`, but is + * approximate when obtained by calling `SearchDomains`. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_privacy + * Contact privacy options that the domain supports. + * @type array|\Google\Protobuf\Internal\RepeatedField $domain_notices + * Notices about special properties of the domain. + * @type \Google\Type\Money $yearly_price + * Price to register or renew the domain for one year. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * The domain name. Unicode domain names are expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1; + * @return string + */ + public function getDomainName() + { + return $this->domain_name; + } + + /** + * The domain name. Unicode domain names are expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1; + * @param string $var + * @return $this + */ + public function setDomainName($var) + { + GPBUtil::checkString($var, True); + $this->domain_name = $var; + + return $this; + } + + /** + * Indicates whether the domain is available for registration. This value is + * accurate when obtained by calling `RetrieveRegisterParameters`, but is + * approximate when obtained by calling `SearchDomains`. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.RegisterParameters.Availability availability = 2; + * @return int + */ + public function getAvailability() + { + return $this->availability; + } + + /** + * Indicates whether the domain is available for registration. This value is + * accurate when obtained by calling `RetrieveRegisterParameters`, but is + * approximate when obtained by calling `SearchDomains`. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.RegisterParameters.Availability availability = 2; + * @param int $var + * @return $this + */ + public function setAvailability($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\RegisterParameters\Availability::class); + $this->availability = $var; + + return $this; + } + + /** + * Contact privacy options that the domain supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedPrivacy() + { + return $this->supported_privacy; + } + + /** + * Contact privacy options that the domain supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedPrivacy($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\ContactPrivacy::class); + $this->supported_privacy = $arr; + + return $this; + } + + /** + * Notices about special properties of the domain. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DomainNotice domain_notices = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDomainNotices() + { + return $this->domain_notices; + } + + /** + * Notices about special properties of the domain. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DomainNotice domain_notices = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDomainNotices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\DomainNotice::class); + $this->domain_notices = $arr; + + return $this; + } + + /** + * Price to register or renew the domain for one year. + * + * Generated from protobuf field .google.type.Money yearly_price = 5; + * @return \Google\Type\Money|null + */ + public function getYearlyPrice() + { + return $this->yearly_price; + } + + public function hasYearlyPrice() + { + return isset($this->yearly_price); + } + + public function clearYearlyPrice() + { + unset($this->yearly_price); + } + + /** + * Price to register or renew the domain for one year. + * + * Generated from protobuf field .google.type.Money yearly_price = 5; + * @param \Google\Type\Money $var + * @return $this + */ + public function setYearlyPrice($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->yearly_price = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters/Availability.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters/Availability.php new file mode 100644 index 000000000000..90b20eb551f5 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters/Availability.php @@ -0,0 +1,81 @@ +google.cloud.domains.v1beta1.RegisterParameters.Availability + */ +class Availability +{ + /** + * The availability is unspecified. + * + * Generated from protobuf enum AVAILABILITY_UNSPECIFIED = 0; + */ + const AVAILABILITY_UNSPECIFIED = 0; + /** + * The domain is available for registration. + * + * Generated from protobuf enum AVAILABLE = 1; + */ + const AVAILABLE = 1; + /** + * The domain is not available for registration. Generally this means it is + * already registered to another party. + * + * Generated from protobuf enum UNAVAILABLE = 2; + */ + const UNAVAILABLE = 2; + /** + * The domain is not currently supported by Cloud Domains, but may + * be available elsewhere. + * + * Generated from protobuf enum UNSUPPORTED = 3; + */ + const UNSUPPORTED = 3; + /** + * Cloud Domains is unable to determine domain availability, generally + * due to system maintenance at the domain name registry. + * + * Generated from protobuf enum UNKNOWN = 4; + */ + const UNKNOWN = 4; + + private static $valueToName = [ + self::AVAILABILITY_UNSPECIFIED => 'AVAILABILITY_UNSPECIFIED', + self::AVAILABLE => 'AVAILABLE', + self::UNAVAILABLE => 'UNAVAILABLE', + self::UNSUPPORTED => 'UNSUPPORTED', + self::UNKNOWN => 'UNKNOWN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Availability::class, \Google\Cloud\Domains\V1beta1\RegisterParameters_Availability::class); + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters_Availability.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters_Availability.php new file mode 100644 index 000000000000..8c4ccf74970f --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters_Availability.php @@ -0,0 +1,16 @@ +google.cloud.domains.v1beta1.Registration + */ +class Registration extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of the `Registration` resource, in the format + * `projects/*/locations/*/registrations/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $domain_name = ''; + /** + * Output only. The creation timestamp of the `Registration` resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The expiration timestamp of the `Registration`. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. The state of the `Registration` + * + * Generated from protobuf field .google.cloud.domains.v1beta1.Registration.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The set of issues with the `Registration` that require attention. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.Registration.Issue issues = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $issues; + /** + * Set of labels associated with the `Registration`. + * + * Generated from protobuf field map labels = 9; + */ + private $labels; + /** + * Settings for management of the `Registration`, including renewal, billing, + * and transfer. You cannot update these with the `UpdateRegistration` + * method. To update these settings, use the `ConfigureManagementSettings` + * method. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings management_settings = 10; + */ + protected $management_settings = null; + /** + * Settings controlling the DNS configuration of the `Registration`. You + * cannot update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureDnsSettings` method. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings dns_settings = 11; + */ + protected $dns_settings = null; + /** + * Required. Settings for contact information linked to the `Registration`. You cannot + * update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureContactSettings` method. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings contact_settings = 12 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $contact_settings = null; + /** + * Output only. Pending contact settings for the `Registration`. Updates to the + * `contact_settings` field that change its `registrant_contact` or `privacy` + * fields require email confirmation by the `registrant_contact` + * before taking effect. This field is set only if there are pending updates + * to the `contact_settings` that have not been confirmed. To confirm the + * changes, the `registrant_contact` must follow the instructions in the + * email they receive. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings pending_contact_settings = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pending_contact_settings = null; + /** + * Output only. Set of options for the `contact_settings.privacy` field that this + * `Registration` supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $supported_privacy; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Name of the `Registration` resource, in the format + * `projects/*/locations/*/registrations/`. + * @type string $domain_name + * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation timestamp of the `Registration` resource. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. The expiration timestamp of the `Registration`. + * @type int $state + * Output only. The state of the `Registration` + * @type array|\Google\Protobuf\Internal\RepeatedField $issues + * Output only. The set of issues with the `Registration` that require attention. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Set of labels associated with the `Registration`. + * @type \Google\Cloud\Domains\V1beta1\ManagementSettings $management_settings + * Settings for management of the `Registration`, including renewal, billing, + * and transfer. You cannot update these with the `UpdateRegistration` + * method. To update these settings, use the `ConfigureManagementSettings` + * method. + * @type \Google\Cloud\Domains\V1beta1\DnsSettings $dns_settings + * Settings controlling the DNS configuration of the `Registration`. You + * cannot update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureDnsSettings` method. + * @type \Google\Cloud\Domains\V1beta1\ContactSettings $contact_settings + * Required. Settings for contact information linked to the `Registration`. You cannot + * update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureContactSettings` method. + * @type \Google\Cloud\Domains\V1beta1\ContactSettings $pending_contact_settings + * Output only. Pending contact settings for the `Registration`. Updates to the + * `contact_settings` field that change its `registrant_contact` or `privacy` + * fields require email confirmation by the `registrant_contact` + * before taking effect. This field is set only if there are pending updates + * to the `contact_settings` that have not been confirmed. To confirm the + * changes, the `registrant_contact` must follow the instructions in the + * email they receive. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_privacy + * Output only. Set of options for the `contact_settings.privacy` field that this + * `Registration` supports. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of the `Registration` resource, in the format + * `projects/*/locations/*/registrations/`. + * + * 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 `Registration` resource, in the format + * `projects/*/locations/*/registrations/`. + * + * 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; + } + + /** + * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getDomainName() + { + return $this->domain_name; + } + + /** + * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setDomainName($var) + { + GPBUtil::checkString($var, True); + $this->domain_name = $var; + + return $this; + } + + /** + * Output only. The creation timestamp of the `Registration` resource. + * + * 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 creation timestamp of the `Registration` resource. + * + * 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 expiration timestamp of the `Registration`. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.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. The expiration timestamp of the `Registration`. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.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; + } + + /** + * Output only. The state of the `Registration` + * + * Generated from protobuf field .google.cloud.domains.v1beta1.Registration.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the `Registration` + * + * Generated from protobuf field .google.cloud.domains.v1beta1.Registration.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\Registration\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The set of issues with the `Registration` that require attention. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.Registration.Issue issues = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIssues() + { + return $this->issues; + } + + /** + * Output only. The set of issues with the `Registration` that require attention. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.Registration.Issue issues = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIssues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\Registration\Issue::class); + $this->issues = $arr; + + return $this; + } + + /** + * Set of labels associated with the `Registration`. + * + * Generated from protobuf field map labels = 9; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Set of labels associated with the `Registration`. + * + * 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; + } + + /** + * Settings for management of the `Registration`, including renewal, billing, + * and transfer. You cannot update these with the `UpdateRegistration` + * method. To update these settings, use the `ConfigureManagementSettings` + * method. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings management_settings = 10; + * @return \Google\Cloud\Domains\V1beta1\ManagementSettings|null + */ + public function getManagementSettings() + { + return $this->management_settings; + } + + public function hasManagementSettings() + { + return isset($this->management_settings); + } + + public function clearManagementSettings() + { + unset($this->management_settings); + } + + /** + * Settings for management of the `Registration`, including renewal, billing, + * and transfer. You cannot update these with the `UpdateRegistration` + * method. To update these settings, use the `ConfigureManagementSettings` + * method. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings management_settings = 10; + * @param \Google\Cloud\Domains\V1beta1\ManagementSettings $var + * @return $this + */ + public function setManagementSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ManagementSettings::class); + $this->management_settings = $var; + + return $this; + } + + /** + * Settings controlling the DNS configuration of the `Registration`. You + * cannot update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureDnsSettings` method. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings dns_settings = 11; + * @return \Google\Cloud\Domains\V1beta1\DnsSettings|null + */ + public function getDnsSettings() + { + return $this->dns_settings; + } + + public function hasDnsSettings() + { + return isset($this->dns_settings); + } + + public function clearDnsSettings() + { + unset($this->dns_settings); + } + + /** + * Settings controlling the DNS configuration of the `Registration`. You + * cannot update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureDnsSettings` method. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings dns_settings = 11; + * @param \Google\Cloud\Domains\V1beta1\DnsSettings $var + * @return $this + */ + public function setDnsSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\DnsSettings::class); + $this->dns_settings = $var; + + return $this; + } + + /** + * Required. Settings for contact information linked to the `Registration`. You cannot + * update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureContactSettings` method. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings contact_settings = 12 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Domains\V1beta1\ContactSettings|null + */ + public function getContactSettings() + { + return $this->contact_settings; + } + + public function hasContactSettings() + { + return isset($this->contact_settings); + } + + public function clearContactSettings() + { + unset($this->contact_settings); + } + + /** + * Required. Settings for contact information linked to the `Registration`. You cannot + * update these with the `UpdateRegistration` method. To update these + * settings, use the `ConfigureContactSettings` method. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings contact_settings = 12 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Domains\V1beta1\ContactSettings $var + * @return $this + */ + public function setContactSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ContactSettings::class); + $this->contact_settings = $var; + + return $this; + } + + /** + * Output only. Pending contact settings for the `Registration`. Updates to the + * `contact_settings` field that change its `registrant_contact` or `privacy` + * fields require email confirmation by the `registrant_contact` + * before taking effect. This field is set only if there are pending updates + * to the `contact_settings` that have not been confirmed. To confirm the + * changes, the `registrant_contact` must follow the instructions in the + * email they receive. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings pending_contact_settings = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Domains\V1beta1\ContactSettings|null + */ + public function getPendingContactSettings() + { + return $this->pending_contact_settings; + } + + public function hasPendingContactSettings() + { + return isset($this->pending_contact_settings); + } + + public function clearPendingContactSettings() + { + unset($this->pending_contact_settings); + } + + /** + * Output only. Pending contact settings for the `Registration`. Updates to the + * `contact_settings` field that change its `registrant_contact` or `privacy` + * fields require email confirmation by the `registrant_contact` + * before taking effect. This field is set only if there are pending updates + * to the `contact_settings` that have not been confirmed. To confirm the + * changes, the `registrant_contact` must follow the instructions in the + * email they receive. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings pending_contact_settings = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Domains\V1beta1\ContactSettings $var + * @return $this + */ + public function setPendingContactSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ContactSettings::class); + $this->pending_contact_settings = $var; + + return $this; + } + + /** + * Output only. Set of options for the `contact_settings.privacy` field that this + * `Registration` supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedPrivacy() + { + return $this->supported_privacy; + } + + /** + * Output only. Set of options for the `contact_settings.privacy` field that this + * `Registration` supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedPrivacy($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\ContactPrivacy::class); + $this->supported_privacy = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/Issue.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/Issue.php new file mode 100644 index 000000000000..6b0e83080633 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/Issue.php @@ -0,0 +1,71 @@ +google.cloud.domains.v1beta1.Registration.Issue + */ +class Issue +{ + /** + * The issue is undefined. + * + * Generated from protobuf enum ISSUE_UNSPECIFIED = 0; + */ + const ISSUE_UNSPECIFIED = 0; + /** + * Contact the Cloud Support team to resolve a problem with this domain. + * + * Generated from protobuf enum CONTACT_SUPPORT = 1; + */ + const CONTACT_SUPPORT = 1; + /** + * [ICANN](https://icann.org/) requires verification of the email address + * in the `Registration`'s `contact_settings.registrant_contact` field. To + * verify the email address, follow the + * instructions in the email the `registrant_contact` receives following + * registration. If you do not complete email verification within + * 15 days of registration, the domain is suspended. To resend the + * verification email, call ConfigureContactSettings and provide the current + * `registrant_contact.email`. + * + * Generated from protobuf enum UNVERIFIED_EMAIL = 2; + */ + const UNVERIFIED_EMAIL = 2; + + private static $valueToName = [ + self::ISSUE_UNSPECIFIED => 'ISSUE_UNSPECIFIED', + self::CONTACT_SUPPORT => 'CONTACT_SUPPORT', + self::UNVERIFIED_EMAIL => 'UNVERIFIED_EMAIL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Issue::class, \Google\Cloud\Domains\V1beta1\Registration_Issue::class); + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/State.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/State.php new file mode 100644 index 000000000000..4711d251a677 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/State.php @@ -0,0 +1,108 @@ +google.cloud.domains.v1beta1.Registration.State + */ +class State +{ + /** + * The state is undefined. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The domain is being registered. + * + * Generated from protobuf enum REGISTRATION_PENDING = 1; + */ + const REGISTRATION_PENDING = 1; + /** + * The domain registration failed. You can delete resources in this state + * to allow registration to be retried. + * + * Generated from protobuf enum REGISTRATION_FAILED = 2; + */ + const REGISTRATION_FAILED = 2; + /** + * The domain is being transferred from another registrar to Cloud Domains. + * + * Generated from protobuf enum TRANSFER_PENDING = 3; + */ + const TRANSFER_PENDING = 3; + /** + * The attempt to transfer the domain from another registrar to + * Cloud Domains failed. You can delete resources in this state and retry + * the transfer. + * + * Generated from protobuf enum TRANSFER_FAILED = 4; + */ + const TRANSFER_FAILED = 4; + /** + * The domain is registered and operational. The domain renews automatically + * as long as it remains in this state. + * + * Generated from protobuf enum ACTIVE = 6; + */ + const ACTIVE = 6; + /** + * The domain is suspended and inoperative. For more details, see the + * `issues` field. + * + * Generated from protobuf enum SUSPENDED = 7; + */ + const SUSPENDED = 7; + /** + * The domain is no longer managed with Cloud Domains. It may have been + * transferred to another registrar or exported for management in + * [Google Domains](https://domains.google/). You can no longer update it + * with this API, and information shown about it may be stale. Domains in + * this state are not automatically renewed by Cloud Domains. + * + * Generated from protobuf enum EXPORTED = 8; + */ + const EXPORTED = 8; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::REGISTRATION_PENDING => 'REGISTRATION_PENDING', + self::REGISTRATION_FAILED => 'REGISTRATION_FAILED', + self::TRANSFER_PENDING => 'TRANSFER_PENDING', + self::TRANSFER_FAILED => 'TRANSFER_FAILED', + self::ACTIVE => 'ACTIVE', + self::SUSPENDED => 'SUSPENDED', + self::EXPORTED => 'EXPORTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Domains\V1beta1\Registration_State::class); + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration_Issue.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration_Issue.php new file mode 100644 index 000000000000..aa94a77bedf0 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration_Issue.php @@ -0,0 +1,16 @@ +google.cloud.domains.v1beta1.ResetAuthorizationCodeRequest + */ +class ResetAuthorizationCodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` whose authorization code is being reset, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $registration = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $registration + * Required. The name of the `Registration` whose authorization code is being reset, + * in the format `projects/*/locations/*/registrations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` whose authorization code is being reset, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRegistration() + { + return $this->registration; + } + + /** + * Required. The name of the `Registration` whose authorization code is being reset, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkString($var, True); + $this->registration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveAuthorizationCodeRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveAuthorizationCodeRequest.php new file mode 100644 index 000000000000..374105772078 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveAuthorizationCodeRequest.php @@ -0,0 +1,71 @@ +google.cloud.domains.v1beta1.RetrieveAuthorizationCodeRequest + */ +class RetrieveAuthorizationCodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `Registration` whose authorization code is being retrieved, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $registration = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $registration + * Required. The name of the `Registration` whose authorization code is being retrieved, + * in the format `projects/*/locations/*/registrations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `Registration` whose authorization code is being retrieved, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRegistration() + { + return $this->registration; + } + + /** + * Required. The name of the `Registration` whose authorization code is being retrieved, + * in the format `projects/*/locations/*/registrations/*`. + * + * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkString($var, True); + $this->registration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersRequest.php new file mode 100644 index 000000000000..6b00a0161245 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersRequest.php @@ -0,0 +1,101 @@ +google.cloud.domains.v1beta1.RetrieveRegisterParametersRequest + */ +class RetrieveRegisterParametersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $domain_name = ''; + /** + * Required. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $domain_name + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * @type string $location + * Required. The location. Must be in the format `projects/*/locations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDomainName() + { + return $this->domain_name; + } + + /** + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1 [(.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. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Required. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersResponse.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersResponse.php new file mode 100644 index 000000000000..d7a863374b88 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersResponse.php @@ -0,0 +1,77 @@ +google.cloud.domains.v1beta1.RetrieveRegisterParametersResponse + */ +class RetrieveRegisterParametersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Parameters to use when calling the `RegisterDomain` method. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.RegisterParameters register_parameters = 1; + */ + protected $register_parameters = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Domains\V1beta1\RegisterParameters $register_parameters + * Parameters to use when calling the `RegisterDomain` method. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Parameters to use when calling the `RegisterDomain` method. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.RegisterParameters register_parameters = 1; + * @return \Google\Cloud\Domains\V1beta1\RegisterParameters|null + */ + public function getRegisterParameters() + { + return $this->register_parameters; + } + + public function hasRegisterParameters() + { + return isset($this->register_parameters); + } + + public function clearRegisterParameters() + { + unset($this->register_parameters); + } + + /** + * Parameters to use when calling the `RegisterDomain` method. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.RegisterParameters register_parameters = 1; + * @param \Google\Cloud\Domains\V1beta1\RegisterParameters $var + * @return $this + */ + public function setRegisterParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\RegisterParameters::class); + $this->register_parameters = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersRequest.php new file mode 100644 index 000000000000..b5f5729ba2f7 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersRequest.php @@ -0,0 +1,101 @@ +google.cloud.domains.v1beta1.RetrieveTransferParametersRequest + */ +class RetrieveTransferParametersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $domain_name = ''; + /** + * Required. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $domain_name + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * @type string $location + * Required. The location. Must be in the format `projects/*/locations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDomainName() + { + return $this->domain_name; + } + + /** + * Required. The domain name. Unicode domain names must be expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1 [(.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. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Required. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersResponse.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersResponse.php new file mode 100644 index 000000000000..93cd532eae9e --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersResponse.php @@ -0,0 +1,77 @@ +google.cloud.domains.v1beta1.RetrieveTransferParametersResponse + */ +class RetrieveTransferParametersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Parameters to use when calling the `TransferDomain` method. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.TransferParameters transfer_parameters = 1; + */ + protected $transfer_parameters = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Domains\V1beta1\TransferParameters $transfer_parameters + * Parameters to use when calling the `TransferDomain` method. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Parameters to use when calling the `TransferDomain` method. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.TransferParameters transfer_parameters = 1; + * @return \Google\Cloud\Domains\V1beta1\TransferParameters|null + */ + public function getTransferParameters() + { + return $this->transfer_parameters; + } + + public function hasTransferParameters() + { + return isset($this->transfer_parameters); + } + + public function clearTransferParameters() + { + unset($this->transfer_parameters); + } + + /** + * Parameters to use when calling the `TransferDomain` method. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.TransferParameters transfer_parameters = 1; + * @param \Google\Cloud\Domains\V1beta1\TransferParameters $var + * @return $this + */ + public function setTransferParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\TransferParameters::class); + $this->transfer_parameters = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsRequest.php new file mode 100644 index 000000000000..723dbc53bba6 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsRequest.php @@ -0,0 +1,101 @@ +google.cloud.domains.v1beta1.SearchDomainsRequest + */ +class SearchDomainsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. String used to search for available domain names. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * Required. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query + * Required. String used to search for available domain names. + * @type string $location + * Required. The location. Must be in the format `projects/*/locations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. String used to search for available domain names. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. String used to search for available domain names. + * + * 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; + } + + /** + * Required. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Required. The location. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsResponse.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsResponse.php new file mode 100644 index 000000000000..3ab2b2f9158f --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsResponse.php @@ -0,0 +1,67 @@ +google.cloud.domains.v1beta1.SearchDomainsResponse + */ +class SearchDomainsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Results of the domain name search. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.RegisterParameters register_parameters = 1; + */ + private $register_parameters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Domains\V1beta1\RegisterParameters>|\Google\Protobuf\Internal\RepeatedField $register_parameters + * Results of the domain name search. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Results of the domain name search. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.RegisterParameters register_parameters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRegisterParameters() + { + return $this->register_parameters; + } + + /** + * Results of the domain name search. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.RegisterParameters register_parameters = 1; + * @param array<\Google\Cloud\Domains\V1beta1\RegisterParameters>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRegisterParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1beta1\RegisterParameters::class); + $this->register_parameters = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferDomainRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferDomainRequest.php new file mode 100644 index 000000000000..0643aff926ad --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferDomainRequest.php @@ -0,0 +1,311 @@ +google.cloud.domains.v1beta1.TransferDomainRequest + */ +class TransferDomainRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the `Registration`. 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. The complete `Registration` resource to be created. + * You can leave `registration.dns_settings` unset to import the + * domain's current DNS configuration from its current registrar. Use this + * option only if you are sure that the domain's current DNS service + * does not cease upon transfer, as is often the case for DNS services + * provided for free by the registrar. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $registration = null; + /** + * The list of contact notices that you acknowledge. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 3; + */ + private $contact_notices; + /** + * Required. Acknowledgement of the price to transfer or renew the domain for one year. + * Call `RetrieveTransferParameters` to obtain the price, which you must + * acknowledge. + * + * Generated from protobuf field .google.type.Money yearly_price = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $yearly_price = null; + /** + * The domain's transfer authorization code. You can obtain this from the + * domain's current registrar. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.AuthorizationCode authorization_code = 5; + */ + protected $authorization_code = null; + /** + * Validate the request without actually transferring the domain. + * + * Generated from protobuf field bool validate_only = 6; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the `Registration`. Must be in the + * format `projects/*/locations/*`. + * @type \Google\Cloud\Domains\V1beta1\Registration $registration + * Required. The complete `Registration` resource to be created. + * You can leave `registration.dns_settings` unset to import the + * domain's current DNS configuration from its current registrar. Use this + * option only if you are sure that the domain's current DNS service + * does not cease upon transfer, as is often the case for DNS services + * provided for free by the registrar. + * @type array|\Google\Protobuf\Internal\RepeatedField $contact_notices + * The list of contact notices that you acknowledge. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * @type \Google\Type\Money $yearly_price + * Required. Acknowledgement of the price to transfer or renew the domain for one year. + * Call `RetrieveTransferParameters` to obtain the price, which you must + * acknowledge. + * @type \Google\Cloud\Domains\V1beta1\AuthorizationCode $authorization_code + * The domain's transfer authorization code. You can obtain this from the + * domain's current registrar. + * @type bool $validate_only + * Validate the request without actually transferring the domain. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the `Registration`. 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 `Registration`. 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. The complete `Registration` resource to be created. + * You can leave `registration.dns_settings` unset to import the + * domain's current DNS configuration from its current registrar. Use this + * option only if you are sure that the domain's current DNS service + * does not cease upon transfer, as is often the case for DNS services + * provided for free by the registrar. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Domains\V1beta1\Registration|null + */ + public function getRegistration() + { + return $this->registration; + } + + public function hasRegistration() + { + return isset($this->registration); + } + + public function clearRegistration() + { + unset($this->registration); + } + + /** + * Required. The complete `Registration` resource to be created. + * You can leave `registration.dns_settings` unset to import the + * domain's current DNS configuration from its current registrar. Use this + * option only if you are sure that the domain's current DNS service + * does not cease upon transfer, as is often the case for DNS services + * provided for free by the registrar. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Domains\V1beta1\Registration $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\Registration::class); + $this->registration = $var; + + return $this; + } + + /** + * The list of contact notices that you acknowledge. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContactNotices() + { + return $this->contact_notices; + } + + /** + * The list of contact notices that you acknowledge. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContactNotices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\ContactNotice::class); + $this->contact_notices = $arr; + + return $this; + } + + /** + * Required. Acknowledgement of the price to transfer or renew the domain for one year. + * Call `RetrieveTransferParameters` to obtain the price, which you must + * acknowledge. + * + * Generated from protobuf field .google.type.Money yearly_price = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\Money|null + */ + public function getYearlyPrice() + { + return $this->yearly_price; + } + + public function hasYearlyPrice() + { + return isset($this->yearly_price); + } + + public function clearYearlyPrice() + { + unset($this->yearly_price); + } + + /** + * Required. Acknowledgement of the price to transfer or renew the domain for one year. + * Call `RetrieveTransferParameters` to obtain the price, which you must + * acknowledge. + * + * Generated from protobuf field .google.type.Money yearly_price = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\Money $var + * @return $this + */ + public function setYearlyPrice($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->yearly_price = $var; + + return $this; + } + + /** + * The domain's transfer authorization code. You can obtain this from the + * domain's current registrar. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.AuthorizationCode authorization_code = 5; + * @return \Google\Cloud\Domains\V1beta1\AuthorizationCode|null + */ + public function getAuthorizationCode() + { + return $this->authorization_code; + } + + public function hasAuthorizationCode() + { + return isset($this->authorization_code); + } + + public function clearAuthorizationCode() + { + unset($this->authorization_code); + } + + /** + * The domain's transfer authorization code. You can obtain this from the + * domain's current registrar. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.AuthorizationCode authorization_code = 5; + * @param \Google\Cloud\Domains\V1beta1\AuthorizationCode $var + * @return $this + */ + public function setAuthorizationCode($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\AuthorizationCode::class); + $this->authorization_code = $var; + + return $this; + } + + /** + * Validate the request without actually transferring the domain. + * + * Generated from protobuf field bool validate_only = 6; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Validate the request without actually transferring the domain. + * + * Generated from protobuf field bool validate_only = 6; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferLockState.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferLockState.php new file mode 100644 index 000000000000..a927574f68d8 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferLockState.php @@ -0,0 +1,61 @@ +google.cloud.domains.v1beta1.TransferLockState + */ +class TransferLockState +{ + /** + * The state is unspecified. + * + * Generated from protobuf enum TRANSFER_LOCK_STATE_UNSPECIFIED = 0; + */ + const TRANSFER_LOCK_STATE_UNSPECIFIED = 0; + /** + * The domain is unlocked and can be transferred to another registrar. + * + * Generated from protobuf enum UNLOCKED = 1; + */ + const UNLOCKED = 1; + /** + * The domain is locked and cannot be transferred to another registrar. + * + * Generated from protobuf enum LOCKED = 2; + */ + const LOCKED = 2; + + private static $valueToName = [ + self::TRANSFER_LOCK_STATE_UNSPECIFIED => 'TRANSFER_LOCK_STATE_UNSPECIFIED', + self::UNLOCKED => 'UNLOCKED', + self::LOCKED => 'LOCKED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferParameters.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferParameters.php new file mode 100644 index 000000000000..f639715281b2 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferParameters.php @@ -0,0 +1,255 @@ +google.cloud.domains.v1beta1.TransferParameters + */ +class TransferParameters extends \Google\Protobuf\Internal\Message +{ + /** + * The domain name. Unicode domain names are expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1; + */ + protected $domain_name = ''; + /** + * The registrar that currently manages the domain. + * + * Generated from protobuf field string current_registrar = 2; + */ + protected $current_registrar = ''; + /** + * The name servers that currently store the configuration of the domain. + * + * Generated from protobuf field repeated string name_servers = 3; + */ + private $name_servers; + /** + * Indicates whether the domain is protected by a transfer lock. For a + * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, + * go to its current registrar. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.TransferLockState transfer_lock_state = 4; + */ + protected $transfer_lock_state = 0; + /** + * Contact privacy options that the domain supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 5; + */ + private $supported_privacy; + /** + * Price to transfer or renew the domain for one year. + * + * Generated from protobuf field .google.type.Money yearly_price = 6; + */ + protected $yearly_price = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $domain_name + * The domain name. Unicode domain names are expressed in Punycode format. + * @type string $current_registrar + * The registrar that currently manages the domain. + * @type array|\Google\Protobuf\Internal\RepeatedField $name_servers + * The name servers that currently store the configuration of the domain. + * @type int $transfer_lock_state + * Indicates whether the domain is protected by a transfer lock. For a + * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, + * go to its current registrar. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_privacy + * Contact privacy options that the domain supports. + * @type \Google\Type\Money $yearly_price + * Price to transfer or renew the domain for one year. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * The domain name. Unicode domain names are expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1; + * @return string + */ + public function getDomainName() + { + return $this->domain_name; + } + + /** + * The domain name. Unicode domain names are expressed in Punycode format. + * + * Generated from protobuf field string domain_name = 1; + * @param string $var + * @return $this + */ + public function setDomainName($var) + { + GPBUtil::checkString($var, True); + $this->domain_name = $var; + + return $this; + } + + /** + * The registrar that currently manages the domain. + * + * Generated from protobuf field string current_registrar = 2; + * @return string + */ + public function getCurrentRegistrar() + { + return $this->current_registrar; + } + + /** + * The registrar that currently manages the domain. + * + * Generated from protobuf field string current_registrar = 2; + * @param string $var + * @return $this + */ + public function setCurrentRegistrar($var) + { + GPBUtil::checkString($var, True); + $this->current_registrar = $var; + + return $this; + } + + /** + * The name servers that currently store the configuration of the domain. + * + * Generated from protobuf field repeated string name_servers = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNameServers() + { + return $this->name_servers; + } + + /** + * The name servers that currently store the configuration of the domain. + * + * Generated from protobuf field repeated string name_servers = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNameServers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->name_servers = $arr; + + return $this; + } + + /** + * Indicates whether the domain is protected by a transfer lock. For a + * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, + * go to its current registrar. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.TransferLockState transfer_lock_state = 4; + * @return int + */ + public function getTransferLockState() + { + return $this->transfer_lock_state; + } + + /** + * Indicates whether the domain is protected by a transfer lock. For a + * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, + * go to its current registrar. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.TransferLockState transfer_lock_state = 4; + * @param int $var + * @return $this + */ + public function setTransferLockState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\TransferLockState::class); + $this->transfer_lock_state = $var; + + return $this; + } + + /** + * Contact privacy options that the domain supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedPrivacy() + { + return $this->supported_privacy; + } + + /** + * Contact privacy options that the domain supports. + * + * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedPrivacy($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\ContactPrivacy::class); + $this->supported_privacy = $arr; + + return $this; + } + + /** + * Price to transfer or renew the domain for one year. + * + * Generated from protobuf field .google.type.Money yearly_price = 6; + * @return \Google\Type\Money|null + */ + public function getYearlyPrice() + { + return $this->yearly_price; + } + + public function hasYearlyPrice() + { + return isset($this->yearly_price); + } + + public function clearYearlyPrice() + { + unset($this->yearly_price); + } + + /** + * Price to transfer or renew the domain for one year. + * + * Generated from protobuf field .google.type.Money yearly_price = 6; + * @param \Google\Type\Money $var + * @return $this + */ + public function setYearlyPrice($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->yearly_price = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/UpdateRegistrationRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/UpdateRegistrationRequest.php new file mode 100644 index 000000000000..f0d576d869d4 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/UpdateRegistrationRequest.php @@ -0,0 +1,129 @@ +google.cloud.domains.v1beta1.UpdateRegistrationRequest + */ +class UpdateRegistrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Fields of the `Registration` to update. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 1; + */ + protected $registration = null; + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the labels are being updated, the `update_mask` is + * `"labels"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Domains\V1beta1\Registration $registration + * Fields of the `Registration` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the labels are being updated, the `update_mask` is + * `"labels"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); + parent::__construct($data); + } + + /** + * Fields of the `Registration` to update. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 1; + * @return \Google\Cloud\Domains\V1beta1\Registration|null + */ + public function getRegistration() + { + return $this->registration; + } + + public function hasRegistration() + { + return isset($this->registration); + } + + public function clearRegistration() + { + unset($this->registration); + } + + /** + * Fields of the `Registration` to update. + * + * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 1; + * @param \Google\Cloud\Domains\V1beta1\Registration $var + * @return $this + */ + public function setRegistration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\Registration::class); + $this->registration = $var; + + return $this; + } + + /** + * Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the labels are being updated, the `update_mask` is + * `"labels"`. + * + * 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 field mask describing which fields to update as a comma-separated list. + * For example, if only the labels are being updated, the `update_mask` is + * `"labels"`. + * + * 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/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_contact_settings.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_contact_settings.php new file mode 100644 index 000000000000..bb665b172f0f --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_contact_settings.php @@ -0,0 +1,88 @@ +configureContactSettings($formattedRegistration, $updateMask); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Registration $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRegistration = DomainsClient::registrationName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRATION]' + ); + + configure_contact_settings_sample($formattedRegistration); +} +// [END domains_v1beta1_generated_Domains_ConfigureContactSettings_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_dns_settings.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_dns_settings.php new file mode 100644 index 000000000000..73df1e5ba374 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_dns_settings.php @@ -0,0 +1,87 @@ +configureDnsSettings($formattedRegistration, $updateMask); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Registration $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRegistration = DomainsClient::registrationName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRATION]' + ); + + configure_dns_settings_sample($formattedRegistration); +} +// [END domains_v1beta1_generated_Domains_ConfigureDnsSettings_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_management_settings.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_management_settings.php new file mode 100644 index 000000000000..db08f748382c --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_management_settings.php @@ -0,0 +1,87 @@ +configureManagementSettings($formattedRegistration, $updateMask); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Registration $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRegistration = DomainsClient::registrationName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRATION]' + ); + + configure_management_settings_sample($formattedRegistration); +} +// [END domains_v1beta1_generated_Domains_ConfigureManagementSettings_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/delete_registration.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/delete_registration.php new file mode 100644 index 000000000000..e46268438386 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/delete_registration.php @@ -0,0 +1,94 @@ +deleteRegistration($formattedName); + $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 = DomainsClient::registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + + delete_registration_sample($formattedName); +} +// [END domains_v1beta1_generated_Domains_DeleteRegistration_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/export_registration.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/export_registration.php new file mode 100644 index 000000000000..f246a75846db --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/export_registration.php @@ -0,0 +1,87 @@ +exportRegistration($formattedName); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Registration $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DomainsClient::registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + + export_registration_sample($formattedName); +} +// [END domains_v1beta1_generated_Domains_ExportRegistration_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/get_registration.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/get_registration.php new file mode 100644 index 000000000000..f869ab11af8d --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/get_registration.php @@ -0,0 +1,67 @@ +getRegistration($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DomainsClient::registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + + get_registration_sample($formattedName); +} +// [END domains_v1beta1_generated_Domains_GetRegistration_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/list_registrations.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/list_registrations.php new file mode 100644 index 000000000000..55ef0d68920c --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/list_registrations.php @@ -0,0 +1,72 @@ +listRegistrations($formattedParent); + + /** @var Registration $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 = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_registrations_sample($formattedParent); +} +// [END domains_v1beta1_generated_Domains_ListRegistrations_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/register_domain.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/register_domain.php new file mode 100644 index 000000000000..5df3d43abca0 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/register_domain.php @@ -0,0 +1,160 @@ +setPostalAddress($registrationContactSettingsRegistrantContactPostalAddress) + ->setEmail($registrationContactSettingsRegistrantContactEmail) + ->setPhoneNumber($registrationContactSettingsRegistrantContactPhoneNumber); + $registrationContactSettingsAdminContactPostalAddress = new PostalAddress(); + $registrationContactSettingsAdminContact = (new Contact()) + ->setPostalAddress($registrationContactSettingsAdminContactPostalAddress) + ->setEmail($registrationContactSettingsAdminContactEmail) + ->setPhoneNumber($registrationContactSettingsAdminContactPhoneNumber); + $registrationContactSettingsTechnicalContactPostalAddress = new PostalAddress(); + $registrationContactSettingsTechnicalContact = (new Contact()) + ->setPostalAddress($registrationContactSettingsTechnicalContactPostalAddress) + ->setEmail($registrationContactSettingsTechnicalContactEmail) + ->setPhoneNumber($registrationContactSettingsTechnicalContactPhoneNumber); + $registrationContactSettings = (new ContactSettings()) + ->setPrivacy($registrationContactSettingsPrivacy) + ->setRegistrantContact($registrationContactSettingsRegistrantContact) + ->setAdminContact($registrationContactSettingsAdminContact) + ->setTechnicalContact($registrationContactSettingsTechnicalContact); + $registration = (new Registration()) + ->setDomainName($registrationDomainName) + ->setContactSettings($registrationContactSettings); + $yearlyPrice = new Money(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $domainsClient->registerDomain($formattedParent, $registration, $yearlyPrice); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Registration $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); + $registrationDomainName = '[DOMAIN_NAME]'; + $registrationContactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; + $registrationContactSettingsRegistrantContactEmail = '[EMAIL]'; + $registrationContactSettingsRegistrantContactPhoneNumber = '[PHONE_NUMBER]'; + $registrationContactSettingsAdminContactEmail = '[EMAIL]'; + $registrationContactSettingsAdminContactPhoneNumber = '[PHONE_NUMBER]'; + $registrationContactSettingsTechnicalContactEmail = '[EMAIL]'; + $registrationContactSettingsTechnicalContactPhoneNumber = '[PHONE_NUMBER]'; + + register_domain_sample( + $formattedParent, + $registrationDomainName, + $registrationContactSettingsPrivacy, + $registrationContactSettingsRegistrantContactEmail, + $registrationContactSettingsRegistrantContactPhoneNumber, + $registrationContactSettingsAdminContactEmail, + $registrationContactSettingsAdminContactPhoneNumber, + $registrationContactSettingsTechnicalContactEmail, + $registrationContactSettingsTechnicalContactPhoneNumber + ); +} +// [END domains_v1beta1_generated_Domains_RegisterDomain_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/reset_authorization_code.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/reset_authorization_code.php new file mode 100644 index 000000000000..dd8674b7b307 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/reset_authorization_code.php @@ -0,0 +1,74 @@ +resetAuthorizationCode($formattedRegistration); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRegistration = DomainsClient::registrationName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRATION]' + ); + + reset_authorization_code_sample($formattedRegistration); +} +// [END domains_v1beta1_generated_Domains_ResetAuthorizationCode_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_authorization_code.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_authorization_code.php new file mode 100644 index 000000000000..fd466f2dc6ac --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_authorization_code.php @@ -0,0 +1,75 @@ +retrieveAuthorizationCode($formattedRegistration); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRegistration = DomainsClient::registrationName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRATION]' + ); + + retrieve_authorization_code_sample($formattedRegistration); +} +// [END domains_v1beta1_generated_Domains_RetrieveAuthorizationCode_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_register_parameters.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_register_parameters.php new file mode 100644 index 000000000000..4bec1c04dca6 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_register_parameters.php @@ -0,0 +1,69 @@ +retrieveRegisterParameters($domainName, $formattedLocation); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = '[DOMAIN_NAME]'; + $formattedLocation = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); + + retrieve_register_parameters_sample($domainName, $formattedLocation); +} +// [END domains_v1beta1_generated_Domains_RetrieveRegisterParameters_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_transfer_parameters.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_transfer_parameters.php new file mode 100644 index 000000000000..e356103e698a --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_transfer_parameters.php @@ -0,0 +1,73 @@ +retrieveTransferParameters($domainName, $formattedLocation); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 = '[DOMAIN_NAME]'; + $formattedLocation = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); + + retrieve_transfer_parameters_sample($domainName, $formattedLocation); +} +// [END domains_v1beta1_generated_Domains_RetrieveTransferParameters_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/search_domains.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/search_domains.php new file mode 100644 index 000000000000..561d41f65a99 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/search_domains.php @@ -0,0 +1,72 @@ +searchDomains($query, $formattedLocation); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $query = '[QUERY]'; + $formattedLocation = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); + + search_domains_sample($query, $formattedLocation); +} +// [END domains_v1beta1_generated_Domains_SearchDomains_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/transfer_domain.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/transfer_domain.php new file mode 100644 index 000000000000..8f3de899a1fd --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/transfer_domain.php @@ -0,0 +1,168 @@ +setPostalAddress($registrationContactSettingsRegistrantContactPostalAddress) + ->setEmail($registrationContactSettingsRegistrantContactEmail) + ->setPhoneNumber($registrationContactSettingsRegistrantContactPhoneNumber); + $registrationContactSettingsAdminContactPostalAddress = new PostalAddress(); + $registrationContactSettingsAdminContact = (new Contact()) + ->setPostalAddress($registrationContactSettingsAdminContactPostalAddress) + ->setEmail($registrationContactSettingsAdminContactEmail) + ->setPhoneNumber($registrationContactSettingsAdminContactPhoneNumber); + $registrationContactSettingsTechnicalContactPostalAddress = new PostalAddress(); + $registrationContactSettingsTechnicalContact = (new Contact()) + ->setPostalAddress($registrationContactSettingsTechnicalContactPostalAddress) + ->setEmail($registrationContactSettingsTechnicalContactEmail) + ->setPhoneNumber($registrationContactSettingsTechnicalContactPhoneNumber); + $registrationContactSettings = (new ContactSettings()) + ->setPrivacy($registrationContactSettingsPrivacy) + ->setRegistrantContact($registrationContactSettingsRegistrantContact) + ->setAdminContact($registrationContactSettingsAdminContact) + ->setTechnicalContact($registrationContactSettingsTechnicalContact); + $registration = (new Registration()) + ->setDomainName($registrationDomainName) + ->setContactSettings($registrationContactSettings); + $yearlyPrice = new Money(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $domainsClient->transferDomain($formattedParent, $registration, $yearlyPrice); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Registration $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); + $registrationDomainName = '[DOMAIN_NAME]'; + $registrationContactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; + $registrationContactSettingsRegistrantContactEmail = '[EMAIL]'; + $registrationContactSettingsRegistrantContactPhoneNumber = '[PHONE_NUMBER]'; + $registrationContactSettingsAdminContactEmail = '[EMAIL]'; + $registrationContactSettingsAdminContactPhoneNumber = '[PHONE_NUMBER]'; + $registrationContactSettingsTechnicalContactEmail = '[EMAIL]'; + $registrationContactSettingsTechnicalContactPhoneNumber = '[PHONE_NUMBER]'; + + transfer_domain_sample( + $formattedParent, + $registrationDomainName, + $registrationContactSettingsPrivacy, + $registrationContactSettingsRegistrantContactEmail, + $registrationContactSettingsRegistrantContactPhoneNumber, + $registrationContactSettingsAdminContactEmail, + $registrationContactSettingsAdminContactPhoneNumber, + $registrationContactSettingsTechnicalContactEmail, + $registrationContactSettingsTechnicalContactPhoneNumber + ); +} +// [END domains_v1beta1_generated_Domains_TransferDomain_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/update_registration.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/update_registration.php new file mode 100644 index 000000000000..0d2eb4ecde5d --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/update_registration.php @@ -0,0 +1,74 @@ +updateRegistration($updateMask); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Registration $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + 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 domains_v1beta1_generated_Domains_UpdateRegistration_sync] diff --git a/owl-bot-staging/Domains/v1beta1/src/V1beta1/DomainsClient.php b/owl-bot-staging/Domains/v1beta1/src/V1beta1/DomainsClient.php new file mode 100644 index 000000000000..864ad2aaa278 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/src/V1beta1/DomainsClient.php @@ -0,0 +1,36 @@ +registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $updateMask = new FieldMask(); + * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureContactSettings'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->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. + * + * @experimental + */ +class DomainsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.domains.v1beta1.Domains'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'domains.googleapis.com'; + + /** 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 $locationNameTemplate; + + private static $registrationNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/domains_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/domains_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/domains_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/domains_rest_client_config.php', + ], + ], + ]; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getRegistrationNameTemplate() + { + if (self::$registrationNameTemplate == null) { + self::$registrationNameTemplate = new PathTemplate('projects/{project}/locations/{location}/registrations/{registration}'); + } + + return self::$registrationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), + 'registration' => self::getRegistrationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * 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. + * + * @experimental + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a registration + * resource. + * + * @param string $project + * @param string $location + * @param string $registration + * + * @return string The formatted registration resource. + * + * @experimental + */ + public static function registrationName($project, $location, $registration) + { + return self::getRegistrationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'registration' => $registration, + ]); + } + + /** + * 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} + * - registration: projects/{project}/locations/{location}/registrations/{registration} + * + * 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. + * + * @experimental + */ + 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"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + * + * @experimental + */ + 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 + * + * @experimental + */ + 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; + } + + /** + * 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 'domains.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Updates a `Registration`'s contact settings. Some changes require + * confirmation by the domain's registrant contact . + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $updateMask = new FieldMask(); + * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureContactSettings'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $registration Required. The name of the `Registration` whose contact settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the registrant contact is being updated, the + * `update_mask` is `"registrant_contact"`. + * @param array $optionalArgs { + * Optional. + * + * @type ContactSettings $contactSettings + * Fields of the `ContactSettings` to update. + * @type int[] $contactNotices + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in `contact_settings`. + * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1beta1\ContactNotice} + * @type bool $validateOnly + * Validate the request without actually updating the contact settings. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function configureContactSettings($registration, $updateMask, array $optionalArgs = []) + { + $request = new ConfigureContactSettingsRequest(); + $requestParamHeaders = []; + $request->setRegistration($registration); + $request->setUpdateMask($updateMask); + $requestParamHeaders['registration'] = $registration; + if (isset($optionalArgs['contactSettings'])) { + $request->setContactSettings($optionalArgs['contactSettings']); + } + + if (isset($optionalArgs['contactNotices'])) { + $request->setContactNotices($optionalArgs['contactNotices']); + } + + 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->startOperationsCall('ConfigureContactSettings', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates a `Registration`'s DNS settings. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $updateMask = new FieldMask(); + * $operationResponse = $domainsClient->configureDnsSettings($formattedRegistration, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->configureDnsSettings($formattedRegistration, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureDnsSettings'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $registration Required. The name of the `Registration` whose DNS settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the name servers are being updated for an existing + * Custom DNS configuration, the `update_mask` is + * `"custom_dns.name_servers"`. + * + * When changing the DNS provider from one type to another, pass the new + * provider's field name as part of the field mask. For example, when changing + * from a Google Domains DNS configuration to a Custom DNS configuration, the + * `update_mask` is `"custom_dns"`. // + * @param array $optionalArgs { + * Optional. + * + * @type DnsSettings $dnsSettings + * Fields of the `DnsSettings` to update. + * @type bool $validateOnly + * Validate the request without actually updating the DNS settings. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function configureDnsSettings($registration, $updateMask, array $optionalArgs = []) + { + $request = new ConfigureDnsSettingsRequest(); + $requestParamHeaders = []; + $request->setRegistration($registration); + $request->setUpdateMask($updateMask); + $requestParamHeaders['registration'] = $registration; + if (isset($optionalArgs['dnsSettings'])) { + $request->setDnsSettings($optionalArgs['dnsSettings']); + } + + 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->startOperationsCall('ConfigureDnsSettings', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates a `Registration`'s management settings. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $updateMask = new FieldMask(); + * $operationResponse = $domainsClient->configureManagementSettings($formattedRegistration, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->configureManagementSettings($formattedRegistration, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureManagementSettings'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $registration Required. The name of the `Registration` whose management settings are being updated, + * in the format `projects/*/locations/*/registrations/*`. + * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the transfer lock is being updated, the `update_mask` + * is `"transfer_lock_state"`. + * @param array $optionalArgs { + * Optional. + * + * @type ManagementSettings $managementSettings + * Fields of the `ManagementSettings` 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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function configureManagementSettings($registration, $updateMask, array $optionalArgs = []) + { + $request = new ConfigureManagementSettingsRequest(); + $requestParamHeaders = []; + $request->setRegistration($registration); + $request->setUpdateMask($updateMask); + $requestParamHeaders['registration'] = $registration; + if (isset($optionalArgs['managementSettings'])) { + $request->setManagementSettings($optionalArgs['managementSettings']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ConfigureManagementSettings', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a `Registration` resource. + * + * This method works on any `Registration` resource using [Subscription or + * Commitment billing](/domains/pricing#billing-models), provided that the + * resource was created at least 1 day in the past. + * + * For `Registration` resources using + * [Monthly billing](/domains/pricing#billing-models), this method works if: + * + * * `state` is `EXPORTED` with `expire_time` in the past + * * `state` is `REGISTRATION_FAILED` + * * `state` is `TRANSFER_FAILED` + * + * When an active registration is successfully deleted, you can continue to + * use the domain in [Google Domains](https://domains.google/) until it + * expires. The calling user becomes the domain's sole owner in Google + * Domains, and permissions for the domain are subsequently managed there. The + * domain does not renew automatically unless the new owner sets up billing in + * Google Domains. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedName = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $operationResponse = $domainsClient->deleteRegistration($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->deleteRegistration($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'deleteRegistration'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the `Registration` to delete, + * in the format `projects/*/locations/*/registrations/*`. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function deleteRegistration($name, array $optionalArgs = []) + { + $request = new DeleteRegistrationRequest(); + $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->startOperationsCall('DeleteRegistration', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Exports a `Registration` resource, such that it is no longer managed by + * Cloud Domains. + * + * When an active domain is successfully exported, you can continue to use the + * domain in [Google Domains](https://domains.google/) until it expires. The + * calling user becomes the domain's sole owner in Google Domains, and + * permissions for the domain are subsequently managed there. The domain does + * not renew automatically unless the new owner sets up billing in Google + * Domains. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedName = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $operationResponse = $domainsClient->exportRegistration($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->exportRegistration($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'exportRegistration'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the `Registration` to export, + * in the format `projects/*/locations/*/registrations/*`. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function exportRegistration($name, array $optionalArgs = []) + { + $request = new ExportRegistrationRequest(); + $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->startOperationsCall('ExportRegistration', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets the details of a `Registration` resource. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedName = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $response = $domainsClient->getRegistration($formattedName); + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the `Registration` to get, in the format + * `projects/*/locations/*/registrations/*`. + * @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\Domains\V1beta1\Registration + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getRegistration($name, array $optionalArgs = []) + { + $request = new GetRegistrationRequest(); + $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('GetRegistration', Registration::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the `Registration` resources in a project. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedParent = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $domainsClient->listRegistrations($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $domainsClient->listRegistrations($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and location from which to list `Registration`s, specified in + * the format `projects/*/locations/*`. + * @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 + * Filter expression to restrict the `Registration`s returned. + * + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, a boolean, or an enum value. The comparison operator should be one + * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. + * + * For example, to filter to a specific domain name, use an expression like + * `domainName="example.com"`. You can also check for the existence of a + * field; for example, to find domains using custom DNS settings, use an + * expression like `dnsSettings.customDns:*`. + * + * You can also create compound filters by combining expressions with the + * `AND` and `OR` operators. For example, to find domains that are suspended + * or have specific issues flagged, use an expression like + * `(state=SUSPENDED) OR (issue:*)`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 + * + * @experimental + */ + public function listRegistrations($parent, array $optionalArgs = []) + { + $request = new ListRegistrationsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListRegistrations', $optionalArgs, ListRegistrationsResponse::class, $request); + } + + /** + * Registers a new domain name and creates a corresponding `Registration` + * resource. + * + * Call `RetrieveRegisterParameters` first to check availability of the domain + * name and determine parameters like price that are needed to build a call to + * this method. + * + * A successful call creates a `Registration` resource in state + * `REGISTRATION_PENDING`, which resolves to `ACTIVE` within 1-2 + * minutes, indicating that the domain was successfully registered. If the + * resource ends up in state `REGISTRATION_FAILED`, it indicates that the + * domain was not registered successfully, and you can safely delete the + * resource and retry registration. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedParent = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); + * $registration = new Registration(); + * $yearlyPrice = new Money(); + * $operationResponse = $domainsClient->registerDomain($formattedParent, $registration, $yearlyPrice); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->registerDomain($formattedParent, $registration, $yearlyPrice); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'registerDomain'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the `Registration`. Must be in the + * format `projects/*/locations/*`. + * @param Registration $registration Required. The complete `Registration` resource to be created. + * @param Money $yearlyPrice Required. Yearly price to register or renew the domain. + * The value that should be put here can be obtained from + * RetrieveRegisterParameters or SearchDomains calls. + * @param array $optionalArgs { + * Optional. + * + * @type int[] $domainNotices + * The list of domain notices that you acknowledge. Call + * `RetrieveRegisterParameters` to see the notices that need acknowledgement. + * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1beta1\DomainNotice} + * @type int[] $contactNotices + * The list of contact notices that the caller acknowledges. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1beta1\ContactNotice} + * @type bool $validateOnly + * When true, only validation is performed, without actually registering + * the domain. Follows: + * https://cloud.google.com/apis/design/design_patterns#request_validation + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function registerDomain($parent, $registration, $yearlyPrice, array $optionalArgs = []) + { + $request = new RegisterDomainRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setRegistration($registration); + $request->setYearlyPrice($yearlyPrice); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['domainNotices'])) { + $request->setDomainNotices($optionalArgs['domainNotices']); + } + + if (isset($optionalArgs['contactNotices'])) { + $request->setContactNotices($optionalArgs['contactNotices']); + } + + 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->startOperationsCall('RegisterDomain', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Resets the authorization code of the `Registration` to a new random string. + * + * You can call this method only after 60 days have elapsed since the initial + * domain registration. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $response = $domainsClient->resetAuthorizationCode($formattedRegistration); + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $registration Required. The name of the `Registration` whose authorization code is being reset, + * in the format `projects/*/locations/*/registrations/*`. + * @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\Domains\V1beta1\AuthorizationCode + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function resetAuthorizationCode($registration, array $optionalArgs = []) + { + $request = new ResetAuthorizationCodeRequest(); + $requestParamHeaders = []; + $request->setRegistration($registration); + $requestParamHeaders['registration'] = $registration; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ResetAuthorizationCode', AuthorizationCode::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the authorization code of the `Registration` for the purpose of + * transferring the domain to another registrar. + * + * You can call this method only after 60 days have elapsed since the initial + * domain registration. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + * $response = $domainsClient->retrieveAuthorizationCode($formattedRegistration); + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $registration Required. The name of the `Registration` whose authorization code is being retrieved, + * in the format `projects/*/locations/*/registrations/*`. + * @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\Domains\V1beta1\AuthorizationCode + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function retrieveAuthorizationCode($registration, array $optionalArgs = []) + { + $request = new RetrieveAuthorizationCodeRequest(); + $requestParamHeaders = []; + $request->setRegistration($registration); + $requestParamHeaders['registration'] = $registration; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RetrieveAuthorizationCode', AuthorizationCode::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets parameters needed to register a new domain name, including price and + * up-to-date availability. Use the returned values to call `RegisterDomain`. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $domainName = 'domain_name'; + * $formattedLocation = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); + * $response = $domainsClient->retrieveRegisterParameters($domainName, $formattedLocation); + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $domainName Required. The domain name. Unicode domain names must be expressed in Punycode format. + * @param string $location Required. The location. Must be in the format `projects/*/locations/*`. + * @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\Domains\V1beta1\RetrieveRegisterParametersResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function retrieveRegisterParameters($domainName, $location, array $optionalArgs = []) + { + $request = new RetrieveRegisterParametersRequest(); + $requestParamHeaders = []; + $request->setDomainName($domainName); + $request->setLocation($location); + $requestParamHeaders['location'] = $location; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RetrieveRegisterParameters', RetrieveRegisterParametersResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets parameters needed to transfer a domain name from another registrar to + * Cloud Domains. For domains managed by Google Domains, transferring to Cloud + * Domains is not supported. + * + * + * Use the returned values to call `TransferDomain`. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $domainName = 'domain_name'; + * $formattedLocation = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); + * $response = $domainsClient->retrieveTransferParameters($domainName, $formattedLocation); + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $domainName Required. The domain name. Unicode domain names must be expressed in Punycode format. + * @param string $location Required. The location. Must be in the format `projects/*/locations/*`. + * @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\Domains\V1beta1\RetrieveTransferParametersResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function retrieveTransferParameters($domainName, $location, array $optionalArgs = []) + { + $request = new RetrieveTransferParametersRequest(); + $requestParamHeaders = []; + $request->setDomainName($domainName); + $request->setLocation($location); + $requestParamHeaders['location'] = $location; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RetrieveTransferParameters', RetrieveTransferParametersResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Searches for available domain names similar to the provided query. + * + * Availability results from this method are approximate; call + * `RetrieveRegisterParameters` on a domain before registering to confirm + * availability. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $query = 'query'; + * $formattedLocation = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); + * $response = $domainsClient->searchDomains($query, $formattedLocation); + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $query Required. String used to search for available domain names. + * @param string $location Required. The location. Must be in the format `projects/*/locations/*`. + * @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\Domains\V1beta1\SearchDomainsResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function searchDomains($query, $location, array $optionalArgs = []) + { + $request = new SearchDomainsRequest(); + $requestParamHeaders = []; + $request->setQuery($query); + $request->setLocation($location); + $requestParamHeaders['location'] = $location; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SearchDomains', SearchDomainsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Transfers a domain name from another registrar to Cloud Domains. For + * domains managed by Google Domains, transferring to Cloud Domains is not + * supported. + * + * + * Before calling this method, go to the domain's current registrar to unlock + * the domain for transfer and retrieve the domain's transfer authorization + * code. Then call `RetrieveTransferParameters` to confirm that the domain is + * unlocked and to get values needed to build a call to this method. + * + * A successful call creates a `Registration` resource in state + * `TRANSFER_PENDING`. It can take several days to complete the transfer + * process. The registrant can often speed up this process by approving the + * transfer through the current registrar, either by clicking a link in an + * email from the registrar or by visiting the registrar's website. + * + * A few minutes after transfer approval, the resource transitions to state + * `ACTIVE`, indicating that the transfer was successful. If the transfer is + * rejected or the request expires without being approved, the resource can + * end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete + * the resource and retry the transfer. + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $formattedParent = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); + * $registration = new Registration(); + * $yearlyPrice = new Money(); + * $operationResponse = $domainsClient->transferDomain($formattedParent, $registration, $yearlyPrice); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->transferDomain($formattedParent, $registration, $yearlyPrice); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'transferDomain'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource of the `Registration`. Must be in the + * format `projects/*/locations/*`. + * @param Registration $registration Required. The complete `Registration` resource to be created. + * + * You can leave `registration.dns_settings` unset to import the + * domain's current DNS configuration from its current registrar. Use this + * option only if you are sure that the domain's current DNS service + * does not cease upon transfer, as is often the case for DNS services + * provided for free by the registrar. + * @param Money $yearlyPrice Required. Acknowledgement of the price to transfer or renew the domain for one year. + * Call `RetrieveTransferParameters` to obtain the price, which you must + * acknowledge. + * @param array $optionalArgs { + * Optional. + * + * @type int[] $contactNotices + * The list of contact notices that you acknowledge. The notices + * needed here depend on the values specified in + * `registration.contact_settings`. + * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1beta1\ContactNotice} + * @type AuthorizationCode $authorizationCode + * The domain's transfer authorization code. You can obtain this from the + * domain's current registrar. + * @type bool $validateOnly + * Validate the request without actually transferring the domain. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function transferDomain($parent, $registration, $yearlyPrice, array $optionalArgs = []) + { + $request = new TransferDomainRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setRegistration($registration); + $request->setYearlyPrice($yearlyPrice); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['contactNotices'])) { + $request->setContactNotices($optionalArgs['contactNotices']); + } + + if (isset($optionalArgs['authorizationCode'])) { + $request->setAuthorizationCode($optionalArgs['authorizationCode']); + } + + 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->startOperationsCall('TransferDomain', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates select fields of a `Registration` resource, notably `labels`. To + * update other fields, use the appropriate custom update method: + * + * * To update management settings, see `ConfigureManagementSettings` + * * To update DNS configuration, see `ConfigureDnsSettings` + * * To update contact information, see `ConfigureContactSettings` + * + * Sample code: + * ``` + * $domainsClient = new DomainsClient(); + * try { + * $updateMask = new FieldMask(); + * $operationResponse = $domainsClient->updateRegistration($updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $domainsClient->updateRegistration($updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'updateRegistration'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $domainsClient->close(); + * } + * ``` + * + * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. + * For example, if only the labels are being updated, the `update_mask` is + * `"labels"`. + * @param array $optionalArgs { + * Optional. + * + * @type Registration $registration + * Fields of the `Registration` 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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateRegistration($updateMask, array $optionalArgs = []) + { + $request = new UpdateRegistrationRequest(); + $requestParamHeaders = []; + $request->setUpdateMask($updateMask); + if (isset($optionalArgs['registration'])) { + $request->setRegistration($optionalArgs['registration']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateRegistration', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/Domains/v1beta1/src/V1beta1/gapic_metadata.json b/owl-bot-staging/Domains/v1beta1/src/V1beta1/gapic_metadata.json new file mode 100644 index 000000000000..fd839fab3d82 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/src/V1beta1/gapic_metadata.json @@ -0,0 +1,93 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.domains.v1beta1", + "libraryPackage": "Google\\Cloud\\Domains\\V1beta1", + "services": { + "Domains": { + "clients": { + "grpc": { + "libraryClient": "DomainsGapicClient", + "rpcs": { + "ConfigureContactSettings": { + "methods": [ + "configureContactSettings" + ] + }, + "ConfigureDnsSettings": { + "methods": [ + "configureDnsSettings" + ] + }, + "ConfigureManagementSettings": { + "methods": [ + "configureManagementSettings" + ] + }, + "DeleteRegistration": { + "methods": [ + "deleteRegistration" + ] + }, + "ExportRegistration": { + "methods": [ + "exportRegistration" + ] + }, + "GetRegistration": { + "methods": [ + "getRegistration" + ] + }, + "ListRegistrations": { + "methods": [ + "listRegistrations" + ] + }, + "RegisterDomain": { + "methods": [ + "registerDomain" + ] + }, + "ResetAuthorizationCode": { + "methods": [ + "resetAuthorizationCode" + ] + }, + "RetrieveAuthorizationCode": { + "methods": [ + "retrieveAuthorizationCode" + ] + }, + "RetrieveRegisterParameters": { + "methods": [ + "retrieveRegisterParameters" + ] + }, + "RetrieveTransferParameters": { + "methods": [ + "retrieveTransferParameters" + ] + }, + "SearchDomains": { + "methods": [ + "searchDomains" + ] + }, + "TransferDomain": { + "methods": [ + "transferDomain" + ] + }, + "UpdateRegistration": { + "methods": [ + "updateRegistration" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_client_config.json b/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_client_config.json new file mode 100644 index 000000000000..26b7a889c460 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_client_config.json @@ -0,0 +1,119 @@ +{ + "interfaces": { + "google.cloud.domains.v1beta1.Domains": { + "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": { + "ConfigureContactSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ConfigureDnsSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ConfigureManagementSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteRegistration": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ExportRegistration": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetRegistration": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListRegistrations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RegisterDomain": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ResetAuthorizationCode": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RetrieveAuthorizationCode": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RetrieveRegisterParameters": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RetrieveTransferParameters": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SearchDomains": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TransferDomain": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateRegistration": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_descriptor_config.php b/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_descriptor_config.php new file mode 100644 index 000000000000..e243d0114897 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_descriptor_config.php @@ -0,0 +1,98 @@ + [ + 'google.cloud.domains.v1beta1.Domains' => [ + 'ConfigureContactSettings' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Domains\V1beta1\Registration', + 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ConfigureDnsSettings' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Domains\V1beta1\Registration', + 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ConfigureManagementSettings' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Domains\V1beta1\Registration', + 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteRegistration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ExportRegistration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Domains\V1beta1\Registration', + 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'RegisterDomain' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Domains\V1beta1\Registration', + 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'TransferDomain' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Domains\V1beta1\Registration', + 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateRegistration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Domains\V1beta1\Registration', + 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListRegistrations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRegistrations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_rest_client_config.php b/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_rest_client_config.php new file mode 100644 index 000000000000..0d8c43034439 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_rest_client_config.php @@ -0,0 +1,271 @@ + [ + 'google.cloud.domains.v1beta1.Domains' => [ + 'ConfigureContactSettings' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{registration=projects/*/locations/*/registrations/*}:configureContactSettings', + 'body' => '*', + 'placeholders' => [ + 'registration' => [ + 'getters' => [ + 'getRegistration', + ], + ], + ], + ], + 'ConfigureDnsSettings' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{registration=projects/*/locations/*/registrations/*}:configureDnsSettings', + 'body' => '*', + 'placeholders' => [ + 'registration' => [ + 'getters' => [ + 'getRegistration', + ], + ], + ], + ], + 'ConfigureManagementSettings' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{registration=projects/*/locations/*/registrations/*}:configureManagementSettings', + 'body' => '*', + 'placeholders' => [ + 'registration' => [ + 'getters' => [ + 'getRegistration', + ], + ], + ], + ], + 'DeleteRegistration' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/registrations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportRegistration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/registrations/*}:export', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRegistration' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/registrations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListRegistrations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/registrations', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RegisterDomain' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/registrations:register', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ResetAuthorizationCode' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{registration=projects/*/locations/*/registrations/*}:resetAuthorizationCode', + 'body' => '*', + 'placeholders' => [ + 'registration' => [ + 'getters' => [ + 'getRegistration', + ], + ], + ], + ], + 'RetrieveAuthorizationCode' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{registration=projects/*/locations/*/registrations/*}:retrieveAuthorizationCode', + 'placeholders' => [ + 'registration' => [ + 'getters' => [ + 'getRegistration', + ], + ], + ], + ], + 'RetrieveRegisterParameters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{location=projects/*/locations/*}/registrations:retrieveRegisterParameters', + 'placeholders' => [ + 'location' => [ + 'getters' => [ + 'getLocation', + ], + ], + ], + ], + 'RetrieveTransferParameters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{location=projects/*/locations/*}/registrations:retrieveTransferParameters', + 'placeholders' => [ + 'location' => [ + 'getters' => [ + 'getLocation', + ], + ], + ], + ], + 'SearchDomains' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{location=projects/*/locations/*}/registrations:searchDomains', + 'placeholders' => [ + 'location' => [ + 'getters' => [ + 'getLocation', + ], + ], + ], + ], + 'TransferDomain' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/registrations:transfer', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateRegistration' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta1/{registration.name=projects/*/locations/*/registrations/*}', + 'body' => 'registration', + 'placeholders' => [ + 'registration.name' => [ + 'getters' => [ + 'getRegistration', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/registrations/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/registrations/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/registrations/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Domains/v1beta1/tests/Unit/V1beta1/DomainsClientTest.php b/owl-bot-staging/Domains/v1beta1/tests/Unit/V1beta1/DomainsClientTest.php new file mode 100644 index 000000000000..dc8514072518 --- /dev/null +++ b/owl-bot-staging/Domains/v1beta1/tests/Unit/V1beta1/DomainsClientTest.php @@ -0,0 +1,1625 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DomainsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DomainsClient($options); + } + + /** @test */ + public function configureContactSettingsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/configureContactSettingsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name); + $expectedResponse->setDomainName($domainName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/configureContactSettingsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $updateMask = new FieldMask(); + $response = $gapicClient->configureContactSettings($formattedRegistration, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1beta1.Domains/ConfigureContactSettings', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRegistration(); + $this->assertProtobufEquals($formattedRegistration, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/configureContactSettingsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function configureContactSettingsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/configureContactSettingsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $updateMask = new FieldMask(); + $response = $gapicClient->configureContactSettings($formattedRegistration, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/configureContactSettingsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function configureDnsSettingsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/configureDnsSettingsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name); + $expectedResponse->setDomainName($domainName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/configureDnsSettingsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $updateMask = new FieldMask(); + $response = $gapicClient->configureDnsSettings($formattedRegistration, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1beta1.Domains/ConfigureDnsSettings', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRegistration(); + $this->assertProtobufEquals($formattedRegistration, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/configureDnsSettingsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function configureDnsSettingsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/configureDnsSettingsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $updateMask = new FieldMask(); + $response = $gapicClient->configureDnsSettings($formattedRegistration, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/configureDnsSettingsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function configureManagementSettingsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/configureManagementSettingsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name); + $expectedResponse->setDomainName($domainName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/configureManagementSettingsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $updateMask = new FieldMask(); + $response = $gapicClient->configureManagementSettings($formattedRegistration, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1beta1.Domains/ConfigureManagementSettings', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRegistration(); + $this->assertProtobufEquals($formattedRegistration, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/configureManagementSettingsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function configureManagementSettingsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/configureManagementSettingsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $updateMask = new FieldMask(); + $response = $gapicClient->configureManagementSettings($formattedRegistration, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/configureManagementSettingsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRegistrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRegistrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteRegistrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $response = $gapicClient->deleteRegistration($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1beta1.Domains/DeleteRegistration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRegistrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRegistrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRegistrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $response = $gapicClient->deleteRegistration($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRegistrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function exportRegistrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportRegistrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name2); + $expectedResponse->setDomainName($domainName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportRegistrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $response = $gapicClient->exportRegistration($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1beta1.Domains/ExportRegistration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportRegistrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function exportRegistrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportRegistrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $response = $gapicClient->exportRegistration($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportRegistrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getRegistrationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name2); + $expectedResponse->setDomainName($domainName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $response = $gapicClient->getRegistration($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1beta1.Domains/GetRegistration', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRegistrationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + try { + $gapicClient->getRegistration($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 listRegistrationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $registrationsElement = new Registration(); + $registrations = [ + $registrationsElement, + ]; + $expectedResponse = new ListRegistrationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRegistrations($registrations); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listRegistrations($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRegistrations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1beta1.Domains/ListRegistrations', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRegistrationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listRegistrations($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 registerDomainTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/registerDomainTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name); + $expectedResponse->setDomainName($domainName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/registerDomainTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $registration = new Registration(); + $registrationDomainName = 'registrationDomainName1873916680'; + $registration->setDomainName($registrationDomainName); + $registrationContactSettings = new ContactSettings(); + $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; + $registrationContactSettings->setPrivacy($contactSettingsPrivacy); + $contactSettingsRegistrantContact = new Contact(); + $registrantContactPostalAddress = new PostalAddress(); + $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); + $registrantContactEmail = 'registrantContactEmail1001340839'; + $contactSettingsRegistrantContact->setEmail($registrantContactEmail); + $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; + $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); + $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); + $contactSettingsAdminContact = new Contact(); + $adminContactPostalAddress = new PostalAddress(); + $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); + $adminContactEmail = 'adminContactEmail1687004235'; + $contactSettingsAdminContact->setEmail($adminContactEmail); + $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; + $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); + $registrationContactSettings->setAdminContact($contactSettingsAdminContact); + $contactSettingsTechnicalContact = new Contact(); + $technicalContactPostalAddress = new PostalAddress(); + $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); + $technicalContactEmail = 'technicalContactEmail-221168807'; + $contactSettingsTechnicalContact->setEmail($technicalContactEmail); + $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; + $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); + $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); + $registration->setContactSettings($registrationContactSettings); + $yearlyPrice = new Money(); + $response = $gapicClient->registerDomain($formattedParent, $registration, $yearlyPrice); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1beta1.Domains/RegisterDomain', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRegistration(); + $this->assertProtobufEquals($registration, $actualValue); + $actualValue = $actualApiRequestObject->getYearlyPrice(); + $this->assertProtobufEquals($yearlyPrice, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/registerDomainTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function registerDomainExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/registerDomainTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $registration = new Registration(); + $registrationDomainName = 'registrationDomainName1873916680'; + $registration->setDomainName($registrationDomainName); + $registrationContactSettings = new ContactSettings(); + $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; + $registrationContactSettings->setPrivacy($contactSettingsPrivacy); + $contactSettingsRegistrantContact = new Contact(); + $registrantContactPostalAddress = new PostalAddress(); + $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); + $registrantContactEmail = 'registrantContactEmail1001340839'; + $contactSettingsRegistrantContact->setEmail($registrantContactEmail); + $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; + $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); + $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); + $contactSettingsAdminContact = new Contact(); + $adminContactPostalAddress = new PostalAddress(); + $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); + $adminContactEmail = 'adminContactEmail1687004235'; + $contactSettingsAdminContact->setEmail($adminContactEmail); + $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; + $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); + $registrationContactSettings->setAdminContact($contactSettingsAdminContact); + $contactSettingsTechnicalContact = new Contact(); + $technicalContactPostalAddress = new PostalAddress(); + $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); + $technicalContactEmail = 'technicalContactEmail-221168807'; + $contactSettingsTechnicalContact->setEmail($technicalContactEmail); + $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; + $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); + $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); + $registration->setContactSettings($registrationContactSettings); + $yearlyPrice = new Money(); + $response = $gapicClient->registerDomain($formattedParent, $registration, $yearlyPrice); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/registerDomainTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resetAuthorizationCodeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $code = 'code3059181'; + $expectedResponse = new AuthorizationCode(); + $expectedResponse->setCode($code); + $transport->addResponse($expectedResponse); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $response = $gapicClient->resetAuthorizationCode($formattedRegistration); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1beta1.Domains/ResetAuthorizationCode', $actualFuncCall); + $actualValue = $actualRequestObject->getRegistration(); + $this->assertProtobufEquals($formattedRegistration, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetAuthorizationCodeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + try { + $gapicClient->resetAuthorizationCode($formattedRegistration); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveAuthorizationCodeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $code = 'code3059181'; + $expectedResponse = new AuthorizationCode(); + $expectedResponse->setCode($code); + $transport->addResponse($expectedResponse); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + $response = $gapicClient->retrieveAuthorizationCode($formattedRegistration); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1beta1.Domains/RetrieveAuthorizationCode', $actualFuncCall); + $actualValue = $actualRequestObject->getRegistration(); + $this->assertProtobufEquals($formattedRegistration, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveAuthorizationCodeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); + try { + $gapicClient->retrieveAuthorizationCode($formattedRegistration); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveRegisterParametersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RetrieveRegisterParametersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $domainName = 'domainName104118566'; + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->retrieveRegisterParameters($domainName, $formattedLocation); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1beta1.Domains/RetrieveRegisterParameters', $actualFuncCall); + $actualValue = $actualRequestObject->getDomainName(); + $this->assertProtobufEquals($domainName, $actualValue); + $actualValue = $actualRequestObject->getLocation(); + $this->assertProtobufEquals($formattedLocation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveRegisterParametersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $domainName = 'domainName104118566'; + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->retrieveRegisterParameters($domainName, $formattedLocation); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveTransferParametersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RetrieveTransferParametersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $domainName = 'domainName104118566'; + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->retrieveTransferParameters($domainName, $formattedLocation); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1beta1.Domains/RetrieveTransferParameters', $actualFuncCall); + $actualValue = $actualRequestObject->getDomainName(); + $this->assertProtobufEquals($domainName, $actualValue); + $actualValue = $actualRequestObject->getLocation(); + $this->assertProtobufEquals($formattedLocation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveTransferParametersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $domainName = 'domainName104118566'; + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->retrieveTransferParameters($domainName, $formattedLocation); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchDomainsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SearchDomainsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $query = 'query107944136'; + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->searchDomains($query, $formattedLocation); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1beta1.Domains/SearchDomains', $actualFuncCall); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $actualValue = $actualRequestObject->getLocation(); + $this->assertProtobufEquals($formattedLocation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchDomainsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $query = 'query107944136'; + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->searchDomains($query, $formattedLocation); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function transferDomainTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/transferDomainTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name); + $expectedResponse->setDomainName($domainName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/transferDomainTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $registration = new Registration(); + $registrationDomainName = 'registrationDomainName1873916680'; + $registration->setDomainName($registrationDomainName); + $registrationContactSettings = new ContactSettings(); + $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; + $registrationContactSettings->setPrivacy($contactSettingsPrivacy); + $contactSettingsRegistrantContact = new Contact(); + $registrantContactPostalAddress = new PostalAddress(); + $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); + $registrantContactEmail = 'registrantContactEmail1001340839'; + $contactSettingsRegistrantContact->setEmail($registrantContactEmail); + $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; + $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); + $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); + $contactSettingsAdminContact = new Contact(); + $adminContactPostalAddress = new PostalAddress(); + $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); + $adminContactEmail = 'adminContactEmail1687004235'; + $contactSettingsAdminContact->setEmail($adminContactEmail); + $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; + $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); + $registrationContactSettings->setAdminContact($contactSettingsAdminContact); + $contactSettingsTechnicalContact = new Contact(); + $technicalContactPostalAddress = new PostalAddress(); + $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); + $technicalContactEmail = 'technicalContactEmail-221168807'; + $contactSettingsTechnicalContact->setEmail($technicalContactEmail); + $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; + $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); + $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); + $registration->setContactSettings($registrationContactSettings); + $yearlyPrice = new Money(); + $response = $gapicClient->transferDomain($formattedParent, $registration, $yearlyPrice); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1beta1.Domains/TransferDomain', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRegistration(); + $this->assertProtobufEquals($registration, $actualValue); + $actualValue = $actualApiRequestObject->getYearlyPrice(); + $this->assertProtobufEquals($yearlyPrice, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/transferDomainTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function transferDomainExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/transferDomainTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $registration = new Registration(); + $registrationDomainName = 'registrationDomainName1873916680'; + $registration->setDomainName($registrationDomainName); + $registrationContactSettings = new ContactSettings(); + $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; + $registrationContactSettings->setPrivacy($contactSettingsPrivacy); + $contactSettingsRegistrantContact = new Contact(); + $registrantContactPostalAddress = new PostalAddress(); + $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); + $registrantContactEmail = 'registrantContactEmail1001340839'; + $contactSettingsRegistrantContact->setEmail($registrantContactEmail); + $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; + $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); + $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); + $contactSettingsAdminContact = new Contact(); + $adminContactPostalAddress = new PostalAddress(); + $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); + $adminContactEmail = 'adminContactEmail1687004235'; + $contactSettingsAdminContact->setEmail($adminContactEmail); + $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; + $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); + $registrationContactSettings->setAdminContact($contactSettingsAdminContact); + $contactSettingsTechnicalContact = new Contact(); + $technicalContactPostalAddress = new PostalAddress(); + $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); + $technicalContactEmail = 'technicalContactEmail-221168807'; + $contactSettingsTechnicalContact->setEmail($technicalContactEmail); + $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; + $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); + $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); + $registration->setContactSettings($registrationContactSettings); + $yearlyPrice = new Money(); + $response = $gapicClient->transferDomain($formattedParent, $registration, $yearlyPrice); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/transferDomainTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateRegistrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRegistrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domainName = 'domainName104118566'; + $expectedResponse = new Registration(); + $expectedResponse->setName($name); + $expectedResponse->setDomainName($domainName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateRegistrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $response = $gapicClient->updateRegistration($updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.domains.v1beta1.Domains/UpdateRegistration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRegistrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateRegistrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRegistrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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(); + $response = $gapicClient->updateRegistration($updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRegistrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php new file mode 100644 index 0000000000000000000000000000000000000000..7a2c5a1ceeb0129959448848e7a1e055208c70dd GIT binary patch literal 2312 zcmbVOU31$+6vfU*lj}4|1J}zbzB@t(Wc`P8qWIU#vcx)E=0p%tk^)@+e_erDP>hED{%o6TVi%b}s1hg`uXM(XH zu6O}UMwD~LIgJ<>emJR|?GLGN_bZ4tW1*=I0SMh0jU(5iq}e%siUA{6xOP+F*>#O) z*RJE)&-RZc-XVY&xN%Hs3Kw1h!B3P71K%UDa0Pzd^JB*kec`)-|1;KkM8<9qQ%t=c zJ5EAR_$(wcp&fd({D7pGGWK4C^l(=;B6vbCpH2v;BH`ho;w=Hr=TG(m{i=~~cd2fYby3ho{-UgT zO?@AGBivbJEzDI~Jo?htl~+fjd7)3xF6B8jN%TJawFRI3U!NEsrU3iv{OpO@~y&8rm@U?t%}s#@vq zoR+k4Mnhqk08~CWQhF6qIJljamG#A(8_ej#PE7fk?@`BNXsDlr(!OwTm?gbU=gnS< zQA;6=9k_uGj@=2xhRNQ34L34)DRtrC^QGXGU>dyCg6-?a=_0go@cc8%V{EWK|9!YA zn=Xf@BVIZ`BWo%;rTT>w-htnU?Z9)t9cqy`9AwW0H&-6f}C&*B;%liIjLDLt+^`aL_?H*$$_!p=xtb^Q88sBeap0Y(hFt)NL~&$Dim5OyoQ|O_Tk7^ zsbt)N_fWiug)!Cl1-&w&>e8$kw_uag857j;qvE=fwT&IRLQV#aaWpxRE2f&ryHE)H zkUC*98)|9R4D3_32OKpT6oZE^VE4`2X6(TS-A1o{GU&J3r%tb5?GJj+;I!9i)LKtk zjr#68#s;jmJB`!b9L|=lYVDiT_VbfQy@|i&arSJe^k?|jim?f6PX~Q`Ts{6Z4{}v5 z)AHj&x&u3MDRpw+eXpm}gavLmF&Up!P+)cYDi@>Rt+w{zf^qUsF85phZd0vlQ*CHd znYf#+d{eLJKeH%1UF5cXHO|IeuKqW8o&P9>vn+*YSyuxsO9u|uRTZD!pYNDY(q(yR RxBll|RgvimJco0De*y2v^#T9@ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php new file mode 100644 index 000000000000..98ad3355d980 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php @@ -0,0 +1,42 @@ +internalAddGeneratedFile( + ' +ð +Egoogle/devtools/clouderrorreporting/v1beta1/error_group_service.proto+google.devtools.clouderrorreporting.v1beta1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto8google/devtools/clouderrorreporting/v1beta1/common.proto"\\ +GetGroupRequestI + +group_name ( B5àAúA/ +-clouderrorreporting.googleapis.com/ErrorGroup"a +UpdateGroupRequestK +group ( 27.google.devtools.clouderrorreporting.v1beta1.ErrorGroupBàA2û +ErrorGroupServiceÁ +GetGroup<.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest7.google.devtools.clouderrorreporting.v1beta1.ErrorGroup">‚Óä“+)/v1beta1/{group_name=projects/*/groups/*}ÚA +group_nameÉ + UpdateGroup?.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest7.google.devtools.clouderrorreporting.v1beta1.ErrorGroup"@‚Óä“2)/v1beta1/{group.name=projects/*/groups/*}:groupÚAgroupVÊA"clouderrorreporting.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB£ +/com.google.devtools.clouderrorreporting.v1beta1BErrorGroupServiceProtoPZ^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreportingøª#Google.Cloud.ErrorReporting.V1Beta1Ê#Google\\Cloud\\ErrorReporting\\V1beta1ê&Google::Cloud::ErrorReporting::V1beta1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php new file mode 100644 index 0000000000000000000000000000000000000000..fdd537f4a0dc755436c095b08343d5715e162542 GIT binary patch literal 5156 zcmcgwOK%%h6vlRwHm9lU+~(ni*VHXEec3cc6uHldJqZzM?Al2S$m%e$ublyVW|+B7 zDODr{5*wB*S+ZlvFJRpz2nkgzxp~_c4wq2~k|NbW`WfJ>NZ#?|k=h^@g|Z z!AWg_I@GrqZD?x`G`3DP&v%(yciY-px7nn=R(Cs|-KKt4(~2c+xwN7g#l@8qXd1X( zzfSX7%XM3AnrqMv=DO`5S8u!B2K9Z{_o?Ul%ywG2jf-oPSr>C+*bJD(0yCighFzyw zu_AzDb!gyOb*e3t=WgNbhQ+Mff&i}-6?m<%6TEik;v5IR0#I*TL7*9Y?J8fRDwlwV zpy5BSyVkbr8ebj%J7ou^?byt=+V&S1|23^?wF8PMJLfjLPMz7Vqj7_hQ>Qa$G>OUQ zp7Jnmv=5yv^AuwGYKsn|zGJn~{h;pK9&`ONPR-|Al=TwNM`q5bWjUPP)MliQ`TPzi zuW8Kh(*D&o&8MvEJ6D9?9ALBetF}ujb1Sec)QyQ4qdoz zE5_)JMvox#*nTs;lJWwdhVL~no=e}6a}p*Swr_Tq_RXsHot{!_TAqz<&Z!`~cl!0d z4^3Wgb4?XoO*q~+!BqHh|6swA&~Y=>)EEcve?9`>IG* zDO|xt;(X4KDhMR;R{(gprf)ednjR9^R|dkq-KG8m&f5xykf>K-oTE0(y4!V_874eE zEbxzq_+iGgVaG`84`2kN8GWRrWC zJ|sMv4&i$qaR||f(y$Ceu8-SQdPKN$HJraMcf?L3$W!7N5^)knJmiBJ;I@)JjHp9$ zd|N;c2FRxD7q&>Zow#bU-2_Q*Lki6TbnaPl8jt}qfOfn7#>!r zBY7n|X^&)(SxDkJq~At%$6hvfV5}FFl7#>}ggZZ2(?$h>yb2Rew`1=N|3}u z8VVUUB<^e*RJ6gM2@{n!HV`B80H7~@z0z^{Opq)9GT3J_k-VIHvWlFCL)2-=*-{+$ zNMYuWIE?W&5{?8fT*y`X#{Xv_m%TU`Cw3F^h)QvO?y6E;qm@ei6a&(qUZqgja8jWt zuYV{`gEib1f1bB4{S|{`G~h#J3WzE@hUq+*0XQVqQ$hN`JJNx^7uT2cQnm53PLHH`OD z2l@;zy=CI8YHBER55}XdFV6yG91bcy5&EePA2_;!(uqe|p_^)S8jgf#8k0Tns1SZt z{*U2Uk+vzLFRHyVlQ14#K{D)Y7mjU7N^jdIZ@>woQYlr;LTPn*#nhJ;7nW}s_$!+C zmtkt_lW}`hUotCbP{g9d$TUoD|ERB+#&R(gKfBq#qlxXEAl3pJm(5b8XjHZ>lmw8T z6pd;@R(DCSu9#KBST@C&sBWQR=qpB1jwF!p$MpGmqrit&t45_NKOC6-b{NJ)Ux>|A zm6kk3K1YuVWHA0ljg?4F7Y6Eq?HIC7nbKFk{`p-zM=tbk`w#n%(AU%-LGJ8kP813MX^>hz6gwpRfziU7}%Gy4cos^MdOA`+ZD#n}z= zTMS0~$xa442KSqWH5}~T5JgY{-jo5J9VEcWHEH_JBR#X*1u}Xy`bE#KGv)>PT<-q; z`>HIxdy~~=>+%kG!E0Nr>H3|yAL5Y1JJlc+oSWRyK4tzeQ;vOfPr8F>ZM@lJUB8uU zQ3or<+}xI@`+Cv3vP-mo$6`OmPcDd;t89TkSY?GPmGC(%t6r=gg|lk%U8`1$&a2_m zmUuUN8h=y5internalAddGeneratedFile( + ' +¤ +Ggoogle/devtools/clouderrorreporting/v1beta1/report_errors_service.proto+google.devtools.clouderrorreporting.v1beta1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto8google/devtools/clouderrorreporting/v1beta1/common.protogoogle/protobuf/timestamp.proto"¹ +ReportErrorEventRequestI + project_name ( B3àAúA- ++cloudresourcemanager.googleapis.com/ProjectS +event ( 2?.google.devtools.clouderrorreporting.v1beta1.ReportedErrorEventBàA" +ReportErrorEventResponse"‹ +ReportedErrorEvent3 + +event_time ( 2.google.protobuf.TimestampBàAY +service_context ( 2;.google.devtools.clouderrorreporting.v1beta1.ServiceContextBàA +message ( BàAO +context ( 29.google.devtools.clouderrorreporting.v1beta1.ErrorContextBàA2å +ReportErrorsServiceõ +ReportErrorEventD.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequestE.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse"T‚Óä“9"0/v1beta1/{project_name=projects/*}/events:report:eventÚAproject_name,eventVÊA"clouderrorreporting.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¥ +/com.google.devtools.clouderrorreporting.v1beta1BReportErrorsServiceProtoPZ^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreportingøª#Google.Cloud.ErrorReporting.V1Beta1Ê#Google\\Cloud\\ErrorReporting\\V1beta1ê&Google::Cloud::ErrorReporting::V1beta1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php new file mode 100644 index 000000000000..e92e678b6697 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php @@ -0,0 +1,83 @@ +google.devtools.clouderrorreporting.v1beta1.DeleteEventsRequest + */ +class DeleteEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $project_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_name + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProjectName() + { + return $this->project_name; + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProjectName($var) + { + GPBUtil::checkString($var, True); + $this->project_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php new file mode 100644 index 000000000000..53e2ba2358d4 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php @@ -0,0 +1,33 @@ +google.devtools.clouderrorreporting.v1beta1.DeleteEventsResponse + */ +class DeleteEventsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php new file mode 100644 index 000000000000..1c5566968212 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php @@ -0,0 +1,206 @@ +google.devtools.clouderrorreporting.v1beta1.ErrorContext + */ +class ErrorContext extends \Google\Protobuf\Internal\Message +{ + /** + * The HTTP request which was processed when the error was + * triggered. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; + */ + protected $http_request = null; + /** + * The user who caused or was affected by the crash. + * This can be a user ID, an email address, or an arbitrary token that + * uniquely identifies the user. + * When sending an error report, leave this field empty if the user was not + * logged in. In this case the + * Error Reporting system will use other data, such as remote IP address, to + * distinguish affected users. See `affected_users_count` in + * `ErrorGroupStats`. + * + * Generated from protobuf field string user = 2; + */ + protected $user = ''; + /** + * The location in the source code where the decision was made to + * report the error, usually the place where it was logged. + * For a logged exception this would be the source line where the + * exception is logged, usually close to the place where it was + * caught. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; + */ + protected $report_location = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext $http_request + * The HTTP request which was processed when the error was + * triggered. + * @type string $user + * The user who caused or was affected by the crash. + * This can be a user ID, an email address, or an arbitrary token that + * uniquely identifies the user. + * When sending an error report, leave this field empty if the user was not + * logged in. In this case the + * Error Reporting system will use other data, such as remote IP address, to + * distinguish affected users. See `affected_users_count` in + * `ErrorGroupStats`. + * @type \Google\Cloud\ErrorReporting\V1beta1\SourceLocation $report_location + * The location in the source code where the decision was made to + * report the error, usually the place where it was logged. + * For a logged exception this would be the source line where the + * exception is logged, usually close to the place where it was + * caught. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The HTTP request which was processed when the error was + * triggered. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; + * @return \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext|null + */ + public function getHttpRequest() + { + return $this->http_request; + } + + public function hasHttpRequest() + { + return isset($this->http_request); + } + + public function clearHttpRequest() + { + unset($this->http_request); + } + + /** + * The HTTP request which was processed when the error was + * triggered. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; + * @param \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext $var + * @return $this + */ + public function setHttpRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext::class); + $this->http_request = $var; + + return $this; + } + + /** + * The user who caused or was affected by the crash. + * This can be a user ID, an email address, or an arbitrary token that + * uniquely identifies the user. + * When sending an error report, leave this field empty if the user was not + * logged in. In this case the + * Error Reporting system will use other data, such as remote IP address, to + * distinguish affected users. See `affected_users_count` in + * `ErrorGroupStats`. + * + * Generated from protobuf field string user = 2; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * The user who caused or was affected by the crash. + * This can be a user ID, an email address, or an arbitrary token that + * uniquely identifies the user. + * When sending an error report, leave this field empty if the user was not + * logged in. In this case the + * Error Reporting system will use other data, such as remote IP address, to + * distinguish affected users. See `affected_users_count` in + * `ErrorGroupStats`. + * + * 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; + } + + /** + * The location in the source code where the decision was made to + * report the error, usually the place where it was logged. + * For a logged exception this would be the source line where the + * exception is logged, usually close to the place where it was + * caught. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; + * @return \Google\Cloud\ErrorReporting\V1beta1\SourceLocation|null + */ + public function getReportLocation() + { + return $this->report_location; + } + + public function hasReportLocation() + { + return isset($this->report_location); + } + + public function clearReportLocation() + { + unset($this->report_location); + } + + /** + * The location in the source code where the decision was made to + * report the error, usually the place where it was logged. + * For a logged exception this would be the source line where the + * exception is logged, usually close to the place where it was + * caught. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; + * @param \Google\Cloud\ErrorReporting\V1beta1\SourceLocation $var + * @return $this + */ + public function setReportLocation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\SourceLocation::class); + $this->report_location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php new file mode 100644 index 000000000000..64d7396ca2d5 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php @@ -0,0 +1,207 @@ +google.devtools.clouderrorreporting.v1beta1.ErrorEvent + */ +class ErrorEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Time when the event occurred as provided in the error report. + * If the report did not contain a timestamp, the time the error was received + * by the Error Reporting system is used. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; + */ + protected $event_time = null; + /** + * The `ServiceContext` for which this error was reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; + */ + protected $service_context = null; + /** + * The stack trace that was reported or logged by the service. + * + * Generated from protobuf field string message = 3; + */ + protected $message = ''; + /** + * Data about the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; + */ + protected $context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $event_time + * Time when the event occurred as provided in the error report. + * If the report did not contain a timestamp, the time the error was received + * by the Error Reporting system is used. + * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $service_context + * The `ServiceContext` for which this error was reported. + * @type string $message + * The stack trace that was reported or logged by the service. + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $context + * Data about the context in which the error occurred. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Time when the event occurred as provided in the error report. + * If the report did not contain a timestamp, the time the error was received + * by the Error Reporting system is used. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * Time when the event occurred as provided in the error report. + * If the report did not contain a timestamp, the time the error was received + * by the Error Reporting system is used. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * The `ServiceContext` for which this error was reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext|null + */ + public function getServiceContext() + { + return $this->service_context; + } + + public function hasServiceContext() + { + return isset($this->service_context); + } + + public function clearServiceContext() + { + unset($this->service_context); + } + + /** + * The `ServiceContext` for which this error was reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; + * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $var + * @return $this + */ + public function setServiceContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); + $this->service_context = $var; + + return $this; + } + + /** + * The stack trace that was reported or logged by the service. + * + * Generated from protobuf field string message = 3; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The stack trace that was reported or logged by the service. + * + * Generated from protobuf field string message = 3; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Data about the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext|null + */ + public function getContext() + { + return $this->context; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Data about the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorContext::class); + $this->context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php new file mode 100644 index 000000000000..0b3b5c6b574a --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php @@ -0,0 +1,181 @@ +google.devtools.clouderrorreporting.v1beta1.ErrorGroup + */ +class ErrorGroup extends \Google\Protobuf\Internal\Message +{ + /** + * The group resource name. + * Example: projects/my-project-123/groups/CNSgkpnppqKCUw + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Group IDs are unique for a given project. If the same kind of error + * occurs in different service contexts, it will receive the same group ID. + * + * Generated from protobuf field string group_id = 2; + */ + protected $group_id = ''; + /** + * Associated tracking issues. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; + */ + private $tracking_issues; + /** + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; + */ + protected $resolution_status = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The group resource name. + * Example: projects/my-project-123/groups/CNSgkpnppqKCUw + * @type string $group_id + * Group IDs are unique for a given project. If the same kind of error + * occurs in different service contexts, it will receive the same group ID. + * @type array<\Google\Cloud\ErrorReporting\V1beta1\TrackingIssue>|\Google\Protobuf\Internal\RepeatedField $tracking_issues + * Associated tracking issues. + * @type int $resolution_status + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The group resource name. + * Example: projects/my-project-123/groups/CNSgkpnppqKCUw + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The group resource name. + * Example: projects/my-project-123/groups/CNSgkpnppqKCUw + * + * 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; + } + + /** + * Group IDs are unique for a given project. If the same kind of error + * occurs in different service contexts, it will receive the same group ID. + * + * Generated from protobuf field string group_id = 2; + * @return string + */ + public function getGroupId() + { + return $this->group_id; + } + + /** + * Group IDs are unique for a given project. If the same kind of error + * occurs in different service contexts, it will receive the same group ID. + * + * Generated from protobuf field string group_id = 2; + * @param string $var + * @return $this + */ + public function setGroupId($var) + { + GPBUtil::checkString($var, True); + $this->group_id = $var; + + return $this; + } + + /** + * Associated tracking issues. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTrackingIssues() + { + return $this->tracking_issues; + } + + /** + * Associated tracking issues. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; + * @param array<\Google\Cloud\ErrorReporting\V1beta1\TrackingIssue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTrackingIssues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue::class); + $this->tracking_issues = $arr; + + return $this; + } + + /** + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; + * @return int + */ + public function getResolutionStatus() + { + return $this->resolution_status; + } + + /** + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; + * @param int $var + * @return $this + */ + public function setResolutionStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\ResolutionStatus::class); + $this->resolution_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php new file mode 100644 index 000000000000..fd726de75f01 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php @@ -0,0 +1,76 @@ +google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder + */ +class ErrorGroupOrder +{ + /** + * No group order specified. + * + * Generated from protobuf enum GROUP_ORDER_UNSPECIFIED = 0; + */ + const GROUP_ORDER_UNSPECIFIED = 0; + /** + * Total count of errors in the given time window in descending order. + * + * Generated from protobuf enum COUNT_DESC = 1; + */ + const COUNT_DESC = 1; + /** + * Timestamp when the group was last seen in the given time window + * in descending order. + * + * Generated from protobuf enum LAST_SEEN_DESC = 2; + */ + const LAST_SEEN_DESC = 2; + /** + * Timestamp when the group was created in descending order. + * + * Generated from protobuf enum CREATED_DESC = 3; + */ + const CREATED_DESC = 3; + /** + * Number of affected users in the given time window in descending order. + * + * Generated from protobuf enum AFFECTED_USERS_DESC = 4; + */ + const AFFECTED_USERS_DESC = 4; + + private static $valueToName = [ + self::GROUP_ORDER_UNSPECIFIED => 'GROUP_ORDER_UNSPECIFIED', + self::COUNT_DESC => 'COUNT_DESC', + self::LAST_SEEN_DESC => 'LAST_SEEN_DESC', + self::CREATED_DESC => 'CREATED_DESC', + self::AFFECTED_USERS_DESC => 'AFFECTED_USERS_DESC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php new file mode 100644 index 000000000000..5f5856a4f6d7 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php @@ -0,0 +1,66 @@ +_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup', + $argument, + ['\Google\Cloud\ErrorReporting\V1beta1\ErrorGroup', 'decode'], + $metadata, $options); + } + + /** + * Replace the data for the specified group. + * Fails if the group does not exist. + * @param \Google\Cloud\ErrorReporting\V1beta1\UpdateGroupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateGroup(\Google\Cloud\ErrorReporting\V1beta1\UpdateGroupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/UpdateGroup', + $argument, + ['\Google\Cloud\ErrorReporting\V1beta1\ErrorGroup', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php new file mode 100644 index 000000000000..d76b7b2712ee --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php @@ -0,0 +1,488 @@ +google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats + */ +class ErrorGroupStats extends \Google\Protobuf\Internal\Message +{ + /** + * Group data that is independent of the filter criteria. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; + */ + protected $group = null; + /** + * Approximate total number of events in the given group that match + * the filter criteria. + * + * Generated from protobuf field int64 count = 2; + */ + protected $count = 0; + /** + * Approximate number of affected users in the given group that + * match the filter criteria. + * Users are distinguished by data in the `ErrorContext` of the + * individual error events, such as their login name or their remote + * IP address in case of HTTP requests. + * The number of affected users can be zero even if the number of + * errors is non-zero if no data was provided from which the + * affected user could be deduced. + * Users are counted based on data in the request + * context that was provided in the error report. If more users are + * implicitly affected, such as due to a crash of the whole service, + * this is not reflected here. + * + * Generated from protobuf field int64 affected_users_count = 3; + */ + protected $affected_users_count = 0; + /** + * Approximate number of occurrences over time. + * Timed counts returned by ListGroups are guaranteed to be: + * - Inside the requested time interval + * - Non-overlapping, and + * - Ordered by ascending time. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; + */ + private $timed_counts; + /** + * Approximate first occurrence that was ever seen for this group + * and which matches the given filter criteria, ignoring the + * time_range that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; + */ + protected $first_seen_time = null; + /** + * Approximate last occurrence that was ever seen for this group and + * which matches the given filter criteria, ignoring the time_range + * that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; + */ + protected $last_seen_time = null; + /** + * Service contexts with a non-zero error count for the given filter + * criteria. This list can be truncated if multiple services are affected. + * Refer to `num_affected_services` for the total count. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; + */ + private $affected_services; + /** + * The total number of services with a non-zero error count for the given + * filter criteria. + * + * Generated from protobuf field int32 num_affected_services = 8; + */ + protected $num_affected_services = 0; + /** + * An arbitrary event that is chosen as representative for the whole group. + * The representative event is intended to be used as a quick preview for + * the whole group. Events in the group are usually sufficiently similar + * to each other such that showing an arbitrary representative provides + * insight into the characteristics of the group as a whole. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; + */ + protected $representative = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group + * Group data that is independent of the filter criteria. + * @type int|string $count + * Approximate total number of events in the given group that match + * the filter criteria. + * @type int|string $affected_users_count + * Approximate number of affected users in the given group that + * match the filter criteria. + * Users are distinguished by data in the `ErrorContext` of the + * individual error events, such as their login name or their remote + * IP address in case of HTTP requests. + * The number of affected users can be zero even if the number of + * errors is non-zero if no data was provided from which the + * affected user could be deduced. + * Users are counted based on data in the request + * context that was provided in the error report. If more users are + * implicitly affected, such as due to a crash of the whole service, + * this is not reflected here. + * @type array<\Google\Cloud\ErrorReporting\V1beta1\TimedCount>|\Google\Protobuf\Internal\RepeatedField $timed_counts + * Approximate number of occurrences over time. + * Timed counts returned by ListGroups are guaranteed to be: + * - Inside the requested time interval + * - Non-overlapping, and + * - Ordered by ascending time. + * @type \Google\Protobuf\Timestamp $first_seen_time + * Approximate first occurrence that was ever seen for this group + * and which matches the given filter criteria, ignoring the + * time_range that was specified in the request. + * @type \Google\Protobuf\Timestamp $last_seen_time + * Approximate last occurrence that was ever seen for this group and + * which matches the given filter criteria, ignoring the time_range + * that was specified in the request. + * @type array<\Google\Cloud\ErrorReporting\V1beta1\ServiceContext>|\Google\Protobuf\Internal\RepeatedField $affected_services + * Service contexts with a non-zero error count for the given filter + * criteria. This list can be truncated if multiple services are affected. + * Refer to `num_affected_services` for the total count. + * @type int $num_affected_services + * The total number of services with a non-zero error count for the given + * filter criteria. + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent $representative + * An arbitrary event that is chosen as representative for the whole group. + * The representative event is intended to be used as a quick preview for + * the whole group. Events in the group are usually sufficiently similar + * to each other such that showing an arbitrary representative provides + * insight into the characteristics of the group as a whole. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Group data that is independent of the filter criteria. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup|null + */ + public function getGroup() + { + return $this->group; + } + + public function hasGroup() + { + return isset($this->group); + } + + public function clearGroup() + { + unset($this->group); + } + + /** + * Group data that is independent of the filter criteria. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup::class); + $this->group = $var; + + return $this; + } + + /** + * Approximate total number of events in the given group that match + * the filter criteria. + * + * Generated from protobuf field int64 count = 2; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Approximate total number of events in the given group that match + * the filter criteria. + * + * Generated from protobuf field int64 count = 2; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + + /** + * Approximate number of affected users in the given group that + * match the filter criteria. + * Users are distinguished by data in the `ErrorContext` of the + * individual error events, such as their login name or their remote + * IP address in case of HTTP requests. + * The number of affected users can be zero even if the number of + * errors is non-zero if no data was provided from which the + * affected user could be deduced. + * Users are counted based on data in the request + * context that was provided in the error report. If more users are + * implicitly affected, such as due to a crash of the whole service, + * this is not reflected here. + * + * Generated from protobuf field int64 affected_users_count = 3; + * @return int|string + */ + public function getAffectedUsersCount() + { + return $this->affected_users_count; + } + + /** + * Approximate number of affected users in the given group that + * match the filter criteria. + * Users are distinguished by data in the `ErrorContext` of the + * individual error events, such as their login name or their remote + * IP address in case of HTTP requests. + * The number of affected users can be zero even if the number of + * errors is non-zero if no data was provided from which the + * affected user could be deduced. + * Users are counted based on data in the request + * context that was provided in the error report. If more users are + * implicitly affected, such as due to a crash of the whole service, + * this is not reflected here. + * + * Generated from protobuf field int64 affected_users_count = 3; + * @param int|string $var + * @return $this + */ + public function setAffectedUsersCount($var) + { + GPBUtil::checkInt64($var); + $this->affected_users_count = $var; + + return $this; + } + + /** + * Approximate number of occurrences over time. + * Timed counts returned by ListGroups are guaranteed to be: + * - Inside the requested time interval + * - Non-overlapping, and + * - Ordered by ascending time. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTimedCounts() + { + return $this->timed_counts; + } + + /** + * Approximate number of occurrences over time. + * Timed counts returned by ListGroups are guaranteed to be: + * - Inside the requested time interval + * - Non-overlapping, and + * - Ordered by ascending time. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; + * @param array<\Google\Cloud\ErrorReporting\V1beta1\TimedCount>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTimedCounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\TimedCount::class); + $this->timed_counts = $arr; + + return $this; + } + + /** + * Approximate first occurrence that was ever seen for this group + * and which matches the given filter criteria, ignoring the + * time_range that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFirstSeenTime() + { + return $this->first_seen_time; + } + + public function hasFirstSeenTime() + { + return isset($this->first_seen_time); + } + + public function clearFirstSeenTime() + { + unset($this->first_seen_time); + } + + /** + * Approximate first occurrence that was ever seen for this group + * and which matches the given filter criteria, ignoring the + * time_range that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFirstSeenTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->first_seen_time = $var; + + return $this; + } + + /** + * Approximate last occurrence that was ever seen for this group and + * which matches the given filter criteria, ignoring the time_range + * that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastSeenTime() + { + return $this->last_seen_time; + } + + public function hasLastSeenTime() + { + return isset($this->last_seen_time); + } + + public function clearLastSeenTime() + { + unset($this->last_seen_time); + } + + /** + * Approximate last occurrence that was ever seen for this group and + * which matches the given filter criteria, ignoring the time_range + * that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastSeenTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_seen_time = $var; + + return $this; + } + + /** + * Service contexts with a non-zero error count for the given filter + * criteria. This list can be truncated if multiple services are affected. + * Refer to `num_affected_services` for the total count. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAffectedServices() + { + return $this->affected_services; + } + + /** + * Service contexts with a non-zero error count for the given filter + * criteria. This list can be truncated if multiple services are affected. + * Refer to `num_affected_services` for the total count. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; + * @param array<\Google\Cloud\ErrorReporting\V1beta1\ServiceContext>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAffectedServices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); + $this->affected_services = $arr; + + return $this; + } + + /** + * The total number of services with a non-zero error count for the given + * filter criteria. + * + * Generated from protobuf field int32 num_affected_services = 8; + * @return int + */ + public function getNumAffectedServices() + { + return $this->num_affected_services; + } + + /** + * The total number of services with a non-zero error count for the given + * filter criteria. + * + * Generated from protobuf field int32 num_affected_services = 8; + * @param int $var + * @return $this + */ + public function setNumAffectedServices($var) + { + GPBUtil::checkInt32($var); + $this->num_affected_services = $var; + + return $this; + } + + /** + * An arbitrary event that is chosen as representative for the whole group. + * The representative event is intended to be used as a quick preview for + * the whole group. Events in the group are usually sufficiently similar + * to each other such that showing an arbitrary representative provides + * insight into the characteristics of the group as a whole. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent|null + */ + public function getRepresentative() + { + return $this->representative; + } + + public function hasRepresentative() + { + return isset($this->representative); + } + + public function clearRepresentative() + { + unset($this->representative); + } + + /** + * An arbitrary event that is chosen as representative for the whole group. + * The representative event is intended to be used as a quick preview for + * the whole group. Events in the group are usually sufficiently similar + * to each other such that showing an arbitrary representative provides + * insight into the characteristics of the group as a whole. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent $var + * @return $this + */ + public function setRepresentative($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent::class); + $this->representative = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php new file mode 100644 index 000000000000..2a17f17379b1 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php @@ -0,0 +1,81 @@ +_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListGroupStats', + $argument, + ['\Google\Cloud\ErrorReporting\V1beta1\ListGroupStatsResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists the specified events. + * @param \Google\Cloud\ErrorReporting\V1beta1\ListEventsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListEvents(\Google\Cloud\ErrorReporting\V1beta1\ListEventsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListEvents', + $argument, + ['\Google\Cloud\ErrorReporting\V1beta1\ListEventsResponse', 'decode'], + $metadata, $options); + } + + /** + * Deletes all error events of a given project. + * @param \Google\Cloud\ErrorReporting\V1beta1\DeleteEventsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteEvents(\Google\Cloud\ErrorReporting\V1beta1\DeleteEventsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents', + $argument, + ['\Google\Cloud\ErrorReporting\V1beta1\DeleteEventsResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php new file mode 100644 index 000000000000..b08f87708c7a --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php @@ -0,0 +1,83 @@ +google.devtools.clouderrorreporting.v1beta1.GetGroupRequest + */ +class GetGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The group resource name. Written as + * `projects/{projectID}/groups/{group_name}`. Call + * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) + * to return a list of groups belonging to this project. + * Example: `projects/my-project-123/groups/my-group` + * + * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $group_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group_name + * Required. The group resource name. Written as + * `projects/{projectID}/groups/{group_name}`. Call + * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) + * to return a list of groups belonging to this project. + * Example: `projects/my-project-123/groups/my-group` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The group resource name. Written as + * `projects/{projectID}/groups/{group_name}`. Call + * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) + * to return a list of groups belonging to this project. + * Example: `projects/my-project-123/groups/my-group` + * + * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getGroupName() + { + return $this->group_name; + } + + /** + * Required. The group resource name. Written as + * `projects/{projectID}/groups/{group_name}`. Call + * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) + * to return a list of groups belonging to this project. + * Example: `projects/my-project-123/groups/my-group` + * + * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGroupName($var) + { + GPBUtil::checkString($var, True); + $this->group_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php new file mode 100644 index 000000000000..95c45a2ac88f --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php @@ -0,0 +1,252 @@ +google.devtools.clouderrorreporting.v1beta1.HttpRequestContext + */ +class HttpRequestContext extends \Google\Protobuf\Internal\Message +{ + /** + * The type of HTTP request, such as `GET`, `POST`, etc. + * + * Generated from protobuf field string method = 1; + */ + protected $method = ''; + /** + * The URL of the request. + * + * Generated from protobuf field string url = 2; + */ + protected $url = ''; + /** + * The user agent information that is provided with the request. + * + * Generated from protobuf field string user_agent = 3; + */ + protected $user_agent = ''; + /** + * The referrer information that is provided with the request. + * + * Generated from protobuf field string referrer = 4; + */ + protected $referrer = ''; + /** + * The HTTP response status code for the request. + * + * Generated from protobuf field int32 response_status_code = 5; + */ + protected $response_status_code = 0; + /** + * The IP address from which the request originated. + * This can be IPv4, IPv6, or a token which is derived from the + * IP address, depending on the data that has been provided + * in the error report. + * + * Generated from protobuf field string remote_ip = 6; + */ + protected $remote_ip = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $method + * The type of HTTP request, such as `GET`, `POST`, etc. + * @type string $url + * The URL of the request. + * @type string $user_agent + * The user agent information that is provided with the request. + * @type string $referrer + * The referrer information that is provided with the request. + * @type int $response_status_code + * The HTTP response status code for the request. + * @type string $remote_ip + * The IP address from which the request originated. + * This can be IPv4, IPv6, or a token which is derived from the + * IP address, depending on the data that has been provided + * in the error report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The type of HTTP request, such as `GET`, `POST`, etc. + * + * Generated from protobuf field string method = 1; + * @return string + */ + public function getMethod() + { + return $this->method; + } + + /** + * The type of HTTP request, such as `GET`, `POST`, etc. + * + * Generated from protobuf field string method = 1; + * @param string $var + * @return $this + */ + public function setMethod($var) + { + GPBUtil::checkString($var, True); + $this->method = $var; + + return $this; + } + + /** + * The URL of the request. + * + * Generated from protobuf field string url = 2; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The URL of the request. + * + * 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; + } + + /** + * The user agent information that is provided with the request. + * + * Generated from protobuf field string user_agent = 3; + * @return string + */ + public function getUserAgent() + { + return $this->user_agent; + } + + /** + * The user agent information that is provided with the request. + * + * Generated from protobuf field string user_agent = 3; + * @param string $var + * @return $this + */ + public function setUserAgent($var) + { + GPBUtil::checkString($var, True); + $this->user_agent = $var; + + return $this; + } + + /** + * The referrer information that is provided with the request. + * + * Generated from protobuf field string referrer = 4; + * @return string + */ + public function getReferrer() + { + return $this->referrer; + } + + /** + * The referrer information that is provided with the request. + * + * Generated from protobuf field string referrer = 4; + * @param string $var + * @return $this + */ + public function setReferrer($var) + { + GPBUtil::checkString($var, True); + $this->referrer = $var; + + return $this; + } + + /** + * The HTTP response status code for the request. + * + * Generated from protobuf field int32 response_status_code = 5; + * @return int + */ + public function getResponseStatusCode() + { + return $this->response_status_code; + } + + /** + * The HTTP response status code for the request. + * + * Generated from protobuf field int32 response_status_code = 5; + * @param int $var + * @return $this + */ + public function setResponseStatusCode($var) + { + GPBUtil::checkInt32($var); + $this->response_status_code = $var; + + return $this; + } + + /** + * The IP address from which the request originated. + * This can be IPv4, IPv6, or a token which is derived from the + * IP address, depending on the data that has been provided + * in the error report. + * + * Generated from protobuf field string remote_ip = 6; + * @return string + */ + public function getRemoteIp() + { + return $this->remote_ip; + } + + /** + * The IP address from which the request originated. + * This can be IPv4, IPv6, or a token which is derived from the + * IP address, depending on the data that has been provided + * in the error report. + * + * Generated from protobuf field string remote_ip = 6; + * @param string $var + * @return $this + */ + public function setRemoteIp($var) + { + GPBUtil::checkString($var, True); + $this->remote_ip = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php new file mode 100644 index 000000000000..db3b0b9de9b6 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php @@ -0,0 +1,289 @@ +google.devtools.clouderrorreporting.v1beta1.ListEventsRequest + */ +class ListEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $project_name = ''; + /** + * Required. The group for which events shall be returned. + * + * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group_id = ''; + /** + * Optional. List only ErrorGroups which belong to a service context that + * matches the filter. + * Data for all service contexts is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_filter = null; + /** + * Optional. List only data for the given time range. + * If not set a default time range is used. The field time_range_begin + * in the response will specify the beginning of this time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $time_range = null; + /** + * Optional. The maximum number of results to return per response. + * + * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A `next_page_token` provided by a previous response. + * + * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_name + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * @type string $group_id + * Required. The group for which events shall be returned. + * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $service_filter + * Optional. List only ErrorGroups which belong to a service context that + * matches the filter. + * Data for all service contexts is returned if this field is not specified. + * @type \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $time_range + * Optional. List only data for the given time range. + * If not set a default time range is used. The field time_range_begin + * in the response will specify the beginning of this time range. + * @type int $page_size + * Optional. The maximum number of results to return per response. + * @type string $page_token + * Optional. A `next_page_token` provided by a previous response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProjectName() + { + return $this->project_name; + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProjectName($var) + { + GPBUtil::checkString($var, True); + $this->project_name = $var; + + return $this; + } + + /** + * Required. The group for which events shall be returned. + * + * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGroupId() + { + return $this->group_id; + } + + /** + * Required. The group for which events shall be returned. + * + * 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; + } + + /** + * Optional. List only ErrorGroups which belong to a service context that + * matches the filter. + * Data for all service contexts is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter|null + */ + public function getServiceFilter() + { + return $this->service_filter; + } + + public function hasServiceFilter() + { + return isset($this->service_filter); + } + + public function clearServiceFilter() + { + unset($this->service_filter); + } + + /** + * Optional. List only ErrorGroups which belong to a service context that + * matches the filter. + * Data for all service contexts is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $var + * @return $this + */ + public function setServiceFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter::class); + $this->service_filter = $var; + + return $this; + } + + /** + * Optional. List only data for the given time range. + * If not set a default time range is used. The field time_range_begin + * in the response will specify the beginning of this time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange|null + */ + public function getTimeRange() + { + return $this->time_range; + } + + public function hasTimeRange() + { + return isset($this->time_range); + } + + public function clearTimeRange() + { + unset($this->time_range); + } + + /** + * Optional. List only data for the given time range. + * If not set a default time range is used. The field time_range_begin + * in the response will specify the beginning of this time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $var + * @return $this + */ + public function setTimeRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange::class); + $this->time_range = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return per response. + * + * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return per response. + * + * Generated from protobuf field int32 page_size = 6 [(.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 `next_page_token` provided by a previous response. + * + * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A `next_page_token` provided by a previous response. + * + * Generated from protobuf field string page_token = 7 [(.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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php new file mode 100644 index 000000000000..55faa7e5a56a --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php @@ -0,0 +1,153 @@ +google.devtools.clouderrorreporting.v1beta1.ListEventsResponse + */ +class ListEventsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The error events which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; + */ + private $error_events; + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The timestamp specifies the start time to which the request was restricted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + */ + protected $time_range_begin = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ErrorReporting\V1beta1\ErrorEvent>|\Google\Protobuf\Internal\RepeatedField $error_events + * The error events which match the given request. + * @type string $next_page_token + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * @type \Google\Protobuf\Timestamp $time_range_begin + * The timestamp specifies the start time to which the request was restricted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * The error events which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorEvents() + { + return $this->error_events; + } + + /** + * The error events which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; + * @param array<\Google\Cloud\ErrorReporting\V1beta1\ErrorEvent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent::class); + $this->error_events = $arr; + + return $this; + } + + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view 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; + } + + /** + * The timestamp specifies the start time to which the request was restricted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimeRangeBegin() + { + return $this->time_range_begin; + } + + public function hasTimeRangeBegin() + { + return isset($this->time_range_begin); + } + + public function clearTimeRangeBegin() + { + unset($this->time_range_begin); + } + + /** + * The timestamp specifies the start time to which the request was restricted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimeRangeBegin($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->time_range_begin = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php new file mode 100644 index 000000000000..43a433e3045f --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php @@ -0,0 +1,493 @@ +google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest + */ +class ListGroupStatsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` + * and `{projectNumber}` can be found in the + * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). + * Examples: `projects/my-project-123`, `projects/5551234`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $project_name = ''; + /** + * Optional. List all ErrorGroupStats with these IDs. + * + * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $group_id; + /** + * Optional. List only ErrorGroupStats which belong to a service + * context that matches the filter. + * Data for all service contexts is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_filter = null; + /** + * Optional. List data for the given time range. + * If not set, a default time range is used. The field + * time_range_begin in the response will specify the beginning + * of this time range. + * Only ErrorGroupStats with a non-zero count in the given time + * range are returned, unless the request contains an explicit + * group_id list. If a group_id list is given, also + * ErrorGroupStats with zero occurrences are returned. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $time_range = null; + /** + * Optional. The preferred duration for a single returned `TimedCount`. + * If not set, no timed counts are returned. + * + * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $timed_count_duration = null; + /** + * Optional. The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $alignment = 0; + /** + * Optional. Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + * + * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $alignment_time = null; + /** + * Optional. The sort order in which the results are returned. + * Default is `COUNT_DESC`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order = 0; + /** + * Optional. The maximum number of results to return per response. + * Default is 20. + * + * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A `next_page_token` provided by a previous response. To view + * additional results, pass this token along with the identical query + * parameters as the first request. + * + * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_name + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` + * and `{projectNumber}` can be found in the + * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). + * Examples: `projects/my-project-123`, `projects/5551234`. + * @type array|\Google\Protobuf\Internal\RepeatedField $group_id + * Optional. List all ErrorGroupStats with these IDs. + * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $service_filter + * Optional. List only ErrorGroupStats which belong to a service + * context that matches the filter. + * Data for all service contexts is returned if this field is not specified. + * @type \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $time_range + * Optional. List data for the given time range. + * If not set, a default time range is used. The field + * time_range_begin in the response will specify the beginning + * of this time range. + * Only ErrorGroupStats with a non-zero count in the given time + * range are returned, unless the request contains an explicit + * group_id list. If a group_id list is given, also + * ErrorGroupStats with zero occurrences are returned. + * @type \Google\Protobuf\Duration $timed_count_duration + * Optional. The preferred duration for a single returned `TimedCount`. + * If not set, no timed counts are returned. + * @type int $alignment + * Optional. The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + * @type \Google\Protobuf\Timestamp $alignment_time + * Optional. Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + * @type int $order + * Optional. The sort order in which the results are returned. + * Default is `COUNT_DESC`. + * @type int $page_size + * Optional. The maximum number of results to return per response. + * Default is 20. + * @type string $page_token + * Optional. A `next_page_token` provided by a previous response. To view + * additional results, pass this token along with the identical query + * parameters as the first request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` + * and `{projectNumber}` can be found in the + * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). + * Examples: `projects/my-project-123`, `projects/5551234`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProjectName() + { + return $this->project_name; + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` + * and `{projectNumber}` can be found in the + * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). + * Examples: `projects/my-project-123`, `projects/5551234`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProjectName($var) + { + GPBUtil::checkString($var, True); + $this->project_name = $var; + + return $this; + } + + /** + * Optional. List all ErrorGroupStats with these IDs. + * + * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroupId() + { + return $this->group_id; + } + + /** + * Optional. List all ErrorGroupStats with these IDs. + * + * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroupId($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->group_id = $arr; + + return $this; + } + + /** + * Optional. List only ErrorGroupStats which belong to a service + * context that matches the filter. + * Data for all service contexts is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter|null + */ + public function getServiceFilter() + { + return $this->service_filter; + } + + public function hasServiceFilter() + { + return isset($this->service_filter); + } + + public function clearServiceFilter() + { + unset($this->service_filter); + } + + /** + * Optional. List only ErrorGroupStats which belong to a service + * context that matches the filter. + * Data for all service contexts is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $var + * @return $this + */ + public function setServiceFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter::class); + $this->service_filter = $var; + + return $this; + } + + /** + * Optional. List data for the given time range. + * If not set, a default time range is used. The field + * time_range_begin in the response will specify the beginning + * of this time range. + * Only ErrorGroupStats with a non-zero count in the given time + * range are returned, unless the request contains an explicit + * group_id list. If a group_id list is given, also + * ErrorGroupStats with zero occurrences are returned. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange|null + */ + public function getTimeRange() + { + return $this->time_range; + } + + public function hasTimeRange() + { + return isset($this->time_range); + } + + public function clearTimeRange() + { + unset($this->time_range); + } + + /** + * Optional. List data for the given time range. + * If not set, a default time range is used. The field + * time_range_begin in the response will specify the beginning + * of this time range. + * Only ErrorGroupStats with a non-zero count in the given time + * range are returned, unless the request contains an explicit + * group_id list. If a group_id list is given, also + * ErrorGroupStats with zero occurrences are returned. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $var + * @return $this + */ + public function setTimeRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange::class); + $this->time_range = $var; + + return $this; + } + + /** + * Optional. The preferred duration for a single returned `TimedCount`. + * If not set, no timed counts are returned. + * + * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getTimedCountDuration() + { + return $this->timed_count_duration; + } + + public function hasTimedCountDuration() + { + return isset($this->timed_count_duration); + } + + public function clearTimedCountDuration() + { + unset($this->timed_count_duration); + } + + /** + * Optional. The preferred duration for a single returned `TimedCount`. + * If not set, no timed counts are returned. + * + * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimedCountDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timed_count_duration = $var; + + return $this; + } + + /** + * Optional. The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAlignment() + { + return $this->alignment; + } + + /** + * Optional. The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAlignment($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\TimedCountAlignment::class); + $this->alignment = $var; + + return $this; + } + + /** + * Optional. Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + * + * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getAlignmentTime() + { + return $this->alignment_time; + } + + public function hasAlignmentTime() + { + return isset($this->alignment_time); + } + + public function clearAlignmentTime() + { + unset($this->alignment_time); + } + + /** + * Optional. Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + * + * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setAlignmentTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->alignment_time = $var; + + return $this; + } + + /** + * Optional. The sort order in which the results are returned. + * Default is `COUNT_DESC`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getOrder() + { + return $this->order; + } + + /** + * Optional. The sort order in which the results are returned. + * Default is `COUNT_DESC`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setOrder($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupOrder::class); + $this->order = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return per response. + * Default is 20. + * + * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return per response. + * Default is 20. + * + * Generated from protobuf field int32 page_size = 11 [(.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 `next_page_token` provided by a previous response. To view + * additional results, pass this token along with the identical query + * parameters as the first request. + * + * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A `next_page_token` provided by a previous response. To view + * additional results, pass this token along with the identical query + * parameters as the first request. + * + * Generated from protobuf field string page_token = 12 [(.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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php new file mode 100644 index 000000000000..56bfa9df4b28 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php @@ -0,0 +1,165 @@ +google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse + */ +class ListGroupStatsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The error group stats which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; + */ + private $error_group_stats; + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The timestamp specifies the start time to which the request was restricted. + * The start time is set based on the requested time range. It may be adjusted + * to a later time if a project has exceeded the storage quota and older data + * has been deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + */ + protected $time_range_begin = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats>|\Google\Protobuf\Internal\RepeatedField $error_group_stats + * The error group stats which match the given request. + * @type string $next_page_token + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * @type \Google\Protobuf\Timestamp $time_range_begin + * The timestamp specifies the start time to which the request was restricted. + * The start time is set based on the requested time range. It may be adjusted + * to a later time if a project has exceeded the storage quota and older data + * has been deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * The error group stats which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorGroupStats() + { + return $this->error_group_stats; + } + + /** + * The error group stats which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; + * @param array<\Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorGroupStats($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats::class); + $this->error_group_stats = $arr; + + return $this; + } + + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view 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; + } + + /** + * The timestamp specifies the start time to which the request was restricted. + * The start time is set based on the requested time range. It may be adjusted + * to a later time if a project has exceeded the storage quota and older data + * has been deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimeRangeBegin() + { + return $this->time_range_begin; + } + + public function hasTimeRangeBegin() + { + return isset($this->time_range_begin); + } + + public function clearTimeRangeBegin() + { + unset($this->time_range_begin); + } + + /** + * The timestamp specifies the start time to which the request was restricted. + * The start time is set based on the requested time range. It may be adjusted + * to a later time if a project has exceeded the storage quota and older data + * has been deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimeRangeBegin($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->time_range_begin = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php new file mode 100644 index 000000000000..e095a9c2c996 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php @@ -0,0 +1,68 @@ +google.devtools.clouderrorreporting.v1beta1.QueryTimeRange + */ +class QueryTimeRange extends \Google\Protobuf\Internal\Message +{ + /** + * Restricts the query to the specified time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; + */ + protected $period = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $period + * Restricts the query to the specified time range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Restricts the query to the specified time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; + * @return int + */ + public function getPeriod() + { + return $this->period; + } + + /** + * Restricts the query to the specified time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; + * @param int $var + * @return $this + */ + public function setPeriod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange\Period::class); + $this->period = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php new file mode 100644 index 000000000000..9aa826cf2d57 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php @@ -0,0 +1,90 @@ +google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period + */ +class Period +{ + /** + * Do not use. + * + * Generated from protobuf enum PERIOD_UNSPECIFIED = 0; + */ + const PERIOD_UNSPECIFIED = 0; + /** + * Retrieve data for the last hour. + * Recommended minimum timed count duration: 1 min. + * + * Generated from protobuf enum PERIOD_1_HOUR = 1; + */ + const PERIOD_1_HOUR = 1; + /** + * Retrieve data for the last 6 hours. + * Recommended minimum timed count duration: 10 min. + * + * Generated from protobuf enum PERIOD_6_HOURS = 2; + */ + const PERIOD_6_HOURS = 2; + /** + * Retrieve data for the last day. + * Recommended minimum timed count duration: 1 hour. + * + * Generated from protobuf enum PERIOD_1_DAY = 3; + */ + const PERIOD_1_DAY = 3; + /** + * Retrieve data for the last week. + * Recommended minimum timed count duration: 6 hours. + * + * Generated from protobuf enum PERIOD_1_WEEK = 4; + */ + const PERIOD_1_WEEK = 4; + /** + * Retrieve data for the last 30 days. + * Recommended minimum timed count duration: 1 day. + * + * Generated from protobuf enum PERIOD_30_DAYS = 5; + */ + const PERIOD_30_DAYS = 5; + + private static $valueToName = [ + self::PERIOD_UNSPECIFIED => 'PERIOD_UNSPECIFIED', + self::PERIOD_1_HOUR => 'PERIOD_1_HOUR', + self::PERIOD_6_HOURS => 'PERIOD_6_HOURS', + self::PERIOD_1_DAY => 'PERIOD_1_DAY', + self::PERIOD_1_WEEK => 'PERIOD_1_WEEK', + self::PERIOD_30_DAYS => 'PERIOD_30_DAYS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Period::class, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange_Period::class); + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php new file mode 100644 index 000000000000..1ab3a0a72ac0 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php @@ -0,0 +1,16 @@ +google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequest + */ +class ReportErrorEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectId}`, where `{projectId}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $project_name = ''; + /** + * Required. The error event to be reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_name + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectId}`, where `{projectId}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. + * @type \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $event + * Required. The error event to be reported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectId}`, where `{projectId}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProjectName() + { + return $this->project_name; + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectId}`, where `{projectId}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProjectName($var) + { + GPBUtil::checkString($var, True); + $this->project_name = $var; + + return $this; + } + + /** + * Required. The error event to be reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent|null + */ + public function getEvent() + { + return $this->event; + } + + public function hasEvent() + { + return isset($this->event); + } + + public function clearEvent() + { + unset($this->event); + } + + /** + * Required. The error event to be reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent::class); + $this->event = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php new file mode 100644 index 000000000000..14380862c6a8 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php @@ -0,0 +1,34 @@ +google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse + */ +class ReportErrorEventResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php new file mode 100644 index 000000000000..6586dff9b22f --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php @@ -0,0 +1,66 @@ +_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent', + $argument, + ['\Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php new file mode 100644 index 000000000000..d92ac7651617 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php @@ -0,0 +1,295 @@ +google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent + */ +class ReportedErrorEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Time when the event occurred. + * If not provided, the time when the event was received by the + * Error Reporting system will be used. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $event_time = null; + /** + * Required. The service context in which this error has occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service_context = null; + /** + * Required. The error message. + * If no `context.reportLocation` is provided, the message must contain a + * header (typically consisting of the exception type name and an error + * message) and an exception stack trace in one of the supported programming + * languages and formats. + * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. + * Supported stack trace formats are: + * * **Java**: Must be the return value of + * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). + * * **Python**: Must be the return value of + * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). + * * **JavaScript**: Must be the value of + * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned + * by V8. + * * **Ruby**: Must contain frames returned by + * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). + * * **C#**: Must be the return value of + * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). + * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` + * and contain the result of + * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). + * * **Go**: Must be the return value of + * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). + * + * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $message = ''; + /** + * Optional. A description of the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $event_time + * Optional. Time when the event occurred. + * If not provided, the time when the event was received by the + * Error Reporting system will be used. + * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $service_context + * Required. The service context in which this error has occurred. + * @type string $message + * Required. The error message. + * If no `context.reportLocation` is provided, the message must contain a + * header (typically consisting of the exception type name and an error + * message) and an exception stack trace in one of the supported programming + * languages and formats. + * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. + * Supported stack trace formats are: + * * **Java**: Must be the return value of + * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). + * * **Python**: Must be the return value of + * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). + * * **JavaScript**: Must be the value of + * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned + * by V8. + * * **Ruby**: Must contain frames returned by + * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). + * * **C#**: Must be the return value of + * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). + * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` + * and contain the result of + * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). + * * **Go**: Must be the return value of + * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $context + * Optional. A description of the context in which the error occurred. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Time when the event occurred. + * If not provided, the time when the event was received by the + * Error Reporting system will be used. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * Optional. Time when the event occurred. + * If not provided, the time when the event was received by the + * Error Reporting system will be used. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * Required. The service context in which this error has occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext|null + */ + public function getServiceContext() + { + return $this->service_context; + } + + public function hasServiceContext() + { + return isset($this->service_context); + } + + public function clearServiceContext() + { + unset($this->service_context); + } + + /** + * Required. The service context in which this error has occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $var + * @return $this + */ + public function setServiceContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); + $this->service_context = $var; + + return $this; + } + + /** + * Required. The error message. + * If no `context.reportLocation` is provided, the message must contain a + * header (typically consisting of the exception type name and an error + * message) and an exception stack trace in one of the supported programming + * languages and formats. + * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. + * Supported stack trace formats are: + * * **Java**: Must be the return value of + * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). + * * **Python**: Must be the return value of + * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). + * * **JavaScript**: Must be the value of + * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned + * by V8. + * * **Ruby**: Must contain frames returned by + * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). + * * **C#**: Must be the return value of + * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). + * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` + * and contain the result of + * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). + * * **Go**: Must be the return value of + * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). + * + * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Required. The error message. + * If no `context.reportLocation` is provided, the message must contain a + * header (typically consisting of the exception type name and an error + * message) and an exception stack trace in one of the supported programming + * languages and formats. + * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. + * Supported stack trace formats are: + * * **Java**: Must be the return value of + * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). + * * **Python**: Must be the return value of + * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). + * * **JavaScript**: Must be the value of + * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned + * by V8. + * * **Ruby**: Must contain frames returned by + * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). + * * **C#**: Must be the return value of + * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). + * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` + * and contain the result of + * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). + * * **Go**: Must be the return value of + * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). + * + * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Optional. A description of the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext|null + */ + public function getContext() + { + return $this->context; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Optional. A description of the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorContext::class); + $this->context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php new file mode 100644 index 000000000000..a50feb043ec5 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php @@ -0,0 +1,78 @@ +google.devtools.clouderrorreporting.v1beta1.ResolutionStatus + */ +class ResolutionStatus +{ + /** + * Status is unknown. When left unspecified in requests, it is treated like + * OPEN. + * + * Generated from protobuf enum RESOLUTION_STATUS_UNSPECIFIED = 0; + */ + const RESOLUTION_STATUS_UNSPECIFIED = 0; + /** + * The error group is not being addressed. This is the default for + * new groups. It is also used for errors re-occurring after marked RESOLVED. + * + * Generated from protobuf enum OPEN = 1; + */ + const OPEN = 1; + /** + * Error Group manually acknowledged, it can have an issue link attached. + * + * Generated from protobuf enum ACKNOWLEDGED = 2; + */ + const ACKNOWLEDGED = 2; + /** + * Error Group manually resolved, more events for this group are not expected + * to occur. + * + * Generated from protobuf enum RESOLVED = 3; + */ + const RESOLVED = 3; + /** + * The error group is muted and excluded by default on group stats requests. + * + * Generated from protobuf enum MUTED = 4; + */ + const MUTED = 4; + + private static $valueToName = [ + self::RESOLUTION_STATUS_UNSPECIFIED => 'RESOLUTION_STATUS_UNSPECIFIED', + self::OPEN => 'OPEN', + self::ACKNOWLEDGED => 'ACKNOWLEDGED', + self::RESOLVED => 'RESOLVED', + self::MUTED => 'MUTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php new file mode 100644 index 000000000000..df54f8cfb839 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php @@ -0,0 +1,180 @@ +google.devtools.clouderrorreporting.v1beta1.ServiceContext + */ +class ServiceContext extends \Google\Protobuf\Internal\Message +{ + /** + * An identifier of the service, such as the name of the + * executable, job, or Google App Engine service name. This field is expected + * to have a low number of values that are relatively stable over time, as + * opposed to `version`, which can be changed whenever new code is deployed. + * Contains the service name for error reports extracted from Google + * App Engine logs or `default` if the App Engine default service is used. + * + * Generated from protobuf field string service = 2; + */ + protected $service = ''; + /** + * Represents the source code version that the developer provided, + * which could represent a version label or a Git SHA-1 hash, for example. + * For App Engine standard environment, the version is set to the version of + * the app. + * + * Generated from protobuf field string version = 3; + */ + protected $version = ''; + /** + * Type of the MonitoredResource. List of possible values: + * https://cloud.google.com/monitoring/api/resources + * Value is set automatically for incoming errors and must not be set when + * reporting errors. + * + * Generated from protobuf field string resource_type = 4; + */ + protected $resource_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * An identifier of the service, such as the name of the + * executable, job, or Google App Engine service name. This field is expected + * to have a low number of values that are relatively stable over time, as + * opposed to `version`, which can be changed whenever new code is deployed. + * Contains the service name for error reports extracted from Google + * App Engine logs or `default` if the App Engine default service is used. + * @type string $version + * Represents the source code version that the developer provided, + * which could represent a version label or a Git SHA-1 hash, for example. + * For App Engine standard environment, the version is set to the version of + * the app. + * @type string $resource_type + * Type of the MonitoredResource. List of possible values: + * https://cloud.google.com/monitoring/api/resources + * Value is set automatically for incoming errors and must not be set when + * reporting errors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * An identifier of the service, such as the name of the + * executable, job, or Google App Engine service name. This field is expected + * to have a low number of values that are relatively stable over time, as + * opposed to `version`, which can be changed whenever new code is deployed. + * Contains the service name for error reports extracted from Google + * App Engine logs or `default` if the App Engine default service is used. + * + * Generated from protobuf field string service = 2; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * An identifier of the service, such as the name of the + * executable, job, or Google App Engine service name. This field is expected + * to have a low number of values that are relatively stable over time, as + * opposed to `version`, which can be changed whenever new code is deployed. + * Contains the service name for error reports extracted from Google + * App Engine logs or `default` if the App Engine default service is used. + * + * Generated from protobuf field string service = 2; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * Represents the source code version that the developer provided, + * which could represent a version label or a Git SHA-1 hash, for example. + * For App Engine standard environment, the version is set to the version of + * the app. + * + * Generated from protobuf field string version = 3; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Represents the source code version that the developer provided, + * which could represent a version label or a Git SHA-1 hash, for example. + * For App Engine standard environment, the version is set to the version of + * the app. + * + * 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; + } + + /** + * Type of the MonitoredResource. List of possible values: + * https://cloud.google.com/monitoring/api/resources + * Value is set automatically for incoming errors and must not be set when + * reporting errors. + * + * Generated from protobuf field string resource_type = 4; + * @return string + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * Type of the MonitoredResource. List of possible values: + * https://cloud.google.com/monitoring/api/resources + * Value is set automatically for incoming errors and must not be set when + * reporting errors. + * + * Generated from protobuf field string resource_type = 4; + * @param string $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkString($var, True); + $this->resource_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php new file mode 100644 index 000000000000..140d3323103d --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php @@ -0,0 +1,150 @@ +google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter + */ +class ServiceContextFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The exact value to match against + * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). + * + * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service = ''; + /** + * Optional. The exact value to match against + * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = ''; + /** + * Optional. The exact value to match against + * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). + * + * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $resource_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * Optional. The exact value to match against + * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). + * @type string $version + * Optional. The exact value to match against + * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). + * @type string $resource_type + * Optional. The exact value to match against + * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). + * + * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). + * + * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). + * + * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). + * + * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkString($var, True); + $this->resource_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php new file mode 100644 index 000000000000..f85e34012700 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php @@ -0,0 +1,150 @@ +google.devtools.clouderrorreporting.v1beta1.SourceLocation + */ +class SourceLocation extends \Google\Protobuf\Internal\Message +{ + /** + * The source code filename, which can include a truncated relative + * path, or a full path from a production machine. + * + * Generated from protobuf field string file_path = 1; + */ + protected $file_path = ''; + /** + * 1-based. 0 indicates that the line number is unknown. + * + * Generated from protobuf field int32 line_number = 2; + */ + protected $line_number = 0; + /** + * Human-readable name of a function or method. + * The value can include optional context like the class or package name. + * For example, `my.package.MyClass.method` in case of Java. + * + * Generated from protobuf field string function_name = 4; + */ + protected $function_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $file_path + * The source code filename, which can include a truncated relative + * path, or a full path from a production machine. + * @type int $line_number + * 1-based. 0 indicates that the line number is unknown. + * @type string $function_name + * Human-readable name of a function or method. + * The value can include optional context like the class or package name. + * For example, `my.package.MyClass.method` in case of Java. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The source code filename, which can include a truncated relative + * path, or a full path from a production machine. + * + * Generated from protobuf field string file_path = 1; + * @return string + */ + public function getFilePath() + { + return $this->file_path; + } + + /** + * The source code filename, which can include a truncated relative + * path, or a full path from a production machine. + * + * Generated from protobuf field string file_path = 1; + * @param string $var + * @return $this + */ + public function setFilePath($var) + { + GPBUtil::checkString($var, True); + $this->file_path = $var; + + return $this; + } + + /** + * 1-based. 0 indicates that the line number is unknown. + * + * Generated from protobuf field int32 line_number = 2; + * @return int + */ + public function getLineNumber() + { + return $this->line_number; + } + + /** + * 1-based. 0 indicates that the line number is unknown. + * + * Generated from protobuf field int32 line_number = 2; + * @param int $var + * @return $this + */ + public function setLineNumber($var) + { + GPBUtil::checkInt32($var); + $this->line_number = $var; + + return $this; + } + + /** + * Human-readable name of a function or method. + * The value can include optional context like the class or package name. + * For example, `my.package.MyClass.method` in case of Java. + * + * Generated from protobuf field string function_name = 4; + * @return string + */ + public function getFunctionName() + { + return $this->function_name; + } + + /** + * Human-readable name of a function or method. + * The value can include optional context like the class or package name. + * For example, `my.package.MyClass.method` in case of Java. + * + * Generated from protobuf field string function_name = 4; + * @param string $var + * @return $this + */ + public function setFunctionName($var) + { + GPBUtil::checkString($var, True); + $this->function_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php new file mode 100644 index 000000000000..7605fd7676fd --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php @@ -0,0 +1,157 @@ +google.devtools.clouderrorreporting.v1beta1.TimedCount + */ +class TimedCount extends \Google\Protobuf\Internal\Message +{ + /** + * Approximate number of occurrences in the given time period. + * + * Generated from protobuf field int64 count = 1; + */ + protected $count = 0; + /** + * Start of the time period to which `count` refers (included). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + */ + protected $start_time = null; + /** + * End of the time period to which `count` refers (excluded). + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $count + * Approximate number of occurrences in the given time period. + * @type \Google\Protobuf\Timestamp $start_time + * Start of the time period to which `count` refers (included). + * @type \Google\Protobuf\Timestamp $end_time + * End of the time period to which `count` refers (excluded). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Approximate number of occurrences in the given time period. + * + * Generated from protobuf field int64 count = 1; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Approximate number of occurrences in the given time period. + * + * Generated from protobuf field int64 count = 1; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + + /** + * Start of the time period to which `count` refers (included). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @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 time period to which `count` refers (included). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * End of the time period to which `count` refers (excluded). + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @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); + } + + /** + * End of the time period to which `count` refers (excluded). + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php new file mode 100644 index 000000000000..633e74c96e9d --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php @@ -0,0 +1,71 @@ +google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment + */ +class TimedCountAlignment +{ + /** + * No alignment specified. + * + * Generated from protobuf enum ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0; + */ + const ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0; + /** + * The time periods shall be consecutive, have width equal to the + * requested duration, and be aligned at the `alignment_time` provided in + * the request. + * The `alignment_time` does not have to be inside the query period but + * even if it is outside, only time periods are returned which overlap + * with the query period. + * A rounded alignment will typically result in a + * different size of the first or the last time period. + * + * Generated from protobuf enum ALIGNMENT_EQUAL_ROUNDED = 1; + */ + const ALIGNMENT_EQUAL_ROUNDED = 1; + /** + * The time periods shall be consecutive, have width equal to the + * requested duration, and be aligned at the end of the requested time + * period. This can result in a different size of the + * first time period. + * + * Generated from protobuf enum ALIGNMENT_EQUAL_AT_END = 2; + */ + const ALIGNMENT_EQUAL_AT_END = 2; + + private static $valueToName = [ + self::ERROR_COUNT_ALIGNMENT_UNSPECIFIED => 'ERROR_COUNT_ALIGNMENT_UNSPECIFIED', + self::ALIGNMENT_EQUAL_ROUNDED => 'ALIGNMENT_EQUAL_ROUNDED', + self::ALIGNMENT_EQUAL_AT_END => 'ALIGNMENT_EQUAL_AT_END', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php new file mode 100644 index 000000000000..b6a97dcab003 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php @@ -0,0 +1,71 @@ +google.devtools.clouderrorreporting.v1beta1.TrackingIssue + */ +class TrackingIssue extends \Google\Protobuf\Internal\Message +{ + /** + * A URL pointing to a related entry in an issue tracking system. + * Example: `https://github.com/user/project/issues/4` + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * A URL pointing to a related entry in an issue tracking system. + * Example: `https://github.com/user/project/issues/4` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * A URL pointing to a related entry in an issue tracking system. + * Example: `https://github.com/user/project/issues/4` + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * A URL pointing to a related entry in an issue tracking system. + * Example: `https://github.com/user/project/issues/4` + * + * 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; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php new file mode 100644 index 000000000000..2475ee41bdc5 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php @@ -0,0 +1,77 @@ +google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest + */ +class UpdateGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The group which replaces the resource on the server. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group + * Required. The group which replaces the resource on the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The group which replaces the resource on the server. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup|null + */ + public function getGroup() + { + return $this->group; + } + + public function hasGroup() + { + return isset($this->group); + } + + public function clearGroup() + { + unset($this->group); + } + + /** + * Required. The group which replaces the resource on the server. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup::class); + $this->group = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php new file mode 100644 index 000000000000..7ae7842c593a --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php @@ -0,0 +1,71 @@ +getGroup($formattedGroupName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedGroupName = ErrorGroupServiceClient::errorGroupName('[PROJECT]', '[GROUP]'); + + get_group_sample($formattedGroupName); +} +// [END clouderrorreporting_v1beta1_generated_ErrorGroupService_GetGroup_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php new file mode 100644 index 000000000000..c7b5f35a8602 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php @@ -0,0 +1,57 @@ +updateGroup($group); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END clouderrorreporting_v1beta1_generated_ErrorGroupService_UpdateGroup_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php new file mode 100644 index 000000000000..514c4b63af15 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php @@ -0,0 +1,71 @@ +deleteEvents($formattedProjectName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedProjectName = ErrorStatsServiceClient::projectName('[PROJECT]'); + + delete_events_sample($formattedProjectName); +} +// [END clouderrorreporting_v1beta1_generated_ErrorStatsService_DeleteEvents_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php new file mode 100644 index 000000000000..36ee1680820f --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php @@ -0,0 +1,78 @@ +listEvents($formattedProjectName, $groupId); + + /** @var ErrorEvent $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 +{ + $formattedProjectName = ErrorStatsServiceClient::projectName('[PROJECT]'); + $groupId = '[GROUP_ID]'; + + list_events_sample($formattedProjectName, $groupId); +} +// [END clouderrorreporting_v1beta1_generated_ErrorStatsService_ListEvents_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php new file mode 100644 index 000000000000..19915578b034 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php @@ -0,0 +1,76 @@ +listGroupStats($formattedProjectName); + + /** @var ErrorGroupStats $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 +{ + $formattedProjectName = ErrorStatsServiceClient::projectName('[PROJECT]'); + + list_group_stats_sample($formattedProjectName); +} +// [END clouderrorreporting_v1beta1_generated_ErrorStatsService_ListGroupStats_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php new file mode 100644 index 000000000000..d29c431aa38a --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php @@ -0,0 +1,120 @@ +setServiceContext($eventServiceContext) + ->setMessage($eventMessage); + + // Call the API and handle any network failures. + try { + /** @var ReportErrorEventResponse $response */ + $response = $reportErrorsServiceClient->reportErrorEvent($formattedProjectName, $event); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedProjectName = ReportErrorsServiceClient::projectName('[PROJECT]'); + $eventMessage = '[MESSAGE]'; + + report_error_event_sample($formattedProjectName, $eventMessage); +} +// [END clouderrorreporting_v1beta1_generated_ReportErrorsService_ReportErrorEvent_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php new file mode 100644 index 000000000000..2534c4aacd62 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php @@ -0,0 +1,36 @@ +errorGroupName('[PROJECT]', '[GROUP]'); + * $response = $errorGroupServiceClient->getGroup($formattedGroupName); + * } finally { + * $errorGroupServiceClient->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. + * + * @experimental + */ +class ErrorGroupServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; + + /** 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 $errorGroupNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/error_group_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/error_group_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/error_group_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/error_group_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getErrorGroupNameTemplate() + { + if (self::$errorGroupNameTemplate == null) { + self::$errorGroupNameTemplate = new PathTemplate('projects/{project}/groups/{group}'); + } + + return self::$errorGroupNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'errorGroup' => self::getErrorGroupNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a error_group + * resource. + * + * @param string $project + * @param string $group + * + * @return string The formatted error_group resource. + * + * @experimental + */ + public static function errorGroupName($project, $group) + { + return self::getErrorGroupNameTemplate()->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 + * - errorGroup: 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. + * + * @experimental + */ + 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 'clouderrorreporting.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); + } + + /** + * Get the specified group. + * + * Sample code: + * ``` + * $errorGroupServiceClient = new ErrorGroupServiceClient(); + * try { + * $formattedGroupName = $errorGroupServiceClient->errorGroupName('[PROJECT]', '[GROUP]'); + * $response = $errorGroupServiceClient->getGroup($formattedGroupName); + * } finally { + * $errorGroupServiceClient->close(); + * } + * ``` + * + * @param string $groupName Required. The group resource name. Written as + * `projects/{projectID}/groups/{group_name}`. Call + * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) + * to return a list of groups belonging to this project. + * + * Example: `projects/my-project-123/groups/my-group` + * @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\ErrorReporting\V1beta1\ErrorGroup + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getGroup($groupName, array $optionalArgs = []) + { + $request = new GetGroupRequest(); + $requestParamHeaders = []; + $request->setGroupName($groupName); + $requestParamHeaders['group_name'] = $groupName; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetGroup', ErrorGroup::class, $optionalArgs, $request)->wait(); + } + + /** + * Replace the data for the specified group. + * Fails if the group does not exist. + * + * Sample code: + * ``` + * $errorGroupServiceClient = new ErrorGroupServiceClient(); + * try { + * $group = new ErrorGroup(); + * $response = $errorGroupServiceClient->updateGroup($group); + * } finally { + * $errorGroupServiceClient->close(); + * } + * ``` + * + * @param ErrorGroup $group Required. The group which replaces the resource on the server. + * @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\ErrorReporting\V1beta1\ErrorGroup + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateGroup($group, array $optionalArgs = []) + { + $request = new UpdateGroupRequest(); + $requestParamHeaders = []; + $request->setGroup($group); + $requestParamHeaders['group.name'] = $group->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateGroup', ErrorGroup::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php new file mode 100644 index 000000000000..bf09507d96b8 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php @@ -0,0 +1,530 @@ +projectName('[PROJECT]'); + * $response = $errorStatsServiceClient->deleteEvents($formattedProjectName); + * } finally { + * $errorStatsServiceClient->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. + * + * @experimental + */ +class ErrorStatsServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; + + /** 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 $projectNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/error_stats_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/error_stats_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/error_stats_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/error_stats_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'project' => self::getProjectNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + * + * @experimental + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->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 + * - 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. + * + * @experimental + */ + 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 'clouderrorreporting.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); + } + + /** + * Deletes all error events of a given project. + * + * Sample code: + * ``` + * $errorStatsServiceClient = new ErrorStatsServiceClient(); + * try { + * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]'); + * $response = $errorStatsServiceClient->deleteEvents($formattedProjectName); + * } finally { + * $errorStatsServiceClient->close(); + * } + * ``` + * + * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * + * Example: `projects/my-project-123`. + * @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\ErrorReporting\V1beta1\DeleteEventsResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function deleteEvents($projectName, array $optionalArgs = []) + { + $request = new DeleteEventsRequest(); + $requestParamHeaders = []; + $request->setProjectName($projectName); + $requestParamHeaders['project_name'] = $projectName; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteEvents', DeleteEventsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the specified events. + * + * Sample code: + * ``` + * $errorStatsServiceClient = new ErrorStatsServiceClient(); + * try { + * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]'); + * $groupId = 'group_id'; + * // Iterate over pages of elements + * $pagedResponse = $errorStatsServiceClient->listEvents($formattedProjectName, $groupId); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $errorStatsServiceClient->listEvents($formattedProjectName, $groupId); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $errorStatsServiceClient->close(); + * } + * ``` + * + * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}`, where `{projectID}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * + * Example: `projects/my-project-123`. + * @param string $groupId Required. The group for which events shall be returned. + * @param array $optionalArgs { + * Optional. + * + * @type ServiceContextFilter $serviceFilter + * Optional. List only ErrorGroups which belong to a service context that + * matches the filter. + * Data for all service contexts is returned if this field is not specified. + * @type QueryTimeRange $timeRange + * Optional. List only data for the given time range. + * If not set a default time range is used. The field time_range_begin + * in the response will specify the beginning of this time range. + * @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 + * + * @experimental + */ + public function listEvents($projectName, $groupId, array $optionalArgs = []) + { + $request = new ListEventsRequest(); + $requestParamHeaders = []; + $request->setProjectName($projectName); + $request->setGroupId($groupId); + $requestParamHeaders['project_name'] = $projectName; + if (isset($optionalArgs['serviceFilter'])) { + $request->setServiceFilter($optionalArgs['serviceFilter']); + } + + if (isset($optionalArgs['timeRange'])) { + $request->setTimeRange($optionalArgs['timeRange']); + } + + 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('ListEvents', $optionalArgs, ListEventsResponse::class, $request); + } + + /** + * Lists the specified groups. + * + * Sample code: + * ``` + * $errorStatsServiceClient = new ErrorStatsServiceClient(); + * try { + * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $errorStatsServiceClient->close(); + * } + * ``` + * + * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` + * and `{projectNumber}` can be found in the + * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). + * + * Examples: `projects/my-project-123`, `projects/5551234`. + * @param array $optionalArgs { + * Optional. + * + * @type string[] $groupId + * Optional. List all ErrorGroupStats with these IDs. + * @type ServiceContextFilter $serviceFilter + * Optional. List only ErrorGroupStats which belong to a service + * context that matches the filter. + * Data for all service contexts is returned if this field is not specified. + * @type QueryTimeRange $timeRange + * Optional. List data for the given time range. + * If not set, a default time range is used. The field + * time_range_begin in the response will specify the beginning + * of this time range. + * Only ErrorGroupStats with a non-zero count in the given time + * range are returned, unless the request contains an explicit + * group_id list. If a group_id list is given, also + * ErrorGroupStats with zero occurrences are returned. + * @type Duration $timedCountDuration + * Optional. The preferred duration for a single returned `TimedCount`. + * If not set, no timed counts are returned. + * @type int $alignment + * Optional. The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + * For allowed values, use constants defined on {@see \Google\Cloud\ErrorReporting\V1beta1\TimedCountAlignment} + * @type Timestamp $alignmentTime + * Optional. Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + * @type int $order + * Optional. The sort order in which the results are returned. + * Default is `COUNT_DESC`. + * For allowed values, use constants defined on {@see \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupOrder} + * @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 + * + * @experimental + */ + public function listGroupStats($projectName, array $optionalArgs = []) + { + $request = new ListGroupStatsRequest(); + $requestParamHeaders = []; + $request->setProjectName($projectName); + $requestParamHeaders['project_name'] = $projectName; + if (isset($optionalArgs['groupId'])) { + $request->setGroupId($optionalArgs['groupId']); + } + + if (isset($optionalArgs['serviceFilter'])) { + $request->setServiceFilter($optionalArgs['serviceFilter']); + } + + if (isset($optionalArgs['timeRange'])) { + $request->setTimeRange($optionalArgs['timeRange']); + } + + if (isset($optionalArgs['timedCountDuration'])) { + $request->setTimedCountDuration($optionalArgs['timedCountDuration']); + } + + if (isset($optionalArgs['alignment'])) { + $request->setAlignment($optionalArgs['alignment']); + } + + if (isset($optionalArgs['alignmentTime'])) { + $request->setAlignmentTime($optionalArgs['alignmentTime']); + } + + if (isset($optionalArgs['order'])) { + $request->setOrder($optionalArgs['order']); + } + + 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('ListGroupStats', $optionalArgs, ListGroupStatsResponse::class, $request); + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php new file mode 100644 index 000000000000..1c7331481c3b --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php @@ -0,0 +1,316 @@ +projectName('[PROJECT]'); + * $event = new ReportedErrorEvent(); + * $response = $reportErrorsServiceClient->reportErrorEvent($formattedProjectName, $event); + * } finally { + * $reportErrorsServiceClient->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. + * + * @experimental + */ +class ReportErrorsServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; + + /** 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 $projectNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/report_errors_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/report_errors_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/report_errors_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/report_errors_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'project' => self::getProjectNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + * + * @experimental + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->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 + * - 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. + * + * @experimental + */ + 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 'clouderrorreporting.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); + } + + /** + * Report an individual error event and record the event to a log. + * + * This endpoint accepts **either** an OAuth token, + * **or** an [API key](https://support.google.com/cloud/answer/6158862) + * for authentication. To use an API key, append it to the URL as the value of + * a `key` parameter. For example: + * + * `POST + * https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456` + * + * **Note:** [Error Reporting](/error-reporting) is a global service built + * on Cloud Logging and doesn't analyze logs stored + * in regional log buckets or logs routed to other Google Cloud projects. + * + * For more information, see + * [Using Error Reporting with regionalized + * logs](/error-reporting/docs/regionalization). + * + * Sample code: + * ``` + * $reportErrorsServiceClient = new ReportErrorsServiceClient(); + * try { + * $formattedProjectName = $reportErrorsServiceClient->projectName('[PROJECT]'); + * $event = new ReportedErrorEvent(); + * $response = $reportErrorsServiceClient->reportErrorEvent($formattedProjectName, $event); + * } finally { + * $reportErrorsServiceClient->close(); + * } + * ``` + * + * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectId}`, where `{projectId}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * + * Example: // `projects/my-project-123`. + * @param ReportedErrorEvent $event Required. The error event to be reported. + * @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\ErrorReporting\V1beta1\ReportErrorEventResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function reportErrorEvent($projectName, $event, array $optionalArgs = []) + { + $request = new ReportErrorEventRequest(); + $requestParamHeaders = []; + $request->setProjectName($projectName); + $request->setEvent($event); + $requestParamHeaders['project_name'] = $projectName; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ReportErrorEvent', ReportErrorEventResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php new file mode 100644 index 000000000000..1cf0f5c77828 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php @@ -0,0 +1,36 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService' => [], + ], +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php new file mode 100644 index 000000000000..e967a41f87ee --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php @@ -0,0 +1,33 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService' => [ + 'GetGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{group_name=projects/*/groups/*}', + 'placeholders' => [ + 'group_name' => [ + 'getters' => [ + 'getGroupName', + ], + ], + ], + ], + 'UpdateGroup' => [ + 'method' => 'put', + 'uriTemplate' => '/v1beta1/{group.name=projects/*/groups/*}', + 'body' => 'group', + 'placeholders' => [ + 'group.name' => [ + 'getters' => [ + 'getGroup', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json new file mode 100644 index 000000000000..0a7501188091 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json @@ -0,0 +1,50 @@ +{ + "interfaces": { + "google.devtools.clouderrorreporting.v1beta1.ErrorStatsService": { + "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": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "DeleteEvents": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListEvents": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListGroupStats": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php new file mode 100644 index 000000000000..35148865a5eb --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php @@ -0,0 +1,28 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService' => [ + 'ListEvents' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getErrorEvents', + ], + ], + 'ListGroupStats' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getErrorGroupStats', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php new file mode 100644 index 000000000000..8b9bb159bcb1 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php @@ -0,0 +1,45 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService' => [ + 'DeleteEvents' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events', + 'placeholders' => [ + 'project_name' => [ + 'getters' => [ + 'getProjectName', + ], + ], + ], + ], + 'ListEvents' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events', + 'placeholders' => [ + 'project_name' => [ + 'getters' => [ + 'getProjectName', + ], + ], + ], + 'queryParams' => [ + 'group_id', + ], + ], + 'ListGroupStats' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{project_name=projects/*}/groupStats', + 'placeholders' => [ + 'project_name' => [ + 'getters' => [ + 'getProjectName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json new file mode 100644 index 000000000000..701d5afb9615 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.devtools.clouderrorreporting.v1beta1.ReportErrorsService": { + "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": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ReportErrorEvent": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php new file mode 100644 index 000000000000..52aefb0c1051 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php @@ -0,0 +1,7 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService' => [], + ], +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php new file mode 100644 index 000000000000..c7565d89467b --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php @@ -0,0 +1,21 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService' => [ + 'ReportErrorEvent' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events:report', + 'body' => 'event', + 'placeholders' => [ + 'project_name' => [ + 'getters' => [ + 'getProjectName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php new file mode 100644 index 000000000000..9df60a549c5e --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php @@ -0,0 +1,185 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ErrorGroupServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ErrorGroupServiceClient($options); + } + + /** @test */ + public function getGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $groupId = 'groupId506361563'; + $expectedResponse = new ErrorGroup(); + $expectedResponse->setName($name); + $expectedResponse->setGroupId($groupId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedGroupName = $gapicClient->errorGroupName('[PROJECT]', '[GROUP]'); + $response = $gapicClient->getGroup($formattedGroupName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getGroupName(); + $this->assertProtobufEquals($formattedGroupName, $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 + $formattedGroupName = $gapicClient->errorGroupName('[PROJECT]', '[GROUP]'); + try { + $gapicClient->getGroup($formattedGroupName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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'; + $groupId = 'groupId506361563'; + $expectedResponse = new ErrorGroup(); + $expectedResponse->setName($name); + $expectedResponse->setGroupId($groupId); + $transport->addResponse($expectedResponse); + // Mock request + $group = new ErrorGroup(); + $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.devtools.clouderrorreporting.v1beta1.ErrorGroupService/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 ErrorGroup(); + 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/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php new file mode 100644 index 000000000000..4fd50e022e43 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php @@ -0,0 +1,263 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ErrorStatsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ErrorStatsServiceClient($options); + } + + /** @test */ + public function deleteEventsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new DeleteEventsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->deleteEvents($formattedProjectName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectName(); + $this->assertProtobufEquals($formattedProjectName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEventsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + try { + $gapicClient->deleteEvents($formattedProjectName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEventsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $errorEventsElement = new ErrorEvent(); + $errorEvents = [ + $errorEventsElement, + ]; + $expectedResponse = new ListEventsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setErrorEvents($errorEvents); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $groupId = 'groupId506361563'; + $response = $gapicClient->listEvents($formattedProjectName, $groupId); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getErrorEvents()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListEvents', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectName(); + $this->assertProtobufEquals($formattedProjectName, $actualValue); + $actualValue = $actualRequestObject->getGroupId(); + $this->assertProtobufEquals($groupId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEventsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $groupId = 'groupId506361563'; + try { + $gapicClient->listEvents($formattedProjectName, $groupId); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupStatsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $errorGroupStatsElement = new ErrorGroupStats(); + $errorGroupStats = [ + $errorGroupStatsElement, + ]; + $expectedResponse = new ListGroupStatsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setErrorGroupStats($errorGroupStats); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listGroupStats($formattedProjectName); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getErrorGroupStats()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListGroupStats', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectName(); + $this->assertProtobufEquals($formattedProjectName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupStatsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + try { + $gapicClient->listGroupStats($formattedProjectName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->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/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php new file mode 100644 index 000000000000..8b8a666af77d --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php @@ -0,0 +1,133 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ReportErrorsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ReportErrorsServiceClient($options); + } + + /** @test */ + public function reportErrorEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ReportErrorEventResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $event = new ReportedErrorEvent(); + $eventServiceContext = new ServiceContext(); + $event->setServiceContext($eventServiceContext); + $eventMessage = 'eventMessage1863181325'; + $event->setMessage($eventMessage); + $response = $gapicClient->reportErrorEvent($formattedProjectName, $event); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectName(); + $this->assertProtobufEquals($formattedProjectName, $actualValue); + $actualValue = $actualRequestObject->getEvent(); + $this->assertProtobufEquals($event, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reportErrorEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $event = new ReportedErrorEvent(); + $eventServiceContext = new ServiceContext(); + $event->setServiceContext($eventServiceContext); + $eventMessage = 'eventMessage1863181325'; + $event->setMessage($eventMessage); + try { + $gapicClient->reportErrorEvent($formattedProjectName, $event); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->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/EssentialContacts/v1/proto/src/GPBMetadata/Google/Cloud/Essentialcontacts/V1/Enums.php b/owl-bot-staging/EssentialContacts/v1/proto/src/GPBMetadata/Google/Cloud/Essentialcontacts/V1/Enums.php new file mode 100644 index 0000000000000000000000000000000000000000..3f482c7e004491b855c973eb3a51a1c7e6e027db GIT binary patch literal 1167 zcmb7DTW-@p6eTI8?eM7OBJsn=M6_yJQAZJfE(ImFYb=ao#ZIImOVPxcxFfkUmOZXi zP&dR5*aC}S0jz*e#^W?pjR4^vKjz$XkMBL__1o+`123SBDb5kcGdR71{2aq9XPm_> zh0}6A$2pAIMMhGbYY>_P=nX<>nNHXer3EYV80#=$EJ<-EPFXqY;G)2k6O_h`auoBT zbJ^`+T3!^IWCnnu3tVI<#?bcrA23HV#8G5RlE|n?BI_w_Q?92qjf_@=5&B37n&}z@l;$J1=R>38Szo7|I2rk-=olzl>NBvjterTX;h2^e1`0TQ54Oj`9>Q}%cp!X(RS2Gs zd#)o&E6qVDDDDUr-6TS3R4N>=erfi9Ho%_9hxX5r^?`J)w2|NVI9wDYEJZZYSe|qe zOl3Yg^%2TQ@s~s$uk7VZvt`Q&X);3EGD5~8huXON?FJJqa`roDH>gM??MHLBrqXrE krRytXx<2ksA4tKk_Lr7>Sv&cb@&9OgiLCv74Xy$B1?^dJfB*mh literal 0 HcmV?d00001 diff --git a/owl-bot-staging/EssentialContacts/v1/proto/src/GPBMetadata/Google/Cloud/Essentialcontacts/V1/Service.php b/owl-bot-staging/EssentialContacts/v1/proto/src/GPBMetadata/Google/Cloud/Essentialcontacts/V1/Service.php new file mode 100644 index 000000000000..05aa10522b35 --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/proto/src/GPBMetadata/Google/Cloud/Essentialcontacts/V1/Service.php @@ -0,0 +1,86 @@ +internalAddGeneratedFile( + ' +€" +/google/cloud/essentialcontacts/v1/service.proto!google.cloud.essentialcontacts.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto-google/cloud/essentialcontacts/v1/enums.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ñ +Contact +name (  +email ( d +#notification_category_subscriptions (27.google.cloud.essentialcontacts.v1.NotificationCategory + language_tag ( L +validation_state (22.google.cloud.essentialcontacts.v1.ValidationState1 + validate_time ( 2.google.protobuf.Timestamp:«êA§ +(essentialcontacts.googleapis.com/Contact%projects/{project}/contacts/{contact}#folders/{folder}/contacts/{contact}/organizations/{organization}/contacts/{contact}"ˆ +ListContactsRequest@ +parent ( B0àAúA*(essentialcontacts.googleapis.com/Contact + page_size (BàA + +page_token ( BàA"m +ListContactsResponse< +contacts ( 2*.google.cloud.essentialcontacts.v1.Contact +next_page_token ( "S +GetContactRequest> +name ( B0àAúA* +(essentialcontacts.googleapis.com/Contact"V +DeleteContactRequest> +name ( B0àAúA* +(essentialcontacts.googleapis.com/Contact"š +CreateContactRequest@ +parent ( B0àAúA*(essentialcontacts.googleapis.com/Contact@ +contact ( 2*.google.cloud.essentialcontacts.v1.ContactBàA"Ž +UpdateContactRequest@ +contact ( 2*.google.cloud.essentialcontacts.v1.ContactBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"å +ComputeContactsRequest@ +parent ( B0àAúA*(essentialcontacts.googleapis.com/ContactX +notification_categories (27.google.cloud.essentialcontacts.v1.NotificationCategory + page_size (BàA + +page_token ( BàA"p +ComputeContactsResponse< +contacts ( 2*.google.cloud.essentialcontacts.v1.Contact +next_page_token ( "ý +SendTestMessageRequestB +contacts ( B0àAúA* +(essentialcontacts.googleapis.com/ContactB +resource ( B0àAúA*(essentialcontacts.googleapis.com/Contact[ +notification_category (27.google.cloud.essentialcontacts.v1.NotificationCategoryBàA2Ë +EssentialContactsService˜ + CreateContact7.google.cloud.essentialcontacts.v1.CreateContactRequest*.google.cloud.essentialcontacts.v1.Contact"¡‚Ó䓉" /v1/{parent=projects/*}/contacts:contactZ*"/v1/{parent=folders/*}/contacts:contactZ0"%/v1/{parent=organizations/*}/contacts:contactÚAparent,contactµ + UpdateContact7.google.cloud.essentialcontacts.v1.UpdateContactRequest*.google.cloud.essentialcontacts.v1.Contact"¾‚Óä“¡2(/v1/{contact.name=projects/*/contacts/*}:contactZ22\'/v1/{contact.name=folders/*/contacts/*}:contactZ82-/v1/{contact.name=organizations/*/contacts/*}:contactÚAcontact,update_maskþ + ListContacts6.google.cloud.essentialcontacts.v1.ListContactsRequest7.google.cloud.essentialcontacts.v1.ListContactsResponse"}‚Óä“n /v1/{parent=projects/*}/contactsZ!/v1/{parent=folders/*}/contactsZ\'%/v1/{parent=organizations/*}/contactsÚAparentë + +GetContact4.google.cloud.essentialcontacts.v1.GetContactRequest*.google.cloud.essentialcontacts.v1.Contact"{‚Óä“n /v1/{name=projects/*/contacts/*}Z!/v1/{name=folders/*/contacts/*}Z\'%/v1/{name=organizations/*/contacts/*}ÚAnameÝ + DeleteContact7.google.cloud.essentialcontacts.v1.DeleteContactRequest.google.protobuf.Empty"{‚Óä“n* /v1/{name=projects/*/contacts/*}Z!*/v1/{name=folders/*/contacts/*}Z\'*%/v1/{name=organizations/*/contacts/*}ÚAname˜ +ComputeContacts9.google.cloud.essentialcontacts.v1.ComputeContactsRequest:.google.cloud.essentialcontacts.v1.ComputeContactsResponse"‚Ó䓆(/v1/{parent=projects/*}/contacts:computeZ)\'/v1/{parent=folders/*}/contacts:computeZ/-/v1/{parent=organizations/*}/contacts:compute› +SendTestMessage9.google.cloud.essentialcontacts.v1.SendTestMessageRequest.google.protobuf.Empty"´‚Óä“­"2/v1/{resource=projects/*}/contacts:sendTestMessage:*Z6"1/v1/{resource=folders/*}/contacts:sendTestMessage:*Z<"7/v1/{resource=organizations/*}/contacts:sendTestMessage:*TÊA essentialcontacts.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBì +%com.google.cloud.essentialcontacts.v1PZRgoogle.golang.org/genproto/googleapis/cloud/essentialcontacts/v1;essentialcontactsª!Google.Cloud.EssentialContacts.V1Ê!Google\\Cloud\\EssentialContacts\\V1ê$Google::Cloud::EssentialContacts::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsRequest.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsRequest.php new file mode 100644 index 000000000000..a00eed430a0d --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsRequest.php @@ -0,0 +1,209 @@ +google.cloud.essentialcontacts.v1.ComputeContactsRequest + */ +class ComputeContactsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the resource to compute contacts for. + * Format: organizations/{organization_id}, + * folders/{folder_id} or projects/{project_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The categories of notifications to compute contacts for. If ALL is included + * in this list, contacts subscribed to any notification category will be + * returned. + * + * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.NotificationCategory notification_categories = 6; + */ + private $notification_categories; + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `next_page_token` in the + * response indicates that more results might be available. + * If not specified, the default page_size is 100. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. If present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the resource to compute contacts for. + * Format: organizations/{organization_id}, + * folders/{folder_id} or projects/{project_id} + * @type array|\Google\Protobuf\Internal\RepeatedField $notification_categories + * The categories of notifications to compute contacts for. If ALL is included + * in this list, contacts subscribed to any notification category will be + * returned. + * @type int $page_size + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `next_page_token` in the + * response indicates that more results might be available. + * If not specified, the default page_size is 100. + * @type string $page_token + * Optional. If present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the resource to compute contacts for. + * Format: organizations/{organization_id}, + * folders/{folder_id} or projects/{project_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 name of the resource to compute contacts for. + * Format: organizations/{organization_id}, + * folders/{folder_id} or projects/{project_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 categories of notifications to compute contacts for. If ALL is included + * in this list, contacts subscribed to any notification category will be + * returned. + * + * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.NotificationCategory notification_categories = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNotificationCategories() + { + return $this->notification_categories; + } + + /** + * The categories of notifications to compute contacts for. If ALL is included + * in this list, contacts subscribed to any notification category will be + * returned. + * + * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.NotificationCategory notification_categories = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNotificationCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\EssentialContacts\V1\NotificationCategory::class); + $this->notification_categories = $arr; + + return $this; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `next_page_token` in the + * response indicates that more results might be available. + * If not specified, the default page_size is 100. + * + * 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 from this request. + * Non-positive values are ignored. The presence of `next_page_token` in the + * response indicates that more results might be available. + * If not specified, the default page_size is 100. + * + * 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 present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. If present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * 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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsResponse.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsResponse.php new file mode 100644 index 000000000000..3bd97e666fdd --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsResponse.php @@ -0,0 +1,121 @@ +google.cloud.essentialcontacts.v1.ComputeContactsResponse + */ +class ComputeContactsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * All contacts for the resource that are subscribed to the specified + * notification categories, including contacts inherited from any parent + * resources. + * + * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.Contact contacts = 1; + */ + private $contacts; + /** + * If there are 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` and the + * rest of the parameters the same as the original request. + * + * 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\EssentialContacts\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $contacts + * All contacts for the resource that are subscribed to the specified + * notification categories, including contacts inherited from any parent + * resources. + * @type string $next_page_token + * If there are 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` and the + * rest of the parameters the same as the original request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * All contacts for the resource that are subscribed to the specified + * notification categories, including contacts inherited from any parent + * resources. + * + * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.Contact contacts = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContacts() + { + return $this->contacts; + } + + /** + * All contacts for the resource that are subscribed to the specified + * notification categories, including contacts inherited from any parent + * resources. + * + * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.Contact contacts = 1; + * @param array<\Google\Cloud\EssentialContacts\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\EssentialContacts\V1\Contact::class); + $this->contacts = $arr; + + return $this; + } + + /** + * If there are 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` and the + * rest of the parameters the same as the original request. + * + * 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 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` and the + * rest of the parameters the same as the original request. + * + * 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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/Contact.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/Contact.php new file mode 100644 index 000000000000..895ee5d8e570 --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/Contact.php @@ -0,0 +1,283 @@ +google.cloud.essentialcontacts.v1.Contact + */ +class Contact extends \Google\Protobuf\Internal\Message +{ + /** + * The identifier for the contact. + * Format: {resource_type}/{resource_id}/contacts/{contact_id} + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The email address to send notifications to. This does not need to + * be a Google account. + * + * Generated from protobuf field string email = 2; + */ + protected $email = ''; + /** + * The categories of notifications that the contact will receive + * communications for. + * + * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.NotificationCategory notification_category_subscriptions = 3; + */ + private $notification_category_subscriptions; + /** + * The preferred language for notifications, as a ISO 639-1 language code. See + * [Supported + * languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages) + * for a list of supported languages. + * + * Generated from protobuf field string language_tag = 4; + */ + protected $language_tag = ''; + /** + * The validity of the contact. A contact is considered valid if it is the + * correct recipient for notifications for a particular resource. + * + * Generated from protobuf field .google.cloud.essentialcontacts.v1.ValidationState validation_state = 8; + */ + protected $validation_state = 0; + /** + * The last time the validation_state was updated, either manually or + * automatically. A contact is considered stale if its validation state was + * updated more than 1 year ago. + * + * Generated from protobuf field .google.protobuf.Timestamp validate_time = 9; + */ + protected $validate_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The identifier for the contact. + * Format: {resource_type}/{resource_id}/contacts/{contact_id} + * @type string $email + * Required. The email address to send notifications to. This does not need to + * be a Google account. + * @type array|\Google\Protobuf\Internal\RepeatedField $notification_category_subscriptions + * The categories of notifications that the contact will receive + * communications for. + * @type string $language_tag + * The preferred language for notifications, as a ISO 639-1 language code. See + * [Supported + * languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages) + * for a list of supported languages. + * @type int $validation_state + * The validity of the contact. A contact is considered valid if it is the + * correct recipient for notifications for a particular resource. + * @type \Google\Protobuf\Timestamp $validate_time + * The last time the validation_state was updated, either manually or + * automatically. A contact is considered stale if its validation state was + * updated more than 1 year ago. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The identifier for the contact. + * Format: {resource_type}/{resource_id}/contacts/{contact_id} + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The identifier for the contact. + * Format: {resource_type}/{resource_id}/contacts/{contact_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; + } + + /** + * Required. The email address to send notifications to. This does not need to + * be a Google account. + * + * Generated from protobuf field string email = 2; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Required. The email address to send notifications to. This does not need to + * be a Google account. + * + * Generated from protobuf field string email = 2; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * The categories of notifications that the contact will receive + * communications for. + * + * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.NotificationCategory notification_category_subscriptions = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNotificationCategorySubscriptions() + { + return $this->notification_category_subscriptions; + } + + /** + * The categories of notifications that the contact will receive + * communications for. + * + * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.NotificationCategory notification_category_subscriptions = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNotificationCategorySubscriptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\EssentialContacts\V1\NotificationCategory::class); + $this->notification_category_subscriptions = $arr; + + return $this; + } + + /** + * The preferred language for notifications, as a ISO 639-1 language code. See + * [Supported + * languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages) + * for a list of supported languages. + * + * Generated from protobuf field string language_tag = 4; + * @return string + */ + public function getLanguageTag() + { + return $this->language_tag; + } + + /** + * The preferred language for notifications, as a ISO 639-1 language code. See + * [Supported + * languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages) + * for a list of supported languages. + * + * Generated from protobuf field string language_tag = 4; + * @param string $var + * @return $this + */ + public function setLanguageTag($var) + { + GPBUtil::checkString($var, True); + $this->language_tag = $var; + + return $this; + } + + /** + * The validity of the contact. A contact is considered valid if it is the + * correct recipient for notifications for a particular resource. + * + * Generated from protobuf field .google.cloud.essentialcontacts.v1.ValidationState validation_state = 8; + * @return int + */ + public function getValidationState() + { + return $this->validation_state; + } + + /** + * The validity of the contact. A contact is considered valid if it is the + * correct recipient for notifications for a particular resource. + * + * Generated from protobuf field .google.cloud.essentialcontacts.v1.ValidationState validation_state = 8; + * @param int $var + * @return $this + */ + public function setValidationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\EssentialContacts\V1\ValidationState::class); + $this->validation_state = $var; + + return $this; + } + + /** + * The last time the validation_state was updated, either manually or + * automatically. A contact is considered stale if its validation state was + * updated more than 1 year ago. + * + * Generated from protobuf field .google.protobuf.Timestamp validate_time = 9; + * @return \Google\Protobuf\Timestamp|null + */ + public function getValidateTime() + { + return $this->validate_time; + } + + public function hasValidateTime() + { + return isset($this->validate_time); + } + + public function clearValidateTime() + { + unset($this->validate_time); + } + + /** + * The last time the validation_state was updated, either manually or + * automatically. A contact is considered stale if its validation state was + * updated more than 1 year ago. + * + * Generated from protobuf field .google.protobuf.Timestamp validate_time = 9; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setValidateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->validate_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/CreateContactRequest.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/CreateContactRequest.php new file mode 100644 index 000000000000..7b165928e641 --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/CreateContactRequest.php @@ -0,0 +1,123 @@ +google.cloud.essentialcontacts.v1.CreateContactRequest + */ +class CreateContactRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource to save this contact for. + * Format: organizations/{organization_id}, folders/{folder_id} or + * projects/{project_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The contact to create. Must specify an email address and language + * tag. + * + * Generated from protobuf field .google.cloud.essentialcontacts.v1.Contact contact = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $contact = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource to save this contact for. + * Format: organizations/{organization_id}, folders/{folder_id} or + * projects/{project_id} + * @type \Google\Cloud\EssentialContacts\V1\Contact $contact + * Required. The contact to create. Must specify an email address and language + * tag. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource to save this contact for. + * Format: organizations/{organization_id}, folders/{folder_id} or + * projects/{project_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 resource to save this contact for. + * Format: organizations/{organization_id}, folders/{folder_id} or + * projects/{project_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 contact to create. Must specify an email address and language + * tag. + * + * Generated from protobuf field .google.cloud.essentialcontacts.v1.Contact contact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\EssentialContacts\V1\Contact|null + */ + public function getContact() + { + return $this->contact; + } + + public function hasContact() + { + return isset($this->contact); + } + + public function clearContact() + { + unset($this->contact); + } + + /** + * Required. The contact to create. Must specify an email address and language + * tag. + * + * Generated from protobuf field .google.cloud.essentialcontacts.v1.Contact contact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\EssentialContacts\V1\Contact $var + * @return $this + */ + public function setContact($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\EssentialContacts\V1\Contact::class); + $this->contact = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/DeleteContactRequest.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/DeleteContactRequest.php new file mode 100644 index 000000000000..c01520860609 --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/DeleteContactRequest.php @@ -0,0 +1,79 @@ +google.cloud.essentialcontacts.v1.DeleteContactRequest + */ +class DeleteContactRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the contact to delete. + * Format: organizations/{organization_id}/contacts/{contact_id}, + * folders/{folder_id}/contacts/{contact_id} or + * projects/{project_id}/contacts/{contact_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 name of the contact to delete. + * Format: organizations/{organization_id}/contacts/{contact_id}, + * folders/{folder_id}/contacts/{contact_id} or + * projects/{project_id}/contacts/{contact_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the contact to delete. + * Format: organizations/{organization_id}/contacts/{contact_id}, + * folders/{folder_id}/contacts/{contact_id} or + * projects/{project_id}/contacts/{contact_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 name of the contact to delete. + * Format: organizations/{organization_id}/contacts/{contact_id}, + * folders/{folder_id}/contacts/{contact_id} or + * projects/{project_id}/contacts/{contact_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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/EssentialContactsServiceGrpcClient.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/EssentialContactsServiceGrpcClient.php new file mode 100644 index 000000000000..9f4d2da086dc --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/EssentialContactsServiceGrpcClient.php @@ -0,0 +1,144 @@ +_simpleRequest('/google.cloud.essentialcontacts.v1.EssentialContactsService/CreateContact', + $argument, + ['\Google\Cloud\EssentialContacts\V1\Contact', 'decode'], + $metadata, $options); + } + + /** + * Updates a contact. + * Note: A contact's email address cannot be changed. + * @param \Google\Cloud\EssentialContacts\V1\UpdateContactRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateContact(\Google\Cloud\EssentialContacts\V1\UpdateContactRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.essentialcontacts.v1.EssentialContactsService/UpdateContact', + $argument, + ['\Google\Cloud\EssentialContacts\V1\Contact', 'decode'], + $metadata, $options); + } + + /** + * Lists the contacts that have been set on a resource. + * @param \Google\Cloud\EssentialContacts\V1\ListContactsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListContacts(\Google\Cloud\EssentialContacts\V1\ListContactsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.essentialcontacts.v1.EssentialContactsService/ListContacts', + $argument, + ['\Google\Cloud\EssentialContacts\V1\ListContactsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets a single contact. + * @param \Google\Cloud\EssentialContacts\V1\GetContactRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetContact(\Google\Cloud\EssentialContacts\V1\GetContactRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.essentialcontacts.v1.EssentialContactsService/GetContact', + $argument, + ['\Google\Cloud\EssentialContacts\V1\Contact', 'decode'], + $metadata, $options); + } + + /** + * Deletes a contact. + * @param \Google\Cloud\EssentialContacts\V1\DeleteContactRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteContact(\Google\Cloud\EssentialContacts\V1\DeleteContactRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.essentialcontacts.v1.EssentialContactsService/DeleteContact', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Lists all contacts for the resource that are subscribed to the + * specified notification categories, including contacts inherited from + * any parent resources. + * @param \Google\Cloud\EssentialContacts\V1\ComputeContactsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ComputeContacts(\Google\Cloud\EssentialContacts\V1\ComputeContactsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.essentialcontacts.v1.EssentialContactsService/ComputeContacts', + $argument, + ['\Google\Cloud\EssentialContacts\V1\ComputeContactsResponse', 'decode'], + $metadata, $options); + } + + /** + * Allows a contact admin to send a test message to contact to verify that it + * has been configured correctly. + * @param \Google\Cloud\EssentialContacts\V1\SendTestMessageRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SendTestMessage(\Google\Cloud\EssentialContacts\V1\SendTestMessageRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.essentialcontacts.v1.EssentialContactsService/SendTestMessage', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/GetContactRequest.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/GetContactRequest.php new file mode 100644 index 000000000000..f5e85ff913cb --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/GetContactRequest.php @@ -0,0 +1,79 @@ +google.cloud.essentialcontacts.v1.GetContactRequest + */ +class GetContactRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the contact to retrieve. + * Format: organizations/{organization_id}/contacts/{contact_id}, + * folders/{folder_id}/contacts/{contact_id} or + * projects/{project_id}/contacts/{contact_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 name of the contact to retrieve. + * Format: organizations/{organization_id}/contacts/{contact_id}, + * folders/{folder_id}/contacts/{contact_id} or + * projects/{project_id}/contacts/{contact_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the contact to retrieve. + * Format: organizations/{organization_id}/contacts/{contact_id}, + * folders/{folder_id}/contacts/{contact_id} or + * projects/{project_id}/contacts/{contact_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 name of the contact to retrieve. + * Format: organizations/{organization_id}/contacts/{contact_id}, + * folders/{folder_id}/contacts/{contact_id} or + * projects/{project_id}/contacts/{contact_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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsRequest.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsRequest.php new file mode 100644 index 000000000000..d0b6a2ecd9cc --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsRequest.php @@ -0,0 +1,167 @@ +google.cloud.essentialcontacts.v1.ListContactsRequest + */ +class ListContactsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. + * Format: organizations/{organization_id}, folders/{folder_id} or + * projects/{project_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `next_page_token` in the + * response indicates that more results might be available. + * If not specified, the default page_size is 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. If present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. + * Format: organizations/{organization_id}, folders/{folder_id} or + * projects/{project_id} + * @type int $page_size + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `next_page_token` in the + * response indicates that more results might be available. + * If not specified, the default page_size is 100. + * @type string $page_token + * Optional. If present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. + * Format: organizations/{organization_id}, folders/{folder_id} or + * projects/{project_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 parent resource name. + * Format: organizations/{organization_id}, folders/{folder_id} or + * projects/{project_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 maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `next_page_token` in the + * response indicates that more results might be available. + * If not specified, the default page_size 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 results to return from this request. + * Non-positive values are ignored. The presence of `next_page_token` in the + * response indicates that more results might be available. + * If not specified, the default page_size 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. If present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous 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 present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous 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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsResponse.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsResponse.php new file mode 100644 index 000000000000..7d094531e0d4 --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsResponse.php @@ -0,0 +1,113 @@ +google.cloud.essentialcontacts.v1.ListContactsResponse + */ +class ListContactsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The contacts for the specified resource. + * + * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.Contact contacts = 1; + */ + private $contacts; + /** + * If there are 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` and the + * rest of the parameters the same as the original request. + * + * 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\EssentialContacts\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $contacts + * The contacts for the specified resource. + * @type string $next_page_token + * If there are 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` and the + * rest of the parameters the same as the original request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The contacts for the specified resource. + * + * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.Contact contacts = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContacts() + { + return $this->contacts; + } + + /** + * The contacts for the specified resource. + * + * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.Contact contacts = 1; + * @param array<\Google\Cloud\EssentialContacts\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\EssentialContacts\V1\Contact::class); + $this->contacts = $arr; + + return $this; + } + + /** + * If there are 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` and the + * rest of the parameters the same as the original request. + * + * 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 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` and the + * rest of the parameters the same as the original request. + * + * 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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/NotificationCategory.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/NotificationCategory.php new file mode 100644 index 000000000000..4839f5697d55 --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/NotificationCategory.php @@ -0,0 +1,113 @@ +google.cloud.essentialcontacts.v1.NotificationCategory + */ +class NotificationCategory +{ + /** + * Notification category is unrecognized or unspecified. + * + * Generated from protobuf enum NOTIFICATION_CATEGORY_UNSPECIFIED = 0; + */ + const NOTIFICATION_CATEGORY_UNSPECIFIED = 0; + /** + * All notifications related to the resource, including notifications + * pertaining to categories added in the future. + * + * Generated from protobuf enum ALL = 2; + */ + const ALL = 2; + /** + * Notifications related to imminent account suspension. + * + * Generated from protobuf enum SUSPENSION = 3; + */ + const SUSPENSION = 3; + /** + * Notifications related to security/privacy incidents, notifications, and + * vulnerabilities. + * + * Generated from protobuf enum SECURITY = 5; + */ + const SECURITY = 5; + /** + * Notifications related to technical events and issues such as outages, + * errors, or bugs. + * + * Generated from protobuf enum TECHNICAL = 6; + */ + const TECHNICAL = 6; + /** + * Notifications related to billing and payments notifications, price updates, + * errors, or credits. + * + * Generated from protobuf enum BILLING = 7; + */ + const BILLING = 7; + /** + * Notifications related to enforcement actions, regulatory compliance, or + * government notices. + * + * Generated from protobuf enum LEGAL = 8; + */ + const LEGAL = 8; + /** + * Notifications related to new versions, product terms updates, or + * deprecations. + * + * Generated from protobuf enum PRODUCT_UPDATES = 9; + */ + const PRODUCT_UPDATES = 9; + /** + * Child category of TECHNICAL. If assigned, technical incident notifications + * will go to these contacts instead of TECHNICAL. + * + * Generated from protobuf enum TECHNICAL_INCIDENTS = 10; + */ + const TECHNICAL_INCIDENTS = 10; + + private static $valueToName = [ + self::NOTIFICATION_CATEGORY_UNSPECIFIED => 'NOTIFICATION_CATEGORY_UNSPECIFIED', + self::ALL => 'ALL', + self::SUSPENSION => 'SUSPENSION', + self::SECURITY => 'SECURITY', + self::TECHNICAL => 'TECHNICAL', + self::BILLING => 'BILLING', + self::LEGAL => 'LEGAL', + self::PRODUCT_UPDATES => 'PRODUCT_UPDATES', + self::TECHNICAL_INCIDENTS => 'TECHNICAL_INCIDENTS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/SendTestMessageRequest.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/SendTestMessageRequest.php new file mode 100644 index 000000000000..e756f41f0c33 --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/SendTestMessageRequest.php @@ -0,0 +1,167 @@ +google.cloud.essentialcontacts.v1.SendTestMessageRequest + */ +class SendTestMessageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The list of names of the contacts to send a test message to. + * Format: organizations/{organization_id}/contacts/{contact_id}, + * folders/{folder_id}/contacts/{contact_id} or + * projects/{project_id}/contacts/{contact_id} + * + * Generated from protobuf field repeated string contacts = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $contacts; + /** + * Required. The name of the resource to send the test message for. All + * contacts must either be set directly on this resource or inherited from + * another resource that is an ancestor of this one. Format: + * organizations/{organization_id}, folders/{folder_id} or + * projects/{project_id} + * + * Generated from protobuf field string resource = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $resource = ''; + /** + * Required. The notification category to send the test message for. All + * contacts must be subscribed to this category. + * + * Generated from protobuf field .google.cloud.essentialcontacts.v1.NotificationCategory notification_category = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $notification_category = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $contacts + * Required. The list of names of the contacts to send a test message to. + * Format: organizations/{organization_id}/contacts/{contact_id}, + * folders/{folder_id}/contacts/{contact_id} or + * projects/{project_id}/contacts/{contact_id} + * @type string $resource + * Required. The name of the resource to send the test message for. All + * contacts must either be set directly on this resource or inherited from + * another resource that is an ancestor of this one. Format: + * organizations/{organization_id}, folders/{folder_id} or + * projects/{project_id} + * @type int $notification_category + * Required. The notification category to send the test message for. All + * contacts must be subscribed to this category. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The list of names of the contacts to send a test message to. + * Format: organizations/{organization_id}/contacts/{contact_id}, + * folders/{folder_id}/contacts/{contact_id} or + * projects/{project_id}/contacts/{contact_id} + * + * Generated from protobuf field repeated string contacts = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContacts() + { + return $this->contacts; + } + + /** + * Required. The list of names of the contacts to send a test message to. + * Format: organizations/{organization_id}/contacts/{contact_id}, + * folders/{folder_id}/contacts/{contact_id} or + * projects/{project_id}/contacts/{contact_id} + * + * Generated from protobuf field repeated string contacts = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->contacts = $arr; + + return $this; + } + + /** + * Required. The name of the resource to send the test message for. All + * contacts must either be set directly on this resource or inherited from + * another resource that is an ancestor of this one. Format: + * organizations/{organization_id}, folders/{folder_id} or + * projects/{project_id} + * + * Generated from protobuf field string resource = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * Required. The name of the resource to send the test message for. All + * contacts must either be set directly on this resource or inherited from + * another resource that is an ancestor of this one. Format: + * organizations/{organization_id}, folders/{folder_id} or + * projects/{project_id} + * + * Generated from protobuf field string resource = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + + /** + * Required. The notification category to send the test message for. All + * contacts must be subscribed to this category. + * + * Generated from protobuf field .google.cloud.essentialcontacts.v1.NotificationCategory notification_category = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getNotificationCategory() + { + return $this->notification_category; + } + + /** + * Required. The notification category to send the test message for. All + * contacts must be subscribed to this category. + * + * Generated from protobuf field .google.cloud.essentialcontacts.v1.NotificationCategory notification_category = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setNotificationCategory($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\EssentialContacts\V1\NotificationCategory::class); + $this->notification_category = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/UpdateContactRequest.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/UpdateContactRequest.php new file mode 100644 index 000000000000..cf62327ad3e9 --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/UpdateContactRequest.php @@ -0,0 +1,133 @@ +google.cloud.essentialcontacts.v1.UpdateContactRequest + */ +class UpdateContactRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The contact resource to replace the existing saved contact. Note: + * the email address of the contact cannot be modified. + * + * Generated from protobuf field .google.cloud.essentialcontacts.v1.Contact contact = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $contact = null; + /** + * Optional. The update mask applied to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\EssentialContacts\V1\Contact $contact + * Required. The contact resource to replace the existing saved contact. Note: + * the email address of the contact cannot be modified. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The update mask applied to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The contact resource to replace the existing saved contact. Note: + * the email address of the contact cannot be modified. + * + * Generated from protobuf field .google.cloud.essentialcontacts.v1.Contact contact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\EssentialContacts\V1\Contact|null + */ + public function getContact() + { + return $this->contact; + } + + public function hasContact() + { + return isset($this->contact); + } + + public function clearContact() + { + unset($this->contact); + } + + /** + * Required. The contact resource to replace the existing saved contact. Note: + * the email address of the contact cannot be modified. + * + * Generated from protobuf field .google.cloud.essentialcontacts.v1.Contact contact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\EssentialContacts\V1\Contact $var + * @return $this + */ + public function setContact($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\EssentialContacts\V1\Contact::class); + $this->contact = $var; + + return $this; + } + + /** + * Optional. The update mask applied to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 update mask applied to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ValidationState.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ValidationState.php new file mode 100644 index 000000000000..d1085febe567 --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ValidationState.php @@ -0,0 +1,64 @@ +google.cloud.essentialcontacts.v1.ValidationState + */ +class ValidationState +{ + /** + * The validation state is unknown or unspecified. + * + * Generated from protobuf enum VALIDATION_STATE_UNSPECIFIED = 0; + */ + const VALIDATION_STATE_UNSPECIFIED = 0; + /** + * The contact is marked as valid. This is usually done manually by the + * contact admin. All new contacts begin in the valid state. + * + * Generated from protobuf enum VALID = 1; + */ + const VALID = 1; + /** + * The contact is considered invalid. This may become the state if the + * contact's email is found to be unreachable. + * + * Generated from protobuf enum INVALID = 2; + */ + const INVALID = 2; + + private static $valueToName = [ + self::VALIDATION_STATE_UNSPECIFIED => 'VALIDATION_STATE_UNSPECIFIED', + self::VALID => 'VALID', + 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); + } +} + diff --git a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/compute_contacts.php b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/compute_contacts.php new file mode 100644 index 000000000000..3c96177620b2 --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/compute_contacts.php @@ -0,0 +1,75 @@ +computeContacts($formattedParent); + + /** @var Contact $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 = EssentialContactsServiceClient::projectName('[PROJECT]'); + + compute_contacts_sample($formattedParent); +} +// [END essentialcontacts_v1_generated_EssentialContactsService_ComputeContacts_sync] diff --git a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/create_contact.php b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/create_contact.php new file mode 100644 index 000000000000..41fc6710827c --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/create_contact.php @@ -0,0 +1,71 @@ +createContact($formattedParent, $contact); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = EssentialContactsServiceClient::projectName('[PROJECT]'); + + create_contact_sample($formattedParent); +} +// [END essentialcontacts_v1_generated_EssentialContactsService_CreateContact_sync] diff --git a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/delete_contact.php b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/delete_contact.php new file mode 100644 index 000000000000..b6b151e40efa --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/delete_contact.php @@ -0,0 +1,67 @@ +deleteContact($formattedName); + 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 = EssentialContactsServiceClient::contactName('[PROJECT]', '[CONTACT]'); + + delete_contact_sample($formattedName); +} +// [END essentialcontacts_v1_generated_EssentialContactsService_DeleteContact_sync] diff --git a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/get_contact.php b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/get_contact.php new file mode 100644 index 000000000000..92cb59035a0c --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/get_contact.php @@ -0,0 +1,69 @@ +getContact($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EssentialContactsServiceClient::contactName('[PROJECT]', '[CONTACT]'); + + get_contact_sample($formattedName); +} +// [END essentialcontacts_v1_generated_EssentialContactsService_GetContact_sync] diff --git a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/list_contacts.php b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/list_contacts.php new file mode 100644 index 000000000000..9923265963a3 --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/list_contacts.php @@ -0,0 +1,73 @@ +listContacts($formattedParent); + + /** @var Contact $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 = EssentialContactsServiceClient::projectName('[PROJECT]'); + + list_contacts_sample($formattedParent); +} +// [END essentialcontacts_v1_generated_EssentialContactsService_ListContacts_sync] diff --git a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/send_test_message.php b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/send_test_message.php new file mode 100644 index 000000000000..603171684111 --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/send_test_message.php @@ -0,0 +1,89 @@ +sendTestMessage( + $formattedContacts, + $formattedResource, + $notificationCategory + ); + 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 +{ + $formattedContactsElement = EssentialContactsServiceClient::contactName('[PROJECT]', '[CONTACT]'); + $formattedResource = EssentialContactsServiceClient::projectName('[PROJECT]'); + $notificationCategory = NotificationCategory::NOTIFICATION_CATEGORY_UNSPECIFIED; + + send_test_message_sample($formattedContactsElement, $formattedResource, $notificationCategory); +} +// [END essentialcontacts_v1_generated_EssentialContactsService_SendTestMessage_sync] diff --git a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/update_contact.php b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/update_contact.php new file mode 100644 index 000000000000..f4b58a3db84b --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/update_contact.php @@ -0,0 +1,57 @@ +updateContact($contact); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END essentialcontacts_v1_generated_EssentialContactsService_UpdateContact_sync] diff --git a/owl-bot-staging/EssentialContacts/v1/src/V1/EssentialContactsServiceClient.php b/owl-bot-staging/EssentialContacts/v1/src/V1/EssentialContactsServiceClient.php new file mode 100644 index 000000000000..16b3e4abe899 --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/src/V1/EssentialContactsServiceClient.php @@ -0,0 +1,34 @@ +projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $essentialContactsServiceClient->computeContacts($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $essentialContactsServiceClient->computeContacts($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $essentialContactsServiceClient->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. + */ +class EssentialContactsServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.essentialcontacts.v1.EssentialContactsService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'essentialcontacts.googleapis.com'; + + /** 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 $contactNameTemplate; + + private static $folderNameTemplate; + + private static $folderContactNameTemplate; + + private static $organizationNameTemplate; + + private static $organizationContactNameTemplate; + + private static $projectNameTemplate; + + private static $projectContactNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/essential_contacts_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/essential_contacts_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/essential_contacts_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/essential_contacts_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getContactNameTemplate() + { + if (self::$contactNameTemplate == null) { + self::$contactNameTemplate = new PathTemplate('projects/{project}/contacts/{contact}'); + } + + return self::$contactNameTemplate; + } + + private static function getFolderNameTemplate() + { + if (self::$folderNameTemplate == null) { + self::$folderNameTemplate = new PathTemplate('folders/{folder}'); + } + + return self::$folderNameTemplate; + } + + private static function getFolderContactNameTemplate() + { + if (self::$folderContactNameTemplate == null) { + self::$folderContactNameTemplate = new PathTemplate('folders/{folder}/contacts/{contact}'); + } + + return self::$folderContactNameTemplate; + } + + private static function getOrganizationNameTemplate() + { + if (self::$organizationNameTemplate == null) { + self::$organizationNameTemplate = new PathTemplate('organizations/{organization}'); + } + + return self::$organizationNameTemplate; + } + + private static function getOrganizationContactNameTemplate() + { + if (self::$organizationContactNameTemplate == null) { + self::$organizationContactNameTemplate = new PathTemplate('organizations/{organization}/contacts/{contact}'); + } + + return self::$organizationContactNameTemplate; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getProjectContactNameTemplate() + { + if (self::$projectContactNameTemplate == null) { + self::$projectContactNameTemplate = new PathTemplate('projects/{project}/contacts/{contact}'); + } + + return self::$projectContactNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'contact' => self::getContactNameTemplate(), + 'folder' => self::getFolderNameTemplate(), + 'folderContact' => self::getFolderContactNameTemplate(), + 'organization' => self::getOrganizationNameTemplate(), + 'organizationContact' => self::getOrganizationContactNameTemplate(), + 'project' => self::getProjectNameTemplate(), + 'projectContact' => self::getProjectContactNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a contact + * resource. + * + * @param string $project + * @param string $contact + * + * @return string The formatted contact resource. + */ + public static function contactName($project, $contact) + { + return self::getContactNameTemplate()->render([ + 'project' => $project, + 'contact' => $contact, + ]); + } + + /** + * 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_contact resource. + * + * @param string $folder + * @param string $contact + * + * @return string The formatted folder_contact resource. + */ + public static function folderContactName($folder, $contact) + { + return self::getFolderContactNameTemplate()->render([ + 'folder' => $folder, + 'contact' => $contact, + ]); + } + + /** + * 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_contact resource. + * + * @param string $organization + * @param string $contact + * + * @return string The formatted organization_contact resource. + */ + public static function organizationContactName($organization, $contact) + { + return self::getOrganizationContactNameTemplate()->render([ + 'organization' => $organization, + 'contact' => $contact, + ]); + } + + /** + * 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_contact resource. + * + * @param string $project + * @param string $contact + * + * @return string The formatted project_contact resource. + */ + public static function projectContactName($project, $contact) + { + return self::getProjectContactNameTemplate()->render([ + 'project' => $project, + 'contact' => $contact, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - contact: projects/{project}/contacts/{contact} + * - folder: folders/{folder} + * - folderContact: folders/{folder}/contacts/{contact} + * - organization: organizations/{organization} + * - organizationContact: organizations/{organization}/contacts/{contact} + * - project: projects/{project} + * - projectContact: projects/{project}/contacts/{contact} + * + * 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 'essentialcontacts.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); + } + + /** + * Lists all contacts for the resource that are subscribed to the + * specified notification categories, including contacts inherited from + * any parent resources. + * + * Sample code: + * ``` + * $essentialContactsServiceClient = new EssentialContactsServiceClient(); + * try { + * $formattedParent = $essentialContactsServiceClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $essentialContactsServiceClient->computeContacts($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $essentialContactsServiceClient->computeContacts($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $essentialContactsServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the resource to compute contacts for. + * Format: organizations/{organization_id}, + * folders/{folder_id} or projects/{project_id} + * @param array $optionalArgs { + * Optional. + * + * @type int[] $notificationCategories + * The categories of notifications to compute contacts for. If ALL is included + * in this list, contacts subscribed to any notification category will be + * returned. + * For allowed values, use constants defined on {@see \Google\Cloud\EssentialContacts\V1\NotificationCategory} + * @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 computeContacts($parent, array $optionalArgs = []) + { + $request = new ComputeContactsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['notificationCategories'])) { + $request->setNotificationCategories($optionalArgs['notificationCategories']); + } + + 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('ComputeContacts', $optionalArgs, ComputeContactsResponse::class, $request); + } + + /** + * Adds a new contact for a resource. + * + * Sample code: + * ``` + * $essentialContactsServiceClient = new EssentialContactsServiceClient(); + * try { + * $formattedParent = $essentialContactsServiceClient->projectName('[PROJECT]'); + * $contact = new Contact(); + * $response = $essentialContactsServiceClient->createContact($formattedParent, $contact); + * } finally { + * $essentialContactsServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource to save this contact for. + * Format: organizations/{organization_id}, folders/{folder_id} or + * projects/{project_id} + * @param Contact $contact Required. The contact to create. Must specify an email address and language + * tag. + * @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\EssentialContacts\V1\Contact + * + * @throws ApiException if the remote call fails + */ + public function createContact($parent, $contact, array $optionalArgs = []) + { + $request = new CreateContactRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setContact($contact); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateContact', Contact::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a contact. + * + * Sample code: + * ``` + * $essentialContactsServiceClient = new EssentialContactsServiceClient(); + * try { + * $formattedName = $essentialContactsServiceClient->contactName('[PROJECT]', '[CONTACT]'); + * $essentialContactsServiceClient->deleteContact($formattedName); + * } finally { + * $essentialContactsServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the contact to delete. + * Format: organizations/{organization_id}/contacts/{contact_id}, + * folders/{folder_id}/contacts/{contact_id} or + * projects/{project_id}/contacts/{contact_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 deleteContact($name, array $optionalArgs = []) + { + $request = new DeleteContactRequest(); + $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('DeleteContact', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a single contact. + * + * Sample code: + * ``` + * $essentialContactsServiceClient = new EssentialContactsServiceClient(); + * try { + * $formattedName = $essentialContactsServiceClient->contactName('[PROJECT]', '[CONTACT]'); + * $response = $essentialContactsServiceClient->getContact($formattedName); + * } finally { + * $essentialContactsServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the contact to retrieve. + * Format: organizations/{organization_id}/contacts/{contact_id}, + * folders/{folder_id}/contacts/{contact_id} or + * projects/{project_id}/contacts/{contact_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\EssentialContacts\V1\Contact + * + * @throws ApiException if the remote call fails + */ + public function getContact($name, array $optionalArgs = []) + { + $request = new GetContactRequest(); + $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('GetContact', Contact::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the contacts that have been set on a resource. + * + * Sample code: + * ``` + * $essentialContactsServiceClient = new EssentialContactsServiceClient(); + * try { + * $formattedParent = $essentialContactsServiceClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $essentialContactsServiceClient->listContacts($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $essentialContactsServiceClient->listContacts($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $essentialContactsServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name. + * Format: organizations/{organization_id}, folders/{folder_id} or + * projects/{project_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 RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listContacts($parent, array $optionalArgs = []) + { + $request = new ListContactsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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('ListContacts', $optionalArgs, ListContactsResponse::class, $request); + } + + /** + * Allows a contact admin to send a test message to contact to verify that it + * has been configured correctly. + * + * Sample code: + * ``` + * $essentialContactsServiceClient = new EssentialContactsServiceClient(); + * try { + * $formattedContacts = [ + * $essentialContactsServiceClient->contactName('[PROJECT]', '[CONTACT]'), + * ]; + * $formattedResource = $essentialContactsServiceClient->projectName('[PROJECT]'); + * $notificationCategory = NotificationCategory::NOTIFICATION_CATEGORY_UNSPECIFIED; + * $essentialContactsServiceClient->sendTestMessage($formattedContacts, $formattedResource, $notificationCategory); + * } finally { + * $essentialContactsServiceClient->close(); + * } + * ``` + * + * @param string[] $contacts Required. The list of names of the contacts to send a test message to. + * Format: organizations/{organization_id}/contacts/{contact_id}, + * folders/{folder_id}/contacts/{contact_id} or + * projects/{project_id}/contacts/{contact_id} + * @param string $resource Required. The name of the resource to send the test message for. All + * contacts must either be set directly on this resource or inherited from + * another resource that is an ancestor of this one. Format: + * organizations/{organization_id}, folders/{folder_id} or + * projects/{project_id} + * @param int $notificationCategory Required. The notification category to send the test message for. All + * contacts must be subscribed to this category. + * For allowed values, use constants defined on {@see \Google\Cloud\EssentialContacts\V1\NotificationCategory} + * @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 sendTestMessage($contacts, $resource, $notificationCategory, array $optionalArgs = []) + { + $request = new SendTestMessageRequest(); + $requestParamHeaders = []; + $request->setContacts($contacts); + $request->setResource($resource); + $request->setNotificationCategory($notificationCategory); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SendTestMessage', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a contact. + * Note: A contact's email address cannot be changed. + * + * Sample code: + * ``` + * $essentialContactsServiceClient = new EssentialContactsServiceClient(); + * try { + * $contact = new Contact(); + * $response = $essentialContactsServiceClient->updateContact($contact); + * } finally { + * $essentialContactsServiceClient->close(); + * } + * ``` + * + * @param Contact $contact Required. The contact resource to replace the existing saved contact. Note: + * the email address of the contact cannot be modified. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Optional. The update mask applied to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\EssentialContacts\V1\Contact + * + * @throws ApiException if the remote call fails + */ + public function updateContact($contact, array $optionalArgs = []) + { + $request = new UpdateContactRequest(); + $requestParamHeaders = []; + $request->setContact($contact); + $requestParamHeaders['contact.name'] = $contact->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('UpdateContact', Contact::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/EssentialContacts/v1/src/V1/gapic_metadata.json b/owl-bot-staging/EssentialContacts/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..2a955b8f76f0 --- /dev/null +++ b/owl-bot-staging/EssentialContacts/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.essentialcontacts.v1", + "libraryPackage": "Google\\Cloud\\EssentialContacts\\V1", + "services": { + "EssentialContactsService": { + "clients": { + "grpc": { + "libraryClient": "EssentialContactsServiceGapicClient", + "rpcs": { + "ComputeContacts": { + "methods": [ + "computeContacts" + ] + }, + "CreateContact": { + "methods": [ + "createContact" + ] + }, + "DeleteContact": { + "methods": [ + "deleteContact" + ] + }, + "GetContact": { + "methods": [ + "getContact" + ] + }, + "ListContacts": { + "methods": [ + "listContacts" + ] + }, + "SendTestMessage": { + "methods": [ + "sendTestMessage" + ] + }, + "UpdateContact": { + "methods": [ + "updateContact" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_client_config.json b/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_client_config.json new file mode 100644 index 000000000000..304dacd21d0f --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_client_config.json @@ -0,0 +1,79 @@ +{ + "interfaces": { + "google.cloud.essentialcontacts.v1.EssentialContactsService": { + "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": { + "ComputeContacts": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateContact": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteContact": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetContact": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListContacts": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SendTestMessage": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateContact": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_descriptor_config.php b/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_descriptor_config.php new file mode 100644 index 000000000000..0ea01e876bbf --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_descriptor_config.php @@ -0,0 +1,28 @@ + [ + 'google.cloud.essentialcontacts.v1.EssentialContactsService' => [ + 'ComputeContacts' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getContacts', + ], + ], + 'ListContacts' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getContacts', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_rest_client_config.php b/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_rest_client_config.php new file mode 100644 index 000000000000..04bf88c1516f --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_rest_client_config.php @@ -0,0 +1,166 @@ + [ + 'google.cloud.essentialcontacts.v1.EssentialContactsService' => [ + 'ComputeContacts' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/contacts:compute', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*}/contacts:compute', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*}/contacts:compute', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateContact' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/contacts', + 'body' => 'contact', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=folders/*}/contacts', + 'body' => 'contact', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*}/contacts', + 'body' => 'contact', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteContact' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/contacts/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=folders/*/contacts/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/contacts/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetContact' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/contacts/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/contacts/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/contacts/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListContacts' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/contacts', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*}/contacts', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*}/contacts', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SendTestMessage' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*}/contacts:sendTestMessage', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=folders/*}/contacts:sendTestMessage', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*}/contacts:sendTestMessage', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateContact' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{contact.name=projects/*/contacts/*}', + 'body' => 'contact', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{contact.name=folders/*/contacts/*}', + 'body' => 'contact', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{contact.name=organizations/*/contacts/*}', + 'body' => 'contact', + ], + ], + 'placeholders' => [ + 'contact.name' => [ + 'getters' => [ + 'getContact', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/EssentialContacts/v1/tests/Unit/V1/EssentialContactsServiceClientTest.php b/owl-bot-staging/EssentialContacts/v1/tests/Unit/V1/EssentialContactsServiceClientTest.php new file mode 100644 index 000000000000..a21e0e6a56ba --- /dev/null +++ b/owl-bot-staging/EssentialContacts/v1/tests/Unit/V1/EssentialContactsServiceClientTest.php @@ -0,0 +1,523 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return EssentialContactsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new EssentialContactsServiceClient($options); + } + + /** @test */ + public function computeContactsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $contactsElement = new Contact(); + $contacts = [ + $contactsElement, + ]; + $expectedResponse = new ComputeContactsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setContacts($contacts); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->computeContacts($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getContacts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.essentialcontacts.v1.EssentialContactsService/ComputeContacts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function computeContactsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->computeContacts($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 createContactTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $email = 'email96619420'; + $languageTag = 'languageTag-2091510221'; + $expectedResponse = new Contact(); + $expectedResponse->setName($name); + $expectedResponse->setEmail($email); + $expectedResponse->setLanguageTag($languageTag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $contact = new Contact(); + $response = $gapicClient->createContact($formattedParent, $contact); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.essentialcontacts.v1.EssentialContactsService/CreateContact', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getContact(); + $this->assertProtobufEquals($contact, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createContactExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $contact = new Contact(); + try { + $gapicClient->createContact($formattedParent, $contact); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteContactTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->contactName('[PROJECT]', '[CONTACT]'); + $gapicClient->deleteContact($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.essentialcontacts.v1.EssentialContactsService/DeleteContact', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteContactExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->contactName('[PROJECT]', '[CONTACT]'); + try { + $gapicClient->deleteContact($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 getContactTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $email = 'email96619420'; + $languageTag = 'languageTag-2091510221'; + $expectedResponse = new Contact(); + $expectedResponse->setName($name2); + $expectedResponse->setEmail($email); + $expectedResponse->setLanguageTag($languageTag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->contactName('[PROJECT]', '[CONTACT]'); + $response = $gapicClient->getContact($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.essentialcontacts.v1.EssentialContactsService/GetContact', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getContactExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->contactName('[PROJECT]', '[CONTACT]'); + try { + $gapicClient->getContact($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 listContactsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $contactsElement = new Contact(); + $contacts = [ + $contactsElement, + ]; + $expectedResponse = new ListContactsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setContacts($contacts); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listContacts($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getContacts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.essentialcontacts.v1.EssentialContactsService/ListContacts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listContactsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listContacts($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 sendTestMessageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedContacts = [ + $gapicClient->contactName('[PROJECT]', '[CONTACT]'), + ]; + $formattedResource = $gapicClient->projectName('[PROJECT]'); + $notificationCategory = NotificationCategory::NOTIFICATION_CATEGORY_UNSPECIFIED; + $gapicClient->sendTestMessage($formattedContacts, $formattedResource, $notificationCategory); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.essentialcontacts.v1.EssentialContactsService/SendTestMessage', $actualFuncCall); + $actualValue = $actualRequestObject->getContacts(); + $this->assertProtobufEquals($formattedContacts, $actualValue); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($formattedResource, $actualValue); + $actualValue = $actualRequestObject->getNotificationCategory(); + $this->assertProtobufEquals($notificationCategory, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function sendTestMessageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedContacts = [ + $gapicClient->contactName('[PROJECT]', '[CONTACT]'), + ]; + $formattedResource = $gapicClient->projectName('[PROJECT]'); + $notificationCategory = NotificationCategory::NOTIFICATION_CATEGORY_UNSPECIFIED; + try { + $gapicClient->sendTestMessage($formattedContacts, $formattedResource, $notificationCategory); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateContactTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $email = 'email96619420'; + $languageTag = 'languageTag-2091510221'; + $expectedResponse = new Contact(); + $expectedResponse->setName($name); + $expectedResponse->setEmail($email); + $expectedResponse->setLanguageTag($languageTag); + $transport->addResponse($expectedResponse); + // Mock request + $contact = new Contact(); + $response = $gapicClient->updateContact($contact); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.essentialcontacts.v1.EssentialContactsService/UpdateContact', $actualFuncCall); + $actualValue = $actualRequestObject->getContact(); + $this->assertProtobufEquals($contact, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateContactExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $contact = new Contact(); + try { + $gapicClient->updateContact($contact); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->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/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Channel.php b/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Channel.php new file mode 100644 index 0000000000000000000000000000000000000000..be4bf21242dab06d5673abb70ecdc7aab649e3b3 GIT binary patch literal 1619 zcma)6-EPw`7^NLsH+Ogl-%#T=yAW;Wb83X#aQX#sEm0h4nmFv2lS!PF$Q)!^y z@HkxZ3|#RPT=NKA;W$o;v>~lGb?onaKgY-C#jEf*1P@?`Fd~p7V>mj4@|eI-aLF+b z;3%FTsv*oPrkGw;EypMFAv zqQLJmNd!ZI-y#tfG?ZNQRjB7piOk7McBb{c%^L*uBz*aq^{yrtaxIvE5jB??5i>Ve#{s(JlY74KJ>!X?*&U z8q(_Han8}cQc*RZDw%N$d@X@Tmy?fWr*V#!nUl%PnbkILnhYqUt}v6On%lfR zZMrgRKMlD5{VFIKfms{iY9dj)01MT%#?r5P(W-!@n2zmYwzFhC2W2dXdN9KzmA$M^ z$~&8mX)dedF zyV>3Ewp*1eRvDD~?Ovr@IB04w$8pnKG=6s>iz+U=RIB`^A255e7B0V(y1a;aTd zo}%s(!7_5cnAO}3IM(B-y=*zpTuSX3znVW@HLGZ+WLAwbSd#*=DC9ymeiXoMHQImq zZLAxD`-zM63m;z_eN1_P*wo=->P`t$eM#;v`af@>yV;cAigrgErK63~$&AuDs{PE4 zd}E>u7gaX;yLc-FdY(plUIz8NquOXi_wZ~hf0s{EZ~Di|5=~KjfsN_N)NJNp4!~cJ CbqS^b literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/ChannelConnection.php b/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/ChannelConnection.php new file mode 100644 index 000000000000..2e0cac216c50 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/ChannelConnection.php @@ -0,0 +1,39 @@ +internalAddGeneratedFile( + ' +Œ +1google/cloud/eventarc/v1/channel_connection.protogoogle.cloud.eventarc.v1google/api/resource.protogoogle/protobuf/timestamp.proto"§ +ChannelConnection +name ( BàA +uid ( BàA8 +channel ( B\'àAúA! +eventarc.googleapis.com/Channel4 + create_time ( 2.google.protobuf.TimestampBàA4 + update_time ( 2.google.protobuf.TimestampBàA +activation_token ( BàA:§êA£ +)eventarc.googleapis.com/ChannelConnectionOprojects/{project}/locations/{location}/channelConnections/{channel_connection}*channelConnections2channelConnectionBÎ +com.google.cloud.eventarc.v1BChannelConnectionProtoPZ@google.golang.org/genproto/googleapis/cloud/eventarc/v1;eventarcªGoogle.Cloud.Eventarc.V1ÊGoogle\\Cloud\\Eventarc\\V1êGoogle::Cloud::Eventarc::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Discovery.php b/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Discovery.php new file mode 100644 index 000000000000..e15c6352f9bf --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Discovery.php @@ -0,0 +1,44 @@ +internalAddGeneratedFile( + ' +ÿ +(google/cloud/eventarc/v1/discovery.protogoogle.cloud.eventarc.v1google/api/resource.proto"ñ +Provider +name ( BàA + display_name ( BàA= + event_types ( 2#.google.cloud.eventarc.v1.EventTypeBàA:xêAu + eventarc.googleapis.com/ProviderinternalAddGeneratedFile( + ' +¸< +\'google/cloud/eventarc/v1/eventarc.protogoogle.cloud.eventarc.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/eventarc/v1/channel.proto1google/cloud/eventarc/v1/channel_connection.proto(google/cloud/eventarc/v1/discovery.proto4google/cloud/eventarc/v1/google_channel_config.proto&google/cloud/eventarc/v1/trigger.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"J +GetTriggerRequest5 +name ( B\'àAúA! +eventarc.googleapis.com/Trigger"— +ListTriggersRequest7 +parent ( B\'àAúA!eventarc.googleapis.com/Trigger + page_size ( + +page_token (  +order_by (  +filter ( "y +ListTriggersResponse3 +triggers ( 2!.google.cloud.eventarc.v1.Trigger +next_page_token (  + unreachable ( "½ +CreateTriggerRequest7 +parent ( B\'àAúA!eventarc.googleapis.com/Trigger7 +trigger ( 2!.google.cloud.eventarc.v1.TriggerBàA + +trigger_id ( BàA + validate_only (BàA"® +UpdateTriggerRequest2 +trigger ( 2!.google.cloud.eventarc.v1.Trigger/ + update_mask ( 2.google.protobuf.FieldMask + allow_missing ( + validate_only (BàA"Ž +DeleteTriggerRequest5 +name ( B\'àAúA! +eventarc.googleapis.com/Trigger +etag (  + allow_missing ( + validate_only (BàA"J +GetChannelRequest5 +name ( B\'àAúA! +eventarc.googleapis.com/Channel"‡ +ListChannelsRequest7 +parent ( B\'àAúA!eventarc.googleapis.com/Channel + page_size ( + +page_token (  +order_by ( "y +ListChannelsResponse3 +channels ( 2!.google.cloud.eventarc.v1.Channel +next_page_token (  + unreachable ( "½ +CreateChannelRequest7 +parent ( B\'àAúA!eventarc.googleapis.com/Channel7 +channel ( 2!.google.cloud.eventarc.v1.ChannelBàA + +channel_id ( BàA + validate_only (BàA"— +UpdateChannelRequest2 +channel ( 2!.google.cloud.eventarc.v1.Channel/ + update_mask ( 2.google.protobuf.FieldMask + validate_only (BàA"i +DeleteChannelRequest5 +name ( B\'àAúA! +eventarc.googleapis.com/Channel + validate_only (BàA"L +GetProviderRequest6 +name ( B(àAúA" + eventarc.googleapis.com/Provider"™ +ListProvidersRequest8 +parent ( B(àAúA" eventarc.googleapis.com/Provider + page_size ( + +page_token (  +order_by (  +filter ( "| +ListProvidersResponse5 + providers ( 2".google.cloud.eventarc.v1.Provider +next_page_token (  + unreachable ( "^ +GetChannelConnectionRequest? +name ( B1àAúA+ +)eventarc.googleapis.com/ChannelConnection"‰ +ListChannelConnectionsRequestA +parent ( B1àAúA+)eventarc.googleapis.com/ChannelConnection + page_size ( + +page_token ( "˜ +ListChannelConnectionsResponseH +channel_connections ( 2+.google.cloud.eventarc.v1.ChannelConnection +next_page_token (  + unreachable ( "Õ +CreateChannelConnectionRequestA +parent ( B1àAúA+)eventarc.googleapis.com/ChannelConnectionL +channel_connection ( 2+.google.cloud.eventarc.v1.ChannelConnectionBàA" +channel_connection_id ( BàA"a +DeleteChannelConnectionRequest? +name ( B1àAúA+ +)eventarc.googleapis.com/ChannelConnection"¦ + UpdateGoogleChannelConfigRequestQ +google_channel_config ( 2-.google.cloud.eventarc.v1.GoogleChannelConfigBàA/ + update_mask ( 2.google.protobuf.FieldMask"b +GetGoogleChannelConfigRequestA +name ( B3àAúA- ++eventarc.googleapis.com/GoogleChannelConfig"€ +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Ï +Eventarc™ + +GetTrigger+.google.cloud.eventarc.v1.GetTriggerRequest!.google.cloud.eventarc.v1.Trigger";‚Óä“.,/v1/{name=projects/*/locations/*/triggers/*}ÚAname¬ + ListTriggers-.google.cloud.eventarc.v1.ListTriggersRequest..google.cloud.eventarc.v1.ListTriggersResponse"=‚Óä“.,/v1/{parent=projects/*/locations/*}/triggersÚAparentØ + CreateTrigger..google.cloud.eventarc.v1.CreateTriggerRequest.google.longrunning.Operation"x‚Óä“7",/v1/{parent=projects/*/locations/*}/triggers:triggerÚAparent,trigger,trigger_idÊA +TriggerOperationMetadataé + UpdateTrigger..google.cloud.eventarc.v1.UpdateTriggerRequest.google.longrunning.Operation"ˆ‚Óä“?24/v1/{trigger.name=projects/*/locations/*/triggers/*}:triggerÚA!trigger,update_mask,allow_missingÊA +TriggerOperationMetadataÈ + DeleteTrigger..google.cloud.eventarc.v1.DeleteTriggerRequest.google.longrunning.Operation"h‚Óä“.*,/v1/{name=projects/*/locations/*/triggers/*}ÚAname,allow_missingÊA +TriggerOperationMetadata™ + +GetChannel+.google.cloud.eventarc.v1.GetChannelRequest!.google.cloud.eventarc.v1.Channel";‚Óä“.,/v1/{name=projects/*/locations/*/channels/*}ÚAname¬ + ListChannels-.google.cloud.eventarc.v1.ListChannelsRequest..google.cloud.eventarc.v1.ListChannelsResponse"=‚Óä“.,/v1/{parent=projects/*/locations/*}/channelsÚAparentØ + CreateChannel..google.cloud.eventarc.v1.CreateChannelRequest.google.longrunning.Operation"x‚Óä“7",/v1/{parent=projects/*/locations/*}/channels:channelÚAparent,channel,channel_idÊA +ChannelOperationMetadataÚ + UpdateChannel..google.cloud.eventarc.v1.UpdateChannelRequest.google.longrunning.Operation"z‚Óä“?24/v1/{channel.name=projects/*/locations/*/channels/*}:channelÚAchannel,update_maskÊA +ChannelOperationMetadataº + DeleteChannel..google.cloud.eventarc.v1.DeleteChannelRequest.google.longrunning.Operation"Z‚Óä“.*,/v1/{name=projects/*/locations/*/channels/*}ÚAnameÊA +ChannelOperationMetadata + GetProvider,.google.cloud.eventarc.v1.GetProviderRequest".google.cloud.eventarc.v1.Provider"<‚Óä“/-/v1/{name=projects/*/locations/*/providers/*}ÚAname° + ListProviders..google.cloud.eventarc.v1.ListProvidersRequest/.google.cloud.eventarc.v1.ListProvidersResponse">‚Óä“/-/v1/{parent=projects/*/locations/*}/providersÚAparentÁ +GetChannelConnection5.google.cloud.eventarc.v1.GetChannelConnectionRequest+.google.cloud.eventarc.v1.ChannelConnection"E‚Óä“86/v1/{name=projects/*/locations/*/channelConnections/*}ÚAnameÔ +ListChannelConnections7.google.cloud.eventarc.v1.ListChannelConnectionsRequest8.google.cloud.eventarc.v1.ListChannelConnectionsResponse"G‚Óä“86/v1/{parent=projects/*/locations/*}/channelConnectionsÚAparent¢ +CreateChannelConnection8.google.cloud.eventarc.v1.CreateChannelConnectionRequest.google.longrunning.Operation"­‚Óä“L"6/v1/{parent=projects/*/locations/*}/channelConnections:channel_connectionÚA/parent,channel_connection,channel_connection_idÊA& +ChannelConnectionOperationMetadataâ +DeleteChannelConnection8.google.cloud.eventarc.v1.DeleteChannelConnectionRequest.google.longrunning.Operation"n‚Óä“8*6/v1/{name=projects/*/locations/*/channelConnections/*}ÚAnameÊA& +ChannelConnectionOperationMetadataÆ +GetGoogleChannelConfig7.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest-.google.cloud.eventarc.v1.GoogleChannelConfig"D‚Óä“75/v1/{name=projects/*/locations/*/googleChannelConfig}ÚAname— +UpdateGoogleChannelConfig:.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest-.google.cloud.eventarc.v1.GoogleChannelConfig"Ž‚Óä“d2K/v1/{google_channel_config.name=projects/*/locations/*/googleChannelConfig}:google_channel_configÚA!google_channel_config,update_maskKÊAeventarc.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÅ +com.google.cloud.eventarc.v1B EventarcProtoPZ@google.golang.org/genproto/googleapis/cloud/eventarc/v1;eventarcªGoogle.Cloud.Eventarc.V1ÊGoogle\\Cloud\\Eventarc\\V1êGoogle::Cloud::Eventarc::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php b/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php new file mode 100644 index 000000000000..c726792ee586 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + ' +Œ +4google/cloud/eventarc/v1/google_channel_config.protogoogle.cloud.eventarc.v1google/api/resource.protogoogle/protobuf/timestamp.proto"§ +GoogleChannelConfig +name ( BàA4 + update_time ( 2.google.protobuf.TimestampBàAB +crypto_key_name ( B)àAúA# +!cloudkms.googleapis.com/CryptoKey:‚êA ++eventarc.googleapis.com/GoogleChannelConfig;projects/{project}/locations/{location}/googleChannelConfig2googleChannelConfigBË +com.google.cloud.eventarc.v1BGoogleChannelConfigProtoPZ@google.golang.org/genproto/googleapis/cloud/eventarc/v1;eventarcªGoogle.Cloud.Eventarc.V1ÊGoogle\\Cloud\\Eventarc\\V1êGoogle::Cloud::Eventarc::V1êAx +!cloudkms.googleapis.com/CryptoKeySprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Trigger.php b/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Trigger.php new file mode 100644 index 0000000000000000000000000000000000000000..07272a124c34531f8c7e5fc44e9b164e06194e09 GIT binary patch literal 3016 zcmb7GZEq7t5XLq*$v7l%E!7dxvKR`15?^DGs2nIgCm}#zVnNiZt)*yvUSF=c+@ALK zg3`!;puehL`ycv&&-n>_>fGM$*$@nFWGSn=nP+C6duC=IK92WdxK6fM!~~VBPkKj0 z?lBSzF1g1;(n|*eCWyxm;vi(ALCD57`DuHHY;HW;xrVL@Pld-?#OK@(nd5~#?K|v{ zMUo27Ib3z52z(zs6(m4J4_FdYkCClT`$r~epGw-@Qr_M5%)7g(y}LiJt^s%o9)rVfQwdZRMiM%lIshmzunYc z1syv9end$R;^`y4h`sJQ@3Z%NDB@SX4K&SezhAKW1a-Gu@Q|@`3;wwXH>VSvW#@Jc zCCr8qX5(;m>9R(kao`BeMXu7NtNNAFEPj7Snu4{#C2b&L&+)LT{Bix?D$Ho5S{LDL zrgghSO3QQY%4@f5U4Tj&^zE{FQnBts%@YheZ#RozpTjq`=2AoFY{EARzB3%;IUomc|47z zJ*Voq{n{^u<49(PUITQ zNkO9|=0e&v<$ir~89T-_b1q>8)sXgBnAr1*fRzt<=CkVuWxp9oag<|x3NzjwjUpD> z=T-Fz`8iH29`$h&@hGtu75eJO(bo%~B0?pT4-QA)_6&SwX$5LyiC8tL?6ad>U)Fgz zcSysO<>G3UzbP&K4vX&~zwPp1+@;oBo}B1QoU^RJ%D`L6i5tV!qMdTV7T??SKnoT8 z2lHg&9P8823Av{}J3ceVp;;36Os|XKomqWKnlt)T??7!#lGbN1M)0YHR}fDbc?NL8}CILJw0PRhlSkH>?l1bzJBAbz*p*(d6Q_sf^Y@% zMDI4lx(gM5pQ%b~&Ce%?-}-(Nty?hrii`b0$Y0rK6*)ImC!2?-!u_JHpPp&Y17I)f zomk(7xuV;wCRA}zCuvX9KqlwWQFaKo0P|`I9I$>s#ZlddSwoR^4`%e}$wl9;<3M`j zUV$Z~`dvo!$jSOBrgCpIbW7GJP!-J2CQqS+ay@|xl3`_y9i|CRJRL&~Zd8xa>IkTu z39z`%jA3OUCefTu1!6MEhP+Z`sr~?}dF2*rR`NLTMo~-FWtd0ua&EJ1M|-3FcLlEC zV4X;4dwwUsFmgoogle.cloud.eventarc.v1.Channel + */ +class Channel extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the channel. Must be unique within the + * location on the project and must be in + * `projects/{project}/locations/{location}/channels/{channel_id}` format. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. Server assigned unique identifier for the channel. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The name of the event provider (e.g. Eventarc SaaS partner) associated + * with the channel. This provider will be granted permissions to publish + * events to the channel. Format: + * `projects/{project}/locations/{location}/providers/{provider_id}`. + * + * Generated from protobuf field string provider = 7; + */ + protected $provider = ''; + /** + * Output only. The state of a Channel. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Channel.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The activation token for the channel. The token must be used + * by the provider to register the channel for publishing. + * + * Generated from protobuf field string activation_token = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $activation_token = ''; + /** + * Optional. Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt their event data. + * It must match the pattern + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string crypto_key_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $crypto_key_name = ''; + protected $transport; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the channel. Must be unique within the + * location on the project and must be in + * `projects/{project}/locations/{location}/channels/{channel_id}` format. + * @type string $uid + * Output only. Server assigned unique identifier for the channel. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type string $provider + * The name of the event provider (e.g. Eventarc SaaS partner) associated + * with the channel. This provider will be granted permissions to publish + * events to the channel. Format: + * `projects/{project}/locations/{location}/providers/{provider_id}`. + * @type string $pubsub_topic + * Output only. The name of the Pub/Sub topic created and managed by + * Eventarc system as a transport for the event delivery. Format: + * `projects/{project}/topics/{topic_id}`. + * @type int $state + * Output only. The state of a Channel. + * @type string $activation_token + * Output only. The activation token for the channel. The token must be used + * by the provider to register the channel for publishing. + * @type string $crypto_key_name + * Optional. Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt their event data. + * It must match the pattern + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Channel::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the channel. Must be unique within the + * location on the project and must be in + * `projects/{project}/locations/{location}/channels/{channel_id}` format. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the channel. Must be unique within the + * location on the project and must be in + * `projects/{project}/locations/{location}/channels/{channel_id}` format. + * + * 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 assigned unique identifier for the channel. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server assigned unique identifier for the channel. The value + * is a UUID4 string and guaranteed to remain unchanged until the resource is + * deleted. + * + * Generated from protobuf field string uid = 2 [(.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 creation time. + * + * 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. The creation time. + * + * 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. The last-modified time. + * + * 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. The last-modified time. + * + * 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; + } + + /** + * The name of the event provider (e.g. Eventarc SaaS partner) associated + * with the channel. This provider will be granted permissions to publish + * events to the channel. Format: + * `projects/{project}/locations/{location}/providers/{provider_id}`. + * + * Generated from protobuf field string provider = 7; + * @return string + */ + public function getProvider() + { + return $this->provider; + } + + /** + * The name of the event provider (e.g. Eventarc SaaS partner) associated + * with the channel. This provider will be granted permissions to publish + * events to the channel. Format: + * `projects/{project}/locations/{location}/providers/{provider_id}`. + * + * Generated from protobuf field string provider = 7; + * @param string $var + * @return $this + */ + public function setProvider($var) + { + GPBUtil::checkString($var, True); + $this->provider = $var; + + return $this; + } + + /** + * Output only. The name of the Pub/Sub topic created and managed by + * Eventarc system as a transport for the event delivery. Format: + * `projects/{project}/topics/{topic_id}`. + * + * Generated from protobuf field string pubsub_topic = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPubsubTopic() + { + return $this->readOneof(8); + } + + public function hasPubsubTopic() + { + return $this->hasOneof(8); + } + + /** + * Output only. The name of the Pub/Sub topic created and managed by + * Eventarc system as a transport for the event delivery. Format: + * `projects/{project}/topics/{topic_id}`. + * + * Generated from protobuf field string pubsub_topic = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPubsubTopic($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Output only. The state of a Channel. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Channel.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of a Channel. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Channel.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Eventarc\V1\Channel\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The activation token for the channel. The token must be used + * by the provider to register the channel for publishing. + * + * Generated from protobuf field string activation_token = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getActivationToken() + { + return $this->activation_token; + } + + /** + * Output only. The activation token for the channel. The token must be used + * by the provider to register the channel for publishing. + * + * Generated from protobuf field string activation_token = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setActivationToken($var) + { + GPBUtil::checkString($var, True); + $this->activation_token = $var; + + return $this; + } + + /** + * Optional. Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt their event data. + * It must match the pattern + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string crypto_key_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getCryptoKeyName() + { + return $this->crypto_key_name; + } + + /** + * Optional. Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt their event data. + * It must match the pattern + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string crypto_key_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCryptoKeyName($var) + { + GPBUtil::checkString($var, True); + $this->crypto_key_name = $var; + + return $this; + } + + /** + * @return string + */ + public function getTransport() + { + return $this->whichOneof("transport"); + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel/State.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel/State.php new file mode 100644 index 000000000000..f20e5c4d3786 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel/State.php @@ -0,0 +1,82 @@ +google.cloud.eventarc.v1.Channel.State + */ +class State +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The PENDING state indicates that a Channel has been created successfully + * and there is a new activation token available for the subscriber to use + * to convey the Channel to the provider in order to create a Connection. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The ACTIVE state indicates that a Channel has been successfully + * connected with the event provider. + * An ACTIVE Channel is ready to receive and route events from the + * event provider. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The INACTIVE state indicates that the Channel cannot receive events + * permanently. There are two possible cases this state can happen: + * 1. The SaaS provider disconnected from this Channel. + * 2. The Channel activation token has expired but the SaaS provider + * wasn't connected. + * To re-establish a Connection with a provider, the subscriber + * should create a new Channel and give it to the provider. + * + * Generated from protobuf enum INACTIVE = 3; + */ + const INACTIVE = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::ACTIVE => 'ACTIVE', + self::INACTIVE => 'INACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Eventarc\V1\Channel_State::class); + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ChannelConnection.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ChannelConnection.php new file mode 100644 index 000000000000..1478f29772d9 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ChannelConnection.php @@ -0,0 +1,284 @@ +google.cloud.eventarc.v1.ChannelConnection + */ +class ChannelConnection extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the connection. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. Server assigned ID of the resource. + * The server guarantees uniqueness and immutability until deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Required. The name of the connected subscriber Channel. + * This is a weak reference to avoid cross project and cross accounts + * references. This must be in + * `projects/{project}/location/{location}/channels/{channel_id}` format. + * + * Generated from protobuf field string channel = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $channel = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Input only. Activation token for the channel. The token will be used + * during the creation of ChannelConnection to bind the channel with the + * provider project. This field will not be stored in the provider resource. + * + * Generated from protobuf field string activation_token = 8 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $activation_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the connection. + * @type string $uid + * Output only. Server assigned ID of the resource. + * The server guarantees uniqueness and immutability until deleted. + * @type string $channel + * Required. The name of the connected subscriber Channel. + * This is a weak reference to avoid cross project and cross accounts + * references. This must be in + * `projects/{project}/location/{location}/channels/{channel_id}` format. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type string $activation_token + * Input only. Activation token for the channel. The token will be used + * during the creation of ChannelConnection to bind the channel with the + * provider project. This field will not be stored in the provider resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\ChannelConnection::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the connection. + * + * 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 connection. + * + * 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 assigned ID of the resource. + * The server guarantees uniqueness and immutability until deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server assigned ID of the resource. + * The server guarantees uniqueness and immutability until deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Required. The name of the connected subscriber Channel. + * This is a weak reference to avoid cross project and cross accounts + * references. This must be in + * `projects/{project}/location/{location}/channels/{channel_id}` format. + * + * Generated from protobuf field string channel = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Required. The name of the connected subscriber Channel. + * This is a weak reference to avoid cross project and cross accounts + * references. This must be in + * `projects/{project}/location/{location}/channels/{channel_id}` format. + * + * Generated from protobuf field string channel = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + + /** + * Output only. The creation time. + * + * 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 creation time. + * + * 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; + } + + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.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-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.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; + } + + /** + * Input only. Activation token for the channel. The token will be used + * during the creation of ChannelConnection to bind the channel with the + * provider project. This field will not be stored in the provider resource. + * + * Generated from protobuf field string activation_token = 8 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getActivationToken() + { + return $this->activation_token; + } + + /** + * Input only. Activation token for the channel. The token will be used + * during the creation of ChannelConnection to bind the channel with the + * provider project. This field will not be stored in the provider resource. + * + * Generated from protobuf field string activation_token = 8 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setActivationToken($var) + { + GPBUtil::checkString($var, True); + $this->activation_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel_State.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel_State.php new file mode 100644 index 000000000000..f91006931d59 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel_State.php @@ -0,0 +1,16 @@ +google.cloud.eventarc.v1.CloudRun + */ +class CloudRun extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Cloud Run service being addressed. See + * https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. + * Only services located in the same project as the trigger object + * can be addressed. + * + * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $service = ''; + /** + * Optional. The relative path on the Cloud Run service the events should be sent to. + * The value must conform to the definition of a URI path segment (section 3.3 + * of RFC2396). Examples: "/route", "route", "route/subroute". + * + * Generated from protobuf field string path = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $path = ''; + /** + * Required. The region the Cloud Run service is deployed in. + * + * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $region = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * Required. The name of the Cloud Run service being addressed. See + * https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. + * Only services located in the same project as the trigger object + * can be addressed. + * @type string $path + * Optional. The relative path on the Cloud Run service the events should be sent to. + * The value must conform to the definition of a URI path segment (section 3.3 + * of RFC2396). Examples: "/route", "route", "route/subroute". + * @type string $region + * Required. The region the Cloud Run service is deployed in. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Cloud Run service being addressed. See + * https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. + * Only services located in the same project as the trigger object + * can be addressed. + * + * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Required. The name of the Cloud Run service being addressed. See + * https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. + * Only services located in the same project as the trigger object + * can be addressed. + * + * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * Optional. The relative path on the Cloud Run service the events should be sent to. + * The value must conform to the definition of a URI path segment (section 3.3 + * of RFC2396). Examples: "/route", "route", "route/subroute". + * + * Generated from protobuf field string path = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Optional. The relative path on the Cloud Run service the events should be sent to. + * The value must conform to the definition of a URI path segment (section 3.3 + * of RFC2396). Examples: "/route", "route", "route/subroute". + * + * Generated from protobuf field string path = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Required. The region the Cloud Run service is deployed in. + * + * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Required. The region the Cloud Run service is deployed in. + * + * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelConnectionRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelConnectionRequest.php new file mode 100644 index 000000000000..7935f51e19a7 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelConnectionRequest.php @@ -0,0 +1,145 @@ +google.cloud.eventarc.v1.CreateChannelConnectionRequest + */ +class CreateChannelConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent collection in which to add this channel connection. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Channel connection to create. + * + * Generated from protobuf field .google.cloud.eventarc.v1.ChannelConnection channel_connection = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $channel_connection = null; + /** + * Required. The user-provided ID to be assigned to the channel connection. + * + * Generated from protobuf field string channel_connection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $channel_connection_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent collection in which to add this channel connection. + * @type \Google\Cloud\Eventarc\V1\ChannelConnection $channel_connection + * Required. Channel connection to create. + * @type string $channel_connection_id + * Required. The user-provided ID to be assigned to the channel connection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent collection in which to add this channel connection. + * + * Generated 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 collection in which to add this channel connection. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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. Channel connection to create. + * + * Generated from protobuf field .google.cloud.eventarc.v1.ChannelConnection channel_connection = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Eventarc\V1\ChannelConnection|null + */ + public function getChannelConnection() + { + return $this->channel_connection; + } + + public function hasChannelConnection() + { + return isset($this->channel_connection); + } + + public function clearChannelConnection() + { + unset($this->channel_connection); + } + + /** + * Required. Channel connection to create. + * + * Generated from protobuf field .google.cloud.eventarc.v1.ChannelConnection channel_connection = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Eventarc\V1\ChannelConnection $var + * @return $this + */ + public function setChannelConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\ChannelConnection::class); + $this->channel_connection = $var; + + return $this; + } + + /** + * Required. The user-provided ID to be assigned to the channel connection. + * + * Generated from protobuf field string channel_connection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getChannelConnectionId() + { + return $this->channel_connection_id; + } + + /** + * Required. The user-provided ID to be assigned to the channel connection. + * + * Generated from protobuf field string channel_connection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setChannelConnectionId($var) + { + GPBUtil::checkString($var, True); + $this->channel_connection_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelRequest.php new file mode 100644 index 000000000000..751a74b4f102 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelRequest.php @@ -0,0 +1,183 @@ +google.cloud.eventarc.v1.CreateChannelRequest + */ +class CreateChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent collection in which to add this channel. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The channel to create. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $channel = null; + /** + * Required. The user-provided ID to be assigned to the channel. + * + * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $channel_id = ''; + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent collection in which to add this channel. + * @type \Google\Cloud\Eventarc\V1\Channel $channel + * Required. The channel to create. + * @type string $channel_id + * Required. The user-provided ID to be assigned to the channel. + * @type bool $validate_only + * Required. If set, validate the request and preview the review, but do not + * post it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent collection in which to add this channel. + * + * Generated 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 collection in which to add this channel. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 channel to create. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Eventarc\V1\Channel|null + */ + public function getChannel() + { + return $this->channel; + } + + public function hasChannel() + { + return isset($this->channel); + } + + public function clearChannel() + { + unset($this->channel); + } + + /** + * Required. The channel to create. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Eventarc\V1\Channel $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Channel::class); + $this->channel = $var; + + return $this; + } + + /** + * Required. The user-provided ID to be assigned to the channel. + * + * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getChannelId() + { + return $this->channel_id; + } + + /** + * Required. The user-provided ID to be assigned to the channel. + * + * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setChannelId($var) + { + GPBUtil::checkString($var, True); + $this->channel_id = $var; + + return $this; + } + + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateTriggerRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateTriggerRequest.php new file mode 100644 index 000000000000..f7e0fb54cf2b --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateTriggerRequest.php @@ -0,0 +1,183 @@ +google.cloud.eventarc.v1.CreateTriggerRequest + */ +class CreateTriggerRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent collection in which to add this trigger. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The trigger to create. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Trigger trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $trigger = null; + /** + * Required. The user-provided ID to be assigned to the trigger. + * + * Generated from protobuf field string trigger_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $trigger_id = ''; + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent collection in which to add this trigger. + * @type \Google\Cloud\Eventarc\V1\Trigger $trigger + * Required. The trigger to create. + * @type string $trigger_id + * Required. The user-provided ID to be assigned to the trigger. + * @type bool $validate_only + * Required. If set, validate the request and preview the review, but do not + * post it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent collection in which to add this trigger. + * + * Generated 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 collection in which to add this trigger. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 trigger to create. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Trigger trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Eventarc\V1\Trigger|null + */ + public function getTrigger() + { + return $this->trigger; + } + + public function hasTrigger() + { + return isset($this->trigger); + } + + public function clearTrigger() + { + unset($this->trigger); + } + + /** + * Required. The trigger to create. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Trigger trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Eventarc\V1\Trigger $var + * @return $this + */ + public function setTrigger($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Trigger::class); + $this->trigger = $var; + + return $this; + } + + /** + * Required. The user-provided ID to be assigned to the trigger. + * + * Generated from protobuf field string trigger_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTriggerId() + { + return $this->trigger_id; + } + + /** + * Required. The user-provided ID to be assigned to the trigger. + * + * Generated from protobuf field string trigger_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTriggerId($var) + { + GPBUtil::checkString($var, True); + $this->trigger_id = $var; + + return $this; + } + + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelConnectionRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelConnectionRequest.php new file mode 100644 index 000000000000..05118ef90569 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelConnectionRequest.php @@ -0,0 +1,67 @@ +google.cloud.eventarc.v1.DeleteChannelConnectionRequest + */ +class DeleteChannelConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the channel connection to delete. + * + * 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 name of the channel connection to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the channel connection 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 channel connection 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; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelRequest.php new file mode 100644 index 000000000000..96942e292e99 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelRequest.php @@ -0,0 +1,105 @@ +google.cloud.eventarc.v1.DeleteChannelRequest + */ +class DeleteChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the channel to be deleted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the channel to be deleted. + * @type bool $validate_only + * Required. If set, validate the request and preview the review, but do not + * post it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the channel 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 channel 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; + } + + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteTriggerRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteTriggerRequest.php new file mode 100644 index 000000000000..88ac83e8d2fb --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteTriggerRequest.php @@ -0,0 +1,181 @@ +google.cloud.eventarc.v1.DeleteTriggerRequest + */ +class DeleteTriggerRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the trigger to be deleted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If provided, the trigger will only be deleted if the etag matches the + * current etag on the resource. + * + * Generated from protobuf field string etag = 2; + */ + protected $etag = ''; + /** + * If set to true, and the trigger is not found, the request will succeed + * but no action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 3; + */ + protected $allow_missing = false; + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the trigger to be deleted. + * @type string $etag + * If provided, the trigger will only be deleted if the etag matches the + * current etag on the resource. + * @type bool $allow_missing + * If set to true, and the trigger is not found, the request will succeed + * but no action will be taken on the server. + * @type bool $validate_only + * Required. If set, validate the request and preview the review, but do not + * post it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the trigger 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 trigger 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; + } + + /** + * If provided, the trigger will only be deleted if the etag matches the + * current etag on the resource. + * + * Generated from protobuf field string etag = 2; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * If provided, the trigger will only be deleted if the etag matches the + * current etag on the resource. + * + * Generated from protobuf field string etag = 2; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * If set to true, and the trigger is not found, the request will succeed + * but no action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 3; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the trigger is not found, the request will succeed + * but no action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 3; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Destination.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Destination.php new file mode 100644 index 000000000000..b8dd4dfddb15 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Destination.php @@ -0,0 +1,192 @@ +google.cloud.eventarc.v1.Destination + */ +class Destination extends \Google\Protobuf\Internal\Message +{ + protected $descriptor; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Eventarc\V1\CloudRun $cloud_run + * Cloud Run fully-managed resource that receives the events. The resource + * should be in the same project as the trigger. + * @type string $cloud_function + * The Cloud Function resource name. Only Cloud Functions V2 is supported. + * Format: `projects/{project}/locations/{location}/functions/{function}` + * @type \Google\Cloud\Eventarc\V1\GKE $gke + * A GKE service capable of receiving events. The service should be running + * in the same project as the trigger. + * @type string $workflow + * The resource name of the Workflow whose Executions are triggered by + * the events. The Workflow resource should be deployed in the same project + * as the trigger. + * Format: `projects/{project}/locations/{location}/workflows/{workflow}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); + parent::__construct($data); + } + + /** + * Cloud Run fully-managed resource that receives the events. The resource + * should be in the same project as the trigger. + * + * Generated from protobuf field .google.cloud.eventarc.v1.CloudRun cloud_run = 1; + * @return \Google\Cloud\Eventarc\V1\CloudRun|null + */ + public function getCloudRun() + { + return $this->readOneof(1); + } + + public function hasCloudRun() + { + return $this->hasOneof(1); + } + + /** + * Cloud Run fully-managed resource that receives the events. The resource + * should be in the same project as the trigger. + * + * Generated from protobuf field .google.cloud.eventarc.v1.CloudRun cloud_run = 1; + * @param \Google\Cloud\Eventarc\V1\CloudRun $var + * @return $this + */ + public function setCloudRun($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\CloudRun::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The Cloud Function resource name. Only Cloud Functions V2 is supported. + * Format: `projects/{project}/locations/{location}/functions/{function}` + * + * Generated from protobuf field string cloud_function = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getCloudFunction() + { + return $this->readOneof(2); + } + + public function hasCloudFunction() + { + return $this->hasOneof(2); + } + + /** + * The Cloud Function resource name. Only Cloud Functions V2 is supported. + * Format: `projects/{project}/locations/{location}/functions/{function}` + * + * Generated from protobuf field string cloud_function = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCloudFunction($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A GKE service capable of receiving events. The service should be running + * in the same project as the trigger. + * + * Generated from protobuf field .google.cloud.eventarc.v1.GKE gke = 3; + * @return \Google\Cloud\Eventarc\V1\GKE|null + */ + public function getGke() + { + return $this->readOneof(3); + } + + public function hasGke() + { + return $this->hasOneof(3); + } + + /** + * A GKE service capable of receiving events. The service should be running + * in the same project as the trigger. + * + * Generated from protobuf field .google.cloud.eventarc.v1.GKE gke = 3; + * @param \Google\Cloud\Eventarc\V1\GKE $var + * @return $this + */ + public function setGke($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\GKE::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The resource name of the Workflow whose Executions are triggered by + * the events. The Workflow resource should be deployed in the same project + * as the trigger. + * Format: `projects/{project}/locations/{location}/workflows/{workflow}` + * + * Generated from protobuf field string workflow = 4 [(.google.api.resource_reference) = { + * @return string + */ + public function getWorkflow() + { + return $this->readOneof(4); + } + + public function hasWorkflow() + { + return $this->hasOneof(4); + } + + /** + * The resource name of the Workflow whose Executions are triggered by + * the events. The Workflow resource should be deployed in the same project + * as the trigger. + * Format: `projects/{project}/locations/{location}/workflows/{workflow}` + * + * Generated from protobuf field string workflow = 4 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setWorkflow($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getDescriptor() + { + return $this->whichOneof("descriptor"); + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventFilter.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventFilter.php new file mode 100644 index 000000000000..f4f75630fc18 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventFilter.php @@ -0,0 +1,155 @@ +google.cloud.eventarc.v1.EventFilter + */ +class EventFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of a CloudEvents attribute. Currently, only a subset of attributes + * are supported for filtering. + * All triggers MUST provide a filter for the 'type' attribute. + * + * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $attribute = ''; + /** + * Required. The value for the attribute. + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value = ''; + /** + * Optional. The operator used for matching the events with the value of the + * filter. If not specified, only events that have an exact key-value pair + * specified in the filter are matched. The only allowed value is + * `match-path-pattern`. + * + * Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $operator = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $attribute + * Required. The name of a CloudEvents attribute. Currently, only a subset of attributes + * are supported for filtering. + * All triggers MUST provide a filter for the 'type' attribute. + * @type string $value + * Required. The value for the attribute. + * @type string $operator + * Optional. The operator used for matching the events with the value of the + * filter. If not specified, only events that have an exact key-value pair + * specified in the filter are matched. The only allowed value is + * `match-path-pattern`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of a CloudEvents attribute. Currently, only a subset of attributes + * are supported for filtering. + * All triggers MUST provide a filter for the 'type' attribute. + * + * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAttribute() + { + return $this->attribute; + } + + /** + * Required. The name of a CloudEvents attribute. Currently, only a subset of attributes + * are supported for filtering. + * All triggers MUST provide a filter for the 'type' attribute. + * + * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAttribute($var) + { + GPBUtil::checkString($var, True); + $this->attribute = $var; + + return $this; + } + + /** + * Required. The value for the attribute. + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Required. The value for the attribute. + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * Optional. The operator used for matching the events with the value of the + * filter. If not specified, only events that have an exact key-value pair + * specified in the filter are matched. The only allowed value is + * `match-path-pattern`. + * + * Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOperator() + { + return $this->operator; + } + + /** + * Optional. The operator used for matching the events with the value of the + * filter. If not specified, only events that have an exact key-value pair + * specified in the filter are matched. The only allowed value is + * `match-path-pattern`. + * + * Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOperator($var) + { + GPBUtil::checkString($var, True); + $this->operator = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventType.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventType.php new file mode 100644 index 000000000000..67e92e6f24f7 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventType.php @@ -0,0 +1,201 @@ +google.cloud.eventarc.v1.EventType + */ +class EventType extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The full name of the event type (for example, + * "google.cloud.storage.object.v1.finalized"). In the form of + * {provider-specific-prefix}.{resource}.{version}.{verb}. Types MUST be + * versioned and event schemas are guaranteed to remain backward compatible + * within one version. Note that event type versions and API versions do not + * need to match. + * + * Generated from protobuf field string type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = ''; + /** + * Output only. Human friendly description of what the event type is about. + * For example "Bucket created in Cloud Storage". + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $description = ''; + /** + * Output only. Filtering attributes for the event type. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.FilteringAttribute filtering_attributes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $filtering_attributes; + /** + * Output only. URI for the event schema. + * For example + * "https://github.com/googleapis/google-cloudevents/blob/master/proto/google/events/cloud/storage/v1/events.proto" + * + * Generated from protobuf field string event_schema_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $event_schema_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * Output only. The full name of the event type (for example, + * "google.cloud.storage.object.v1.finalized"). In the form of + * {provider-specific-prefix}.{resource}.{version}.{verb}. Types MUST be + * versioned and event schemas are guaranteed to remain backward compatible + * within one version. Note that event type versions and API versions do not + * need to match. + * @type string $description + * Output only. Human friendly description of what the event type is about. + * For example "Bucket created in Cloud Storage". + * @type array<\Google\Cloud\Eventarc\V1\FilteringAttribute>|\Google\Protobuf\Internal\RepeatedField $filtering_attributes + * Output only. Filtering attributes for the event type. + * @type string $event_schema_uri + * Output only. URI for the event schema. + * For example + * "https://github.com/googleapis/google-cloudevents/blob/master/proto/google/events/cloud/storage/v1/events.proto" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Discovery::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The full name of the event type (for example, + * "google.cloud.storage.object.v1.finalized"). In the form of + * {provider-specific-prefix}.{resource}.{version}.{verb}. Types MUST be + * versioned and event schemas are guaranteed to remain backward compatible + * within one version. Note that event type versions and API versions do not + * need to match. + * + * Generated from protobuf field string type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. The full name of the event type (for example, + * "google.cloud.storage.object.v1.finalized"). In the form of + * {provider-specific-prefix}.{resource}.{version}.{verb}. Types MUST be + * versioned and event schemas are guaranteed to remain backward compatible + * within one version. Note that event type versions and API versions do not + * need to match. + * + * Generated from protobuf field string type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Output only. Human friendly description of what the event type is about. + * For example "Bucket created in Cloud Storage". + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Output only. Human friendly description of what the event type is about. + * For example "Bucket created in Cloud Storage". + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Filtering attributes for the event type. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.FilteringAttribute filtering_attributes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFilteringAttributes() + { + return $this->filtering_attributes; + } + + /** + * Output only. Filtering attributes for the event type. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.FilteringAttribute filtering_attributes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Eventarc\V1\FilteringAttribute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFilteringAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\FilteringAttribute::class); + $this->filtering_attributes = $arr; + + return $this; + } + + /** + * Output only. URI for the event schema. + * For example + * "https://github.com/googleapis/google-cloudevents/blob/master/proto/google/events/cloud/storage/v1/events.proto" + * + * Generated from protobuf field string event_schema_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEventSchemaUri() + { + return $this->event_schema_uri; + } + + /** + * Output only. URI for the event schema. + * For example + * "https://github.com/googleapis/google-cloudevents/blob/master/proto/google/events/cloud/storage/v1/events.proto" + * + * Generated from protobuf field string event_schema_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEventSchemaUri($var) + { + GPBUtil::checkString($var, True); + $this->event_schema_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventarcGrpcClient.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventarcGrpcClient.php new file mode 100644 index 000000000000..1a94450e5981 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventarcGrpcClient.php @@ -0,0 +1,306 @@ +_simpleRequest('/google.cloud.eventarc.v1.Eventarc/GetTrigger', + $argument, + ['\Google\Cloud\Eventarc\V1\Trigger', 'decode'], + $metadata, $options); + } + + /** + * List triggers. + * @param \Google\Cloud\Eventarc\V1\ListTriggersRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListTriggers(\Google\Cloud\Eventarc\V1\ListTriggersRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/ListTriggers', + $argument, + ['\Google\Cloud\Eventarc\V1\ListTriggersResponse', 'decode'], + $metadata, $options); + } + + /** + * Create a new trigger in a particular project and location. + * @param \Google\Cloud\Eventarc\V1\CreateTriggerRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateTrigger(\Google\Cloud\Eventarc\V1\CreateTriggerRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/CreateTrigger', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Update a single trigger. + * @param \Google\Cloud\Eventarc\V1\UpdateTriggerRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateTrigger(\Google\Cloud\Eventarc\V1\UpdateTriggerRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/UpdateTrigger', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Delete a single trigger. + * @param \Google\Cloud\Eventarc\V1\DeleteTriggerRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteTrigger(\Google\Cloud\Eventarc\V1\DeleteTriggerRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/DeleteTrigger', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Get a single Channel. + * @param \Google\Cloud\Eventarc\V1\GetChannelRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetChannel(\Google\Cloud\Eventarc\V1\GetChannelRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/GetChannel', + $argument, + ['\Google\Cloud\Eventarc\V1\Channel', 'decode'], + $metadata, $options); + } + + /** + * List channels. + * @param \Google\Cloud\Eventarc\V1\ListChannelsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListChannels(\Google\Cloud\Eventarc\V1\ListChannelsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/ListChannels', + $argument, + ['\Google\Cloud\Eventarc\V1\ListChannelsResponse', 'decode'], + $metadata, $options); + } + + /** + * Create a new channel in a particular project and location. + * @param \Google\Cloud\Eventarc\V1\CreateChannelRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateChannel(\Google\Cloud\Eventarc\V1\CreateChannelRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/CreateChannel', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Update a single channel. + * @param \Google\Cloud\Eventarc\V1\UpdateChannelRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateChannel(\Google\Cloud\Eventarc\V1\UpdateChannelRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/UpdateChannel', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Delete a single channel. + * @param \Google\Cloud\Eventarc\V1\DeleteChannelRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteChannel(\Google\Cloud\Eventarc\V1\DeleteChannelRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/DeleteChannel', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Get a single Provider. + * @param \Google\Cloud\Eventarc\V1\GetProviderRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetProvider(\Google\Cloud\Eventarc\V1\GetProviderRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/GetProvider', + $argument, + ['\Google\Cloud\Eventarc\V1\Provider', 'decode'], + $metadata, $options); + } + + /** + * List providers. + * @param \Google\Cloud\Eventarc\V1\ListProvidersRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListProviders(\Google\Cloud\Eventarc\V1\ListProvidersRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/ListProviders', + $argument, + ['\Google\Cloud\Eventarc\V1\ListProvidersResponse', 'decode'], + $metadata, $options); + } + + /** + * Get a single ChannelConnection. + * @param \Google\Cloud\Eventarc\V1\GetChannelConnectionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetChannelConnection(\Google\Cloud\Eventarc\V1\GetChannelConnectionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/GetChannelConnection', + $argument, + ['\Google\Cloud\Eventarc\V1\ChannelConnection', 'decode'], + $metadata, $options); + } + + /** + * List channel connections. + * @param \Google\Cloud\Eventarc\V1\ListChannelConnectionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListChannelConnections(\Google\Cloud\Eventarc\V1\ListChannelConnectionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/ListChannelConnections', + $argument, + ['\Google\Cloud\Eventarc\V1\ListChannelConnectionsResponse', 'decode'], + $metadata, $options); + } + + /** + * Create a new ChannelConnection in a particular project and location. + * @param \Google\Cloud\Eventarc\V1\CreateChannelConnectionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateChannelConnection(\Google\Cloud\Eventarc\V1\CreateChannelConnectionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/CreateChannelConnection', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Delete a single ChannelConnection. + * @param \Google\Cloud\Eventarc\V1\DeleteChannelConnectionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteChannelConnection(\Google\Cloud\Eventarc\V1\DeleteChannelConnectionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/DeleteChannelConnection', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Get a GoogleChannelConfig + * @param \Google\Cloud\Eventarc\V1\GetGoogleChannelConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetGoogleChannelConfig(\Google\Cloud\Eventarc\V1\GetGoogleChannelConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/GetGoogleChannelConfig', + $argument, + ['\Google\Cloud\Eventarc\V1\GoogleChannelConfig', 'decode'], + $metadata, $options); + } + + /** + * Update a single GoogleChannelConfig + * @param \Google\Cloud\Eventarc\V1\UpdateGoogleChannelConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateGoogleChannelConfig(\Google\Cloud\Eventarc\V1\UpdateGoogleChannelConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/UpdateGoogleChannelConfig', + $argument, + ['\Google\Cloud\Eventarc\V1\GoogleChannelConfig', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/FilteringAttribute.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/FilteringAttribute.php new file mode 100644 index 000000000000..ac17a5a683b0 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/FilteringAttribute.php @@ -0,0 +1,178 @@ +google.cloud.eventarc.v1.FilteringAttribute + */ +class FilteringAttribute extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Attribute used for filtering the event type. + * + * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $attribute = ''; + /** + * Output only. Description of the purpose of the attribute. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $description = ''; + /** + * Output only. If true, the triggers for this provider should always specify a filter + * on these attributes. Trigger creation will fail otherwise. + * + * Generated from protobuf field bool required = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $required = false; + /** + * Output only. If true, the attribute accepts matching expressions in the Eventarc + * PathPattern format. + * + * Generated from protobuf field bool path_pattern_supported = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $path_pattern_supported = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $attribute + * Output only. Attribute used for filtering the event type. + * @type string $description + * Output only. Description of the purpose of the attribute. + * @type bool $required + * Output only. If true, the triggers for this provider should always specify a filter + * on these attributes. Trigger creation will fail otherwise. + * @type bool $path_pattern_supported + * Output only. If true, the attribute accepts matching expressions in the Eventarc + * PathPattern format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Discovery::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Attribute used for filtering the event type. + * + * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAttribute() + { + return $this->attribute; + } + + /** + * Output only. Attribute used for filtering the event type. + * + * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAttribute($var) + { + GPBUtil::checkString($var, True); + $this->attribute = $var; + + return $this; + } + + /** + * Output only. Description of the purpose of the attribute. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Output only. Description of the purpose of the attribute. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. If true, the triggers for this provider should always specify a filter + * on these attributes. Trigger creation will fail otherwise. + * + * Generated from protobuf field bool required = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequired() + { + return $this->required; + } + + /** + * Output only. If true, the triggers for this provider should always specify a filter + * on these attributes. Trigger creation will fail otherwise. + * + * Generated from protobuf field bool required = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequired($var) + { + GPBUtil::checkBool($var); + $this->required = $var; + + return $this; + } + + /** + * Output only. If true, the attribute accepts matching expressions in the Eventarc + * PathPattern format. + * + * Generated from protobuf field bool path_pattern_supported = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getPathPatternSupported() + { + return $this->path_pattern_supported; + } + + /** + * Output only. If true, the attribute accepts matching expressions in the Eventarc + * PathPattern format. + * + * Generated from protobuf field bool path_pattern_supported = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setPathPatternSupported($var) + { + GPBUtil::checkBool($var); + $this->path_pattern_supported = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GKE.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GKE.php new file mode 100644 index 000000000000..205d41d90ddc --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GKE.php @@ -0,0 +1,223 @@ +google.cloud.eventarc.v1.GKE + */ +class GKE extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the cluster the GKE service is running in. The cluster must be + * running in the same project as the trigger being created. + * + * Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster = ''; + /** + * Required. The name of the Google Compute Engine in which the cluster resides, which + * can either be compute zone (for example, us-central1-a) for the zonal + * clusters or region (for example, us-central1) for regional clusters. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $location = ''; + /** + * Required. The namespace the GKE service is running in. + * + * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $namespace = ''; + /** + * Required. Name of the GKE service. + * + * Generated from protobuf field string service = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service = ''; + /** + * Optional. The relative path on the GKE service the events should be sent to. + * The value must conform to the definition of a URI path segment (section 3.3 + * of RFC2396). Examples: "/route", "route", "route/subroute". + * + * Generated from protobuf field string path = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster + * Required. The name of the cluster the GKE service is running in. The cluster must be + * running in the same project as the trigger being created. + * @type string $location + * Required. The name of the Google Compute Engine in which the cluster resides, which + * can either be compute zone (for example, us-central1-a) for the zonal + * clusters or region (for example, us-central1) for regional clusters. + * @type string $namespace + * Required. The namespace the GKE service is running in. + * @type string $service + * Required. Name of the GKE service. + * @type string $path + * Optional. The relative path on the GKE service the events should be sent to. + * The value must conform to the definition of a URI path segment (section 3.3 + * of RFC2396). Examples: "/route", "route", "route/subroute". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the cluster the GKE service is running in. The cluster must be + * running in the same project as the trigger being created. + * + * Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * Required. The name of the cluster the GKE service is running in. The cluster must be + * running in the same project as the trigger being created. + * + * Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkString($var, True); + $this->cluster = $var; + + return $this; + } + + /** + * Required. The name of the Google Compute Engine in which the cluster resides, which + * can either be compute zone (for example, us-central1-a) for the zonal + * clusters or region (for example, us-central1) for regional clusters. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Required. The name of the Google Compute Engine in which the cluster resides, which + * can either be compute zone (for example, us-central1-a) for the zonal + * clusters or region (for example, us-central1) for regional clusters. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Required. The namespace the GKE service is running in. + * + * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Required. The namespace the GKE service is running in. + * + * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Required. Name of the GKE service. + * + * Generated from protobuf field string service = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Required. Name of the GKE service. + * + * Generated from protobuf field string service = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * Optional. The relative path on the GKE service the events should be sent to. + * The value must conform to the definition of a URI path segment (section 3.3 + * of RFC2396). Examples: "/route", "route", "route/subroute". + * + * Generated from protobuf field string path = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Optional. The relative path on the GKE service the events should be sent to. + * The value must conform to the definition of a URI path segment (section 3.3 + * of RFC2396). Examples: "/route", "route", "route/subroute". + * + * Generated from protobuf field string path = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelConnectionRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelConnectionRequest.php new file mode 100644 index 000000000000..9f7938c96631 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelConnectionRequest.php @@ -0,0 +1,67 @@ +google.cloud.eventarc.v1.GetChannelConnectionRequest + */ +class GetChannelConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the channel connection to get. + * + * 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 name of the channel connection to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the channel connection 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 channel connection 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelRequest.php new file mode 100644 index 000000000000..ebde4f2d3857 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelRequest.php @@ -0,0 +1,67 @@ +google.cloud.eventarc.v1.GetChannelRequest + */ +class GetChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the channel to get. + * + * 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 name of the channel to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the channel 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 channel 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetGoogleChannelConfigRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetGoogleChannelConfigRequest.php new file mode 100644 index 000000000000..e21cbbf2ae1f --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetGoogleChannelConfigRequest.php @@ -0,0 +1,67 @@ +google.cloud.eventarc.v1.GetGoogleChannelConfigRequest + */ +class GetGoogleChannelConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the config to get. + * + * 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 name of the config to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the config 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 config 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetProviderRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetProviderRequest.php new file mode 100644 index 000000000000..9afe9f9ed840 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetProviderRequest.php @@ -0,0 +1,67 @@ +google.cloud.eventarc.v1.GetProviderRequest + */ +class GetProviderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the provider to get. + * + * 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 name of the provider to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the provider 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 provider 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetTriggerRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetTriggerRequest.php new file mode 100644 index 000000000000..1a6f9e0fe07a --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetTriggerRequest.php @@ -0,0 +1,67 @@ +google.cloud.eventarc.v1.GetTriggerRequest + */ +class GetTriggerRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the trigger to get. + * + * 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 name of the trigger to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the trigger 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 trigger 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php new file mode 100644 index 000000000000..e0d2872ce2b3 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php @@ -0,0 +1,165 @@ +google.cloud.eventarc.v1.GoogleChannelConfig + */ +class GoogleChannelConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the config. Must be in the format of, + * `projects/{project}/locations/{location}/googleChannelConfig`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt their event data. + * It must match the pattern + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string crypto_key_name = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $crypto_key_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the config. Must be in the format of, + * `projects/{project}/locations/{location}/googleChannelConfig`. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type string $crypto_key_name + * Optional. Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt their event data. + * It must match the pattern + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\GoogleChannelConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the config. Must be in the format of, + * `projects/{project}/locations/{location}/googleChannelConfig`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the config. Must be in the format of, + * `projects/{project}/locations/{location}/googleChannelConfig`. + * + * 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 last-modified time. + * + * 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. The last-modified time. + * + * 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; + } + + /** + * Optional. Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt their event data. + * It must match the pattern + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string crypto_key_name = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getCryptoKeyName() + { + return $this->crypto_key_name; + } + + /** + * Optional. Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt their event data. + * It must match the pattern + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string crypto_key_name = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCryptoKeyName($var) + { + GPBUtil::checkString($var, True); + $this->crypto_key_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsRequest.php new file mode 100644 index 000000000000..f84598beb531 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsRequest.php @@ -0,0 +1,151 @@ +google.cloud.eventarc.v1.ListChannelConnectionsRequest + */ +class ListChannelConnectionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent collection from which to list channel connections. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of channel connections to return on each page. + * Note: The service may send fewer responses. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The page token; provide the value from the `next_page_token` field in a + * previous `ListChannelConnections` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListChannelConnetions` + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent collection from which to list channel connections. + * @type int $page_size + * The maximum number of channel connections to return on each page. + * Note: The service may send fewer responses. + * @type string $page_token + * The page token; provide the value from the `next_page_token` field in a + * previous `ListChannelConnections` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListChannelConnetions` + * match the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent collection from which to list channel connections. + * + * Generated 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 collection from which to list channel connections. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 channel connections to return on each page. + * Note: The service may send fewer responses. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of channel connections to return on each page. + * Note: The service may send fewer responses. + * + * 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; provide the value from the `next_page_token` field in a + * previous `ListChannelConnections` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListChannelConnetions` + * 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; + } + + /** + * The page token; provide the value from the `next_page_token` field in a + * previous `ListChannelConnections` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListChannelConnetions` + * 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; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsResponse.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsResponse.php new file mode 100644 index 000000000000..9659eb7acb7a --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsResponse.php @@ -0,0 +1,147 @@ +google.cloud.eventarc.v1.ListChannelConnectionsResponse + */ +class ListChannelConnectionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested channel connections, up to the number specified in + * `page_size`. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.ChannelConnection channel_connections = 1; + */ + private $channel_connections; + /** + * A page token that can be sent to `ListChannelConnections` to request the + * next page. + * If this is empty, then there are no more pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Unreachable resources, if any. + * + * 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\Eventarc\V1\ChannelConnection>|\Google\Protobuf\Internal\RepeatedField $channel_connections + * The requested channel connections, up to the number specified in + * `page_size`. + * @type string $next_page_token + * A page token that can be sent to `ListChannelConnections` to request the + * next page. + * If this is empty, then there are no more pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Unreachable resources, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * The requested channel connections, up to the number specified in + * `page_size`. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.ChannelConnection channel_connections = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannelConnections() + { + return $this->channel_connections; + } + + /** + * The requested channel connections, up to the number specified in + * `page_size`. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.ChannelConnection channel_connections = 1; + * @param array<\Google\Cloud\Eventarc\V1\ChannelConnection>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannelConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\ChannelConnection::class); + $this->channel_connections = $arr; + + return $this; + } + + /** + * A page token that can be sent to `ListChannelConnections` to request the + * next page. + * If this is empty, then there are no more pages. + * + * 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 sent to `ListChannelConnections` to request the + * next page. + * If this is empty, then 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; + } + + /** + * Unreachable resources, if any. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unreachable resources, if any. + * + * 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsRequest.php new file mode 100644 index 000000000000..c57add9d02f4 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsRequest.php @@ -0,0 +1,197 @@ +google.cloud.eventarc.v1.ListChannelsRequest + */ +class ListChannelsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent collection to list channels on. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of channels to return on each page. + * Note: The service may send fewer. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The page token; provide the value from the `next_page_token` field in a + * previous `ListChannels` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListChannels` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, channel_id`. + * + * Generated from protobuf field string order_by = 4; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent collection to list channels on. + * @type int $page_size + * The maximum number of channels to return on each page. + * Note: The service may send fewer. + * @type string $page_token + * The page token; provide the value from the `next_page_token` field in a + * previous `ListChannels` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListChannels` must + * match the call that provided the page token. + * @type string $order_by + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, channel_id`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent collection to list channels on. + * + * Generated 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 collection to list channels on. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 channels to return on each page. + * Note: The service may send fewer. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of channels to return on each page. + * Note: The service may send fewer. + * + * 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; provide the value from the `next_page_token` field in a + * previous `ListChannels` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListChannels` 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; + } + + /** + * The page token; provide the value from the `next_page_token` field in a + * previous `ListChannels` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListChannels` 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; + } + + /** + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, channel_id`. + * + * Generated from protobuf field string order_by = 4; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, channel_id`. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsResponse.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsResponse.php new file mode 100644 index 000000000000..7706916cd782 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsResponse.php @@ -0,0 +1,139 @@ +google.cloud.eventarc.v1.ListChannelsResponse + */ +class ListChannelsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested channels, up to the number specified in `page_size`. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.Channel channels = 1; + */ + private $channels; + /** + * A page token that can be sent to `ListChannels` to request the next page. + * If this is empty, then there are no more pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Unreachable resources, if any. + * + * 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\Eventarc\V1\Channel>|\Google\Protobuf\Internal\RepeatedField $channels + * The requested channels, up to the number specified in `page_size`. + * @type string $next_page_token + * A page token that can be sent to `ListChannels` to request the next page. + * If this is empty, then there are no more pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Unreachable resources, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * The requested channels, up to the number specified in `page_size`. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.Channel channels = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannels() + { + return $this->channels; + } + + /** + * The requested channels, up to the number specified in `page_size`. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.Channel channels = 1; + * @param array<\Google\Cloud\Eventarc\V1\Channel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\Channel::class); + $this->channels = $arr; + + return $this; + } + + /** + * A page token that can be sent to `ListChannels` to request the next page. + * If this is empty, then there are no more pages. + * + * 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 sent to `ListChannels` to request the next page. + * If this is empty, then 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; + } + + /** + * Unreachable resources, if any. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unreachable resources, if any. + * + * 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersRequest.php new file mode 100644 index 000000000000..85fb2918c235 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersRequest.php @@ -0,0 +1,227 @@ +google.cloud.eventarc.v1.ListProvidersRequest + */ +class ListProvidersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent of the provider to get. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of providers to return on each page. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The page token; provide the value from the `next_page_token` field in a + * previous `ListProviders` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProviders` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting oder is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, _id`. + * + * Generated from protobuf field string order_by = 4; + */ + protected $order_by = ''; + /** + * The filter field that the list request will filter on. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent of the provider to get. + * @type int $page_size + * The maximum number of providers to return on each page. + * @type string $page_token + * The page token; provide the value from the `next_page_token` field in a + * previous `ListProviders` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProviders` must + * match the call that provided the page token. + * @type string $order_by + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting oder is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, _id`. + * @type string $filter + * The filter field that the list request will filter on. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent of the provider to get. + * + * Generated 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 of the provider to get. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 providers to return on each page. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of providers to return on each 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; provide the value from the `next_page_token` field in a + * previous `ListProviders` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProviders` 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; + } + + /** + * The page token; provide the value from the `next_page_token` field in a + * previous `ListProviders` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProviders` 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; + } + + /** + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting oder is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, _id`. + * + * Generated from protobuf field string order_by = 4; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting oder is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, _id`. + * + * 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 filter field that the list request will filter on. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter field that the list request will filter on. + * + * 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersResponse.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersResponse.php new file mode 100644 index 000000000000..d1bf4a8f1e6b --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersResponse.php @@ -0,0 +1,139 @@ +google.cloud.eventarc.v1.ListProvidersResponse + */ +class ListProvidersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested providers, up to the number specified in `page_size`. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.Provider providers = 1; + */ + private $providers; + /** + * A page token that can be sent to `ListProviders` to request the next page. + * If this is empty, then there are no more pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Unreachable resources, if any. + * + * 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\Eventarc\V1\Provider>|\Google\Protobuf\Internal\RepeatedField $providers + * The requested providers, up to the number specified in `page_size`. + * @type string $next_page_token + * A page token that can be sent to `ListProviders` to request the next page. + * If this is empty, then there are no more pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Unreachable resources, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * The requested providers, up to the number specified in `page_size`. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.Provider providers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProviders() + { + return $this->providers; + } + + /** + * The requested providers, up to the number specified in `page_size`. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.Provider providers = 1; + * @param array<\Google\Cloud\Eventarc\V1\Provider>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProviders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\Provider::class); + $this->providers = $arr; + + return $this; + } + + /** + * A page token that can be sent to `ListProviders` to request the next page. + * If this is empty, then there are no more pages. + * + * 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 sent to `ListProviders` to request the next page. + * If this is empty, then 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; + } + + /** + * Unreachable resources, if any. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unreachable resources, if any. + * + * 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersRequest.php new file mode 100644 index 000000000000..b77fb3ad3929 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersRequest.php @@ -0,0 +1,239 @@ +google.cloud.eventarc.v1.ListTriggersRequest + */ +class ListTriggersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent collection to list triggers on. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of triggers to return on each page. + * Note: The service may send fewer. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The page token; provide the value from the `next_page_token` field in a + * previous `ListTriggers` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTriggers` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, trigger_id`. + * + * Generated from protobuf field string order_by = 4; + */ + protected $order_by = ''; + /** + * Filter field. Used to filter the Triggers to be listed. Possible filters + * are described in https://google.aip.dev/160. For example, using + * "?filter=destination:gke" would list only Triggers with a gke destination. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent collection to list triggers on. + * @type int $page_size + * The maximum number of triggers to return on each page. + * Note: The service may send fewer. + * @type string $page_token + * The page token; provide the value from the `next_page_token` field in a + * previous `ListTriggers` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTriggers` must match + * the call that provided the page token. + * @type string $order_by + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, trigger_id`. + * @type string $filter + * Filter field. Used to filter the Triggers to be listed. Possible filters + * are described in https://google.aip.dev/160. For example, using + * "?filter=destination:gke" would list only Triggers with a gke destination. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent collection to list triggers on. + * + * Generated 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 collection to list triggers on. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 triggers to return on each page. + * Note: The service may send fewer. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of triggers to return on each page. + * Note: The service may send fewer. + * + * 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; provide the value from the `next_page_token` field in a + * previous `ListTriggers` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTriggers` 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; + } + + /** + * The page token; provide the value from the `next_page_token` field in a + * previous `ListTriggers` call to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTriggers` 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; + } + + /** + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, trigger_id`. + * + * Generated from protobuf field string order_by = 4; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, trigger_id`. + * + * 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; + } + + /** + * Filter field. Used to filter the Triggers to be listed. Possible filters + * are described in https://google.aip.dev/160. For example, using + * "?filter=destination:gke" would list only Triggers with a gke destination. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter field. Used to filter the Triggers to be listed. Possible filters + * are described in https://google.aip.dev/160. For example, using + * "?filter=destination:gke" would list only Triggers with a gke destination. + * + * 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersResponse.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersResponse.php new file mode 100644 index 000000000000..ee71a58af28b --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersResponse.php @@ -0,0 +1,139 @@ +google.cloud.eventarc.v1.ListTriggersResponse + */ +class ListTriggersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested triggers, up to the number specified in `page_size`. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.Trigger triggers = 1; + */ + private $triggers; + /** + * A page token that can be sent to `ListTriggers` to request the next page. + * If this is empty, then there are no more pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Unreachable resources, if any. + * + * 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\Eventarc\V1\Trigger>|\Google\Protobuf\Internal\RepeatedField $triggers + * The requested triggers, up to the number specified in `page_size`. + * @type string $next_page_token + * A page token that can be sent to `ListTriggers` to request the next page. + * If this is empty, then there are no more pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Unreachable resources, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * The requested triggers, up to the number specified in `page_size`. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.Trigger triggers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTriggers() + { + return $this->triggers; + } + + /** + * The requested triggers, up to the number specified in `page_size`. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.Trigger triggers = 1; + * @param array<\Google\Cloud\Eventarc\V1\Trigger>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTriggers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\Trigger::class); + $this->triggers = $arr; + + return $this; + } + + /** + * A page token that can be sent to `ListTriggers` to request the next page. + * If this is empty, then there are no more pages. + * + * 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 sent to `ListTriggers` to request the next page. + * If this is empty, then 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; + } + + /** + * Unreachable resources, if any. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unreachable resources, if any. + * + * 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/OperationMetadata.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/OperationMetadata.php new file mode 100644 index 000000000000..5e68aca2f8c3 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/OperationMetadata.php @@ -0,0 +1,303 @@ +google.cloud.eventarc.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\Eventarc\V1\Eventarc::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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Provider.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Provider.php new file mode 100644 index 000000000000..2cab34dc5b9d --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Provider.php @@ -0,0 +1,139 @@ +google.cloud.eventarc.v1.Provider + */ +class Provider extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. In `projects/{project}/locations/{location}/providers/{provider_id}` + * format. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Human friendly name for the Provider. For example "Cloud Storage". + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. Event types for this provider. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.EventType event_types = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $event_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. In `projects/{project}/locations/{location}/providers/{provider_id}` + * format. + * @type string $display_name + * Output only. Human friendly name for the Provider. For example "Cloud Storage". + * @type array<\Google\Cloud\Eventarc\V1\EventType>|\Google\Protobuf\Internal\RepeatedField $event_types + * Output only. Event types for this provider. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Discovery::initOnce(); + parent::__construct($data); + } + + /** + * Output only. In `projects/{project}/locations/{location}/providers/{provider_id}` + * format. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. In `projects/{project}/locations/{location}/providers/{provider_id}` + * format. + * + * 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. Human friendly name for the Provider. For example "Cloud Storage". + * + * 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. Human friendly name for the Provider. For example "Cloud Storage". + * + * 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. Event types for this provider. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.EventType event_types = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEventTypes() + { + return $this->event_types; + } + + /** + * Output only. Event types for this provider. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.EventType event_types = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Eventarc\V1\EventType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEventTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\EventType::class); + $this->event_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Pubsub.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Pubsub.php new file mode 100644 index 000000000000..438692870f62 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Pubsub.php @@ -0,0 +1,129 @@ +google.cloud.eventarc.v1.Pubsub + */ +class Pubsub extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The name of the Pub/Sub topic created and managed by Eventarc as + * a transport for the event delivery. Format: + * `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`. + * You can set an existing topic for triggers of the type + * `google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide + * here is not deleted by Eventarc at trigger deletion. + * + * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $topic = ''; + /** + * Output only. The name of the Pub/Sub subscription created and managed by Eventarc + * as a transport for the event delivery. Format: + * `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`. + * + * Generated from protobuf field string subscription = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $subscription = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $topic + * Optional. The name of the Pub/Sub topic created and managed by Eventarc as + * a transport for the event delivery. Format: + * `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`. + * You can set an existing topic for triggers of the type + * `google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide + * here is not deleted by Eventarc at trigger deletion. + * @type string $subscription + * Output only. The name of the Pub/Sub subscription created and managed by Eventarc + * as a transport for the event delivery. Format: + * `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The name of the Pub/Sub topic created and managed by Eventarc as + * a transport for the event delivery. Format: + * `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`. + * You can set an existing topic for triggers of the type + * `google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide + * here is not deleted by Eventarc at trigger deletion. + * + * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTopic() + { + return $this->topic; + } + + /** + * Optional. The name of the Pub/Sub topic created and managed by Eventarc as + * a transport for the event delivery. Format: + * `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`. + * You can set an existing topic for triggers of the type + * `google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide + * here is not deleted by Eventarc at trigger deletion. + * + * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTopic($var) + { + GPBUtil::checkString($var, True); + $this->topic = $var; + + return $this; + } + + /** + * Output only. The name of the Pub/Sub subscription created and managed by Eventarc + * as a transport for the event delivery. Format: + * `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`. + * + * Generated from protobuf field string subscription = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSubscription() + { + return $this->subscription; + } + + /** + * Output only. The name of the Pub/Sub subscription created and managed by Eventarc + * as a transport for the event delivery. Format: + * `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`. + * + * Generated from protobuf field string subscription = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSubscription($var) + { + GPBUtil::checkString($var, True); + $this->subscription = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/StateCondition.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/StateCondition.php new file mode 100644 index 000000000000..3c68f4ea51cd --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/StateCondition.php @@ -0,0 +1,101 @@ +google.cloud.eventarc.v1.StateCondition + */ +class StateCondition extends \Google\Protobuf\Internal\Message +{ + /** + * The canonical code of the condition. + * + * Generated from protobuf field .google.rpc.Code code = 1; + */ + protected $code = 0; + /** + * Human-readable message. + * + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * The canonical code of the condition. + * @type string $message + * Human-readable message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); + parent::__construct($data); + } + + /** + * The canonical code of the condition. + * + * Generated from protobuf field .google.rpc.Code code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * The canonical code of the condition. + * + * Generated from protobuf field .google.rpc.Code code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Rpc\Code::class); + $this->code = $var; + + return $this; + } + + /** + * Human-readable message. + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Human-readable 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Transport.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Transport.php new file mode 100644 index 000000000000..0d7bd861e1e0 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Transport.php @@ -0,0 +1,79 @@ +google.cloud.eventarc.v1.Transport + */ +class Transport extends \Google\Protobuf\Internal\Message +{ + protected $intermediary; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Eventarc\V1\Pubsub $pubsub + * The Pub/Sub topic and subscription used by Eventarc as a transport + * intermediary. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); + parent::__construct($data); + } + + /** + * The Pub/Sub topic and subscription used by Eventarc as a transport + * intermediary. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Pubsub pubsub = 1; + * @return \Google\Cloud\Eventarc\V1\Pubsub|null + */ + public function getPubsub() + { + return $this->readOneof(1); + } + + public function hasPubsub() + { + return $this->hasOneof(1); + } + + /** + * The Pub/Sub topic and subscription used by Eventarc as a transport + * intermediary. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Pubsub pubsub = 1; + * @param \Google\Cloud\Eventarc\V1\Pubsub $var + * @return $this + */ + public function setPubsub($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pubsub::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getIntermediary() + { + return $this->whichOneof("intermediary"); + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Trigger.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Trigger.php new file mode 100644 index 000000000000..144b812b9f05 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Trigger.php @@ -0,0 +1,569 @@ +google.cloud.eventarc.v1.Trigger + */ +class Trigger extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the trigger. Must be unique within the location of the + * project and must be in + * `projects/{project}/locations/{location}/triggers/{trigger}` format. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4 + * string and guaranteed to remain unchanged until the resource is deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Required. Unordered list. The list of filters that applies to event attributes. Only events that + * match all the provided filters are sent to the destination. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + */ + private $event_filters; + /** + * Optional. The IAM service account email associated with the trigger. The + * service account represents the identity of the trigger. + * The principal who calls this API must have the `iam.serviceAccounts.actAs` + * permission in the service account. See + * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common + * for more information. + * For Cloud Run destinations, this service account is used to generate + * identity tokens when invoking the service. See + * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account + * for information on how to invoke authenticated Cloud Run services. + * To create Audit Log triggers, the service account should also + * have the `roles/eventarc.eventReceiver` IAM role. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $service_account = ''; + /** + * Required. Destination specifies where the events should be sent to. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $destination = null; + /** + * Optional. To deliver messages, Eventarc might use other GCP + * products as a transport intermediary. This field contains a reference to + * that transport intermediary. This information can be used for debugging + * purposes. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $transport = null; + /** + * Optional. User labels attached to the triggers that can be used to group resources. + * + * Generated from protobuf field map labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. The name of the channel associated with the trigger in + * `projects/{project}/locations/{location}/channels/{channel}` format. + * You must provide a channel to receive events from Eventarc SaaS partners. + * + * Generated from protobuf field string channel = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $channel = ''; + /** + * Output only. The reason(s) why a trigger is in FAILED state. + * + * Generated from protobuf field map conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $conditions; + /** + * Output only. This checksum is computed by the server based on the value of other + * fields, and might be sent only on create requests to ensure that the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the trigger. Must be unique within the location of the + * project and must be in + * `projects/{project}/locations/{location}/triggers/{trigger}` format. + * @type string $uid + * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4 + * string and guaranteed to remain unchanged until the resource is deleted. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type array<\Google\Cloud\Eventarc\V1\EventFilter>|\Google\Protobuf\Internal\RepeatedField $event_filters + * Required. Unordered list. The list of filters that applies to event attributes. Only events that + * match all the provided filters are sent to the destination. + * @type string $service_account + * Optional. The IAM service account email associated with the trigger. The + * service account represents the identity of the trigger. + * The principal who calls this API must have the `iam.serviceAccounts.actAs` + * permission in the service account. See + * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common + * for more information. + * For Cloud Run destinations, this service account is used to generate + * identity tokens when invoking the service. See + * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account + * for information on how to invoke authenticated Cloud Run services. + * To create Audit Log triggers, the service account should also + * have the `roles/eventarc.eventReceiver` IAM role. + * @type \Google\Cloud\Eventarc\V1\Destination $destination + * Required. Destination specifies where the events should be sent to. + * @type \Google\Cloud\Eventarc\V1\Transport $transport + * Optional. To deliver messages, Eventarc might use other GCP + * products as a transport intermediary. This field contains a reference to + * that transport intermediary. This information can be used for debugging + * purposes. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. User labels attached to the triggers that can be used to group resources. + * @type string $channel + * Optional. The name of the channel associated with the trigger in + * `projects/{project}/locations/{location}/channels/{channel}` format. + * You must provide a channel to receive events from Eventarc SaaS partners. + * @type array|\Google\Protobuf\Internal\MapField $conditions + * Output only. The reason(s) why a trigger is in FAILED state. + * @type string $etag + * Output only. This checksum is computed by the server based on the value of other + * fields, and might be sent only on create requests to ensure that the + * client has an up-to-date value before proceeding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the trigger. Must be unique within the location of the + * project and must be in + * `projects/{project}/locations/{location}/triggers/{trigger}` format. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the trigger. Must be unique within the location of the + * project and must be in + * `projects/{project}/locations/{location}/triggers/{trigger}` format. + * + * 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-assigned unique identifier for the trigger. The value is a UUID4 + * string and guaranteed to remain unchanged until the resource is deleted. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4 + * string and guaranteed to remain unchanged until the resource is deleted. + * + * Generated from protobuf field string uid = 2 [(.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 creation time. + * + * 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. The creation time. + * + * 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. The last-modified time. + * + * 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. The last-modified time. + * + * 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; + } + + /** + * Required. Unordered list. The list of filters that applies to event attributes. Only events that + * match all the provided filters are sent to the destination. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEventFilters() + { + return $this->event_filters; + } + + /** + * Required. Unordered list. The list of filters that applies to event attributes. Only events that + * match all the provided filters are sent to the destination. + * + * Generated from protobuf field repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Eventarc\V1\EventFilter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEventFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\EventFilter::class); + $this->event_filters = $arr; + + return $this; + } + + /** + * Optional. The IAM service account email associated with the trigger. The + * service account represents the identity of the trigger. + * The principal who calls this API must have the `iam.serviceAccounts.actAs` + * permission in the service account. See + * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common + * for more information. + * For Cloud Run destinations, this service account is used to generate + * identity tokens when invoking the service. See + * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account + * for information on how to invoke authenticated Cloud Run services. + * To create Audit Log triggers, the service account should also + * have the `roles/eventarc.eventReceiver` IAM role. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Optional. The IAM service account email associated with the trigger. The + * service account represents the identity of the trigger. + * The principal who calls this API must have the `iam.serviceAccounts.actAs` + * permission in the service account. See + * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common + * for more information. + * For Cloud Run destinations, this service account is used to generate + * identity tokens when invoking the service. See + * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account + * for information on how to invoke authenticated Cloud Run services. + * To create Audit Log triggers, the service account should also + * have the `roles/eventarc.eventReceiver` IAM role. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Required. Destination specifies where the events should be sent to. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Eventarc\V1\Destination|null + */ + public function getDestination() + { + return $this->destination; + } + + public function hasDestination() + { + return isset($this->destination); + } + + public function clearDestination() + { + unset($this->destination); + } + + /** + * Required. Destination specifies where the events should be sent to. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Eventarc\V1\Destination $var + * @return $this + */ + public function setDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Destination::class); + $this->destination = $var; + + return $this; + } + + /** + * Optional. To deliver messages, Eventarc might use other GCP + * products as a transport intermediary. This field contains a reference to + * that transport intermediary. This information can be used for debugging + * purposes. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Eventarc\V1\Transport|null + */ + public function getTransport() + { + return $this->transport; + } + + public function hasTransport() + { + return isset($this->transport); + } + + public function clearTransport() + { + unset($this->transport); + } + + /** + * Optional. To deliver messages, Eventarc might use other GCP + * products as a transport intermediary. This field contains a reference to + * that transport intermediary. This information can be used for debugging + * purposes. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Eventarc\V1\Transport $var + * @return $this + */ + public function setTransport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Transport::class); + $this->transport = $var; + + return $this; + } + + /** + * Optional. User labels attached to the triggers that can be used to group resources. + * + * Generated from protobuf field map labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. User labels attached to the triggers that can be used to group resources. + * + * Generated from protobuf field map labels = 12 [(.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 name of the channel associated with the trigger in + * `projects/{project}/locations/{location}/channels/{channel}` format. + * You must provide a channel to receive events from Eventarc SaaS partners. + * + * Generated from protobuf field string channel = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Optional. The name of the channel associated with the trigger in + * `projects/{project}/locations/{location}/channels/{channel}` format. + * You must provide a channel to receive events from Eventarc SaaS partners. + * + * Generated from protobuf field string channel = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + + /** + * Output only. The reason(s) why a trigger is in FAILED state. + * + * Generated from protobuf field map conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getConditions() + { + return $this->conditions; + } + + /** + * Output only. The reason(s) why a trigger is in FAILED state. + * + * Generated from protobuf field map conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setConditions($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\StateCondition::class); + $this->conditions = $arr; + + return $this; + } + + /** + * Output only. This checksum is computed by the server based on the value of other + * fields, and might be sent only on create requests to ensure that the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. This checksum is computed by the server based on the value of other + * fields, and might be sent only on create requests to ensure that the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateChannelRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateChannelRequest.php new file mode 100644 index 000000000000..8db95563a9b1 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateChannelRequest.php @@ -0,0 +1,167 @@ +google.cloud.eventarc.v1.UpdateChannelRequest + */ +class UpdateChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The channel to be updated. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Channel channel = 1; + */ + protected $channel = null; + /** + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Eventarc\V1\Channel $channel + * The channel to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * @type bool $validate_only + * Required. If set, validate the request and preview the review, but do not + * post it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * The channel to be updated. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Channel channel = 1; + * @return \Google\Cloud\Eventarc\V1\Channel|null + */ + public function getChannel() + { + return $this->channel; + } + + public function hasChannel() + { + return isset($this->channel); + } + + public function clearChannel() + { + unset($this->channel); + } + + /** + * The channel to be updated. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Channel channel = 1; + * @param \Google\Cloud\Eventarc\V1\Channel $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Channel::class); + $this->channel = $var; + + return $this; + } + + /** + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * + * 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); + } + + /** + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * + * 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 set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateGoogleChannelConfigRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateGoogleChannelConfigRequest.php new file mode 100644 index 000000000000..f73c1d6bb610 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateGoogleChannelConfigRequest.php @@ -0,0 +1,129 @@ +google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest + */ +class UpdateGoogleChannelConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The config to be updated. + * + * Generated from protobuf field .google.cloud.eventarc.v1.GoogleChannelConfig google_channel_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $google_channel_config = null; + /** + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Eventarc\V1\GoogleChannelConfig $google_channel_config + * Required. The config to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * Required. The config to be updated. + * + * Generated from protobuf field .google.cloud.eventarc.v1.GoogleChannelConfig google_channel_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Eventarc\V1\GoogleChannelConfig|null + */ + public function getGoogleChannelConfig() + { + return $this->google_channel_config; + } + + public function hasGoogleChannelConfig() + { + return isset($this->google_channel_config); + } + + public function clearGoogleChannelConfig() + { + unset($this->google_channel_config); + } + + /** + * Required. The config to be updated. + * + * Generated from protobuf field .google.cloud.eventarc.v1.GoogleChannelConfig google_channel_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Eventarc\V1\GoogleChannelConfig $var + * @return $this + */ + public function setGoogleChannelConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\GoogleChannelConfig::class); + $this->google_channel_config = $var; + + return $this; + } + + /** + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * + * 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); + } + + /** + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * + * 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateTriggerRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateTriggerRequest.php new file mode 100644 index 000000000000..a0b83659f1c1 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateTriggerRequest.php @@ -0,0 +1,205 @@ +google.cloud.eventarc.v1.UpdateTriggerRequest + */ +class UpdateTriggerRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The trigger to be updated. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Trigger trigger = 1; + */ + protected $trigger = null; + /** + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + /** + * If set to true, and the trigger is not found, a new trigger will be + * created. In this situation, `update_mask` is ignored. + * + * Generated from protobuf field bool allow_missing = 3; + */ + protected $allow_missing = false; + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Eventarc\V1\Trigger $trigger + * The trigger to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * @type bool $allow_missing + * If set to true, and the trigger is not found, a new trigger will be + * created. In this situation, `update_mask` is ignored. + * @type bool $validate_only + * Required. If set, validate the request and preview the review, but do not + * post it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); + parent::__construct($data); + } + + /** + * The trigger to be updated. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Trigger trigger = 1; + * @return \Google\Cloud\Eventarc\V1\Trigger|null + */ + public function getTrigger() + { + return $this->trigger; + } + + public function hasTrigger() + { + return isset($this->trigger); + } + + public function clearTrigger() + { + unset($this->trigger); + } + + /** + * The trigger to be updated. + * + * Generated from protobuf field .google.cloud.eventarc.v1.Trigger trigger = 1; + * @param \Google\Cloud\Eventarc\V1\Trigger $var + * @return $this + */ + public function setTrigger($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Trigger::class); + $this->trigger = $var; + + return $this; + } + + /** + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * + * 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); + } + + /** + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * + * 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; + } + + /** + * If set to true, and the trigger is not found, a new trigger will be + * created. In this situation, `update_mask` is ignored. + * + * Generated from protobuf field bool allow_missing = 3; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the trigger is not found, a new trigger will be + * created. In this situation, `update_mask` is ignored. + * + * Generated from protobuf field bool allow_missing = 3; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Required. If set, validate the request and preview the review, but do not + * post it. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel.php new file mode 100644 index 000000000000..164b9f039fcb --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel.php @@ -0,0 +1,95 @@ +setName($channelName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $eventarcClient->createChannel($formattedParent, $channel, $channelId, $validateOnly); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Channel $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = EventarcClient::locationName('[PROJECT]', '[LOCATION]'); + $channelName = '[NAME]'; + $channelId = '[CHANNEL_ID]'; + $validateOnly = false; + + create_channel_sample($formattedParent, $channelName, $channelId, $validateOnly); +} +// [END eventarc_v1_generated_Eventarc_CreateChannel_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel_connection.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel_connection.php new file mode 100644 index 000000000000..67ab2376ffde --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel_connection.php @@ -0,0 +1,110 @@ +setName($channelConnectionName) + ->setChannel($formattedChannelConnectionChannel); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $eventarcClient->createChannelConnection( + $formattedParent, + $channelConnection, + $channelConnectionId + ); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ChannelConnection $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = EventarcClient::locationName('[PROJECT]', '[LOCATION]'); + $channelConnectionName = '[NAME]'; + $formattedChannelConnectionChannel = EventarcClient::channelName( + '[PROJECT]', + '[LOCATION]', + '[CHANNEL]' + ); + $channelConnectionId = '[CHANNEL_CONNECTION_ID]'; + + create_channel_connection_sample( + $formattedParent, + $channelConnectionName, + $formattedChannelConnectionChannel, + $channelConnectionId + ); +} +// [END eventarc_v1_generated_Eventarc_CreateChannelConnection_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_trigger.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_trigger.php new file mode 100644 index 000000000000..88f2cacdda46 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_trigger.php @@ -0,0 +1,120 @@ +setAttribute($triggerEventFiltersAttribute) + ->setValue($triggerEventFiltersValue); + $triggerEventFilters = [$eventFilter,]; + $triggerDestination = new Destination(); + $trigger = (new Trigger()) + ->setName($triggerName) + ->setEventFilters($triggerEventFilters) + ->setDestination($triggerDestination); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $eventarcClient->createTrigger($formattedParent, $trigger, $triggerId, $validateOnly); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Trigger $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = EventarcClient::locationName('[PROJECT]', '[LOCATION]'); + $triggerName = '[NAME]'; + $triggerEventFiltersAttribute = '[ATTRIBUTE]'; + $triggerEventFiltersValue = '[VALUE]'; + $triggerId = '[TRIGGER_ID]'; + $validateOnly = false; + + create_trigger_sample( + $formattedParent, + $triggerName, + $triggerEventFiltersAttribute, + $triggerEventFiltersValue, + $triggerId, + $validateOnly + ); +} +// [END eventarc_v1_generated_Eventarc_CreateTrigger_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel.php new file mode 100644 index 000000000000..4a471830c008 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel.php @@ -0,0 +1,81 @@ +deleteChannel($formattedName, $validateOnly); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Channel $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EventarcClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $validateOnly = false; + + delete_channel_sample($formattedName, $validateOnly); +} +// [END eventarc_v1_generated_Eventarc_DeleteChannel_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel_connection.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel_connection.php new file mode 100644 index 000000000000..36fb880d2413 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel_connection.php @@ -0,0 +1,82 @@ +deleteChannelConnection($formattedName); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ChannelConnection $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EventarcClient::channelConnectionName( + '[PROJECT]', + '[LOCATION]', + '[CHANNEL_CONNECTION]' + ); + + delete_channel_connection_sample($formattedName); +} +// [END eventarc_v1_generated_Eventarc_DeleteChannelConnection_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_trigger.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_trigger.php new file mode 100644 index 000000000000..8f1af523b52d --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_trigger.php @@ -0,0 +1,81 @@ +deleteTrigger($formattedName, $validateOnly); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Trigger $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EventarcClient::triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); + $validateOnly = false; + + delete_trigger_sample($formattedName, $validateOnly); +} +// [END eventarc_v1_generated_Eventarc_DeleteTrigger_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel.php new file mode 100644 index 000000000000..e0733ae6e8b0 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel.php @@ -0,0 +1,66 @@ +getChannel($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EventarcClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + + get_channel_sample($formattedName); +} +// [END eventarc_v1_generated_Eventarc_GetChannel_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel_connection.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel_connection.php new file mode 100644 index 000000000000..c5e2262fa0e6 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel_connection.php @@ -0,0 +1,70 @@ +getChannelConnection($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EventarcClient::channelConnectionName( + '[PROJECT]', + '[LOCATION]', + '[CHANNEL_CONNECTION]' + ); + + get_channel_connection_sample($formattedName); +} +// [END eventarc_v1_generated_Eventarc_GetChannelConnection_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_google_channel_config.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_google_channel_config.php new file mode 100644 index 000000000000..fe50bf3a1b4a --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_google_channel_config.php @@ -0,0 +1,66 @@ +getGoogleChannelConfig($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EventarcClient::googleChannelConfigName('[PROJECT]', '[LOCATION]'); + + get_google_channel_config_sample($formattedName); +} +// [END eventarc_v1_generated_Eventarc_GetGoogleChannelConfig_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_iam_policy.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_iam_policy.php new file mode 100644 index 000000000000..d8f6c1956bc9 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_iam_policy.php @@ -0,0 +1,67 @@ +getIamPolicy($resource); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 eventarc_v1_generated_Eventarc_GetIamPolicy_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_location.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_location.php new file mode 100644 index 000000000000..d00bf2fa6e65 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END eventarc_v1_generated_Eventarc_GetLocation_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_provider.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_provider.php new file mode 100644 index 000000000000..79869c9e11a0 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_provider.php @@ -0,0 +1,66 @@ +getProvider($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EventarcClient::providerName('[PROJECT]', '[LOCATION]', '[PROVIDER]'); + + get_provider_sample($formattedName); +} +// [END eventarc_v1_generated_Eventarc_GetProvider_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_trigger.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_trigger.php new file mode 100644 index 000000000000..5b7d467a9eb0 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_trigger.php @@ -0,0 +1,66 @@ +getTrigger($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EventarcClient::triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); + + get_trigger_sample($formattedName); +} +// [END eventarc_v1_generated_Eventarc_GetTrigger_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channel_connections.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channel_connections.php new file mode 100644 index 000000000000..82c3f9598bf2 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channel_connections.php @@ -0,0 +1,71 @@ +listChannelConnections($formattedParent); + + /** @var ChannelConnection $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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]'); + + list_channel_connections_sample($formattedParent); +} +// [END eventarc_v1_generated_Eventarc_ListChannelConnections_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channels.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channels.php new file mode 100644 index 000000000000..4d674a11304c --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channels.php @@ -0,0 +1,71 @@ +listChannels($formattedParent); + + /** @var Channel $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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]'); + + list_channels_sample($formattedParent); +} +// [END eventarc_v1_generated_Eventarc_ListChannels_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_locations.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_locations.php new file mode 100644 index 000000000000..5ed58dff959e --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @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 eventarc_v1_generated_Eventarc_ListLocations_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_providers.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_providers.php new file mode 100644 index 000000000000..d875caad0cb4 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_providers.php @@ -0,0 +1,71 @@ +listProviders($formattedParent); + + /** @var Provider $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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]'); + + list_providers_sample($formattedParent); +} +// [END eventarc_v1_generated_Eventarc_ListProviders_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_triggers.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_triggers.php new file mode 100644 index 000000000000..7b1d7ce1aa62 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_triggers.php @@ -0,0 +1,71 @@ +listTriggers($formattedParent); + + /** @var Trigger $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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]'); + + list_triggers_sample($formattedParent); +} +// [END eventarc_v1_generated_Eventarc_ListTriggers_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/set_iam_policy.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/set_iam_policy.php new file mode 100644 index 000000000000..a7abf762d384 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/set_iam_policy.php @@ -0,0 +1,73 @@ +setIamPolicy($resource, $policy); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 eventarc_v1_generated_Eventarc_SetIamPolicy_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/test_iam_permissions.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/test_iam_permissions.php new file mode 100644 index 000000000000..cf61f9b20151 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/test_iam_permissions.php @@ -0,0 +1,80 @@ +testIamPermissions($resource, $permissions); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 eventarc_v1_generated_Eventarc_TestIamPermissions_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_channel.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_channel.php new file mode 100644 index 000000000000..53bd582aaf80 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_channel.php @@ -0,0 +1,78 @@ +updateChannel($validateOnly); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Channel $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $validateOnly = false; + + update_channel_sample($validateOnly); +} +// [END eventarc_v1_generated_Eventarc_UpdateChannel_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_google_channel_config.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_google_channel_config.php new file mode 100644 index 000000000000..30fd8ab25010 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_google_channel_config.php @@ -0,0 +1,70 @@ +setName($googleChannelConfigName); + + // Call the API and handle any network failures. + try { + /** @var GoogleChannelConfig $response */ + $response = $eventarcClient->updateGoogleChannelConfig($googleChannelConfig); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $googleChannelConfigName = '[NAME]'; + + update_google_channel_config_sample($googleChannelConfigName); +} +// [END eventarc_v1_generated_Eventarc_UpdateGoogleChannelConfig_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_trigger.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_trigger.php new file mode 100644 index 000000000000..156e628a5607 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_trigger.php @@ -0,0 +1,78 @@ +updateTrigger($validateOnly); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Trigger $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $validateOnly = false; + + update_trigger_sample($validateOnly); +} +// [END eventarc_v1_generated_Eventarc_UpdateTrigger_sync] diff --git a/owl-bot-staging/Eventarc/v1/src/V1/EventarcClient.php b/owl-bot-staging/Eventarc/v1/src/V1/EventarcClient.php new file mode 100644 index 000000000000..8e718fa04749 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/src/V1/EventarcClient.php @@ -0,0 +1,34 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $channel = new Channel(); + * $channelId = 'channel_id'; + * $validateOnly = false; + * $operationResponse = $eventarcClient->createChannel($formattedParent, $channel, $channelId, $validateOnly); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $eventarcClient->createChannel($formattedParent, $channel, $channelId, $validateOnly); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'createChannel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $eventarcClient->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. + */ +class EventarcGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.eventarc.v1.Eventarc'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'eventarc.googleapis.com'; + + /** 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 $channelNameTemplate; + + private static $channelConnectionNameTemplate; + + private static $cryptoKeyNameTemplate; + + private static $googleChannelConfigNameTemplate; + + private static $locationNameTemplate; + + private static $providerNameTemplate; + + private static $serviceAccountNameTemplate; + + private static $triggerNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/eventarc_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/eventarc_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/eventarc_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/eventarc_rest_client_config.php', + ], + ], + ]; + } + + private static function getChannelNameTemplate() + { + if (self::$channelNameTemplate == null) { + self::$channelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/channels/{channel}'); + } + + return self::$channelNameTemplate; + } + + private static function getChannelConnectionNameTemplate() + { + if (self::$channelConnectionNameTemplate == null) { + self::$channelConnectionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/channelConnections/{channel_connection}'); + } + + return self::$channelConnectionNameTemplate; + } + + private static function getCryptoKeyNameTemplate() + { + if (self::$cryptoKeyNameTemplate == null) { + self::$cryptoKeyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}'); + } + + return self::$cryptoKeyNameTemplate; + } + + private static function getGoogleChannelConfigNameTemplate() + { + if (self::$googleChannelConfigNameTemplate == null) { + self::$googleChannelConfigNameTemplate = new PathTemplate('projects/{project}/locations/{location}/googleChannelConfig'); + } + + return self::$googleChannelConfigNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getProviderNameTemplate() + { + if (self::$providerNameTemplate == null) { + self::$providerNameTemplate = new PathTemplate('projects/{project}/locations/{location}/providers/{provider}'); + } + + return self::$providerNameTemplate; + } + + private static function getServiceAccountNameTemplate() + { + if (self::$serviceAccountNameTemplate == null) { + self::$serviceAccountNameTemplate = new PathTemplate('projects/{project}/serviceAccounts/{service_account}'); + } + + return self::$serviceAccountNameTemplate; + } + + private static function getTriggerNameTemplate() + { + if (self::$triggerNameTemplate == null) { + self::$triggerNameTemplate = new PathTemplate('projects/{project}/locations/{location}/triggers/{trigger}'); + } + + return self::$triggerNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'channel' => self::getChannelNameTemplate(), + 'channelConnection' => self::getChannelConnectionNameTemplate(), + 'cryptoKey' => self::getCryptoKeyNameTemplate(), + 'googleChannelConfig' => self::getGoogleChannelConfigNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'provider' => self::getProviderNameTemplate(), + 'serviceAccount' => self::getServiceAccountNameTemplate(), + 'trigger' => self::getTriggerNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a channel + * resource. + * + * @param string $project + * @param string $location + * @param string $channel + * + * @return string The formatted channel resource. + */ + public static function channelName($project, $location, $channel) + { + return self::getChannelNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'channel' => $channel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * channel_connection resource. + * + * @param string $project + * @param string $location + * @param string $channelConnection + * + * @return string The formatted channel_connection resource. + */ + public static function channelConnectionName($project, $location, $channelConnection) + { + return self::getChannelConnectionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'channel_connection' => $channelConnection, + ]); + } + + /** + * 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($project, $location, $keyRing, $cryptoKey) + { + return self::getCryptoKeyNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * google_channel_config resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted google_channel_config resource. + */ + public static function googleChannelConfigName($project, $location) + { + return self::getGoogleChannelConfigNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * 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($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a provider + * resource. + * + * @param string $project + * @param string $location + * @param string $provider + * + * @return string The formatted provider resource. + */ + public static function providerName($project, $location, $provider) + { + return self::getProviderNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'provider' => $provider, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * service_account resource. + * + * @param string $project + * @param string $serviceAccount + * + * @return string The formatted service_account resource. + */ + public static function serviceAccountName($project, $serviceAccount) + { + return self::getServiceAccountNameTemplate()->render([ + 'project' => $project, + 'service_account' => $serviceAccount, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a trigger + * resource. + * + * @param string $project + * @param string $location + * @param string $trigger + * + * @return string The formatted trigger resource. + */ + public static function triggerName($project, $location, $trigger) + { + return self::getTriggerNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'trigger' => $trigger, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - channel: projects/{project}/locations/{location}/channels/{channel} + * - channelConnection: projects/{project}/locations/{location}/channelConnections/{channel_connection} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - googleChannelConfig: projects/{project}/locations/{location}/googleChannelConfig + * - location: projects/{project}/locations/{location} + * - provider: projects/{project}/locations/{location}/providers/{provider} + * - serviceAccount: projects/{project}/serviceAccounts/{service_account} + * - trigger: projects/{project}/locations/{location}/triggers/{trigger} + * + * 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"); + } + + /** + * 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; + } + + /** + * 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 'eventarc.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Create a new channel in a particular project and location. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $formattedParent = $eventarcClient->locationName('[PROJECT]', '[LOCATION]'); + * $channel = new Channel(); + * $channelId = 'channel_id'; + * $validateOnly = false; + * $operationResponse = $eventarcClient->createChannel($formattedParent, $channel, $channelId, $validateOnly); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $eventarcClient->createChannel($formattedParent, $channel, $channelId, $validateOnly); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'createChannel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent collection in which to add this channel. + * @param Channel $channel Required. The channel to create. + * @param string $channelId Required. The user-provided ID to be assigned to the channel. + * @param bool $validateOnly Required. If set, validate the request and preview the review, but do not + * post it. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createChannel($parent, $channel, $channelId, $validateOnly, array $optionalArgs = []) + { + $request = new CreateChannelRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setChannel($channel); + $request->setChannelId($channelId); + $request->setValidateOnly($validateOnly); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Create a new ChannelConnection in a particular project and location. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $formattedParent = $eventarcClient->locationName('[PROJECT]', '[LOCATION]'); + * $channelConnection = new ChannelConnection(); + * $channelConnectionId = 'channel_connection_id'; + * $operationResponse = $eventarcClient->createChannelConnection($formattedParent, $channelConnection, $channelConnectionId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $eventarcClient->createChannelConnection($formattedParent, $channelConnection, $channelConnectionId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'createChannelConnection'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent collection in which to add this channel connection. + * @param ChannelConnection $channelConnection Required. Channel connection to create. + * @param string $channelConnectionId Required. The user-provided ID to be assigned to the channel connection. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createChannelConnection($parent, $channelConnection, $channelConnectionId, array $optionalArgs = []) + { + $request = new CreateChannelConnectionRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setChannelConnection($channelConnection); + $request->setChannelConnectionId($channelConnectionId); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateChannelConnection', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Create a new trigger in a particular project and location. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $formattedParent = $eventarcClient->locationName('[PROJECT]', '[LOCATION]'); + * $trigger = new Trigger(); + * $triggerId = 'trigger_id'; + * $validateOnly = false; + * $operationResponse = $eventarcClient->createTrigger($formattedParent, $trigger, $triggerId, $validateOnly); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $eventarcClient->createTrigger($formattedParent, $trigger, $triggerId, $validateOnly); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'createTrigger'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent collection in which to add this trigger. + * @param Trigger $trigger Required. The trigger to create. + * @param string $triggerId Required. The user-provided ID to be assigned to the trigger. + * @param bool $validateOnly Required. If set, validate the request and preview the review, but do not + * post it. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createTrigger($parent, $trigger, $triggerId, $validateOnly, array $optionalArgs = []) + { + $request = new CreateTriggerRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setTrigger($trigger); + $request->setTriggerId($triggerId); + $request->setValidateOnly($validateOnly); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateTrigger', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Delete a single channel. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $formattedName = $eventarcClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + * $validateOnly = false; + * $operationResponse = $eventarcClient->deleteChannel($formattedName, $validateOnly); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $eventarcClient->deleteChannel($formattedName, $validateOnly); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'deleteChannel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the channel to be deleted. + * @param bool $validateOnly Required. If set, validate the request and preview the review, but do not + * post it. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteChannel($name, $validateOnly, array $optionalArgs = []) + { + $request = new DeleteChannelRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setValidateOnly($validateOnly); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Delete a single ChannelConnection. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $formattedName = $eventarcClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]'); + * $operationResponse = $eventarcClient->deleteChannelConnection($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $eventarcClient->deleteChannelConnection($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'deleteChannelConnection'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the channel connection to delete. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteChannelConnection($name, array $optionalArgs = []) + { + $request = new DeleteChannelConnectionRequest(); + $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->startOperationsCall('DeleteChannelConnection', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Delete a single trigger. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $formattedName = $eventarcClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); + * $validateOnly = false; + * $operationResponse = $eventarcClient->deleteTrigger($formattedName, $validateOnly); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $eventarcClient->deleteTrigger($formattedName, $validateOnly); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'deleteTrigger'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the trigger to be deleted. + * @param bool $validateOnly Required. If set, validate the request and preview the review, but do not + * post it. + * @param array $optionalArgs { + * Optional. + * + * @type string $etag + * If provided, the trigger will only be deleted if the etag matches the + * current etag on the resource. + * @type bool $allowMissing + * If set to true, and the trigger is not found, the request will succeed + * but no action will be taken on the server. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteTrigger($name, $validateOnly, array $optionalArgs = []) + { + $request = new DeleteTriggerRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setValidateOnly($validateOnly); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + if (isset($optionalArgs['allowMissing'])) { + $request->setAllowMissing($optionalArgs['allowMissing']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteTrigger', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Get a single Channel. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $formattedName = $eventarcClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + * $response = $eventarcClient->getChannel($formattedName); + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the channel to get. + * @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\Eventarc\V1\Channel + * + * @throws ApiException if the remote call fails + */ + public function getChannel($name, array $optionalArgs = []) + { + $request = new GetChannelRequest(); + $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('GetChannel', Channel::class, $optionalArgs, $request)->wait(); + } + + /** + * Get a single ChannelConnection. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $formattedName = $eventarcClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]'); + * $response = $eventarcClient->getChannelConnection($formattedName); + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the channel connection to get. + * @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\Eventarc\V1\ChannelConnection + * + * @throws ApiException if the remote call fails + */ + public function getChannelConnection($name, array $optionalArgs = []) + { + $request = new GetChannelConnectionRequest(); + $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('GetChannelConnection', ChannelConnection::class, $optionalArgs, $request)->wait(); + } + + /** + * Get a GoogleChannelConfig + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $formattedName = $eventarcClient->googleChannelConfigName('[PROJECT]', '[LOCATION]'); + * $response = $eventarcClient->getGoogleChannelConfig($formattedName); + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the config to get. + * @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\Eventarc\V1\GoogleChannelConfig + * + * @throws ApiException if the remote call fails + */ + public function getGoogleChannelConfig($name, array $optionalArgs = []) + { + $request = new GetGoogleChannelConfigRequest(); + $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('GetGoogleChannelConfig', GoogleChannelConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Get a single Provider. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $formattedName = $eventarcClient->providerName('[PROJECT]', '[LOCATION]', '[PROVIDER]'); + * $response = $eventarcClient->getProvider($formattedName); + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the provider to get. + * @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\Eventarc\V1\Provider + * + * @throws ApiException if the remote call fails + */ + public function getProvider($name, array $optionalArgs = []) + { + $request = new GetProviderRequest(); + $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('GetProvider', Provider::class, $optionalArgs, $request)->wait(); + } + + /** + * Get a single trigger. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $formattedName = $eventarcClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); + * $response = $eventarcClient->getTrigger($formattedName); + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the trigger to get. + * @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\Eventarc\V1\Trigger + * + * @throws ApiException if the remote call fails + */ + public function getTrigger($name, array $optionalArgs = []) + { + $request = new GetTriggerRequest(); + $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('GetTrigger', Trigger::class, $optionalArgs, $request)->wait(); + } + + /** + * List channel connections. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $formattedParent = $eventarcClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $eventarcClient->listChannelConnections($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $eventarcClient->listChannelConnections($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent collection from which to list channel connections. + * @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 listChannelConnections($parent, array $optionalArgs = []) + { + $request = new ListChannelConnectionsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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('ListChannelConnections', $optionalArgs, ListChannelConnectionsResponse::class, $request); + } + + /** + * List channels. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $formattedParent = $eventarcClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $eventarcClient->listChannels($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $eventarcClient->listChannels($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent collection to list channels on. + * @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 $orderBy + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, channel_id`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listChannels($parent, array $optionalArgs = []) + { + $request = new ListChannelsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListChannels', $optionalArgs, ListChannelsResponse::class, $request); + } + + /** + * List providers. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $formattedParent = $eventarcClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $eventarcClient->listProviders($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $eventarcClient->listProviders($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent of the provider to get. + * @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 $orderBy + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting oder is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, _id`. + * @type string $filter + * The filter field that the list request will filter on. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listProviders($parent, array $optionalArgs = []) + { + $request = new ListProvidersRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListProviders', $optionalArgs, ListProvidersResponse::class, $request); + } + + /** + * List triggers. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $formattedParent = $eventarcClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $eventarcClient->listTriggers($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $eventarcClient->listTriggers($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent collection to list triggers on. + * @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 $orderBy + * The sorting order of the resources returned. Value should be a + * comma-separated list of fields. The default sorting order is ascending. To + * specify descending order for a field, append a `desc` suffix; for example: + * `name desc, trigger_id`. + * @type string $filter + * Filter field. Used to filter the Triggers to be listed. Possible filters + * are described in https://google.aip.dev/160. For example, using + * "?filter=destination:gke" would list only Triggers with a gke destination. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listTriggers($parent, array $optionalArgs = []) + { + $request = new ListTriggersRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListTriggers', $optionalArgs, ListTriggersResponse::class, $request); + } + + /** + * Update a single channel. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $validateOnly = false; + * $operationResponse = $eventarcClient->updateChannel($validateOnly); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $eventarcClient->updateChannel($validateOnly); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'updateChannel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param bool $validateOnly Required. If set, validate the request and preview the review, but do not + * post it. + * @param array $optionalArgs { + * Optional. + * + * @type Channel $channel + * The channel to be updated. + * @type FieldMask $updateMask + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateChannel($validateOnly, array $optionalArgs = []) + { + $request = new UpdateChannelRequest(); + $requestParamHeaders = []; + $request->setValidateOnly($validateOnly); + if (isset($optionalArgs['channel'])) { + $request->setChannel($optionalArgs['channel']); + } + + 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->startOperationsCall('UpdateChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Update a single GoogleChannelConfig + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $googleChannelConfig = new GoogleChannelConfig(); + * $response = $eventarcClient->updateGoogleChannelConfig($googleChannelConfig); + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param GoogleChannelConfig $googleChannelConfig Required. The config to be updated. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Eventarc\V1\GoogleChannelConfig + * + * @throws ApiException if the remote call fails + */ + public function updateGoogleChannelConfig($googleChannelConfig, array $optionalArgs = []) + { + $request = new UpdateGoogleChannelConfigRequest(); + $requestParamHeaders = []; + $request->setGoogleChannelConfig($googleChannelConfig); + $requestParamHeaders['google_channel_config.name'] = $googleChannelConfig->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('UpdateGoogleChannelConfig', GoogleChannelConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Update a single trigger. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $validateOnly = false; + * $operationResponse = $eventarcClient->updateTrigger($validateOnly); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $eventarcClient->updateTrigger($validateOnly); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'updateTrigger'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param bool $validateOnly Required. If set, validate the request and preview the review, but do not + * post it. + * @param array $optionalArgs { + * Optional. + * + * @type Trigger $trigger + * The trigger to be updated. + * @type FieldMask $updateMask + * The fields to be updated; only fields explicitly provided are updated. + * If no field mask is provided, all provided fields in the request are + * updated. To update all fields, provide a field mask of "*". + * @type bool $allowMissing + * If set to true, and the trigger is not found, a new trigger will be + * created. In this situation, `update_mask` is ignored. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateTrigger($validateOnly, array $optionalArgs = []) + { + $request = new UpdateTriggerRequest(); + $requestParamHeaders = []; + $request->setValidateOnly($validateOnly); + if (isset($optionalArgs['trigger'])) { + $request->setTrigger($optionalArgs['trigger']); + } + + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + if (isset($optionalArgs['allowMissing'])) { + $request->setAllowMissing($optionalArgs['allowMissing']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateTrigger', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $response = $eventarcClient->getLocation(); + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $eventarcClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $eventarcClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $resource = 'resource'; + * $response = $eventarcClient->getIamPolicy($resource); + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $eventarcClient->setIamPolicy($resource, $policy); + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + 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('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->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. + * + * Sample code: + * ``` + * $eventarcClient = new EventarcClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $eventarcClient->testIamPermissions($resource, $permissions); + * } finally { + * $eventarcClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @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\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } +} diff --git a/owl-bot-staging/Eventarc/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Eventarc/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..ac94c299f66f --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/src/V1/gapic_metadata.json @@ -0,0 +1,133 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.eventarc.v1", + "libraryPackage": "Google\\Cloud\\Eventarc\\V1", + "services": { + "Eventarc": { + "clients": { + "grpc": { + "libraryClient": "EventarcGapicClient", + "rpcs": { + "CreateChannel": { + "methods": [ + "createChannel" + ] + }, + "CreateChannelConnection": { + "methods": [ + "createChannelConnection" + ] + }, + "CreateTrigger": { + "methods": [ + "createTrigger" + ] + }, + "DeleteChannel": { + "methods": [ + "deleteChannel" + ] + }, + "DeleteChannelConnection": { + "methods": [ + "deleteChannelConnection" + ] + }, + "DeleteTrigger": { + "methods": [ + "deleteTrigger" + ] + }, + "GetChannel": { + "methods": [ + "getChannel" + ] + }, + "GetChannelConnection": { + "methods": [ + "getChannelConnection" + ] + }, + "GetGoogleChannelConfig": { + "methods": [ + "getGoogleChannelConfig" + ] + }, + "GetProvider": { + "methods": [ + "getProvider" + ] + }, + "GetTrigger": { + "methods": [ + "getTrigger" + ] + }, + "ListChannelConnections": { + "methods": [ + "listChannelConnections" + ] + }, + "ListChannels": { + "methods": [ + "listChannels" + ] + }, + "ListProviders": { + "methods": [ + "listProviders" + ] + }, + "ListTriggers": { + "methods": [ + "listTriggers" + ] + }, + "UpdateChannel": { + "methods": [ + "updateChannel" + ] + }, + "UpdateGoogleChannelConfig": { + "methods": [ + "updateGoogleChannelConfig" + ] + }, + "UpdateTrigger": { + "methods": [ + "updateTrigger" + ] + }, + "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/Eventarc/v1/src/V1/resources/eventarc_client_config.json b/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_client_config.json new file mode 100644 index 000000000000..31759d36a3b7 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_client_config.json @@ -0,0 +1,137 @@ +{ + "interfaces": { + "google.cloud.eventarc.v1.Eventarc": { + "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": { + "CreateChannel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateChannelConnection": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateTrigger": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteChannel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteChannelConnection": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteTrigger": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetChannel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetChannelConnection": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetGoogleChannelConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetProvider": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetTrigger": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListChannelConnections": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListChannels": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListProviders": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListTriggers": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateChannel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateGoogleChannelConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateTrigger": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_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" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_descriptor_config.php b/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_descriptor_config.php new file mode 100644 index 000000000000..6a9e66d1906a --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_descriptor_config.php @@ -0,0 +1,138 @@ + [ + 'google.cloud.eventarc.v1.Eventarc' => [ + 'CreateChannel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Channel', + 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'CreateChannelConnection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Eventarc\V1\ChannelConnection', + 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'CreateTrigger' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Trigger', + 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteChannel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Channel', + 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteChannelConnection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Eventarc\V1\ChannelConnection', + 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteTrigger' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Trigger', + 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateChannel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Channel', + 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateTrigger' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Trigger', + 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListChannelConnections' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getChannelConnections', + ], + ], + 'ListChannels' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getChannels', + ], + ], + 'ListProviders' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getProviders', + ], + ], + 'ListTriggers' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTriggers', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_rest_client_config.php b/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_rest_client_config.php new file mode 100644 index 000000000000..1618910026c6 --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_rest_client_config.php @@ -0,0 +1,381 @@ + [ + 'google.cloud.eventarc.v1.Eventarc' => [ + 'CreateChannel' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channels', + 'body' => 'channel', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'channel_id', + 'validate_only', + ], + ], + 'CreateChannelConnection' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channelConnections', + 'body' => 'channel_connection', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'channel_connection_id', + ], + ], + 'CreateTrigger' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/triggers', + 'body' => 'trigger', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'trigger_id', + 'validate_only', + ], + ], + 'DeleteChannel' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + 'queryParams' => [ + 'validate_only', + ], + ], + 'DeleteChannelConnection' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channelConnections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTrigger' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/triggers/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + 'queryParams' => [ + 'validate_only', + ], + ], + 'GetChannel' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetChannelConnection' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channelConnections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGoogleChannelConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/googleChannelConfig}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetProvider' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/providers/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTrigger' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/triggers/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListChannelConnections' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channelConnections', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListChannels' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channels', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListProviders' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/providers', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTriggers' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/triggers', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateChannel' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{channel.name=projects/*/locations/*/channels/*}', + 'body' => 'channel', + 'placeholders' => [ + 'channel.name' => [ + 'getters' => [ + 'getChannel', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'validate_only', + ], + ], + 'UpdateGoogleChannelConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{google_channel_config.name=projects/*/locations/*/googleChannelConfig}', + 'body' => 'google_channel_config', + 'placeholders' => [ + 'google_channel_config.name' => [ + 'getters' => [ + 'getGoogleChannelConfig', + 'getName', + ], + ], + ], + ], + 'UpdateTrigger' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{trigger.name=projects/*/locations/*/triggers/*}', + 'body' => 'trigger', + 'placeholders' => [ + 'trigger.name' => [ + 'getters' => [ + 'getTrigger', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'validate_only', + ], + ], + ], + '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.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/triggers/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/channels/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/channelConnections/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/triggers/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/channels/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/channelConnections/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/triggers/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/channels/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/channelConnections/*}: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/Eventarc/v1/tests/Unit/V1/EventarcClientTest.php b/owl-bot-staging/Eventarc/v1/tests/Unit/V1/EventarcClientTest.php new file mode 100644 index 000000000000..02a2327e835e --- /dev/null +++ b/owl-bot-staging/Eventarc/v1/tests/Unit/V1/EventarcClientTest.php @@ -0,0 +1,2136 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return EventarcClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new EventarcClient($options); + } + + /** @test */ + public function createChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $provider = 'provider-987494927'; + $pubsubTopic = 'pubsubTopic-338126829'; + $activationToken = 'activationToken1250030992'; + $cryptoKeyName = 'cryptoKeyName-184663511'; + $expectedResponse = new Channel(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setProvider($provider); + $expectedResponse->setPubsubTopic($pubsubTopic); + $expectedResponse->setActivationToken($activationToken); + $expectedResponse->setCryptoKeyName($cryptoKeyName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $channel = new Channel(); + $channelName = 'channelName273953326'; + $channel->setName($channelName); + $channelId = 'channelId-1930808873'; + $validateOnly = false; + $response = $gapicClient->createChannel($formattedParent, $channel, $channelId, $validateOnly); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/CreateChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getChannel(); + $this->assertProtobufEquals($channel, $actualValue); + $actualValue = $actualApiRequestObject->getChannelId(); + $this->assertProtobufEquals($channelId, $actualValue); + $actualValue = $actualApiRequestObject->getValidateOnly(); + $this->assertProtobufEquals($validateOnly, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createChannelTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $channel = new Channel(); + $channelName = 'channelName273953326'; + $channel->setName($channelName); + $channelId = 'channelId-1930808873'; + $validateOnly = false; + $response = $gapicClient->createChannel($formattedParent, $channel, $channelId, $validateOnly); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createChannelTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createChannelConnectionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createChannelConnectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $channel = 'channel738950403'; + $activationToken = 'activationToken1250030992'; + $expectedResponse = new ChannelConnection(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setChannel($channel); + $expectedResponse->setActivationToken($activationToken); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createChannelConnectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $channelConnection = new ChannelConnection(); + $channelConnectionName = 'channelConnectionName-46623124'; + $channelConnection->setName($channelConnectionName); + $channelConnectionChannel = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $channelConnection->setChannel($channelConnectionChannel); + $channelConnectionId = 'channelConnectionId-1611273248'; + $response = $gapicClient->createChannelConnection($formattedParent, $channelConnection, $channelConnectionId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/CreateChannelConnection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getChannelConnection(); + $this->assertProtobufEquals($channelConnection, $actualValue); + $actualValue = $actualApiRequestObject->getChannelConnectionId(); + $this->assertProtobufEquals($channelConnectionId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createChannelConnectionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createChannelConnectionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createChannelConnectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $channelConnection = new ChannelConnection(); + $channelConnectionName = 'channelConnectionName-46623124'; + $channelConnection->setName($channelConnectionName); + $channelConnectionChannel = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $channelConnection->setChannel($channelConnectionChannel); + $channelConnectionId = 'channelConnectionId-1611273248'; + $response = $gapicClient->createChannelConnection($formattedParent, $channelConnection, $channelConnectionId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createChannelConnectionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createTriggerTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTriggerTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $serviceAccount = 'serviceAccount-1948028253'; + $channel = 'channel738950403'; + $etag = 'etag3123477'; + $expectedResponse = new Trigger(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setChannel($channel); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createTriggerTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $trigger = new Trigger(); + $triggerName = 'triggerName-681138077'; + $trigger->setName($triggerName); + $triggerEventFilters = []; + $trigger->setEventFilters($triggerEventFilters); + $triggerDestination = new Destination(); + $trigger->setDestination($triggerDestination); + $triggerId = 'triggerId1363517698'; + $validateOnly = false; + $response = $gapicClient->createTrigger($formattedParent, $trigger, $triggerId, $validateOnly); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/CreateTrigger', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTrigger(); + $this->assertProtobufEquals($trigger, $actualValue); + $actualValue = $actualApiRequestObject->getTriggerId(); + $this->assertProtobufEquals($triggerId, $actualValue); + $actualValue = $actualApiRequestObject->getValidateOnly(); + $this->assertProtobufEquals($validateOnly, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTriggerTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createTriggerExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTriggerTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $trigger = new Trigger(); + $triggerName = 'triggerName-681138077'; + $trigger->setName($triggerName); + $triggerEventFilters = []; + $trigger->setEventFilters($triggerEventFilters); + $triggerDestination = new Destination(); + $trigger->setDestination($triggerDestination); + $triggerId = 'triggerId1363517698'; + $validateOnly = false; + $response = $gapicClient->createTrigger($formattedParent, $trigger, $triggerId, $validateOnly); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTriggerTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $provider = 'provider-987494927'; + $pubsubTopic = 'pubsubTopic-338126829'; + $activationToken = 'activationToken1250030992'; + $cryptoKeyName = 'cryptoKeyName-184663511'; + $expectedResponse = new Channel(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setProvider($provider); + $expectedResponse->setPubsubTopic($pubsubTopic); + $expectedResponse->setActivationToken($activationToken); + $expectedResponse->setCryptoKeyName($cryptoKeyName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $validateOnly = false; + $response = $gapicClient->deleteChannel($formattedName, $validateOnly); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeleteChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getValidateOnly(); + $this->assertProtobufEquals($validateOnly, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $validateOnly = false; + $response = $gapicClient->deleteChannel($formattedName, $validateOnly); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteChannelConnectionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteChannelConnectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $channel = 'channel738950403'; + $activationToken = 'activationToken1250030992'; + $expectedResponse = new ChannelConnection(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setChannel($channel); + $expectedResponse->setActivationToken($activationToken); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteChannelConnectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]'); + $response = $gapicClient->deleteChannelConnection($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeleteChannelConnection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteChannelConnectionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteChannelConnectionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteChannelConnectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]'); + $response = $gapicClient->deleteChannelConnection($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteChannelConnectionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTriggerTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTriggerTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $serviceAccount = 'serviceAccount-1948028253'; + $channel = 'channel738950403'; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Trigger(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setChannel($channel); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteTriggerTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); + $validateOnly = false; + $response = $gapicClient->deleteTrigger($formattedName, $validateOnly); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeleteTrigger', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getValidateOnly(); + $this->assertProtobufEquals($validateOnly, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTriggerTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTriggerExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTriggerTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); + $validateOnly = false; + $response = $gapicClient->deleteTrigger($formattedName, $validateOnly); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTriggerTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getChannelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $provider = 'provider-987494927'; + $pubsubTopic = 'pubsubTopic-338126829'; + $activationToken = 'activationToken1250030992'; + $cryptoKeyName = 'cryptoKeyName-184663511'; + $expectedResponse = new Channel(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setProvider($provider); + $expectedResponse->setPubsubTopic($pubsubTopic); + $expectedResponse->setActivationToken($activationToken); + $expectedResponse->setCryptoKeyName($cryptoKeyName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $response = $gapicClient->getChannel($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/GetChannel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getChannelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + try { + $gapicClient->getChannel($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 getChannelConnectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $channel = 'channel738950403'; + $activationToken = 'activationToken1250030992'; + $expectedResponse = new ChannelConnection(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setChannel($channel); + $expectedResponse->setActivationToken($activationToken); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]'); + $response = $gapicClient->getChannelConnection($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/GetChannelConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getChannelConnectionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]'); + try { + $gapicClient->getChannelConnection($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 getGoogleChannelConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $cryptoKeyName = 'cryptoKeyName-184663511'; + $expectedResponse = new GoogleChannelConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setCryptoKeyName($cryptoKeyName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->googleChannelConfigName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->getGoogleChannelConfig($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/GetGoogleChannelConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGoogleChannelConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->googleChannelConfigName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->getGoogleChannelConfig($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 getProviderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Provider(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->providerName('[PROJECT]', '[LOCATION]', '[PROVIDER]'); + $response = $gapicClient->getProvider($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/GetProvider', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProviderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->providerName('[PROJECT]', '[LOCATION]', '[PROVIDER]'); + try { + $gapicClient->getProvider($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 getTriggerTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $serviceAccount = 'serviceAccount-1948028253'; + $channel = 'channel738950403'; + $etag = 'etag3123477'; + $expectedResponse = new Trigger(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setChannel($channel); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); + $response = $gapicClient->getTrigger($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/GetTrigger', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTriggerExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); + try { + $gapicClient->getTrigger($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 listChannelConnectionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $channelConnectionsElement = new ChannelConnection(); + $channelConnections = [ + $channelConnectionsElement, + ]; + $expectedResponse = new ListChannelConnectionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setChannelConnections($channelConnections); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listChannelConnections($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getChannelConnections()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListChannelConnections', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listChannelConnectionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listChannelConnections($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 listChannelsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $channelsElement = new Channel(); + $channels = [ + $channelsElement, + ]; + $expectedResponse = new ListChannelsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setChannels($channels); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listChannels($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getChannels()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListChannels', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listChannelsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listChannels($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 listProvidersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $providersElement = new Provider(); + $providers = [ + $providersElement, + ]; + $expectedResponse = new ListProvidersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProviders($providers); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listProviders($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProviders()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListProviders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProvidersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listProviders($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 listTriggersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $triggersElement = new Trigger(); + $triggers = [ + $triggersElement, + ]; + $expectedResponse = new ListTriggersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTriggers($triggers); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listTriggers($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTriggers()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListTriggers', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTriggersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listTriggers($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 updateChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $provider = 'provider-987494927'; + $pubsubTopic = 'pubsubTopic-338126829'; + $activationToken = 'activationToken1250030992'; + $cryptoKeyName = 'cryptoKeyName-184663511'; + $expectedResponse = new Channel(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setProvider($provider); + $expectedResponse->setPubsubTopic($pubsubTopic); + $expectedResponse->setActivationToken($activationToken); + $expectedResponse->setCryptoKeyName($cryptoKeyName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $validateOnly = false; + $response = $gapicClient->updateChannel($validateOnly); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/UpdateChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getValidateOnly(); + $this->assertProtobufEquals($validateOnly, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateChannelTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $validateOnly = false; + $response = $gapicClient->updateChannel($validateOnly); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateChannelTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGoogleChannelConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $cryptoKeyName = 'cryptoKeyName-184663511'; + $expectedResponse = new GoogleChannelConfig(); + $expectedResponse->setName($name); + $expectedResponse->setCryptoKeyName($cryptoKeyName); + $transport->addResponse($expectedResponse); + // Mock request + $googleChannelConfig = new GoogleChannelConfig(); + $googleChannelConfigName = 'googleChannelConfigName-13357801'; + $googleChannelConfig->setName($googleChannelConfigName); + $response = $gapicClient->updateGoogleChannelConfig($googleChannelConfig); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/UpdateGoogleChannelConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getGoogleChannelConfig(); + $this->assertProtobufEquals($googleChannelConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGoogleChannelConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $googleChannelConfig = new GoogleChannelConfig(); + $googleChannelConfigName = 'googleChannelConfigName-13357801'; + $googleChannelConfig->setName($googleChannelConfigName); + try { + $gapicClient->updateGoogleChannelConfig($googleChannelConfig); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTriggerTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateTriggerTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $serviceAccount = 'serviceAccount-1948028253'; + $channel = 'channel738950403'; + $etag = 'etag3123477'; + $expectedResponse = new Trigger(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setChannel($channel); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateTriggerTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $validateOnly = false; + $response = $gapicClient->updateTrigger($validateOnly); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.v1.Eventarc/UpdateTrigger', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getValidateOnly(); + $this->assertProtobufEquals($validateOnly, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTriggerTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateTriggerExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateTriggerTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $validateOnly = false; + $response = $gapicClient->updateTrigger($validateOnly); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTriggerTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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); + $response = $gapicClient->getLocation(); + $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); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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); + $response = $gapicClient->listLocations(); + $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); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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'; + $response = $gapicClient->getIamPolicy($resource); + $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'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $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(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $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 = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->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/EventarcPublishing/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/Publishing/V1/Publisher.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/Publishing/V1/Publisher.php new file mode 100644 index 000000000000..4a26e15a5f22 --- /dev/null +++ b/owl-bot-staging/EventarcPublishing/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/Publishing/V1/Publisher.php @@ -0,0 +1,44 @@ +internalAddGeneratedFile( + ' +’ + +3google/cloud/eventarc/publishing/v1/publisher.proto#google.cloud.eventarc.publishing.v1google/api/client.protogoogle/protobuf/any.proto"~ +%PublishChannelConnectionEventsRequest +channel_connection ( $ +events ( 2.google.protobuf.Any + text_events ( "( +&PublishChannelConnectionEventsResponse"b +PublishEventsRequest +channel ( $ +events ( 2.google.protobuf.Any + text_events ( " +PublishEventsResponse2Ð + Publisher˜ +PublishChannelConnectionEventsJ.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequestK.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse"]‚Óä“W"R/v1/{channel_connection=projects/*/locations/*/channelConnections/*}:publishEvents:*Ð + PublishEvents9.google.cloud.eventarc.publishing.v1.PublishEventsRequest:.google.cloud.eventarc.publishing.v1.PublishEventsResponse"H‚Óä“B"=/v1/{channel=projects/*/locations/*/channels/*}:publishEvents:*UÊA!eventarcpublishing.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÿ +\'com.google.cloud.eventarc.publishing.v1BPublisherProtoPZLgoogle.golang.org/genproto/googleapis/cloud/eventarc/publishing/v1;publisherª#Google.Cloud.Eventarc.Publishing.V1Ê#Google\\Cloud\\Eventarc\\Publishing\\V1ê\'Google::Cloud::Eventarc::Publishing::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsRequest.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsRequest.php new file mode 100644 index 000000000000..79180267cebb --- /dev/null +++ b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsRequest.php @@ -0,0 +1,159 @@ +google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest + */ +class PublishChannelConnectionEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The channel_connection that the events are published from. For example: + * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. + * + * Generated from protobuf field string channel_connection = 1; + */ + protected $channel_connection = ''; + /** + * The CloudEvents v1.0 events to publish. No other types are allowed. + * If this field is set, then the `text_events` fields must not be set. + * + * Generated from protobuf field repeated .google.protobuf.Any events = 2; + */ + private $events; + /** + * The text representation of events to publish. + * CloudEvent v1.0 in JSON format is the only allowed type. Refer to + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * for specification. + * If this field is set, then the `events` fields must not be set. + * + * Generated from protobuf field repeated string text_events = 3; + */ + private $text_events; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $channel_connection + * The channel_connection that the events are published from. For example: + * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. + * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $events + * The CloudEvents v1.0 events to publish. No other types are allowed. + * If this field is set, then the `text_events` fields must not be set. + * @type array|\Google\Protobuf\Internal\RepeatedField $text_events + * The text representation of events to publish. + * CloudEvent v1.0 in JSON format is the only allowed type. Refer to + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * for specification. + * If this field is set, then the `events` fields must not be set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\Publisher::initOnce(); + parent::__construct($data); + } + + /** + * The channel_connection that the events are published from. For example: + * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. + * + * Generated from protobuf field string channel_connection = 1; + * @return string + */ + public function getChannelConnection() + { + return $this->channel_connection; + } + + /** + * The channel_connection that the events are published from. For example: + * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. + * + * Generated from protobuf field string channel_connection = 1; + * @param string $var + * @return $this + */ + public function setChannelConnection($var) + { + GPBUtil::checkString($var, True); + $this->channel_connection = $var; + + return $this; + } + + /** + * The CloudEvents v1.0 events to publish. No other types are allowed. + * If this field is set, then the `text_events` fields must not be set. + * + * Generated from protobuf field repeated .google.protobuf.Any events = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEvents() + { + return $this->events; + } + + /** + * The CloudEvents v1.0 events to publish. No other types are allowed. + * If this field is set, then the `text_events` fields must not be set. + * + * Generated from protobuf field repeated .google.protobuf.Any events = 2; + * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); + $this->events = $arr; + + return $this; + } + + /** + * The text representation of events to publish. + * CloudEvent v1.0 in JSON format is the only allowed type. Refer to + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * for specification. + * If this field is set, then the `events` fields must not be set. + * + * Generated from protobuf field repeated string text_events = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTextEvents() + { + return $this->text_events; + } + + /** + * The text representation of events to publish. + * CloudEvent v1.0 in JSON format is the only allowed type. Refer to + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * for specification. + * If this field is set, then the `events` fields must not be set. + * + * Generated from protobuf field repeated string text_events = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTextEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->text_events = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsResponse.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsResponse.php new file mode 100644 index 000000000000..6a7494facfc6 --- /dev/null +++ b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsResponse.php @@ -0,0 +1,33 @@ +google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse + */ +class PublishChannelConnectionEventsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\Publisher::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsRequest.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsRequest.php new file mode 100644 index 000000000000..f5c6a6cfa164 --- /dev/null +++ b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsRequest.php @@ -0,0 +1,159 @@ +google.cloud.eventarc.publishing.v1.PublishEventsRequest + */ +class PublishEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The full name of the channel to publish to. For example: + * `projects/{project}/locations/{location}/channels/{channel-id}`. + * + * Generated from protobuf field string channel = 1; + */ + protected $channel = ''; + /** + * The CloudEvents v1.0 events to publish. No other types are allowed. + * If this field is set, then the `text_events` fields must not be set. + * + * Generated from protobuf field repeated .google.protobuf.Any events = 2; + */ + private $events; + /** + * The text representation of events to publish. + * CloudEvent v1.0 in JSON format is the only allowed type. Refer to + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * for specification. + * If this field is set, then the `events` fields must not be set. + * + * Generated from protobuf field repeated string text_events = 3; + */ + private $text_events; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $channel + * The full name of the channel to publish to. For example: + * `projects/{project}/locations/{location}/channels/{channel-id}`. + * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $events + * The CloudEvents v1.0 events to publish. No other types are allowed. + * If this field is set, then the `text_events` fields must not be set. + * @type array|\Google\Protobuf\Internal\RepeatedField $text_events + * The text representation of events to publish. + * CloudEvent v1.0 in JSON format is the only allowed type. Refer to + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * for specification. + * If this field is set, then the `events` fields must not be set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\Publisher::initOnce(); + parent::__construct($data); + } + + /** + * The full name of the channel to publish to. For example: + * `projects/{project}/locations/{location}/channels/{channel-id}`. + * + * Generated from protobuf field string channel = 1; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * The full name of the channel to publish to. For example: + * `projects/{project}/locations/{location}/channels/{channel-id}`. + * + * Generated from protobuf field string channel = 1; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + + /** + * The CloudEvents v1.0 events to publish. No other types are allowed. + * If this field is set, then the `text_events` fields must not be set. + * + * Generated from protobuf field repeated .google.protobuf.Any events = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEvents() + { + return $this->events; + } + + /** + * The CloudEvents v1.0 events to publish. No other types are allowed. + * If this field is set, then the `text_events` fields must not be set. + * + * Generated from protobuf field repeated .google.protobuf.Any events = 2; + * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); + $this->events = $arr; + + return $this; + } + + /** + * The text representation of events to publish. + * CloudEvent v1.0 in JSON format is the only allowed type. Refer to + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * for specification. + * If this field is set, then the `events` fields must not be set. + * + * Generated from protobuf field repeated string text_events = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTextEvents() + { + return $this->text_events; + } + + /** + * The text representation of events to publish. + * CloudEvent v1.0 in JSON format is the only allowed type. Refer to + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * for specification. + * If this field is set, then the `events` fields must not be set. + * + * Generated from protobuf field repeated string text_events = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTextEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->text_events = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsResponse.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsResponse.php new file mode 100644 index 000000000000..4291ac3bfd78 --- /dev/null +++ b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsResponse.php @@ -0,0 +1,33 @@ +google.cloud.eventarc.publishing.v1.PublishEventsResponse + */ +class PublishEventsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\Publisher::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublisherGrpcClient.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublisherGrpcClient.php new file mode 100644 index 000000000000..53e8b7edf935 --- /dev/null +++ b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublisherGrpcClient.php @@ -0,0 +1,87 @@ +_simpleRequest('/google.cloud.eventarc.publishing.v1.Publisher/PublishChannelConnectionEvents', + $argument, + ['\Google\Cloud\Eventarc\Publishing\V1\PublishChannelConnectionEventsResponse', 'decode'], + $metadata, $options); + } + + /** + * Publish events to a subscriber's channel. + * @param \Google\Cloud\Eventarc\Publishing\V1\PublishEventsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function PublishEvents(\Google\Cloud\Eventarc\Publishing\V1\PublishEventsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.eventarc.publishing.v1.Publisher/PublishEvents', + $argument, + ['\Google\Cloud\Eventarc\Publishing\V1\PublishEventsResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_channel_connection_events.php b/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_channel_connection_events.php new file mode 100644 index 000000000000..de210004e194 --- /dev/null +++ b/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_channel_connection_events.php @@ -0,0 +1,53 @@ +publishChannelConnectionEvents(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_sync] diff --git a/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_events.php b/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_events.php new file mode 100644 index 000000000000..6614c3628059 --- /dev/null +++ b/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_events.php @@ -0,0 +1,53 @@ +publishEvents(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END eventarcpublishing_v1_generated_Publisher_PublishEvents_sync] diff --git a/owl-bot-staging/EventarcPublishing/v1/src/V1/Gapic/PublisherGapicClient.php b/owl-bot-staging/EventarcPublishing/v1/src/V1/Gapic/PublisherGapicClient.php new file mode 100644 index 000000000000..3e9d13f147be --- /dev/null +++ b/owl-bot-staging/EventarcPublishing/v1/src/V1/Gapic/PublisherGapicClient.php @@ -0,0 +1,298 @@ +publishChannelConnectionEvents(); + * } finally { + * $publisherClient->close(); + * } + * ``` + */ +class PublisherGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.eventarc.publishing.v1.Publisher'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'eventarcpublishing.googleapis.com'; + + /** 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/publisher_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/publisher_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/publisher_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/publisher_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 'eventarcpublishing.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); + } + + /** + * Publish events to a ChannelConnection in a partner's project. + * + * Sample code: + * ``` + * $publisherClient = new PublisherClient(); + * try { + * $response = $publisherClient->publishChannelConnectionEvents(); + * } finally { + * $publisherClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $channelConnection + * The channel_connection that the events are published from. For example: + * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. + * @type Any[] $events + * The CloudEvents v1.0 events to publish. No other types are allowed. + * If this field is set, then the `text_events` fields must not be set. + * @type string[] $textEvents + * The text representation of events to publish. + * CloudEvent v1.0 in JSON format is the only allowed type. Refer to + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * for specification. + * If this field is set, then the `events` fields must not be set. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Eventarc\Publishing\V1\PublishChannelConnectionEventsResponse + * + * @throws ApiException if the remote call fails + */ + public function publishChannelConnectionEvents(array $optionalArgs = []) + { + $request = new PublishChannelConnectionEventsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['channelConnection'])) { + $request->setChannelConnection($optionalArgs['channelConnection']); + $requestParamHeaders['channel_connection'] = $optionalArgs['channelConnection']; + } + + if (isset($optionalArgs['events'])) { + $request->setEvents($optionalArgs['events']); + } + + if (isset($optionalArgs['textEvents'])) { + $request->setTextEvents($optionalArgs['textEvents']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('PublishChannelConnectionEvents', PublishChannelConnectionEventsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Publish events to a subscriber's channel. + * + * Sample code: + * ``` + * $publisherClient = new PublisherClient(); + * try { + * $response = $publisherClient->publishEvents(); + * } finally { + * $publisherClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $channel + * The full name of the channel to publish to. For example: + * `projects/{project}/locations/{location}/channels/{channel-id}`. + * @type Any[] $events + * The CloudEvents v1.0 events to publish. No other types are allowed. + * If this field is set, then the `text_events` fields must not be set. + * @type string[] $textEvents + * The text representation of events to publish. + * CloudEvent v1.0 in JSON format is the only allowed type. Refer to + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * for specification. + * If this field is set, then the `events` fields must not be set. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Eventarc\Publishing\V1\PublishEventsResponse + * + * @throws ApiException if the remote call fails + */ + public function publishEvents(array $optionalArgs = []) + { + $request = new PublishEventsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['channel'])) { + $request->setChannel($optionalArgs['channel']); + $requestParamHeaders['channel'] = $optionalArgs['channel']; + } + + if (isset($optionalArgs['events'])) { + $request->setEvents($optionalArgs['events']); + } + + if (isset($optionalArgs['textEvents'])) { + $request->setTextEvents($optionalArgs['textEvents']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('PublishEvents', PublishEventsResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/EventarcPublishing/v1/src/V1/PublisherClient.php b/owl-bot-staging/EventarcPublishing/v1/src/V1/PublisherClient.php new file mode 100644 index 000000000000..c5d913b397f5 --- /dev/null +++ b/owl-bot-staging/EventarcPublishing/v1/src/V1/PublisherClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.eventarc.publishing.v1.Publisher' => [], + ], +]; diff --git a/owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_rest_client_config.php b/owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_rest_client_config.php new file mode 100644 index 000000000000..2c4ad8b6ef1c --- /dev/null +++ b/owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_rest_client_config.php @@ -0,0 +1,33 @@ + [ + 'google.cloud.eventarc.publishing.v1.Publisher' => [ + 'PublishChannelConnectionEvents' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{channel_connection=projects/*/locations/*/channelConnections/*}:publishEvents', + 'body' => '*', + 'placeholders' => [ + 'channel_connection' => [ + 'getters' => [ + 'getChannelConnection', + ], + ], + ], + ], + 'PublishEvents' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{channel=projects/*/locations/*/channels/*}:publishEvents', + 'body' => '*', + 'placeholders' => [ + 'channel' => [ + 'getters' => [ + 'getChannel', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/EventarcPublishing/v1/tests/Unit/V1/PublisherClientTest.php b/owl-bot-staging/EventarcPublishing/v1/tests/Unit/V1/PublisherClientTest.php new file mode 100644 index 000000000000..22b9275862a8 --- /dev/null +++ b/owl-bot-staging/EventarcPublishing/v1/tests/Unit/V1/PublisherClientTest.php @@ -0,0 +1,166 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return PublisherClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new PublisherClient($options); + } + + /** @test */ + public function publishChannelConnectionEventsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new PublishChannelConnectionEventsResponse(); + $transport->addResponse($expectedResponse); + $response = $gapicClient->publishChannelConnectionEvents(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.publishing.v1.Publisher/PublishChannelConnectionEvents', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function publishChannelConnectionEventsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->publishChannelConnectionEvents(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function publishEventsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new PublishEventsResponse(); + $transport->addResponse($expectedResponse); + $response = $gapicClient->publishEvents(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.eventarc.publishing.v1.Publisher/PublishEvents', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function publishEventsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->publishEvents(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->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/Filestore/v1/proto/src/GPBMetadata/Google/Cloud/Filestore/V1/CloudFilestoreService.php b/owl-bot-staging/Filestore/v1/proto/src/GPBMetadata/Google/Cloud/Filestore/V1/CloudFilestoreService.php new file mode 100644 index 0000000000000000000000000000000000000000..3bcf86f83f205c2d739d1425ab80e8ffb72bc1c5 GIT binary patch literal 8126 zcmd5>O>7&-6%MH%i$hzc$5u?sPO@IRu&h{Q#M-JuTMm{#mWW8AO41G-5Lhh95w$h7 zyV+e@Q4FC#dnkG=a%j;@dTev-t;b${Ob$hTGKvC4(_4X}fPn&i^Rvq(C9O!ghx%e_ z_syI4`+aYA?tf%$Tj-j!LJVSSE@?@PJ;~iBl4YB&*)%&+qr0_5Y^iDPSbB%pDM>1n zrHyh;Di%t$tFY8DyLOXgrM79dJ0#ugnB7)-3uGPFv`PBeB7da%k5q@)&-5lqu{{tn zv>oDDT9ZgCo4Ix3YAwyx>MKlLJx|ruAA0KQj~DMD)a+=EBe7Thn<`g|o+AnVS=~lQ zZ%U4{i!ky1HpdbV1o@lDV4_*GXlsTPDP0 zS@O)=q+x;()k}s;Y(wkR3&d&Kx&^*(f@n6|Caxb``eg2=*p{l(x1>34V>Wxh$Ysg3 zyCk@~B-zC6+QvO*H&w9j|EeDnJjK%MieZ>E3Z~&?vpt`BDvny1@94yEM_cnyC!JP~ zY-`VS(;jVUg@{5L+DKj+d2?sSH0ouG)-QPJ70~dzubD>M?iz+}w0mks2$o+1%=>lC zc{=>w{@R)jP2g%f)(O^rVrv$-e}u`bWEURjqCk~a%dbb;Jac{p(R#XpUM-;?oUoPg zCB87lFd*eOeCpZa>_wqdvvj}%T3NjPXWt9F*rMg5Hbngh0iiTaSK6XT#H(9zL`42$1f8WdRo&KXB78fI#woxH z$Ihd8QvPOj!a=X@+U2 zUA@K9J%+s}ZFn+4LoTl(6xjYUx~SyyN9VXwR0?W&W9>;If~OH;e|}Oa)ryIzyn#?) zZ_rfz;UlHGdRVn!G`&$)E9G)cqN$PrPzcluaSs#^t4|CS1dYKc z7SNu>J%*Rj1f@~JyqnJ43`v8hJ5{9%xX#OHnlA4`E+L^Bw8#;Qy1s`Z7FJaa_saxfP?);e9Dj@bni4|)_wV^7JR0FX0i;u)3XiO)vwMq~p`uw3F9 zbgo)cYJ(tk8cpS)WNW336)3nEnxOUjBoU?PRVi*Nr3!sB2F6bnifctCH%{e>l}fpi znB;QRTA9h6l65rBQgs0(YNcXj01`n97_m`MDh1drj!tb>itD9E>wLeQQZ41x)j|RG zgYEgB)oLLzj-fkNODn5tHLt7{Rr+iqtA3}{>*&g180eJ^z7Hk%Bhqx8^mFlRKix5# zeB?_%_kQlDb6Q6e;YwFc~;(@!V3AU3!@1B5KUT8LWavDpS$@=iN02@p{t%o zM--J0%WGm+oJ4VN2NfWPqC8`lD2C$l-T=4JPP!ISnx09trJ{gYc!jv$GtbOSA4FVd zM!p*!GWo}7=8*-b3^J%JjpAMQf)PG*{IFj42R(cz;16|kIDh2dMbO(7en1*D;ROER ziwO04J{ax;%t~WE46_CZ@nbYoARTfrSSPSl{&fUhSkoOpi;kDZH>frsXA3Y}b>M8r zoS%SRLhO-iJ|zY#v=}8p({2%4ZS09DXc|pI*x=m8Xd@=?qnQEQ91D(31b{52d(Fe> zf4DS5Ud|fib5{-6!g_&{Sl58AYi?_e4q;PXO#bHtn&gws(7bog<2^nx)Nh0|6IUIi zy#Z#Uqv2uIKEQ0tK10!|F`ijCe$OD912zOFKuWY@oHA#DF5uWqQ`y*afx9Txig#Ib zR*Z;VBE*n*^|f+Lx6?UTtPM0tj5Y!caTf;E0?9)?Ab2|hYx`3~%iJ|OrUqvi=0LpX zzyU6#6nR**-;4_%jl_j8%RMY@C~KupDFa4(+&Dmn*(cvAkHbcBe0Nw9YOv8AD2V^q zmwyvM=Q#o8*sK2mAS|ItuAQMlJahHf3S|U?-$pUMj*=EfN=7^@=sZWjehWY7V;-3? zPw0U~{wes%iKkyv&tQ7|8{S}O;2>Rb0y;RF`gFy4w15)8qx}|)?#r(t2vfA=dj79) zd>5VXvrM3P2Ayi~>Ju1#d|ix&;F-T*7^dh4%ZD(5v(KOFngMubw-gODm7Sil{YAN=IozkV4_;|2N=_BkKsmiKFCwe8&rH;KNYL|DGuS zBEn4kP#!IeS%1)dsa)owu%1@e)mtXp?>#^ z4(a!o-0xgwiItCMdurGm1p{!wTYW2lS10oP&+v(9U~ATBPo|W$~ z*N65P4&3z4BO94Nk#DactNo*PXjc10hxBZp_uD)#=3zY({q{n6fM!I60*@3p|9%-kF`p@M*!M(V$}{wM zYLT-n6P|5hnGlAhd${+v2s#}cns8WPf`XoX$6(&ic<M!oTu@A zCd2BV=OGlpxrhU$*2^a55Bs5e)I`p%yim^5^Oxvg@1xN-N^0A6Ehn2!@9ypnyi99d zcbi`yFIXMT-7@W++#e$79U#V|ksvqQKZA*z;Y|uyn~_g*0>Ij42W~`Crrl1riNWA3 z&0kU54!Os^N6lvd|8?}z3cH?8v7J)>xR-jo_`-Wv7kAfz%WJs3ZcMVBzJJ5NcDu!| Zc>}k?^joyvJmf~0N%EW9eYB6ze*v8Wa7X|E literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup.php new file mode 100644 index 000000000000..17f8fa60971d --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup.php @@ -0,0 +1,524 @@ +google.cloud.filestore.v1.Backup + */ +class Backup extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the backup, in the format + * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * A description of the backup with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Output only. The backup state. + * + * Generated from protobuf field .google.cloud.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time when the backup was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 5; + */ + private $labels; + /** + * Output only. Capacity of the source file share when the backup was created. + * + * Generated from protobuf field int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $capacity_gb = 0; + /** + * Output only. The size of the storage used by the backup. As backups share + * storage, this number is expected to change with backup creation/deletion. + * + * Generated from protobuf field int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $storage_bytes = 0; + /** + * The resource name of the source Cloud Filestore instance, in the format + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, + * used to create this backup. + * + * Generated from protobuf field string source_instance = 8 [(.google.api.resource_reference) = { + */ + protected $source_instance = ''; + /** + * Name of the file share in the source Cloud Filestore instance that the + * backup is created from. + * + * Generated from protobuf field string source_file_share = 9; + */ + protected $source_file_share = ''; + /** + * Output only. The service tier of the source Cloud Filestore instance that + * this backup is created from. + * + * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_instance_tier = 0; + /** + * Output only. Amount of bytes that will be downloaded if the backup is + * restored. This may be different than storage bytes, since sequential + * backups of the same disk will share storage. + * + * Generated from protobuf field int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $download_bytes = 0; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the backup, in the format + * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. + * @type string $description + * A description of the backup with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * @type int $state + * Output only. The backup state. + * @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 $capacity_gb + * Output only. Capacity of the source file share when the backup was created. + * @type int|string $storage_bytes + * Output only. The size of the storage used by the backup. As backups share + * storage, this number is expected to change with backup creation/deletion. + * @type string $source_instance + * The resource name of the source Cloud Filestore instance, in the format + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, + * used to create this backup. + * @type string $source_file_share + * Name of the file share in the source Cloud Filestore instance that the + * backup is created from. + * @type int $source_instance_tier + * Output only. The service tier of the source Cloud Filestore instance that + * this backup is created from. + * @type int|string $download_bytes + * Output only. Amount of bytes that will be downloaded if the backup is + * restored. This may be different than storage bytes, since sequential + * backups of the same disk will share storage. + * @type \Google\Protobuf\BoolValue $satisfies_pzs + * Output only. Reserved for future use. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the backup, in the format + * `projects/{project_number}/locations/{location_id}/backups/{backup_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 resource name of the backup, in the format + * `projects/{project_number}/locations/{location_id}/backups/{backup_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; + } + + /** + * A description of the backup with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * + * Generated from protobuf field string description = 2; + * @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 = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The backup state. + * + * Generated from protobuf field .google.cloud.filestore.v1.Backup.State state = 3 [(.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.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\Backup\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time when the backup 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 when the backup 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; + } + + /** + * 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; + } + + /** + * Output only. Capacity of the source file share when the backup was created. + * + * Generated from protobuf field int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getCapacityGb() + { + return $this->capacity_gb; + } + + /** + * Output only. Capacity of the source file share when the backup was created. + * + * Generated from protobuf field int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setCapacityGb($var) + { + GPBUtil::checkInt64($var); + $this->capacity_gb = $var; + + return $this; + } + + /** + * Output only. The size of the storage used by the backup. As backups share + * storage, this number is expected to change with backup creation/deletion. + * + * Generated from protobuf field int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getStorageBytes() + { + return $this->storage_bytes; + } + + /** + * Output only. The size of the storage used by the backup. As backups share + * storage, this number is expected to change with backup creation/deletion. + * + * Generated from protobuf field int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setStorageBytes($var) + { + GPBUtil::checkInt64($var); + $this->storage_bytes = $var; + + return $this; + } + + /** + * The resource name of the source Cloud Filestore instance, in the format + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, + * used to create this backup. + * + * Generated from protobuf field string source_instance = 8 [(.google.api.resource_reference) = { + * @return string + */ + public function getSourceInstance() + { + return $this->source_instance; + } + + /** + * The resource name of the source Cloud Filestore instance, in the format + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, + * used to create this backup. + * + * Generated from protobuf field string source_instance = 8 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSourceInstance($var) + { + GPBUtil::checkString($var, True); + $this->source_instance = $var; + + return $this; + } + + /** + * Name of the file share in the source Cloud Filestore instance that the + * backup is created from. + * + * Generated from protobuf field string source_file_share = 9; + * @return string + */ + public function getSourceFileShare() + { + return $this->source_file_share; + } + + /** + * Name of the file share in the source Cloud Filestore instance that the + * backup is created from. + * + * Generated from protobuf field string source_file_share = 9; + * @param string $var + * @return $this + */ + public function setSourceFileShare($var) + { + GPBUtil::checkString($var, True); + $this->source_file_share = $var; + + return $this; + } + + /** + * Output only. The service tier of the source Cloud Filestore instance that + * this backup is created from. + * + * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSourceInstanceTier() + { + return $this->source_instance_tier; + } + + /** + * Output only. The service tier of the source Cloud Filestore instance that + * this backup is created from. + * + * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSourceInstanceTier($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\Instance\Tier::class); + $this->source_instance_tier = $var; + + return $this; + } + + /** + * Output only. Amount of bytes that will be downloaded if the backup is + * restored. This may be different than storage bytes, since sequential + * backups of the same disk will share storage. + * + * Generated from protobuf field int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getDownloadBytes() + { + return $this->download_bytes; + } + + /** + * Output only. Amount of bytes that will be downloaded if the backup is + * restored. This may be different than storage bytes, since sequential + * backups of the same disk will share storage. + * + * Generated from protobuf field int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setDownloadBytes($var) + { + GPBUtil::checkInt64($var); + $this->download_bytes = $var; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + public function hasSatisfiesPzs() + { + return isset($this->satisfies_pzs); + } + + public function clearSatisfiesPzs() + { + unset($this->satisfies_pzs); + } + + /** + * Returns the unboxed value from getSatisfiesPzs() + + * Output only. Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool|null + */ + public function getSatisfiesPzsUnwrapped() + { + return $this->readWrapperValue("satisfies_pzs"); + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Output only. Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool|null $var + * @return $this + */ + public function setSatisfiesPzsUnwrapped($var) + { + $this->writeWrapperValue("satisfies_pzs", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup/State.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup/State.php new file mode 100644 index 000000000000..4ccfe9824c2d --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup/State.php @@ -0,0 +1,79 @@ +google.cloud.filestore.v1.Backup.State + */ +class State +{ + /** + * State not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Backup is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Backup has been taken and the operation is being finalized. At this + * point, changes to the file share will not be reflected in the backup. + * + * Generated from protobuf enum FINALIZING = 2; + */ + const FINALIZING = 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; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::FINALIZING => 'FINALIZING', + self::READY => 'READY', + 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\Filestore\V1\Backup_State::class); + diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup_State.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup_State.php new file mode 100644 index 000000000000..59d25dc40c88 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup_State.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/ListInstances', + $argument, + ['\Google\Cloud\Filestore\V1\ListInstancesResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets the details of a specific instance. + * @param \Google\Cloud\Filestore\V1\GetInstanceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetInstance(\Google\Cloud\Filestore\V1\GetInstanceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/GetInstance', + $argument, + ['\Google\Cloud\Filestore\V1\Instance', 'decode'], + $metadata, $options); + } + + /** + * Creates an instance. + * When creating from a backup, the capacity of the new instance needs to be + * equal to or larger than the capacity of the backup (and also equal to or + * larger than the minimum capacity of the tier). + * @param \Google\Cloud\Filestore\V1\CreateInstanceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateInstance(\Google\Cloud\Filestore\V1\CreateInstanceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/CreateInstance', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates the settings of a specific instance. + * @param \Google\Cloud\Filestore\V1\UpdateInstanceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateInstance(\Google\Cloud\Filestore\V1\UpdateInstanceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/UpdateInstance', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Restores an existing instance's file share from a backup. + * + * The capacity of the instance needs to be equal to or larger than the + * capacity of the backup (and also equal to or larger than the minimum + * capacity of the tier). + * @param \Google\Cloud\Filestore\V1\RestoreInstanceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RestoreInstance(\Google\Cloud\Filestore\V1\RestoreInstanceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/RestoreInstance', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes an instance. + * @param \Google\Cloud\Filestore\V1\DeleteInstanceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteInstance(\Google\Cloud\Filestore\V1\DeleteInstanceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/DeleteInstance', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists all backups in a project for either a specified location or for all + * locations. + * @param \Google\Cloud\Filestore\V1\ListBackupsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListBackups(\Google\Cloud\Filestore\V1\ListBackupsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/ListBackups', + $argument, + ['\Google\Cloud\Filestore\V1\ListBackupsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets the details of a specific backup. + * @param \Google\Cloud\Filestore\V1\GetBackupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetBackup(\Google\Cloud\Filestore\V1\GetBackupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/GetBackup', + $argument, + ['\Google\Cloud\Filestore\V1\Backup', 'decode'], + $metadata, $options); + } + + /** + * Creates a backup. + * @param \Google\Cloud\Filestore\V1\CreateBackupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateBackup(\Google\Cloud\Filestore\V1\CreateBackupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/CreateBackup', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a backup. + * @param \Google\Cloud\Filestore\V1\DeleteBackupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteBackup(\Google\Cloud\Filestore\V1\DeleteBackupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/DeleteBackup', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates the settings of a specific backup. + * @param \Google\Cloud\Filestore\V1\UpdateBackupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateBackup(\Google\Cloud\Filestore\V1\UpdateBackupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/UpdateBackup', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateBackupRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateBackupRequest.php new file mode 100644 index 000000000000..a53ea6f1b1c3 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateBackupRequest.php @@ -0,0 +1,173 @@ +google.cloud.filestore.v1.CreateBackupRequest + */ +class CreateBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backup's project and location, in the format + * `projects/{project_number}/locations/{location}`. In Cloud Filestore, + * backup locations map to GCP regions, for example **us-west1**. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A [backup resource][google.cloud.filestore.v1.Backup] + * + * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup = null; + /** + * Required. The ID to use for the backup. + * The ID must be unique within the specified project and location. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * Values that do not match this pattern will trigger an INVALID_ARGUMENT + * error. + * + * Generated from protobuf field string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The backup's project and location, in the format + * `projects/{project_number}/locations/{location}`. In Cloud Filestore, + * backup locations map to GCP regions, for example **us-west1**. + * @type \Google\Cloud\Filestore\V1\Backup $backup + * Required. A [backup resource][google.cloud.filestore.v1.Backup] + * @type string $backup_id + * Required. The ID to use for the backup. + * The ID must be unique within the specified project and location. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * Values that do not match this pattern will trigger an INVALID_ARGUMENT + * error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backup's project and location, in the format + * `projects/{project_number}/locations/{location}`. In Cloud Filestore, + * backup locations map to GCP regions, for example **us-west1**. + * + * Generated 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 backup's project and location, in the format + * `projects/{project_number}/locations/{location}`. In Cloud Filestore, + * backup locations map to GCP regions, for example **us-west1**. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 [backup resource][google.cloud.filestore.v1.Backup] + * + * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Filestore\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][google.cloud.filestore.v1.Backup] + * + * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Filestore\V1\Backup $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Filestore\V1\Backup::class); + $this->backup = $var; + + return $this; + } + + /** + * Required. The ID to use for the backup. + * The ID must be unique within the specified project and location. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * Values that do not match this pattern will trigger an INVALID_ARGUMENT + * error. + * + * Generated from protobuf field string backup_id = 3 [(.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 project and location. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * Values that do not match this pattern will trigger an INVALID_ARGUMENT + * error. + * + * Generated from protobuf field string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBackupId($var) + { + GPBUtil::checkString($var, True); + $this->backup_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateInstanceRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateInstanceRequest.php new file mode 100644 index 000000000000..1e1547b01a96 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateInstanceRequest.php @@ -0,0 +1,157 @@ +google.cloud.filestore.v1.CreateInstanceRequest + */ +class CreateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The instance's project and location, in the format + * `projects/{project_id}/locations/{location}`. In Cloud Filestore, + * locations map to GCP zones, for example **us-west1-b**. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The name of the instance to create. + * The name must be unique for the specified project and location. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. An [instance resource][google.cloud.filestore.v1.Instance] + * + * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The instance's project and location, in the format + * `projects/{project_id}/locations/{location}`. In Cloud Filestore, + * locations map to GCP zones, for example **us-west1-b**. + * @type string $instance_id + * Required. The name of the instance to create. + * The name must be unique for the specified project and location. + * @type \Google\Cloud\Filestore\V1\Instance $instance + * Required. An [instance resource][google.cloud.filestore.v1.Instance] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The instance's project and location, in the format + * `projects/{project_id}/locations/{location}`. In Cloud Filestore, + * locations map to GCP zones, for example **us-west1-b**. + * + * Generated 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 instance's project and location, in the format + * `projects/{project_id}/locations/{location}`. In Cloud Filestore, + * locations map to GCP zones, for example **us-west1-b**. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 name of the instance to create. + * The name must be unique for the specified project and location. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. The name of the instance to create. + * The name must be unique for the specified project and location. + * + * 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. An [instance resource][google.cloud.filestore.v1.Instance] + * + * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Filestore\V1\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. An [instance resource][google.cloud.filestore.v1.Instance] + * + * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Filestore\V1\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Filestore\V1\Instance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteBackupRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteBackupRequest.php new file mode 100644 index 000000000000..a4970d744842 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteBackupRequest.php @@ -0,0 +1,71 @@ +google.cloud.filestore.v1.DeleteBackupRequest + */ +class DeleteBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backup resource name, in the format + * `projects/{project_number}/locations/{location}/backups/{backup_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 backup resource name, in the format + * `projects/{project_number}/locations/{location}/backups/{backup_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backup resource name, in the format + * `projects/{project_number}/locations/{location}/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_number}/locations/{location}/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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteInstanceRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteInstanceRequest.php new file mode 100644 index 000000000000..9c113104ba59 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteInstanceRequest.php @@ -0,0 +1,71 @@ +google.cloud.filestore.v1.DeleteInstanceRequest + */ +class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The instance resource name, in the 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 = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The instance resource name, in the format + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The instance resource name, in the 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. The instance resource name, in the 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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/FileShareConfig.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/FileShareConfig.php new file mode 100644 index 000000000000..c294377ce202 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/FileShareConfig.php @@ -0,0 +1,191 @@ +google.cloud.filestore.v1.FileShareConfig + */ +class FileShareConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the file share (must be 16 characters or less). + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * File share capacity in gigabytes (GB). + * Cloud Filestore defines 1 GB as 1024^3 bytes. + * + * Generated from protobuf field int64 capacity_gb = 2; + */ + protected $capacity_gb = 0; + /** + * Nfs Export Options. + * There is a limit of 10 export options per file share. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; + */ + private $nfs_export_options; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the file share (must be 16 characters or less). + * @type int|string $capacity_gb + * File share capacity in gigabytes (GB). + * Cloud Filestore defines 1 GB as 1024^3 bytes. + * @type string $source_backup + * The resource name of the backup, in the format + * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`, + * that this file share has been restored from. + * @type array<\Google\Cloud\Filestore\V1\NfsExportOptions>|\Google\Protobuf\Internal\RepeatedField $nfs_export_options + * Nfs Export Options. + * There is a limit of 10 export options per file share. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * The name of the file share (must be 16 characters or less). + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the file share (must be 16 characters or less). + * + * 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; + } + + /** + * File share capacity in gigabytes (GB). + * Cloud Filestore defines 1 GB as 1024^3 bytes. + * + * Generated from protobuf field int64 capacity_gb = 2; + * @return int|string + */ + public function getCapacityGb() + { + return $this->capacity_gb; + } + + /** + * File share capacity in gigabytes (GB). + * Cloud Filestore defines 1 GB as 1024^3 bytes. + * + * Generated from protobuf field int64 capacity_gb = 2; + * @param int|string $var + * @return $this + */ + public function setCapacityGb($var) + { + GPBUtil::checkInt64($var); + $this->capacity_gb = $var; + + return $this; + } + + /** + * The resource name of the backup, in the format + * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`, + * that this file share has been restored from. + * + * Generated from protobuf field string source_backup = 8 [(.google.api.resource_reference) = { + * @return string + */ + public function getSourceBackup() + { + return $this->readOneof(8); + } + + public function hasSourceBackup() + { + return $this->hasOneof(8); + } + + /** + * The resource name of the backup, in the format + * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`, + * that this file share has been restored from. + * + * Generated from protobuf field string source_backup = 8 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSourceBackup($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Nfs Export Options. + * There is a limit of 10 export options per file share. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNfsExportOptions() + { + return $this->nfs_export_options; + } + + /** + * Nfs Export Options. + * There is a limit of 10 export options per file share. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; + * @param array<\Google\Cloud\Filestore\V1\NfsExportOptions>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNfsExportOptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\NfsExportOptions::class); + $this->nfs_export_options = $arr; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetBackupRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetBackupRequest.php new file mode 100644 index 000000000000..794be0fe7c7a --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetBackupRequest.php @@ -0,0 +1,71 @@ +google.cloud.filestore.v1.GetBackupRequest + */ +class GetBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backup resource name, in the format + * `projects/{project_number}/locations/{location}/backups/{backup_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 backup resource name, in the format + * `projects/{project_number}/locations/{location}/backups/{backup_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backup resource name, in the format + * `projects/{project_number}/locations/{location}/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_number}/locations/{location}/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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetInstanceRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetInstanceRequest.php new file mode 100644 index 000000000000..3f65b995443a --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetInstanceRequest.php @@ -0,0 +1,71 @@ +google.cloud.filestore.v1.GetInstanceRequest + */ +class GetInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The instance resource name, in the 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 = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The instance resource name, in the format + * `projects/{project_id}/locations/{location}/instances/{instance_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The instance resource name, in the 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. The instance resource name, in the 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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance.php new file mode 100644 index 000000000000..45f5633d158f --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance.php @@ -0,0 +1,470 @@ +google.cloud.filestore.v1.Instance + */ +class Instance extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the instance, in the format + * `projects/{project}/locations/{location}/instances/{instance}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The description of the instance (2048 characters or less). + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Output only. The instance state. + * + * Generated from protobuf field .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Additional information about the instance state, if available. + * + * Generated from protobuf field string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. The time when the instance was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * The service tier of the instance. + * + * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier tier = 8; + */ + protected $tier = 0; + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 9; + */ + private $labels; + /** + * File system shares on the instance. + * For this version, only a single file share is supported. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; + */ + private $file_shares; + /** + * VPC networks to which the instance is connected. + * For this version, only a single network is supported. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; + */ + private $networks; + /** + * Server-specified ETag for the instance resource to prevent simultaneous + * updates from overwriting each other. + * + * Generated from protobuf field string etag = 12; + */ + protected $etag = ''; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the instance, in the format + * `projects/{project}/locations/{location}/instances/{instance}`. + * @type string $description + * The description of the instance (2048 characters or less). + * @type int $state + * Output only. The instance state. + * @type string $status_message + * Output only. Additional information about the instance state, if available. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the instance was created. + * @type int $tier + * The service tier of the instance. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Resource labels to represent user provided metadata. + * @type array<\Google\Cloud\Filestore\V1\FileShareConfig>|\Google\Protobuf\Internal\RepeatedField $file_shares + * File system shares on the instance. + * For this version, only a single file share is supported. + * @type array<\Google\Cloud\Filestore\V1\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $networks + * VPC networks to which the instance is connected. + * For this version, only a single network is supported. + * @type string $etag + * Server-specified ETag for the instance resource to prevent simultaneous + * updates from overwriting each other. + * @type \Google\Protobuf\BoolValue $satisfies_pzs + * Output only. Reserved for future use. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the instance, in the format + * `projects/{project}/locations/{location}/instances/{instance}`. + * + * 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 instance, in the format + * `projects/{project}/locations/{location}/instances/{instance}`. + * + * 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 description of the instance (2048 characters or less). + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the instance (2048 characters or less). + * + * 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 instance state. + * + * Generated from protobuf field .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The instance state. + * + * Generated from protobuf field .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\Instance\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Additional information about the instance state, if available. + * + * Generated from protobuf field string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Additional information about the instance state, if available. + * + * Generated from protobuf field string status_message = 6 [(.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 time when 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 when 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; + } + + /** + * The service tier of the instance. + * + * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier tier = 8; + * @return int + */ + public function getTier() + { + return $this->tier; + } + + /** + * The service tier of the instance. + * + * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier tier = 8; + * @param int $var + * @return $this + */ + public function setTier($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\Instance\Tier::class); + $this->tier = $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; + } + + /** + * File system shares on the instance. + * For this version, only a single file share is supported. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFileShares() + { + return $this->file_shares; + } + + /** + * File system shares on the instance. + * For this version, only a single file share is supported. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; + * @param array<\Google\Cloud\Filestore\V1\FileShareConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFileShares($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\FileShareConfig::class); + $this->file_shares = $arr; + + return $this; + } + + /** + * VPC networks to which the instance is connected. + * For this version, only a single network is supported. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworks() + { + return $this->networks; + } + + /** + * VPC networks to which the instance is connected. + * For this version, only a single network is supported. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; + * @param array<\Google\Cloud\Filestore\V1\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\NetworkConfig::class); + $this->networks = $arr; + + return $this; + } + + /** + * Server-specified ETag for the instance resource to prevent simultaneous + * updates from overwriting each other. + * + * Generated from protobuf field string etag = 12; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Server-specified ETag for the instance resource to prevent simultaneous + * updates from overwriting each other. + * + * Generated from protobuf field string etag = 12; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + public function hasSatisfiesPzs() + { + return isset($this->satisfies_pzs); + } + + public function clearSatisfiesPzs() + { + unset($this->satisfies_pzs); + } + + /** + * Returns the unboxed value from getSatisfiesPzs() + + * Output only. Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool|null + */ + public function getSatisfiesPzsUnwrapped() + { + return $this->readWrapperValue("satisfies_pzs"); + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Output only. Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool|null $var + * @return $this + */ + public function setSatisfiesPzsUnwrapped($var) + { + $this->writeWrapperValue("satisfies_pzs", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/State.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/State.php new file mode 100644 index 000000000000..ae7b6575834d --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/State.php @@ -0,0 +1,96 @@ +google.cloud.filestore.v1.Instance.State + */ +class State +{ + /** + * State not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The instance is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The instance is available for use. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * Work is being done on the instance. You can get further details from the + * `statusMessage` field of the `Instance` resource. + * + * Generated from protobuf enum REPAIRING = 3; + */ + const REPAIRING = 3; + /** + * The instance is shutting down. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * The instance is experiencing an issue and might be unusable. You can get + * further details from the `statusMessage` field of the `Instance` + * resource. + * + * Generated from protobuf enum ERROR = 6; + */ + const ERROR = 6; + /** + * The instance is restoring a backup to an existing file share and may be + * unusable during this time. + * + * Generated from protobuf enum RESTORING = 7; + */ + const RESTORING = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::REPAIRING => 'REPAIRING', + self::DELETING => 'DELETING', + self::ERROR => 'ERROR', + self::RESTORING => 'RESTORING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Filestore\V1\Instance_State::class); + diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/Tier.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/Tier.php new file mode 100644 index 000000000000..331a0db60080 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/Tier.php @@ -0,0 +1,90 @@ +google.cloud.filestore.v1.Instance.Tier + */ +class Tier +{ + /** + * Not set. + * + * Generated from protobuf enum TIER_UNSPECIFIED = 0; + */ + const TIER_UNSPECIFIED = 0; + /** + * STANDARD tier. + * + * Generated from protobuf enum STANDARD = 1; + */ + const STANDARD = 1; + /** + * PREMIUM tier. + * + * Generated from protobuf enum PREMIUM = 2; + */ + const PREMIUM = 2; + /** + * BASIC instances offer a maximum capacity of 63.9 TB. + * BASIC_HDD is an alias for STANDARD Tier, offering economical + * performance backed by HDD. + * + * Generated from protobuf enum BASIC_HDD = 3; + */ + const BASIC_HDD = 3; + /** + * BASIC instances offer a maximum capacity of 63.9 TB. + * BASIC_SSD is an alias for PREMIUM Tier, and offers improved + * performance backed by SSD. + * + * Generated from protobuf enum BASIC_SSD = 4; + */ + const BASIC_SSD = 4; + /** + * HIGH_SCALE instances offer expanded capacity and performance scaling + * capabilities. + * + * Generated from protobuf enum HIGH_SCALE_SSD = 5; + */ + const HIGH_SCALE_SSD = 5; + + private static $valueToName = [ + self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED', + self::STANDARD => 'STANDARD', + self::PREMIUM => 'PREMIUM', + self::BASIC_HDD => 'BASIC_HDD', + self::BASIC_SSD => 'BASIC_SSD', + self::HIGH_SCALE_SSD => 'HIGH_SCALE_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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Tier::class, \Google\Cloud\Filestore\V1\Instance_Tier::class); + diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance_State.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance_State.php new file mode 100644 index 000000000000..73816c011ed8 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance_State.php @@ -0,0 +1,16 @@ +google.cloud.filestore.v1.ListBackupsRequest + */ +class ListBackupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location for which to retrieve backup + * information, in the format + * `projects/{project_number}/locations/{location}`. In Cloud Filestore, + * backup locations map to GCP regions, for example **us-west1**. To retrieve + * backup information for all locations, use "-" for the + * `{location}` 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 = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location for which to retrieve backup + * information, in the format + * `projects/{project_number}/locations/{location}`. In Cloud Filestore, + * backup locations map to GCP regions, for example **us-west1**. To retrieve + * backup information for all locations, use "-" for the + * `{location}` 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\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location for which to retrieve backup + * information, in the format + * `projects/{project_number}/locations/{location}`. In Cloud Filestore, + * backup locations map to GCP regions, for example **us-west1**. To retrieve + * backup information for all locations, use "-" for the + * `{location}` 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. The project and location for which to retrieve backup + * information, in the format + * `projects/{project_number}/locations/{location}`. In Cloud Filestore, + * backup locations map to GCP regions, for example **us-west1**. To retrieve + * backup information for all locations, use "-" for the + * `{location}` 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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsResponse.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsResponse.php new file mode 100644 index 000000000000..166221aae3bc --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsResponse.php @@ -0,0 +1,159 @@ +google.cloud.filestore.v1.ListBackupsResponse + */ +class ListBackupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of backups in the project for the specified location. + * If the `{location}` value in the request is "-", the response contains a + * list of backups from all locations. If any location is unreachable, the + * response will only return backups in reachable locations and the + * "unreachable" field will be populated with a list of unreachable + * locations. + * + * Generated from protobuf field repeated .google.cloud.filestore.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\Filestore\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $backups + * A list of backups in the project for the specified location. + * If the `{location}` value in the request is "-", the response contains a + * list of backups from all locations. If any location is unreachable, the + * response will only return backups in reachable locations and the + * "unreachable" field will be populated with a list of unreachable + * locations. + * @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\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * A list of backups in the project for the specified location. + * If the `{location}` value in the request is "-", the response contains a + * list of backups from all locations. If any location is unreachable, the + * response will only return backups in reachable locations and the + * "unreachable" field will be populated with a list of unreachable + * locations. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.Backup backups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackups() + { + return $this->backups; + } + + /** + * A list of backups in the project for the specified location. + * If the `{location}` value in the request is "-", the response contains a + * list of backups from all locations. If any location is unreachable, the + * response will only return backups in reachable locations and the + * "unreachable" field will be populated with a list of unreachable + * locations. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.Backup backups = 1; + * @param array<\Google\Cloud\Filestore\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesRequest.php new file mode 100644 index 000000000000..130637c15523 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesRequest.php @@ -0,0 +1,223 @@ +google.cloud.filestore.v1.ListInstancesRequest + */ +class ListInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location for which to retrieve instance + * information, in the format `projects/{project_id}/locations/{location}`. In + * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To + * retrieve instance information for all locations, use "-" for the + * `{location}` 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 = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location for which to retrieve instance + * information, in the format `projects/{project_id}/locations/{location}`. In + * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To + * retrieve instance information for all locations, use "-" for the + * `{location}` 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\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location for which to retrieve instance + * information, in the format `projects/{project_id}/locations/{location}`. In + * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To + * retrieve instance information for all locations, use "-" for the + * `{location}` 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. The project and location for which to retrieve instance + * information, in the format `projects/{project_id}/locations/{location}`. In + * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To + * retrieve instance information for all locations, use "-" for the + * `{location}` 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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesResponse.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesResponse.php new file mode 100644 index 000000000000..96c73342d44c --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesResponse.php @@ -0,0 +1,155 @@ +google.cloud.filestore.v1.ListInstancesResponse + */ +class ListInstancesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of instances in the project for the specified location. + * If the `{location}` value in the request is "-", the response contains a + * list of instances from all locations. If any location is unreachable, the + * response will only return instances in reachable locations and the + * "unreachable" field will be populated with a list of unreachable locations. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.Instance instances = 1; + */ + private $instances; + /** + * 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\Filestore\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $instances + * A list of instances in the project for the specified location. + * If the `{location}` value in the request is "-", the response contains a + * list of instances from all locations. If any location is unreachable, the + * response will only return instances in reachable locations and the + * "unreachable" field will be populated with a list of unreachable locations. + * @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\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * A list of instances in the project for the specified location. + * If the `{location}` value in the request is "-", the response contains a + * list of instances from all locations. If any location is unreachable, the + * response will only return instances in reachable locations and the + * "unreachable" field will be populated with a list of unreachable locations. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.Instance instances = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * A list of instances in the project for the specified location. + * If the `{location}` value in the request is "-", the response contains a + * list of instances from all locations. If any location is unreachable, the + * response will only return instances in reachable locations and the + * "unreachable" field will be populated with a list of unreachable locations. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.Instance instances = 1; + * @param array<\Google\Cloud\Filestore\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\Instance::class); + $this->instances = $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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig.php new file mode 100644 index 000000000000..e5b2a96057f5 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig.php @@ -0,0 +1,217 @@ +google.cloud.filestore.v1.NetworkConfig + */ +class NetworkConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Google Compute Engine + * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the + * instance is connected. + * + * Generated from protobuf field string network = 1; + */ + protected $network = ''; + /** + * Internet protocol versions for which the instance has IP addresses + * assigned. For this version, only MODE_IPV4 is supported. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; + */ + private $modes; + /** + * A /29 CIDR block in one of the + * [internal IP address + * ranges](https://www.arin.net/reference/research/statistics/address_filters/) + * that identifies the range of IP addresses reserved for this instance. For + * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap + * with either existing subnets or assigned IP address ranges for other Cloud + * Filestore instances in the selected VPC network. + * + * Generated from protobuf field string reserved_ip_range = 4; + */ + protected $reserved_ip_range = ''; + /** + * Output only. IPv4 addresses in the format + * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or + * IPv6 addresses in the format + * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. + * + * Generated from protobuf field repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $ip_addresses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * The name of the Google Compute Engine + * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the + * instance is connected. + * @type array|\Google\Protobuf\Internal\RepeatedField $modes + * Internet protocol versions for which the instance has IP addresses + * assigned. For this version, only MODE_IPV4 is supported. + * @type string $reserved_ip_range + * A /29 CIDR block in one of the + * [internal IP address + * ranges](https://www.arin.net/reference/research/statistics/address_filters/) + * that identifies the range of IP addresses reserved for this instance. For + * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap + * with either existing subnets or assigned IP address ranges for other Cloud + * Filestore instances in the selected VPC network. + * @type array|\Google\Protobuf\Internal\RepeatedField $ip_addresses + * Output only. IPv4 addresses in the format + * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or + * IPv6 addresses in the format + * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Google Compute Engine + * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the + * instance is connected. + * + * Generated from protobuf field string network = 1; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * The name of the Google Compute Engine + * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the + * instance is connected. + * + * 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; + } + + /** + * Internet protocol versions for which the instance has IP addresses + * assigned. For this version, only MODE_IPV4 is supported. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getModes() + { + return $this->modes; + } + + /** + * Internet protocol versions for which the instance has IP addresses + * assigned. For this version, only MODE_IPV4 is supported. + * + * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setModes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Filestore\V1\NetworkConfig\AddressMode::class); + $this->modes = $arr; + + return $this; + } + + /** + * A /29 CIDR block in one of the + * [internal IP address + * ranges](https://www.arin.net/reference/research/statistics/address_filters/) + * that identifies the range of IP addresses reserved for this instance. For + * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap + * with either existing subnets or assigned IP address ranges for other Cloud + * Filestore instances in the selected VPC network. + * + * Generated from protobuf field string reserved_ip_range = 4; + * @return string + */ + public function getReservedIpRange() + { + return $this->reserved_ip_range; + } + + /** + * A /29 CIDR block in one of the + * [internal IP address + * ranges](https://www.arin.net/reference/research/statistics/address_filters/) + * that identifies the range of IP addresses reserved for this instance. For + * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap + * with either existing subnets or assigned IP address ranges for other Cloud + * Filestore instances in the selected VPC network. + * + * Generated from protobuf field string reserved_ip_range = 4; + * @param string $var + * @return $this + */ + public function setReservedIpRange($var) + { + GPBUtil::checkString($var, True); + $this->reserved_ip_range = $var; + + return $this; + } + + /** + * Output only. IPv4 addresses in the format + * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or + * IPv6 addresses in the format + * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. + * + * Generated from protobuf field repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpAddresses() + { + return $this->ip_addresses; + } + + /** + * Output only. IPv4 addresses in the format + * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or + * IPv6 addresses in the format + * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. + * + * Generated from protobuf field repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ip_addresses = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig/AddressMode.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig/AddressMode.php new file mode 100644 index 000000000000..c96634c724fd --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig/AddressMode.php @@ -0,0 +1,57 @@ +google.cloud.filestore.v1.NetworkConfig.AddressMode + */ +class AddressMode +{ + /** + * Internet protocol not set. + * + * Generated from protobuf enum ADDRESS_MODE_UNSPECIFIED = 0; + */ + const ADDRESS_MODE_UNSPECIFIED = 0; + /** + * Use the IPv4 internet protocol. + * + * Generated from protobuf enum MODE_IPV4 = 1; + */ + const MODE_IPV4 = 1; + + private static $valueToName = [ + self::ADDRESS_MODE_UNSPECIFIED => 'ADDRESS_MODE_UNSPECIFIED', + self::MODE_IPV4 => 'MODE_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(AddressMode::class, \Google\Cloud\Filestore\V1\NetworkConfig_AddressMode::class); + diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig_AddressMode.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig_AddressMode.php new file mode 100644 index 000000000000..388cc85bf747 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig_AddressMode.php @@ -0,0 +1,16 @@ +google.cloud.filestore.v1.NfsExportOptions + */ +class NfsExportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * List of either an IPv4 addresses in the format + * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format + * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the + * file share. + * Overlapping IP ranges are not allowed, both within and across + * NfsExportOptions. An error will be returned. + * The limit is 64 IP ranges/addresses for each FileShareConfig among all + * NfsExportOptions. + * + * Generated from protobuf field repeated string ip_ranges = 1; + */ + private $ip_ranges; + /** + * Either READ_ONLY, for allowing only read requests on the exported + * directory, or READ_WRITE, for allowing both read and write requests. + * The default is READ_WRITE. + * + * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; + */ + protected $access_mode = 0; + /** + * Either NO_ROOT_SQUASH, for allowing root access on the exported directory, + * or ROOT_SQUASH, for not allowing root access. The default is + * NO_ROOT_SQUASH. + * + * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; + */ + protected $squash_mode = 0; + /** + * An integer representing the anonymous user id with a default value of + * 65534. + * Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be + * returned if this field is specified for other squash_mode settings. + * + * Generated from protobuf field int64 anon_uid = 4; + */ + protected $anon_uid = 0; + /** + * An integer representing the anonymous group id with a default value of + * 65534. + * Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be + * returned if this field is specified for other squash_mode settings. + * + * Generated from protobuf field int64 anon_gid = 5; + */ + protected $anon_gid = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $ip_ranges + * List of either an IPv4 addresses in the format + * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format + * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the + * file share. + * Overlapping IP ranges are not allowed, both within and across + * NfsExportOptions. An error will be returned. + * The limit is 64 IP ranges/addresses for each FileShareConfig among all + * NfsExportOptions. + * @type int $access_mode + * Either READ_ONLY, for allowing only read requests on the exported + * directory, or READ_WRITE, for allowing both read and write requests. + * The default is READ_WRITE. + * @type int $squash_mode + * Either NO_ROOT_SQUASH, for allowing root access on the exported directory, + * or ROOT_SQUASH, for not allowing root access. The default is + * NO_ROOT_SQUASH. + * @type int|string $anon_uid + * An integer representing the anonymous user id with a default value of + * 65534. + * Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be + * returned if this field is specified for other squash_mode settings. + * @type int|string $anon_gid + * An integer representing the anonymous group id with a default value of + * 65534. + * Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be + * returned if this field is specified for other squash_mode settings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * List of either an IPv4 addresses in the format + * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format + * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the + * file share. + * Overlapping IP ranges are not allowed, both within and across + * NfsExportOptions. An error will be returned. + * The limit is 64 IP ranges/addresses for each FileShareConfig among all + * NfsExportOptions. + * + * Generated from protobuf field repeated string ip_ranges = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpRanges() + { + return $this->ip_ranges; + } + + /** + * List of either an IPv4 addresses in the format + * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format + * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the + * file share. + * Overlapping IP ranges are not allowed, both within and across + * NfsExportOptions. An error will be returned. + * The limit is 64 IP ranges/addresses for each FileShareConfig among all + * NfsExportOptions. + * + * Generated from protobuf field repeated string ip_ranges = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ip_ranges = $arr; + + return $this; + } + + /** + * Either READ_ONLY, for allowing only read requests on the exported + * directory, or READ_WRITE, for allowing both read and write requests. + * The default is READ_WRITE. + * + * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; + * @return int + */ + public function getAccessMode() + { + return $this->access_mode; + } + + /** + * Either READ_ONLY, for allowing only read requests on the exported + * directory, or READ_WRITE, for allowing both read and write requests. + * The default is READ_WRITE. + * + * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; + * @param int $var + * @return $this + */ + public function setAccessMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\NfsExportOptions\AccessMode::class); + $this->access_mode = $var; + + return $this; + } + + /** + * Either NO_ROOT_SQUASH, for allowing root access on the exported directory, + * or ROOT_SQUASH, for not allowing root access. The default is + * NO_ROOT_SQUASH. + * + * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; + * @return int + */ + public function getSquashMode() + { + return $this->squash_mode; + } + + /** + * Either NO_ROOT_SQUASH, for allowing root access on the exported directory, + * or ROOT_SQUASH, for not allowing root access. The default is + * NO_ROOT_SQUASH. + * + * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; + * @param int $var + * @return $this + */ + public function setSquashMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\NfsExportOptions\SquashMode::class); + $this->squash_mode = $var; + + return $this; + } + + /** + * An integer representing the anonymous user id with a default value of + * 65534. + * Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be + * returned if this field is specified for other squash_mode settings. + * + * Generated from protobuf field int64 anon_uid = 4; + * @return int|string + */ + public function getAnonUid() + { + return $this->anon_uid; + } + + /** + * An integer representing the anonymous user id with a default value of + * 65534. + * Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be + * returned if this field is specified for other squash_mode settings. + * + * Generated from protobuf field int64 anon_uid = 4; + * @param int|string $var + * @return $this + */ + public function setAnonUid($var) + { + GPBUtil::checkInt64($var); + $this->anon_uid = $var; + + return $this; + } + + /** + * An integer representing the anonymous group id with a default value of + * 65534. + * Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be + * returned if this field is specified for other squash_mode settings. + * + * Generated from protobuf field int64 anon_gid = 5; + * @return int|string + */ + public function getAnonGid() + { + return $this->anon_gid; + } + + /** + * An integer representing the anonymous group id with a default value of + * 65534. + * Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be + * returned if this field is specified for other squash_mode settings. + * + * Generated from protobuf field int64 anon_gid = 5; + * @param int|string $var + * @return $this + */ + public function setAnonGid($var) + { + GPBUtil::checkInt64($var); + $this->anon_gid = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/AccessMode.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/AccessMode.php new file mode 100644 index 000000000000..22e3a736af2a --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/AccessMode.php @@ -0,0 +1,64 @@ +google.cloud.filestore.v1.NfsExportOptions.AccessMode + */ +class AccessMode +{ + /** + * AccessMode not set. + * + * Generated from protobuf enum ACCESS_MODE_UNSPECIFIED = 0; + */ + const ACCESS_MODE_UNSPECIFIED = 0; + /** + * The client can only read the file share. + * + * Generated from protobuf enum READ_ONLY = 1; + */ + const READ_ONLY = 1; + /** + * The client can read and write the file share (default). + * + * Generated from protobuf enum READ_WRITE = 2; + */ + const READ_WRITE = 2; + + private static $valueToName = [ + self::ACCESS_MODE_UNSPECIFIED => 'ACCESS_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(AccessMode::class, \Google\Cloud\Filestore\V1\NfsExportOptions_AccessMode::class); + diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/SquashMode.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/SquashMode.php new file mode 100644 index 000000000000..5cc43da713a5 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/SquashMode.php @@ -0,0 +1,64 @@ +google.cloud.filestore.v1.NfsExportOptions.SquashMode + */ +class SquashMode +{ + /** + * SquashMode not set. + * + * Generated from protobuf enum SQUASH_MODE_UNSPECIFIED = 0; + */ + const SQUASH_MODE_UNSPECIFIED = 0; + /** + * The Root user has root access to the file share (default). + * + * Generated from protobuf enum NO_ROOT_SQUASH = 1; + */ + const NO_ROOT_SQUASH = 1; + /** + * The Root user has squashed access to the anonymous uid/gid. + * + * Generated from protobuf enum ROOT_SQUASH = 2; + */ + const ROOT_SQUASH = 2; + + private static $valueToName = [ + self::SQUASH_MODE_UNSPECIFIED => 'SQUASH_MODE_UNSPECIFIED', + self::NO_ROOT_SQUASH => 'NO_ROOT_SQUASH', + self::ROOT_SQUASH => 'ROOT_SQUASH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SquashMode::class, \Google\Cloud\Filestore\V1\NfsExportOptions_SquashMode::class); + diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions_AccessMode.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions_AccessMode.php new file mode 100644 index 000000000000..a6836188b358 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions_AccessMode.php @@ -0,0 +1,16 @@ +google.cloud.filestore.v1.RestoreInstanceRequest + */ +class RestoreInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the instance, in the format + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Name of the file share in the Cloud Filestore instance that the + * backup is being restored to. + * + * Generated from protobuf field string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $file_share = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the instance, in the format + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. + * @type string $file_share + * Required. Name of the file share in the Cloud Filestore instance that the + * backup is being restored to. + * @type string $source_backup + * The resource name of the backup, in the format + * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the instance, in the format + * `projects/{project_number}/locations/{location_id}/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. The resource name of the instance, in the format + * `projects/{project_number}/locations/{location_id}/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. Name of the file share in the Cloud Filestore instance that the + * backup is being restored to. + * + * Generated from protobuf field string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFileShare() + { + return $this->file_share; + } + + /** + * Required. Name of the file share in the Cloud Filestore instance that the + * backup is being restored to. + * + * Generated from protobuf field string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFileShare($var) + { + GPBUtil::checkString($var, True); + $this->file_share = $var; + + return $this; + } + + /** + * The resource name of the backup, in the format + * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. + * + * Generated from protobuf field string source_backup = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getSourceBackup() + { + return $this->readOneof(3); + } + + public function hasSourceBackup() + { + return $this->hasOneof(3); + } + + /** + * The resource name of the backup, in the format + * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. + * + * Generated from protobuf field string source_backup = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSourceBackup($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateBackupRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateBackupRequest.php new file mode 100644 index 000000000000..582f8824eeff --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateBackupRequest.php @@ -0,0 +1,125 @@ +google.cloud.filestore.v1.UpdateBackupRequest + */ +class UpdateBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A [backup resource][google.cloud.filestore.v1.Backup] + * + * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup = null; + /** + * 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 = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Filestore\V1\Backup $backup + * Required. A [backup resource][google.cloud.filestore.v1.Backup] + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * Required. A [backup resource][google.cloud.filestore.v1.Backup] + * + * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Filestore\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][google.cloud.filestore.v1.Backup] + * + * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Filestore\V1\Backup $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Filestore\V1\Backup::class); + $this->backup = $var; + + return $this; + } + + /** + * 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 = 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. At least one path must be supplied in + * this field. + * + * 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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateInstanceRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateInstanceRequest.php new file mode 100644 index 000000000000..65da44057cd5 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateInstanceRequest.php @@ -0,0 +1,141 @@ +google.cloud.filestore.v1.UpdateInstanceRequest + */ +class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * 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 these + * fields: + * * "description" + * * "file_shares" + * * "labels" + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + */ + protected $update_mask = null; + /** + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 2; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * 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 these + * fields: + * * "description" + * * "file_shares" + * * "labels" + * @type \Google\Cloud\Filestore\V1\Instance $instance + * Only fields specified in update_mask are updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); + parent::__construct($data); + } + + /** + * 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 these + * fields: + * * "description" + * * "file_shares" + * * "labels" + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @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 of fields to update. At least one path must be supplied in this + * field. The elements of the repeated paths field may only include these + * fields: + * * "description" + * * "file_shares" + * * "labels" + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 2; + * @return \Google\Cloud\Filestore\V1\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 2; + * @param \Google\Cloud\Filestore\V1\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Filestore\V1\Instance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_backup.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_backup.php new file mode 100644 index 000000000000..dd409551faf0 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_backup.php @@ -0,0 +1,91 @@ +createBackup($formattedParent, $backup, $backupId); + $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 = CloudFilestoreManagerClient::locationName('[PROJECT]', '[LOCATION]'); + $backupId = '[BACKUP_ID]'; + + create_backup_sample($formattedParent, $backupId); +} +// [END file_v1_generated_CloudFilestoreManager_CreateBackup_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_instance.php new file mode 100644 index 000000000000..978c695d2468 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_instance.php @@ -0,0 +1,89 @@ +createInstance($formattedParent, $instanceId, $instance); + $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 = CloudFilestoreManagerClient::locationName('[PROJECT]', '[LOCATION]'); + $instanceId = '[INSTANCE_ID]'; + + create_instance_sample($formattedParent, $instanceId); +} +// [END file_v1_generated_CloudFilestoreManager_CreateInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_backup.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_backup.php new file mode 100644 index 000000000000..f82ad0fe81c6 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_backup.php @@ -0,0 +1,76 @@ +deleteBackup($formattedName); + $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 = CloudFilestoreManagerClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + + delete_backup_sample($formattedName); +} +// [END file_v1_generated_CloudFilestoreManager_DeleteBackup_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_instance.php new file mode 100644 index 000000000000..e4206d9d10c6 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_instance.php @@ -0,0 +1,76 @@ +deleteInstance($formattedName); + $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 = CloudFilestoreManagerClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + delete_instance_sample($formattedName); +} +// [END file_v1_generated_CloudFilestoreManager_DeleteInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_backup.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_backup.php new file mode 100644 index 000000000000..b497fe69c69b --- /dev/null +++ b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_backup.php @@ -0,0 +1,67 @@ +getBackup($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudFilestoreManagerClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + + get_backup_sample($formattedName); +} +// [END file_v1_generated_CloudFilestoreManager_GetBackup_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_instance.php new file mode 100644 index 000000000000..f33a8ebc2fda --- /dev/null +++ b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_instance.php @@ -0,0 +1,67 @@ +getInstance($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudFilestoreManagerClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + get_instance_sample($formattedName); +} +// [END file_v1_generated_CloudFilestoreManager_GetInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_backups.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_backups.php new file mode 100644 index 000000000000..8f61d16e7165 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_backups.php @@ -0,0 +1,77 @@ +listBackups($formattedParent); + + /** @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 = CloudFilestoreManagerClient::locationName('[PROJECT]', '[LOCATION]'); + + list_backups_sample($formattedParent); +} +// [END file_v1_generated_CloudFilestoreManager_ListBackups_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_instances.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_instances.php new file mode 100644 index 000000000000..4dc41964874b --- /dev/null +++ b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_instances.php @@ -0,0 +1,76 @@ +listInstances($formattedParent); + + /** @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 = CloudFilestoreManagerClient::locationName('[PROJECT]', '[LOCATION]'); + + list_instances_sample($formattedParent); +} +// [END file_v1_generated_CloudFilestoreManager_ListInstances_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/restore_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/restore_instance.php new file mode 100644 index 000000000000..8297237b9bf5 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/restore_instance.php @@ -0,0 +1,86 @@ +restoreInstance($formattedName, $fileShare); + $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 = CloudFilestoreManagerClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $fileShare = '[FILE_SHARE]'; + + restore_instance_sample($formattedName, $fileShare); +} +// [END file_v1_generated_CloudFilestoreManager_RestoreInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_backup.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_backup.php new file mode 100644 index 000000000000..4cfa0d68ac1f --- /dev/null +++ b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_backup.php @@ -0,0 +1,70 @@ +updateBackup($backup, $updateMask); + $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 file_v1_generated_CloudFilestoreManager_UpdateBackup_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_instance.php new file mode 100644 index 000000000000..9c1deabd2622 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_instance.php @@ -0,0 +1,65 @@ +updateInstance(); + $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 file_v1_generated_CloudFilestoreManager_UpdateInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/src/V1/CloudFilestoreManagerClient.php b/owl-bot-staging/Filestore/v1/src/V1/CloudFilestoreManagerClient.php new file mode 100644 index 000000000000..09d4053ddc3d --- /dev/null +++ b/owl-bot-staging/Filestore/v1/src/V1/CloudFilestoreManagerClient.php @@ -0,0 +1,34 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $backup = new Backup(); + * $backupId = 'backup_id'; + * $operationResponse = $cloudFilestoreManagerClient->createBackup($formattedParent, $backup, $backupId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $cloudFilestoreManagerClient->createBackup($formattedParent, $backup, $backupId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'createBackup'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $cloudFilestoreManagerClient->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. + */ +class CloudFilestoreManagerGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.filestore.v1.CloudFilestoreManager'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'file.googleapis.com'; + + /** 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 $backupNameTemplate; + + private static $instanceNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/cloud_filestore_manager_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_filestore_manager_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_filestore_manager_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/cloud_filestore_manager_rest_client_config.php', + ], + ], + ]; + } + + private static function getBackupNameTemplate() + { + if (self::$backupNameTemplate == null) { + self::$backupNameTemplate = new PathTemplate('projects/{project}/locations/{location}/backups/{backup}'); + } + + return self::$backupNameTemplate; + } + + private static function getInstanceNameTemplate() + { + if (self::$instanceNameTemplate == null) { + self::$instanceNameTemplate = new PathTemplate('projects/{project}/locations/{location}/instances/{instance}'); + } + + return self::$instanceNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'backup' => self::getBackupNameTemplate(), + 'instance' => self::getInstanceNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a backup + * resource. + * + * @param string $project + * @param string $location + * @param string $backup + * + * @return string The formatted backup resource. + */ + public static function backupName($project, $location, $backup) + { + return self::getBackupNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'backup' => $backup, + ]); + } + + /** + * 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($project, $location, $instance) + { + return self::getInstanceNameTemplate()->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($project, $location) + { + return self::getLocationNameTemplate()->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 + * - backup: projects/{project}/locations/{location}/backups/{backup} + * - 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($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"); + } + + /** + * 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; + } + + /** + * 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 'file.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a backup. + * + * Sample code: + * ``` + * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); + * try { + * $formattedParent = $cloudFilestoreManagerClient->locationName('[PROJECT]', '[LOCATION]'); + * $backup = new Backup(); + * $backupId = 'backup_id'; + * $operationResponse = $cloudFilestoreManagerClient->createBackup($formattedParent, $backup, $backupId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $cloudFilestoreManagerClient->createBackup($formattedParent, $backup, $backupId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'createBackup'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $cloudFilestoreManagerClient->close(); + * } + * ``` + * + * @param string $parent Required. The backup's project and location, in the format + * `projects/{project_number}/locations/{location}`. In Cloud Filestore, + * backup locations map to GCP regions, for example **us-west1**. + * @param Backup $backup Required. A [backup resource][google.cloud.filestore.v1.Backup] + * @param string $backupId Required. The ID to use for the backup. + * The ID must be unique within the specified project and location. + * + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * Values that do not match this pattern will trigger an INVALID_ARGUMENT + * error. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createBackup($parent, $backup, $backupId, array $optionalArgs = []) + { + $request = new CreateBackupRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setBackup($backup); + $request->setBackupId($backupId); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateBackup', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates an instance. + * When creating from a backup, the capacity of the new instance needs to be + * equal to or larger than the capacity of the backup (and also equal to or + * larger than the minimum capacity of the tier). + * + * Sample code: + * ``` + * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); + * try { + * $formattedParent = $cloudFilestoreManagerClient->locationName('[PROJECT]', '[LOCATION]'); + * $instanceId = 'instance_id'; + * $instance = new Instance(); + * $operationResponse = $cloudFilestoreManagerClient->createInstance($formattedParent, $instanceId, $instance); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $cloudFilestoreManagerClient->createInstance($formattedParent, $instanceId, $instance); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'createInstance'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $cloudFilestoreManagerClient->close(); + * } + * ``` + * + * @param string $parent Required. The instance's project and location, in the format + * `projects/{project_id}/locations/{location}`. In Cloud Filestore, + * locations map to GCP zones, for example **us-west1-b**. + * @param string $instanceId Required. The name of the instance to create. + * The name must be unique for the specified project and location. + * @param Instance $instance Required. An [instance resource][google.cloud.filestore.v1.Instance] + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createInstance($parent, $instanceId, $instance, array $optionalArgs = []) + { + $request = new CreateInstanceRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setInstanceId($instanceId); + $request->setInstance($instance); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateInstance', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a backup. + * + * Sample code: + * ``` + * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); + * try { + * $formattedName = $cloudFilestoreManagerClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + * $operationResponse = $cloudFilestoreManagerClient->deleteBackup($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $cloudFilestoreManagerClient->deleteBackup($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'deleteBackup'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $cloudFilestoreManagerClient->close(); + * } + * ``` + * + * @param string $name Required. The backup resource name, in the format + * `projects/{project_number}/locations/{location}/backups/{backup_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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteBackup($name, array $optionalArgs = []) + { + $request = new DeleteBackupRequest(); + $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->startOperationsCall('DeleteBackup', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes an instance. + * + * Sample code: + * ``` + * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); + * try { + * $formattedName = $cloudFilestoreManagerClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + * $operationResponse = $cloudFilestoreManagerClient->deleteInstance($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $cloudFilestoreManagerClient->deleteInstance($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'deleteInstance'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $cloudFilestoreManagerClient->close(); + * } + * ``` + * + * @param string $name Required. The instance resource name, in the format + * `projects/{project_id}/locations/{location}/instances/{instance_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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteInstance($name, array $optionalArgs = []) + { + $request = new DeleteInstanceRequest(); + $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->startOperationsCall('DeleteInstance', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets the details of a specific backup. + * + * Sample code: + * ``` + * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); + * try { + * $formattedName = $cloudFilestoreManagerClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + * $response = $cloudFilestoreManagerClient->getBackup($formattedName); + * } finally { + * $cloudFilestoreManagerClient->close(); + * } + * ``` + * + * @param string $name Required. The backup resource name, in the format + * `projects/{project_number}/locations/{location}/backups/{backup_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\Filestore\V1\Backup + * + * @throws ApiException if the remote call fails + */ + public function getBackup($name, array $optionalArgs = []) + { + $request = new GetBackupRequest(); + $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('GetBackup', Backup::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the details of a specific instance. + * + * Sample code: + * ``` + * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); + * try { + * $formattedName = $cloudFilestoreManagerClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + * $response = $cloudFilestoreManagerClient->getInstance($formattedName); + * } finally { + * $cloudFilestoreManagerClient->close(); + * } + * ``` + * + * @param string $name Required. The instance resource name, in the format + * `projects/{project_id}/locations/{location}/instances/{instance_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\Filestore\V1\Instance + * + * @throws ApiException if the remote call fails + */ + public function getInstance($name, array $optionalArgs = []) + { + $request = new GetInstanceRequest(); + $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('GetInstance', Instance::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists all backups in a project for either a specified location or for all + * locations. + * + * Sample code: + * ``` + * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); + * try { + * $formattedParent = $cloudFilestoreManagerClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $cloudFilestoreManagerClient->listBackups($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $cloudFilestoreManagerClient->listBackups($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $cloudFilestoreManagerClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and location for which to retrieve backup + * information, in the format + * `projects/{project_number}/locations/{location}`. In Cloud Filestore, + * backup locations map to GCP regions, for example **us-west1**. To retrieve + * backup information for all locations, use "-" for the + * `{location}` value. + * @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 $orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @type string $filter + * List filter. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listBackups($parent, array $optionalArgs = []) + { + $request = new ListBackupsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListBackups', $optionalArgs, ListBackupsResponse::class, $request); + } + + /** + * Lists all instances in a project for either a specified location + * or for all locations. + * + * Sample code: + * ``` + * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); + * try { + * $formattedParent = $cloudFilestoreManagerClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $cloudFilestoreManagerClient->listInstances($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $cloudFilestoreManagerClient->listInstances($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $cloudFilestoreManagerClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and location for which to retrieve instance + * information, in the format `projects/{project_id}/locations/{location}`. In + * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To + * retrieve instance information for all locations, use "-" for the + * `{location}` value. + * @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 $orderBy + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @type string $filter + * List filter. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listInstances($parent, array $optionalArgs = []) + { + $request = new ListInstancesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListInstances', $optionalArgs, ListInstancesResponse::class, $request); + } + + /** + * Restores an existing instance's file share from a backup. + * + * The capacity of the instance needs to be equal to or larger than the + * capacity of the backup (and also equal to or larger than the minimum + * capacity of the tier). + * + * Sample code: + * ``` + * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); + * try { + * $formattedName = $cloudFilestoreManagerClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + * $fileShare = 'file_share'; + * $operationResponse = $cloudFilestoreManagerClient->restoreInstance($formattedName, $fileShare); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $cloudFilestoreManagerClient->restoreInstance($formattedName, $fileShare); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'restoreInstance'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $cloudFilestoreManagerClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the instance, in the format + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. + * @param string $fileShare Required. Name of the file share in the Cloud Filestore instance that the + * backup is being restored to. + * @param array $optionalArgs { + * Optional. + * + * @type string $sourceBackup + * The resource name of the backup, in the format + * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function restoreInstance($name, $fileShare, array $optionalArgs = []) + { + $request = new RestoreInstanceRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setFileShare($fileShare); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['sourceBackup'])) { + $request->setSourceBackup($optionalArgs['sourceBackup']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('RestoreInstance', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates the settings of a specific backup. + * + * Sample code: + * ``` + * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); + * try { + * $backup = new Backup(); + * $updateMask = new FieldMask(); + * $operationResponse = $cloudFilestoreManagerClient->updateBackup($backup, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $cloudFilestoreManagerClient->updateBackup($backup, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'updateBackup'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $cloudFilestoreManagerClient->close(); + * } + * ``` + * + * @param Backup $backup Required. A [backup resource][google.cloud.filestore.v1.Backup] + * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateBackup($backup, $updateMask, array $optionalArgs = []) + { + $request = new UpdateBackupRequest(); + $requestParamHeaders = []; + $request->setBackup($backup); + $request->setUpdateMask($updateMask); + $requestParamHeaders['backup.name'] = $backup->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateBackup', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates the settings of a specific instance. + * + * Sample code: + * ``` + * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); + * try { + * $operationResponse = $cloudFilestoreManagerClient->updateInstance(); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $cloudFilestoreManagerClient->updateInstance(); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'updateInstance'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $cloudFilestoreManagerClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * 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 these + * fields: + * + * * "description" + * * "file_shares" + * * "labels" + * @type Instance $instance + * Only fields specified in update_mask are updated. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateInstance(array $optionalArgs = []) + { + $request = new UpdateInstanceRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateInstance', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/Filestore/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Filestore/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..84e5a17dbc33 --- /dev/null +++ b/owl-bot-staging/Filestore/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.filestore.v1", + "libraryPackage": "Google\\Cloud\\Filestore\\V1", + "services": { + "CloudFilestoreManager": { + "clients": { + "grpc": { + "libraryClient": "CloudFilestoreManagerGapicClient", + "rpcs": { + "CreateBackup": { + "methods": [ + "createBackup" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "ListBackups": { + "methods": [ + "listBackups" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "RestoreInstance": { + "methods": [ + "restoreInstance" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "UpdateInstance": { + "methods": [ + "updateInstance" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_client_config.json b/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_client_config.json new file mode 100644 index 000000000000..59a1225df502 --- /dev/null +++ b/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_client_config.json @@ -0,0 +1,119 @@ +{ + "interfaces": { + "google.cloud.filestore.v1.CloudFilestoreManager": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [], + "no_retry_2_codes": [], + "no_retry_3_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": 250, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 32000, + "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": 60000000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000000, + "total_timeout_millis": 60000000 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 14400000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 14400000, + "total_timeout_millis": 14400000 + }, + "no_retry_3_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": { + "CreateBackup": { + "timeout_millis": 60000000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateInstance": { + "timeout_millis": 60000000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteBackup": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + }, + "DeleteInstance": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + }, + "GetBackup": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetInstance": { + "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" + }, + "ListInstances": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RestoreInstance": { + "timeout_millis": 60000000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateBackup": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + }, + "UpdateInstance": { + "timeout_millis": 14400000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + } + } + } + } +} diff --git a/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_descriptor_config.php b/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_descriptor_config.php new file mode 100644 index 000000000000..2a43e65d5d6f --- /dev/null +++ b/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_descriptor_config.php @@ -0,0 +1,98 @@ + [ + 'google.cloud.filestore.v1.CloudFilestoreManager' => [ + 'CreateBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Filestore\V1\Backup', + 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'CreateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Filestore\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'RestoreInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Filestore\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Filestore\V1\Backup', + 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Filestore\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListBackups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBackups', + ], + ], + 'ListInstances' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInstances', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_rest_client_config.php b/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_rest_client_config.php new file mode 100644 index 000000000000..5d5d552c22ac --- /dev/null +++ b/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_rest_client_config.php @@ -0,0 +1,217 @@ + [ + 'google.cloud.filestore.v1.CloudFilestoreManager' => [ + 'CreateBackup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backups', + 'body' => 'backup', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'backup_id', + ], + ], + 'CreateInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', + 'body' => 'instance', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'instance_id', + ], + ], + 'DeleteBackup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInstance' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBackups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListInstances' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RestoreInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:restore', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateBackup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{backup.name=projects/*/locations/*/backups/*}', + 'body' => 'backup', + 'placeholders' => [ + 'backup.name' => [ + 'getters' => [ + 'getBackup', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateInstance' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{instance.name=projects/*/locations/*/instances/*}', + 'body' => 'instance', + 'placeholders' => [ + 'instance.name' => [ + 'getters' => [ + 'getInstance', + 'getName', + ], + ], + ], + ], + ], + '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.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/Filestore/v1/tests/Unit/V1/CloudFilestoreManagerClientTest.php b/owl-bot-staging/Filestore/v1/tests/Unit/V1/CloudFilestoreManagerClientTest.php new file mode 100644 index 000000000000..37c52425a61b --- /dev/null +++ b/owl-bot-staging/Filestore/v1/tests/Unit/V1/CloudFilestoreManagerClientTest.php @@ -0,0 +1,1233 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CloudFilestoreManagerClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CloudFilestoreManagerClient($options); + } + + /** @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'; + $capacityGb = 1923585408; + $storageBytes = 2035244455; + $sourceInstance = 'sourceInstance-677426119'; + $sourceFileShare = 'sourceFileShare-1224476160'; + $downloadBytes = 971924980; + $expectedResponse = new Backup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacityGb($capacityGb); + $expectedResponse->setStorageBytes($storageBytes); + $expectedResponse->setSourceInstance($sourceInstance); + $expectedResponse->setSourceFileShare($sourceFileShare); + $expectedResponse->setDownloadBytes($downloadBytes); + $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->locationName('[PROJECT]', '[LOCATION]'); + $backup = new Backup(); + $backupId = 'backupId1355353272'; + $response = $gapicClient->createBackup($formattedParent, $backup, $backupId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/CreateBackup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getBackup(); + $this->assertProtobufEquals($backup, $actualValue); + $actualValue = $actualApiRequestObject->getBackupId(); + $this->assertProtobufEquals($backupId, $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->locationName('[PROJECT]', '[LOCATION]'); + $backup = new Backup(); + $backupId = 'backupId1355353272'; + $response = $gapicClient->createBackup($formattedParent, $backup, $backupId); + $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 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'; + $description = 'description-1724546052'; + $statusMessage = 'statusMessage-239442758'; + $etag = 'etag3123477'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setStatusMessage($statusMessage); + $expectedResponse->setEtag($etag); + $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(); + $response = $gapicClient->createInstance($formattedParent, $instanceId, $instance); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/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(); + $response = $gapicClient->createInstance($formattedParent, $instanceId, $instance); + $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 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]'); + $response = $gapicClient->deleteBackup($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/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]'); + $response = $gapicClient->deleteBackup($formattedName); + $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 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]'); + $response = $gapicClient->deleteInstance($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/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]'); + $response = $gapicClient->deleteInstance($formattedName); + $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 getBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $capacityGb = 1923585408; + $storageBytes = 2035244455; + $sourceInstance = 'sourceInstance-677426119'; + $sourceFileShare = 'sourceFileShare-1224476160'; + $downloadBytes = 971924980; + $expectedResponse = new Backup(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacityGb($capacityGb); + $expectedResponse->setStorageBytes($storageBytes); + $expectedResponse->setSourceInstance($sourceInstance); + $expectedResponse->setSourceFileShare($sourceFileShare); + $expectedResponse->setDownloadBytes($downloadBytes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + $response = $gapicClient->getBackup($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/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]'); + try { + $gapicClient->getBackup($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 getInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $statusMessage = 'statusMessage-239442758'; + $etag = 'etag3123477'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setStatusMessage($statusMessage); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $response = $gapicClient->getInstance($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/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]'); + try { + $gapicClient->getInstance($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 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->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listBackups($formattedParent); + $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.filestore.v1.CloudFilestoreManager/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->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listBackups($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 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]'); + $response = $gapicClient->listInstances($formattedParent); + $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.filestore.v1.CloudFilestoreManager/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]'); + try { + $gapicClient->listInstances($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 restoreInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/restoreInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $statusMessage = 'statusMessage-239442758'; + $etag = 'etag3123477'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setStatusMessage($statusMessage); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/restoreInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $fileShare = 'fileShare2143984476'; + $response = $gapicClient->restoreInstance($formattedName, $fileShare); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/RestoreInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getFileShare(); + $this->assertProtobufEquals($fileShare, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/restoreInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function restoreInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/restoreInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $fileShare = 'fileShare2143984476'; + $response = $gapicClient->restoreInstance($formattedName, $fileShare); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/restoreInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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'; + $capacityGb = 1923585408; + $storageBytes = 2035244455; + $sourceInstance = 'sourceInstance-677426119'; + $sourceFileShare = 'sourceFileShare-1224476160'; + $downloadBytes = 971924980; + $expectedResponse = new Backup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacityGb($capacityGb); + $expectedResponse->setStorageBytes($storageBytes); + $expectedResponse->setSourceInstance($sourceInstance); + $expectedResponse->setSourceFileShare($sourceFileShare); + $expectedResponse->setDownloadBytes($downloadBytes); + $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 + $backup = new Backup(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateBackup($backup, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/UpdateBackup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getBackup(); + $this->assertProtobufEquals($backup, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $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 + $backup = new Backup(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateBackup($backup, $updateMask); + $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 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'; + $description = 'description-1724546052'; + $statusMessage = 'statusMessage-239442758'; + $etag = 'etag3123477'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setStatusMessage($statusMessage); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $response = $gapicClient->updateInstance(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/UpdateInstance', $actualApiFuncCall); + $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); + $response = $gapicClient->updateInstance(); + $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()); + } +} diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php new file mode 100644 index 0000000000000000000000000000000000000000..c4a191fe051b03de2a449a8ee5bcd5f008d38e30 GIT binary patch literal 1722 zcma)6U2mIK7@nPMOHaDQqLu1yi*}M$imPo@j{X_xycyV_6KZu={CID9y2V=2Dj@cMn8_k-s=uYO7|Qt$*$P=Yd_q7crmA-zB_ z%?Kp{iQ#N9pQ8*0pAJQ$Ij(Vh*N=`bB~};dpmk<6Wh|yJ!6)0D{=hb2zGazs0%_v0Kf@Ta-+MG{a<5?BC?BtX4qu;eUqpQeP( zeGKc4%wiR64X&0@lqG)bj!+(CIAv3sELD~xM4JT`k>0baY(a*RKA-c$tBi?sGuxw85E&EbZ%yx$2aDXoSD@-z3UQM+kSqHUH_5E%|@m2hIf~&!m zFl^==Gd1*@&Wb({!5>?ocUKt*kIPK45sb(MBVP5tuKtqz6iZA^TwtYm4*vNZY}Gmt z?t{%jOWhW1_3jA|z;;XmCI*stIPBiz!4t4auT#_o>}}`8b8&4^v1V-!4#Npk&8*+f;444zz`Ru(wL^UTeVbM8$n zdN33HhGJ!ZEK|2tzSBBQNBoxk+1{KC$M#?C?;GM6xGqm|Zy0pt(9EJgw4anbvdpt&xnYuJP9@7{{n;11zn6!NZTwK$-wn51 O>y$jR^s^;c0`NZ^L?hq; literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php new file mode 100644 index 0000000000000000000000000000000000000000..601f2cadd0171e6f1e36f84b7b6881a41d191e15 GIT binary patch literal 1674 zcma)6%Wl&^6eURu?NFg$0V)-b0g4Ey*aUViEpiek3KDJ9gf5V!XyQ!VL9WLdk0YSU z2k;SWShD96*zggEHDAGdVQo!uUG8|~gbXia!3d}`x>^B|v&^ zR79Jaw*r{tPu?kFIWYslK$RLjAY;abZO^BggPhg6N2fRU-(4qf2ZR~Y52v52#eBNW zrqVgXVXjmYoK(qYQ#kAPBXRB%yD&Xx@D1=Sztr$%*=Re=YTUc zL{@hH#{yc^q8eAxg7WHW0T(LEwbE~=Xw=Y(uI>9g8nIxt2wRt*ZgJ613eVJHC)2E50GHF0S zBkO4PII$oNL#TuFXbGOius2_sWFZG@TCz#)R{`CIGtSnahV=0|VmgI)+fxq(JS0(I zauHYojewBk)|~b!>AI=S|FyW#syDmeig#N&NzHo5(;?Vz8pfv1Q**!ib5`Mby2Lw{ zxzo^v)csR@km1<2uCnbM$+k6=ZSPkH7d5{ZkMd7>BMY@-8F*&?>B=mnCTN1tU#kNj AinternalAddGeneratedFile( + ' +µ& +/google/firestore/admin/v1/firestore_admin.protogoogle.firestore.admin.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto(google/firestore/admin/v1/database.proto%google/firestore/admin/v1/field.proto%google/firestore/admin/v1/index.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"Q +ListDatabasesRequest9 +parent ( B)àAúA#!firestore.googleapis.com/Database"O +ListDatabasesResponse6 + databases ( 2#.google.firestore.admin.v1.Database"M +GetDatabaseRequest7 +name ( B)àAúA# +!firestore.googleapis.com/Database"„ +UpdateDatabaseRequest: +database ( 2#.google.firestore.admin.v1.DatabaseBàA/ + update_mask ( 2.google.protobuf.FieldMask" +UpdateDatabaseMetadata"Œ +CreateIndexRequest@ +parent ( B0àAúA* +(firestore.googleapis.com/CollectionGroup4 +index ( 2 .google.firestore.admin.v1.IndexBàA" +ListIndexesRequest@ +parent ( B0àAúA* +(firestore.googleapis.com/CollectionGroup +filter (  + page_size ( + +page_token ( "a +ListIndexesResponse1 +indexes ( 2 .google.firestore.admin.v1.Index +next_page_token ( "G +GetIndexRequest4 +name ( B&àAúA +firestore.googleapis.com/Index"J +DeleteIndexRequest4 +name ( B&àAúA +firestore.googleapis.com/Index"{ +UpdateFieldRequest4 +field ( 2 .google.firestore.admin.v1.FieldBàA/ + update_mask ( 2.google.protobuf.FieldMask"G +GetFieldRequest4 +name ( B&àAúA +firestore.googleapis.com/Field"Œ +ListFieldsRequest@ +parent ( B0àAúA* +(firestore.googleapis.com/CollectionGroup +filter (  + page_size ( + +page_token ( "_ +ListFieldsResponse0 +fields ( 2 .google.firestore.admin.v1.Field +next_page_token ( "„ +ExportDocumentsRequest7 +name ( B)àAúA# +!firestore.googleapis.com/Database +collection_ids (  +output_uri_prefix ( "ƒ +ImportDocumentsRequest7 +name ( B)àAúA# +!firestore.googleapis.com/Database +collection_ids (  +input_uri_prefix ( 2’ +FirestoreAdminÛ + CreateIndex-.google.firestore.admin.v1.CreateIndexRequest.google.longrunning.Operation"~‚Óä“G">/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes:indexÚA parent,indexÊA +IndexIndexOperationMetadata½ + ListIndexes-.google.firestore.admin.v1.ListIndexesRequest..google.firestore.admin.v1.ListIndexesResponse"O‚Óä“@>/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexesÚAparent§ +GetIndex*.google.firestore.admin.v1.GetIndexRequest .google.firestore.admin.v1.Index"M‚Óä“@>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}ÚAname£ + DeleteIndex-.google.firestore.admin.v1.DeleteIndexRequest.google.protobuf.Empty"M‚Óä“@*>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}ÚAname¦ +GetField*.google.firestore.admin.v1.GetFieldRequest .google.firestore.admin.v1.Field"L‚Óä“?=/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}ÚAnameÙ + UpdateField-.google.firestore.admin.v1.UpdateFieldRequest.google.longrunning.Operation"|‚Óä“L2C/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}:fieldÚAfieldÊA +FieldFieldOperationMetadata¹ + +ListFields,.google.firestore.admin.v1.ListFieldsRequest-.google.firestore.admin.v1.ListFieldsResponse"N‚Óä“?=/v1/{parent=projects/*/databases/*/collectionGroups/*}/fieldsÚAparentÝ +ExportDocuments1.google.firestore.admin.v1.ExportDocumentsRequest.google.longrunning.Operation"x‚Óä“6"1/v1/{name=projects/*/databases/*}:exportDocuments:*ÚAnameÊA2 +ExportDocumentsResponseExportDocumentsMetadataÛ +ImportDocuments1.google.firestore.admin.v1.ImportDocumentsRequest.google.longrunning.Operation"v‚Óä“6"1/v1/{name=projects/*/databases/*}:importDocuments:*ÚAnameÊA0 +google.protobuf.EmptyImportDocumentsMetadata“ + GetDatabase-.google.firestore.admin.v1.GetDatabaseRequest#.google.firestore.admin.v1.Database"0‚Óä“#!/v1/{name=projects/*/databases/*}ÚAname¦ + ListDatabases/.google.firestore.admin.v1.ListDatabasesRequest0.google.firestore.admin.v1.ListDatabasesResponse"2‚Óä“#!/v1/{parent=projects/*}/databasesÚAparentÛ +UpdateDatabase0.google.firestore.admin.v1.UpdateDatabaseRequest.google.longrunning.Operation"x‚Óä“62*/v1/{database.name=projects/*/databases/*}:databaseÚAdatabase,update_maskÊA" +DatabaseUpdateDatabaseMetadatavÊAfirestore.googleapis.comÒAXhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreBª +com.google.firestore.admin.v1BFirestoreAdminProtoPZ>google.golang.org/genproto/googleapis/firestore/admin/v1;admin¢GCFSªGoogle.Cloud.Firestore.Admin.V1ÊGoogle\\Cloud\\Firestore\\Admin\\V1ê#Google::Cloud::Firestore::Admin::V1êAL +!firestore.googleapis.com/Location\'projects/{project}/locations/{location}êAq +(firestore.googleapis.com/CollectionGroupEprojects/{project}/databases/{database}/collectionGroups/{collection}bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php new file mode 100644 index 0000000000000000000000000000000000000000..479885b112b72857c051d132d436700da382d844 GIT binary patch literal 1705 zcmb7E?QY{l6m8O`+TMm$ut0?GA-k|y0k#4{2$wFniIcUo#91e;RAkAT*pqaS>oH@y z&|T$a;2-b63-FH@-~sk2m>H)@)ZJ=#{l_!od(J)g-tqbVhx9CkJ7_=>!f{R_G`&Rm z89^y$ISW~grp0VVI11T$N@K!xgnBL-x)WsgoXIBwnz4e1#6)w(<}op5l#?uHoESJd zr-^aVF=!Hz-*v?Zkl=HYr8p#LFgp5)Kt3NkE0Qp$EI|_BCLw9xMy_+&o z@gcgBGm=dZ4e*^LCp^Ki-y>PbX)5X)iBQv=lYG@WdD6bWOe^W=47E#*rum%6LzMG^ zY-UG@lf2-`fzmAr7OR#2f@WDM^*yp|zqu}GjaT)2`G79fTT!$U+ZV%Zujpm6d+_fq z`1F;gsJ&Z;>8oMuYS{Wkr}gJ9)YPoBI_$_{H!G;p-qU`B{a*{hFM}*(DQQ;4;q9+J z*KZ`!6^Z^>V#X4p9l-94k~qqm+i1JJ{|aD5(U%zQ8>q=qkmim`{Mkzrk7e|Ge^&uE zSTq17AxLq4wk+%jYK%vOFH7pYlzGjkyAt?tOLL))Imeel$dVbIivneLzI`1kOX9l< z{&1^x2sOp6y$x@=UeES|3wWS}wrG1mA~u9v|D@X)x}( zBl{YS(9m@sJ+iwK#~lhyZ$V?d4+frlJZe;14%F0SWMSipHM!0r#dx+gDeKyUn%MMC z8&$0V^`UL|#(`&#EXQkXn@^ruzrjcAD_mYhoYG7eZfB@5X~)90ej#C=8Bdq1g&`el ziZde4u9gc!cx5c>rVhD^l@oeX=MmPy(p5vBlAU75Gpjxp}}x<+W1|G^+gkVELcS zS&Wmp&iLGzlSC-WnX%UW0`omkKjt6Rok6!h{;T@&KpCyxjad=tE4$T|-RdWuf36~Y zUxoM^mb~<2Vam^{cS;`9R8gk6VlqudWtu0Q>8{fE^}UtNd{KJdhDF|Jk1DcsvIQ&v F{s(E384v&f literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php new file mode 100644 index 000000000000..eedfdef7ed93 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + ' +Å +(google/firestore/admin/v1/location.protogoogle.firestore.admin.v1" +LocationMetadataBá +com.google.firestore.admin.v1B LocationProtoPZ>google.golang.org/genproto/googleapis/firestore/admin/v1;admin¢GCFSªGoogle.Cloud.Firestore.Admin.V1ÊGoogle\\Cloud\\Firestore\\Admin\\V1ê#Google::Cloud::Firestore::Admin::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php new file mode 100644 index 0000000000000000000000000000000000000000..59010ce41b55f2e0f4f2369d23500f20182254b5 GIT binary patch literal 3272 zcmeHJUvJ|?5GP6hPPq^a>g9Sux1=Xsiw;LEJRq0$NE0Vm*CtVuR-%ez9D9?laJ-hi zK3Y&e2rmfn$RqE30X_yVNWh0+cOARwHCI}w?uk5QlbPSn{APCM_vthL#D`VXz#a}P zh8@&DL+k`2KcI}-)J6ShFu(z_>BuK84pf9{E!1pvkzO;p?{n9XMuCkrG^BLs;_`q5 zIAk=yWy={6ul!=8Onre(sHaL)0M8oX(6?-i8tvVE%q+)ZR<9uedi4aLR}lccqm3;9 z+qJ?FwGtrs77+jVQQsvt3K>VY(PI*t#3PJYF8PLMvW*6o8)EK#)pihhwulG`hn8pK zwRIF@3fsp%<(Y4zB&4<=gA>s+Jca|$a(gu#+5z!-o^5WbX+z9X3dJvL>*H$$92uas zI7Uso667{wL4+r7M<~E73cM{Dw*WX#zx8fJ7?0Dzrj zdHHaMj9I8SPMUO`H^*8UrU?28{O~TU-?%H32eGM|HjpYCNPV%f@@R}A+lSYo%#t|c zjw=0q zWef5tK>v*4usC;P=hAocuv{nDb<(I_AAbXJ@0dRm-jQ^gHuVN%Xgb(sR>;}R@v7}! zL&NmoRoN3&iB%I&7X=c`-a&zG&heB2&EL2{$}toeb1%_ST#)Xc-JX>$b0;`i`8@-L zD@65S$v&~XAvW2WAHSRY=Kk&PdKp-)O4Kd~Rm#cZiQgHz23^9Gb^s>aAHx0W=aptd zH@jc7b@Q;YkHi!@D@!rt{KlYG3M^z*@*GDwD~XR+AW6SGUU02 zak1R>CUL}2%<(z>0N$n%^CMBj3g8?_$d2KKP!` zfON~nyY~@1Y_;`+O4n#L%}%${eR-G^;7y}xbdAcMacndje5&LD+6S$w-sy;QR-CJq zW>w$Y6X%>b*NtXkKO@ea!>X{aAMO=q#Z;P-L+o)qz-T%C%koJ$MVoI)jrC)8rcteTe#$;-NDZ!5 zT^c!Rs>D^P#MPsXUlWU7Pnz^5)cRPibG`mYb~VP)G-;)2DUzm1C`~)s=+DXcK6;X> a#;36qo>0zW=n#8~YL=Fgoogle.firestore.admin.v1.CreateIndexRequest + */ +class CreateIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The composite index to create. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $index = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @type \Google\Cloud\Firestore\Admin\V1\Index $index + * Required. The composite index to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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 composite index to create. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\Index|null + */ + public function getIndex() + { + return $this->index; + } + + public function hasIndex() + { + return isset($this->index); + } + + public function clearIndex() + { + unset($this->index); + } + + /** + * Required. The composite index to create. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\Index $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index::class); + $this->index = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php new file mode 100644 index 000000000000..32df996622b5 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php @@ -0,0 +1,317 @@ +google.firestore.admin.v1.Database + */ +class Database extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the Database. + * Format: `projects/{project}/databases/{database}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The location of the database. Available databases are listed at + * https://cloud.google.com/firestore/docs/locations. + * + * Generated from protobuf field string location_id = 9; + */ + protected $location_id = ''; + /** + * The type of the database. + * See https://cloud.google.com/datastore/docs/firestore-or-datastore for + * information about how to choose. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; + */ + protected $type = 0; + /** + * The concurrency control mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + */ + protected $concurrency_mode = 0; + /** + * The App Engine integration mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + */ + protected $app_engine_integration_mode = 0; + /** + * Output only. The key_prefix for this database. This key_prefix is used, in combination + * with the project id ("~") to construct the + * application id that is returned from the Cloud Datastore APIs in Google App + * Engine first generation runtimes. + * This value may be empty in which case the appid to use for URL-encoded keys + * is the project_id (eg: foo instead of v~foo). + * + * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $key_prefix = ''; + /** + * This checksum 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 = 99; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the Database. + * Format: `projects/{project}/databases/{database}` + * @type string $location_id + * The location of the database. Available databases are listed at + * https://cloud.google.com/firestore/docs/locations. + * @type int $type + * The type of the database. + * See https://cloud.google.com/datastore/docs/firestore-or-datastore for + * information about how to choose. + * @type int $concurrency_mode + * The concurrency control mode to use for this database. + * @type int $app_engine_integration_mode + * The App Engine integration mode to use for this database. + * @type string $key_prefix + * Output only. The key_prefix for this database. This key_prefix is used, in combination + * with the project id ("~") to construct the + * application id that is returned from the Cloud Datastore APIs in Google App + * Engine first generation runtimes. + * This value may be empty in which case the appid to use for URL-encoded keys + * is the project_id (eg: foo instead of v~foo). + * @type string $etag + * This checksum 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\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the Database. + * Format: `projects/{project}/databases/{database}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the Database. + * Format: `projects/{project}/databases/{database}` + * + * 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 location of the database. Available databases are listed at + * https://cloud.google.com/firestore/docs/locations. + * + * Generated from protobuf field string location_id = 9; + * @return string + */ + public function getLocationId() + { + return $this->location_id; + } + + /** + * The location of the database. Available databases are listed at + * https://cloud.google.com/firestore/docs/locations. + * + * Generated from protobuf field string location_id = 9; + * @param string $var + * @return $this + */ + public function setLocationId($var) + { + GPBUtil::checkString($var, True); + $this->location_id = $var; + + return $this; + } + + /** + * The type of the database. + * See https://cloud.google.com/datastore/docs/firestore-or-datastore for + * information about how to choose. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the database. + * See https://cloud.google.com/datastore/docs/firestore-or-datastore for + * information about how to choose. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DatabaseType::class); + $this->type = $var; + + return $this; + } + + /** + * The concurrency control mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * @return int + */ + public function getConcurrencyMode() + { + return $this->concurrency_mode; + } + + /** + * The concurrency control mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * @param int $var + * @return $this + */ + public function setConcurrencyMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\ConcurrencyMode::class); + $this->concurrency_mode = $var; + + return $this; + } + + /** + * The App Engine integration mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * @return int + */ + public function getAppEngineIntegrationMode() + { + return $this->app_engine_integration_mode; + } + + /** + * The App Engine integration mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * @param int $var + * @return $this + */ + public function setAppEngineIntegrationMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\AppEngineIntegrationMode::class); + $this->app_engine_integration_mode = $var; + + return $this; + } + + /** + * Output only. The key_prefix for this database. This key_prefix is used, in combination + * with the project id ("~") to construct the + * application id that is returned from the Cloud Datastore APIs in Google App + * Engine first generation runtimes. + * This value may be empty in which case the appid to use for URL-encoded keys + * is the project_id (eg: foo instead of v~foo). + * + * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getKeyPrefix() + { + return $this->key_prefix; + } + + /** + * Output only. The key_prefix for this database. This key_prefix is used, in combination + * with the project id ("~") to construct the + * application id that is returned from the Cloud Datastore APIs in Google App + * Engine first generation runtimes. + * This value may be empty in which case the appid to use for URL-encoded keys + * is the project_id (eg: foo instead of v~foo). + * + * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setKeyPrefix($var) + { + GPBUtil::checkString($var, True); + $this->key_prefix = $var; + + return $this; + } + + /** + * This checksum 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 = 99; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This checksum 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 = 99; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php new file mode 100644 index 000000000000..1cc5467f9140 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php @@ -0,0 +1,68 @@ +google.firestore.admin.v1.Database.AppEngineIntegrationMode + */ +class AppEngineIntegrationMode +{ + /** + * Not used. + * + * Generated from protobuf enum APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0; + */ + const APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0; + /** + * If an App Engine application exists in the same region as this database, + * App Engine configuration will impact this database. This includes + * disabling of the application & database, as well as disabling writes to + * the database. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * Appengine has no affect on the ability of this database to serve + * requests. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + + private static $valueToName = [ + self::APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED => 'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED', + self::ENABLED => 'ENABLED', + 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(AppEngineIntegrationMode::class, \Google\Cloud\Firestore\Admin\V1\Database_AppEngineIntegrationMode::class); + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php new file mode 100644 index 000000000000..2e88fde688f8 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php @@ -0,0 +1,77 @@ +google.firestore.admin.v1.Database.ConcurrencyMode + */ +class ConcurrencyMode +{ + /** + * Not used. + * + * Generated from protobuf enum CONCURRENCY_MODE_UNSPECIFIED = 0; + */ + const CONCURRENCY_MODE_UNSPECIFIED = 0; + /** + * Use optimistic concurrency control by default. This mode is available + * for Cloud Firestore databases. + * + * Generated from protobuf enum OPTIMISTIC = 1; + */ + const OPTIMISTIC = 1; + /** + * Use pessimistic concurrency control by default. This mode is available + * for Cloud Firestore databases. + * This is the default setting for Cloud Firestore. + * + * Generated from protobuf enum PESSIMISTIC = 2; + */ + const PESSIMISTIC = 2; + /** + * Use optimistic concurrency control with entity groups by default. + * This is the only available mode for Cloud Datastore. + * This mode is also available for Cloud Firestore with Datastore Mode but + * is not recommended. + * + * Generated from protobuf enum OPTIMISTIC_WITH_ENTITY_GROUPS = 3; + */ + const OPTIMISTIC_WITH_ENTITY_GROUPS = 3; + + private static $valueToName = [ + self::CONCURRENCY_MODE_UNSPECIFIED => 'CONCURRENCY_MODE_UNSPECIFIED', + self::OPTIMISTIC => 'OPTIMISTIC', + self::PESSIMISTIC => 'PESSIMISTIC', + self::OPTIMISTIC_WITH_ENTITY_GROUPS => 'OPTIMISTIC_WITH_ENTITY_GROUPS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConcurrencyMode::class, \Google\Cloud\Firestore\Admin\V1\Database_ConcurrencyMode::class); + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php new file mode 100644 index 000000000000..18bfd4d8e662 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php @@ -0,0 +1,67 @@ +google.firestore.admin.v1.Database.DatabaseType + */ +class DatabaseType +{ + /** + * The default value. This value is used if the database type is omitted. + * + * Generated from protobuf enum DATABASE_TYPE_UNSPECIFIED = 0; + */ + const DATABASE_TYPE_UNSPECIFIED = 0; + /** + * Firestore Native Mode + * + * Generated from protobuf enum FIRESTORE_NATIVE = 1; + */ + const FIRESTORE_NATIVE = 1; + /** + * Firestore in Datastore Mode. + * + * Generated from protobuf enum DATASTORE_MODE = 2; + */ + const DATASTORE_MODE = 2; + + private static $valueToName = [ + self::DATABASE_TYPE_UNSPECIFIED => 'DATABASE_TYPE_UNSPECIFIED', + self::FIRESTORE_NATIVE => 'FIRESTORE_NATIVE', + self::DATASTORE_MODE => 'DATASTORE_MODE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DatabaseType::class, \Google\Cloud\Firestore\Admin\V1\Database_DatabaseType::class); + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database_AppEngineIntegrationMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database_AppEngineIntegrationMode.php new file mode 100644 index 000000000000..8edb982a880d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database_AppEngineIntegrationMode.php @@ -0,0 +1,16 @@ +google.firestore.admin.v1.DeleteIndexRequest + */ +class DeleteIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php new file mode 100644 index 000000000000..376e43e23b7d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php @@ -0,0 +1,316 @@ +google.firestore.admin.v1.ExportDocumentsMetadata + */ +class ExportDocumentsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The state of the export operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + */ + protected $operation_state = 0; + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + */ + protected $progress_documents = null; + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + protected $progress_bytes = null; + /** + * Which collection ids are being exported. + * + * Generated from protobuf field repeated string collection_ids = 6; + */ + private $collection_ids; + /** + * Where the entities are being exported to. + * + * Generated from protobuf field string output_uri_prefix = 7; + */ + protected $output_uri_prefix = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation completed. Will be unset if operation still in + * progress. + * @type int $operation_state + * The state of the export operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents + * The progress, in documents, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes + * The progress, in bytes, of this operation. + * @type array|\Google\Protobuf\Internal\RepeatedField $collection_ids + * Which collection ids are being exported. + * @type string $output_uri_prefix + * Where the entities are being exported to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time this operation started. + * + * 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 time this operation started. + * + * 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 time this operation completed. Will be unset if operation still in + * progress. + * + * 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 this operation completed. Will be unset if operation still in + * progress. + * + * 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 state of the export operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @return int + */ + public function getOperationState() + { + return $this->operation_state; + } + + /** + * The state of the export operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @param int $var + * @return $this + */ + public function setOperationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->operation_state = $var; + + return $this; + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressDocuments() + { + return $this->progress_documents; + } + + public function hasProgressDocuments() + { + return isset($this->progress_documents); + } + + public function clearProgressDocuments() + { + unset($this->progress_documents); + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_documents = $var; + + return $this; + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressBytes() + { + return $this->progress_bytes; + } + + public function hasProgressBytes() + { + return isset($this->progress_bytes); + } + + public function clearProgressBytes() + { + unset($this->progress_bytes); + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_bytes = $var; + + return $this; + } + + /** + * Which collection ids are being exported. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * Which collection ids are being exported. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * Where the entities are being exported to. + * + * Generated from protobuf field string output_uri_prefix = 7; + * @return string + */ + public function getOutputUriPrefix() + { + return $this->output_uri_prefix; + } + + /** + * Where the entities are being exported to. + * + * Generated from protobuf field string output_uri_prefix = 7; + * @param string $var + * @return $this + */ + public function setOutputUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->output_uri_prefix = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php new file mode 100644 index 000000000000..835ece05be07 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php @@ -0,0 +1,167 @@ +google.firestore.admin.v1.ExportDocumentsRequest + */ +class ExportDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Which collection ids to export. Unspecified means all collections. + * + * Generated from protobuf field repeated string collection_ids = 2; + */ + private $collection_ids; + /** + * The output URI. Currently only supports Google Cloud Storage URIs of the + * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + * Google Cloud Storage namespace path. When + * choosing a name, be sure to consider Google Cloud Storage naming + * guidelines: https://cloud.google.com/storage/docs/naming. + * If the URI is a bucket (without a namespace path), a prefix will be + * generated based on the start time. + * + * Generated from protobuf field string output_uri_prefix = 3; + */ + protected $output_uri_prefix = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * @type array|\Google\Protobuf\Internal\RepeatedField $collection_ids + * Which collection ids to export. Unspecified means all collections. + * @type string $output_uri_prefix + * The output URI. Currently only supports Google Cloud Storage URIs of the + * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + * Google Cloud Storage namespace path. When + * choosing a name, be sure to consider Google Cloud Storage naming + * guidelines: https://cloud.google.com/storage/docs/naming. + * If the URI is a bucket (without a namespace path), a prefix will be + * generated based on the start time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_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. Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_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; + } + + /** + * Which collection ids to export. Unspecified means all collections. + * + * Generated from protobuf field repeated string collection_ids = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * Which collection ids to export. Unspecified means all collections. + * + * Generated from protobuf field repeated string collection_ids = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * The output URI. Currently only supports Google Cloud Storage URIs of the + * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + * Google Cloud Storage namespace path. When + * choosing a name, be sure to consider Google Cloud Storage naming + * guidelines: https://cloud.google.com/storage/docs/naming. + * If the URI is a bucket (without a namespace path), a prefix will be + * generated based on the start time. + * + * Generated from protobuf field string output_uri_prefix = 3; + * @return string + */ + public function getOutputUriPrefix() + { + return $this->output_uri_prefix; + } + + /** + * The output URI. Currently only supports Google Cloud Storage URIs of the + * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + * Google Cloud Storage namespace path. When + * choosing a name, be sure to consider Google Cloud Storage naming + * guidelines: https://cloud.google.com/storage/docs/naming. + * If the URI is a bucket (without a namespace path), a prefix will be + * generated based on the start time. + * + * Generated from protobuf field string output_uri_prefix = 3; + * @param string $var + * @return $this + */ + public function setOutputUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->output_uri_prefix = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php new file mode 100644 index 000000000000..2ae556c997c6 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php @@ -0,0 +1,75 @@ +google.firestore.admin.v1.ExportDocumentsResponse + */ +class ExportDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Location of the output files. This can be used to begin an import + * into Cloud Firestore (this project or another project) after the operation + * completes successfully. + * + * Generated from protobuf field string output_uri_prefix = 1; + */ + protected $output_uri_prefix = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $output_uri_prefix + * Location of the output files. This can be used to begin an import + * into Cloud Firestore (this project or another project) after the operation + * completes successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * Location of the output files. This can be used to begin an import + * into Cloud Firestore (this project or another project) after the operation + * completes successfully. + * + * Generated from protobuf field string output_uri_prefix = 1; + * @return string + */ + public function getOutputUriPrefix() + { + return $this->output_uri_prefix; + } + + /** + * Location of the output files. This can be used to begin an import + * into Cloud Firestore (this project or another project) after the operation + * completes successfully. + * + * Generated from protobuf field string output_uri_prefix = 1; + * @param string $var + * @return $this + */ + public function setOutputUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->output_uri_prefix = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php new file mode 100644 index 000000000000..3443f452678d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php @@ -0,0 +1,261 @@ +google.firestore.admin.v1.Field + */ +class Field extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A field name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * A field path may be a simple field name, e.g. `address` or a path to fields + * within map_value , e.g. `address.city`, + * or a special field path. The only valid special field is `*`, which + * represents any field. + * Field paths may be quoted using ` (backtick). The only character that needs + * to be escaped within a quoted field path is the backtick character itself, + * escaped using a backslash. Special characters in field paths that + * must be quoted include: `*`, `.`, + * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. + * Examples: + * (Note: Comments here are written in markdown syntax, so there is an + * additional layer of backticks to represent a code block) + * `\`address.city\`` represents a field named `address.city`, not the map key + * `city` in the field `address`. + * `\`*\`` represents a field named `*`, not any field. + * A special `Field` contains the default indexing settings for all fields. + * This field's resource name is: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + * Indexes defined on this `Field` will be applied to all fields which do not + * have their own `Field` index configuration. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * The index configuration for this field. If unset, field indexing will + * revert to the configuration defined by the `ancestor_field`. To + * explicitly remove all indexes for this field, specify an index config + * with an empty list of indexes. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + protected $index_config = null; + /** + * The TTL configuration for this `Field`. + * Setting or unsetting this will enable or disable the TTL for + * documents that have this `Field`. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; + */ + protected $ttl_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A field name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * A field path may be a simple field name, e.g. `address` or a path to fields + * within map_value , e.g. `address.city`, + * or a special field path. The only valid special field is `*`, which + * represents any field. + * Field paths may be quoted using ` (backtick). The only character that needs + * to be escaped within a quoted field path is the backtick character itself, + * escaped using a backslash. Special characters in field paths that + * must be quoted include: `*`, `.`, + * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. + * Examples: + * (Note: Comments here are written in markdown syntax, so there is an + * additional layer of backticks to represent a code block) + * `\`address.city\`` represents a field named `address.city`, not the map key + * `city` in the field `address`. + * `\`*\`` represents a field named `*`, not any field. + * A special `Field` contains the default indexing settings for all fields. + * This field's resource name is: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + * Indexes defined on this `Field` will be applied to all fields which do not + * have their own `Field` index configuration. + * @type \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig $index_config + * The index configuration for this field. If unset, field indexing will + * revert to the configuration defined by the `ancestor_field`. To + * explicitly remove all indexes for this field, specify an index config + * with an empty list of indexes. + * @type \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig $ttl_config + * The TTL configuration for this `Field`. + * Setting or unsetting this will enable or disable the TTL for + * documents that have this `Field`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); + parent::__construct($data); + } + + /** + * Required. A field name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * A field path may be a simple field name, e.g. `address` or a path to fields + * within map_value , e.g. `address.city`, + * or a special field path. The only valid special field is `*`, which + * represents any field. + * Field paths may be quoted using ` (backtick). The only character that needs + * to be escaped within a quoted field path is the backtick character itself, + * escaped using a backslash. Special characters in field paths that + * must be quoted include: `*`, `.`, + * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. + * Examples: + * (Note: Comments here are written in markdown syntax, so there is an + * additional layer of backticks to represent a code block) + * `\`address.city\`` represents a field named `address.city`, not the map key + * `city` in the field `address`. + * `\`*\`` represents a field named `*`, not any field. + * A special `Field` contains the default indexing settings for all fields. + * This field's resource name is: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + * Indexes defined on this `Field` will be applied to all fields which do not + * have their own `Field` index configuration. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A field name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * A field path may be a simple field name, e.g. `address` or a path to fields + * within map_value , e.g. `address.city`, + * or a special field path. The only valid special field is `*`, which + * represents any field. + * Field paths may be quoted using ` (backtick). The only character that needs + * to be escaped within a quoted field path is the backtick character itself, + * escaped using a backslash. Special characters in field paths that + * must be quoted include: `*`, `.`, + * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. + * Examples: + * (Note: Comments here are written in markdown syntax, so there is an + * additional layer of backticks to represent a code block) + * `\`address.city\`` represents a field named `address.city`, not the map key + * `city` in the field `address`. + * `\`*\`` represents a field named `*`, not any field. + * A special `Field` contains the default indexing settings for all fields. + * This field's resource name is: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + * Indexes defined on this `Field` will be applied to all fields which do not + * have their own `Field` index configuration. + * + * 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 index configuration for this field. If unset, field indexing will + * revert to the configuration defined by the `ancestor_field`. To + * explicitly remove all indexes for this field, specify an index config + * with an empty list of indexes. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + * @return \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig|null + */ + public function getIndexConfig() + { + return $this->index_config; + } + + public function hasIndexConfig() + { + return isset($this->index_config); + } + + public function clearIndexConfig() + { + unset($this->index_config); + } + + /** + * The index configuration for this field. If unset, field indexing will + * revert to the configuration defined by the `ancestor_field`. To + * explicitly remove all indexes for this field, specify an index config + * with an empty list of indexes. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + * @param \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig $var + * @return $this + */ + public function setIndexConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig::class); + $this->index_config = $var; + + return $this; + } + + /** + * The TTL configuration for this `Field`. + * Setting or unsetting this will enable or disable the TTL for + * documents that have this `Field`. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; + * @return \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig|null + */ + public function getTtlConfig() + { + return $this->ttl_config; + } + + public function hasTtlConfig() + { + return isset($this->ttl_config); + } + + public function clearTtlConfig() + { + unset($this->ttl_config); + } + + /** + * The TTL configuration for this `Field`. + * Setting or unsetting this will enable or disable the TTL for + * documents that have this `Field`. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; + * @param \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig $var + * @return $this + */ + public function setTtlConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig::class); + $this->ttl_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php new file mode 100644 index 000000000000..08601827331f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php @@ -0,0 +1,208 @@ +google.firestore.admin.v1.Field.IndexConfig + */ +class IndexConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The indexes supported for this field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + */ + private $indexes; + /** + * Output only. When true, the `Field`'s index configuration is set from the + * configuration specified by the `ancestor_field`. + * When false, the `Field`'s index configuration is defined explicitly. + * + * Generated from protobuf field bool uses_ancestor_config = 2; + */ + protected $uses_ancestor_config = false; + /** + * Output only. Specifies the resource name of the `Field` from which this field's + * index configuration is set (when `uses_ancestor_config` is true), + * or from which it *would* be set if this field had no index configuration + * (when `uses_ancestor_config` is false). + * + * Generated from protobuf field string ancestor_field = 3; + */ + protected $ancestor_field = ''; + /** + * Output only + * When true, the `Field`'s index configuration is in the process of being + * reverted. Once complete, the index config will transition to the same + * state as the field specified by `ancestor_field`, at which point + * `uses_ancestor_config` will be `true` and `reverting` will be `false`. + * + * Generated from protobuf field bool reverting = 4; + */ + protected $reverting = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Firestore\Admin\V1\Index>|\Google\Protobuf\Internal\RepeatedField $indexes + * The indexes supported for this field. + * @type bool $uses_ancestor_config + * Output only. When true, the `Field`'s index configuration is set from the + * configuration specified by the `ancestor_field`. + * When false, the `Field`'s index configuration is defined explicitly. + * @type string $ancestor_field + * Output only. Specifies the resource name of the `Field` from which this field's + * index configuration is set (when `uses_ancestor_config` is true), + * or from which it *would* be set if this field had no index configuration + * (when `uses_ancestor_config` is false). + * @type bool $reverting + * Output only + * When true, the `Field`'s index configuration is in the process of being + * reverted. Once complete, the index config will transition to the same + * state as the field specified by `ancestor_field`, at which point + * `uses_ancestor_config` will be `true` and `reverting` will be `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); + parent::__construct($data); + } + + /** + * The indexes supported for this field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIndexes() + { + return $this->indexes; + } + + /** + * The indexes supported for this field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + * @param array<\Google\Cloud\Firestore\Admin\V1\Index>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIndexes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index::class); + $this->indexes = $arr; + + return $this; + } + + /** + * Output only. When true, the `Field`'s index configuration is set from the + * configuration specified by the `ancestor_field`. + * When false, the `Field`'s index configuration is defined explicitly. + * + * Generated from protobuf field bool uses_ancestor_config = 2; + * @return bool + */ + public function getUsesAncestorConfig() + { + return $this->uses_ancestor_config; + } + + /** + * Output only. When true, the `Field`'s index configuration is set from the + * configuration specified by the `ancestor_field`. + * When false, the `Field`'s index configuration is defined explicitly. + * + * Generated from protobuf field bool uses_ancestor_config = 2; + * @param bool $var + * @return $this + */ + public function setUsesAncestorConfig($var) + { + GPBUtil::checkBool($var); + $this->uses_ancestor_config = $var; + + return $this; + } + + /** + * Output only. Specifies the resource name of the `Field` from which this field's + * index configuration is set (when `uses_ancestor_config` is true), + * or from which it *would* be set if this field had no index configuration + * (when `uses_ancestor_config` is false). + * + * Generated from protobuf field string ancestor_field = 3; + * @return string + */ + public function getAncestorField() + { + return $this->ancestor_field; + } + + /** + * Output only. Specifies the resource name of the `Field` from which this field's + * index configuration is set (when `uses_ancestor_config` is true), + * or from which it *would* be set if this field had no index configuration + * (when `uses_ancestor_config` is false). + * + * Generated from protobuf field string ancestor_field = 3; + * @param string $var + * @return $this + */ + public function setAncestorField($var) + { + GPBUtil::checkString($var, True); + $this->ancestor_field = $var; + + return $this; + } + + /** + * Output only + * When true, the `Field`'s index configuration is in the process of being + * reverted. Once complete, the index config will transition to the same + * state as the field specified by `ancestor_field`, at which point + * `uses_ancestor_config` will be `true` and `reverting` will be `false`. + * + * Generated from protobuf field bool reverting = 4; + * @return bool + */ + public function getReverting() + { + return $this->reverting; + } + + /** + * Output only + * When true, the `Field`'s index configuration is in the process of being + * reverted. Once complete, the index config will transition to the same + * state as the field specified by `ancestor_field`, at which point + * `uses_ancestor_config` will be `true` and `reverting` will be `false`. + * + * Generated from protobuf field bool reverting = 4; + * @param bool $var + * @return $this + */ + public function setReverting($var) + { + GPBUtil::checkBool($var); + $this->reverting = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IndexConfig::class, \Google\Cloud\Firestore\Admin\V1\Field_IndexConfig::class); + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php new file mode 100644 index 000000000000..ba50384a783f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php @@ -0,0 +1,74 @@ +google.firestore.admin.v1.Field.TtlConfig + */ +class TtlConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The state of the TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. The state of the TTL configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The state of the TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig\State::class); + $this->state = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TtlConfig::class, \Google\Cloud\Firestore\Admin\V1\Field_TtlConfig::class); + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php new file mode 100644 index 000000000000..7722ca6e7e0a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php @@ -0,0 +1,78 @@ +google.firestore.admin.v1.Field.TtlConfig.State + */ +class State +{ + /** + * The state is unspecified or unknown. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The TTL is being applied. There is an active long-running operation to + * track the change. Newly written documents will have TTLs applied as + * requested. Requested TTLs on existing documents are still being + * processed. When TTLs on all existing documents have been processed, the + * state will move to 'ACTIVE'. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The TTL is active for all documents. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The TTL configuration could not be enabled for all existing documents. + * Newly written documents will continue to have their TTL applied. + * The LRO returned when last attempting to enable TTL for this `Field` + * has failed, and may have more details. + * + * Generated from protobuf enum NEEDS_REPAIR = 3; + */ + const NEEDS_REPAIR = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::NEEDS_REPAIR => 'NEEDS_REPAIR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Firestore\Admin\V1\Field_TtlConfig_State::class); + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php new file mode 100644 index 000000000000..4f8e269b5075 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php @@ -0,0 +1,368 @@ +google.firestore.admin.v1.FieldOperationMetadata + */ +class FieldOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The field resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * + * Generated from protobuf field string field = 3; + */ + protected $field = ''; + /** + * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this + * operation. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + */ + private $index_config_deltas; + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; + */ + protected $state = 0; + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; + */ + protected $progress_documents = null; + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + protected $progress_bytes = null; + /** + * Describes the deltas of TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; + */ + protected $ttl_config_delta = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation completed. Will be unset if operation still in + * progress. + * @type string $field + * The field resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * @type array<\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta>|\Google\Protobuf\Internal\RepeatedField $index_config_deltas + * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this + * operation. + * @type int $state + * The state of the operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents + * The progress, in documents, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes + * The progress, in bytes, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta $ttl_config_delta + * Describes the deltas of TTL configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time this operation started. + * + * 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 time this operation started. + * + * 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 time this operation completed. Will be unset if operation still in + * progress. + * + * 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 this operation completed. Will be unset if operation still in + * progress. + * + * 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 field resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * + * Generated from protobuf field string field = 3; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * The field resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * + * Generated from protobuf field string field = 3; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this + * operation. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIndexConfigDeltas() + { + return $this->index_config_deltas; + } + + /** + * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this + * operation. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * @param array<\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIndexConfigDeltas($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta::class); + $this->index_config_deltas = $arr; + + return $this; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressDocuments() + { + return $this->progress_documents; + } + + public function hasProgressDocuments() + { + return isset($this->progress_documents); + } + + public function clearProgressDocuments() + { + unset($this->progress_documents); + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_documents = $var; + + return $this; + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressBytes() + { + return $this->progress_bytes; + } + + public function hasProgressBytes() + { + return isset($this->progress_bytes); + } + + public function clearProgressBytes() + { + unset($this->progress_bytes); + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_bytes = $var; + + return $this; + } + + /** + * Describes the deltas of TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; + * @return \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta|null + */ + public function getTtlConfigDelta() + { + return $this->ttl_config_delta; + } + + public function hasTtlConfigDelta() + { + return isset($this->ttl_config_delta); + } + + public function clearTtlConfigDelta() + { + unset($this->ttl_config_delta); + } + + /** + * Describes the deltas of TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; + * @param \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta $var + * @return $this + */ + public function setTtlConfigDelta($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta::class); + $this->ttl_config_delta = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php new file mode 100644 index 000000000000..1ad9e51b4401 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php @@ -0,0 +1,114 @@ +google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + */ +class IndexConfigDelta extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies how the index is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + */ + protected $change_type = 0; + /** + * The index being changed. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; + */ + protected $index = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $change_type + * Specifies how the index is changing. + * @type \Google\Cloud\Firestore\Admin\V1\Index $index + * The index being changed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * Specifies how the index is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + * @return int + */ + public function getChangeType() + { + return $this->change_type; + } + + /** + * Specifies how the index is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + * @param int $var + * @return $this + */ + public function setChangeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta\ChangeType::class); + $this->change_type = $var; + + return $this; + } + + /** + * The index being changed. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; + * @return \Google\Cloud\Firestore\Admin\V1\Index|null + */ + public function getIndex() + { + return $this->index; + } + + public function hasIndex() + { + return isset($this->index); + } + + public function clearIndex() + { + unset($this->index); + } + + /** + * The index being changed. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; + * @param \Google\Cloud\Firestore\Admin\V1\Index $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index::class); + $this->index = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IndexConfigDelta::class, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata_IndexConfigDelta::class); + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php new file mode 100644 index 000000000000..df7d29035371 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php @@ -0,0 +1,64 @@ +google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType + */ +class ChangeType +{ + /** + * The type of change is not specified or known. + * + * Generated from protobuf enum CHANGE_TYPE_UNSPECIFIED = 0; + */ + const CHANGE_TYPE_UNSPECIFIED = 0; + /** + * The single field index is being added. + * + * Generated from protobuf enum ADD = 1; + */ + const ADD = 1; + /** + * The single field index is being removed. + * + * Generated from protobuf enum REMOVE = 2; + */ + const REMOVE = 2; + + private static $valueToName = [ + self::CHANGE_TYPE_UNSPECIFIED => 'CHANGE_TYPE_UNSPECIFIED', + self::ADD => 'ADD', + self::REMOVE => 'REMOVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ChangeType::class, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata_IndexConfigDelta_ChangeType::class); + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php new file mode 100644 index 000000000000..985b41237e37 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php @@ -0,0 +1,70 @@ +google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta + */ +class TtlConfigDelta extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies how the TTL configuration is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; + */ + protected $change_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $change_type + * Specifies how the TTL configuration is changing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * Specifies how the TTL configuration is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; + * @return int + */ + public function getChangeType() + { + return $this->change_type; + } + + /** + * Specifies how the TTL configuration is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; + * @param int $var + * @return $this + */ + public function setChangeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta\ChangeType::class); + $this->change_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TtlConfigDelta::class, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata_TtlConfigDelta::class); + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php new file mode 100644 index 000000000000..600dbab57322 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php @@ -0,0 +1,64 @@ +google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType + */ +class ChangeType +{ + /** + * The type of change is not specified or known. + * + * Generated from protobuf enum CHANGE_TYPE_UNSPECIFIED = 0; + */ + const CHANGE_TYPE_UNSPECIFIED = 0; + /** + * The TTL config is being added. + * + * Generated from protobuf enum ADD = 1; + */ + const ADD = 1; + /** + * The TTL config is being removed. + * + * Generated from protobuf enum REMOVE = 2; + */ + const REMOVE = 2; + + private static $valueToName = [ + self::CHANGE_TYPE_UNSPECIFIED => 'CHANGE_TYPE_UNSPECIFIED', + self::ADD => 'ADD', + self::REMOVE => 'REMOVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ChangeType::class, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata_TtlConfigDelta_ChangeType::class); + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata_IndexConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata_IndexConfigDelta.php new file mode 100644 index 000000000000..9aba40a35e57 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata_IndexConfigDelta.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/CreateIndex', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists composite indexes. + * @param \Google\Cloud\Firestore\Admin\V1\ListIndexesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListIndexes(\Google\Cloud\Firestore\Admin\V1\ListIndexesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/ListIndexes', + $argument, + ['\Google\Cloud\Firestore\Admin\V1\ListIndexesResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets a composite index. + * @param \Google\Cloud\Firestore\Admin\V1\GetIndexRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetIndex(\Google\Cloud\Firestore\Admin\V1\GetIndexRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/GetIndex', + $argument, + ['\Google\Cloud\Firestore\Admin\V1\Index', 'decode'], + $metadata, $options); + } + + /** + * Deletes a composite index. + * @param \Google\Cloud\Firestore\Admin\V1\DeleteIndexRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteIndex(\Google\Cloud\Firestore\Admin\V1\DeleteIndexRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/DeleteIndex', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Gets the metadata and configuration for a Field. + * @param \Google\Cloud\Firestore\Admin\V1\GetFieldRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetField(\Google\Cloud\Firestore\Admin\V1\GetFieldRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/GetField', + $argument, + ['\Google\Cloud\Firestore\Admin\V1\Field', 'decode'], + $metadata, $options); + } + + /** + * Updates a field configuration. Currently, field updates apply only to + * single field index configuration. However, calls to + * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should provide a field mask to avoid + * changing any configuration that the caller isn't aware of. The field mask + * should be specified as: `{ paths: "index_config" }`. + * + * This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to + * track the status of the field update. The metadata for + * the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + * + * To configure the default field settings for the database, use + * the special `Field` with resource name: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * @param \Google\Cloud\Firestore\Admin\V1\UpdateFieldRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateField(\Google\Cloud\Firestore\Admin\V1\UpdateFieldRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/UpdateField', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists the field configuration and metadata for this database. + * + * Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields + * that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to + * `indexConfig.usesAncestorConfig:false` . + * @param \Google\Cloud\Firestore\Admin\V1\ListFieldsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListFields(\Google\Cloud\Firestore\Admin\V1\ListFieldsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/ListFields', + $argument, + ['\Google\Cloud\Firestore\Admin\V1\ListFieldsResponse', 'decode'], + $metadata, $options); + } + + /** + * Exports a copy of all or a subset of documents from Google Cloud Firestore + * to another storage system, such as Google Cloud Storage. Recent updates to + * documents may not be reflected in the export. The export occurs in the + * background and its progress can be monitored and managed via the + * Operation resource that is created. The output of an export may only be + * used once the associated operation is done. If an export operation is + * cancelled before completion it may leave partial data behind in Google + * Cloud Storage. + * + * For more details on export behavior and output format, refer to: + * https://cloud.google.com/firestore/docs/manage-data/export-import + * @param \Google\Cloud\Firestore\Admin\V1\ExportDocumentsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ExportDocuments(\Google\Cloud\Firestore\Admin\V1\ExportDocumentsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/ExportDocuments', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Imports documents into Google Cloud Firestore. Existing documents with the + * same name are overwritten. The import occurs in the background and its + * progress can be monitored and managed via the Operation resource that is + * created. If an ImportDocuments operation is cancelled, it is possible + * that a subset of the data has already been imported to Cloud Firestore. + * @param \Google\Cloud\Firestore\Admin\V1\ImportDocumentsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ImportDocuments(\Google\Cloud\Firestore\Admin\V1\ImportDocumentsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/ImportDocuments', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Gets information about a database. + * @param \Google\Cloud\Firestore\Admin\V1\GetDatabaseRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetDatabase(\Google\Cloud\Firestore\Admin\V1\GetDatabaseRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/GetDatabase', + $argument, + ['\Google\Cloud\Firestore\Admin\V1\Database', 'decode'], + $metadata, $options); + } + + /** + * List all the databases in the project. + * @param \Google\Cloud\Firestore\Admin\V1\ListDatabasesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListDatabases(\Google\Cloud\Firestore\Admin\V1\ListDatabasesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/ListDatabases', + $argument, + ['\Google\Cloud\Firestore\Admin\V1\ListDatabasesResponse', 'decode'], + $metadata, $options); + } + + /** + * Updates a database. + * @param \Google\Cloud\Firestore\Admin\V1\UpdateDatabaseRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateDatabase(\Google\Cloud\Firestore\Admin\V1\UpdateDatabaseRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/UpdateDatabase', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php new file mode 100644 index 000000000000..19ba9997a9d8 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php @@ -0,0 +1,71 @@ +google.firestore.admin.v1.GetDatabaseRequest + */ +class GetDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_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. A name of the form + * `projects/{project_id}/databases/{database_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_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. A name of the form + * `projects/{project_id}/databases/{database_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php new file mode 100644 index 000000000000..b9db90b82e7d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php @@ -0,0 +1,71 @@ +google.firestore.admin.v1.GetFieldRequest + */ +class GetFieldRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_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. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_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. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php new file mode 100644 index 000000000000..8e178234feb5 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php @@ -0,0 +1,71 @@ +google.firestore.admin.v1.GetIndexRequest + */ +class GetIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php new file mode 100644 index 000000000000..cc81aaaf1dd7 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php @@ -0,0 +1,316 @@ +google.firestore.admin.v1.ImportDocumentsMetadata + */ +class ImportDocumentsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The state of the import operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + */ + protected $operation_state = 0; + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + */ + protected $progress_documents = null; + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + protected $progress_bytes = null; + /** + * Which collection ids are being imported. + * + * Generated from protobuf field repeated string collection_ids = 6; + */ + private $collection_ids; + /** + * The location of the documents being imported. + * + * Generated from protobuf field string input_uri_prefix = 7; + */ + protected $input_uri_prefix = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation completed. Will be unset if operation still in + * progress. + * @type int $operation_state + * The state of the import operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents + * The progress, in documents, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes + * The progress, in bytes, of this operation. + * @type array|\Google\Protobuf\Internal\RepeatedField $collection_ids + * Which collection ids are being imported. + * @type string $input_uri_prefix + * The location of the documents being imported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time this operation started. + * + * 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 time this operation started. + * + * 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 time this operation completed. Will be unset if operation still in + * progress. + * + * 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 this operation completed. Will be unset if operation still in + * progress. + * + * 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 state of the import operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @return int + */ + public function getOperationState() + { + return $this->operation_state; + } + + /** + * The state of the import operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @param int $var + * @return $this + */ + public function setOperationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->operation_state = $var; + + return $this; + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressDocuments() + { + return $this->progress_documents; + } + + public function hasProgressDocuments() + { + return isset($this->progress_documents); + } + + public function clearProgressDocuments() + { + unset($this->progress_documents); + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_documents = $var; + + return $this; + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressBytes() + { + return $this->progress_bytes; + } + + public function hasProgressBytes() + { + return isset($this->progress_bytes); + } + + public function clearProgressBytes() + { + unset($this->progress_bytes); + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_bytes = $var; + + return $this; + } + + /** + * Which collection ids are being imported. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * Which collection ids are being imported. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * The location of the documents being imported. + * + * Generated from protobuf field string input_uri_prefix = 7; + * @return string + */ + public function getInputUriPrefix() + { + return $this->input_uri_prefix; + } + + /** + * The location of the documents being imported. + * + * Generated from protobuf field string input_uri_prefix = 7; + * @param string $var + * @return $this + */ + public function setInputUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->input_uri_prefix = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php new file mode 100644 index 000000000000..6eea4b3ae316 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php @@ -0,0 +1,159 @@ +google.firestore.admin.v1.ImportDocumentsRequest + */ +class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Which collection ids to import. Unspecified means all collections included + * in the import. + * + * Generated from protobuf field repeated string collection_ids = 2; + */ + private $collection_ids; + /** + * Location of the exported files. + * This must match the output_uri_prefix of an ExportDocumentsResponse from + * an export that has completed successfully. + * See: + * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + * + * Generated from protobuf field string input_uri_prefix = 3; + */ + protected $input_uri_prefix = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * @type array|\Google\Protobuf\Internal\RepeatedField $collection_ids + * Which collection ids to import. Unspecified means all collections included + * in the import. + * @type string $input_uri_prefix + * Location of the exported files. + * This must match the output_uri_prefix of an ExportDocumentsResponse from + * an export that has completed successfully. + * See: + * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_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. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_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; + } + + /** + * Which collection ids to import. Unspecified means all collections included + * in the import. + * + * Generated from protobuf field repeated string collection_ids = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * Which collection ids to import. Unspecified means all collections included + * in the import. + * + * Generated from protobuf field repeated string collection_ids = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * Location of the exported files. + * This must match the output_uri_prefix of an ExportDocumentsResponse from + * an export that has completed successfully. + * See: + * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + * + * Generated from protobuf field string input_uri_prefix = 3; + * @return string + */ + public function getInputUriPrefix() + { + return $this->input_uri_prefix; + } + + /** + * Location of the exported files. + * This must match the output_uri_prefix of an ExportDocumentsResponse from + * an export that has completed successfully. + * See: + * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + * + * Generated from protobuf field string input_uri_prefix = 3; + * @param string $var + * @return $this + */ + public function setInputUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->input_uri_prefix = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php new file mode 100644 index 000000000000..1ae6dafbab4f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php @@ -0,0 +1,234 @@ +google.firestore.admin.v1.Index + */ +class Index extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. A server defined name for this index. + * The form of this name for composite indexes will be: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` + * For single field indexes, this field will be empty. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Indexes with a collection query scope specified allow queries + * against a collection that is the child of a specific document, specified at + * query time, and that has the same collection id. + * Indexes with a collection group query scope specified allow queries against + * all collections descended from a specific document, specified at query + * time, and that have the same collection id as this index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + */ + protected $query_scope = 0; + /** + * The fields supported by this index. + * For composite indexes, this is always 2 or more fields. + * The last field entry is always for the field path `__name__`. If, on + * creation, `__name__` was not specified as the last field, it will be added + * automatically with the same direction as that of the last field defined. If + * the final field in a composite index is not directional, the `__name__` + * will be ordered ASCENDING (unless explicitly specified). + * For single field indexes, this will always be exactly one entry with a + * field path equal to the field path of the associated field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + private $fields; + /** + * Output only. The serving state of the index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. A server defined name for this index. + * The form of this name for composite indexes will be: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` + * For single field indexes, this field will be empty. + * @type int $query_scope + * Indexes with a collection query scope specified allow queries + * against a collection that is the child of a specific document, specified at + * query time, and that has the same collection id. + * Indexes with a collection group query scope specified allow queries against + * all collections descended from a specific document, specified at query + * time, and that have the same collection id as this index. + * @type array<\Google\Cloud\Firestore\Admin\V1\Index\IndexField>|\Google\Protobuf\Internal\RepeatedField $fields + * The fields supported by this index. + * For composite indexes, this is always 2 or more fields. + * The last field entry is always for the field path `__name__`. If, on + * creation, `__name__` was not specified as the last field, it will be added + * automatically with the same direction as that of the last field defined. If + * the final field in a composite index is not directional, the `__name__` + * will be ordered ASCENDING (unless explicitly specified). + * For single field indexes, this will always be exactly one entry with a + * field path equal to the field path of the associated field. + * @type int $state + * Output only. The serving state of the index. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); + parent::__construct($data); + } + + /** + * Output only. A server defined name for this index. + * The form of this name for composite indexes will be: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` + * For single field indexes, this field will be empty. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. A server defined name for this index. + * The form of this name for composite indexes will be: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` + * For single field indexes, this field will be empty. + * + * 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; + } + + /** + * Indexes with a collection query scope specified allow queries + * against a collection that is the child of a specific document, specified at + * query time, and that has the same collection id. + * Indexes with a collection group query scope specified allow queries against + * all collections descended from a specific document, specified at query + * time, and that have the same collection id as this index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + * @return int + */ + public function getQueryScope() + { + return $this->query_scope; + } + + /** + * Indexes with a collection query scope specified allow queries + * against a collection that is the child of a specific document, specified at + * query time, and that has the same collection id. + * Indexes with a collection group query scope specified allow queries against + * all collections descended from a specific document, specified at query + * time, and that have the same collection id as this index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + * @param int $var + * @return $this + */ + public function setQueryScope($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\QueryScope::class); + $this->query_scope = $var; + + return $this; + } + + /** + * The fields supported by this index. + * For composite indexes, this is always 2 or more fields. + * The last field entry is always for the field path `__name__`. If, on + * creation, `__name__` was not specified as the last field, it will be added + * automatically with the same direction as that of the last field defined. If + * the final field in a composite index is not directional, the `__name__` + * will be ordered ASCENDING (unless explicitly specified). + * For single field indexes, this will always be exactly one entry with a + * field path equal to the field path of the associated field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * The fields supported by this index. + * For composite indexes, this is always 2 or more fields. + * The last field entry is always for the field path `__name__`. If, on + * creation, `__name__` was not specified as the last field, it will be added + * automatically with the same direction as that of the last field defined. If + * the final field in a composite index is not directional, the `__name__` + * will be ordered ASCENDING (unless explicitly specified). + * For single field indexes, this will always be exactly one entry with a + * field path equal to the field path of the associated field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + * @param array<\Google\Cloud\Firestore\Admin\V1\Index\IndexField>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index\IndexField::class); + $this->fields = $arr; + + return $this; + } + + /** + * Output only. The serving state of the index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The serving state of the index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php new file mode 100644 index 000000000000..8c8cb50ff2cb --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php @@ -0,0 +1,158 @@ +google.firestore.admin.v1.Index.IndexField + */ +class IndexField extends \Google\Protobuf\Internal\Message +{ + /** + * Can be __name__. + * For single field indexes, this must match the name of the field or may + * be omitted. + * + * Generated from protobuf field string field_path = 1; + */ + protected $field_path = ''; + protected $value_mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_path + * Can be __name__. + * For single field indexes, this must match the name of the field or may + * be omitted. + * @type int $order + * Indicates that this field supports ordering by the specified order or + * comparing using =, !=, <, <=, >, >=. + * @type int $array_config + * Indicates that this field supports operations on `array_value`s. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); + parent::__construct($data); + } + + /** + * Can be __name__. + * For single field indexes, this must match the name of the field or may + * be omitted. + * + * Generated from protobuf field string field_path = 1; + * @return string + */ + public function getFieldPath() + { + return $this->field_path; + } + + /** + * Can be __name__. + * For single field indexes, this must match the name of the field or may + * be omitted. + * + * Generated from protobuf field string field_path = 1; + * @param string $var + * @return $this + */ + public function setFieldPath($var) + { + GPBUtil::checkString($var, True); + $this->field_path = $var; + + return $this; + } + + /** + * Indicates that this field supports ordering by the specified order or + * comparing using =, !=, <, <=, >, >=. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.Order order = 2; + * @return int + */ + public function getOrder() + { + return $this->readOneof(2); + } + + public function hasOrder() + { + return $this->hasOneof(2); + } + + /** + * Indicates that this field supports ordering by the specified order or + * comparing using =, !=, <, <=, >, >=. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.Order order = 2; + * @param int $var + * @return $this + */ + public function setOrder($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\Order::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Indicates that this field supports operations on `array_value`s. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; + * @return int + */ + public function getArrayConfig() + { + return $this->readOneof(3); + } + + public function hasArrayConfig() + { + return $this->hasOneof(3); + } + + /** + * Indicates that this field supports operations on `array_value`s. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; + * @param int $var + * @return $this + */ + public function setArrayConfig($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\ArrayConfig::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getValueMode() + { + return $this->whichOneof("value_mode"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IndexField::class, \Google\Cloud\Firestore\Admin\V1\Index_IndexField::class); + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php new file mode 100644 index 000000000000..e7ba6fe94de4 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php @@ -0,0 +1,57 @@ +google.firestore.admin.v1.Index.IndexField.ArrayConfig + */ +class ArrayConfig +{ + /** + * The index does not support additional array queries. + * + * Generated from protobuf enum ARRAY_CONFIG_UNSPECIFIED = 0; + */ + const ARRAY_CONFIG_UNSPECIFIED = 0; + /** + * The index supports array containment queries. + * + * Generated from protobuf enum CONTAINS = 1; + */ + const CONTAINS = 1; + + private static $valueToName = [ + self::ARRAY_CONFIG_UNSPECIFIED => 'ARRAY_CONFIG_UNSPECIFIED', + self::CONTAINS => 'CONTAINS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ArrayConfig::class, \Google\Cloud\Firestore\Admin\V1\Index_IndexField_ArrayConfig::class); + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php new file mode 100644 index 000000000000..d523938322b4 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php @@ -0,0 +1,64 @@ +google.firestore.admin.v1.Index.IndexField.Order + */ +class Order +{ + /** + * The ordering is unspecified. Not a valid option. + * + * Generated from protobuf enum ORDER_UNSPECIFIED = 0; + */ + const ORDER_UNSPECIFIED = 0; + /** + * The field is ordered by ascending field value. + * + * Generated from protobuf enum ASCENDING = 1; + */ + const ASCENDING = 1; + /** + * The field is ordered by descending field value. + * + * Generated from protobuf enum DESCENDING = 2; + */ + const DESCENDING = 2; + + private static $valueToName = [ + self::ORDER_UNSPECIFIED => 'ORDER_UNSPECIFIED', + self::ASCENDING => 'ASCENDING', + self::DESCENDING => 'DESCENDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Order::class, \Google\Cloud\Firestore\Admin\V1\Index_IndexField_Order::class); + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php new file mode 100644 index 000000000000..fd15c2606d85 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php @@ -0,0 +1,69 @@ +google.firestore.admin.v1.Index.QueryScope + */ +class QueryScope +{ + /** + * The query scope is unspecified. Not a valid option. + * + * Generated from protobuf enum QUERY_SCOPE_UNSPECIFIED = 0; + */ + const QUERY_SCOPE_UNSPECIFIED = 0; + /** + * Indexes with a collection query scope specified allow queries + * against a collection that is the child of a specific document, specified + * at query time, and that has the collection id specified by the index. + * + * Generated from protobuf enum COLLECTION = 1; + */ + const COLLECTION = 1; + /** + * Indexes with a collection group query scope specified allow queries + * against all collections that has the collection id specified by the + * index. + * + * Generated from protobuf enum COLLECTION_GROUP = 2; + */ + const COLLECTION_GROUP = 2; + + private static $valueToName = [ + self::QUERY_SCOPE_UNSPECIFIED => 'QUERY_SCOPE_UNSPECIFIED', + self::COLLECTION => 'COLLECTION', + self::COLLECTION_GROUP => 'COLLECTION_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(QueryScope::class, \Google\Cloud\Firestore\Admin\V1\Index_QueryScope::class); + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php new file mode 100644 index 000000000000..d9f96475cd8e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php @@ -0,0 +1,86 @@ +google.firestore.admin.v1.Index.State + */ +class State +{ + /** + * The state is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The index is being created. + * There is an active long-running operation for the index. + * The index is updated when writing a document. + * Some index data may exist. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The index is ready to be used. + * The index is updated when writing a document. + * The index is fully populated from all stored documents it applies to. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * The index was being created, but something went wrong. + * There is no active long-running operation for the index, + * and the most recently finished long-running operation failed. + * The index is not updated when writing a document. + * Some index data may exist. + * Use the google.longrunning.Operations API to determine why the operation + * that last attempted to create this index failed, then re-create the + * index. + * + * Generated from protobuf enum NEEDS_REPAIR = 3; + */ + const NEEDS_REPAIR = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::NEEDS_REPAIR => 'NEEDS_REPAIR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Firestore\Admin\V1\Index_State::class); + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php new file mode 100644 index 000000000000..cfd0255b83c4 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php @@ -0,0 +1,286 @@ +google.firestore.admin.v1.IndexOperationMetadata + */ +class IndexOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The index resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string index = 3; + */ + protected $index = ''; + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; + */ + protected $state = 0; + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; + */ + protected $progress_documents = null; + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + protected $progress_bytes = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation completed. Will be unset if operation still in + * progress. + * @type string $index + * The index resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * @type int $state + * The state of the operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents + * The progress, in documents, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes + * The progress, in bytes, of this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time this operation started. + * + * 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 time this operation started. + * + * 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 time this operation completed. Will be unset if operation still in + * progress. + * + * 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 this operation completed. Will be unset if operation still in + * progress. + * + * 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 index resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string index = 3; + * @return string + */ + public function getIndex() + { + return $this->index; + } + + /** + * The index resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string index = 3; + * @param string $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkString($var, True); + $this->index = $var; + + return $this; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressDocuments() + { + return $this->progress_documents; + } + + public function hasProgressDocuments() + { + return isset($this->progress_documents); + } + + public function clearProgressDocuments() + { + unset($this->progress_documents); + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_documents = $var; + + return $this; + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressBytes() + { + return $this->progress_bytes; + } + + public function hasProgressBytes() + { + return isset($this->progress_bytes); + } + + public function clearProgressBytes() + { + unset($this->progress_bytes); + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_IndexField.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_IndexField.php new file mode 100644 index 000000000000..5ab5c301b309 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_IndexField.php @@ -0,0 +1,16 @@ +google.firestore.admin.v1.ListDatabasesRequest + */ +class ListDatabasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. A parent name of the form + * `projects/{project_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_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. A parent name of the form + * `projects/{project_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; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php new file mode 100644 index 000000000000..33aef88989c6 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php @@ -0,0 +1,67 @@ +google.firestore.admin.v1.ListDatabasesResponse + */ +class ListDatabasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The databases in the project. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; + */ + private $databases; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Firestore\Admin\V1\Database>|\Google\Protobuf\Internal\RepeatedField $databases + * The databases in the project. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The databases in the project. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDatabases() + { + return $this->databases; + } + + /** + * The databases in the project. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; + * @param array<\Google\Cloud\Firestore\Admin\V1\Database>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDatabases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Database::class); + $this->databases = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php new file mode 100644 index 000000000000..0fef006ed9b7 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php @@ -0,0 +1,197 @@ +google.firestore.admin.v1.ListFieldsRequest + */ +class ListFieldsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The filter to apply to list results. Currently, + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields + * that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with a filter that includes + * `indexConfig.usesAncestorConfig:false` . + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * The number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next + * page of results. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @type string $filter + * The filter to apply to list results. Currently, + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields + * that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with a filter that includes + * `indexConfig.usesAncestorConfig:false` . + * @type int $page_size + * The number of results to return. + * @type string $page_token + * A page token, returned from a previous call to + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next + * page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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 filter to apply to list results. Currently, + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields + * that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with a filter that includes + * `indexConfig.usesAncestorConfig:false` . + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter to apply to list results. Currently, + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields + * that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with a filter that includes + * `indexConfig.usesAncestorConfig:false` . + * + * 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 number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The 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 page token, returned from a previous call to + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next + * page of results. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next + * page of results. + * + * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php new file mode 100644 index 000000000000..3bd35bb3514a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php @@ -0,0 +1,105 @@ +google.firestore.admin.v1.ListFieldsResponse + */ +class ListFieldsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested fields. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; + */ + private $fields; + /** + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * + * 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\Firestore\Admin\V1\Field>|\Google\Protobuf\Internal\RepeatedField $fields + * The requested fields. + * @type string $next_page_token + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The requested fields. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * The requested fields. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; + * @param array<\Google\Cloud\Firestore\Admin\V1\Field>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Field::class); + $this->fields = $arr; + + return $this; + } + + /** + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * + * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php new file mode 100644 index 000000000000..3d927a5c22a9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php @@ -0,0 +1,181 @@ +google.firestore.admin.v1.ListIndexesRequest + */ +class ListIndexesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * The number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next + * page of results. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @type string $filter + * The filter to apply to list results. + * @type int $page_size + * The number of results to return. + * @type string $page_token + * A page token, returned from a previous call to + * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next + * page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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 filter to apply to list results. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter to apply to list results. + * + * 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 number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The 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 page token, returned from a previous call to + * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next + * page of results. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next + * page of results. + * + * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php new file mode 100644 index 000000000000..217e36797b3e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php @@ -0,0 +1,105 @@ +google.firestore.admin.v1.ListIndexesResponse + */ +class ListIndexesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested indexes. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + */ + private $indexes; + /** + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * + * 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\Firestore\Admin\V1\Index>|\Google\Protobuf\Internal\RepeatedField $indexes + * The requested indexes. + * @type string $next_page_token + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The requested indexes. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIndexes() + { + return $this->indexes; + } + + /** + * The requested indexes. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + * @param array<\Google\Cloud\Firestore\Admin\V1\Index>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIndexes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index::class); + $this->indexes = $arr; + + return $this; + } + + /** + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * + * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php new file mode 100644 index 000000000000..03ab2cf48f26 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php @@ -0,0 +1,33 @@ +google.firestore.admin.v1.LocationMetadata + */ +class LocationMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Location::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php new file mode 100644 index 000000000000..73244df17d28 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php @@ -0,0 +1,98 @@ +google.firestore.admin.v1.OperationState + */ +class OperationState +{ + /** + * Unspecified. + * + * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; + */ + const OPERATION_STATE_UNSPECIFIED = 0; + /** + * Request is being prepared for processing. + * + * Generated from protobuf enum INITIALIZING = 1; + */ + const INITIALIZING = 1; + /** + * Request is actively being processed. + * + * Generated from protobuf enum PROCESSING = 2; + */ + const PROCESSING = 2; + /** + * Request is in the process of being cancelled after user called + * google.longrunning.Operations.CancelOperation on the operation. + * + * Generated from protobuf enum CANCELLING = 3; + */ + const CANCELLING = 3; + /** + * Request has been processed and is in its finalization stage. + * + * Generated from protobuf enum FINALIZING = 4; + */ + const FINALIZING = 4; + /** + * Request has completed successfully. + * + * Generated from protobuf enum SUCCESSFUL = 5; + */ + const SUCCESSFUL = 5; + /** + * Request has finished being processed, but encountered an error. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + /** + * Request has finished being cancelled after user called + * google.longrunning.Operations.CancelOperation. + * + * Generated from protobuf enum CANCELLED = 7; + */ + const CANCELLED = 7; + + private static $valueToName = [ + self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', + self::INITIALIZING => 'INITIALIZING', + self::PROCESSING => 'PROCESSING', + self::CANCELLING => 'CANCELLING', + self::FINALIZING => 'FINALIZING', + self::SUCCESSFUL => 'SUCCESSFUL', + self::FAILED => 'FAILED', + self::CANCELLED => 'CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php new file mode 100644 index 000000000000..115336419f52 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php @@ -0,0 +1,103 @@ +google.firestore.admin.v1.Progress + */ +class Progress extends \Google\Protobuf\Internal\Message +{ + /** + * The amount of work estimated. + * + * Generated from protobuf field int64 estimated_work = 1; + */ + protected $estimated_work = 0; + /** + * The amount of work completed. + * + * Generated from protobuf field int64 completed_work = 2; + */ + protected $completed_work = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $estimated_work + * The amount of work estimated. + * @type int|string $completed_work + * The amount of work completed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The amount of work estimated. + * + * Generated from protobuf field int64 estimated_work = 1; + * @return int|string + */ + public function getEstimatedWork() + { + return $this->estimated_work; + } + + /** + * The amount of work estimated. + * + * Generated from protobuf field int64 estimated_work = 1; + * @param int|string $var + * @return $this + */ + public function setEstimatedWork($var) + { + GPBUtil::checkInt64($var); + $this->estimated_work = $var; + + return $this; + } + + /** + * The amount of work completed. + * + * Generated from protobuf field int64 completed_work = 2; + * @return int|string + */ + public function getCompletedWork() + { + return $this->completed_work; + } + + /** + * The amount of work completed. + * + * Generated from protobuf field int64 completed_work = 2; + * @param int|string $var + * @return $this + */ + public function setCompletedWork($var) + { + GPBUtil::checkInt64($var); + $this->completed_work = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php new file mode 100644 index 000000000000..bc68c8671ec8 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php @@ -0,0 +1,33 @@ +google.firestore.admin.v1.UpdateDatabaseMetadata + */ +class UpdateDatabaseMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php new file mode 100644 index 000000000000..e70a1e3eda8f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php @@ -0,0 +1,121 @@ +google.firestore.admin.v1.UpdateDatabaseRequest + */ +class UpdateDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database to update. + * + * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Database $database + * Required. The database to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database to update. + * + * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\Database|null + */ + public function getDatabase() + { + return $this->database; + } + + public function hasDatabase() + { + return isset($this->database); + } + + public function clearDatabase() + { + unset($this->database); + } + + /** + * Required. The database to update. + * + * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\Database $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database::class); + $this->database = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * 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); + } + + /** + * The list of fields to be updated. + * + * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php new file mode 100644 index 000000000000..37b58bf5fdd1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php @@ -0,0 +1,125 @@ +google.firestore.admin.v1.UpdateFieldRequest + */ +class UpdateFieldRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The field to be updated. + * + * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $field = null; + /** + * A mask, relative to the field. If specified, only configuration specified + * by this field_mask will be updated in the field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Field $field + * Required. The field to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * A mask, relative to the field. If specified, only configuration specified + * by this field_mask will be updated in the field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The field to be updated. + * + * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\Field|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * Required. The field to be updated. + * + * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\Field $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field::class); + $this->field = $var; + + return $this; + } + + /** + * A mask, relative to the field. If specified, only configuration specified + * by this field_mask will be updated in the field. + * + * 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 mask, relative to the field. If specified, only configuration specified + * by this field_mask will be updated in the field. + * + * 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/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php new file mode 100644 index 000000000000..3c3048a00aef --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php @@ -0,0 +1,88 @@ +createIndex($formattedParent, $index); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Index $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirestoreAdminClient::collectionGroupName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]' + ); + + create_index_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_CreateIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php new file mode 100644 index 000000000000..a53adba8e1f3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php @@ -0,0 +1,70 @@ +deleteIndex($formattedName); + 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 = FirestoreAdminClient::indexName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]', + '[INDEX]' + ); + + delete_index_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_DeleteIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php new file mode 100644 index 000000000000..9ea7cf889d8b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php @@ -0,0 +1,89 @@ +exportDocuments($formattedName); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExportDocumentsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + export_documents_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_ExportDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php new file mode 100644 index 000000000000..d0e82348fda5 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php @@ -0,0 +1,67 @@ +getDatabase($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + get_database_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_GetDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php new file mode 100644 index 000000000000..4902ba581b2a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php @@ -0,0 +1,72 @@ +getField($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::fieldName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]', + '[FIELD]' + ); + + get_field_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_GetField_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php new file mode 100644 index 000000000000..437a1688b685 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php @@ -0,0 +1,72 @@ +getIndex($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::indexName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]', + '[INDEX]' + ); + + get_index_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_GetIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php new file mode 100644 index 000000000000..c60f783726a4 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php @@ -0,0 +1,80 @@ +importDocuments($formattedName); + $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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + import_documents_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_ImportDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php new file mode 100644 index 000000000000..c8f30d8ed1e9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php @@ -0,0 +1,67 @@ +listDatabases($formattedParent); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirestoreAdminClient::projectName('[PROJECT]'); + + list_databases_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_ListDatabases_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php new file mode 100644 index 000000000000..2cb5b5c53a2a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php @@ -0,0 +1,81 @@ +listFields($formattedParent); + + /** @var Field $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 = FirestoreAdminClient::collectionGroupName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]' + ); + + list_fields_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_ListFields_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php new file mode 100644 index 000000000000..58bf7a441e7f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php @@ -0,0 +1,76 @@ +listIndexes($formattedParent); + + /** @var Index $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 = FirestoreAdminClient::collectionGroupName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]' + ); + + list_indexes_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_ListIndexes_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php new file mode 100644 index 000000000000..d27e88d33eda --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php @@ -0,0 +1,68 @@ +updateDatabase($database); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Database $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + 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 firestore_v1_generated_FirestoreAdmin_UpdateDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php new file mode 100644 index 000000000000..40f1a0cc5edb --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php @@ -0,0 +1,118 @@ +setName($fieldName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->updateField($field); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Field $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $fieldName = '[NAME]'; + + update_field_sample($fieldName); +} +// [END firestore_v1_generated_FirestoreAdmin_UpdateField_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/FirestoreAdminClient.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/FirestoreAdminClient.php new file mode 100644 index 000000000000..d1687b1cb13a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/src/V1/FirestoreAdminClient.php @@ -0,0 +1,34 @@ +collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + * $index = new Index(); + * $operationResponse = $firestoreAdminClient->createIndex($formattedParent, $index); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $firestoreAdminClient->createIndex($formattedParent, $index); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'createIndex'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $firestoreAdminClient->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. + */ +class FirestoreAdminGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.firestore.admin.v1.FirestoreAdmin'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'firestore.googleapis.com'; + + /** 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/datastore', + ]; + + private static $collectionGroupNameTemplate; + + private static $databaseNameTemplate; + + private static $fieldNameTemplate; + + private static $indexNameTemplate; + + private static $projectNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/firestore_admin_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_admin_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_admin_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/firestore_admin_rest_client_config.php', + ], + ], + ]; + } + + private static function getCollectionGroupNameTemplate() + { + if (self::$collectionGroupNameTemplate == null) { + self::$collectionGroupNameTemplate = new PathTemplate('projects/{project}/databases/{database}/collectionGroups/{collection}'); + } + + return self::$collectionGroupNameTemplate; + } + + private static function getDatabaseNameTemplate() + { + if (self::$databaseNameTemplate == null) { + self::$databaseNameTemplate = new PathTemplate('projects/{project}/databases/{database}'); + } + + return self::$databaseNameTemplate; + } + + private static function getFieldNameTemplate() + { + if (self::$fieldNameTemplate == null) { + self::$fieldNameTemplate = new PathTemplate('projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}'); + } + + return self::$fieldNameTemplate; + } + + private static function getIndexNameTemplate() + { + if (self::$indexNameTemplate == null) { + self::$indexNameTemplate = new PathTemplate('projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}'); + } + + return self::$indexNameTemplate; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'collectionGroup' => self::getCollectionGroupNameTemplate(), + 'database' => self::getDatabaseNameTemplate(), + 'field' => self::getFieldNameTemplate(), + 'index' => self::getIndexNameTemplate(), + 'project' => self::getProjectNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * collection_group resource. + * + * @param string $project + * @param string $database + * @param string $collection + * + * @return string The formatted collection_group resource. + */ + public static function collectionGroupName($project, $database, $collection) + { + return self::getCollectionGroupNameTemplate()->render([ + 'project' => $project, + 'database' => $database, + 'collection' => $collection, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a database + * resource. + * + * @param string $project + * @param string $database + * + * @return string The formatted database resource. + */ + public static function databaseName($project, $database) + { + return self::getDatabaseNameTemplate()->render([ + 'project' => $project, + 'database' => $database, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a field + * resource. + * + * @param string $project + * @param string $database + * @param string $collection + * @param string $field + * + * @return string The formatted field resource. + */ + public static function fieldName($project, $database, $collection, $field) + { + return self::getFieldNameTemplate()->render([ + 'project' => $project, + 'database' => $database, + 'collection' => $collection, + 'field' => $field, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a index + * resource. + * + * @param string $project + * @param string $database + * @param string $collection + * @param string $index + * + * @return string The formatted index resource. + */ + public static function indexName($project, $database, $collection, $index) + { + return self::getIndexNameTemplate()->render([ + 'project' => $project, + 'database' => $database, + 'collection' => $collection, + 'index' => $index, + ]); + } + + /** + * 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, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - collectionGroup: projects/{project}/databases/{database}/collectionGroups/{collection} + * - database: projects/{project}/databases/{database} + * - field: projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field} + * - index: projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index} + * - 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($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"); + } + + /** + * 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; + } + + /** + * 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 'firestore.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] + * which may be used to track the status of the creation. The metadata for + * the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. + * + * Sample code: + * ``` + * $firestoreAdminClient = new FirestoreAdminClient(); + * try { + * $formattedParent = $firestoreAdminClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + * $index = new Index(); + * $operationResponse = $firestoreAdminClient->createIndex($formattedParent, $index); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $firestoreAdminClient->createIndex($formattedParent, $index); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'createIndex'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $firestoreAdminClient->close(); + * } + * ``` + * + * @param string $parent Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @param Index $index Required. The composite index 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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createIndex($parent, $index, array $optionalArgs = []) + { + $request = new CreateIndexRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setIndex($index); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateIndex', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a composite index. + * + * Sample code: + * ``` + * $firestoreAdminClient = new FirestoreAdminClient(); + * try { + * $formattedName = $firestoreAdminClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); + * $firestoreAdminClient->deleteIndex($formattedName); + * } finally { + * $firestoreAdminClient->close(); + * } + * ``` + * + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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 deleteIndex($name, array $optionalArgs = []) + { + $request = new DeleteIndexRequest(); + $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('DeleteIndex', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Exports a copy of all or a subset of documents from Google Cloud Firestore + * to another storage system, such as Google Cloud Storage. Recent updates to + * documents may not be reflected in the export. The export occurs in the + * background and its progress can be monitored and managed via the + * Operation resource that is created. The output of an export may only be + * used once the associated operation is done. If an export operation is + * cancelled before completion it may leave partial data behind in Google + * Cloud Storage. + * + * For more details on export behavior and output format, refer to: + * https://cloud.google.com/firestore/docs/manage-data/export-import + * + * Sample code: + * ``` + * $firestoreAdminClient = new FirestoreAdminClient(); + * try { + * $formattedName = $firestoreAdminClient->databaseName('[PROJECT]', '[DATABASE]'); + * $operationResponse = $firestoreAdminClient->exportDocuments($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $firestoreAdminClient->exportDocuments($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'exportDocuments'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $firestoreAdminClient->close(); + * } + * ``` + * + * @param string $name Required. Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type string[] $collectionIds + * Which collection ids to export. Unspecified means all collections. + * @type string $outputUriPrefix + * The output URI. Currently only supports Google Cloud Storage URIs of the + * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + * Google Cloud Storage namespace path. When + * choosing a name, be sure to consider Google Cloud Storage naming + * guidelines: https://cloud.google.com/storage/docs/naming. + * If the URI is a bucket (without a namespace path), a prefix will be + * generated based on the start time. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function exportDocuments($name, array $optionalArgs = []) + { + $request = new ExportDocumentsRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['collectionIds'])) { + $request->setCollectionIds($optionalArgs['collectionIds']); + } + + if (isset($optionalArgs['outputUriPrefix'])) { + $request->setOutputUriPrefix($optionalArgs['outputUriPrefix']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ExportDocuments', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets information about a database. + * + * Sample code: + * ``` + * $firestoreAdminClient = new FirestoreAdminClient(); + * try { + * $formattedName = $firestoreAdminClient->databaseName('[PROJECT]', '[DATABASE]'); + * $response = $firestoreAdminClient->getDatabase($formattedName); + * } finally { + * $firestoreAdminClient->close(); + * } + * ``` + * + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_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\Firestore\Admin\V1\Database + * + * @throws ApiException if the remote call fails + */ + public function getDatabase($name, array $optionalArgs = []) + { + $request = new GetDatabaseRequest(); + $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('GetDatabase', Database::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the metadata and configuration for a Field. + * + * Sample code: + * ``` + * $firestoreAdminClient = new FirestoreAdminClient(); + * try { + * $formattedName = $firestoreAdminClient->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); + * $response = $firestoreAdminClient->getField($formattedName); + * } finally { + * $firestoreAdminClient->close(); + * } + * ``` + * + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_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\Firestore\Admin\V1\Field + * + * @throws ApiException if the remote call fails + */ + public function getField($name, array $optionalArgs = []) + { + $request = new GetFieldRequest(); + $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('GetField', Field::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a composite index. + * + * Sample code: + * ``` + * $firestoreAdminClient = new FirestoreAdminClient(); + * try { + * $formattedName = $firestoreAdminClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); + * $response = $firestoreAdminClient->getIndex($formattedName); + * } finally { + * $firestoreAdminClient->close(); + * } + * ``` + * + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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\Firestore\Admin\V1\Index + * + * @throws ApiException if the remote call fails + */ + public function getIndex($name, array $optionalArgs = []) + { + $request = new GetIndexRequest(); + $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('GetIndex', Index::class, $optionalArgs, $request)->wait(); + } + + /** + * Imports documents into Google Cloud Firestore. Existing documents with the + * same name are overwritten. The import occurs in the background and its + * progress can be monitored and managed via the Operation resource that is + * created. If an ImportDocuments operation is cancelled, it is possible + * that a subset of the data has already been imported to Cloud Firestore. + * + * Sample code: + * ``` + * $firestoreAdminClient = new FirestoreAdminClient(); + * try { + * $formattedName = $firestoreAdminClient->databaseName('[PROJECT]', '[DATABASE]'); + * $operationResponse = $firestoreAdminClient->importDocuments($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $firestoreAdminClient->importDocuments($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'importDocuments'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $firestoreAdminClient->close(); + * } + * ``` + * + * @param string $name Required. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type string[] $collectionIds + * Which collection ids to import. Unspecified means all collections included + * in the import. + * @type string $inputUriPrefix + * Location of the exported files. + * This must match the output_uri_prefix of an ExportDocumentsResponse from + * an export that has completed successfully. + * See: + * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function importDocuments($name, array $optionalArgs = []) + { + $request = new ImportDocumentsRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['collectionIds'])) { + $request->setCollectionIds($optionalArgs['collectionIds']); + } + + if (isset($optionalArgs['inputUriPrefix'])) { + $request->setInputUriPrefix($optionalArgs['inputUriPrefix']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ImportDocuments', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * List all the databases in the project. + * + * Sample code: + * ``` + * $firestoreAdminClient = new FirestoreAdminClient(); + * try { + * $formattedParent = $firestoreAdminClient->projectName('[PROJECT]'); + * $response = $firestoreAdminClient->listDatabases($formattedParent); + * } finally { + * $firestoreAdminClient->close(); + * } + * ``` + * + * @param string $parent Required. A parent name of the form + * `projects/{project_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\Firestore\Admin\V1\ListDatabasesResponse + * + * @throws ApiException if the remote call fails + */ + public function listDatabases($parent, array $optionalArgs = []) + { + $request = new ListDatabasesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ListDatabases', ListDatabasesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the field configuration and metadata for this database. + * + * Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields + * that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to + * `indexConfig.usesAncestorConfig:false` . + * + * Sample code: + * ``` + * $firestoreAdminClient = new FirestoreAdminClient(); + * try { + * $formattedParent = $firestoreAdminClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + * // Iterate over pages of elements + * $pagedResponse = $firestoreAdminClient->listFields($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $firestoreAdminClient->listFields($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $firestoreAdminClient->close(); + * } + * ``` + * + * @param string $parent Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * The filter to apply to list results. Currently, + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields + * that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with a filter that includes + * `indexConfig.usesAncestorConfig:false` . + * @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 listFields($parent, array $optionalArgs = []) + { + $request = new ListFieldsRequest(); + $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('ListFields', $optionalArgs, ListFieldsResponse::class, $request); + } + + /** + * Lists composite indexes. + * + * Sample code: + * ``` + * $firestoreAdminClient = new FirestoreAdminClient(); + * try { + * $formattedParent = $firestoreAdminClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + * // Iterate over pages of elements + * $pagedResponse = $firestoreAdminClient->listIndexes($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $firestoreAdminClient->listIndexes($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $firestoreAdminClient->close(); + * } + * ``` + * + * @param string $parent Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * The filter to apply to list results. + * @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 listIndexes($parent, array $optionalArgs = []) + { + $request = new ListIndexesRequest(); + $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('ListIndexes', $optionalArgs, ListIndexesResponse::class, $request); + } + + /** + * Updates a database. + * + * Sample code: + * ``` + * $firestoreAdminClient = new FirestoreAdminClient(); + * try { + * $database = new Database(); + * $operationResponse = $firestoreAdminClient->updateDatabase($database); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $firestoreAdminClient->updateDatabase($database); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'updateDatabase'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $firestoreAdminClient->close(); + * } + * ``` + * + * @param Database $database Required. The database to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The list of fields to be updated. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateDatabase($database, array $optionalArgs = []) + { + $request = new UpdateDatabaseRequest(); + $requestParamHeaders = []; + $request->setDatabase($database); + $requestParamHeaders['database.name'] = $database->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->startOperationsCall('UpdateDatabase', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates a field configuration. Currently, field updates apply only to + * single field index configuration. However, calls to + * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should provide a field mask to avoid + * changing any configuration that the caller isn't aware of. The field mask + * should be specified as: `{ paths: "index_config" }`. + * + * This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to + * track the status of the field update. The metadata for + * the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + * + * To configure the default field settings for the database, use + * the special `Field` with resource name: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * + * Sample code: + * ``` + * $firestoreAdminClient = new FirestoreAdminClient(); + * try { + * $field = new Field(); + * $operationResponse = $firestoreAdminClient->updateField($field); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $firestoreAdminClient->updateField($field); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'updateField'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $firestoreAdminClient->close(); + * } + * ``` + * + * @param Field $field Required. The field to be updated. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * A mask, relative to the field. If specified, only configuration specified + * by this field_mask will be updated in the field. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateField($field, array $optionalArgs = []) + { + $request = new UpdateFieldRequest(); + $requestParamHeaders = []; + $request->setField($field); + $requestParamHeaders['field.name'] = $field->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->startOperationsCall('UpdateField', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json b/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..c299566ec512 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/src/V1/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.firestore.admin.v1", + "libraryPackage": "Google\\Cloud\\Firestore\\Admin\\V1", + "services": { + "FirestoreAdmin": { + "clients": { + "grpc": { + "libraryClient": "FirestoreAdminGapicClient", + "rpcs": { + "CreateIndex": { + "methods": [ + "createIndex" + ] + }, + "DeleteIndex": { + "methods": [ + "deleteIndex" + ] + }, + "ExportDocuments": { + "methods": [ + "exportDocuments" + ] + }, + "GetDatabase": { + "methods": [ + "getDatabase" + ] + }, + "GetField": { + "methods": [ + "getField" + ] + }, + "GetIndex": { + "methods": [ + "getIndex" + ] + }, + "ImportDocuments": { + "methods": [ + "importDocuments" + ] + }, + "ListDatabases": { + "methods": [ + "listDatabases" + ] + }, + "ListFields": { + "methods": [ + "listFields" + ] + }, + "ListIndexes": { + "methods": [ + "listIndexes" + ] + }, + "UpdateDatabase": { + "methods": [ + "updateDatabase" + ] + }, + "UpdateField": { + "methods": [ + "updateField" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json new file mode 100644 index 000000000000..022aabbceef3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json @@ -0,0 +1,106 @@ +{ + "interfaces": { + "google.firestore.admin.v1.FirestoreAdmin": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "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": 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": { + "CreateIndex": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteIndex": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ExportDocuments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetDatabase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetField": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIndex": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ImportDocuments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListDatabases": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListFields": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListIndexes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateDatabase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateField": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php new file mode 100644 index 000000000000..98f97d8be1be --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php @@ -0,0 +1,78 @@ + [ + 'google.firestore.admin.v1.FirestoreAdmin' => [ + 'CreateIndex' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Index', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\IndexOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ExportDocuments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\ExportDocumentsResponse', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\ExportDocumentsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ImportDocuments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\ImportDocumentsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateDatabase' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\UpdateDatabaseMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateField' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Field', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListFields' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFields', + ], + ], + 'ListIndexes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getIndexes', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php new file mode 100644 index 000000000000..8a487f1dbd84 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php @@ -0,0 +1,195 @@ + [ + 'google.firestore.admin.v1.FirestoreAdmin' => [ + 'CreateIndex' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes', + 'body' => 'index', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteIndex' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}:exportDocuments', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDatabase' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetField' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIndex' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}:importDocuments', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDatabases' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/databases', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListFields' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListIndexes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDatabase' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{database.name=projects/*/databases/*}', + 'body' => 'database', + 'placeholders' => [ + 'database.name' => [ + 'getters' => [ + 'getDatabase', + 'getName', + ], + ], + ], + ], + 'UpdateField' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}', + 'body' => 'field', + 'placeholders' => [ + 'field.name' => [ + 'getters' => [ + 'getField', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/FirestoreAdminClientTest.php b/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/FirestoreAdminClientTest.php new file mode 100644 index 000000000000..bdc8be774300 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/FirestoreAdminClientTest.php @@ -0,0 +1,1116 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return FirestoreAdminClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new FirestoreAdminClient($options); + } + + /** @test */ + public function createIndexTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createIndexTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new Index(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createIndexTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $index = new Index(); + $response = $gapicClient->createIndex($formattedParent, $index); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateIndex', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getIndex(); + $this->assertProtobufEquals($index, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIndexTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createIndexExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createIndexTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $index = new Index(); + $response = $gapicClient->createIndex($formattedParent, $index); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIndexTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteIndexTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); + $gapicClient->deleteIndex($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteIndex', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteIndexExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); + try { + $gapicClient->deleteIndex($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 exportDocumentsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $outputUriPrefix2 = 'outputUriPrefix2-377757258'; + $expectedResponse = new ExportDocumentsResponse(); + $expectedResponse->setOutputUriPrefix($outputUriPrefix2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $response = $gapicClient->exportDocuments($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ExportDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function exportDocumentsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->databaseName('[PROJECT]', '[DATABASE]'); + $response = $gapicClient->exportDocuments($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getDatabaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $keyPrefix = 'keyPrefix438630514'; + $etag = 'etag3123477'; + $expectedResponse = new Database(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setKeyPrefix($keyPrefix); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $response = $gapicClient->getDatabase($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetDatabase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDatabaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + try { + $gapicClient->getDatabase($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 getFieldTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Field(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); + $response = $gapicClient->getField($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetField', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFieldExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); + try { + $gapicClient->getField($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 getIndexTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Index(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); + $response = $gapicClient->getIndex($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetIndex', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIndexExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); + try { + $gapicClient->getIndex($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 importDocumentsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $response = $gapicClient->importDocuments($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ImportDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importDocumentsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->databaseName('[PROJECT]', '[DATABASE]'); + $response = $gapicClient->importDocuments($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listDatabasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListDatabasesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listDatabases($formattedParent); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListDatabases', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDatabasesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listDatabases($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 listFieldsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $fieldsElement = new Field(); + $fields = [ + $fieldsElement, + ]; + $expectedResponse = new ListFieldsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFields($fields); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $response = $gapicClient->listFields($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFields()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListFields', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFieldsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + try { + $gapicClient->listFields($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 listIndexesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $indexesElement = new Index(); + $indexes = [ + $indexesElement, + ]; + $expectedResponse = new ListIndexesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setIndexes($indexes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $response = $gapicClient->listIndexes($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getIndexes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListIndexes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIndexesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + try { + $gapicClient->listIndexes($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 updateDatabaseTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $locationId = 'locationId552319461'; + $keyPrefix = 'keyPrefix438630514'; + $etag = 'etag3123477'; + $expectedResponse = new Database(); + $expectedResponse->setName($name); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setKeyPrefix($keyPrefix); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDatabaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $database = new Database(); + $response = $gapicClient->updateDatabase($database); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/UpdateDatabase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateDatabaseExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $database = new Database(); + $response = $gapicClient->updateDatabase($database); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateFieldTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFieldTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new Field(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateFieldTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $field = new Field(); + $fieldName = 'fieldName1265009317'; + $field->setName($fieldName); + $response = $gapicClient->updateField($field); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/UpdateField', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getField(); + $this->assertProtobufEquals($field, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFieldTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateFieldExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFieldTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $field = new Field(); + $fieldName = 'fieldName1265009317'; + $field->setName($fieldName); + $response = $gapicClient->updateField($field); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFieldTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php new file mode 100644 index 000000000000..3b7dc874d572 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + ' +Þ +,google/firestore/v1/aggregation_result.protogoogle.firestore.v1"¾ +AggregationResultU +aggregate_fields ( 2;.google.firestore.v1.AggregationResult.AggregateFieldsEntryR +AggregateFieldsEntry +key ( ) +value ( 2.google.firestore.v1.Value:8BÏ +com.google.firestore.v1BAggregationResultProtoPZd%7-bhEFiQ*;qd>eEfyk0**XmsXjmyHq1@1;RkeDXTZ2PrL?9MbZQ*<@F zjCcAFUU}uC_!Lg3yJZa+wKx6w=A7@G@25L2)AJOq<2Eo5L_vuAL#)mLr-CaU@C5g> zC<1{4K1gW-!p6AO!LK_#yx%(NJ=9RiGZBD`W6t9Q8W9yB6&KLBa2gsl;LJ8;2r)7M znUVl-yW2blMM9#8*ETrsV2txloo$4Igh+|^3?6+#SYK(@PiTOpB1+#jsPrkLijstW z)VgG`j9Jk-J!l3?{QK6^5nc1Kr4anIuoSiN4)Jf9;^PRP@*`du(4gYwKvC#e-}B zOdS*X&RRmXh(Z$jDN*Ngxq_$b^J{<>x&i{uLftXWtVJ{nAE;D$yi%V#oU$BL%ThfM z;45uxxvD?co~_!WjAnv#Pwdk5;Z$=G-7Xn@HB4dcOBGo?L6{__-<>p1CarxmFMxzT zXUTBH{B+Db>BYW|wclu9N8_}_HbRExy`Tz~r;S4Ae|XMv;NjHjBQ&4WnpbND-O&>u zhQ7KIZmP1ddV=Q0>8-}d!#`K&9=fZmBXyC11w&s#0)d|3<}8{S@DQ5cE9k!7&ztl& zYsKQ3S?gBb?u@z+^MtV2<|1yyz)VjXMTn$S{Px# literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php new file mode 100644 index 0000000000000000000000000000000000000000..bce162030d1f23eb441ec951465f616ccbbeaa7d GIT binary patch literal 1931 zcmb_d(QXq*6s_$fimw9^MlB%%F}O%L2-bC~R&+y(2qA7HAd!gjfL5}`>+5CJ^~`E^ zHj-OK>L>IY`q&3PgNJ@fzoK_$XE%;;p%3+o?YZaNIrq+)xlf*^?^5`h4N#!s8pmuj zWBMJkR7ovEnXpklnV@2!oThPt%42N*h`l~KVK4R%Pwo;mler4fXOWaqg1t$sFw;_D z@2uY&%P^m!(4I{PAovusl!wR$$9u0(^D);v7+7X-P%?wl{tiHx@GN8dE(81uj6P{T zO5%`Znrr&H7iYs*#5(3l{0nK{WfPucNaT;PlU#&4mVz0=kqEK7#fqE;doPt#>nyHkpuQiWu9{|6x?65rlP;dHZlTflKN7jiw90XQcg7Uz zT!|g4+ax%zegz9URjGSJnL_RR7d2g^_$2Wpri0LYn*Mk0$t=a-CD)0F7L#lbAN?4+ zjy)TXs|FpAb-Gnaroj8~p$VPOd!~K8z<8CfytDr19Y?gbqGRgmvYx_en;QqqrrfRRjlCk7Qjn%r%_7AW!i7^>x8+F#`wzjvt1$%oX**mb<7ecF9y9cdM zAzh%MQL@pXe68)xl3&X7s*{CUCBI2h6TGt?5hh@zb1&q|MW%s23#4D+mQ=LGOb%J0_Nl+ zR4!n&G$`;Dtc@jITXgHDH#J)S4%Vwvb0MJ6C)-w}%e0C`t;p*5Om%-nLD zme*+cCaf!@2Mp=PyU?;@c(5L!9Hx?VyU?l?aJ@V?;~tMJ|58Mh>U(H$rTENYn-+Vg z#9r$4GlMHzwhhfGPaSK;vTiSAz2d3k?5zRVGZ`8QoyPzd8QTwF#l|u^ePh$gW|t(` zOr76ruv(^_^LIg9?C%mj@9+Q7eS05jaD%4Fq7Lj`DKD3O;f`x>pST+s$%Ko@lPc;( zDC~Xe6(OF+*`=YgQ?=ob`qJR}!J9wpHwSjYc+V4=kEt#k~OwpoY~ql z-kEW;*(w*%9*~e0X&1rnWd%YYt&q4OkdWYjgxDj9OD}NXfH;D65x%-PiqHqPJbgcWO>kuXc8Jh^yC}R@-V4 zH>>OG5A^#Fw)N8bo$b@G)pI&-jpX%)<20Hiw_~})^BtGuo?h<$l4bG`vdtFp+GdUD z8=J*@#5e1vZ%_}A`Kn^sNteA9>j&RSl@vMt{- zo7Ov^{i?oWHa!Bn``7Mt?3!;mwoW%Zuxn)Lyv}9PwP)K7Si7oAWj3h;!1(eV+b6DV zHp}b8tGQMiY}FS?)@hApe&p z$2d0Fx@|$e`DUv<`mtN>TKOU1suP1MmM9lrvqV}H>h&NCZUI9q1-PXsK8Jq!HFRbK zYQRVNqU??&f$Y=EnG<5C*|u^uhFVS}na_q^>`-V{ssfv0!3EWsW*2}JU@1VLSgj;4 zpge$?SYfE-)diM%lnP9s6!;be%%BB(6cu8@DRBy8OCX;dp>glo9lZ2qaK!@YEw^3E zQSRw@{Dtu=4dD&qOXzPAP|EZ15j08pcu~`}rJ3Ty-wFwwLz6Ajd$O2-N2!(5S*}kc zC|N1y9xTKQDCN7R?U{^P7bjp}`t~azXT~LFy+T!7Ofq2^DNO304ZwN(mEv)9tOi78 zc|Ngg`xTEgNe!6R_*nuSy9-a{p`KL!D4J@UE+leT{S2Cgnnkw)D^{#JvqPA61kJR~ z2B~;ZD43o}j1gjweCG+V7bmG3@I0D!+&Xb9)&0dO_C)&R5Hn+ZpG?EPKA#{aY@ko@ zF_iXpoxMuS@;u9KET&=4bgZYUXraeZUK>10@Fg@Of$D*?CLpk%k+BG%3fUF}7N0(OUMSOJkv4*D>G7K^4|+YNC}khcpEV(9s*rWYX|$WCdI2U$A-U>Msw zJzPZdndV)QqIs_prYVk;@;PN1YZ$bW-6Qk*ish+;KW~ zosrrw@PS%K&>_hVEJNWDBv#l|#>n_$n2)JrQY!=0FHWN=ULTD&(TO5ySa!%MGUa0; zc@-UUxZ6Y(8QIN74sg?VnD9)GSu{D*0O?uU3|jsWotDuQE3+J0A=@MT$NDp+|BQFg zoIFVA^A$A9M2bd2GOMnH6qC$*UVwFqb{3Y;izCmf0l_c;zgtk$s%GuU5HlB}p{JtL zj3SMX5+I~wv+h+2QC85KXx@X%NewO|q+VgoiwNUcrDYF;#Y{HfuO|y>s-`NsWS{Kd$7@3JghID%K%4cviW(H8WbjreYFaycWb^lEopbj6+1N zmk31hFq-9RS8BVa-5|za5@=3J7YNVytPvKf`+siX8WYCMIV_uOaRN){)XEv9UF%}J zq1<0*R|#=T8@!+2I(p9M4rldj*!f#5Hn1PKcgJeNI97}l)GbNrZ9YXHFph$?P%Oc( zP)!-MStDTlXaY@f-{7k#87^{h-3Wt9mT_(Xo15V~3uo^yC>_an1ovw%kZ>HOX_;>U z@PZKpZI&W^PKvcj0f{KaCmP%XW_+e1Wg*VJX*B7;kehc5nX~Ay45v7r?vZE^SFTJ8 zr9vh`(-E1m;Fm5aJ^k1$^s8KJ)}Fzy(i_mN8J{FjntO@^5Z^~wEa&OLV##Q2Ze?YF z|VuRK4AW^TzzJAO|?snDzj$BbL&<_xBSk z_!6CjKcmCuRiLjoVLt2SmUD6r#C{gFhW@;~e1QKW%6&ju_`FQTNEbyR6|9k3EswI4 zyV>}z#&moaZY4}fXdhv`HlmujXA#sMJidWf$B}Z-D**piLvzv5BvxA!T_i0Z5|1jg zwY2h8rle&5>==Q`2lwCSg=12{h0yd9e;+J}&KYAYh%S;A9G9^R>KyyqmvMtbX?biY zJuk4oa^PP}#t6aK!|KjjF`#3YfQ-5UR4frYw6-R=stc? z5V&IO$22?^Xc!vr;=fWg#b7T^&FI`O^Esv8rI0PrC>!7A#CRawIwCI~4h$X_tn=DWB#+R9eGTlZXYepGh+L8uQ`5`bI zzq7|M9DgaJpk_F^Mrc-eQHE=>tFTnG)=pab=*d-L2TB4=DIp}KW2m|UJI=HBynDfn@Kb7ywW%jZh`os}Fi2G;aRlYT!XRq`5U~@kI=yG+6sqn>f!538*_;-V$ X&kX5B&#EatF=Q+Gr+^3O0HOZ@g(A>p literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php new file mode 100644 index 0000000000000000000000000000000000000000..4e07b596cc6595ffe57f294b28dcff40808ec972 GIT binary patch literal 3478 zcmb_fOLN;)6t3*ZiH}pqbD`8V3<#5%rY)68+To!z6!{UyGr@LkCrlX+8pXbL#3+)` zBb~r>!;%GS)-3q}Y*?~_VZ|?C&41_&=U&OO>l$hb*~HR4-?`^}=c#-5ol^(ilIql= zuI|&JbaEm2r&MxW+qVa{DV+qP5p|`3edZV@b!ADawxnjOC)KKr-kS*Z?7$sRMH<`o z*rcVA;Zo1HU0OQdE`1SD_d@2n04)8CdX7GzQoUXNnELuq_w|0A!}|LZSpRr?7hquO zo+mwEaQF%&{Bwd6(-=seulx9K)9^IIGJHcfjW5yaJ!zzy9!2D{vZKHn_=ass4A8O$ zbnAu`>SVH;j*VXKNfSfb%yD$O->`h@TDsY&fYFbF7*S~+U0gL1&`xj{RK3sj)7EBb6BRQ`nh4diZby# zmf?QY9t3C9@|TClynN#7jze8-aJ;v&>A@+!=@!t0R?&p!-l=}}~QcwYQ*12(!CkpV`44tcVX`;hXeNe6yj zkc6$wPDx&HyF7=Ik(|#FgGokeurhM(vwT8IBK*Cj;1%0sS0cR2@3vi{fcWT?x-_5U zX53mz4>F87OYXs%?GCA{om}KsxEVK>g0~om+=ewwVAt1lKflT^e{~_c61W~3dJ9t2 z8ZzOv=L=^cWsgQ4_46qd7RgNzP2ltu(m`8@g#~Lo8jiPPcrI6S-D+B0wslsSP>S)ojo3sW#%&MM1y2(Bb)@S0><4 z-@zqv0P7=GoD*%#mdwsOOKIa(J*z3OboXMSDa?Z9G#xSEL{s@PWJ2FG|H7e#Uj*2g zGn_OaVLROQ?9Sd&#?EPwTi6hEY>=3GtKn^4Q~>`baf_IGv8Ft{+-lc4YOmGNj+)(e zt`momRYP|!snG?t>K;lOYDXKj6F5olr7KuECYrH&fvik_Iuvi3HW-P>8KC2N~_sZ8_jNRm82liXy(?~ z)lZ*kYV%<(O#o6%1r%SI7orCeKVjEN5ZeW(9$5k=NX}0*GO6{Xa5Ph4c`Y zB|a{qM3on&*L=UKPEdtS$j+rb29KAH=IH)u*h32s0A}V|1yWpMQrIuTeX$1V*b0`I z)kddQ=`~u-xe~{0RJ)a0v)X9ZG1-yvYAt?F6u(YFVd|Ya9=mjmYoTq0GyEgSdGT1+ z_zoJigw17$!bW}!>-tnHn;mSJ?>+}TZ-_keqMZCg6$(EIkePW&Iv@`0z?v)@>VLRE zt}sPtI{^`wV%_7zJ00HpK8XC7lt2s|&9@^y;>kWcaNoVl8xu#C0e6Y0xtG@gIGH@F zi&aQPE5J=i@n+|tR>spmbUO@X>V%H)^MEJWTKQ)IuHqD4=aJF}1kirSM314DYG$kKK4>{64W#uk3e!NL;J)?+v+P+QCqccVhW?``5`? zzt0c*Gv6fmQSxWvwGgT({8&+9u%aAqpQN}Ycdo|^?%UzAKl5$yx8DU^GTh!D!()KI E0JLsS7ytkO literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php new file mode 100644 index 0000000000000000000000000000000000000000..65d2598ac5b82f35c019ba887817388da69aa868 GIT binary patch literal 2521 zcmbtW-EJF26vj@R;t8bAR;VT_>eN)!mB?CdRW3FS5XVl4L>f17jD##Llijg1Vs~em znGFpnZ@^P<$!l=OD{##X;vqOQ>s>p-f zbxv_CxZ)lU@L4h(Qh_}l#w?)1#<+ciUmW#tr+v_S08q&j;ZX;VI3ESHF=T>D#RY9# zG#lRwrl@UnArz62%9wZ*?{`~=R1u#jGT1k;!CnR%^qX4$3Uf2HB*M}*-oPR;`6 zVX26MkB3aUEMkh0fc*eoZ{r~eBn9M6*SWuOS zXv_Gm6

24HnQe*yUl!BgdJSB#dA z=4$C>(g6Mht)}+fkjQVVO9uX6F8mM#tu9(0<8s@wdJ8W>2+!uCbK~|Nqk*4)g)k~! zA_NqNo6%Wap5sneP>)AGbR&;itEkLlJxkzA?T=-&o-sDjUqNr@dNtQ&>j+hb+6Q+k zgyR1QVdJkQwDymvEQC@UF;V9x$7SmqbVpLyCjZjm_$Mt%DrgJ+&kju=&&(V7j55J%;2?BR0c<2)S4n?Q?X0e9aHd>ux$-0NCC!OPd z=h*G%>);F|8$N)im)j zl}Vt0^sJS1yN~-hCnlQ(c0R|fXJ~z*5%w1-kt;0;sNHCc!S?{8f#}nu$ zJ$Fm3Ukm6ioF}siw}nhun9bEKeEobp(MLRhY}s6l8Y3E+up8+UiJ821!ffSf|GBul zzq@zxOY!}EbF$dG0Z)9Go#T7Q?l*tS-Ub8nIG8$X;I8?zcrS%Ij(K*R9PBv#=Gltz bgoogle.firestore.v1.AggregationResult + */ +class AggregationResult extends \Google\Protobuf\Internal\Message +{ + /** + * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. + * The key is the [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] + * assigned to the aggregation function on input and the size of this map + * equals the number of aggregation functions in the query. + * + * Generated from protobuf field map aggregate_fields = 2; + */ + private $aggregate_fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $aggregate_fields + * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. + * The key is the [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] + * assigned to the aggregation function on input and the size of this map + * equals the number of aggregation functions in the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\AggregationResult::initOnce(); + parent::__construct($data); + } + + /** + * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. + * The key is the [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] + * assigned to the aggregation function on input and the size of this map + * equals the number of aggregation functions in the query. + * + * Generated from protobuf field map aggregate_fields = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAggregateFields() + { + return $this->aggregate_fields; + } + + /** + * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. + * The key is the [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] + * assigned to the aggregation function on input and the size of this map + * equals the number of aggregation functions in the query. + * + * Generated from protobuf field map aggregate_fields = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAggregateFields($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->aggregate_fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php new file mode 100644 index 000000000000..a5e67239f7a8 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php @@ -0,0 +1,67 @@ +google.firestore.v1.ArrayValue + */ +class ArrayValue extends \Google\Protobuf\Internal\Message +{ + /** + * Values in the array. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $values + * Values in the array. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Values in the array. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * Values in the array. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + * @param array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php new file mode 100644 index 000000000000..ba65b39ece0f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php @@ -0,0 +1,289 @@ +google.firestore.v1.BatchGetDocumentsRequest + */ +class BatchGetDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + */ + private $documents; + /** + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + */ + protected $mask = null; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type array|\Google\Protobuf\Internal\RepeatedField $documents + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + * @type \Google\Cloud\Firestore\V1\DocumentMask $mask + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + * @type string $transaction + * Reads documents in a transaction. + * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->documents = $arr; + + return $this; + } + + /** + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getMask() + { + return $this->mask; + } + + public function hasMask() + { + return isset($this->mask); + } + + public function clearMask() + { + unset($this->mask); + } + + /** + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->mask = $var; + + return $this; + } + + /** + * Reads documents in a transaction. + * + * Generated from protobuf field bytes transaction = 4; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(4); + } + + public function hasTransaction() + { + return $this->hasOneof(4); + } + + /** + * Reads documents in a transaction. + * + * Generated from protobuf field bytes transaction = 4; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; + * @return \Google\Cloud\Firestore\V1\TransactionOptions|null + */ + public function getNewTransaction() + { + return $this->readOneof(5); + } + + public function hasNewTransaction() + { + return $this->hasOneof(5); + } + + /** + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; + * @param \Google\Cloud\Firestore\V1\TransactionOptions $var + * @return $this + */ + public function setNewTransaction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(7); + } + + public function hasReadTime() + { + return $this->hasOneof(7); + } + + /** + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php new file mode 100644 index 000000000000..f0f72218700c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php @@ -0,0 +1,209 @@ +google.firestore.v1.BatchGetDocumentsResponse + */ +class BatchGetDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. + * + * Generated from protobuf field bytes transaction = 3; + */ + protected $transaction = ''; + /** + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + */ + protected $read_time = null; + protected $result; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Document $found + * A document that was requested. + * @type string $missing + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type string $transaction + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. + * @type \Google\Protobuf\Timestamp $read_time + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * A document that was requested. + * + * Generated from protobuf field .google.firestore.v1.Document found = 1; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getFound() + { + return $this->readOneof(1); + } + + public function hasFound() + { + return $this->hasOneof(1); + } + + /** + * A document that was requested. + * + * Generated from protobuf field .google.firestore.v1.Document found = 1; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setFound($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string missing = 2; + * @return string + */ + public function getMissing() + { + return $this->readOneof(2); + } + + public function hasMissing() + { + return $this->hasOneof(2); + } + + /** + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string missing = 2; + * @param string $var + * @return $this + */ + public function setMissing($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. + * + * Generated from protobuf field bytes transaction = 3; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. + * + * Generated from protobuf field bytes transaction = 3; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + + /** + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getResult() + { + return $this->whichOneof("result"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php new file mode 100644 index 000000000000..7b5671ce9703 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php @@ -0,0 +1,151 @@ +google.firestore.v1.BatchWriteRequest + */ +class BatchWriteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * The writes to apply. + * Method does not apply writes atomically and does not guarantee ordering. + * Each write succeeds or fails independently. You cannot write to the same + * document more than once per request. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + */ + private $writes; + /** + * Labels associated with this batch write. + * + * Generated from protobuf field map labels = 3; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $writes + * The writes to apply. + * Method does not apply writes atomically and does not guarantee ordering. + * Each write succeeds or fails independently. You cannot write to the same + * document more than once per request. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels associated with this batch write. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The writes to apply. + * Method does not apply writes atomically and does not guarantee ordering. + * Each write succeeds or fails independently. You cannot write to the same + * document more than once per request. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWrites() + { + return $this->writes; + } + + /** + * The writes to apply. + * Method does not apply writes atomically and does not guarantee ordering. + * Each write succeeds or fails independently. You cannot write to the same + * document more than once per request. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + * @param array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWrites($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); + $this->writes = $arr; + + return $this; + } + + /** + * Labels associated with this batch write. + * + * Generated from protobuf field map labels = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels associated with this batch write. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php new file mode 100644 index 000000000000..36d81e370b90 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php @@ -0,0 +1,117 @@ +google.firestore.v1.BatchWriteResponse + */ +class BatchWriteResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + */ + private $write_results; + /** + * The status of applying the writes. + * This i-th write status corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.rpc.Status status = 2; + */ + private $status; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $write_results + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $status + * The status of applying the writes. + * This i-th write status corresponds to the i-th write in the + * request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWriteResults() + { + return $this->write_results; + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + * @param array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWriteResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); + $this->write_results = $arr; + + return $this; + } + + /** + * The status of applying the writes. + * This i-th write status corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.rpc.Status status = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStatus() + { + return $this->status; + } + + /** + * The status of applying the writes. + * This i-th write status corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.rpc.Status status = 2; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStatus($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->status = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php new file mode 100644 index 000000000000..eb24afae8fb1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php @@ -0,0 +1,119 @@ +google.firestore.v1.BeginTransactionRequest + */ +class BeginTransactionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * The options for the transaction. + * Defaults to a read-write transaction. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; + */ + protected $options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type \Google\Cloud\Firestore\V1\TransactionOptions $options + * The options for the transaction. + * Defaults to a read-write transaction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The options for the transaction. + * Defaults to a read-write transaction. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; + * @return \Google\Cloud\Firestore\V1\TransactionOptions|null + */ + public function getOptions() + { + return $this->options; + } + + public function hasOptions() + { + return isset($this->options); + } + + public function clearOptions() + { + unset($this->options); + } + + /** + * The options for the transaction. + * Defaults to a read-write transaction. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; + * @param \Google\Cloud\Firestore\V1\TransactionOptions $var + * @return $this + */ + public function setOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); + $this->options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php new file mode 100644 index 000000000000..bf88b57e22b3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php @@ -0,0 +1,67 @@ +google.firestore.v1.BeginTransactionResponse + */ +class BeginTransactionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The transaction that was started. + * + * Generated from protobuf field bytes transaction = 1; + */ + protected $transaction = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $transaction + * The transaction that was started. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The transaction that was started. + * + * Generated from protobuf field bytes transaction = 1; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * The transaction that was started. + * + * Generated from protobuf field bytes transaction = 1; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php new file mode 100644 index 000000000000..4197ef691715 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php @@ -0,0 +1,143 @@ +google.firestore.v1.CommitRequest + */ +class CommitRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * The writes to apply. + * Always executed atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + */ + private $writes; + /** + * If set, applies all writes in this transaction, and commits it. + * + * Generated from protobuf field bytes transaction = 3; + */ + protected $transaction = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $writes + * The writes to apply. + * Always executed atomically and in order. + * @type string $transaction + * If set, applies all writes in this transaction, and commits it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The writes to apply. + * Always executed atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWrites() + { + return $this->writes; + } + + /** + * The writes to apply. + * Always executed atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + * @param array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWrites($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); + $this->writes = $arr; + + return $this; + } + + /** + * If set, applies all writes in this transaction, and commits it. + * + * Generated from protobuf field bytes transaction = 3; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * If set, applies all writes in this transaction, and commits it. + * + * Generated from protobuf field bytes transaction = 3; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php new file mode 100644 index 000000000000..aa52dc11399d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php @@ -0,0 +1,123 @@ +google.firestore.v1.CommitResponse + */ +class CommitResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + */ + private $write_results; + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the commit. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; + */ + protected $commit_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $write_results + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * @type \Google\Protobuf\Timestamp $commit_time + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the commit. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWriteResults() + { + return $this->write_results; + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + * @param array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWriteResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); + $this->write_results = $arr; + + return $this; + } + + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the commit. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCommitTime() + { + return $this->commit_time; + } + + public function hasCommitTime() + { + return isset($this->commit_time); + } + + public function clearCommitTime() + { + unset($this->commit_time); + } + + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the commit. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCommitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->commit_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php new file mode 100644 index 000000000000..eb3c235b2d6a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php @@ -0,0 +1,243 @@ +google.firestore.v1.CreateDocumentRequest + */ +class CreateDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource. For example: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $collection_id = ''; + /** + * The client-assigned document ID to use for this document. + * Optional. If not specified, an ID will be assigned by the service. + * + * Generated from protobuf field string document_id = 3; + */ + protected $document_id = ''; + /** + * Required. The document to create. `name` must not be set. + * + * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; + */ + protected $mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource. For example: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + * @type string $collection_id + * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`. + * @type string $document_id + * The client-assigned document ID to use for this document. + * Optional. If not specified, an ID will be assigned by the service. + * @type \Google\Cloud\Firestore\V1\Document $document + * Required. The document to create. `name` must not be set. + * @type \Google\Cloud\Firestore\V1\DocumentMask $mask + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource. For example: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource. For example: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + * + * 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. The collection ID, relative to `parent`, to list. For example: `chatrooms`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCollectionId() + { + return $this->collection_id; + } + + /** + * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCollectionId($var) + { + GPBUtil::checkString($var, True); + $this->collection_id = $var; + + return $this; + } + + /** + * The client-assigned document ID to use for this document. + * Optional. If not specified, an ID will be assigned by the service. + * + * Generated from protobuf field string document_id = 3; + * @return string + */ + public function getDocumentId() + { + return $this->document_id; + } + + /** + * The client-assigned document ID to use for this document. + * Optional. If not specified, an ID will be assigned by the service. + * + * Generated from protobuf field string document_id = 3; + * @param string $var + * @return $this + */ + public function setDocumentId($var) + { + GPBUtil::checkString($var, True); + $this->document_id = $var; + + return $this; + } + + /** + * Required. The document to create. `name` must not be set. + * + * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. The document to create. `name` must not be set. + * + * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getMask() + { + return $this->mask; + } + + public function hasMask() + { + return isset($this->mask); + } + + public function clearMask() + { + unset($this->mask); + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php new file mode 100644 index 000000000000..9fdaf73c3abe --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php @@ -0,0 +1,113 @@ +google.firestore.v1.Cursor + */ +class Cursor extends \Google\Protobuf\Internal\Message +{ + /** + * The values that represent a position, in the order they appear in + * the order by clause of a query. + * Can contain fewer values than specified in the order by clause. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + */ + private $values; + /** + * If the position is just before or just after the given values, relative + * to the sort order defined by the query. + * + * Generated from protobuf field bool before = 2; + */ + protected $before = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $values + * The values that represent a position, in the order they appear in + * the order by clause of a query. + * Can contain fewer values than specified in the order by clause. + * @type bool $before + * If the position is just before or just after the given values, relative + * to the sort order defined by the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The values that represent a position, in the order they appear in + * the order by clause of a query. + * Can contain fewer values than specified in the order by clause. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * The values that represent a position, in the order they appear in + * the order by clause of a query. + * Can contain fewer values than specified in the order by clause. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + * @param array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->values = $arr; + + return $this; + } + + /** + * If the position is just before or just after the given values, relative + * to the sort order defined by the query. + * + * Generated from protobuf field bool before = 2; + * @return bool + */ + public function getBefore() + { + return $this->before; + } + + /** + * If the position is just before or just after the given values, relative + * to the sort order defined by the query. + * + * Generated from protobuf field bool before = 2; + * @param bool $var + * @return $this + */ + public function setBefore($var) + { + GPBUtil::checkBool($var); + $this->before = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php new file mode 100644 index 000000000000..002abf75057a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php @@ -0,0 +1,119 @@ +google.firestore.v1.DeleteDocumentRequest + */ +class DeleteDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; + */ + protected $current_document = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type \Google\Cloud\Firestore\V1\Precondition $current_document + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * 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; + } + + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; + * @return \Google\Cloud\Firestore\V1\Precondition|null + */ + public function getCurrentDocument() + { + return $this->current_document; + } + + public function hasCurrentDocument() + { + return isset($this->current_document); + } + + public function clearCurrentDocument() + { + unset($this->current_document); + } + + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; + * @param \Google\Cloud\Firestore\V1\Precondition $var + * @return $this + */ + public function setCurrentDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); + $this->current_document = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php new file mode 100644 index 000000000000..1f6e4882c287 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php @@ -0,0 +1,290 @@ +google.firestore.v1.Document + */ +class Document extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The document's fields. + * The map keys represent field names. + * A simple field name contains only characters `a` to `z`, `A` to `Z`, + * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + * `foo_bar_17`. + * Field names matching the regular expression `__.*__` are reserved. Reserved + * field names are forbidden except in certain documented contexts. The map + * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be + * empty. + * Field paths may be used in other contexts to refer to structured fields + * defined here. For `map_value`, the field path is represented by the simple + * or quoted field names of the containing fields, delimited by `.`. For + * example, the structured field + * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be + * represented by the field path `foo.x&y`. + * Within a field path, a quoted field name starts and ends with `` ` `` and + * may contain any character. Some characters, including `` ` ``, must be + * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + * `` `bak\`tik` `` represents `` bak`tik ``. + * + * Generated from protobuf field map fields = 2; + */ + private $fields; + /** + * Output only. The time at which the document was created. + * This value increases monotonically when a document is deleted then + * recreated. It can also be compared to values from other documents and + * the `read_time` of a query. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + /** + * Output only. The time at which the document was last changed. + * This value is initially set to the `create_time` then increases + * monotonically with each change to the document. It can also be + * compared to values from other documents and the `read_time` of a query. + * + * 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 string $name + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type array|\Google\Protobuf\Internal\MapField $fields + * The document's fields. + * The map keys represent field names. + * A simple field name contains only characters `a` to `z`, `A` to `Z`, + * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + * `foo_bar_17`. + * Field names matching the regular expression `__.*__` are reserved. Reserved + * field names are forbidden except in certain documented contexts. The map + * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be + * empty. + * Field paths may be used in other contexts to refer to structured fields + * defined here. For `map_value`, the field path is represented by the simple + * or quoted field names of the containing fields, delimited by `.`. For + * example, the structured field + * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be + * represented by the field path `foo.x&y`. + * Within a field path, a quoted field name starts and ends with `` ` `` and + * may contain any character. Some characters, including `` ` ``, must be + * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + * `` `bak\`tik` `` represents `` bak`tik ``. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the document was created. + * This value increases monotonically when a document is deleted then + * recreated. It can also be compared to values from other documents and + * the `read_time` of a query. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which the document was last changed. + * This value is initially set to the `create_time` then increases + * monotonically with each change to the document. It can also be + * compared to values from other documents and the `read_time` of a query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * 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 document's fields. + * The map keys represent field names. + * A simple field name contains only characters `a` to `z`, `A` to `Z`, + * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + * `foo_bar_17`. + * Field names matching the regular expression `__.*__` are reserved. Reserved + * field names are forbidden except in certain documented contexts. The map + * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be + * empty. + * Field paths may be used in other contexts to refer to structured fields + * defined here. For `map_value`, the field path is represented by the simple + * or quoted field names of the containing fields, delimited by `.`. For + * example, the structured field + * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be + * represented by the field path `foo.x&y`. + * Within a field path, a quoted field name starts and ends with `` ` `` and + * may contain any character. Some characters, including `` ` ``, must be + * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + * `` `bak\`tik` `` represents `` bak`tik ``. + * + * Generated from protobuf field map fields = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFields() + { + return $this->fields; + } + + /** + * The document's fields. + * The map keys represent field names. + * A simple field name contains only characters `a` to `z`, `A` to `Z`, + * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + * `foo_bar_17`. + * Field names matching the regular expression `__.*__` are reserved. Reserved + * field names are forbidden except in certain documented contexts. The map + * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be + * empty. + * Field paths may be used in other contexts to refer to structured fields + * defined here. For `map_value`, the field path is represented by the simple + * or quoted field names of the containing fields, delimited by `.`. For + * example, the structured field + * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be + * represented by the field path `foo.x&y`. + * Within a field path, a quoted field name starts and ends with `` ` `` and + * may contain any character. Some characters, including `` ` ``, must be + * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + * `` `bak\`tik` `` represents `` bak`tik ``. + * + * Generated from protobuf field map fields = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->fields = $arr; + + return $this; + } + + /** + * Output only. The time at which the document was created. + * This value increases monotonically when a document is deleted then + * recreated. It can also be compared to values from other documents and + * the `read_time` of a query. + * + * 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); + } + + /** + * Output only. The time at which the document was created. + * This value increases monotonically when a document is deleted then + * recreated. It can also be compared to values from other documents and + * the `read_time` of a query. + * + * 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; + } + + /** + * Output only. The time at which the document was last changed. + * This value is initially set to the `create_time` then increases + * monotonically with each change to the document. It can also be + * compared to values from other documents and the `read_time` of a query. + * + * 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); + } + + /** + * Output only. The time at which the document was last changed. + * This value is initially set to the `create_time` then increases + * monotonically with each change to the document. It can also be + * compared to values from other documents and the `read_time` of a query. + * + * 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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php new file mode 100644 index 000000000000..ea12e6ce6664 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php @@ -0,0 +1,153 @@ +google.firestore.v1.DocumentChange + */ +class DocumentChange extends \Google\Protobuf\Internal\Message +{ + /** + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + */ + protected $document = null; + /** + * A set of target IDs of targets that match this document. + * + * Generated from protobuf field repeated int32 target_ids = 5; + */ + private $target_ids; + /** + * A set of target IDs for targets that no longer match this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + */ + private $removed_target_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Document $document + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + * @type array|\Google\Protobuf\Internal\RepeatedField $target_ids + * A set of target IDs of targets that match this document. + * @type array|\Google\Protobuf\Internal\RepeatedField $removed_target_ids + * A set of target IDs for targets that no longer match this document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * A set of target IDs of targets that match this document. + * + * Generated from protobuf field repeated int32 target_ids = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetIds() + { + return $this->target_ids; + } + + /** + * A set of target IDs of targets that match this document. + * + * Generated from protobuf field repeated int32 target_ids = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->target_ids = $arr; + + return $this; + } + + /** + * A set of target IDs for targets that no longer match this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRemovedTargetIds() + { + return $this->removed_target_ids; + } + + /** + * A set of target IDs for targets that no longer match this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRemovedTargetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->removed_target_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php new file mode 100644 index 000000000000..b66a218c48f2 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php @@ -0,0 +1,153 @@ +google.firestore.v1.DocumentDelete + */ +class DocumentDelete extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the [Document][google.firestore.v1.Document] that was deleted. + * + * Generated from protobuf field string document = 1; + */ + protected $document = ''; + /** + * A set of target IDs for targets that previously matched this entity. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + */ + private $removed_target_ids; + /** + * The read timestamp at which the delete was observed. + * Greater or equal to the `commit_time` of the delete. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + */ + protected $read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $document + * The resource name of the [Document][google.firestore.v1.Document] that was deleted. + * @type array|\Google\Protobuf\Internal\RepeatedField $removed_target_ids + * A set of target IDs for targets that previously matched this entity. + * @type \Google\Protobuf\Timestamp $read_time + * The read timestamp at which the delete was observed. + * Greater or equal to the `commit_time` of the delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the [Document][google.firestore.v1.Document] that was deleted. + * + * Generated from protobuf field string document = 1; + * @return string + */ + public function getDocument() + { + return $this->document; + } + + /** + * The resource name of the [Document][google.firestore.v1.Document] that was deleted. + * + * Generated from protobuf field string document = 1; + * @param string $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkString($var, True); + $this->document = $var; + + return $this; + } + + /** + * A set of target IDs for targets that previously matched this entity. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRemovedTargetIds() + { + return $this->removed_target_ids; + } + + /** + * A set of target IDs for targets that previously matched this entity. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRemovedTargetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->removed_target_ids = $arr; + + return $this; + } + + /** + * The read timestamp at which the delete was observed. + * Greater or equal to the `commit_time` of the delete. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The read timestamp at which the delete was observed. + * Greater or equal to the `commit_time` of the delete. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php new file mode 100644 index 000000000000..94c260c4f2db --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php @@ -0,0 +1,75 @@ +google.firestore.v1.DocumentMask + */ +class DocumentMask extends \Google\Protobuf\Internal\Message +{ + /** + * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + * + * Generated from protobuf field repeated string field_paths = 1; + */ + private $field_paths; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $field_paths + * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + * + * Generated from protobuf field repeated string field_paths = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFieldPaths() + { + return $this->field_paths; + } + + /** + * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field + * path syntax reference. + * + * Generated from protobuf field repeated string field_paths = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFieldPaths($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->field_paths = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php new file mode 100644 index 000000000000..28153eaf4cc1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php @@ -0,0 +1,154 @@ +google.firestore.v1.DocumentRemove + */ +class DocumentRemove extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view. + * + * Generated from protobuf field string document = 1; + */ + protected $document = ''; + /** + * A set of target IDs for targets that previously matched this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 2; + */ + private $removed_target_ids; + /** + * The read timestamp at which the remove was observed. + * Greater or equal to the `commit_time` of the change/delete/remove. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + */ + protected $read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $document + * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view. + * @type array|\Google\Protobuf\Internal\RepeatedField $removed_target_ids + * A set of target IDs for targets that previously matched this document. + * @type \Google\Protobuf\Timestamp $read_time + * The read timestamp at which the remove was observed. + * Greater or equal to the `commit_time` of the change/delete/remove. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view. + * + * Generated from protobuf field string document = 1; + * @return string + */ + public function getDocument() + { + return $this->document; + } + + /** + * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view. + * + * Generated from protobuf field string document = 1; + * @param string $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkString($var, True); + $this->document = $var; + + return $this; + } + + /** + * A set of target IDs for targets that previously matched this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRemovedTargetIds() + { + return $this->removed_target_ids; + } + + /** + * A set of target IDs for targets that previously matched this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRemovedTargetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->removed_target_ids = $arr; + + return $this; + } + + /** + * The read timestamp at which the remove was observed. + * Greater or equal to the `commit_time` of the change/delete/remove. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The read timestamp at which the remove was observed. + * Greater or equal to the `commit_time` of the change/delete/remove. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php new file mode 100644 index 000000000000..05828bedba2f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php @@ -0,0 +1,109 @@ +google.firestore.v1.DocumentTransform + */ +class DocumentTransform extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the document to transform. + * + * Generated from protobuf field string document = 1; + */ + protected $document = ''; + /** + * The list of transformations to apply to the fields of the document, in + * order. + * This must not be empty. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; + */ + private $field_transforms; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $document + * The name of the document to transform. + * @type array<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform>|\Google\Protobuf\Internal\RepeatedField $field_transforms + * The list of transformations to apply to the fields of the document, in + * order. + * This must not be empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The name of the document to transform. + * + * Generated from protobuf field string document = 1; + * @return string + */ + public function getDocument() + { + return $this->document; + } + + /** + * The name of the document to transform. + * + * Generated from protobuf field string document = 1; + * @param string $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkString($var, True); + $this->document = $var; + + return $this; + } + + /** + * The list of transformations to apply to the fields of the document, in + * order. + * This must not be empty. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFieldTransforms() + { + return $this->field_transforms; + } + + /** + * The list of transformations to apply to the fields of the document, in + * order. + * This must not be empty. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; + * @param array<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFieldTransforms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform::class); + $this->field_transforms = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php new file mode 100644 index 000000000000..22e3188a208b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php @@ -0,0 +1,413 @@ +google.firestore.v1.DocumentTransform.FieldTransform + */ +class FieldTransform extends \Google\Protobuf\Internal\Message +{ + /** + * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax + * reference. + * + * Generated from protobuf field string field_path = 1; + */ + protected $field_path = ''; + protected $transform_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_path + * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax + * reference. + * @type int $set_to_server_value + * Sets the field to the given server value. + * @type \Google\Cloud\Firestore\V1\Value $increment + * Adds the given value to the field's current value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If either of the given value or the current field value are doubles, + * both values will be interpreted as doubles. Double arithmetic and + * representation of double values follow IEEE 754 semantics. + * If there is positive/negative integer overflow, the field is resolved + * to the largest magnitude positive/negative integer. + * @type \Google\Cloud\Firestore\V1\Value $maximum + * Sets the field to the maximum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If a maximum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the larger operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and + * zero input value is always the stored value. + * The maximum of any numeric value x and NaN is NaN. + * @type \Google\Cloud\Firestore\V1\Value $minimum + * Sets the field to the minimum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the input value. + * If a minimum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the smaller operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and + * zero input value is always the stored value. + * The minimum of any numeric value x and NaN is NaN. + * @type \Google\Cloud\Firestore\V1\ArrayValue $append_missing_elements + * Append the given elements in order if they are not already present in + * the current field value. + * If the field is not an array, or if the field does not yet exist, it is + * first set to the empty array. + * Equivalent numbers of different types (e.g. 3L and 3.0) are + * considered equal when checking if a value is missing. + * NaN is equal to NaN, and Null is equal to Null. + * If the input contains multiple equivalent values, only the first will + * be considered. + * The corresponding transform_result will be the null value. + * @type \Google\Cloud\Firestore\V1\ArrayValue $remove_all_from_array + * Remove all of the given elements from the array in the field. + * If the field is not an array, or if the field does not yet exist, it is + * set to the empty array. + * Equivalent numbers of the different types (e.g. 3L and 3.0) are + * considered equal when deciding whether an element should be removed. + * NaN is equal to NaN, and Null is equal to Null. + * This will remove all equivalent values if there are duplicates. + * The corresponding transform_result will be the null value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax + * reference. + * + * Generated from protobuf field string field_path = 1; + * @return string + */ + public function getFieldPath() + { + return $this->field_path; + } + + /** + * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax + * reference. + * + * Generated from protobuf field string field_path = 1; + * @param string $var + * @return $this + */ + public function setFieldPath($var) + { + GPBUtil::checkString($var, True); + $this->field_path = $var; + + return $this; + } + + /** + * Sets the field to the given server value. + * + * Generated from protobuf field .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; + * @return int + */ + public function getSetToServerValue() + { + return $this->readOneof(2); + } + + public function hasSetToServerValue() + { + return $this->hasOneof(2); + } + + /** + * Sets the field to the given server value. + * + * Generated from protobuf field .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; + * @param int $var + * @return $this + */ + public function setSetToServerValue($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform\ServerValue::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Adds the given value to the field's current value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If either of the given value or the current field value are doubles, + * both values will be interpreted as doubles. Double arithmetic and + * representation of double values follow IEEE 754 semantics. + * If there is positive/negative integer overflow, the field is resolved + * to the largest magnitude positive/negative integer. + * + * Generated from protobuf field .google.firestore.v1.Value increment = 3; + * @return \Google\Cloud\Firestore\V1\Value|null + */ + public function getIncrement() + { + return $this->readOneof(3); + } + + public function hasIncrement() + { + return $this->hasOneof(3); + } + + /** + * Adds the given value to the field's current value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If either of the given value or the current field value are doubles, + * both values will be interpreted as doubles. Double arithmetic and + * representation of double values follow IEEE 754 semantics. + * If there is positive/negative integer overflow, the field is resolved + * to the largest magnitude positive/negative integer. + * + * Generated from protobuf field .google.firestore.v1.Value increment = 3; + * @param \Google\Cloud\Firestore\V1\Value $var + * @return $this + */ + public function setIncrement($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Sets the field to the maximum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If a maximum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the larger operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and + * zero input value is always the stored value. + * The maximum of any numeric value x and NaN is NaN. + * + * Generated from protobuf field .google.firestore.v1.Value maximum = 4; + * @return \Google\Cloud\Firestore\V1\Value|null + */ + public function getMaximum() + { + return $this->readOneof(4); + } + + public function hasMaximum() + { + return $this->hasOneof(4); + } + + /** + * Sets the field to the maximum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If a maximum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the larger operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and + * zero input value is always the stored value. + * The maximum of any numeric value x and NaN is NaN. + * + * Generated from protobuf field .google.firestore.v1.Value maximum = 4; + * @param \Google\Cloud\Firestore\V1\Value $var + * @return $this + */ + public function setMaximum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Sets the field to the minimum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the input value. + * If a minimum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the smaller operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and + * zero input value is always the stored value. + * The minimum of any numeric value x and NaN is NaN. + * + * Generated from protobuf field .google.firestore.v1.Value minimum = 5; + * @return \Google\Cloud\Firestore\V1\Value|null + */ + public function getMinimum() + { + return $this->readOneof(5); + } + + public function hasMinimum() + { + return $this->hasOneof(5); + } + + /** + * Sets the field to the minimum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the input value. + * If a minimum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the smaller operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and + * zero input value is always the stored value. + * The minimum of any numeric value x and NaN is NaN. + * + * Generated from protobuf field .google.firestore.v1.Value minimum = 5; + * @param \Google\Cloud\Firestore\V1\Value $var + * @return $this + */ + public function setMinimum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Append the given elements in order if they are not already present in + * the current field value. + * If the field is not an array, or if the field does not yet exist, it is + * first set to the empty array. + * Equivalent numbers of different types (e.g. 3L and 3.0) are + * considered equal when checking if a value is missing. + * NaN is equal to NaN, and Null is equal to Null. + * If the input contains multiple equivalent values, only the first will + * be considered. + * The corresponding transform_result will be the null value. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue append_missing_elements = 6; + * @return \Google\Cloud\Firestore\V1\ArrayValue|null + */ + public function getAppendMissingElements() + { + return $this->readOneof(6); + } + + public function hasAppendMissingElements() + { + return $this->hasOneof(6); + } + + /** + * Append the given elements in order if they are not already present in + * the current field value. + * If the field is not an array, or if the field does not yet exist, it is + * first set to the empty array. + * Equivalent numbers of different types (e.g. 3L and 3.0) are + * considered equal when checking if a value is missing. + * NaN is equal to NaN, and Null is equal to Null. + * If the input contains multiple equivalent values, only the first will + * be considered. + * The corresponding transform_result will be the null value. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue append_missing_elements = 6; + * @param \Google\Cloud\Firestore\V1\ArrayValue $var + * @return $this + */ + public function setAppendMissingElements($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Remove all of the given elements from the array in the field. + * If the field is not an array, or if the field does not yet exist, it is + * set to the empty array. + * Equivalent numbers of the different types (e.g. 3L and 3.0) are + * considered equal when deciding whether an element should be removed. + * NaN is equal to NaN, and Null is equal to Null. + * This will remove all equivalent values if there are duplicates. + * The corresponding transform_result will be the null value. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue remove_all_from_array = 7; + * @return \Google\Cloud\Firestore\V1\ArrayValue|null + */ + public function getRemoveAllFromArray() + { + return $this->readOneof(7); + } + + public function hasRemoveAllFromArray() + { + return $this->hasOneof(7); + } + + /** + * Remove all of the given elements from the array in the field. + * If the field is not an array, or if the field does not yet exist, it is + * set to the empty array. + * Equivalent numbers of the different types (e.g. 3L and 3.0) are + * considered equal when deciding whether an element should be removed. + * NaN is equal to NaN, and Null is equal to Null. + * This will remove all equivalent values if there are duplicates. + * The corresponding transform_result will be the null value. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue remove_all_from_array = 7; + * @param \Google\Cloud\Firestore\V1\ArrayValue $var + * @return $this + */ + public function setRemoveAllFromArray($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getTransformType() + { + return $this->whichOneof("transform_type"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FieldTransform::class, \Google\Cloud\Firestore\V1\DocumentTransform_FieldTransform::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php new file mode 100644 index 000000000000..47d3356c025d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php @@ -0,0 +1,59 @@ +google.firestore.v1.DocumentTransform.FieldTransform.ServerValue + */ +class ServerValue +{ + /** + * Unspecified. This value must not be used. + * + * Generated from protobuf enum SERVER_VALUE_UNSPECIFIED = 0; + */ + const SERVER_VALUE_UNSPECIFIED = 0; + /** + * The time at which the server processed the request, with millisecond + * precision. If used on multiple fields (same or different documents) in + * a transaction, all the fields will get the same server timestamp. + * + * Generated from protobuf enum REQUEST_TIME = 1; + */ + const REQUEST_TIME = 1; + + private static $valueToName = [ + self::SERVER_VALUE_UNSPECIFIED => 'SERVER_VALUE_UNSPECIFIED', + self::REQUEST_TIME => 'REQUEST_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(ServerValue::class, \Google\Cloud\Firestore\V1\DocumentTransform_FieldTransform_ServerValue::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform_FieldTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform_FieldTransform.php new file mode 100644 index 000000000000..3dcdd419d300 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform_FieldTransform.php @@ -0,0 +1,16 @@ +google.firestore.v1.ExistenceFilter + */ +class ExistenceFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The target ID to which this filter applies. + * + * Generated from protobuf field int32 target_id = 1; + */ + protected $target_id = 0; + /** + * The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id]. + * If different from the count of documents in the client that match, the + * client must manually determine which documents no longer match the target. + * + * Generated from protobuf field int32 count = 2; + */ + protected $count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $target_id + * The target ID to which this filter applies. + * @type int $count + * The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id]. + * If different from the count of documents in the client that match, the + * client must manually determine which documents no longer match the target. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The target ID to which this filter applies. + * + * Generated from protobuf field int32 target_id = 1; + * @return int + */ + public function getTargetId() + { + return $this->target_id; + } + + /** + * The target ID to which this filter applies. + * + * Generated from protobuf field int32 target_id = 1; + * @param int $var + * @return $this + */ + public function setTargetId($var) + { + GPBUtil::checkInt32($var); + $this->target_id = $var; + + return $this; + } + + /** + * The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id]. + * If different from the count of documents in the client that match, the + * client must manually determine which documents no longer match the target. + * + * Generated from protobuf field int32 count = 2; + * @return int + */ + public function getCount() + { + return $this->count; + } + + /** + * The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id]. + * If different from the count of documents in the client that match, the + * client must manually determine which documents no longer match the target. + * + * Generated from protobuf field int32 count = 2; + * @param int $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt32($var); + $this->count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/FirestoreGrpcClient.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/FirestoreGrpcClient.php new file mode 100644 index 000000000000..1ddafc4945ff --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/FirestoreGrpcClient.php @@ -0,0 +1,302 @@ +_simpleRequest('/google.firestore.v1.Firestore/GetDocument', + $argument, + ['\Google\Cloud\Firestore\V1\Document', 'decode'], + $metadata, $options); + } + + /** + * Lists documents. + * @param \Google\Cloud\Firestore\V1\ListDocumentsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListDocuments(\Google\Cloud\Firestore\V1\ListDocumentsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.v1.Firestore/ListDocuments', + $argument, + ['\Google\Cloud\Firestore\V1\ListDocumentsResponse', 'decode'], + $metadata, $options); + } + + /** + * Updates or inserts a document. + * @param \Google\Cloud\Firestore\V1\UpdateDocumentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateDocument(\Google\Cloud\Firestore\V1\UpdateDocumentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.v1.Firestore/UpdateDocument', + $argument, + ['\Google\Cloud\Firestore\V1\Document', 'decode'], + $metadata, $options); + } + + /** + * Deletes a document. + * @param \Google\Cloud\Firestore\V1\DeleteDocumentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteDocument(\Google\Cloud\Firestore\V1\DeleteDocumentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.v1.Firestore/DeleteDocument', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Gets multiple documents. + * + * Documents returned by this method are not guaranteed to be returned in the + * same order that they were requested. + * @param \Google\Cloud\Firestore\V1\BatchGetDocumentsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\ServerStreamingCall + */ + public function BatchGetDocuments(\Google\Cloud\Firestore\V1\BatchGetDocumentsRequest $argument, + $metadata = [], $options = []) { + return $this->_serverStreamRequest('/google.firestore.v1.Firestore/BatchGetDocuments', + $argument, + ['\Google\Cloud\Firestore\V1\BatchGetDocumentsResponse', 'decode'], + $metadata, $options); + } + + /** + * Starts a new transaction. + * @param \Google\Cloud\Firestore\V1\BeginTransactionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function BeginTransaction(\Google\Cloud\Firestore\V1\BeginTransactionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.v1.Firestore/BeginTransaction', + $argument, + ['\Google\Cloud\Firestore\V1\BeginTransactionResponse', 'decode'], + $metadata, $options); + } + + /** + * Commits a transaction, while optionally updating documents. + * @param \Google\Cloud\Firestore\V1\CommitRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function Commit(\Google\Cloud\Firestore\V1\CommitRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.v1.Firestore/Commit', + $argument, + ['\Google\Cloud\Firestore\V1\CommitResponse', 'decode'], + $metadata, $options); + } + + /** + * Rolls back a transaction. + * @param \Google\Cloud\Firestore\V1\RollbackRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function Rollback(\Google\Cloud\Firestore\V1\RollbackRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.v1.Firestore/Rollback', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Runs a query. + * @param \Google\Cloud\Firestore\V1\RunQueryRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\ServerStreamingCall + */ + public function RunQuery(\Google\Cloud\Firestore\V1\RunQueryRequest $argument, + $metadata = [], $options = []) { + return $this->_serverStreamRequest('/google.firestore.v1.Firestore/RunQuery', + $argument, + ['\Google\Cloud\Firestore\V1\RunQueryResponse', 'decode'], + $metadata, $options); + } + + /** + * Runs an aggregation query. + * + * Rather than producing [Document][google.firestore.v1.Document] results like [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], + * this API allows running an aggregation to produce a series of + * [AggregationResult][google.firestore.v1.AggregationResult] server-side. + * + * High-Level Example: + * + * ``` + * -- Return the number of documents in table given a filter. + * SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); + * ``` + * @param \Google\Cloud\Firestore\V1\RunAggregationQueryRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\ServerStreamingCall + */ + public function RunAggregationQuery(\Google\Cloud\Firestore\V1\RunAggregationQueryRequest $argument, + $metadata = [], $options = []) { + return $this->_serverStreamRequest('/google.firestore.v1.Firestore/RunAggregationQuery', + $argument, + ['\Google\Cloud\Firestore\V1\RunAggregationQueryResponse', 'decode'], + $metadata, $options); + } + + /** + * Partitions a query by returning partition cursors that can be used to run + * the query in parallel. The returned partition cursors are split points that + * can be used by RunQuery as starting/end points for the query results. + * @param \Google\Cloud\Firestore\V1\PartitionQueryRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function PartitionQuery(\Google\Cloud\Firestore\V1\PartitionQueryRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.v1.Firestore/PartitionQuery', + $argument, + ['\Google\Cloud\Firestore\V1\PartitionQueryResponse', 'decode'], + $metadata, $options); + } + + /** + * Streams batches of document updates and deletes, in order. + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\BidiStreamingCall + */ + public function Write($metadata = [], $options = []) { + return $this->_bidiRequest('/google.firestore.v1.Firestore/Write', + ['\Google\Cloud\Firestore\V1\WriteResponse','decode'], + $metadata, $options); + } + + /** + * Listens to changes. + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\BidiStreamingCall + */ + public function Listen($metadata = [], $options = []) { + return $this->_bidiRequest('/google.firestore.v1.Firestore/Listen', + ['\Google\Cloud\Firestore\V1\ListenResponse','decode'], + $metadata, $options); + } + + /** + * Lists all the collection IDs underneath a document. + * @param \Google\Cloud\Firestore\V1\ListCollectionIdsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListCollectionIds(\Google\Cloud\Firestore\V1\ListCollectionIdsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.v1.Firestore/ListCollectionIds', + $argument, + ['\Google\Cloud\Firestore\V1\ListCollectionIdsResponse', 'decode'], + $metadata, $options); + } + + /** + * Applies a batch of write operations. + * + * The BatchWrite method does not apply the write operations atomically + * and can apply them out of order. Method does not allow more than one write + * per document. Each write succeeds or fails independently. See the + * [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the success status of each write. + * + * If you require an atomically applied set of writes, use + * [Commit][google.firestore.v1.Firestore.Commit] instead. + * @param \Google\Cloud\Firestore\V1\BatchWriteRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function BatchWrite(\Google\Cloud\Firestore\V1\BatchWriteRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.v1.Firestore/BatchWrite', + $argument, + ['\Google\Cloud\Firestore\V1\BatchWriteResponse', 'decode'], + $metadata, $options); + } + + /** + * Creates a new document. + * @param \Google\Cloud\Firestore\V1\CreateDocumentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateDocument(\Google\Cloud\Firestore\V1\CreateDocumentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.firestore.v1.Firestore/CreateDocument', + $argument, + ['\Google\Cloud\Firestore\V1\Document', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php new file mode 100644 index 000000000000..2f8bc68bdd42 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php @@ -0,0 +1,201 @@ +google.firestore.v1.GetDocumentRequest + */ +class GetDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Document to get. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; + */ + protected $mask = null; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Document to get. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type \Google\Cloud\Firestore\V1\DocumentMask $mask + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * @type string $transaction + * Reads the document in a transaction. + * @type \Google\Protobuf\Timestamp $read_time + * Reads the version of the document at the given time. + * This may not be older than 270 seconds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Document to get. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Document to get. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * 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 fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getMask() + { + return $this->mask; + } + + public function hasMask() + { + return isset($this->mask); + } + + public function clearMask() + { + unset($this->mask); + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->mask = $var; + + return $this; + } + + /** + * Reads the document in a transaction. + * + * Generated from protobuf field bytes transaction = 3; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(3); + } + + public function hasTransaction() + { + return $this->hasOneof(3); + } + + /** + * Reads the document in a transaction. + * + * Generated from protobuf field bytes transaction = 3; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Reads the version of the document at the given time. + * This may not be older than 270 seconds. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(5); + } + + public function hasReadTime() + { + return $this->hasOneof(5); + } + + /** + * Reads the version of the document at the given time. + * This may not be older than 270 seconds. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php new file mode 100644 index 000000000000..52047a9471ff --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php @@ -0,0 +1,196 @@ +google.firestore.v1.ListCollectionIdsRequest + */ +class ListCollectionIdsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * The maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token. Must be a value from + * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @type int $page_size + * The maximum number of results to return. + * @type string $page_token + * A page token. Must be a value from + * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * 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; + } + + /** + * 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 page token. Must be a value from + * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token. Must be a value from + * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. + * + * 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; + } + + /** + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(4); + } + + public function hasReadTime() + { + return $this->hasOneof(4); + } + + /** + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php new file mode 100644 index 000000000000..463aaf3628b9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php @@ -0,0 +1,101 @@ +google.firestore.v1.ListCollectionIdsResponse + */ +class ListCollectionIdsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The collection ids. + * + * Generated from protobuf field repeated string collection_ids = 1; + */ + private $collection_ids; + /** + * A page token that may be used to continue the list. + * + * 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\Protobuf\Internal\RepeatedField $collection_ids + * The collection ids. + * @type string $next_page_token + * A page token that may be used to continue the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The collection ids. + * + * Generated from protobuf field repeated string collection_ids = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * The collection ids. + * + * Generated from protobuf field repeated string collection_ids = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * A page token that may be used to continue the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A page token that may be used to continue 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; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php new file mode 100644 index 000000000000..ca96eb548349 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php @@ -0,0 +1,411 @@ +google.firestore.v1.ListDocumentsRequest + */ +class ListDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` + * or `messages`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $collection_id = ''; + /** + * The maximum number of documents to return. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * The `next_page_token` value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + /** + * The order to sort results by. For example: `priority desc, name`. + * + * Generated from protobuf field string order_by = 6; + */ + protected $order_by = ''; + /** + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7; + */ + protected $mask = null; + /** + * If the list should show missing documents. A missing document is a + * document that does not exist but has sub-documents. These documents will + * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time], + * or [Document.update_time][google.firestore.v1.Document.update_time] set. + * Requests with `show_missing` may not specify `where` or + * `order_by`. + * + * Generated from protobuf field bool show_missing = 12; + */ + protected $show_missing = false; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @type string $collection_id + * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` + * or `messages`. + * @type int $page_size + * The maximum number of documents to return. + * @type string $page_token + * The `next_page_token` value returned from a previous List request, if any. + * @type string $order_by + * The order to sort results by. For example: `priority desc, name`. + * @type \Google\Cloud\Firestore\V1\DocumentMask $mask + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field + * will not be returned in the response. + * @type string $transaction + * Reads documents in a transaction. + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * @type bool $show_missing + * If the list should show missing documents. A missing document is a + * document that does not exist but has sub-documents. These documents will + * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time], + * or [Document.update_time][google.firestore.v1.Document.update_time] set. + * Requests with `show_missing` may not specify `where` or + * `order_by`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * 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. The collection ID, relative to `parent`, to list. For example: `chatrooms` + * or `messages`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCollectionId() + { + return $this->collection_id; + } + + /** + * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` + * or `messages`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCollectionId($var) + { + GPBUtil::checkString($var, True); + $this->collection_id = $var; + + return $this; + } + + /** + * The maximum number of documents to return. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of documents 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; + } + + /** + * The `next_page_token` value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 4; + * @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 = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The order to sort results by. For example: `priority desc, name`. + * + * Generated from protobuf field string order_by = 6; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * The order to sort results by. For example: `priority desc, name`. + * + * 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 fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getMask() + { + return $this->mask; + } + + public function hasMask() + { + return isset($this->mask); + } + + public function clearMask() + { + unset($this->mask); + } + + /** + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->mask = $var; + + return $this; + } + + /** + * Reads documents in a transaction. + * + * Generated from protobuf field bytes transaction = 8; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(8); + } + + public function hasTransaction() + { + return $this->hasOneof(8); + } + + /** + * Reads documents in a transaction. + * + * Generated from protobuf field bytes transaction = 8; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(10); + } + + public function hasReadTime() + { + return $this->hasOneof(10); + } + + /** + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * If the list should show missing documents. A missing document is a + * document that does not exist but has sub-documents. These documents will + * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time], + * or [Document.update_time][google.firestore.v1.Document.update_time] set. + * Requests with `show_missing` may not specify `where` or + * `order_by`. + * + * Generated from protobuf field bool show_missing = 12; + * @return bool + */ + public function getShowMissing() + { + return $this->show_missing; + } + + /** + * If the list should show missing documents. A missing document is a + * document that does not exist but has sub-documents. These documents will + * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time], + * or [Document.update_time][google.firestore.v1.Document.update_time] set. + * Requests with `show_missing` may not specify `where` or + * `order_by`. + * + * Generated from protobuf field bool show_missing = 12; + * @param bool $var + * @return $this + */ + public function setShowMissing($var) + { + GPBUtil::checkBool($var); + $this->show_missing = $var; + + return $this; + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php new file mode 100644 index 000000000000..94f431de0962 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php @@ -0,0 +1,101 @@ +google.firestore.v1.ListDocumentsResponse + */ +class ListDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The Documents found. + * + * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; + */ + private $documents; + /** + * The next 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\Firestore\V1\Document>|\Google\Protobuf\Internal\RepeatedField $documents + * The Documents found. + * @type string $next_page_token + * The next page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The Documents found. + * + * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * The Documents found. + * + * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; + * @param array<\Google\Cloud\Firestore\V1\Document>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Document::class); + $this->documents = $arr; + + return $this; + } + + /** + * The next page token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The next 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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php new file mode 100644 index 000000000000..8fb415f4ed4b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php @@ -0,0 +1,180 @@ +google.firestore.v1.ListenRequest + */ +class ListenRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * Labels associated with this target change. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + protected $target_change; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type \Google\Cloud\Firestore\V1\Target $add_target + * A target to add to this stream. + * @type int $remove_target + * The ID of a target to remove from this stream. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels associated with this target change. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * A target to add to this stream. + * + * Generated from protobuf field .google.firestore.v1.Target add_target = 2; + * @return \Google\Cloud\Firestore\V1\Target|null + */ + public function getAddTarget() + { + return $this->readOneof(2); + } + + public function hasAddTarget() + { + return $this->hasOneof(2); + } + + /** + * A target to add to this stream. + * + * Generated from protobuf field .google.firestore.v1.Target add_target = 2; + * @param \Google\Cloud\Firestore\V1\Target $var + * @return $this + */ + public function setAddTarget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The ID of a target to remove from this stream. + * + * Generated from protobuf field int32 remove_target = 3; + * @return int + */ + public function getRemoveTarget() + { + return $this->readOneof(3); + } + + public function hasRemoveTarget() + { + return $this->hasOneof(3); + } + + /** + * The ID of a target to remove from this stream. + * + * Generated from protobuf field int32 remove_target = 3; + * @param int $var + * @return $this + */ + public function setRemoveTarget($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Labels associated with this target change. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels associated with this target change. + * + * 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; + } + + /** + * @return string + */ + public function getTargetChange() + { + return $this->whichOneof("target_change"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php new file mode 100644 index 000000000000..02b8e97a1509 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php @@ -0,0 +1,219 @@ +google.firestore.v1.ListenResponse + */ +class ListenResponse extends \Google\Protobuf\Internal\Message +{ + protected $response_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\TargetChange $target_change + * Targets have changed. + * @type \Google\Cloud\Firestore\V1\DocumentChange $document_change + * A [Document][google.firestore.v1.Document] has changed. + * @type \Google\Cloud\Firestore\V1\DocumentDelete $document_delete + * A [Document][google.firestore.v1.Document] has been deleted. + * @type \Google\Cloud\Firestore\V1\DocumentRemove $document_remove + * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer + * relevant to that target). + * @type \Google\Cloud\Firestore\V1\ExistenceFilter $filter + * A filter to apply to the set of documents previously returned for the + * given target. + * Returned when documents may have been removed from the given target, but + * the exact documents are unknown. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Targets have changed. + * + * Generated from protobuf field .google.firestore.v1.TargetChange target_change = 2; + * @return \Google\Cloud\Firestore\V1\TargetChange|null + */ + public function getTargetChange() + { + return $this->readOneof(2); + } + + public function hasTargetChange() + { + return $this->hasOneof(2); + } + + /** + * Targets have changed. + * + * Generated from protobuf field .google.firestore.v1.TargetChange target_change = 2; + * @param \Google\Cloud\Firestore\V1\TargetChange $var + * @return $this + */ + public function setTargetChange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TargetChange::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A [Document][google.firestore.v1.Document] has changed. + * + * Generated from protobuf field .google.firestore.v1.DocumentChange document_change = 3; + * @return \Google\Cloud\Firestore\V1\DocumentChange|null + */ + public function getDocumentChange() + { + return $this->readOneof(3); + } + + public function hasDocumentChange() + { + return $this->hasOneof(3); + } + + /** + * A [Document][google.firestore.v1.Document] has changed. + * + * Generated from protobuf field .google.firestore.v1.DocumentChange document_change = 3; + * @param \Google\Cloud\Firestore\V1\DocumentChange $var + * @return $this + */ + public function setDocumentChange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentChange::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A [Document][google.firestore.v1.Document] has been deleted. + * + * Generated from protobuf field .google.firestore.v1.DocumentDelete document_delete = 4; + * @return \Google\Cloud\Firestore\V1\DocumentDelete|null + */ + public function getDocumentDelete() + { + return $this->readOneof(4); + } + + public function hasDocumentDelete() + { + return $this->hasOneof(4); + } + + /** + * A [Document][google.firestore.v1.Document] has been deleted. + * + * Generated from protobuf field .google.firestore.v1.DocumentDelete document_delete = 4; + * @param \Google\Cloud\Firestore\V1\DocumentDelete $var + * @return $this + */ + public function setDocumentDelete($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentDelete::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer + * relevant to that target). + * + * Generated from protobuf field .google.firestore.v1.DocumentRemove document_remove = 6; + * @return \Google\Cloud\Firestore\V1\DocumentRemove|null + */ + public function getDocumentRemove() + { + return $this->readOneof(6); + } + + public function hasDocumentRemove() + { + return $this->hasOneof(6); + } + + /** + * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer + * relevant to that target). + * + * Generated from protobuf field .google.firestore.v1.DocumentRemove document_remove = 6; + * @param \Google\Cloud\Firestore\V1\DocumentRemove $var + * @return $this + */ + public function setDocumentRemove($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentRemove::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * A filter to apply to the set of documents previously returned for the + * given target. + * Returned when documents may have been removed from the given target, but + * the exact documents are unknown. + * + * Generated from protobuf field .google.firestore.v1.ExistenceFilter filter = 5; + * @return \Google\Cloud\Firestore\V1\ExistenceFilter|null + */ + public function getFilter() + { + return $this->readOneof(5); + } + + public function hasFilter() + { + return $this->hasOneof(5); + } + + /** + * A filter to apply to the set of documents previously returned for the + * given target. + * Returned when documents may have been removed from the given target, but + * the exact documents are unknown. + * + * Generated from protobuf field .google.firestore.v1.ExistenceFilter filter = 5; + * @param \Google\Cloud\Firestore\V1\ExistenceFilter $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExistenceFilter::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getResponseType() + { + return $this->whichOneof("response_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php new file mode 100644 index 000000000000..fa811000207c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php @@ -0,0 +1,83 @@ +google.firestore.v1.MapValue + */ +class MapValue extends \Google\Protobuf\Internal\Message +{ + /** + * The map's fields. + * The map keys represent field names. Field names matching the regular + * expression `__.*__` are reserved. Reserved field names are forbidden except + * in certain documented contexts. The map keys, represented as UTF-8, must + * not exceed 1,500 bytes and cannot be empty. + * + * Generated from protobuf field map fields = 1; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $fields + * The map's fields. + * The map keys represent field names. Field names matching the regular + * expression `__.*__` are reserved. Reserved field names are forbidden except + * in certain documented contexts. The map keys, represented as UTF-8, must + * not exceed 1,500 bytes and cannot be empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The map's fields. + * The map keys represent field names. Field names matching the regular + * expression `__.*__` are reserved. Reserved field names are forbidden except + * in certain documented contexts. The map keys, represented as UTF-8, must + * not exceed 1,500 bytes and cannot be empty. + * + * Generated from protobuf field map fields = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFields() + { + return $this->fields; + } + + /** + * The map's fields. + * The map keys represent field names. Field names matching the regular + * expression `__.*__` are reserved. Reserved field names are forbidden except + * in certain documented contexts. The map keys, represented as UTF-8, must + * not exceed 1,500 bytes and cannot be empty. + * + * Generated from protobuf field map fields = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php new file mode 100644 index 000000000000..58e36b83e877 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php @@ -0,0 +1,357 @@ +google.firestore.v1.PartitionQueryRequest + */ +class PartitionQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents`. + * Document resource names are not supported; only database resource names + * can be specified. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * The desired maximum number of partition points. + * The partitions may be returned across multiple pages of results. + * The number must be positive. The actual number of partitions + * returned may be fewer. + * For example, this may be set to one fewer than the number of parallel + * queries to be run, or in running a data pipeline job, one fewer than the + * number of workers or compute instances available. + * + * Generated from protobuf field int64 partition_count = 3; + */ + protected $partition_count = 0; + /** + * The `next_page_token` value returned from a previous call to + * PartitionQuery that may be used to get an additional set of results. + * There are no ordering guarantees between sets of results. Thus, using + * multiple sets of results will require merging the different result sets. + * For example, two subsequent calls using a page_token may return: + * * cursor B, cursor M, cursor Q + * * cursor A, cursor U, cursor W + * To obtain a complete result set ordered with respect to the results of the + * query supplied to PartitionQuery, the results sets should be merged: + * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + /** + * The maximum number of partitions to return in this call, subject to + * `partition_count`. + * For example, if `partition_count` = 10 and `page_size` = 8, the first call + * to PartitionQuery will return up to 8 partitions and a `next_page_token` + * if more results exist. A second call to PartitionQuery will return up to + * 2 partitions, to complete the total of 10 specified in `partition_count`. + * + * Generated from protobuf field int32 page_size = 5; + */ + protected $page_size = 0; + protected $query_type; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents`. + * Document resource names are not supported; only database resource names + * can be specified. + * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query + * A structured query. + * Query must specify collection with all descendants and be ordered by name + * ascending. Other filters, order bys, limits, offsets, and start/end + * cursors are not supported. + * @type int|string $partition_count + * The desired maximum number of partition points. + * The partitions may be returned across multiple pages of results. + * The number must be positive. The actual number of partitions + * returned may be fewer. + * For example, this may be set to one fewer than the number of parallel + * queries to be run, or in running a data pipeline job, one fewer than the + * number of workers or compute instances available. + * @type string $page_token + * The `next_page_token` value returned from a previous call to + * PartitionQuery that may be used to get an additional set of results. + * There are no ordering guarantees between sets of results. Thus, using + * multiple sets of results will require merging the different result sets. + * For example, two subsequent calls using a page_token may return: + * * cursor B, cursor M, cursor Q + * * cursor A, cursor U, cursor W + * To obtain a complete result set ordered with respect to the results of the + * query supplied to PartitionQuery, the results sets should be merged: + * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + * @type int $page_size + * The maximum number of partitions to return in this call, subject to + * `partition_count`. + * For example, if `partition_count` = 10 and `page_size` = 8, the first call + * to PartitionQuery will return up to 8 partitions and a `next_page_token` + * if more results exist. A second call to PartitionQuery will return up to + * 2 partitions, to complete the total of 10 specified in `partition_count`. + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents`. + * Document resource names are not supported; only database resource names + * can be specified. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents`. + * Document resource names are not supported; only database resource names + * can be specified. + * + * 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; + } + + /** + * A structured query. + * Query must specify collection with all descendants and be ordered by name + * ascending. Other filters, order bys, limits, offsets, and start/end + * cursors are not supported. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @return \Google\Cloud\Firestore\V1\StructuredQuery|null + */ + public function getStructuredQuery() + { + return $this->readOneof(2); + } + + public function hasStructuredQuery() + { + return $this->hasOneof(2); + } + + /** + * A structured query. + * Query must specify collection with all descendants and be ordered by name + * ascending. Other filters, order bys, limits, offsets, and start/end + * cursors are not supported. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery $var + * @return $this + */ + public function setStructuredQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The desired maximum number of partition points. + * The partitions may be returned across multiple pages of results. + * The number must be positive. The actual number of partitions + * returned may be fewer. + * For example, this may be set to one fewer than the number of parallel + * queries to be run, or in running a data pipeline job, one fewer than the + * number of workers or compute instances available. + * + * Generated from protobuf field int64 partition_count = 3; + * @return int|string + */ + public function getPartitionCount() + { + return $this->partition_count; + } + + /** + * The desired maximum number of partition points. + * The partitions may be returned across multiple pages of results. + * The number must be positive. The actual number of partitions + * returned may be fewer. + * For example, this may be set to one fewer than the number of parallel + * queries to be run, or in running a data pipeline job, one fewer than the + * number of workers or compute instances available. + * + * Generated from protobuf field int64 partition_count = 3; + * @param int|string $var + * @return $this + */ + public function setPartitionCount($var) + { + GPBUtil::checkInt64($var); + $this->partition_count = $var; + + return $this; + } + + /** + * The `next_page_token` value returned from a previous call to + * PartitionQuery that may be used to get an additional set of results. + * There are no ordering guarantees between sets of results. Thus, using + * multiple sets of results will require merging the different result sets. + * For example, two subsequent calls using a page_token may return: + * * cursor B, cursor M, cursor Q + * * cursor A, cursor U, cursor W + * To obtain a complete result set ordered with respect to the results of the + * query supplied to PartitionQuery, the results sets should be merged: + * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `next_page_token` value returned from a previous call to + * PartitionQuery that may be used to get an additional set of results. + * There are no ordering guarantees between sets of results. Thus, using + * multiple sets of results will require merging the different result sets. + * For example, two subsequent calls using a page_token may return: + * * cursor B, cursor M, cursor Q + * * cursor A, cursor U, cursor W + * To obtain a complete result set ordered with respect to the results of the + * query supplied to PartitionQuery, the results sets should be merged: + * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + * + * 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; + } + + /** + * The maximum number of partitions to return in this call, subject to + * `partition_count`. + * For example, if `partition_count` = 10 and `page_size` = 8, the first call + * to PartitionQuery will return up to 8 partitions and a `next_page_token` + * if more results exist. A second call to PartitionQuery will return up to + * 2 partitions, to complete the total of 10 specified in `partition_count`. + * + * Generated from protobuf field int32 page_size = 5; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of partitions to return in this call, subject to + * `partition_count`. + * For example, if `partition_count` = 10 and `page_size` = 8, the first call + * to PartitionQuery will return up to 8 partitions and a `next_page_token` + * if more results exist. A second call to PartitionQuery will return up to + * 2 partitions, to complete the total of 10 specified in `partition_count`. + * + * 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; + } + + /** + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(6); + } + + public function hasReadTime() + { + return $this->hasOneof(6); + } + + /** + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getQueryType() + { + return $this->whichOneof("query_type"); + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php new file mode 100644 index 000000000000..5fd31af71a8c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php @@ -0,0 +1,161 @@ +google.firestore.v1.PartitionQueryResponse + */ +class PartitionQueryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Partition results. + * Each partition is a split point that can be used by RunQuery as a starting + * or end point for the query results. The RunQuery requests must be made with + * the same query supplied to this PartitionQuery request. The partition + * cursors will be ordered according to same ordering as the results of the + * query supplied to PartitionQuery. + * For example, if a PartitionQuery request returns partition cursors A and B, + * running the following three queries will return the entire result set of + * the original query: + * * query, end_at A + * * query, start_at A, end_at B + * * query, start_at B + * An empty result may indicate that the query has too few results to be + * partitioned. + * + * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; + */ + private $partitions; + /** + * A page token that may be used to request an additional set of results, up + * to the number specified by `partition_count` in the PartitionQuery request. + * If blank, 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\Firestore\V1\Cursor>|\Google\Protobuf\Internal\RepeatedField $partitions + * Partition results. + * Each partition is a split point that can be used by RunQuery as a starting + * or end point for the query results. The RunQuery requests must be made with + * the same query supplied to this PartitionQuery request. The partition + * cursors will be ordered according to same ordering as the results of the + * query supplied to PartitionQuery. + * For example, if a PartitionQuery request returns partition cursors A and B, + * running the following three queries will return the entire result set of + * the original query: + * * query, end_at A + * * query, start_at A, end_at B + * * query, start_at B + * An empty result may indicate that the query has too few results to be + * partitioned. + * @type string $next_page_token + * A page token that may be used to request an additional set of results, up + * to the number specified by `partition_count` in the PartitionQuery request. + * If blank, there are no more results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Partition results. + * Each partition is a split point that can be used by RunQuery as a starting + * or end point for the query results. The RunQuery requests must be made with + * the same query supplied to this PartitionQuery request. The partition + * cursors will be ordered according to same ordering as the results of the + * query supplied to PartitionQuery. + * For example, if a PartitionQuery request returns partition cursors A and B, + * running the following three queries will return the entire result set of + * the original query: + * * query, end_at A + * * query, start_at A, end_at B + * * query, start_at B + * An empty result may indicate that the query has too few results to be + * partitioned. + * + * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPartitions() + { + return $this->partitions; + } + + /** + * Partition results. + * Each partition is a split point that can be used by RunQuery as a starting + * or end point for the query results. The RunQuery requests must be made with + * the same query supplied to this PartitionQuery request. The partition + * cursors will be ordered according to same ordering as the results of the + * query supplied to PartitionQuery. + * For example, if a PartitionQuery request returns partition cursors A and B, + * running the following three queries will return the entire result set of + * the original query: + * * query, end_at A + * * query, start_at A, end_at B + * * query, start_at B + * An empty result may indicate that the query has too few results to be + * partitioned. + * + * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; + * @param array<\Google\Cloud\Firestore\V1\Cursor>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPartitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Cursor::class); + $this->partitions = $arr; + + return $this; + } + + /** + * A page token that may be used to request an additional set of results, up + * to the number specified by `partition_count` in the PartitionQuery request. + * If blank, 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 page token that may be used to request an additional set of results, up + * to the number specified by `partition_count` in the PartitionQuery request. + * If blank, 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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php new file mode 100644 index 000000000000..7f7b92595750 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php @@ -0,0 +1,114 @@ +google.firestore.v1.Precondition + */ +class Precondition extends \Google\Protobuf\Internal\Message +{ + protected $condition_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $exists + * When set to `true`, the target document must exist. + * When set to `false`, the target document must not exist. + * @type \Google\Protobuf\Timestamp $update_time + * When set, the target document must exist and have been last updated at + * that time. Timestamp must be microsecond aligned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * When set to `true`, the target document must exist. + * When set to `false`, the target document must not exist. + * + * Generated from protobuf field bool exists = 1; + * @return bool + */ + public function getExists() + { + return $this->readOneof(1); + } + + public function hasExists() + { + return $this->hasOneof(1); + } + + /** + * When set to `true`, the target document must exist. + * When set to `false`, the target document must not exist. + * + * Generated from protobuf field bool exists = 1; + * @param bool $var + * @return $this + */ + public function setExists($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * When set, the target document must exist and have been last updated at + * that time. Timestamp must be microsecond aligned. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->readOneof(2); + } + + public function hasUpdateTime() + { + return $this->hasOneof(2); + } + + /** + * When set, the target document must exist and have been last updated at + * that time. Timestamp must be microsecond aligned. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getConditionType() + { + return $this->whichOneof("condition_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php new file mode 100644 index 000000000000..219c43b1c73e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php @@ -0,0 +1,105 @@ +google.firestore.v1.RollbackRequest + */ +class RollbackRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * Required. The transaction to roll back. + * + * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $transaction = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type string $transaction + * Required. The transaction to roll back. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Required. The transaction to roll back. + * + * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * Required. The transaction to roll back. + * + * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php new file mode 100644 index 000000000000..6ec92486059a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php @@ -0,0 +1,252 @@ +google.firestore.v1.RunAggregationQueryRequest + */ +class RunAggregationQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + protected $query_type; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery $structured_aggregation_query + * An aggregation query. + * @type string $transaction + * Run the aggregation within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction + * Starts a new transaction as part of the query, defaulting to read-only. + * The new transaction ID will be returned as the first response in the + * stream. + * @type \Google\Protobuf\Timestamp $read_time + * Executes the query at the given timestamp. + * Requires: + * * Cannot be more than 270 seconds in the past. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * 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; + } + + /** + * An aggregation query. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2; + * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery|null + */ + public function getStructuredAggregationQuery() + { + return $this->readOneof(2); + } + + public function hasStructuredAggregationQuery() + { + return $this->hasOneof(2); + } + + /** + * An aggregation query. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2; + * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery $var + * @return $this + */ + public function setStructuredAggregationQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Run the aggregation within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 4; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(4); + } + + public function hasTransaction() + { + return $this->hasOneof(4); + } + + /** + * Run the aggregation within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 4; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Starts a new transaction as part of the query, defaulting to read-only. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; + * @return \Google\Cloud\Firestore\V1\TransactionOptions|null + */ + public function getNewTransaction() + { + return $this->readOneof(5); + } + + public function hasNewTransaction() + { + return $this->hasOneof(5); + } + + /** + * Starts a new transaction as part of the query, defaulting to read-only. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; + * @param \Google\Cloud\Firestore\V1\TransactionOptions $var + * @return $this + */ + public function setNewTransaction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Executes the query at the given timestamp. + * Requires: + * * Cannot be more than 270 seconds in the past. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(6); + } + + public function hasReadTime() + { + return $this->hasOneof(6); + } + + /** + * Executes the query at the given timestamp. + * Requires: + * * Cannot be more than 270 seconds in the past. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getQueryType() + { + return $this->whichOneof("query_type"); + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php new file mode 100644 index 000000000000..ca6a2a768e78 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php @@ -0,0 +1,167 @@ +google.firestore.v1.RunAggregationQueryResponse + */ +class RunAggregationQueryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A single aggregation result. + * Not present when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; + */ + protected $result = null; + /** + * The transaction that was started as part of this request. + * Only present on the first response when the request requested to start + * a new transaction. + * + * Generated from protobuf field bytes transaction = 2; + */ + protected $transaction = ''; + /** + * The time at which the aggregate value is valid for. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + */ + protected $read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\AggregationResult $result + * A single aggregation result. + * Not present when reporting partial progress. + * @type string $transaction + * The transaction that was started as part of this request. + * Only present on the first response when the request requested to start + * a new transaction. + * @type \Google\Protobuf\Timestamp $read_time + * The time at which the aggregate value is valid for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * A single aggregation result. + * Not present when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; + * @return \Google\Cloud\Firestore\V1\AggregationResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * A single aggregation result. + * Not present when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; + * @param \Google\Cloud\Firestore\V1\AggregationResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\AggregationResult::class); + $this->result = $var; + + return $this; + } + + /** + * The transaction that was started as part of this request. + * Only present on the first response when the request requested to start + * a new transaction. + * + * Generated from protobuf field bytes transaction = 2; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * The transaction that was started as part of this request. + * Only present on the first response when the request requested to start + * a new transaction. + * + * Generated from protobuf field bytes transaction = 2; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + + /** + * The time at which the aggregate value is valid for. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The time at which the aggregate value is valid for. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php new file mode 100644 index 000000000000..d92635ba5a86 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php @@ -0,0 +1,252 @@ +google.firestore.v1.RunQueryRequest + */ +class RunQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + protected $query_type; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query + * A structured query. + * @type string $transaction + * Run the query within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * 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; + } + + /** + * A structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @return \Google\Cloud\Firestore\V1\StructuredQuery|null + */ + public function getStructuredQuery() + { + return $this->readOneof(2); + } + + public function hasStructuredQuery() + { + return $this->hasOneof(2); + } + + /** + * A structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery $var + * @return $this + */ + public function setStructuredQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Run the query within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 5; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(5); + } + + public function hasTransaction() + { + return $this->hasOneof(5); + } + + /** + * Run the query within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 5; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; + * @return \Google\Cloud\Firestore\V1\TransactionOptions|null + */ + public function getNewTransaction() + { + return $this->readOneof(6); + } + + public function hasNewTransaction() + { + return $this->hasOneof(6); + } + + /** + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; + * @param \Google\Cloud\Firestore\V1\TransactionOptions $var + * @return $this + */ + public function setNewTransaction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(7); + } + + public function hasReadTime() + { + return $this->hasOneof(7); + } + + /** + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getQueryType() + { + return $this->whichOneof("query_type"); + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php new file mode 100644 index 000000000000..514b2b390210 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php @@ -0,0 +1,270 @@ +google.firestore.v1.RunQueryResponse + */ +class RunQueryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The transaction that was started as part of this request. + * Can only be set in the first response, and only if + * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request. + * If set, no other fields will be set in this response. + * + * Generated from protobuf field bytes transaction = 2; + */ + protected $transaction = ''; + /** + * A query result, not set when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + */ + protected $document = null; + /** + * The time at which the document was read. This may be monotonically + * increasing; in this case, the previous documents in the result stream are + * guaranteed not to have changed between their `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `document` will be sent, and this represents the time at which the query + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + */ + protected $read_time = null; + /** + * The number of results that have been skipped due to an offset between + * the last response and the current response. + * + * Generated from protobuf field int32 skipped_results = 4; + */ + protected $skipped_results = 0; + protected $continuation_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $transaction + * The transaction that was started as part of this request. + * Can only be set in the first response, and only if + * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request. + * If set, no other fields will be set in this response. + * @type \Google\Cloud\Firestore\V1\Document $document + * A query result, not set when reporting partial progress. + * @type \Google\Protobuf\Timestamp $read_time + * The time at which the document was read. This may be monotonically + * increasing; in this case, the previous documents in the result stream are + * guaranteed not to have changed between their `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `document` will be sent, and this represents the time at which the query + * was run. + * @type int $skipped_results + * The number of results that have been skipped due to an offset between + * the last response and the current response. + * @type bool $done + * If present, Firestore has completely finished the request and no more + * documents will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The transaction that was started as part of this request. + * Can only be set in the first response, and only if + * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request. + * If set, no other fields will be set in this response. + * + * Generated from protobuf field bytes transaction = 2; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * The transaction that was started as part of this request. + * Can only be set in the first response, and only if + * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request. + * If set, no other fields will be set in this response. + * + * Generated from protobuf field bytes transaction = 2; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + + /** + * A query result, not set when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * A query result, not set when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The time at which the document was read. This may be monotonically + * increasing; in this case, the previous documents in the result stream are + * guaranteed not to have changed between their `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `document` will be sent, and this represents the time at which the query + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The time at which the document was read. This may be monotonically + * increasing; in this case, the previous documents in the result stream are + * guaranteed not to have changed between their `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `document` will be sent, and this represents the time at which the query + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * The number of results that have been skipped due to an offset between + * the last response and the current response. + * + * Generated from protobuf field int32 skipped_results = 4; + * @return int + */ + public function getSkippedResults() + { + return $this->skipped_results; + } + + /** + * The number of results that have been skipped due to an offset between + * the last response and the current response. + * + * Generated from protobuf field int32 skipped_results = 4; + * @param int $var + * @return $this + */ + public function setSkippedResults($var) + { + GPBUtil::checkInt32($var); + $this->skipped_results = $var; + + return $this; + } + + /** + * If present, Firestore has completely finished the request and no more + * documents will be returned. + * + * Generated from protobuf field bool done = 6; + * @return bool + */ + public function getDone() + { + return $this->readOneof(6); + } + + public function hasDone() + { + return $this->hasOneof(6); + } + + /** + * If present, Firestore has completely finished the request and no more + * documents will be returned. + * + * Generated from protobuf field bool done = 6; + * @param bool $var + * @return $this + */ + public function setDone($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getContinuationSelector() + { + return $this->whichOneof("continuation_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php new file mode 100644 index 000000000000..4da539844083 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php @@ -0,0 +1,117 @@ +google.firestore.v1.StructuredAggregationQuery + */ +class StructuredAggregationQuery extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Series of aggregations to apply over the results of the `structured_query`. + * Requires: + * * A minimum of one and maximum of five aggregations per query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $aggregations; + protected $query_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query + * Nested structured query. + * @type array<\Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation>|\Google\Protobuf\Internal\RepeatedField $aggregations + * Optional. Series of aggregations to apply over the results of the `structured_query`. + * Requires: + * * A minimum of one and maximum of five aggregations per query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * Nested structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery|null + */ + public function getStructuredQuery() + { + return $this->readOneof(1); + } + + public function hasStructuredQuery() + { + return $this->hasOneof(1); + } + + /** + * Nested structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery $var + * @return $this + */ + public function setStructuredQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. Series of aggregations to apply over the results of the `structured_query`. + * Requires: + * * A minimum of one and maximum of five aggregations per query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAggregations() + { + return $this->aggregations; + } + + /** + * Optional. Series of aggregations to apply over the results of the `structured_query`. + * Requires: + * * A minimum of one and maximum of five aggregations per query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAggregations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation::class); + $this->aggregations = $arr; + + return $this; + } + + /** + * @return string + */ + public function getQueryType() + { + return $this->whichOneof("query_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php new file mode 100644 index 000000000000..a2c227df1def --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php @@ -0,0 +1,216 @@ +google.firestore.v1.StructuredAggregationQuery.Aggregation + */ +class Aggregation extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Optional name of the field to store the result of the aggregation into. + * If not provided, Firestore will pick a default name following the format + * `field_`. For example: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2), + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT_UP_TO(4) + * OVER ( + * ... + * ); + * ``` + * becomes: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2) AS field_1, + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT_UP_TO(4) AS field_2 + * OVER ( + * ... + * ); + * ``` + * Requires: + * * Must be unique across all aggregation aliases. + * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. + * + * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $alias = ''; + protected $operator; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count $count + * Count aggregator. + * @type string $alias + * Optional. Optional name of the field to store the result of the aggregation into. + * If not provided, Firestore will pick a default name following the format + * `field_`. For example: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2), + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT_UP_TO(4) + * OVER ( + * ... + * ); + * ``` + * becomes: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2) AS field_1, + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT_UP_TO(4) AS field_2 + * OVER ( + * ... + * ); + * ``` + * Requires: + * * Must be unique across all aggregation aliases. + * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * Count aggregator. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; + * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count|null + */ + public function getCount() + { + return $this->readOneof(1); + } + + public function hasCount() + { + return $this->hasOneof(1); + } + + /** + * Count aggregator. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; + * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. Optional name of the field to store the result of the aggregation into. + * If not provided, Firestore will pick a default name following the format + * `field_`. For example: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2), + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT_UP_TO(4) + * OVER ( + * ... + * ); + * ``` + * becomes: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2) AS field_1, + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT_UP_TO(4) AS field_2 + * OVER ( + * ... + * ); + * ``` + * Requires: + * * Must be unique across all aggregation aliases. + * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. + * + * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAlias() + { + return $this->alias; + } + + /** + * Optional. Optional name of the field to store the result of the aggregation into. + * If not provided, Firestore will pick a default name following the format + * `field_`. For example: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2), + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT_UP_TO(4) + * OVER ( + * ... + * ); + * ``` + * becomes: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2) AS field_1, + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT_UP_TO(4) AS field_2 + * OVER ( + * ... + * ); + * ``` + * Requires: + * * Must be unique across all aggregation aliases. + * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. + * + * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAlias($var) + { + GPBUtil::checkString($var, True); + $this->alias = $var; + + return $this; + } + + /** + * @return string + */ + public function getOperator() + { + return $this->whichOneof("operator"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Aggregation::class, \Google\Cloud\Firestore\V1\StructuredAggregationQuery_Aggregation::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php new file mode 100644 index 000000000000..61869fb14bc7 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php @@ -0,0 +1,163 @@ +google.firestore.v1.StructuredAggregationQuery.Aggregation.Count + */ +class Count extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Optional constraint on the maximum number of documents to count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * + * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $up_to = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int64Value $up_to + * Optional. Optional constraint on the maximum number of documents to count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Optional constraint on the maximum number of documents to count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * + * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getUpTo() + { + return $this->up_to; + } + + public function hasUpTo() + { + return isset($this->up_to); + } + + public function clearUpTo() + { + unset($this->up_to); + } + + /** + * Returns the unboxed value from getUpTo() + + * Optional. Optional constraint on the maximum number of documents to count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * + * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getUpToUnwrapped() + { + return $this->readWrapperValue("up_to"); + } + + /** + * Optional. Optional constraint on the maximum number of documents to count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * + * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setUpTo($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->up_to = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. Optional constraint on the maximum number of documents to count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * + * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setUpToUnwrapped($var) + { + $this->writeWrapperValue("up_to", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Count::class, \Google\Cloud\Firestore\V1\StructuredAggregationQuery_Aggregation_Count::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery_Aggregation.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery_Aggregation.php new file mode 100644 index 000000000000..39b5ca29dbb8 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery_Aggregation.php @@ -0,0 +1,16 @@ +google.firestore.v1.StructuredQuery + */ +class StructuredQuery extends \Google\Protobuf\Internal\Message +{ + /** + * The projection to return. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; + */ + protected $select = null; + /** + * The collections to query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; + */ + private $from; + /** + * The filter to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; + */ + protected $where = null; + /** + * The order to apply to the query results. + * Firestore allows callers to provide a full ordering, a partial ordering, or + * no ordering at all. In all cases, Firestore guarantees a stable ordering + * through the following rules: + * * The `order_by` is required to reference all fields used with an + * inequality filter. + * * All fields that are required to be in the `order_by` but are not already + * present are appended in lexicographical ordering of the field name. + * * If an order on `__name__` is not specified, it is appended by default. + * Fields are appended with the same sort direction as the last order + * specified, or 'ASCENDING' if no order was specified. For example: + * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` + * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` + * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` + * * `WHERE __name__ > ... AND a > 1` becomes + * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; + */ + private $order_by; + /** + * A potential prefix of a position in the result set to start the query at. + * The ordering of the result set is based on the `ORDER BY` clause of the + * original query. + * ``` + * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; + * ``` + * This query's results are ordered by `(b ASC, __name__ ASC)`. + * Cursors can reference either the full ordering or a prefix of the location, + * though it cannot reference more fields than what are in the provided + * `ORDER BY`. + * Continuing off the example above, attaching the following start cursors + * will have varying impact: + * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND + * b > 2 AND __name__ > /k/123`. + * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. + * Unlike `OFFSET` which requires scanning over the first N results to skip, + * a start cursor allows the query to begin at a logical position. This + * position is not required to match an actual result, it will scan forward + * from this position to find the next document. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; + */ + protected $start_at = null; + /** + * A potential prefix of a position in the result set to end the query at. + * This is similar to `START_AT` but with it controlling the end position + * rather than the start position. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; + */ + protected $end_at = null; + /** + * The number of documents to skip before returning the first result. + * This applies after the constraints specified by the `WHERE`, `START AT`, & + * `END AT` but before the `LIMIT` clause. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field int32 offset = 6; + */ + protected $offset = 0; + /** + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 5; + */ + protected $limit = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\Projection $select + * The projection to return. + * @type array<\Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector>|\Google\Protobuf\Internal\RepeatedField $from + * The collections to query. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\Filter $where + * The filter to apply. + * @type array<\Google\Cloud\Firestore\V1\StructuredQuery\Order>|\Google\Protobuf\Internal\RepeatedField $order_by + * The order to apply to the query results. + * Firestore allows callers to provide a full ordering, a partial ordering, or + * no ordering at all. In all cases, Firestore guarantees a stable ordering + * through the following rules: + * * The `order_by` is required to reference all fields used with an + * inequality filter. + * * All fields that are required to be in the `order_by` but are not already + * present are appended in lexicographical ordering of the field name. + * * If an order on `__name__` is not specified, it is appended by default. + * Fields are appended with the same sort direction as the last order + * specified, or 'ASCENDING' if no order was specified. For example: + * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` + * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` + * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` + * * `WHERE __name__ > ... AND a > 1` becomes + * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` + * @type \Google\Cloud\Firestore\V1\Cursor $start_at + * A potential prefix of a position in the result set to start the query at. + * The ordering of the result set is based on the `ORDER BY` clause of the + * original query. + * ``` + * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; + * ``` + * This query's results are ordered by `(b ASC, __name__ ASC)`. + * Cursors can reference either the full ordering or a prefix of the location, + * though it cannot reference more fields than what are in the provided + * `ORDER BY`. + * Continuing off the example above, attaching the following start cursors + * will have varying impact: + * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND + * b > 2 AND __name__ > /k/123`. + * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. + * Unlike `OFFSET` which requires scanning over the first N results to skip, + * a start cursor allows the query to begin at a logical position. This + * position is not required to match an actual result, it will scan forward + * from this position to find the next document. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * @type \Google\Cloud\Firestore\V1\Cursor $end_at + * A potential prefix of a position in the result set to end the query at. + * This is similar to `START_AT` but with it controlling the end position + * rather than the start position. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * @type int $offset + * The number of documents to skip before returning the first result. + * This applies after the constraints specified by the `WHERE`, `START AT`, & + * `END AT` but before the `LIMIT` clause. + * Requires: + * * The value must be greater than or equal to zero if specified. + * @type \Google\Protobuf\Int32Value $limit + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The projection to return. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\Projection|null + */ + public function getSelect() + { + return $this->select; + } + + public function hasSelect() + { + return isset($this->select); + } + + public function clearSelect() + { + unset($this->select); + } + + /** + * The projection to return. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\Projection $var + * @return $this + */ + public function setSelect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\Projection::class); + $this->select = $var; + + return $this; + } + + /** + * The collections to query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFrom() + { + return $this->from; + } + + /** + * The collections to query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; + * @param array<\Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFrom($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector::class); + $this->from = $arr; + + return $this; + } + + /** + * The filter to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\Filter|null + */ + public function getWhere() + { + return $this->where; + } + + public function hasWhere() + { + return isset($this->where); + } + + public function clearWhere() + { + unset($this->where); + } + + /** + * The filter to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\Filter $var + * @return $this + */ + public function setWhere($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\Filter::class); + $this->where = $var; + + return $this; + } + + /** + * The order to apply to the query results. + * Firestore allows callers to provide a full ordering, a partial ordering, or + * no ordering at all. In all cases, Firestore guarantees a stable ordering + * through the following rules: + * * The `order_by` is required to reference all fields used with an + * inequality filter. + * * All fields that are required to be in the `order_by` but are not already + * present are appended in lexicographical ordering of the field name. + * * If an order on `__name__` is not specified, it is appended by default. + * Fields are appended with the same sort direction as the last order + * specified, or 'ASCENDING' if no order was specified. For example: + * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` + * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` + * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` + * * `WHERE __name__ > ... AND a > 1` becomes + * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * The order to apply to the query results. + * Firestore allows callers to provide a full ordering, a partial ordering, or + * no ordering at all. In all cases, Firestore guarantees a stable ordering + * through the following rules: + * * The `order_by` is required to reference all fields used with an + * inequality filter. + * * All fields that are required to be in the `order_by` but are not already + * present are appended in lexicographical ordering of the field name. + * * If an order on `__name__` is not specified, it is appended by default. + * Fields are appended with the same sort direction as the last order + * specified, or 'ASCENDING' if no order was specified. For example: + * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` + * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` + * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` + * * `WHERE __name__ > ... AND a > 1` becomes + * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; + * @param array<\Google\Cloud\Firestore\V1\StructuredQuery\Order>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOrderBy($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\Order::class); + $this->order_by = $arr; + + return $this; + } + + /** + * A potential prefix of a position in the result set to start the query at. + * The ordering of the result set is based on the `ORDER BY` clause of the + * original query. + * ``` + * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; + * ``` + * This query's results are ordered by `(b ASC, __name__ ASC)`. + * Cursors can reference either the full ordering or a prefix of the location, + * though it cannot reference more fields than what are in the provided + * `ORDER BY`. + * Continuing off the example above, attaching the following start cursors + * will have varying impact: + * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND + * b > 2 AND __name__ > /k/123`. + * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. + * Unlike `OFFSET` which requires scanning over the first N results to skip, + * a start cursor allows the query to begin at a logical position. This + * position is not required to match an actual result, it will scan forward + * from this position to find the next document. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; + * @return \Google\Cloud\Firestore\V1\Cursor|null + */ + public function getStartAt() + { + return $this->start_at; + } + + public function hasStartAt() + { + return isset($this->start_at); + } + + public function clearStartAt() + { + unset($this->start_at); + } + + /** + * A potential prefix of a position in the result set to start the query at. + * The ordering of the result set is based on the `ORDER BY` clause of the + * original query. + * ``` + * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; + * ``` + * This query's results are ordered by `(b ASC, __name__ ASC)`. + * Cursors can reference either the full ordering or a prefix of the location, + * though it cannot reference more fields than what are in the provided + * `ORDER BY`. + * Continuing off the example above, attaching the following start cursors + * will have varying impact: + * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND + * b > 2 AND __name__ > /k/123`. + * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. + * Unlike `OFFSET` which requires scanning over the first N results to skip, + * a start cursor allows the query to begin at a logical position. This + * position is not required to match an actual result, it will scan forward + * from this position to find the next document. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; + * @param \Google\Cloud\Firestore\V1\Cursor $var + * @return $this + */ + public function setStartAt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Cursor::class); + $this->start_at = $var; + + return $this; + } + + /** + * A potential prefix of a position in the result set to end the query at. + * This is similar to `START_AT` but with it controlling the end position + * rather than the start position. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; + * @return \Google\Cloud\Firestore\V1\Cursor|null + */ + public function getEndAt() + { + return $this->end_at; + } + + public function hasEndAt() + { + return isset($this->end_at); + } + + public function clearEndAt() + { + unset($this->end_at); + } + + /** + * A potential prefix of a position in the result set to end the query at. + * This is similar to `START_AT` but with it controlling the end position + * rather than the start position. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; + * @param \Google\Cloud\Firestore\V1\Cursor $var + * @return $this + */ + public function setEndAt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Cursor::class); + $this->end_at = $var; + + return $this; + } + + /** + * The number of documents to skip before returning the first result. + * This applies after the constraints specified by the `WHERE`, `START AT`, & + * `END AT` but before the `LIMIT` clause. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field int32 offset = 6; + * @return int + */ + public function getOffset() + { + return $this->offset; + } + + /** + * The number of documents to skip before returning the first result. + * This applies after the constraints specified by the `WHERE`, `START AT`, & + * `END AT` but before the `LIMIT` clause. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field int32 offset = 6; + * @param int $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt32($var); + $this->offset = $var; + + return $this; + } + + /** + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 5; + * @return \Google\Protobuf\Int32Value|null + */ + public function getLimit() + { + return $this->limit; + } + + public function hasLimit() + { + return isset($this->limit); + } + + public function clearLimit() + { + unset($this->limit); + } + + /** + * Returns the unboxed value from getLimit() + + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 5; + * @return int|null + */ + public function getLimitUnwrapped() + { + return $this->readWrapperValue("limit"); + } + + /** + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 5; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setLimit($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->limit = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 5; + * @param int|null $var + * @return $this + */ + public function setLimitUnwrapped($var) + { + $this->writeWrapperValue("limit", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php new file mode 100644 index 000000000000..b06253d9d6ad --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php @@ -0,0 +1,116 @@ +google.firestore.v1.StructuredQuery.CollectionSelector + */ +class CollectionSelector extends \Google\Protobuf\Internal\Message +{ + /** + * The collection ID. + * When set, selects only collections with this ID. + * + * Generated from protobuf field string collection_id = 2; + */ + protected $collection_id = ''; + /** + * When false, selects only collections that are immediate children of + * the `parent` specified in the containing `RunQueryRequest`. + * When true, selects all descendant collections. + * + * Generated from protobuf field bool all_descendants = 3; + */ + protected $all_descendants = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $collection_id + * The collection ID. + * When set, selects only collections with this ID. + * @type bool $all_descendants + * When false, selects only collections that are immediate children of + * the `parent` specified in the containing `RunQueryRequest`. + * When true, selects all descendant collections. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The collection ID. + * When set, selects only collections with this ID. + * + * Generated from protobuf field string collection_id = 2; + * @return string + */ + public function getCollectionId() + { + return $this->collection_id; + } + + /** + * The collection ID. + * When set, selects only collections with this ID. + * + * Generated from protobuf field string collection_id = 2; + * @param string $var + * @return $this + */ + public function setCollectionId($var) + { + GPBUtil::checkString($var, True); + $this->collection_id = $var; + + return $this; + } + + /** + * When false, selects only collections that are immediate children of + * the `parent` specified in the containing `RunQueryRequest`. + * When true, selects all descendant collections. + * + * Generated from protobuf field bool all_descendants = 3; + * @return bool + */ + public function getAllDescendants() + { + return $this->all_descendants; + } + + /** + * When false, selects only collections that are immediate children of + * the `parent` specified in the containing `RunQueryRequest`. + * When true, selects all descendant collections. + * + * Generated from protobuf field bool all_descendants = 3; + * @param bool $var + * @return $this + */ + public function setAllDescendants($var) + { + GPBUtil::checkBool($var); + $this->all_descendants = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CollectionSelector::class, \Google\Cloud\Firestore\V1\StructuredQuery_CollectionSelector::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php new file mode 100644 index 000000000000..f63c324d982d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php @@ -0,0 +1,112 @@ +google.firestore.v1.StructuredQuery.CompositeFilter + */ +class CompositeFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The operator for combining multiple filters. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; + */ + protected $op = 0; + /** + * The list of filters to combine. + * Requires: + * * At least one filter is present. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; + */ + private $filters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $op + * The operator for combining multiple filters. + * @type array<\Google\Cloud\Firestore\V1\StructuredQuery\Filter>|\Google\Protobuf\Internal\RepeatedField $filters + * The list of filters to combine. + * Requires: + * * At least one filter is present. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The operator for combining multiple filters. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; + * @return int + */ + public function getOp() + { + return $this->op; + } + + /** + * The operator for combining multiple filters. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; + * @param int $var + * @return $this + */ + public function setOp($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter\Operator::class); + $this->op = $var; + + return $this; + } + + /** + * The list of filters to combine. + * Requires: + * * At least one filter is present. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFilters() + { + return $this->filters; + } + + /** + * The list of filters to combine. + * Requires: + * * At least one filter is present. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; + * @param array<\Google\Cloud\Firestore\V1\StructuredQuery\Filter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\Filter::class); + $this->filters = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CompositeFilter::class, \Google\Cloud\Firestore\V1\StructuredQuery_CompositeFilter::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php new file mode 100644 index 000000000000..ec17fb748d0f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php @@ -0,0 +1,61 @@ +google.firestore.v1.StructuredQuery.CompositeFilter.Operator + */ +class Operator +{ + /** + * Unspecified. This value must not be used. + * + * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; + */ + const OPERATOR_UNSPECIFIED = 0; + /** + * Documents are required to satisfy all of the combined filters. + * + * Generated from protobuf enum AND = 1; + */ + const PBAND = 1; + + private static $valueToName = [ + self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', + self::PBAND => 'AND', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has 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(Operator::class, \Google\Cloud\Firestore\V1\StructuredQuery_CompositeFilter_Operator::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php new file mode 100644 index 000000000000..70989c758cf2 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php @@ -0,0 +1,64 @@ +google.firestore.v1.StructuredQuery.Direction + */ +class Direction +{ + /** + * Unspecified. + * + * Generated from protobuf enum DIRECTION_UNSPECIFIED = 0; + */ + const DIRECTION_UNSPECIFIED = 0; + /** + * Ascending. + * + * Generated from protobuf enum ASCENDING = 1; + */ + const ASCENDING = 1; + /** + * Descending. + * + * Generated from protobuf enum DESCENDING = 2; + */ + const DESCENDING = 2; + + private static $valueToName = [ + self::DIRECTION_UNSPECIFIED => 'DIRECTION_UNSPECIFIED', + self::ASCENDING => 'ASCENDING', + self::DESCENDING => 'DESCENDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Direction::class, \Google\Cloud\Firestore\V1\StructuredQuery_Direction::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php new file mode 100644 index 000000000000..d027d09f1050 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php @@ -0,0 +1,158 @@ +google.firestore.v1.StructuredQuery.FieldFilter + */ +class FieldFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The field to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + protected $field = null; + /** + * The operator to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; + */ + protected $op = 0; + /** + * The value to compare to. + * + * Generated from protobuf field .google.firestore.v1.Value value = 3; + */ + protected $value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field + * The field to filter by. + * @type int $op + * The operator to filter by. + * @type \Google\Cloud\Firestore\V1\Value $value + * The value to compare to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The field to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * The field to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->field = $var; + + return $this; + } + + /** + * The operator to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; + * @return int + */ + public function getOp() + { + return $this->op; + } + + /** + * The operator to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; + * @param int $var + * @return $this + */ + public function setOp($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter\Operator::class); + $this->op = $var; + + return $this; + } + + /** + * The value to compare to. + * + * Generated from protobuf field .google.firestore.v1.Value value = 3; + * @return \Google\Cloud\Firestore\V1\Value|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * The value to compare to. + * + * Generated from protobuf field .google.firestore.v1.Value value = 3; + * @param \Google\Cloud\Firestore\V1\Value $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FieldFilter::class, \Google\Cloud\Firestore\V1\StructuredQuery_FieldFilter::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php new file mode 100644 index 000000000000..19bf26677960 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php @@ -0,0 +1,143 @@ +google.firestore.v1.StructuredQuery.FieldFilter.Operator + */ +class Operator +{ + /** + * Unspecified. This value must not be used. + * + * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; + */ + const OPERATOR_UNSPECIFIED = 0; + /** + * The given `field` is less than the given `value`. + * Requires: + * * That `field` come first in `order_by`. + * + * Generated from protobuf enum LESS_THAN = 1; + */ + const LESS_THAN = 1; + /** + * The given `field` is less than or equal to the given `value`. + * Requires: + * * That `field` come first in `order_by`. + * + * Generated from protobuf enum LESS_THAN_OR_EQUAL = 2; + */ + const LESS_THAN_OR_EQUAL = 2; + /** + * The given `field` is greater than the given `value`. + * Requires: + * * That `field` come first in `order_by`. + * + * Generated from protobuf enum GREATER_THAN = 3; + */ + const GREATER_THAN = 3; + /** + * The given `field` is greater than or equal to the given `value`. + * Requires: + * * That `field` come first in `order_by`. + * + * Generated from protobuf enum GREATER_THAN_OR_EQUAL = 4; + */ + const GREATER_THAN_OR_EQUAL = 4; + /** + * The given `field` is equal to the given `value`. + * + * Generated from protobuf enum EQUAL = 5; + */ + const EQUAL = 5; + /** + * The given `field` is not equal to the given `value`. + * Requires: + * * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + * * That `field` comes first in the `order_by`. + * + * Generated from protobuf enum NOT_EQUAL = 6; + */ + const NOT_EQUAL = 6; + /** + * The given `field` is an array that contains the given `value`. + * + * Generated from protobuf enum ARRAY_CONTAINS = 7; + */ + const ARRAY_CONTAINS = 7; + /** + * The given `field` is equal to at least one value in the given array. + * Requires: + * * That `value` is a non-empty `ArrayValue` with at most 10 values. + * * No other `IN` or `ARRAY_CONTAINS_ANY` or `NOT_IN`. + * + * Generated from protobuf enum IN = 8; + */ + const IN = 8; + /** + * The given `field` is an array that contains any of the values in the + * given array. + * Requires: + * * That `value` is a non-empty `ArrayValue` with at most 10 values. + * * No other `IN` or `ARRAY_CONTAINS_ANY` or `NOT_IN`. + * + * Generated from protobuf enum ARRAY_CONTAINS_ANY = 9; + */ + const ARRAY_CONTAINS_ANY = 9; + /** + * The value of the `field` is not in the given array. + * Requires: + * * That `value` is a non-empty `ArrayValue` with at most 10 values. + * * No other `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`, + * `IS_NOT_NULL`, or `IS_NOT_NAN`. + * * That `field` comes first in the `order_by`. + * + * Generated from protobuf enum NOT_IN = 10; + */ + const NOT_IN = 10; + + private static $valueToName = [ + self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', + self::LESS_THAN => 'LESS_THAN', + self::LESS_THAN_OR_EQUAL => 'LESS_THAN_OR_EQUAL', + self::GREATER_THAN => 'GREATER_THAN', + self::GREATER_THAN_OR_EQUAL => 'GREATER_THAN_OR_EQUAL', + self::EQUAL => 'EQUAL', + self::NOT_EQUAL => 'NOT_EQUAL', + self::ARRAY_CONTAINS => 'ARRAY_CONTAINS', + self::IN => 'IN', + self::ARRAY_CONTAINS_ANY => 'ARRAY_CONTAINS_ANY', + self::NOT_IN => 'NOT_IN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Operator::class, \Google\Cloud\Firestore\V1\StructuredQuery_FieldFilter_Operator::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php new file mode 100644 index 000000000000..6c52d09050cb --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php @@ -0,0 +1,78 @@ +google.firestore.v1.StructuredQuery.FieldReference + */ +class FieldReference extends \Google\Protobuf\Internal\Message +{ + /** + * The relative path of the document being referenced. + * Requires: + * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. + * + * Generated from protobuf field string field_path = 2; + */ + protected $field_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_path + * The relative path of the document being referenced. + * Requires: + * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The relative path of the document being referenced. + * Requires: + * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. + * + * Generated from protobuf field string field_path = 2; + * @return string + */ + public function getFieldPath() + { + return $this->field_path; + } + + /** + * The relative path of the document being referenced. + * Requires: + * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. + * + * Generated from protobuf field string field_path = 2; + * @param string $var + * @return $this + */ + public function setFieldPath($var) + { + GPBUtil::checkString($var, True); + $this->field_path = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FieldReference::class, \Google\Cloud\Firestore\V1\StructuredQuery_FieldReference::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php new file mode 100644 index 000000000000..dc43c16b7859 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php @@ -0,0 +1,144 @@ +google.firestore.v1.StructuredQuery.Filter + */ +class Filter extends \Google\Protobuf\Internal\Message +{ + protected $filter_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter $composite_filter + * A composite filter. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter $field_filter + * A filter on a document field. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter $unary_filter + * A filter that takes exactly one argument. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * A composite filter. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter|null + */ + public function getCompositeFilter() + { + return $this->readOneof(1); + } + + public function hasCompositeFilter() + { + return $this->hasOneof(1); + } + + /** + * A composite filter. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter $var + * @return $this + */ + public function setCompositeFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A filter on a document field. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter|null + */ + public function getFieldFilter() + { + return $this->readOneof(2); + } + + public function hasFieldFilter() + { + return $this->hasOneof(2); + } + + /** + * A filter on a document field. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter $var + * @return $this + */ + public function setFieldFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A filter that takes exactly one argument. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter|null + */ + public function getUnaryFilter() + { + return $this->readOneof(3); + } + + public function hasUnaryFilter() + { + return $this->hasOneof(3); + } + + /** + * A filter that takes exactly one argument. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter $var + * @return $this + */ + public function setUnaryFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getFilterType() + { + return $this->whichOneof("filter_type"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Filter::class, \Google\Cloud\Firestore\V1\StructuredQuery_Filter::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php new file mode 100644 index 000000000000..a71ebeb1b1d0 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php @@ -0,0 +1,114 @@ +google.firestore.v1.StructuredQuery.Order + */ +class Order extends \Google\Protobuf\Internal\Message +{ + /** + * The field to order by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + protected $field = null; + /** + * The direction to order by. Defaults to `ASCENDING`. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; + */ + protected $direction = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field + * The field to order by. + * @type int $direction + * The direction to order by. Defaults to `ASCENDING`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The field to order by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * The field to order by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->field = $var; + + return $this; + } + + /** + * The direction to order by. Defaults to `ASCENDING`. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; + * @return int + */ + public function getDirection() + { + return $this->direction; + } + + /** + * The direction to order by. Defaults to `ASCENDING`. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; + * @param int $var + * @return $this + */ + public function setDirection($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\Direction::class); + $this->direction = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Order::class, \Google\Cloud\Firestore\V1\StructuredQuery_Order::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php new file mode 100644 index 000000000000..36909ca38947 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php @@ -0,0 +1,78 @@ +google.firestore.v1.StructuredQuery.Projection + */ +class Projection extends \Google\Protobuf\Internal\Message +{ + /** + * The fields to return. + * If empty, all fields are returned. To only return the name + * of the document, use `['__name__']`. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Firestore\V1\StructuredQuery\FieldReference>|\Google\Protobuf\Internal\RepeatedField $fields + * The fields to return. + * If empty, all fields are returned. To only return the name + * of the document, use `['__name__']`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The fields to return. + * If empty, all fields are returned. To only return the name + * of the document, use `['__name__']`. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * The fields to return. + * If empty, all fields are returned. To only return the name + * of the document, use `['__name__']`. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * @param array<\Google\Cloud\Firestore\V1\StructuredQuery\FieldReference>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->fields = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Projection::class, \Google\Cloud\Firestore\V1\StructuredQuery_Projection::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php new file mode 100644 index 000000000000..4f90d0cfdd4b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php @@ -0,0 +1,112 @@ +google.firestore.v1.StructuredQuery.UnaryFilter + */ +class UnaryFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The unary operator to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + */ + protected $op = 0; + protected $operand_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $op + * The unary operator to apply. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field + * The field to which to apply the operator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The unary operator to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + * @return int + */ + public function getOp() + { + return $this->op; + } + + /** + * The unary operator to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + * @param int $var + * @return $this + */ + public function setOp($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter\Operator::class); + $this->op = $var; + + return $this; + } + + /** + * The field to which to apply the operator. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null + */ + public function getField() + { + return $this->readOneof(2); + } + + public function hasField() + { + return $this->hasOneof(2); + } + + /** + * The field to which to apply the operator. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperandType() + { + return $this->whichOneof("operand_type"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UnaryFilter::class, \Google\Cloud\Firestore\V1\StructuredQuery_UnaryFilter::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php new file mode 100644 index 000000000000..d8a8dffc6d00 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php @@ -0,0 +1,84 @@ +google.firestore.v1.StructuredQuery.UnaryFilter.Operator + */ +class Operator +{ + /** + * Unspecified. This value must not be used. + * + * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; + */ + const OPERATOR_UNSPECIFIED = 0; + /** + * The given `field` is equal to `NaN`. + * + * Generated from protobuf enum IS_NAN = 2; + */ + const IS_NAN = 2; + /** + * The given `field` is equal to `NULL`. + * + * Generated from protobuf enum IS_NULL = 3; + */ + const IS_NULL = 3; + /** + * The given `field` is not equal to `NaN`. + * Requires: + * * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + * * That `field` comes first in the `order_by`. + * + * Generated from protobuf enum IS_NOT_NAN = 4; + */ + const IS_NOT_NAN = 4; + /** + * The given `field` is not equal to `NULL`. + * Requires: + * * A single `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + * * That `field` comes first in the `order_by`. + * + * Generated from protobuf enum IS_NOT_NULL = 5; + */ + const IS_NOT_NULL = 5; + + private static $valueToName = [ + self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', + self::IS_NAN => 'IS_NAN', + self::IS_NULL => 'IS_NULL', + self::IS_NOT_NAN => 'IS_NOT_NAN', + self::IS_NOT_NULL => 'IS_NOT_NULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Operator::class, \Google\Cloud\Firestore\V1\StructuredQuery_UnaryFilter_Operator::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_CollectionSelector.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_CollectionSelector.php new file mode 100644 index 000000000000..8e2ecf4083c8 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_CollectionSelector.php @@ -0,0 +1,16 @@ +google.firestore.v1.Target + */ +class Target extends \Google\Protobuf\Internal\Message +{ + /** + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. + * + * Generated from protobuf field int32 target_id = 5; + */ + protected $target_id = 0; + /** + * If the target should be removed once it is current and consistent. + * + * Generated from protobuf field bool once = 6; + */ + protected $once = false; + protected $target_type; + protected $resume_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Target\QueryTarget $query + * A target specified by a query. + * @type \Google\Cloud\Firestore\V1\Target\DocumentsTarget $documents + * A target specified by a set of document names. + * @type string $resume_token + * A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target. + * Using a resume token with a different target is unsupported and may fail. + * @type \Google\Protobuf\Timestamp $read_time + * Start listening after a specific `read_time`. + * The client must know the state of matching documents at this time. + * @type int $target_id + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. + * @type bool $once + * If the target should be removed once it is current and consistent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * A target specified by a query. + * + * Generated from protobuf field .google.firestore.v1.Target.QueryTarget query = 2; + * @return \Google\Cloud\Firestore\V1\Target\QueryTarget|null + */ + public function getQuery() + { + return $this->readOneof(2); + } + + public function hasQuery() + { + return $this->hasOneof(2); + } + + /** + * A target specified by a query. + * + * Generated from protobuf field .google.firestore.v1.Target.QueryTarget query = 2; + * @param \Google\Cloud\Firestore\V1\Target\QueryTarget $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target\QueryTarget::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A target specified by a set of document names. + * + * Generated from protobuf field .google.firestore.v1.Target.DocumentsTarget documents = 3; + * @return \Google\Cloud\Firestore\V1\Target\DocumentsTarget|null + */ + public function getDocuments() + { + return $this->readOneof(3); + } + + public function hasDocuments() + { + return $this->hasOneof(3); + } + + /** + * A target specified by a set of document names. + * + * Generated from protobuf field .google.firestore.v1.Target.DocumentsTarget documents = 3; + * @param \Google\Cloud\Firestore\V1\Target\DocumentsTarget $var + * @return $this + */ + public function setDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target\DocumentsTarget::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target. + * Using a resume token with a different target is unsupported and may fail. + * + * Generated from protobuf field bytes resume_token = 4; + * @return string + */ + public function getResumeToken() + { + return $this->readOneof(4); + } + + public function hasResumeToken() + { + return $this->hasOneof(4); + } + + /** + * A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target. + * Using a resume token with a different target is unsupported and may fail. + * + * Generated from protobuf field bytes resume_token = 4; + * @param string $var + * @return $this + */ + public function setResumeToken($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Start listening after a specific `read_time`. + * The client must know the state of matching documents at this time. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 11; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(11); + } + + public function hasReadTime() + { + return $this->hasOneof(11); + } + + /** + * Start listening after a specific `read_time`. + * The client must know the state of matching documents at this time. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 11; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. + * + * Generated from protobuf field int32 target_id = 5; + * @return int + */ + public function getTargetId() + { + return $this->target_id; + } + + /** + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. + * + * Generated from protobuf field int32 target_id = 5; + * @param int $var + * @return $this + */ + public function setTargetId($var) + { + GPBUtil::checkInt32($var); + $this->target_id = $var; + + return $this; + } + + /** + * If the target should be removed once it is current and consistent. + * + * Generated from protobuf field bool once = 6; + * @return bool + */ + public function getOnce() + { + return $this->once; + } + + /** + * If the target should be removed once it is current and consistent. + * + * Generated from protobuf field bool once = 6; + * @param bool $var + * @return $this + */ + public function setOnce($var) + { + GPBUtil::checkBool($var); + $this->once = $var; + + return $this; + } + + /** + * @return string + */ + public function getTargetType() + { + return $this->whichOneof("target_type"); + } + + /** + * @return string + */ + public function getResumeType() + { + return $this->whichOneof("resume_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php new file mode 100644 index 000000000000..b96562c648cf --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php @@ -0,0 +1,82 @@ +google.firestore.v1.Target.DocumentsTarget + */ +class DocumentsTarget extends \Google\Protobuf\Internal\Message +{ + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of + * the given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + */ + private $documents; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $documents + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of + * the given `database`. Duplicate names will be elided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of + * the given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of + * the given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->documents = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DocumentsTarget::class, \Google\Cloud\Firestore\V1\Target_DocumentsTarget::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php new file mode 100644 index 000000000000..56c02faeb030 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php @@ -0,0 +1,132 @@ +google.firestore.v1.Target.QueryTarget + */ +class QueryTarget extends \Google\Protobuf\Internal\Message +{ + /** + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + protected $query_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query + * A structured query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * 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; + } + + /** + * A structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @return \Google\Cloud\Firestore\V1\StructuredQuery|null + */ + public function getStructuredQuery() + { + return $this->readOneof(2); + } + + public function hasStructuredQuery() + { + return $this->hasOneof(2); + } + + /** + * A structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery $var + * @return $this + */ + public function setStructuredQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getQueryType() + { + return $this->whichOneof("query_type"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(QueryTarget::class, \Google\Cloud\Firestore\V1\Target_QueryTarget::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php new file mode 100644 index 000000000000..7916d0c40af0 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php @@ -0,0 +1,267 @@ +google.firestore.v1.TargetChange + */ +class TargetChange extends \Google\Protobuf\Internal\Message +{ + /** + * The type of change that occurred. + * + * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; + */ + protected $target_change_type = 0; + /** + * The target IDs of targets that have changed. + * If empty, the change applies to all targets. + * The order of the target IDs is not defined. + * + * Generated from protobuf field repeated int32 target_ids = 2; + */ + private $target_ids; + /** + * The error that resulted in this change, if applicable. + * + * Generated from protobuf field .google.rpc.Status cause = 3; + */ + protected $cause = null; + /** + * A token that can be used to resume the stream for the given `target_ids`, + * or all targets if `target_ids` is empty. + * Not set on every target change. + * + * Generated from protobuf field bytes resume_token = 4; + */ + protected $resume_token = ''; + /** + * The consistent `read_time` for the given `target_ids` (omitted when the + * target_ids are not at a consistent snapshot). + * The stream is guaranteed to send a `read_time` with `target_ids` empty + * whenever the entire stream reaches a new consistent snapshot. ADD, + * CURRENT, and RESET messages are guaranteed to (eventually) result in a + * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + * For a given stream, `read_time` is guaranteed to be monotonically + * increasing. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + */ + protected $read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $target_change_type + * The type of change that occurred. + * @type array|\Google\Protobuf\Internal\RepeatedField $target_ids + * The target IDs of targets that have changed. + * If empty, the change applies to all targets. + * The order of the target IDs is not defined. + * @type \Google\Rpc\Status $cause + * The error that resulted in this change, if applicable. + * @type string $resume_token + * A token that can be used to resume the stream for the given `target_ids`, + * or all targets if `target_ids` is empty. + * Not set on every target change. + * @type \Google\Protobuf\Timestamp $read_time + * The consistent `read_time` for the given `target_ids` (omitted when the + * target_ids are not at a consistent snapshot). + * The stream is guaranteed to send a `read_time` with `target_ids` empty + * whenever the entire stream reaches a new consistent snapshot. ADD, + * CURRENT, and RESET messages are guaranteed to (eventually) result in a + * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + * For a given stream, `read_time` is guaranteed to be monotonically + * increasing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The type of change that occurred. + * + * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; + * @return int + */ + public function getTargetChangeType() + { + return $this->target_change_type; + } + + /** + * The type of change that occurred. + * + * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; + * @param int $var + * @return $this + */ + public function setTargetChangeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\TargetChange\TargetChangeType::class); + $this->target_change_type = $var; + + return $this; + } + + /** + * The target IDs of targets that have changed. + * If empty, the change applies to all targets. + * The order of the target IDs is not defined. + * + * Generated from protobuf field repeated int32 target_ids = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetIds() + { + return $this->target_ids; + } + + /** + * The target IDs of targets that have changed. + * If empty, the change applies to all targets. + * The order of the target IDs is not defined. + * + * Generated from protobuf field repeated int32 target_ids = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->target_ids = $arr; + + return $this; + } + + /** + * The error that resulted in this change, if applicable. + * + * Generated from protobuf field .google.rpc.Status cause = 3; + * @return \Google\Rpc\Status|null + */ + public function getCause() + { + return $this->cause; + } + + public function hasCause() + { + return isset($this->cause); + } + + public function clearCause() + { + unset($this->cause); + } + + /** + * The error that resulted in this change, if applicable. + * + * Generated from protobuf field .google.rpc.Status cause = 3; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setCause($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->cause = $var; + + return $this; + } + + /** + * A token that can be used to resume the stream for the given `target_ids`, + * or all targets if `target_ids` is empty. + * Not set on every target change. + * + * Generated from protobuf field bytes resume_token = 4; + * @return string + */ + public function getResumeToken() + { + return $this->resume_token; + } + + /** + * A token that can be used to resume the stream for the given `target_ids`, + * or all targets if `target_ids` is empty. + * Not set on every target change. + * + * Generated from protobuf field bytes resume_token = 4; + * @param string $var + * @return $this + */ + public function setResumeToken($var) + { + GPBUtil::checkString($var, False); + $this->resume_token = $var; + + return $this; + } + + /** + * The consistent `read_time` for the given `target_ids` (omitted when the + * target_ids are not at a consistent snapshot). + * The stream is guaranteed to send a `read_time` with `target_ids` empty + * whenever the entire stream reaches a new consistent snapshot. ADD, + * CURRENT, and RESET messages are guaranteed to (eventually) result in a + * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + * For a given stream, `read_time` is guaranteed to be monotonically + * increasing. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The consistent `read_time` for the given `target_ids` (omitted when the + * target_ids are not at a consistent snapshot). + * The stream is guaranteed to send a `read_time` with `target_ids` empty + * whenever the entire stream reaches a new consistent snapshot. ADD, + * CURRENT, and RESET messages are guaranteed to (eventually) result in a + * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + * For a given stream, `read_time` is guaranteed to be monotonically + * increasing. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php new file mode 100644 index 000000000000..23694a75db2e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php @@ -0,0 +1,86 @@ +google.firestore.v1.TargetChange.TargetChangeType + */ +class TargetChangeType +{ + /** + * No change has occurred. Used only to send an updated `resume_token`. + * + * Generated from protobuf enum NO_CHANGE = 0; + */ + const NO_CHANGE = 0; + /** + * The targets have been added. + * + * Generated from protobuf enum ADD = 1; + */ + const ADD = 1; + /** + * The targets have been removed. + * + * Generated from protobuf enum REMOVE = 2; + */ + const REMOVE = 2; + /** + * The targets reflect all changes committed before the targets were added + * to the stream. + * This will be sent after or with a `read_time` that is greater than or + * equal to the time at which the targets were added. + * Listeners can wait for this change if read-after-write semantics + * are desired. + * + * Generated from protobuf enum CURRENT = 3; + */ + const CURRENT = 3; + /** + * The targets have been reset, and a new initial state for the targets + * will be returned in subsequent changes. + * After the initial state is complete, `CURRENT` will be returned even + * if the target was previously indicated to be `CURRENT`. + * + * Generated from protobuf enum RESET = 4; + */ + const RESET = 4; + + private static $valueToName = [ + self::NO_CHANGE => 'NO_CHANGE', + self::ADD => 'ADD', + self::REMOVE => 'REMOVE', + self::CURRENT => 'CURRENT', + self::RESET => 'RESET', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TargetChangeType::class, \Google\Cloud\Firestore\V1\TargetChange_TargetChangeType::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange_TargetChangeType.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange_TargetChangeType.php new file mode 100644 index 000000000000..32530a519a92 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange_TargetChangeType.php @@ -0,0 +1,16 @@ +google.firestore.v1.TransactionOptions + */ +class TransactionOptions extends \Google\Protobuf\Internal\Message +{ + protected $mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly $read_only + * The transaction can only be used for read operations. + * @type \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite $read_write + * The transaction can be used for both read and write operations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The transaction can only be used for read operations. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; + * @return \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly|null + */ + public function getReadOnly() + { + return $this->readOneof(2); + } + + public function hasReadOnly() + { + return $this->hasOneof(2); + } + + /** + * The transaction can only be used for read operations. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; + * @param \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly $var + * @return $this + */ + public function setReadOnly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The transaction can be used for both read and write operations. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; + * @return \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite|null + */ + public function getReadWrite() + { + return $this->readOneof(3); + } + + public function hasReadWrite() + { + return $this->hasOneof(3); + } + + /** + * The transaction can be used for both read and write operations. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; + * @param \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite $var + * @return $this + */ + public function setReadWrite($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getMode() + { + return $this->whichOneof("mode"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php new file mode 100644 index 000000000000..4e2cb53c02a2 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php @@ -0,0 +1,84 @@ +google.firestore.v1.TransactionOptions.ReadOnly + */ +class PBReadOnly extends \Google\Protobuf\Internal\Message +{ + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents at the given time. + * This may not be older than 60 seconds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Reads documents at the given time. + * This may not be older than 60 seconds. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(2); + } + + public function hasReadTime() + { + return $this->hasOneof(2); + } + + /** + * Reads documents at the given time. + * This may not be older than 60 seconds. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PBReadOnly::class, \Google\Cloud\Firestore\V1\TransactionOptions_ReadOnly::class); + +// Adding a class alias for backwards compatibility with the "readonly" keyword. +class_alias(PBReadOnly::class, __NAMESPACE__ . '\ReadOnly'); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadOnly.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadOnly.php new file mode 100644 index 000000000000..cb227a9fbefb --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadOnly.php @@ -0,0 +1,9 @@ +google.firestore.v1.TransactionOptions.ReadWrite + */ +class ReadWrite extends \Google\Protobuf\Internal\Message +{ + /** + * An optional transaction to retry. + * + * Generated from protobuf field bytes retry_transaction = 1; + */ + protected $retry_transaction = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $retry_transaction + * An optional transaction to retry. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * An optional transaction to retry. + * + * Generated from protobuf field bytes retry_transaction = 1; + * @return string + */ + public function getRetryTransaction() + { + return $this->retry_transaction; + } + + /** + * An optional transaction to retry. + * + * Generated from protobuf field bytes retry_transaction = 1; + * @param string $var + * @return $this + */ + public function setRetryTransaction($var) + { + GPBUtil::checkString($var, False); + $this->retry_transaction = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReadWrite::class, \Google\Cloud\Firestore\V1\TransactionOptions_ReadWrite::class); + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions_ReadOnly.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions_ReadOnly.php new file mode 100644 index 000000000000..94a78fa27201 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions_ReadOnly.php @@ -0,0 +1,16 @@ +google.firestore.v1.UpdateDocumentRequest + */ +class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The updated document. + * Creates the document if it does not already exist. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * The fields to update. + * None of the field paths in the mask may contain a reserved name. + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; + */ + protected $update_mask = null; + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + */ + protected $mask = null; + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + */ + protected $current_document = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Document $document + * Required. The updated document. + * Creates the document if it does not already exist. + * @type \Google\Cloud\Firestore\V1\DocumentMask $update_mask + * The fields to update. + * None of the field paths in the mask may contain a reserved name. + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * @type \Google\Cloud\Firestore\V1\DocumentMask $mask + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * @type \Google\Cloud\Firestore\V1\Precondition $current_document + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The updated document. + * Creates the document if it does not already exist. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. The updated document. + * Creates the document if it does not already exist. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The fields to update. + * None of the field paths in the mask may contain a reserved name. + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The fields to update. + * None of the field paths in the mask may contain a reserved name. + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getMask() + { + return $this->mask; + } + + public function hasMask() + { + return isset($this->mask); + } + + public function clearMask() + { + unset($this->mask); + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->mask = $var; + + return $this; + } + + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + * @return \Google\Cloud\Firestore\V1\Precondition|null + */ + public function getCurrentDocument() + { + return $this->current_document; + } + + public function hasCurrentDocument() + { + return isset($this->current_document); + } + + public function clearCurrentDocument() + { + unset($this->current_document); + } + + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + * @param \Google\Cloud\Firestore\V1\Precondition $var + * @return $this + */ + public function setCurrentDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); + $this->current_document = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php new file mode 100644 index 000000000000..de439f4118f4 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php @@ -0,0 +1,435 @@ +google.firestore.v1.Value + */ +class Value extends \Google\Protobuf\Internal\Message +{ + protected $value_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $null_value + * A null value. + * @type bool $boolean_value + * A boolean value. + * @type int|string $integer_value + * An integer value. + * @type float $double_value + * A double value. + * @type \Google\Protobuf\Timestamp $timestamp_value + * A timestamp value. + * Precise only to microseconds. When stored, any additional precision is + * rounded down. + * @type string $string_value + * A string value. + * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes of the UTF-8 representation are considered by + * queries. + * @type string $bytes_value + * A bytes value. + * Must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes are considered by queries. + * @type string $reference_value + * A reference to a document. For example: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type \Google\Type\LatLng $geo_point_value + * A geo point value representing a point on the surface of Earth. + * @type \Google\Cloud\Firestore\V1\ArrayValue $array_value + * An array value. + * Cannot directly contain another array value, though can contain an + * map which contains another array. + * @type \Google\Cloud\Firestore\V1\MapValue $map_value + * A map value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * A null value. + * + * Generated from protobuf field .google.protobuf.NullValue null_value = 11; + * @return int + */ + public function getNullValue() + { + return $this->readOneof(11); + } + + public function hasNullValue() + { + return $this->hasOneof(11); + } + + /** + * A null value. + * + * Generated from protobuf field .google.protobuf.NullValue null_value = 11; + * @param int $var + * @return $this + */ + public function setNullValue($var) + { + GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * A boolean value. + * + * Generated from protobuf field bool boolean_value = 1; + * @return bool + */ + public function getBooleanValue() + { + return $this->readOneof(1); + } + + public function hasBooleanValue() + { + return $this->hasOneof(1); + } + + /** + * A boolean value. + * + * Generated from protobuf field bool boolean_value = 1; + * @param bool $var + * @return $this + */ + public function setBooleanValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * An integer value. + * + * Generated from protobuf field int64 integer_value = 2; + * @return int|string + */ + public function getIntegerValue() + { + return $this->readOneof(2); + } + + public function hasIntegerValue() + { + return $this->hasOneof(2); + } + + /** + * An integer value. + * + * Generated from protobuf field int64 integer_value = 2; + * @param int|string $var + * @return $this + */ + public function setIntegerValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A double value. + * + * 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 double value. + * + * 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 timestamp value. + * Precise only to microseconds. When stored, any additional precision is + * rounded down. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimestampValue() + { + return $this->readOneof(10); + } + + public function hasTimestampValue() + { + return $this->hasOneof(10); + } + + /** + * A timestamp value. + * Precise only to microseconds. When stored, any additional precision is + * rounded down. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimestampValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * A string value. + * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes of the UTF-8 representation are considered by + * queries. + * + * Generated from protobuf field string string_value = 17; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(17); + } + + public function hasStringValue() + { + return $this->hasOneof(17); + } + + /** + * A string value. + * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes of the UTF-8 representation are considered by + * queries. + * + * Generated from protobuf field string string_value = 17; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * A bytes value. + * Must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes are considered by queries. + * + * Generated from protobuf field bytes bytes_value = 18; + * @return string + */ + public function getBytesValue() + { + return $this->readOneof(18); + } + + public function hasBytesValue() + { + return $this->hasOneof(18); + } + + /** + * A bytes value. + * Must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes are considered by queries. + * + * Generated from protobuf field bytes bytes_value = 18; + * @param string $var + * @return $this + */ + public function setBytesValue($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * A reference to a document. For example: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string reference_value = 5; + * @return string + */ + public function getReferenceValue() + { + return $this->readOneof(5); + } + + public function hasReferenceValue() + { + return $this->hasOneof(5); + } + + /** + * A reference to a document. For example: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string reference_value = 5; + * @param string $var + * @return $this + */ + public function setReferenceValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * A geo point value representing a point on the surface of Earth. + * + * Generated from protobuf field .google.type.LatLng geo_point_value = 8; + * @return \Google\Type\LatLng|null + */ + public function getGeoPointValue() + { + return $this->readOneof(8); + } + + public function hasGeoPointValue() + { + return $this->hasOneof(8); + } + + /** + * A geo point value representing a point on the surface of Earth. + * + * Generated from protobuf field .google.type.LatLng geo_point_value = 8; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setGeoPointValue($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * An array value. + * Cannot directly contain another array value, though can contain an + * map which contains another array. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue array_value = 9; + * @return \Google\Cloud\Firestore\V1\ArrayValue|null + */ + public function getArrayValue() + { + return $this->readOneof(9); + } + + public function hasArrayValue() + { + return $this->hasOneof(9); + } + + /** + * An array value. + * Cannot directly contain another array value, though can contain an + * map which contains another array. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue array_value = 9; + * @param \Google\Cloud\Firestore\V1\ArrayValue $var + * @return $this + */ + public function setArrayValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * A map value. + * + * Generated from protobuf field .google.firestore.v1.MapValue map_value = 6; + * @return \Google\Cloud\Firestore\V1\MapValue|null + */ + public function getMapValue() + { + return $this->readOneof(6); + } + + public function hasMapValue() + { + return $this->hasOneof(6); + } + + /** + * A map value. + * + * Generated from protobuf field .google.firestore.v1.MapValue map_value = 6; + * @param \Google\Cloud\Firestore\V1\MapValue $var + * @return $this + */ + public function setMapValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\MapValue::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getValueType() + { + return $this->whichOneof("value_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php new file mode 100644 index 000000000000..67920d9f8a1a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php @@ -0,0 +1,314 @@ +google.firestore.v1.Write + */ +class Write extends \Google\Protobuf\Internal\Message +{ + /** + * The fields to update in this write. + * This field can be set only when the operation is `update`. + * If the mask is not set for an `update` and the document exists, any + * existing data will be overwritten. + * If the mask is set and the document on the server has fields not covered by + * the mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * The field paths in this mask must not contain a reserved field name. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; + */ + protected $update_mask = null; + /** + * The transforms to perform after update. + * This field can be set only when the operation is `update`. If present, this + * write is equivalent to performing `update` and `transform` to the same + * document atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; + */ + private $update_transforms; + /** + * An optional precondition on the document. + * The write will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + */ + protected $current_document = null; + protected $operation; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Document $update + * A document to write. + * @type string $delete + * A document name to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type \Google\Cloud\Firestore\V1\DocumentTransform $transform + * Applies a transformation to a document. + * @type \Google\Cloud\Firestore\V1\DocumentMask $update_mask + * The fields to update in this write. + * This field can be set only when the operation is `update`. + * If the mask is not set for an `update` and the document exists, any + * existing data will be overwritten. + * If the mask is set and the document on the server has fields not covered by + * the mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * The field paths in this mask must not contain a reserved field name. + * @type array<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform>|\Google\Protobuf\Internal\RepeatedField $update_transforms + * The transforms to perform after update. + * This field can be set only when the operation is `update`. If present, this + * write is equivalent to performing `update` and `transform` to the same + * document atomically and in order. + * @type \Google\Cloud\Firestore\V1\Precondition $current_document + * An optional precondition on the document. + * The write will fail if this is set and not met by the target document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * A document to write. + * + * Generated from protobuf field .google.firestore.v1.Document update = 1; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getUpdate() + { + return $this->readOneof(1); + } + + public function hasUpdate() + { + return $this->hasOneof(1); + } + + /** + * A document to write. + * + * Generated from protobuf field .google.firestore.v1.Document update = 1; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A document name to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string delete = 2; + * @return string + */ + public function getDelete() + { + return $this->readOneof(2); + } + + public function hasDelete() + { + return $this->hasOneof(2); + } + + /** + * A document name to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string delete = 2; + * @param string $var + * @return $this + */ + public function setDelete($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Applies a transformation to a document. + * + * Generated from protobuf field .google.firestore.v1.DocumentTransform transform = 6; + * @return \Google\Cloud\Firestore\V1\DocumentTransform|null + */ + public function getTransform() + { + return $this->readOneof(6); + } + + public function hasTransform() + { + return $this->hasOneof(6); + } + + /** + * Applies a transformation to a document. + * + * Generated from protobuf field .google.firestore.v1.DocumentTransform transform = 6; + * @param \Google\Cloud\Firestore\V1\DocumentTransform $var + * @return $this + */ + public function setTransform($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentTransform::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * The fields to update in this write. + * This field can be set only when the operation is `update`. + * If the mask is not set for an `update` and the document exists, any + * existing data will be overwritten. + * If the mask is set and the document on the server has fields not covered by + * the mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * The field paths in this mask must not contain a reserved field name. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The fields to update in this write. + * This field can be set only when the operation is `update`. + * If the mask is not set for an `update` and the document exists, any + * existing data will be overwritten. + * If the mask is set and the document on the server has fields not covered by + * the mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * The field paths in this mask must not contain a reserved field name. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * The transforms to perform after update. + * This field can be set only when the operation is `update`. If present, this + * write is equivalent to performing `update` and `transform` to the same + * document atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUpdateTransforms() + { + return $this->update_transforms; + } + + /** + * The transforms to perform after update. + * This field can be set only when the operation is `update`. If present, this + * write is equivalent to performing `update` and `transform` to the same + * document atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; + * @param array<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUpdateTransforms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform::class); + $this->update_transforms = $arr; + + return $this; + } + + /** + * An optional precondition on the document. + * The write will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + * @return \Google\Cloud\Firestore\V1\Precondition|null + */ + public function getCurrentDocument() + { + return $this->current_document; + } + + public function hasCurrentDocument() + { + return isset($this->current_document); + } + + public function clearCurrentDocument() + { + unset($this->current_document); + } + + /** + * An optional precondition on the document. + * The write will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + * @param \Google\Cloud\Firestore\V1\Precondition $var + * @return $this + */ + public function setCurrentDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); + $this->current_document = $var; + + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php new file mode 100644 index 000000000000..53ebde35c2fc --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php @@ -0,0 +1,277 @@ +google.firestore.v1.WriteRequest + */ +class WriteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * This is only required in the first message. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * The ID of the write stream to resume. + * This may only be set in the first message. When left empty, a new write + * stream will be created. + * + * Generated from protobuf field string stream_id = 2; + */ + protected $stream_id = ''; + /** + * The writes to apply. + * Always executed atomically and in order. + * This must be empty on the first request. + * This may be empty on the last request. + * This must not be empty on all other requests. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; + */ + private $writes; + /** + * A stream token that was previously sent by the server. + * The client should set this field to the token from the most recent + * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has + * received responses up to this token. After sending this token, earlier + * tokens may not be used anymore. + * The server may close the stream if there are too many unacknowledged + * responses. + * Leave this field unset when creating a new stream. To resume a stream at + * a specific point, set this field and the `stream_id` field. + * Leave this field unset when creating a new stream. + * + * Generated from protobuf field bytes stream_token = 4; + */ + protected $stream_token = ''; + /** + * Labels associated with this write request. + * + * Generated from protobuf field map labels = 5; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * This is only required in the first message. + * @type string $stream_id + * The ID of the write stream to resume. + * This may only be set in the first message. When left empty, a new write + * stream will be created. + * @type array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $writes + * The writes to apply. + * Always executed atomically and in order. + * This must be empty on the first request. + * This may be empty on the last request. + * This must not be empty on all other requests. + * @type string $stream_token + * A stream token that was previously sent by the server. + * The client should set this field to the token from the most recent + * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has + * received responses up to this token. After sending this token, earlier + * tokens may not be used anymore. + * The server may close the stream if there are too many unacknowledged + * responses. + * Leave this field unset when creating a new stream. To resume a stream at + * a specific point, set this field and the `stream_id` field. + * Leave this field unset when creating a new stream. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels associated with this write request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * This is only required in the first message. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * This is only required in the first message. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The ID of the write stream to resume. + * This may only be set in the first message. When left empty, a new write + * stream will be created. + * + * Generated from protobuf field string stream_id = 2; + * @return string + */ + public function getStreamId() + { + return $this->stream_id; + } + + /** + * The ID of the write stream to resume. + * This may only be set in the first message. When left empty, a new write + * stream will be created. + * + * Generated from protobuf field string stream_id = 2; + * @param string $var + * @return $this + */ + public function setStreamId($var) + { + GPBUtil::checkString($var, True); + $this->stream_id = $var; + + return $this; + } + + /** + * The writes to apply. + * Always executed atomically and in order. + * This must be empty on the first request. + * This may be empty on the last request. + * This must not be empty on all other requests. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWrites() + { + return $this->writes; + } + + /** + * The writes to apply. + * Always executed atomically and in order. + * This must be empty on the first request. + * This may be empty on the last request. + * This must not be empty on all other requests. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; + * @param array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWrites($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); + $this->writes = $arr; + + return $this; + } + + /** + * A stream token that was previously sent by the server. + * The client should set this field to the token from the most recent + * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has + * received responses up to this token. After sending this token, earlier + * tokens may not be used anymore. + * The server may close the stream if there are too many unacknowledged + * responses. + * Leave this field unset when creating a new stream. To resume a stream at + * a specific point, set this field and the `stream_id` field. + * Leave this field unset when creating a new stream. + * + * Generated from protobuf field bytes stream_token = 4; + * @return string + */ + public function getStreamToken() + { + return $this->stream_token; + } + + /** + * A stream token that was previously sent by the server. + * The client should set this field to the token from the most recent + * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has + * received responses up to this token. After sending this token, earlier + * tokens may not be used anymore. + * The server may close the stream if there are too many unacknowledged + * responses. + * Leave this field unset when creating a new stream. To resume a stream at + * a specific point, set this field and the `stream_id` field. + * Leave this field unset when creating a new stream. + * + * Generated from protobuf field bytes stream_token = 4; + * @param string $var + * @return $this + */ + public function setStreamToken($var) + { + GPBUtil::checkString($var, False); + $this->stream_token = $var; + + return $this; + } + + /** + * Labels associated with this write request. + * + * Generated from protobuf field map labels = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels associated with this write request. + * + * 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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php new file mode 100644 index 000000000000..da2c8584a0fd --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php @@ -0,0 +1,203 @@ +google.firestore.v1.WriteResponse + */ +class WriteResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the stream. + * Only set on the first message, when a new stream was created. + * + * Generated from protobuf field string stream_id = 1; + */ + protected $stream_id = ''; + /** + * A token that represents the position of this response in the stream. + * This can be used by a client to resume the stream at this point. + * This field is always set. + * + * Generated from protobuf field bytes stream_token = 2; + */ + protected $stream_token = ''; + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; + */ + private $write_results; + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the write. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; + */ + protected $commit_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $stream_id + * The ID of the stream. + * Only set on the first message, when a new stream was created. + * @type string $stream_token + * A token that represents the position of this response in the stream. + * This can be used by a client to resume the stream at this point. + * This field is always set. + * @type array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $write_results + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * @type \Google\Protobuf\Timestamp $commit_time + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the write. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the stream. + * Only set on the first message, when a new stream was created. + * + * Generated from protobuf field string stream_id = 1; + * @return string + */ + public function getStreamId() + { + return $this->stream_id; + } + + /** + * The ID of the stream. + * Only set on the first message, when a new stream was created. + * + * Generated from protobuf field string stream_id = 1; + * @param string $var + * @return $this + */ + public function setStreamId($var) + { + GPBUtil::checkString($var, True); + $this->stream_id = $var; + + return $this; + } + + /** + * A token that represents the position of this response in the stream. + * This can be used by a client to resume the stream at this point. + * This field is always set. + * + * Generated from protobuf field bytes stream_token = 2; + * @return string + */ + public function getStreamToken() + { + return $this->stream_token; + } + + /** + * A token that represents the position of this response in the stream. + * This can be used by a client to resume the stream at this point. + * This field is always set. + * + * Generated from protobuf field bytes stream_token = 2; + * @param string $var + * @return $this + */ + public function setStreamToken($var) + { + GPBUtil::checkString($var, False); + $this->stream_token = $var; + + return $this; + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWriteResults() + { + return $this->write_results; + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; + * @param array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWriteResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); + $this->write_results = $arr; + + return $this; + } + + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the write. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCommitTime() + { + return $this->commit_time; + } + + public function hasCommitTime() + { + return isset($this->commit_time); + } + + public function clearCommitTime() + { + unset($this->commit_time); + } + + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the write. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCommitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->commit_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php new file mode 100644 index 000000000000..6e0830560d1a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php @@ -0,0 +1,127 @@ +google.firestore.v1.WriteResult + */ +class WriteResult extends \Google\Protobuf\Internal\Message +{ + /** + * The last update time of the document after applying the write. Not set + * after a `delete`. + * If the write did not actually change the document, this will be the + * previous update_time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + */ + protected $update_time = null; + /** + * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the + * same order. + * + * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; + */ + private $transform_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $update_time + * The last update time of the document after applying the write. Not set + * after a `delete`. + * If the write did not actually change the document, this will be the + * previous update_time. + * @type array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $transform_results + * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the + * same order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The last update time of the document after applying the write. Not set + * after a `delete`. + * If the write did not actually change the document, this will be the + * previous update_time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + * @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 document after applying the write. Not set + * after a `delete`. + * If the write did not actually change the document, this will be the + * previous update_time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + * @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 results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the + * same order. + * + * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransformResults() + { + return $this->transform_results; + } + + /** + * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the + * same order. + * + * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; + * @param array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransformResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->transform_results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php new file mode 100644 index 000000000000..cc2a363d177d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php @@ -0,0 +1,82 @@ +batchGetDocuments($database, $documents); + + /** @var BatchGetDocumentsResponse $element */ + foreach ($stream->readAll() 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 +{ + $database = '[DATABASE]'; + $documentsElement = '[DOCUMENTS]'; + + batch_get_documents_sample($database, $documentsElement); +} +// [END firestore_v1_generated_Firestore_BatchGetDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php new file mode 100644 index 000000000000..9e5779179479 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php @@ -0,0 +1,61 @@ +batchWrite(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END firestore_v1_generated_Firestore_BatchWrite_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php new file mode 100644 index 000000000000..28128ebfb622 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php @@ -0,0 +1,66 @@ +beginTransaction($database); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $database = '[DATABASE]'; + + begin_transaction_sample($database); +} +// [END firestore_v1_generated_Firestore_BeginTransaction_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php new file mode 100644 index 000000000000..491b4a012b67 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php @@ -0,0 +1,70 @@ +commit($database, $writes); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $database = '[DATABASE]'; + + commit_sample($database); +} +// [END firestore_v1_generated_Firestore_Commit_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php new file mode 100644 index 000000000000..15f9044c5f81 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php @@ -0,0 +1,76 @@ +createDocument($parent, $collectionId, $documentId, $document); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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]'; + $collectionId = '[COLLECTION_ID]'; + $documentId = '[DOCUMENT_ID]'; + + create_document_sample($parent, $collectionId, $documentId); +} +// [END firestore_v1_generated_Firestore_CreateDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php new file mode 100644 index 000000000000..97e21d5d7c5c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php @@ -0,0 +1,64 @@ +deleteDocument($name); + 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 +{ + $name = '[NAME]'; + + delete_document_sample($name); +} +// [END firestore_v1_generated_Firestore_DeleteDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php new file mode 100644 index 000000000000..c4faf05645f6 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php @@ -0,0 +1,66 @@ +getDocument($name); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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_document_sample($name); +} +// [END firestore_v1_generated_Firestore_GetDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php new file mode 100644 index 000000000000..c8e0d87e0faf --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php @@ -0,0 +1,72 @@ +listCollectionIds($parent); + + /** @var string $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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_collection_ids_sample($parent); +} +// [END firestore_v1_generated_Firestore_ListCollectionIds_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php new file mode 100644 index 000000000000..f40b25f8a731 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php @@ -0,0 +1,78 @@ +listDocuments($parent, $collectionId); + + /** @var Document $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]'; + $collectionId = '[COLLECTION_ID]'; + + list_documents_sample($parent, $collectionId); +} +// [END firestore_v1_generated_Firestore_ListDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php new file mode 100644 index 000000000000..259b4d59948b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php @@ -0,0 +1,77 @@ +setDatabase($database); + + // Call the API and handle any network failures. + try { + /** @var BidiStream $stream */ + $stream = $firestoreClient->listen(); + $stream->writeAll([$request,]); + + /** @var ListenResponse $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()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $database = '[DATABASE]'; + + listen_sample($database); +} +// [END firestore_v1_generated_Firestore_Listen_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php new file mode 100644 index 000000000000..b814b1872c4e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php @@ -0,0 +1,60 @@ +partitionQuery(); + + /** @var Cursor $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 firestore_v1_generated_Firestore_PartitionQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php new file mode 100644 index 000000000000..54bb38597023 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php @@ -0,0 +1,66 @@ +rollback($database, $transaction); + 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 +{ + $database = '[DATABASE]'; + $transaction = '...'; + + rollback_sample($database, $transaction); +} +// [END firestore_v1_generated_Firestore_Rollback_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php new file mode 100644 index 000000000000..5f922c586b47 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php @@ -0,0 +1,86 @@ +runAggregationQuery($parent); + + /** @var RunAggregationQueryResponse $element */ + foreach ($stream->readAll() 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]'; + + run_aggregation_query_sample($parent); +} +// [END firestore_v1_generated_Firestore_RunAggregationQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php new file mode 100644 index 000000000000..8070468dbdb0 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php @@ -0,0 +1,75 @@ +runQuery($parent); + + /** @var RunQueryResponse $element */ + foreach ($stream->readAll() 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]'; + + run_query_sample($parent); +} +// [END firestore_v1_generated_Firestore_RunQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php new file mode 100644 index 000000000000..18e8b86c9dc0 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php @@ -0,0 +1,58 @@ +updateDocument($document, $updateMask); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END firestore_v1_generated_Firestore_UpdateDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php new file mode 100644 index 000000000000..31b50cb0b66b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php @@ -0,0 +1,78 @@ +setDatabase($database); + + // Call the API and handle any network failures. + try { + /** @var BidiStream $stream */ + $stream = $firestoreClient->write(); + $stream->writeAll([$request,]); + + /** @var WriteResponse $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()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $database = '[DATABASE]'; + + write_sample($database); +} +// [END firestore_v1_generated_Firestore_Write_sync] diff --git a/owl-bot-staging/Firestore/v1/src/V1/FirestoreClient.php b/owl-bot-staging/Firestore/v1/src/V1/FirestoreClient.php new file mode 100644 index 000000000000..562fa636eec0 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/src/V1/FirestoreClient.php @@ -0,0 +1,34 @@ +batchGetDocuments($database, $documents); + * foreach ($stream->readAll() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $firestoreClient->close(); + * } + * ``` + */ +class FirestoreGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.firestore.v1.Firestore'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'firestore.googleapis.com'; + + /** 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/datastore', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/firestore_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/firestore_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 'firestore.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); + } + + /** + * Gets multiple documents. + * + * Documents returned by this method are not guaranteed to be returned in the + * same order that they were requested. + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * $database = 'database'; + * $documents = []; + * // Read all responses until the stream is complete + * $stream = $firestoreClient->batchGetDocuments($database, $documents); + * foreach ($stream->readAll() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $firestoreClient->close(); + * } + * ``` + * + * @param string $database Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @param string[] $documents The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + * @param array $optionalArgs { + * Optional. + * + * @type DocumentMask $mask + * The fields to return. If not set, returns all fields. + * + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + * @type string $transaction + * Reads documents in a transaction. + * @type TransactionOptions $newTransaction + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * @type Timestamp $readTime + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return \Google\ApiCore\ServerStream + * + * @throws ApiException if the remote call fails + */ + public function batchGetDocuments($database, $documents, array $optionalArgs = []) + { + $request = new BatchGetDocumentsRequest(); + $requestParamHeaders = []; + $request->setDatabase($database); + $request->setDocuments($documents); + $requestParamHeaders['database'] = $database; + if (isset($optionalArgs['mask'])) { + $request->setMask($optionalArgs['mask']); + } + + if (isset($optionalArgs['transaction'])) { + $request->setTransaction($optionalArgs['transaction']); + } + + if (isset($optionalArgs['newTransaction'])) { + $request->setNewTransaction($optionalArgs['newTransaction']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('BatchGetDocuments', BatchGetDocumentsResponse::class, $optionalArgs, $request, Call::SERVER_STREAMING_CALL); + } + + /** + * Applies a batch of write operations. + * + * The BatchWrite method does not apply the write operations atomically + * and can apply them out of order. Method does not allow more than one write + * per document. Each write succeeds or fails independently. See the + * [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the success status of each write. + * + * If you require an atomically applied set of writes, use + * [Commit][google.firestore.v1.Firestore.Commit] instead. + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * $response = $firestoreClient->batchWrite(); + * } finally { + * $firestoreClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type Write[] $writes + * The writes to apply. + * + * Method does not apply writes atomically and does not guarantee ordering. + * Each write succeeds or fails independently. You cannot write to the same + * document more than once per request. + * @type array $labels + * Labels associated with this batch write. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Firestore\V1\BatchWriteResponse + * + * @throws ApiException if the remote call fails + */ + public function batchWrite(array $optionalArgs = []) + { + $request = new BatchWriteRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['database'])) { + $request->setDatabase($optionalArgs['database']); + $requestParamHeaders['database'] = $optionalArgs['database']; + } + + if (isset($optionalArgs['writes'])) { + $request->setWrites($optionalArgs['writes']); + } + + if (isset($optionalArgs['labels'])) { + $request->setLabels($optionalArgs['labels']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('BatchWrite', BatchWriteResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Starts a new transaction. + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * $database = 'database'; + * $response = $firestoreClient->beginTransaction($database); + * } finally { + * $firestoreClient->close(); + * } + * ``` + * + * @param string $database Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type TransactionOptions $options + * The options for the transaction. + * Defaults to a read-write transaction. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Firestore\V1\BeginTransactionResponse + * + * @throws ApiException if the remote call fails + */ + public function beginTransaction($database, array $optionalArgs = []) + { + $request = new BeginTransactionRequest(); + $requestParamHeaders = []; + $request->setDatabase($database); + $requestParamHeaders['database'] = $database; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('BeginTransaction', BeginTransactionResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Commits a transaction, while optionally updating documents. + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * $database = 'database'; + * $writes = []; + * $response = $firestoreClient->commit($database, $writes); + * } finally { + * $firestoreClient->close(); + * } + * ``` + * + * @param string $database Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @param Write[] $writes The writes to apply. + * + * Always executed atomically and in order. + * @param array $optionalArgs { + * Optional. + * + * @type string $transaction + * If set, applies all writes in this transaction, and commits it. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Firestore\V1\CommitResponse + * + * @throws ApiException if the remote call fails + */ + public function commit($database, $writes, array $optionalArgs = []) + { + $request = new CommitRequest(); + $requestParamHeaders = []; + $request->setDatabase($database); + $request->setWrites($writes); + $requestParamHeaders['database'] = $database; + if (isset($optionalArgs['transaction'])) { + $request->setTransaction($optionalArgs['transaction']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Commit', CommitResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a new document. + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * $parent = 'parent'; + * $collectionId = 'collection_id'; + * $documentId = 'document_id'; + * $document = new Document(); + * $response = $firestoreClient->createDocument($parent, $collectionId, $documentId, $document); + * } finally { + * $firestoreClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource. For example: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + * @param string $collectionId Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`. + * @param string $documentId The client-assigned document ID to use for this document. + * + * Optional. If not specified, an ID will be assigned by the service. + * @param Document $document Required. The document to create. `name` must not be set. + * @param array $optionalArgs { + * Optional. + * + * @type DocumentMask $mask + * The fields to return. If not set, returns all fields. + * + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Firestore\V1\Document + * + * @throws ApiException if the remote call fails + */ + public function createDocument($parent, $collectionId, $documentId, $document, array $optionalArgs = []) + { + $request = new CreateDocumentRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setCollectionId($collectionId); + $request->setDocumentId($documentId); + $request->setDocument($document); + $requestParamHeaders['parent'] = $parent; + $requestParamHeaders['collection_id'] = $collectionId; + if (isset($optionalArgs['mask'])) { + $request->setMask($optionalArgs['mask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateDocument', Document::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a document. + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * $name = 'name'; + * $firestoreClient->deleteDocument($name); + * } finally { + * $firestoreClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @param array $optionalArgs { + * Optional. + * + * @type Precondition $currentDocument + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteDocument($name, array $optionalArgs = []) + { + $request = new DeleteDocumentRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['currentDocument'])) { + $request->setCurrentDocument($optionalArgs['currentDocument']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteDocument', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a single document. + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * $name = 'name'; + * $response = $firestoreClient->getDocument($name); + * } finally { + * $firestoreClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the Document to get. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @param array $optionalArgs { + * Optional. + * + * @type DocumentMask $mask + * The fields to return. If not set, returns all fields. + * + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * @type string $transaction + * Reads the document in a transaction. + * @type Timestamp $readTime + * Reads the version of the document at the given time. + * This may not be older than 270 seconds. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Firestore\V1\Document + * + * @throws ApiException if the remote call fails + */ + public function getDocument($name, array $optionalArgs = []) + { + $request = new GetDocumentRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['mask'])) { + $request->setMask($optionalArgs['mask']); + } + + if (isset($optionalArgs['transaction'])) { + $request->setTransaction($optionalArgs['transaction']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetDocument', Document::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists all the collection IDs underneath a document. + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * $parent = 'parent'; + * // Iterate over pages of elements + * $pagedResponse = $firestoreClient->listCollectionIds($parent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $firestoreClient->listCollectionIds($parent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $firestoreClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @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 Timestamp $readTime + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listCollectionIds($parent, array $optionalArgs = []) + { + $request = new ListCollectionIdsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListCollectionIds', $optionalArgs, ListCollectionIdsResponse::class, $request); + } + + /** + * Lists documents. + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * $parent = 'parent'; + * $collectionId = 'collection_id'; + * // Iterate over pages of elements + * $pagedResponse = $firestoreClient->listDocuments($parent, $collectionId); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $firestoreClient->listDocuments($parent, $collectionId); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $firestoreClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @param string $collectionId Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` + * or `messages`. + * @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 $orderBy + * The order to sort results by. For example: `priority desc, name`. + * @type DocumentMask $mask + * The fields to return. If not set, returns all fields. + * + * If a document has a field that is not present in this mask, that field + * will not be returned in the response. + * @type string $transaction + * Reads documents in a transaction. + * @type Timestamp $readTime + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * @type bool $showMissing + * If the list should show missing documents. A missing document is a + * document that does not exist but has sub-documents. These documents will + * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time], + * or [Document.update_time][google.firestore.v1.Document.update_time] set. + * + * Requests with `show_missing` may not specify `where` or + * `order_by`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listDocuments($parent, $collectionId, array $optionalArgs = []) + { + $request = new ListDocumentsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setCollectionId($collectionId); + $requestParamHeaders['parent'] = $parent; + $requestParamHeaders['collection_id'] = $collectionId; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['mask'])) { + $request->setMask($optionalArgs['mask']); + } + + if (isset($optionalArgs['transaction'])) { + $request->setTransaction($optionalArgs['transaction']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + if (isset($optionalArgs['showMissing'])) { + $request->setShowMissing($optionalArgs['showMissing']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListDocuments', $optionalArgs, ListDocumentsResponse::class, $request); + } + + /** + * Listens to changes. + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * $database = 'database'; + * $request = new ListenRequest(); + * $request->setDatabase($database); + * // Write all requests to the server, then read all responses until the + * // stream is complete + * $requests = [ + * $request, + * ]; + * $stream = $firestoreClient->listen(); + * $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 = $firestoreClient->listen(); + * 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 { + * $firestoreClient->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 + */ + public function listen(array $optionalArgs = []) + { + return $this->startCall('Listen', ListenResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL); + } + + /** + * Partitions a query by returning partition cursors that can be used to run + * the query in parallel. The returned partition cursors are split points that + * can be used by RunQuery as starting/end points for the query results. + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $firestoreClient->partitionQuery(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $firestoreClient->partitionQuery(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $firestoreClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $parent + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents`. + * Document resource names are not supported; only database resource names + * can be specified. + * @type StructuredQuery $structuredQuery + * A structured query. + * Query must specify collection with all descendants and be ordered by name + * ascending. Other filters, order bys, limits, offsets, and start/end + * cursors are not supported. + * @type int $partitionCount + * The desired maximum number of partition points. + * The partitions may be returned across multiple pages of results. + * The number must be positive. The actual number of partitions + * returned may be fewer. + * + * For example, this may be set to one fewer than the number of parallel + * queries to be run, or in running a data pipeline job, one fewer than the + * number of workers or compute instances available. + * @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 $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 Timestamp $readTime + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 partitionQuery(array $optionalArgs = []) + { + $request = new PartitionQueryRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['parent'])) { + $request->setParent($optionalArgs['parent']); + $requestParamHeaders['parent'] = $optionalArgs['parent']; + } + + if (isset($optionalArgs['structuredQuery'])) { + $request->setStructuredQuery($optionalArgs['structuredQuery']); + } + + if (isset($optionalArgs['partitionCount'])) { + $request->setPartitionCount($optionalArgs['partitionCount']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('PartitionQuery', $optionalArgs, PartitionQueryResponse::class, $request); + } + + /** + * Rolls back a transaction. + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * $database = 'database'; + * $transaction = '...'; + * $firestoreClient->rollback($database, $transaction); + * } finally { + * $firestoreClient->close(); + * } + * ``` + * + * @param string $database Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @param string $transaction Required. The transaction to roll back. + * @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 rollback($database, $transaction, array $optionalArgs = []) + { + $request = new RollbackRequest(); + $requestParamHeaders = []; + $request->setDatabase($database); + $request->setTransaction($transaction); + $requestParamHeaders['database'] = $database; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Rollback', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Runs an aggregation query. + * + * Rather than producing [Document][google.firestore.v1.Document] results like [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], + * this API allows running an aggregation to produce a series of + * [AggregationResult][google.firestore.v1.AggregationResult] server-side. + * + * High-Level Example: + * + * ``` + * -- Return the number of documents in table given a filter. + * SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); + * ``` + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * $parent = 'parent'; + * // Read all responses until the stream is complete + * $stream = $firestoreClient->runAggregationQuery($parent); + * foreach ($stream->readAll() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $firestoreClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @param array $optionalArgs { + * Optional. + * + * @type StructuredAggregationQuery $structuredAggregationQuery + * An aggregation query. + * @type string $transaction + * Run the aggregation within an already active transaction. + * + * The value here is the opaque transaction ID to execute the query in. + * @type TransactionOptions $newTransaction + * Starts a new transaction as part of the query, defaulting to read-only. + * + * The new transaction ID will be returned as the first response in the + * stream. + * @type Timestamp $readTime + * Executes the query at the given timestamp. + * + * Requires: + * + * * Cannot be more than 270 seconds in the past. + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return \Google\ApiCore\ServerStream + * + * @throws ApiException if the remote call fails + */ + public function runAggregationQuery($parent, array $optionalArgs = []) + { + $request = new RunAggregationQueryRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['structuredAggregationQuery'])) { + $request->setStructuredAggregationQuery($optionalArgs['structuredAggregationQuery']); + } + + if (isset($optionalArgs['transaction'])) { + $request->setTransaction($optionalArgs['transaction']); + } + + if (isset($optionalArgs['newTransaction'])) { + $request->setNewTransaction($optionalArgs['newTransaction']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RunAggregationQuery', RunAggregationQueryResponse::class, $optionalArgs, $request, Call::SERVER_STREAMING_CALL); + } + + /** + * Runs a query. + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * $parent = 'parent'; + * // Read all responses until the stream is complete + * $stream = $firestoreClient->runQuery($parent); + * foreach ($stream->readAll() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $firestoreClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @param array $optionalArgs { + * Optional. + * + * @type StructuredQuery $structuredQuery + * A structured query. + * @type string $transaction + * Run the query within an already active transaction. + * + * The value here is the opaque transaction ID to execute the query in. + * @type TransactionOptions $newTransaction + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * @type Timestamp $readTime + * Reads documents as they were at the given time. + * This may not be older than 270 seconds. + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return \Google\ApiCore\ServerStream + * + * @throws ApiException if the remote call fails + */ + public function runQuery($parent, array $optionalArgs = []) + { + $request = new RunQueryRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['structuredQuery'])) { + $request->setStructuredQuery($optionalArgs['structuredQuery']); + } + + if (isset($optionalArgs['transaction'])) { + $request->setTransaction($optionalArgs['transaction']); + } + + if (isset($optionalArgs['newTransaction'])) { + $request->setNewTransaction($optionalArgs['newTransaction']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RunQuery', RunQueryResponse::class, $optionalArgs, $request, Call::SERVER_STREAMING_CALL); + } + + /** + * Updates or inserts a document. + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * $document = new Document(); + * $updateMask = new DocumentMask(); + * $response = $firestoreClient->updateDocument($document, $updateMask); + * } finally { + * $firestoreClient->close(); + * } + * ``` + * + * @param Document $document Required. The updated document. + * Creates the document if it does not already exist. + * @param DocumentMask $updateMask The fields to update. + * None of the field paths in the mask may contain a reserved name. + * + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * @param array $optionalArgs { + * Optional. + * + * @type DocumentMask $mask + * The fields to return. If not set, returns all fields. + * + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * @type Precondition $currentDocument + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Firestore\V1\Document + * + * @throws ApiException if the remote call fails + */ + public function updateDocument($document, $updateMask, array $optionalArgs = []) + { + $request = new UpdateDocumentRequest(); + $requestParamHeaders = []; + $request->setDocument($document); + $request->setUpdateMask($updateMask); + $requestParamHeaders['document.name'] = $document->getName(); + if (isset($optionalArgs['mask'])) { + $request->setMask($optionalArgs['mask']); + } + + if (isset($optionalArgs['currentDocument'])) { + $request->setCurrentDocument($optionalArgs['currentDocument']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateDocument', Document::class, $optionalArgs, $request)->wait(); + } + + /** + * Streams batches of document updates and deletes, in order. + * + * Sample code: + * ``` + * $firestoreClient = new FirestoreClient(); + * try { + * $database = 'database'; + * $request = new WriteRequest(); + * $request->setDatabase($database); + * // Write all requests to the server, then read all responses until the + * // stream is complete + * $requests = [ + * $request, + * ]; + * $stream = $firestoreClient->write(); + * $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 = $firestoreClient->write(); + * 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 { + * $firestoreClient->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 + */ + public function write(array $optionalArgs = []) + { + return $this->startCall('Write', WriteResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL); + } +} diff --git a/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..16969eb8ec78 --- /dev/null +++ b/owl-bot-staging/Firestore/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.firestore.v1", + "libraryPackage": "Google\\Cloud\\Firestore\\V1", + "services": { + "Firestore": { + "clients": { + "grpc": { + "libraryClient": "FirestoreGapicClient", + "rpcs": { + "BatchGetDocuments": { + "methods": [ + "batchGetDocuments" + ] + }, + "BatchWrite": { + "methods": [ + "batchWrite" + ] + }, + "BeginTransaction": { + "methods": [ + "beginTransaction" + ] + }, + "Commit": { + "methods": [ + "commit" + ] + }, + "CreateDocument": { + "methods": [ + "createDocument" + ] + }, + "DeleteDocument": { + "methods": [ + "deleteDocument" + ] + }, + "GetDocument": { + "methods": [ + "getDocument" + ] + }, + "ListCollectionIds": { + "methods": [ + "listCollectionIds" + ] + }, + "ListDocuments": { + "methods": [ + "listDocuments" + ] + }, + "Listen": { + "methods": [ + "listen" + ] + }, + "PartitionQuery": { + "methods": [ + "partitionQuery" + ] + }, + "Rollback": { + "methods": [ + "rollback" + ] + }, + "RunAggregationQuery": { + "methods": [ + "runAggregationQuery" + ] + }, + "RunQuery": { + "methods": [ + "runQuery" + ] + }, + "UpdateDocument": { + "methods": [ + "updateDocument" + ] + }, + "Write": { + "methods": [ + "write" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json new file mode 100644 index 000000000000..0fb2c36f7df8 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json @@ -0,0 +1,174 @@ +{ + "interfaces": { + "google.firestore.v1.Firestore": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE" + ], + "retry_policy_2_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ], + "retry_policy_3_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ], + "no_retry_1_codes": [], + "retry_policy_4_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ], + "retry_policy_5_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE", + "ABORTED" + ] + }, + "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 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 86400000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 86400000, + "total_timeout_millis": 86400000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 86400000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 86400000, + "total_timeout_millis": 86400000 + }, + "retry_policy_4_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 + }, + "retry_policy_5_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 + } + }, + "methods": { + "BatchGetDocuments": { + "timeout_millis": 300000 + }, + "BatchWrite": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" + }, + "BeginTransaction": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "Commit": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "GetDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "ListCollectionIds": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "ListDocuments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "Listen": { + "timeout_millis": 86400000 + }, + "PartitionQuery": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "Rollback": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "RunAggregationQuery": { + "timeout_millis": 300000 + }, + "RunQuery": { + "timeout_millis": 300000 + }, + "UpdateDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "Write": { + "timeout_millis": 86400000 + } + } + } + } +} diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php new file mode 100644 index 000000000000..b11531b780ed --- /dev/null +++ b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php @@ -0,0 +1,63 @@ + [ + 'google.firestore.v1.Firestore' => [ + 'BatchGetDocuments' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + ], + 'ListCollectionIds' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCollectionIds', + ], + ], + 'ListDocuments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDocuments', + ], + ], + 'Listen' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + ], + 'PartitionQuery' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPartitions', + ], + ], + 'RunAggregationQuery' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + ], + 'RunQuery' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + ], + 'Write' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php new file mode 100644 index 000000000000..984cef14a450 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php @@ -0,0 +1,272 @@ + [ + 'google.firestore.v1.Firestore' => [ + 'BatchGetDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:batchGet', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'BatchWrite' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:batchWrite', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'BeginTransaction' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:beginTransaction', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'Commit' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:commit', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'CreateDocument' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/**}/{collection_id}', + 'body' => 'document', + 'placeholders' => [ + 'collection_id' => [ + 'getters' => [ + 'getCollectionId', + ], + ], + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'document_id', + ], + ], + 'DeleteDocument' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/documents/*/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDocument' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/documents/*/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCollectionIds' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:listCollectionIds', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDocuments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}/{collection_id}', + ], + ], + 'placeholders' => [ + 'collection_id' => [ + 'getters' => [ + 'getCollectionId', + ], + ], + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PartitionQuery' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:partitionQuery', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:partitionQuery', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'Rollback' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:rollback', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'RunAggregationQuery' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RunQuery' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:runQuery', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDocument' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{document.name=projects/*/databases/*/documents/*/**}', + 'body' => 'document', + 'placeholders' => [ + 'document.name' => [ + 'getters' => [ + 'getDocument', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Firestore/v1/tests/Unit/V1/FirestoreClientTest.php b/owl-bot-staging/Firestore/v1/tests/Unit/V1/FirestoreClientTest.php new file mode 100644 index 000000000000..f6ff9815bc72 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/tests/Unit/V1/FirestoreClientTest.php @@ -0,0 +1,1219 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return FirestoreClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new FirestoreClient($options); + } + + /** @test */ + public function batchGetDocumentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $missing = 'missing1069449574'; + $transaction2 = '17'; + $expectedResponse = new BatchGetDocumentsResponse(); + $expectedResponse->setMissing($missing); + $expectedResponse->setTransaction($transaction2); + $transport->addResponse($expectedResponse); + $missing2 = 'missing21243859865'; + $transaction3 = '18'; + $expectedResponse2 = new BatchGetDocumentsResponse(); + $expectedResponse2->setMissing($missing2); + $expectedResponse2->setTransaction($transaction3); + $transport->addResponse($expectedResponse2); + $missing3 = 'missing31243859866'; + $transaction4 = '19'; + $expectedResponse3 = new BatchGetDocumentsResponse(); + $expectedResponse3->setMissing($missing3); + $expectedResponse3->setTransaction($transaction4); + $transport->addResponse($expectedResponse3); + // Mock request + $database = 'database1789464955'; + $documents = []; + $serverStream = $gapicClient->batchGetDocuments($database, $documents); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/BatchGetDocuments', $actualFuncCall); + $actualValue = $actualRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $actualValue = $actualRequestObject->getDocuments(); + $this->assertProtobufEquals($documents, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchGetDocumentsExceptionTest() + { + $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()); + // Mock request + $database = 'database1789464955'; + $documents = []; + $serverStream = $gapicClient->batchGetDocuments($database, $documents); + $results = $serverStream->readAll(); + 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()); + } + + /** @test */ + public function batchWriteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchWriteResponse(); + $transport->addResponse($expectedResponse); + $response = $gapicClient->batchWrite(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/BatchWrite', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchWriteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->batchWrite(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function beginTransactionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $transaction = '-34'; + $expectedResponse = new BeginTransactionResponse(); + $expectedResponse->setTransaction($transaction); + $transport->addResponse($expectedResponse); + // Mock request + $database = 'database1789464955'; + $response = $gapicClient->beginTransaction($database); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/BeginTransaction', $actualFuncCall); + $actualValue = $actualRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function beginTransactionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $database = 'database1789464955'; + try { + $gapicClient->beginTransaction($database); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function commitTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new CommitResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $database = 'database1789464955'; + $writes = []; + $response = $gapicClient->commit($database, $writes); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/Commit', $actualFuncCall); + $actualValue = $actualRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $actualValue = $actualRequestObject->getWrites(); + $this->assertProtobufEquals($writes, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function commitExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $database = 'database1789464955'; + $writes = []; + try { + $gapicClient->commit($database, $writes); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Document(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $collectionId = 'collectionId-821242276'; + $documentId = 'documentId506676927'; + $document = new Document(); + $response = $gapicClient->createDocument($parent, $collectionId, $documentId, $document); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/CreateDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getCollectionId(); + $this->assertProtobufEquals($collectionId, $actualValue); + $actualValue = $actualRequestObject->getDocumentId(); + $this->assertProtobufEquals($documentId, $actualValue); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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'; + $collectionId = 'collectionId-821242276'; + $documentId = 'documentId506676927'; + $document = new Document(); + try { + $gapicClient->createDocument($parent, $collectionId, $documentId, $document); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $gapicClient->deleteDocument($name); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/DeleteDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->deleteDocument($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 getDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Document(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->getDocument($name); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/GetDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->getDocument($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 listCollectionIdsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $collectionIdsElement = 'collectionIdsElement1368994900'; + $collectionIds = [ + $collectionIdsElement, + ]; + $expectedResponse = new ListCollectionIdsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCollectionIds($collectionIds); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $response = $gapicClient->listCollectionIds($parent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCollectionIds()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/ListCollectionIds', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCollectionIdsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->listCollectionIds($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 listDocumentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $documentsElement = new Document(); + $documents = [ + $documentsElement, + ]; + $expectedResponse = new ListDocumentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDocuments($documents); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $collectionId = 'collectionId-821242276'; + $response = $gapicClient->listDocuments($parent, $collectionId); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDocuments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/ListDocuments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getCollectionId(); + $this->assertProtobufEquals($collectionId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDocumentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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'; + $collectionId = 'collectionId-821242276'; + try { + $gapicClient->listDocuments($parent, $collectionId); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListenResponse(); + $transport->addResponse($expectedResponse); + $expectedResponse2 = new ListenResponse(); + $transport->addResponse($expectedResponse2); + $expectedResponse3 = new ListenResponse(); + $transport->addResponse($expectedResponse3); + // Mock request + $database = 'database1789464955'; + $request = new ListenRequest(); + $request->setDatabase($database); + $database2 = 'database21688906350'; + $request2 = new ListenRequest(); + $request2->setDatabase($database2); + $database3 = 'database31688906351'; + $request3 = new ListenRequest(); + $request3->setDatabase($database3); + $bidi = $gapicClient->listen(); + $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.firestore.v1.Firestore/Listen', $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 listenExceptionTest() + { + $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->listen(); + $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()); + } + + /** @test */ + public function partitionQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $partitionsElement = new Cursor(); + $partitions = [ + $partitionsElement, + ]; + $expectedResponse = new PartitionQueryResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPartitions($partitions); + $transport->addResponse($expectedResponse); + $response = $gapicClient->partitionQuery(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPartitions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/PartitionQuery', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function partitionQueryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->partitionQuery(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rollbackTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $database = 'database1789464955'; + $transaction = '-34'; + $gapicClient->rollback($database, $transaction); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/Rollback', $actualFuncCall); + $actualValue = $actualRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $actualValue = $actualRequestObject->getTransaction(); + $this->assertProtobufEquals($transaction, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rollbackExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $database = 'database1789464955'; + $transaction = '-34'; + try { + $gapicClient->rollback($database, $transaction); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runAggregationQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $transaction2 = '17'; + $expectedResponse = new RunAggregationQueryResponse(); + $expectedResponse->setTransaction($transaction2); + $transport->addResponse($expectedResponse); + $transaction3 = '18'; + $expectedResponse2 = new RunAggregationQueryResponse(); + $expectedResponse2->setTransaction($transaction3); + $transport->addResponse($expectedResponse2); + $transaction4 = '19'; + $expectedResponse3 = new RunAggregationQueryResponse(); + $expectedResponse3->setTransaction($transaction4); + $transport->addResponse($expectedResponse3); + // Mock request + $parent = 'parent-995424086'; + $serverStream = $gapicClient->runAggregationQuery($parent); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/RunAggregationQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runAggregationQueryExceptionTest() + { + $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()); + // Mock request + $parent = 'parent-995424086'; + $serverStream = $gapicClient->runAggregationQuery($parent); + $results = $serverStream->readAll(); + 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()); + } + + /** @test */ + public function runQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $transaction2 = '17'; + $skippedResults = 880286183; + $done = true; + $expectedResponse = new RunQueryResponse(); + $expectedResponse->setTransaction($transaction2); + $expectedResponse->setSkippedResults($skippedResults); + $expectedResponse->setDone($done); + $transport->addResponse($expectedResponse); + $transaction3 = '18'; + $skippedResults2 = 153532454; + $done2 = false; + $expectedResponse2 = new RunQueryResponse(); + $expectedResponse2->setTransaction($transaction3); + $expectedResponse2->setSkippedResults($skippedResults2); + $expectedResponse2->setDone($done2); + $transport->addResponse($expectedResponse2); + $transaction4 = '19'; + $skippedResults3 = 153532453; + $done3 = true; + $expectedResponse3 = new RunQueryResponse(); + $expectedResponse3->setTransaction($transaction4); + $expectedResponse3->setSkippedResults($skippedResults3); + $expectedResponse3->setDone($done3); + $transport->addResponse($expectedResponse3); + // Mock request + $parent = 'parent-995424086'; + $serverStream = $gapicClient->runQuery($parent); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/RunQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runQueryExceptionTest() + { + $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()); + // Mock request + $parent = 'parent-995424086'; + $serverStream = $gapicClient->runQuery($parent); + $results = $serverStream->readAll(); + 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()); + } + + /** @test */ + public function updateDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Document(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $updateMask = new DocumentMask(); + $response = $gapicClient->updateDocument($document, $updateMask); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/UpdateDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + $updateMask = new DocumentMask(); + try { + $gapicClient->updateDocument($document, $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()); + } + + /** @test */ + public function writeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $streamId = 'streamId-315624902'; + $streamToken = '122'; + $expectedResponse = new WriteResponse(); + $expectedResponse->setStreamId($streamId); + $expectedResponse->setStreamToken($streamToken); + $transport->addResponse($expectedResponse); + $streamId2 = 'streamId21627150189'; + $streamToken2 = '-83'; + $expectedResponse2 = new WriteResponse(); + $expectedResponse2->setStreamId($streamId2); + $expectedResponse2->setStreamToken($streamToken2); + $transport->addResponse($expectedResponse2); + $streamId3 = 'streamId31627150190'; + $streamToken3 = '-82'; + $expectedResponse3 = new WriteResponse(); + $expectedResponse3->setStreamId($streamId3); + $expectedResponse3->setStreamToken($streamToken3); + $transport->addResponse($expectedResponse3); + // Mock request + $database = 'database1789464955'; + $request = new WriteRequest(); + $request->setDatabase($database); + $database2 = 'database21688906350'; + $request2 = new WriteRequest(); + $request2->setDatabase($database2); + $database3 = 'database31688906351'; + $request3 = new WriteRequest(); + $request3->setDatabase($database3); + $bidi = $gapicClient->write(); + $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.firestore.v1.Firestore/Write', $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 writeExceptionTest() + { + $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->write(); + $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/Functions/v1/proto/src/GPBMetadata/Google/Cloud/Functions/V1/Functions.php b/owl-bot-staging/Functions/v1/proto/src/GPBMetadata/Google/Cloud/Functions/V1/Functions.php new file mode 100644 index 0000000000000000000000000000000000000000..b94b9d5fbe2f2ed585a3e54c6abc120fce22d3f4 GIT binary patch literal 8448 zcmb_h%X8bt84o2(mR1i_kQLMPBQWeXvSN|7oL6Z(3HXv3(81ZdFTHkr=pnsjrqdic(~kdyociqx1WAda()wV5yZb%&d;E6y z!N=|WHo7TqVjH`V>p()+u7U0u5381wrOEEASOaSfc3n~u}8aMG}xP9wS3u?^pJY%kfp+xwBAToJPM7WUe@f#uCg`U&>+hVJV- zo0P#$hA`O43kEyeckd%)Si0xQ!615xWcb(a>{_NFd%o_&pIfG9Xu%zvJ5XsosRaQSh~MjKkEnxue>) zL%aYUPo;V`^;n!ln6XT3`)8xco7ifk@xIY$XeN3qoKA{!|>;?8EWp zamurj6&<_jc5K_Un>*z;$%?aiH3*h$htZC&aX?Bv{6zN-egJLVgyiz|R{MBb8r$n1 znLLu!Mk5H^JS6yP5Nagw-bP>l6x|*>v!%;yX@VAkgh(Jt>N=-2^%f~K@JDOYDB<(*{`tPSn|#jd?RU}%_Ip48 zEnH9mk`2D8d|p(&V4hjfg015#gn7XVU+fQCp!|CYEzp`Ls+%;A&XEcki^!4HS!o%~ zHF&jwK#Wb$!K+AOiKOYSv2S*<)^V-aB$<2khV%$6@mUwQ9nXX^br?GblXDyIB$(O9 zY*C^{D|s~_0Zvx}PMx;p=nX0+%Ef$w7WRF=?P6&|{H7)1$IUKVvP!)r?TQhvg#s|m<^W@>SEV}AkoZ5 zY!Qei*+dpigBsZKVi)8|h=F$nr{OeB^m!;zq+~hb8A(Sg*zTIHW4FkLb#>Pywt2B7 z$}~MT(_D|swqU|USm?@b$Ak)Syr8R8(B{~J(uCK^(qMaS>_2zhgP26!zJeB7`U}7i z5KjOJyx2t;o|4G02|f*mWii}s8=B$RHZ~x`VsBC=pQCGi!y0Zv(egA8`#!W3FLnu* zEpBASwqm<&WQ2?yP>Wm#tY1H=1`Em1OUTi#ytcm^cWvXm(dd2LE={ILOMBCEKVJ>f@ath1m_jXlx7}8 zEgPoNZuBOepsOA>01BND4cBNij4U=aN)HhLaVC9?7CFDJV|AcM#;%XcVVe?war3;a z`pyBiV{Zv%&q<%6rG{e=i$fJxq4UY_)jMcScYSkDH+&a2O%Kv((1pFKD^<{ifEQaF zy9t~YH$E79Q?pc;Dwh>sM|0s!o1s+QZV=4v&qmaEqbrOleQRjO5TnL@sh%SPXj zE}`X0wXm($b6Qm`ZRToPxm0`>jX-gqQ;S8dURCq?LMA$)yg(NQb3sN|f#oRn3uqR& zl%HzwKQIMp>}R1=&s9rmkx83?Zg6Q}LM>&r%}g;Jom75~7W+3$dJA32mNSoYRjr!a zEY#}NX9H%vi6rnqT`iPCYe0b&w4_$+g}j=n2c*%7l>J&gK=07>?SV1|1bRtK&Rqcp zc>o>lbEs=x@+JQ|N?MM=z;N=V_&n+z?vgJB>!b7nn&X*bI1QYhg}%vJzLG-GL6{*y zKoIo8;0`2N0|VAL#0+duyhHn#^4AEO590?Z8X{z^?g>ruj%)gdngz(hqG7$b@!p8k z3A0Q<$)MClLaaPR3w;C9bri4VGF#O`{h3zGZRd&u`vO>w&gUQ?o~qAkuqDgr0v{?@ z>V+}{1q9o#z?3kKktBpbA^}2&ZGrrvXhz^&4*Q^GaooVL9^j|NJ-`he7jxjtG1%$| zd-IHdor@F$E%XgQot%QA3xJXA$J|Ib)km195~@dU#LuHC`k9_V(@^mMk0=#1-&c$K zN&uM7LyX`ShHn=E)Y0P2?F7R)wxKw7R{0A!kg?>&8Mw44kZSAxK98kwIB%jE&e;Rj z1Rjlwm9R(>E8wYZhPmPi8Y{g40w0CWEVKdFQ{||M%I_j*CF5d1c_Qhm_!k{Gx=HuZ zjL0u$Nc#47>ICh;Vtl9t7kO^N_RWYqq`sWn7!?bBaF3+Wgz{_9Ym1`KLA}DPS#X?< zwUi8SEjb`@^@ee6aQcP(lQywGsD~OpAEob6->jdhyg`q-ScE<-ID5kN@1yCq?m`}N z$1~h>y4RP`Y+G+)&4ZgKYS$FWXgb8O0zH~3UxIH3|9*8{Yi(Jf2(Rk-zk=PWIu zbL5tg)dv=-kI}_`VceG&(L8=;38WSTcNp$%bNnCe`n$Ss`YOZ{Q;({RSJh#a?JfvLzZ2{2p zq9cmwIprR@ax8t%T@B8b9`C8pwckcyE5ne09hapap&OZEc`K{sw@Mk(&$L=yt#1wD zE`+85gA}%N&;jSr`EovA1gsLBkN~-4bCqKGnN}!im1>#7tLP*fFXjNJg~!hk;;qu- zQu%2qI<@ipC8(KUrMwzDMoWK+poPB7l9D4@VBbo<%kiI#Pry8G`VlpB|&yaRM1!I zt-(9B|Z*jgaW^AuXkhcW_Wcd)>o4^q z?dxAUrhNx2#@1L4jB6H;u~%?3Uf~y#kT>*^C6Q~j{X^;44f`{ozHrHxMqc&}H=_8c zq7Y_Wh4(4amz4rF?*nCnZr`}(r3{drimZLB&JvP4q;pBHB4|m};h@Dx_e6rw(^=o0 zd17d_*ppE=c*hWNTRx?>WR;K4RIcD{i@gm7I)h=-H_#r0q)=0mMuF#J)(eB)AHxeF zF~Rl}sY!W7J=^vOlR_+sQD4(Tg&({%Ns3SlUKZdH0}y|2QmDQ%u!f(jSm0!okEmwi z9Ct!x>#M&hxGD@(AZq;v)Pg<`j18$3o;*dZJayP7(hpFp8CC%@QL4jXg(!vHmg$ju zXHN=x6L;9~5~1Ji0k<8ulE-bC>ReE=XLqGPq#`&p{qX(E#2R9+*bNO6X+UTg$kpFlR3R8K(SXLm97%`EX^xl)3J2B znQ+`@5(1Of!DR1p=9m}t`+?qnn3&wm0Hd68xf5JwniwvEf?tP6uhkdh zTnE?26$JN@RdPF?d`T{zUHCjo8sb(NM%g#Hl|I^?rXITYcJNYphdrT(UfjupkZBzA P+D=!pSMeisgwTHh#Wnft literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Functions/v1/proto/src/GPBMetadata/Google/Cloud/Functions/V1/Operations.php b/owl-bot-staging/Functions/v1/proto/src/GPBMetadata/Google/Cloud/Functions/V1/Operations.php new file mode 100644 index 0000000000000000000000000000000000000000..ae83f8b24c1787cc83322cddda977288ab52f68f GIT binary patch literal 1278 zcma)6U2oGc6s6nPhX-TIhLlZ07#LbNL81AqEF4uxyR=opPLV#*aZWx;4w}xM*@d%IDz58;vlB z0Ua|EV{Sp%>cMWW58YO$|3bE=G~)qwU_@yYV>^gx7TTjM2?U`@YG2lD$`rSHvT|Ag z5;VpsLji`zUgHZEC`1DJ$2o)FR1AK*Wbn^xhX4dIN>kX=OyDPg^2f4aOahn+$sfQS zk`72h1VJ(RA!j*)BNV4tw$EZqg-|v0k^ootV8N-dJB-TNk6@|EQ+7xz{7xb;Pf+Z) za2jyJ1m&KDI!=UzHc?fod(&eT9T~xDq0w<>L>@uGGko)O2ssuRPY!e4ir`BB^Y3s> ztE(py$GINpy8oYDeIjo|pfS63tf9)^0*wv0qoOH)F3!Jh@N|NmJqwhFA3 z=f)~;CABVV+s~&od1$2hwkU-bIePhf4s7U1lrcK58EarsATDpjtiVcj#dr@E#DrmU zPCl(2RIPiDv@}~^;*Hl}iR15?G{>Bmt*Zx{Wos$Pl8ze&0GF7jGT;LenhO#+Z`fcp zV=~ovphTMw^Y-nTc5S_}4wi=*i9fkkfc1(ho_VcX#W_`M zxu4ye$oa-E@JxOR$~k5)tzqiL)soUYpI+r_V`_XvW0XV|<&hoXB=^!TULi)(J3b+Y fIv2ym9R6-sr|wO$J~y`Q-c8Gq#Zp{>D**licjT49 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionRequest.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionRequest.php new file mode 100644 index 000000000000..33ec9884a38b --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionRequest.php @@ -0,0 +1,101 @@ +google.cloud.functions.v1.CallFunctionRequest + */ +class CallFunctionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the function to be called. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Input to be passed to the function. + * + * Generated from protobuf field string data = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the function to be called. + * @type string $data + * Required. Input to be passed to the function. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the function to be called. + * + * Generated 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 function to be called. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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. Input to be passed to the function. + * + * Generated from protobuf field string data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Required. Input to be passed to the function. + * + * Generated from protobuf field string data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, True); + $this->data = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionResponse.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionResponse.php new file mode 100644 index 000000000000..bb7004f8e9d2 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionResponse.php @@ -0,0 +1,143 @@ +google.cloud.functions.v1.CallFunctionResponse + */ +class CallFunctionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Execution id of function invocation. + * + * Generated from protobuf field string execution_id = 1; + */ + protected $execution_id = ''; + /** + * Result populated for successful execution of synchronous function. Will + * not be populated if function does not return a result through context. + * + * Generated from protobuf field string result = 2; + */ + protected $result = ''; + /** + * Either system or user-function generated error. Set if execution + * was not successful. + * + * Generated from protobuf field string error = 3; + */ + protected $error = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $execution_id + * Execution id of function invocation. + * @type string $result + * Result populated for successful execution of synchronous function. Will + * not be populated if function does not return a result through context. + * @type string $error + * Either system or user-function generated error. Set if execution + * was not successful. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Execution id of function invocation. + * + * Generated from protobuf field string execution_id = 1; + * @return string + */ + public function getExecutionId() + { + return $this->execution_id; + } + + /** + * Execution id of function invocation. + * + * 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; + } + + /** + * Result populated for successful execution of synchronous function. Will + * not be populated if function does not return a result through context. + * + * Generated from protobuf field string result = 2; + * @return string + */ + public function getResult() + { + return $this->result; + } + + /** + * Result populated for successful execution of synchronous function. Will + * not be populated if function does not return a result through context. + * + * Generated from protobuf field string result = 2; + * @param string $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkString($var, True); + $this->result = $var; + + return $this; + } + + /** + * Either system or user-function generated error. Set if execution + * was not successful. + * + * Generated from protobuf field string error = 3; + * @return string + */ + public function getError() + { + return $this->error; + } + + /** + * Either system or user-function generated error. Set if execution + * was not successful. + * + * Generated from protobuf field string error = 3; + * @param string $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkString($var, True); + $this->error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction.php new file mode 100644 index 000000000000..3ed5aa36e7f3 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction.php @@ -0,0 +1,1587 @@ +google.cloud.functions.v1.CloudFunction + */ +class CloudFunction extends \Google\Protobuf\Internal\Message +{ + /** + * A user-defined name of the function. Function names must be unique + * globally and match pattern `projects/*/locations/*/functions/*` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * User-provided description of a function. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Output only. Status of the function deployment. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunctionStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = 0; + /** + * The name of the function (as defined in source code) that will be + * executed. Defaults to the resource name suffix, if not specified. For + * backward compatibility, if function with given name is not found, then the + * system will try to use function named "function". + * For Node.js this is name of a function exported by the module specified + * in `source_location`. + * + * Generated from protobuf field string entry_point = 8; + */ + protected $entry_point = ''; + /** + * The runtime in which to run the function. Required when deploying a new + * function, optional when updating an existing function. For a complete + * list of possible choices, see the + * [`gcloud` command + * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). + * + * Generated from protobuf field string runtime = 19; + */ + protected $runtime = ''; + /** + * The function execution timeout. Execution is considered failed and + * can be terminated if the function is not completed at the end of the + * timeout period. Defaults to 60 seconds. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 9; + */ + protected $timeout = null; + /** + * The amount of memory in MB available for a function. + * Defaults to 256MB. + * + * Generated from protobuf field int32 available_memory_mb = 10; + */ + protected $available_memory_mb = 0; + /** + * The email of the function's service account. If empty, defaults to + * `{project_id}@appspot.gserviceaccount.com`. + * + * Generated from protobuf field string service_account_email = 11; + */ + protected $service_account_email = ''; + /** + * Output only. The last update timestamp of a Cloud Function. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The version identifier of the Cloud Function. Each deployment attempt + * results in a new version of a function being created. + * + * Generated from protobuf field int64 version_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $version_id = 0; + /** + * Labels associated with this Cloud Function. + * + * Generated from protobuf field map labels = 15; + */ + private $labels; + /** + * Environment variables that shall be available during function execution. + * + * Generated from protobuf field map environment_variables = 17; + */ + private $environment_variables; + /** + * Build environment variables that shall be available during build time. + * + * Generated from protobuf field map build_environment_variables = 28; + */ + private $build_environment_variables; + /** + * The VPC Network that this cloud function can connect to. It can be + * either the fully-qualified URI, or the short name of the network resource. + * If the short network name is used, the network must belong to the same + * project. Otherwise, it must belong to a project within the same + * organization. The format of this field is either + * `projects/{project}/global/networks/{network}` or `{network}`, where + * `{project}` is a project id where the network is defined, and `{network}` + * is the short name of the network. + * This field is mutually exclusive with `vpc_connector` and will be replaced + * by it. + * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for + * more information on connecting Cloud projects. + * + * Generated from protobuf field string network = 18; + */ + protected $network = ''; + /** + * The limit on the maximum number of function instances that may coexist at a + * given time. + * In some cases, such as rapid traffic surges, Cloud Functions may, for a + * short period of time, create more instances than the specified max + * instances limit. If your function cannot tolerate this temporary behavior, + * you may want to factor in a safety margin and set a lower max instances + * value than your function can tolerate. + * See the [Max + * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for + * more details. + * + * Generated from protobuf field int32 max_instances = 20; + */ + protected $max_instances = 0; + /** + * A lower bound for the number function instances that may coexist at a + * given time. + * + * Generated from protobuf field int32 min_instances = 32; + */ + protected $min_instances = 0; + /** + * The VPC Network Connector that this cloud function can connect to. It can + * be either the fully-qualified URI, or the short name of the network + * connector resource. The format of this field is + * `projects/*/locations/*/connectors/*` + * This field is mutually exclusive with `network` field and will eventually + * replace it. + * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for + * more information on connecting Cloud projects. + * + * Generated from protobuf field string vpc_connector = 22; + */ + protected $vpc_connector = ''; + /** + * The egress settings for the connector, controlling what traffic is diverted + * through it. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings vpc_connector_egress_settings = 23; + */ + protected $vpc_connector_egress_settings = 0; + /** + * The ingress settings for the function, controlling what traffic can reach + * it. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.IngressSettings ingress_settings = 24; + */ + protected $ingress_settings = 0; + /** + * Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt function resources. + * It must match the pattern + * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * If specified, you must also provide an artifact registry repository using + * the `docker_repository` field that was created with the same KMS crypto + * key. + * The following service accounts need to be granted the role 'Cloud KMS + * CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' + * on the Key/KeyRing/Project/Organization (least access preferred). + * 1. Google Cloud Functions service account + * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - + * Required to protect the function's image. + * 2. Google Storage service account + * (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - + * Required to protect the function's source code. + * If this service account does not exist, deploying a function without a + * KMS key or retrieving the service agent name provisions it. For more + * information, see + * https://cloud.google.com/storage/docs/projects#service-agents and + * https://cloud.google.com/storage/docs/getting-service-agent#gsutil. + * Google Cloud Functions delegates access to service agents to protect + * function resources in internal projects that are not accessible by the + * end user. + * + * Generated from protobuf field string kms_key_name = 25 [(.google.api.resource_reference) = { + */ + protected $kms_key_name = ''; + /** + * Name of the Cloud Build Custom Worker Pool that should be used to build the + * function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * `{project}` and `{region}` are the project id and region respectively where + * the worker pool is defined and `{workerPool}` is the short name of the + * worker pool. + * If the project id is not the same as the function, then the Cloud + * Functions Service Agent + * (`service-@gcf-admin-robot.iam.gserviceaccount.com`) must + * be granted the role Cloud Build Custom Workers Builder + * (`roles/cloudbuild.customworkers.builder`) in the project. + * + * Generated from protobuf field string build_worker_pool = 26; + */ + protected $build_worker_pool = ''; + /** + * Output only. The Cloud Build ID of the latest successful deployment of the + * function. + * + * Generated from protobuf field string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $build_id = ''; + /** + * Output only. The Cloud Build Name of the function deployment. + * `projects//locations//builds/`. + * + * Generated from protobuf field string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $build_name = ''; + /** + * Secret environment variables configuration. + * + * Generated from protobuf field repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + */ + private $secret_environment_variables; + /** + * Secret volumes configuration. + * + * Generated from protobuf field repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + private $secret_volumes; + /** + * Input only. An identifier for Firebase function sources. Disclaimer: This field is only + * supported for Firebase function deployments. + * + * Generated from protobuf field string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $source_token = ''; + /** + * User managed repository created in Artifact Registry optionally with a + * customer managed encryption key. If specified, deployments will use + * Artifact Registry. If unspecified and the deployment is eligible to use + * Artifact Registry, GCF will create and use a repository named + * 'gcf-artifacts' for every deployed region. This is the repository to which + * the function docker image will be pushed after it is built by Cloud Build. + * It must match the pattern + * `projects/{project}/locations/{location}/repositories/{repository}`. + * Cross-project repositories are not supported. + * Cross-location repositories are not supported. + * Repository format must be 'DOCKER'. + * + * Generated from protobuf field string docker_repository = 34 [(.google.api.resource_reference) = { + */ + protected $docker_repository = ''; + /** + * Docker Registry to use for this deployment. + * If `docker_repository` field is specified, this field will be automatically + * set as `ARTIFACT_REGISTRY`. + * If unspecified, it currently defaults to `CONTAINER_REGISTRY`. + * This field may be overridden by the backend for eligible deployments. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.DockerRegistry docker_registry = 35; + */ + protected $docker_registry = 0; + protected $source_code; + protected $trigger; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * A user-defined name of the function. Function names must be unique + * globally and match pattern `projects/*/locations/*/functions/*` + * @type string $description + * User-provided description of a function. + * @type string $source_archive_url + * The Google Cloud Storage URL, starting with `gs://`, pointing to the zip + * archive which contains the function. + * @type \Google\Cloud\Functions\V1\SourceRepository $source_repository + * **Beta Feature** + * The source repository where a function is hosted. + * @type string $source_upload_url + * The Google Cloud Storage signed URL used for source uploading, generated + * by calling [google.cloud.functions.v1.GenerateUploadUrl]. + * The signature is validated on write methods (Create, Update) + * The signature is stripped from the Function object on read methods (Get, + * List) + * @type \Google\Cloud\Functions\V1\HttpsTrigger $https_trigger + * An HTTPS endpoint type of source that can be triggered via URL. + * @type \Google\Cloud\Functions\V1\EventTrigger $event_trigger + * A source that fires events in response to a condition in another service. + * @type int $status + * Output only. Status of the function deployment. + * @type string $entry_point + * The name of the function (as defined in source code) that will be + * executed. Defaults to the resource name suffix, if not specified. For + * backward compatibility, if function with given name is not found, then the + * system will try to use function named "function". + * For Node.js this is name of a function exported by the module specified + * in `source_location`. + * @type string $runtime + * The runtime in which to run the function. Required when deploying a new + * function, optional when updating an existing function. For a complete + * list of possible choices, see the + * [`gcloud` command + * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). + * @type \Google\Protobuf\Duration $timeout + * The function execution timeout. Execution is considered failed and + * can be terminated if the function is not completed at the end of the + * timeout period. Defaults to 60 seconds. + * @type int $available_memory_mb + * The amount of memory in MB available for a function. + * Defaults to 256MB. + * @type string $service_account_email + * The email of the function's service account. If empty, defaults to + * `{project_id}@appspot.gserviceaccount.com`. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update timestamp of a Cloud Function. + * @type int|string $version_id + * Output only. The version identifier of the Cloud Function. Each deployment attempt + * results in a new version of a function being created. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels associated with this Cloud Function. + * @type array|\Google\Protobuf\Internal\MapField $environment_variables + * Environment variables that shall be available during function execution. + * @type array|\Google\Protobuf\Internal\MapField $build_environment_variables + * Build environment variables that shall be available during build time. + * @type string $network + * The VPC Network that this cloud function can connect to. It can be + * either the fully-qualified URI, or the short name of the network resource. + * If the short network name is used, the network must belong to the same + * project. Otherwise, it must belong to a project within the same + * organization. The format of this field is either + * `projects/{project}/global/networks/{network}` or `{network}`, where + * `{project}` is a project id where the network is defined, and `{network}` + * is the short name of the network. + * This field is mutually exclusive with `vpc_connector` and will be replaced + * by it. + * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for + * more information on connecting Cloud projects. + * @type int $max_instances + * The limit on the maximum number of function instances that may coexist at a + * given time. + * In some cases, such as rapid traffic surges, Cloud Functions may, for a + * short period of time, create more instances than the specified max + * instances limit. If your function cannot tolerate this temporary behavior, + * you may want to factor in a safety margin and set a lower max instances + * value than your function can tolerate. + * See the [Max + * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for + * more details. + * @type int $min_instances + * A lower bound for the number function instances that may coexist at a + * given time. + * @type string $vpc_connector + * The VPC Network Connector that this cloud function can connect to. It can + * be either the fully-qualified URI, or the short name of the network + * connector resource. The format of this field is + * `projects/*/locations/*/connectors/*` + * This field is mutually exclusive with `network` field and will eventually + * replace it. + * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for + * more information on connecting Cloud projects. + * @type int $vpc_connector_egress_settings + * The egress settings for the connector, controlling what traffic is diverted + * through it. + * @type int $ingress_settings + * The ingress settings for the function, controlling what traffic can reach + * it. + * @type string $kms_key_name + * Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt function resources. + * It must match the pattern + * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * If specified, you must also provide an artifact registry repository using + * the `docker_repository` field that was created with the same KMS crypto + * key. + * The following service accounts need to be granted the role 'Cloud KMS + * CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' + * on the Key/KeyRing/Project/Organization (least access preferred). + * 1. Google Cloud Functions service account + * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - + * Required to protect the function's image. + * 2. Google Storage service account + * (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - + * Required to protect the function's source code. + * If this service account does not exist, deploying a function without a + * KMS key or retrieving the service agent name provisions it. For more + * information, see + * https://cloud.google.com/storage/docs/projects#service-agents and + * https://cloud.google.com/storage/docs/getting-service-agent#gsutil. + * Google Cloud Functions delegates access to service agents to protect + * function resources in internal projects that are not accessible by the + * end user. + * @type string $build_worker_pool + * Name of the Cloud Build Custom Worker Pool that should be used to build the + * function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * `{project}` and `{region}` are the project id and region respectively where + * the worker pool is defined and `{workerPool}` is the short name of the + * worker pool. + * If the project id is not the same as the function, then the Cloud + * Functions Service Agent + * (`service-@gcf-admin-robot.iam.gserviceaccount.com`) must + * be granted the role Cloud Build Custom Workers Builder + * (`roles/cloudbuild.customworkers.builder`) in the project. + * @type string $build_id + * Output only. The Cloud Build ID of the latest successful deployment of the + * function. + * @type string $build_name + * Output only. The Cloud Build Name of the function deployment. + * `projects//locations//builds/`. + * @type array<\Google\Cloud\Functions\V1\SecretEnvVar>|\Google\Protobuf\Internal\RepeatedField $secret_environment_variables + * Secret environment variables configuration. + * @type array<\Google\Cloud\Functions\V1\SecretVolume>|\Google\Protobuf\Internal\RepeatedField $secret_volumes + * Secret volumes configuration. + * @type string $source_token + * Input only. An identifier for Firebase function sources. Disclaimer: This field is only + * supported for Firebase function deployments. + * @type string $docker_repository + * User managed repository created in Artifact Registry optionally with a + * customer managed encryption key. If specified, deployments will use + * Artifact Registry. If unspecified and the deployment is eligible to use + * Artifact Registry, GCF will create and use a repository named + * 'gcf-artifacts' for every deployed region. This is the repository to which + * the function docker image will be pushed after it is built by Cloud Build. + * It must match the pattern + * `projects/{project}/locations/{location}/repositories/{repository}`. + * Cross-project repositories are not supported. + * Cross-location repositories are not supported. + * Repository format must be 'DOCKER'. + * @type int $docker_registry + * Docker Registry to use for this deployment. + * If `docker_repository` field is specified, this field will be automatically + * set as `ARTIFACT_REGISTRY`. + * If unspecified, it currently defaults to `CONTAINER_REGISTRY`. + * This field may be overridden by the backend for eligible deployments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * A user-defined name of the function. Function names must be unique + * globally and match pattern `projects/*/locations/*/functions/*` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * A user-defined name of the function. Function names must be unique + * globally and match pattern `projects/*/locations/*/functions/*` + * + * 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; + } + + /** + * User-provided description of a function. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description of a function. + * + * 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 Google Cloud Storage URL, starting with `gs://`, pointing to the zip + * archive which contains the function. + * + * Generated from protobuf field string source_archive_url = 3; + * @return string + */ + public function getSourceArchiveUrl() + { + return $this->readOneof(3); + } + + public function hasSourceArchiveUrl() + { + return $this->hasOneof(3); + } + + /** + * The Google Cloud Storage URL, starting with `gs://`, pointing to the zip + * archive which contains the function. + * + * Generated from protobuf field string source_archive_url = 3; + * @param string $var + * @return $this + */ + public function setSourceArchiveUrl($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * **Beta Feature** + * The source repository where a function is hosted. + * + * Generated from protobuf field .google.cloud.functions.v1.SourceRepository source_repository = 4; + * @return \Google\Cloud\Functions\V1\SourceRepository|null + */ + public function getSourceRepository() + { + return $this->readOneof(4); + } + + public function hasSourceRepository() + { + return $this->hasOneof(4); + } + + /** + * **Beta Feature** + * The source repository where a function is hosted. + * + * Generated from protobuf field .google.cloud.functions.v1.SourceRepository source_repository = 4; + * @param \Google\Cloud\Functions\V1\SourceRepository $var + * @return $this + */ + public function setSourceRepository($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V1\SourceRepository::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The Google Cloud Storage signed URL used for source uploading, generated + * by calling [google.cloud.functions.v1.GenerateUploadUrl]. + * The signature is validated on write methods (Create, Update) + * The signature is stripped from the Function object on read methods (Get, + * List) + * + * Generated from protobuf field string source_upload_url = 16; + * @return string + */ + public function getSourceUploadUrl() + { + return $this->readOneof(16); + } + + public function hasSourceUploadUrl() + { + return $this->hasOneof(16); + } + + /** + * The Google Cloud Storage signed URL used for source uploading, generated + * by calling [google.cloud.functions.v1.GenerateUploadUrl]. + * The signature is validated on write methods (Create, Update) + * The signature is stripped from the Function object on read methods (Get, + * List) + * + * Generated from protobuf field string source_upload_url = 16; + * @param string $var + * @return $this + */ + public function setSourceUploadUrl($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * An HTTPS endpoint type of source that can be triggered via URL. + * + * Generated from protobuf field .google.cloud.functions.v1.HttpsTrigger https_trigger = 5; + * @return \Google\Cloud\Functions\V1\HttpsTrigger|null + */ + public function getHttpsTrigger() + { + return $this->readOneof(5); + } + + public function hasHttpsTrigger() + { + return $this->hasOneof(5); + } + + /** + * An HTTPS endpoint type of source that can be triggered via URL. + * + * Generated from protobuf field .google.cloud.functions.v1.HttpsTrigger https_trigger = 5; + * @param \Google\Cloud\Functions\V1\HttpsTrigger $var + * @return $this + */ + public function setHttpsTrigger($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V1\HttpsTrigger::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * A source that fires events in response to a condition in another service. + * + * Generated from protobuf field .google.cloud.functions.v1.EventTrigger event_trigger = 6; + * @return \Google\Cloud\Functions\V1\EventTrigger|null + */ + public function getEventTrigger() + { + return $this->readOneof(6); + } + + public function hasEventTrigger() + { + return $this->hasOneof(6); + } + + /** + * A source that fires events in response to a condition in another service. + * + * Generated from protobuf field .google.cloud.functions.v1.EventTrigger event_trigger = 6; + * @param \Google\Cloud\Functions\V1\EventTrigger $var + * @return $this + */ + public function setEventTrigger($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V1\EventTrigger::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Output only. Status of the function deployment. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunctionStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. Status of the function deployment. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunctionStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V1\CloudFunctionStatus::class); + $this->status = $var; + + return $this; + } + + /** + * The name of the function (as defined in source code) that will be + * executed. Defaults to the resource name suffix, if not specified. For + * backward compatibility, if function with given name is not found, then the + * system will try to use function named "function". + * For Node.js this is name of a function exported by the module specified + * in `source_location`. + * + * Generated from protobuf field string entry_point = 8; + * @return string + */ + public function getEntryPoint() + { + return $this->entry_point; + } + + /** + * The name of the function (as defined in source code) that will be + * executed. Defaults to the resource name suffix, if not specified. For + * backward compatibility, if function with given name is not found, then the + * system will try to use function named "function". + * For Node.js this is name of a function exported by the module specified + * in `source_location`. + * + * Generated from protobuf field string entry_point = 8; + * @param string $var + * @return $this + */ + public function setEntryPoint($var) + { + GPBUtil::checkString($var, True); + $this->entry_point = $var; + + return $this; + } + + /** + * The runtime in which to run the function. Required when deploying a new + * function, optional when updating an existing function. For a complete + * list of possible choices, see the + * [`gcloud` command + * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). + * + * Generated from protobuf field string runtime = 19; + * @return string + */ + public function getRuntime() + { + return $this->runtime; + } + + /** + * The runtime in which to run the function. Required when deploying a new + * function, optional when updating an existing function. For a complete + * list of possible choices, see the + * [`gcloud` command + * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). + * + * Generated from protobuf field string runtime = 19; + * @param string $var + * @return $this + */ + public function setRuntime($var) + { + GPBUtil::checkString($var, True); + $this->runtime = $var; + + return $this; + } + + /** + * The function execution timeout. Execution is considered failed and + * can be terminated if the function is not completed at the end of the + * timeout period. Defaults to 60 seconds. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 9; + * @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 function execution timeout. Execution is considered failed and + * can be terminated if the function is not completed at the end of the + * timeout period. Defaults to 60 seconds. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 9; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + + /** + * The amount of memory in MB available for a function. + * Defaults to 256MB. + * + * Generated from protobuf field int32 available_memory_mb = 10; + * @return int + */ + public function getAvailableMemoryMb() + { + return $this->available_memory_mb; + } + + /** + * The amount of memory in MB available for a function. + * Defaults to 256MB. + * + * Generated from protobuf field int32 available_memory_mb = 10; + * @param int $var + * @return $this + */ + public function setAvailableMemoryMb($var) + { + GPBUtil::checkInt32($var); + $this->available_memory_mb = $var; + + return $this; + } + + /** + * The email of the function's service account. If empty, defaults to + * `{project_id}@appspot.gserviceaccount.com`. + * + * Generated from protobuf field string service_account_email = 11; + * @return string + */ + public function getServiceAccountEmail() + { + return $this->service_account_email; + } + + /** + * The email of the function's service account. If empty, defaults to + * `{project_id}@appspot.gserviceaccount.com`. + * + * Generated from protobuf field string service_account_email = 11; + * @param string $var + * @return $this + */ + public function setServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->service_account_email = $var; + + return $this; + } + + /** + * Output only. The last update timestamp of a Cloud Function. + * + * 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 timestamp of a Cloud Function. + * + * 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 version identifier of the Cloud Function. Each deployment attempt + * results in a new version of a function being created. + * + * Generated from protobuf field int64 version_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getVersionId() + { + return $this->version_id; + } + + /** + * Output only. The version identifier of the Cloud Function. Each deployment attempt + * results in a new version of a function being created. + * + * Generated from protobuf field int64 version_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setVersionId($var) + { + GPBUtil::checkInt64($var); + $this->version_id = $var; + + return $this; + } + + /** + * Labels associated with this Cloud Function. + * + * Generated from protobuf field map labels = 15; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels associated with this Cloud Function. + * + * Generated from protobuf field map labels = 15; + * @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; + } + + /** + * Environment variables that shall be available during function execution. + * + * Generated from protobuf field map environment_variables = 17; + * @return \Google\Protobuf\Internal\MapField + */ + public function getEnvironmentVariables() + { + return $this->environment_variables; + } + + /** + * Environment variables that shall be available during function execution. + * + * Generated from protobuf field map environment_variables = 17; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setEnvironmentVariables($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->environment_variables = $arr; + + return $this; + } + + /** + * Build environment variables that shall be available during build time. + * + * Generated from protobuf field map build_environment_variables = 28; + * @return \Google\Protobuf\Internal\MapField + */ + public function getBuildEnvironmentVariables() + { + return $this->build_environment_variables; + } + + /** + * Build environment variables that shall be available during build time. + * + * Generated from protobuf field map build_environment_variables = 28; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setBuildEnvironmentVariables($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->build_environment_variables = $arr; + + return $this; + } + + /** + * The VPC Network that this cloud function can connect to. It can be + * either the fully-qualified URI, or the short name of the network resource. + * If the short network name is used, the network must belong to the same + * project. Otherwise, it must belong to a project within the same + * organization. The format of this field is either + * `projects/{project}/global/networks/{network}` or `{network}`, where + * `{project}` is a project id where the network is defined, and `{network}` + * is the short name of the network. + * This field is mutually exclusive with `vpc_connector` and will be replaced + * by it. + * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for + * more information on connecting Cloud projects. + * + * Generated from protobuf field string network = 18; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * The VPC Network that this cloud function can connect to. It can be + * either the fully-qualified URI, or the short name of the network resource. + * If the short network name is used, the network must belong to the same + * project. Otherwise, it must belong to a project within the same + * organization. The format of this field is either + * `projects/{project}/global/networks/{network}` or `{network}`, where + * `{project}` is a project id where the network is defined, and `{network}` + * is the short name of the network. + * This field is mutually exclusive with `vpc_connector` and will be replaced + * by it. + * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for + * more information on connecting Cloud projects. + * + * Generated from protobuf field string network = 18; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * The limit on the maximum number of function instances that may coexist at a + * given time. + * In some cases, such as rapid traffic surges, Cloud Functions may, for a + * short period of time, create more instances than the specified max + * instances limit. If your function cannot tolerate this temporary behavior, + * you may want to factor in a safety margin and set a lower max instances + * value than your function can tolerate. + * See the [Max + * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for + * more details. + * + * Generated from protobuf field int32 max_instances = 20; + * @return int + */ + public function getMaxInstances() + { + return $this->max_instances; + } + + /** + * The limit on the maximum number of function instances that may coexist at a + * given time. + * In some cases, such as rapid traffic surges, Cloud Functions may, for a + * short period of time, create more instances than the specified max + * instances limit. If your function cannot tolerate this temporary behavior, + * you may want to factor in a safety margin and set a lower max instances + * value than your function can tolerate. + * See the [Max + * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for + * more details. + * + * Generated from protobuf field int32 max_instances = 20; + * @param int $var + * @return $this + */ + public function setMaxInstances($var) + { + GPBUtil::checkInt32($var); + $this->max_instances = $var; + + return $this; + } + + /** + * A lower bound for the number function instances that may coexist at a + * given time. + * + * Generated from protobuf field int32 min_instances = 32; + * @return int + */ + public function getMinInstances() + { + return $this->min_instances; + } + + /** + * A lower bound for the number function instances that may coexist at a + * given time. + * + * Generated from protobuf field int32 min_instances = 32; + * @param int $var + * @return $this + */ + public function setMinInstances($var) + { + GPBUtil::checkInt32($var); + $this->min_instances = $var; + + return $this; + } + + /** + * The VPC Network Connector that this cloud function can connect to. It can + * be either the fully-qualified URI, or the short name of the network + * connector resource. The format of this field is + * `projects/*/locations/*/connectors/*` + * This field is mutually exclusive with `network` field and will eventually + * replace it. + * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for + * more information on connecting Cloud projects. + * + * Generated from protobuf field string vpc_connector = 22; + * @return string + */ + public function getVpcConnector() + { + return $this->vpc_connector; + } + + /** + * The VPC Network Connector that this cloud function can connect to. It can + * be either the fully-qualified URI, or the short name of the network + * connector resource. The format of this field is + * `projects/*/locations/*/connectors/*` + * This field is mutually exclusive with `network` field and will eventually + * replace it. + * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for + * more information on connecting Cloud projects. + * + * Generated from protobuf field string vpc_connector = 22; + * @param string $var + * @return $this + */ + public function setVpcConnector($var) + { + GPBUtil::checkString($var, True); + $this->vpc_connector = $var; + + return $this; + } + + /** + * The egress settings for the connector, controlling what traffic is diverted + * through it. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings vpc_connector_egress_settings = 23; + * @return int + */ + public function getVpcConnectorEgressSettings() + { + return $this->vpc_connector_egress_settings; + } + + /** + * The egress settings for the connector, controlling what traffic is diverted + * through it. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings vpc_connector_egress_settings = 23; + * @param int $var + * @return $this + */ + public function setVpcConnectorEgressSettings($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V1\CloudFunction\VpcConnectorEgressSettings::class); + $this->vpc_connector_egress_settings = $var; + + return $this; + } + + /** + * The ingress settings for the function, controlling what traffic can reach + * it. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.IngressSettings ingress_settings = 24; + * @return int + */ + public function getIngressSettings() + { + return $this->ingress_settings; + } + + /** + * The ingress settings for the function, controlling what traffic can reach + * it. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.IngressSettings ingress_settings = 24; + * @param int $var + * @return $this + */ + public function setIngressSettings($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V1\CloudFunction\IngressSettings::class); + $this->ingress_settings = $var; + + return $this; + } + + /** + * Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt function resources. + * It must match the pattern + * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * If specified, you must also provide an artifact registry repository using + * the `docker_repository` field that was created with the same KMS crypto + * key. + * The following service accounts need to be granted the role 'Cloud KMS + * CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' + * on the Key/KeyRing/Project/Organization (least access preferred). + * 1. Google Cloud Functions service account + * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - + * Required to protect the function's image. + * 2. Google Storage service account + * (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - + * Required to protect the function's source code. + * If this service account does not exist, deploying a function without a + * KMS key or retrieving the service agent name provisions it. For more + * information, see + * https://cloud.google.com/storage/docs/projects#service-agents and + * https://cloud.google.com/storage/docs/getting-service-agent#gsutil. + * Google Cloud Functions delegates access to service agents to protect + * function resources in internal projects that are not accessible by the + * end user. + * + * Generated from protobuf field string kms_key_name = 25 [(.google.api.resource_reference) = { + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt function resources. + * It must match the pattern + * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * If specified, you must also provide an artifact registry repository using + * the `docker_repository` field that was created with the same KMS crypto + * key. + * The following service accounts need to be granted the role 'Cloud KMS + * CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' + * on the Key/KeyRing/Project/Organization (least access preferred). + * 1. Google Cloud Functions service account + * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - + * Required to protect the function's image. + * 2. Google Storage service account + * (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - + * Required to protect the function's source code. + * If this service account does not exist, deploying a function without a + * KMS key or retrieving the service agent name provisions it. For more + * information, see + * https://cloud.google.com/storage/docs/projects#service-agents and + * https://cloud.google.com/storage/docs/getting-service-agent#gsutil. + * Google Cloud Functions delegates access to service agents to protect + * function resources in internal projects that are not accessible by the + * end user. + * + * Generated from protobuf field string kms_key_name = 25 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + + /** + * Name of the Cloud Build Custom Worker Pool that should be used to build the + * function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * `{project}` and `{region}` are the project id and region respectively where + * the worker pool is defined and `{workerPool}` is the short name of the + * worker pool. + * If the project id is not the same as the function, then the Cloud + * Functions Service Agent + * (`service-@gcf-admin-robot.iam.gserviceaccount.com`) must + * be granted the role Cloud Build Custom Workers Builder + * (`roles/cloudbuild.customworkers.builder`) in the project. + * + * Generated from protobuf field string build_worker_pool = 26; + * @return string + */ + public function getBuildWorkerPool() + { + return $this->build_worker_pool; + } + + /** + * Name of the Cloud Build Custom Worker Pool that should be used to build the + * function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * `{project}` and `{region}` are the project id and region respectively where + * the worker pool is defined and `{workerPool}` is the short name of the + * worker pool. + * If the project id is not the same as the function, then the Cloud + * Functions Service Agent + * (`service-@gcf-admin-robot.iam.gserviceaccount.com`) must + * be granted the role Cloud Build Custom Workers Builder + * (`roles/cloudbuild.customworkers.builder`) in the project. + * + * Generated from protobuf field string build_worker_pool = 26; + * @param string $var + * @return $this + */ + public function setBuildWorkerPool($var) + { + GPBUtil::checkString($var, True); + $this->build_worker_pool = $var; + + return $this; + } + + /** + * Output only. The Cloud Build ID of the latest successful deployment of the + * function. + * + * Generated from protobuf field string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getBuildId() + { + return $this->build_id; + } + + /** + * Output only. The Cloud Build ID of the latest successful deployment of the + * function. + * + * Generated from protobuf field string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setBuildId($var) + { + GPBUtil::checkString($var, True); + $this->build_id = $var; + + return $this; + } + + /** + * Output only. The Cloud Build Name of the function deployment. + * `projects//locations//builds/`. + * + * Generated from protobuf field string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getBuildName() + { + return $this->build_name; + } + + /** + * Output only. The Cloud Build Name of the function deployment. + * `projects//locations//builds/`. + * + * Generated from protobuf field string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setBuildName($var) + { + GPBUtil::checkString($var, True); + $this->build_name = $var; + + return $this; + } + + /** + * Secret environment variables configuration. + * + * Generated from protobuf field repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecretEnvironmentVariables() + { + return $this->secret_environment_variables; + } + + /** + * Secret environment variables configuration. + * + * Generated from protobuf field repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * @param array<\Google\Cloud\Functions\V1\SecretEnvVar>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecretEnvironmentVariables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V1\SecretEnvVar::class); + $this->secret_environment_variables = $arr; + + return $this; + } + + /** + * Secret volumes configuration. + * + * Generated from protobuf field repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecretVolumes() + { + return $this->secret_volumes; + } + + /** + * Secret volumes configuration. + * + * Generated from protobuf field repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + * @param array<\Google\Cloud\Functions\V1\SecretVolume>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecretVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V1\SecretVolume::class); + $this->secret_volumes = $arr; + + return $this; + } + + /** + * Input only. An identifier for Firebase function sources. Disclaimer: This field is only + * supported for Firebase function deployments. + * + * Generated from protobuf field string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getSourceToken() + { + return $this->source_token; + } + + /** + * Input only. An identifier for Firebase function sources. Disclaimer: This field is only + * supported for Firebase function deployments. + * + * Generated from protobuf field string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSourceToken($var) + { + GPBUtil::checkString($var, True); + $this->source_token = $var; + + return $this; + } + + /** + * User managed repository created in Artifact Registry optionally with a + * customer managed encryption key. If specified, deployments will use + * Artifact Registry. If unspecified and the deployment is eligible to use + * Artifact Registry, GCF will create and use a repository named + * 'gcf-artifacts' for every deployed region. This is the repository to which + * the function docker image will be pushed after it is built by Cloud Build. + * It must match the pattern + * `projects/{project}/locations/{location}/repositories/{repository}`. + * Cross-project repositories are not supported. + * Cross-location repositories are not supported. + * Repository format must be 'DOCKER'. + * + * Generated from protobuf field string docker_repository = 34 [(.google.api.resource_reference) = { + * @return string + */ + public function getDockerRepository() + { + return $this->docker_repository; + } + + /** + * User managed repository created in Artifact Registry optionally with a + * customer managed encryption key. If specified, deployments will use + * Artifact Registry. If unspecified and the deployment is eligible to use + * Artifact Registry, GCF will create and use a repository named + * 'gcf-artifacts' for every deployed region. This is the repository to which + * the function docker image will be pushed after it is built by Cloud Build. + * It must match the pattern + * `projects/{project}/locations/{location}/repositories/{repository}`. + * Cross-project repositories are not supported. + * Cross-location repositories are not supported. + * Repository format must be 'DOCKER'. + * + * Generated from protobuf field string docker_repository = 34 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDockerRepository($var) + { + GPBUtil::checkString($var, True); + $this->docker_repository = $var; + + return $this; + } + + /** + * Docker Registry to use for this deployment. + * If `docker_repository` field is specified, this field will be automatically + * set as `ARTIFACT_REGISTRY`. + * If unspecified, it currently defaults to `CONTAINER_REGISTRY`. + * This field may be overridden by the backend for eligible deployments. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.DockerRegistry docker_registry = 35; + * @return int + */ + public function getDockerRegistry() + { + return $this->docker_registry; + } + + /** + * Docker Registry to use for this deployment. + * If `docker_repository` field is specified, this field will be automatically + * set as `ARTIFACT_REGISTRY`. + * If unspecified, it currently defaults to `CONTAINER_REGISTRY`. + * This field may be overridden by the backend for eligible deployments. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.DockerRegistry docker_registry = 35; + * @param int $var + * @return $this + */ + public function setDockerRegistry($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V1\CloudFunction\DockerRegistry::class); + $this->docker_registry = $var; + + return $this; + } + + /** + * @return string + */ + public function getSourceCode() + { + return $this->whichOneof("source_code"); + } + + /** + * @return string + */ + public function getTrigger() + { + return $this->whichOneof("trigger"); + } + +} + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/DockerRegistry.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/DockerRegistry.php new file mode 100644 index 000000000000..0dc3a8279ff9 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/DockerRegistry.php @@ -0,0 +1,69 @@ +google.cloud.functions.v1.CloudFunction.DockerRegistry + */ +class DockerRegistry +{ + /** + * Unspecified. + * + * Generated from protobuf enum DOCKER_REGISTRY_UNSPECIFIED = 0; + */ + const DOCKER_REGISTRY_UNSPECIFIED = 0; + /** + * Docker images will be stored in multi-regional Container Registry + * repositories named `gcf`. + * + * Generated from protobuf enum CONTAINER_REGISTRY = 1; + */ + const CONTAINER_REGISTRY = 1; + /** + * Docker images will be stored in regional Artifact Registry repositories. + * By default, GCF will create and use repositories named `gcf-artifacts` + * in every region in which a function is deployed. But the repository to + * use can also be specified by the user using the `docker_repository` + * field. + * + * Generated from protobuf enum ARTIFACT_REGISTRY = 2; + */ + const ARTIFACT_REGISTRY = 2; + + private static $valueToName = [ + self::DOCKER_REGISTRY_UNSPECIFIED => 'DOCKER_REGISTRY_UNSPECIFIED', + self::CONTAINER_REGISTRY => 'CONTAINER_REGISTRY', + self::ARTIFACT_REGISTRY => 'ARTIFACT_REGISTRY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DockerRegistry::class, \Google\Cloud\Functions\V1\CloudFunction_DockerRegistry::class); + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/IngressSettings.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/IngressSettings.php new file mode 100644 index 000000000000..f01e9ad97124 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/IngressSettings.php @@ -0,0 +1,73 @@ +google.cloud.functions.v1.CloudFunction.IngressSettings + */ +class IngressSettings +{ + /** + * Unspecified. + * + * Generated from protobuf enum INGRESS_SETTINGS_UNSPECIFIED = 0; + */ + const INGRESS_SETTINGS_UNSPECIFIED = 0; + /** + * Allow HTTP traffic from public and private sources. + * + * Generated from protobuf enum ALLOW_ALL = 1; + */ + const ALLOW_ALL = 1; + /** + * Allow HTTP traffic from only private VPC sources. + * + * Generated from protobuf enum ALLOW_INTERNAL_ONLY = 2; + */ + const ALLOW_INTERNAL_ONLY = 2; + /** + * Allow HTTP traffic from private VPC sources and through GCLB. + * + * Generated from protobuf enum ALLOW_INTERNAL_AND_GCLB = 3; + */ + const ALLOW_INTERNAL_AND_GCLB = 3; + + private static $valueToName = [ + self::INGRESS_SETTINGS_UNSPECIFIED => 'INGRESS_SETTINGS_UNSPECIFIED', + self::ALLOW_ALL => 'ALLOW_ALL', + self::ALLOW_INTERNAL_ONLY => 'ALLOW_INTERNAL_ONLY', + self::ALLOW_INTERNAL_AND_GCLB => 'ALLOW_INTERNAL_AND_GCLB', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IngressSettings::class, \Google\Cloud\Functions\V1\CloudFunction_IngressSettings::class); + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/VpcConnectorEgressSettings.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/VpcConnectorEgressSettings.php new file mode 100644 index 000000000000..a357c173fb54 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/VpcConnectorEgressSettings.php @@ -0,0 +1,67 @@ +google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings + */ +class VpcConnectorEgressSettings +{ + /** + * Unspecified. + * + * Generated from protobuf enum VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0; + */ + const VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0; + /** + * Use the VPC Access Connector only for private IP space from RFC1918. + * + * Generated from protobuf enum PRIVATE_RANGES_ONLY = 1; + */ + const PRIVATE_RANGES_ONLY = 1; + /** + * Force the use of VPC Access Connector for all egress traffic from the + * function. + * + * Generated from protobuf enum ALL_TRAFFIC = 2; + */ + const ALL_TRAFFIC = 2; + + private static $valueToName = [ + self::VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED => 'VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED', + self::PRIVATE_RANGES_ONLY => 'PRIVATE_RANGES_ONLY', + self::ALL_TRAFFIC => 'ALL_TRAFFIC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VpcConnectorEgressSettings::class, \Google\Cloud\Functions\V1\CloudFunction_VpcConnectorEgressSettings::class); + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunctionStatus.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunctionStatus.php new file mode 100644 index 000000000000..50cab779a116 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunctionStatus.php @@ -0,0 +1,83 @@ +google.cloud.functions.v1.CloudFunctionStatus + */ +class CloudFunctionStatus +{ + /** + * Not specified. Invalid state. + * + * Generated from protobuf enum CLOUD_FUNCTION_STATUS_UNSPECIFIED = 0; + */ + const CLOUD_FUNCTION_STATUS_UNSPECIFIED = 0; + /** + * Function has been successfully deployed and is serving. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Function deployment failed and the function isn’t serving. + * + * Generated from protobuf enum OFFLINE = 2; + */ + const OFFLINE = 2; + /** + * Function is being created or updated. + * + * Generated from protobuf enum DEPLOY_IN_PROGRESS = 3; + */ + const DEPLOY_IN_PROGRESS = 3; + /** + * Function is being deleted. + * + * Generated from protobuf enum DELETE_IN_PROGRESS = 4; + */ + const DELETE_IN_PROGRESS = 4; + /** + * Function deployment failed and the function serving state is undefined. + * The function should be updated or deleted to move it out of this state. + * + * Generated from protobuf enum UNKNOWN = 5; + */ + const UNKNOWN = 5; + + private static $valueToName = [ + self::CLOUD_FUNCTION_STATUS_UNSPECIFIED => 'CLOUD_FUNCTION_STATUS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::OFFLINE => 'OFFLINE', + self::DEPLOY_IN_PROGRESS => 'DEPLOY_IN_PROGRESS', + self::DELETE_IN_PROGRESS => 'DELETE_IN_PROGRESS', + self::UNKNOWN => 'UNKNOWN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction_DockerRegistry.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction_DockerRegistry.php new file mode 100644 index 000000000000..d3019bde7b2a --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction_DockerRegistry.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/ListFunctions', + $argument, + ['\Google\Cloud\Functions\V1\ListFunctionsResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns a function with the given name from the requested project. + * @param \Google\Cloud\Functions\V1\GetFunctionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetFunction(\Google\Cloud\Functions\V1\GetFunctionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/GetFunction', + $argument, + ['\Google\Cloud\Functions\V1\CloudFunction', 'decode'], + $metadata, $options); + } + + /** + * Creates a new function. If a function with the given name already exists in + * the specified project, the long running operation will return + * `ALREADY_EXISTS` error. + * @param \Google\Cloud\Functions\V1\CreateFunctionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateFunction(\Google\Cloud\Functions\V1\CreateFunctionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/CreateFunction', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates existing function. + * @param \Google\Cloud\Functions\V1\UpdateFunctionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateFunction(\Google\Cloud\Functions\V1\UpdateFunctionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/UpdateFunction', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a function with the given name from the specified project. If the + * given function is used by some trigger, the trigger will be updated to + * remove this function. + * @param \Google\Cloud\Functions\V1\DeleteFunctionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteFunction(\Google\Cloud\Functions\V1\DeleteFunctionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/DeleteFunction', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Synchronously invokes a deployed Cloud Function. To be used for testing + * purposes as very limited traffic is allowed. For more information on + * the actual limits, refer to + * [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits). + * @param \Google\Cloud\Functions\V1\CallFunctionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CallFunction(\Google\Cloud\Functions\V1\CallFunctionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/CallFunction', + $argument, + ['\Google\Cloud\Functions\V1\CallFunctionResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns a signed URL for uploading a function source code. + * For more information about the signed URL usage see: + * https://cloud.google.com/storage/docs/access-control/signed-urls. + * Once the function source code upload is complete, the used signed + * URL should be provided in CreateFunction or UpdateFunction request + * as a reference to the function source code. + * + * When uploading source code to the generated signed URL, please follow + * these restrictions: + * + * * Source file type should be a zip file. + * * Source file size should not exceed 100MB limit. + * * No credentials should be attached - the signed URLs provide access to the + * target bucket using internal service identity; if credentials were + * attached, the identity from the credentials would be used, but that + * identity does not have permissions to upload files to the URL. + * + * When making a HTTP PUT request, these two headers need to be specified: + * + * * `content-type: application/zip` + * * `x-goog-content-length-range: 0,104857600` + * + * And this header SHOULD NOT be specified: + * + * * `Authorization: Bearer YOUR_TOKEN` + * @param \Google\Cloud\Functions\V1\GenerateUploadUrlRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GenerateUploadUrl(\Google\Cloud\Functions\V1\GenerateUploadUrlRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/GenerateUploadUrl', + $argument, + ['\Google\Cloud\Functions\V1\GenerateUploadUrlResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns a signed URL for downloading deployed function source code. + * The URL is only valid for a limited period and should be used within + * minutes after generation. + * For more information about the signed URL usage see: + * https://cloud.google.com/storage/docs/access-control/signed-urls + * @param \Google\Cloud\Functions\V1\GenerateDownloadUrlRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GenerateDownloadUrl(\Google\Cloud\Functions\V1\GenerateDownloadUrlRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/GenerateDownloadUrl', + $argument, + ['\Google\Cloud\Functions\V1\GenerateDownloadUrlResponse', 'decode'], + $metadata, $options); + } + + /** + * Sets the IAM access control policy on the specified function. + * Replaces any existing policy. + * @param \Google\Cloud\Iam\V1\SetIamPolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SetIamPolicy(\Google\Cloud\Iam\V1\SetIamPolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/SetIamPolicy', + $argument, + ['\Google\Cloud\Iam\V1\Policy', 'decode'], + $metadata, $options); + } + + /** + * Gets the IAM access control policy for a function. + * Returns an empty policy if the function exists and does not have a policy + * set. + * @param \Google\Cloud\Iam\V1\GetIamPolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetIamPolicy(\Google\Cloud\Iam\V1\GetIamPolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/GetIamPolicy', + $argument, + ['\Google\Cloud\Iam\V1\Policy', 'decode'], + $metadata, $options); + } + + /** + * Tests the specified permissions against the IAM access control policy + * for a function. + * If the function does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * @param \Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function TestIamPermissions(\Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/TestIamPermissions', + $argument, + ['\Google\Cloud\Iam\V1\TestIamPermissionsResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CreateFunctionRequest.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CreateFunctionRequest.php new file mode 100644 index 000000000000..ddbc488e8b39 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CreateFunctionRequest.php @@ -0,0 +1,115 @@ +google.cloud.functions.v1.CreateFunctionRequest + */ +class CreateFunctionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location in which the function should be created, specified + * in the format `projects/*/locations/*` + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $location = ''; + /** + * Required. Function to be created. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunction function = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $function = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location + * Required. The project and location in which the function should be created, specified + * in the format `projects/*/locations/*` + * @type \Google\Cloud\Functions\V1\CloudFunction $function + * Required. Function to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location in which the function should be created, specified + * in the format `projects/*/locations/*` + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Required. The project and location in which the function should be created, specified + * in the format `projects/*/locations/*` + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Required. Function to be created. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunction function = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Functions\V1\CloudFunction|null + */ + public function getFunction() + { + return $this->function; + } + + public function hasFunction() + { + return isset($this->function); + } + + public function clearFunction() + { + unset($this->function); + } + + /** + * Required. Function to be created. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunction function = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Functions\V1\CloudFunction $var + * @return $this + */ + public function setFunction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V1\CloudFunction::class); + $this->function = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/DeleteFunctionRequest.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/DeleteFunctionRequest.php new file mode 100644 index 000000000000..9fa98e38b5ea --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/DeleteFunctionRequest.php @@ -0,0 +1,67 @@ +google.cloud.functions.v1.DeleteFunctionRequest + */ +class DeleteFunctionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the function which should be deleted. + * + * 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 name of the function which should be deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the function which should 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 function which should 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/Functions/v1/proto/src/Google/Cloud/Functions/V1/EventTrigger.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/EventTrigger.php new file mode 100644 index 000000000000..a85d3f80fc84 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/EventTrigger.php @@ -0,0 +1,292 @@ +google.cloud.functions.v1.EventTrigger + */ +class EventTrigger extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The type of event to observe. For example: + * `providers/cloud.storage/eventTypes/object.change` and + * `providers/cloud.pubsub/eventTypes/topic.publish`. + * Event types match pattern `providers/*/eventTypes/*.*`. + * The pattern contains: + * 1. namespace: For example, `cloud.storage` and + * `google.firebase.analytics`. + * 2. resource type: The type of resource on which event occurs. For + * example, the Google Cloud Storage API includes the type `object`. + * 3. action: The action that generates the event. For example, action for + * a Google Cloud Storage Object is 'change'. + * These parts are lower case. + * + * Generated from protobuf field string event_type = 1; + */ + protected $event_type = ''; + /** + * Required. The resource(s) from which to observe events, for example, + * `projects/_/buckets/myBucket`. + * Not all syntactically correct values are accepted by all services. For + * example: + * 1. The authorization model must support it. Google Cloud Functions + * only allows EventTriggers to be deployed that observe resources in the + * same project as the `CloudFunction`. + * 2. The resource type must match the pattern expected for an + * `event_type`. For example, an `EventTrigger` that has an + * `event_type` of "google.pubsub.topic.publish" should have a resource + * that matches Google Cloud Pub/Sub topics. + * Additionally, some services may support short names when creating an + * `EventTrigger`. These will always be returned in the normalized "long" + * format. + * See each *service's* documentation for supported formats. + * + * Generated from protobuf field string resource = 2; + */ + protected $resource = ''; + /** + * The hostname of the service that should be observed. + * If no string is provided, the default service implementing the API will + * be used. For example, `storage.googleapis.com` is the default for all + * event types in the `google.storage` namespace. + * + * Generated from protobuf field string service = 3; + */ + protected $service = ''; + /** + * Specifies policy for failed executions. + * + * Generated from protobuf field .google.cloud.functions.v1.FailurePolicy failure_policy = 5; + */ + protected $failure_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $event_type + * Required. The type of event to observe. For example: + * `providers/cloud.storage/eventTypes/object.change` and + * `providers/cloud.pubsub/eventTypes/topic.publish`. + * Event types match pattern `providers/*/eventTypes/*.*`. + * The pattern contains: + * 1. namespace: For example, `cloud.storage` and + * `google.firebase.analytics`. + * 2. resource type: The type of resource on which event occurs. For + * example, the Google Cloud Storage API includes the type `object`. + * 3. action: The action that generates the event. For example, action for + * a Google Cloud Storage Object is 'change'. + * These parts are lower case. + * @type string $resource + * Required. The resource(s) from which to observe events, for example, + * `projects/_/buckets/myBucket`. + * Not all syntactically correct values are accepted by all services. For + * example: + * 1. The authorization model must support it. Google Cloud Functions + * only allows EventTriggers to be deployed that observe resources in the + * same project as the `CloudFunction`. + * 2. The resource type must match the pattern expected for an + * `event_type`. For example, an `EventTrigger` that has an + * `event_type` of "google.pubsub.topic.publish" should have a resource + * that matches Google Cloud Pub/Sub topics. + * Additionally, some services may support short names when creating an + * `EventTrigger`. These will always be returned in the normalized "long" + * format. + * See each *service's* documentation for supported formats. + * @type string $service + * The hostname of the service that should be observed. + * If no string is provided, the default service implementing the API will + * be used. For example, `storage.googleapis.com` is the default for all + * event types in the `google.storage` namespace. + * @type \Google\Cloud\Functions\V1\FailurePolicy $failure_policy + * Specifies policy for failed executions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The type of event to observe. For example: + * `providers/cloud.storage/eventTypes/object.change` and + * `providers/cloud.pubsub/eventTypes/topic.publish`. + * Event types match pattern `providers/*/eventTypes/*.*`. + * The pattern contains: + * 1. namespace: For example, `cloud.storage` and + * `google.firebase.analytics`. + * 2. resource type: The type of resource on which event occurs. For + * example, the Google Cloud Storage API includes the type `object`. + * 3. action: The action that generates the event. For example, action for + * a Google Cloud Storage Object is 'change'. + * These parts are lower case. + * + * Generated from protobuf field string event_type = 1; + * @return string + */ + public function getEventType() + { + return $this->event_type; + } + + /** + * Required. The type of event to observe. For example: + * `providers/cloud.storage/eventTypes/object.change` and + * `providers/cloud.pubsub/eventTypes/topic.publish`. + * Event types match pattern `providers/*/eventTypes/*.*`. + * The pattern contains: + * 1. namespace: For example, `cloud.storage` and + * `google.firebase.analytics`. + * 2. resource type: The type of resource on which event occurs. For + * example, the Google Cloud Storage API includes the type `object`. + * 3. action: The action that generates the event. For example, action for + * a Google Cloud Storage Object is 'change'. + * These parts are lower case. + * + * Generated from protobuf field string event_type = 1; + * @param string $var + * @return $this + */ + public function setEventType($var) + { + GPBUtil::checkString($var, True); + $this->event_type = $var; + + return $this; + } + + /** + * Required. The resource(s) from which to observe events, for example, + * `projects/_/buckets/myBucket`. + * Not all syntactically correct values are accepted by all services. For + * example: + * 1. The authorization model must support it. Google Cloud Functions + * only allows EventTriggers to be deployed that observe resources in the + * same project as the `CloudFunction`. + * 2. The resource type must match the pattern expected for an + * `event_type`. For example, an `EventTrigger` that has an + * `event_type` of "google.pubsub.topic.publish" should have a resource + * that matches Google Cloud Pub/Sub topics. + * Additionally, some services may support short names when creating an + * `EventTrigger`. These will always be returned in the normalized "long" + * format. + * See each *service's* documentation for supported formats. + * + * Generated from protobuf field string resource = 2; + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * Required. The resource(s) from which to observe events, for example, + * `projects/_/buckets/myBucket`. + * Not all syntactically correct values are accepted by all services. For + * example: + * 1. The authorization model must support it. Google Cloud Functions + * only allows EventTriggers to be deployed that observe resources in the + * same project as the `CloudFunction`. + * 2. The resource type must match the pattern expected for an + * `event_type`. For example, an `EventTrigger` that has an + * `event_type` of "google.pubsub.topic.publish" should have a resource + * that matches Google Cloud Pub/Sub topics. + * Additionally, some services may support short names when creating an + * `EventTrigger`. These will always be returned in the normalized "long" + * format. + * See each *service's* documentation for supported formats. + * + * Generated from protobuf field string resource = 2; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + + /** + * The hostname of the service that should be observed. + * If no string is provided, the default service implementing the API will + * be used. For example, `storage.googleapis.com` is the default for all + * event types in the `google.storage` namespace. + * + * Generated from protobuf field string service = 3; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * The hostname of the service that should be observed. + * If no string is provided, the default service implementing the API will + * be used. For example, `storage.googleapis.com` is the default for all + * event types in the `google.storage` namespace. + * + * Generated from protobuf field string service = 3; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * Specifies policy for failed executions. + * + * Generated from protobuf field .google.cloud.functions.v1.FailurePolicy failure_policy = 5; + * @return \Google\Cloud\Functions\V1\FailurePolicy|null + */ + public function getFailurePolicy() + { + return $this->failure_policy; + } + + public function hasFailurePolicy() + { + return isset($this->failure_policy); + } + + public function clearFailurePolicy() + { + unset($this->failure_policy); + } + + /** + * Specifies policy for failed executions. + * + * Generated from protobuf field .google.cloud.functions.v1.FailurePolicy failure_policy = 5; + * @param \Google\Cloud\Functions\V1\FailurePolicy $var + * @return $this + */ + public function setFailurePolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V1\FailurePolicy::class); + $this->failure_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy.php new file mode 100644 index 000000000000..f81b50f6d779 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy.php @@ -0,0 +1,76 @@ +google.cloud.functions.v1.FailurePolicy + */ +class FailurePolicy extends \Google\Protobuf\Internal\Message +{ + protected $action; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Functions\V1\FailurePolicy\Retry $retry + * If specified, then the function will be retried in case of a failure. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * If specified, then the function will be retried in case of a failure. + * + * Generated from protobuf field .google.cloud.functions.v1.FailurePolicy.Retry retry = 1; + * @return \Google\Cloud\Functions\V1\FailurePolicy\Retry|null + */ + public function getRetry() + { + return $this->readOneof(1); + } + + public function hasRetry() + { + return $this->hasOneof(1); + } + + /** + * If specified, then the function will be retried in case of a failure. + * + * Generated from protobuf field .google.cloud.functions.v1.FailurePolicy.Retry retry = 1; + * @param \Google\Cloud\Functions\V1\FailurePolicy\Retry $var + * @return $this + */ + public function setRetry($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V1\FailurePolicy\Retry::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getAction() + { + return $this->whichOneof("action"); + } + +} + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy/Retry.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy/Retry.php new file mode 100644 index 000000000000..a2188ed7d6ef --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy/Retry.php @@ -0,0 +1,40 @@ +google.cloud.functions.v1.FailurePolicy.Retry + */ +class Retry extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Retry::class, \Google\Cloud\Functions\V1\FailurePolicy_Retry::class); + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy_Retry.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy_Retry.php new file mode 100644 index 000000000000..4064ee7a8756 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy_Retry.php @@ -0,0 +1,16 @@ +google.cloud.functions.v1.GenerateDownloadUrlRequest + */ +class GenerateDownloadUrlRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of function for which source code Google Cloud Storage signed + * URL should be generated. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The optional version of function. If not set, default, current version + * is used. + * + * Generated from protobuf field uint64 version_id = 2; + */ + protected $version_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of function for which source code Google Cloud Storage signed + * URL should be generated. + * @type int|string $version_id + * The optional version of function. If not set, default, current version + * is used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * The name of function for which source code Google Cloud Storage signed + * URL should be generated. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of function for which source code Google Cloud Storage signed + * URL should be generated. + * + * 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 optional version of function. If not set, default, current version + * is used. + * + * Generated from protobuf field uint64 version_id = 2; + * @return int|string + */ + public function getVersionId() + { + return $this->version_id; + } + + /** + * The optional version of function. If not set, default, current version + * is used. + * + * Generated from protobuf field uint64 version_id = 2; + * @param int|string $var + * @return $this + */ + public function setVersionId($var) + { + GPBUtil::checkUint64($var); + $this->version_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateDownloadUrlResponse.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateDownloadUrlResponse.php new file mode 100644 index 000000000000..54d5d55e458f --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateDownloadUrlResponse.php @@ -0,0 +1,71 @@ +google.cloud.functions.v1.GenerateDownloadUrlResponse + */ +class GenerateDownloadUrlResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The generated Google Cloud Storage signed URL that should be used for + * function source code download. + * + * Generated from protobuf field string download_url = 1; + */ + protected $download_url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $download_url + * The generated Google Cloud Storage signed URL that should be used for + * function source code download. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * The generated Google Cloud Storage signed URL that should be used for + * function source code download. + * + * Generated from protobuf field string download_url = 1; + * @return string + */ + public function getDownloadUrl() + { + return $this->download_url; + } + + /** + * The generated Google Cloud Storage signed URL that should be used for + * function source code download. + * + * Generated from protobuf field string download_url = 1; + * @param string $var + * @return $this + */ + public function setDownloadUrl($var) + { + GPBUtil::checkString($var, True); + $this->download_url = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlRequest.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlRequest.php new file mode 100644 index 000000000000..7e5b33b51dff --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlRequest.php @@ -0,0 +1,161 @@ +google.cloud.functions.v1.GenerateUploadUrlRequest + */ +class GenerateUploadUrlRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The project and location in which the Google Cloud Storage signed URL + * should be generated, specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + /** + * Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt function source code objects in staging Cloud Storage + * buckets. When you generate an upload url and upload your source code, it + * gets copied to a staging Cloud Storage bucket in an internal regional + * project. The source code is then copied to a versioned directory in the + * sources bucket in the consumer project during the function deployment. + * It must match the pattern + * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * The Google Cloud Functions service account + * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be + * granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter + * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the + * Key/KeyRing/Project/Organization (least access preferred). GCF will + * delegate access to the Google Storage service account in the internal + * project. + * + * Generated from protobuf field string kms_key_name = 2 [(.google.api.resource_reference) = { + */ + protected $kms_key_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The project and location in which the Google Cloud Storage signed URL + * should be generated, specified in the format `projects/*/locations/*`. + * @type string $kms_key_name + * Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt function source code objects in staging Cloud Storage + * buckets. When you generate an upload url and upload your source code, it + * gets copied to a staging Cloud Storage bucket in an internal regional + * project. The source code is then copied to a versioned directory in the + * sources bucket in the consumer project during the function deployment. + * It must match the pattern + * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * The Google Cloud Functions service account + * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be + * granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter + * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the + * Key/KeyRing/Project/Organization (least access preferred). GCF will + * delegate access to the Google Storage service account in the internal + * project. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * The project and location in which the Google Cloud Storage signed URL + * should be generated, specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The project and location in which the Google Cloud Storage signed URL + * should be generated, specified in the format `projects/*/locations/*`. + * + * 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; + } + + /** + * Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt function source code objects in staging Cloud Storage + * buckets. When you generate an upload url and upload your source code, it + * gets copied to a staging Cloud Storage bucket in an internal regional + * project. The source code is then copied to a versioned directory in the + * sources bucket in the consumer project during the function deployment. + * It must match the pattern + * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * The Google Cloud Functions service account + * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be + * granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter + * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the + * Key/KeyRing/Project/Organization (least access preferred). GCF will + * delegate access to the Google Storage service account in the internal + * project. + * + * Generated from protobuf field string kms_key_name = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt function source code objects in staging Cloud Storage + * buckets. When you generate an upload url and upload your source code, it + * gets copied to a staging Cloud Storage bucket in an internal regional + * project. The source code is then copied to a versioned directory in the + * sources bucket in the consumer project during the function deployment. + * It must match the pattern + * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * The Google Cloud Functions service account + * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be + * granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter + * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the + * Key/KeyRing/Project/Organization (least access preferred). GCF will + * delegate access to the Google Storage service account in the internal + * project. + * + * Generated from protobuf field string kms_key_name = 2 [(.google.api.resource_reference) = { + * @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/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlResponse.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlResponse.php new file mode 100644 index 000000000000..41557ee9aa0e --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlResponse.php @@ -0,0 +1,75 @@ +google.cloud.functions.v1.GenerateUploadUrlResponse + */ +class GenerateUploadUrlResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The generated Google Cloud Storage signed URL that should be used for a + * function source code upload. The uploaded file should be a zip archive + * which contains a function. + * + * Generated from protobuf field string upload_url = 1; + */ + protected $upload_url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $upload_url + * The generated Google Cloud Storage signed URL that should be used for a + * function source code upload. The uploaded file should be a zip archive + * which contains a function. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * The generated Google Cloud Storage signed URL that should be used for a + * function source code upload. The uploaded file should be a zip archive + * which contains a function. + * + * Generated from protobuf field string upload_url = 1; + * @return string + */ + public function getUploadUrl() + { + return $this->upload_url; + } + + /** + * The generated Google Cloud Storage signed URL that should be used for a + * function source code upload. The uploaded file should be a zip archive + * which contains a function. + * + * Generated from protobuf field string upload_url = 1; + * @param string $var + * @return $this + */ + public function setUploadUrl($var) + { + GPBUtil::checkString($var, True); + $this->upload_url = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GetFunctionRequest.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GetFunctionRequest.php new file mode 100644 index 000000000000..f0452c1f7158 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GetFunctionRequest.php @@ -0,0 +1,67 @@ +google.cloud.functions.v1.GetFunctionRequest + */ +class GetFunctionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the function which details should be obtained. + * + * 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 name of the function which details should be obtained. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the function which details should be obtained. + * + * Generated 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 function which details should be obtained. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger.php new file mode 100644 index 000000000000..24ca96c54a24 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger.php @@ -0,0 +1,101 @@ +google.cloud.functions.v1.HttpsTrigger + */ +class HttpsTrigger extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The deployed url for the function. + * + * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $url = ''; + /** + * The security level for the function. + * + * Generated from protobuf field .google.cloud.functions.v1.HttpsTrigger.SecurityLevel security_level = 2; + */ + protected $security_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * Output only. The deployed url for the function. + * @type int $security_level + * The security level for the function. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The deployed url for the function. + * + * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Output only. The deployed url for the function. + * + * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * The security level for the function. + * + * Generated from protobuf field .google.cloud.functions.v1.HttpsTrigger.SecurityLevel security_level = 2; + * @return int + */ + public function getSecurityLevel() + { + return $this->security_level; + } + + /** + * The security level for the function. + * + * Generated from protobuf field .google.cloud.functions.v1.HttpsTrigger.SecurityLevel security_level = 2; + * @param int $var + * @return $this + */ + public function setSecurityLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V1\HttpsTrigger\SecurityLevel::class); + $this->security_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger/SecurityLevel.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger/SecurityLevel.php new file mode 100644 index 000000000000..26f38ca940f8 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger/SecurityLevel.php @@ -0,0 +1,70 @@ +google.cloud.functions.v1.HttpsTrigger.SecurityLevel + */ +class SecurityLevel +{ + /** + * Unspecified. + * + * Generated from protobuf enum SECURITY_LEVEL_UNSPECIFIED = 0; + */ + const SECURITY_LEVEL_UNSPECIFIED = 0; + /** + * Requests for a URL that match this handler that do not use HTTPS are + * automatically redirected to the HTTPS URL with the same path. Query + * parameters are reserved for the redirect. + * + * Generated from protobuf enum SECURE_ALWAYS = 1; + */ + const SECURE_ALWAYS = 1; + /** + * Both HTTP and HTTPS requests with URLs that match the handler succeed + * without redirects. The application can examine the request to determine + * which protocol was used and respond accordingly. + * + * Generated from protobuf enum SECURE_OPTIONAL = 2; + */ + const SECURE_OPTIONAL = 2; + + private static $valueToName = [ + self::SECURITY_LEVEL_UNSPECIFIED => 'SECURITY_LEVEL_UNSPECIFIED', + self::SECURE_ALWAYS => 'SECURE_ALWAYS', + self::SECURE_OPTIONAL => 'SECURE_OPTIONAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SecurityLevel::class, \Google\Cloud\Functions\V1\HttpsTrigger_SecurityLevel::class); + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger_SecurityLevel.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger_SecurityLevel.php new file mode 100644 index 000000000000..8ddba09d0955 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger_SecurityLevel.php @@ -0,0 +1,16 @@ +google.cloud.functions.v1.ListFunctionsRequest + */ +class ListFunctionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The project and location from which the function should be listed, + * specified in the format `projects/*/locations/*` + * If you want to list functions in all locations, use "-" in place of a + * location. When listing functions in all locations, if one or more + * location(s) are unreachable, the response will contain functions from all + * reachable locations along with the names of any unreachable locations. + * + * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of functions to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last + * `ListFunctionsResponse`; indicates that + * this is a continuation of a prior `ListFunctions` call, and that the + * system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The project and location from which the function should be listed, + * specified in the format `projects/*/locations/*` + * If you want to list functions in all locations, use "-" in place of a + * location. When listing functions in all locations, if one or more + * location(s) are unreachable, the response will contain functions from all + * reachable locations along with the names of any unreachable locations. + * @type int $page_size + * Maximum number of functions to return per call. + * @type string $page_token + * The value returned by the last + * `ListFunctionsResponse`; indicates that + * this is a continuation of a prior `ListFunctions` call, and that the + * system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * The project and location from which the function should be listed, + * specified in the format `projects/*/locations/*` + * If you want to list functions in all locations, use "-" in place of a + * location. When listing functions in all locations, if one or more + * location(s) are unreachable, the response will contain functions from all + * reachable locations along with the names of any unreachable locations. + * + * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The project and location from which the function should be listed, + * specified in the format `projects/*/locations/*` + * If you want to list functions in all locations, use "-" in place of a + * location. When listing functions in all locations, if one or more + * location(s) are unreachable, the response will contain functions from all + * reachable locations along with the names of any unreachable locations. + * + * Generated from protobuf field string parent = 1 [(.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 functions to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of functions 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 + * `ListFunctionsResponse`; indicates that + * this is a continuation of a prior `ListFunctions` 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 + * `ListFunctionsResponse`; indicates that + * this is a continuation of a prior `ListFunctions` 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/Functions/v1/proto/src/Google/Cloud/Functions/V1/ListFunctionsResponse.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/ListFunctionsResponse.php new file mode 100644 index 000000000000..354f44b97f4e --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/ListFunctionsResponse.php @@ -0,0 +1,151 @@ +google.cloud.functions.v1.ListFunctionsResponse + */ +class ListFunctionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The functions that match the request. + * + * Generated from protobuf field repeated .google.cloud.functions.v1.CloudFunction functions = 1; + */ + private $functions; + /** + * If not empty, indicates that there may be more functions that match + * the request; this value should be passed in a new + * [google.cloud.functions.v1.ListFunctionsRequest][google.cloud.functions.v1.ListFunctionsRequest] + * to get more functions. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. The response does not include any + * functions from these locations. + * + * 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\Functions\V1\CloudFunction>|\Google\Protobuf\Internal\RepeatedField $functions + * The functions that match the request. + * @type string $next_page_token + * If not empty, indicates that there may be more functions that match + * the request; this value should be passed in a new + * [google.cloud.functions.v1.ListFunctionsRequest][google.cloud.functions.v1.ListFunctionsRequest] + * to get more functions. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. The response does not include any + * functions from these locations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * The functions that match the request. + * + * Generated from protobuf field repeated .google.cloud.functions.v1.CloudFunction functions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFunctions() + { + return $this->functions; + } + + /** + * The functions that match the request. + * + * Generated from protobuf field repeated .google.cloud.functions.v1.CloudFunction functions = 1; + * @param array<\Google\Cloud\Functions\V1\CloudFunction>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFunctions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V1\CloudFunction::class); + $this->functions = $arr; + + return $this; + } + + /** + * If not empty, indicates that there may be more functions that match + * the request; this value should be passed in a new + * [google.cloud.functions.v1.ListFunctionsRequest][google.cloud.functions.v1.ListFunctionsRequest] + * to get more functions. + * + * 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 functions that match + * the request; this value should be passed in a new + * [google.cloud.functions.v1.ListFunctionsRequest][google.cloud.functions.v1.ListFunctionsRequest] + * to get more functions. + * + * 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. The response does not include any + * functions from these locations. + * + * 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. The response does not include any + * functions from these locations. + * + * 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/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationMetadataV1.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationMetadataV1.php new file mode 100644 index 000000000000..0f72c0be190f --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationMetadataV1.php @@ -0,0 +1,349 @@ +google.cloud.functions.v1.OperationMetadataV1 + */ +class OperationMetadataV1 extends \Google\Protobuf\Internal\Message +{ + /** + * Target of the operation - for example + * `projects/project-1/locations/region-1/functions/function-1` + * + * Generated from protobuf field string target = 1; + */ + protected $target = ''; + /** + * Type of operation. + * + * Generated from protobuf field .google.cloud.functions.v1.OperationType type = 2; + */ + protected $type = 0; + /** + * The original request that started the operation. + * + * Generated from protobuf field .google.protobuf.Any request = 3; + */ + protected $request = null; + /** + * Version id of the function created or updated by an API call. + * This field is only populated for Create and Update operations. + * + * Generated from protobuf field int64 version_id = 4; + */ + protected $version_id = 0; + /** + * The last update timestamp of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5; + */ + protected $update_time = null; + /** + * The Cloud Build ID of the function created or updated by an API call. + * This field is only populated for Create and Update operations. + * + * Generated from protobuf field string build_id = 6; + */ + protected $build_id = ''; + /** + * An identifier for Firebase function sources. Disclaimer: This field is only + * supported for Firebase function deployments. + * + * Generated from protobuf field string source_token = 7; + */ + protected $source_token = ''; + /** + * The Cloud Build Name of the function deployment. + * This field is only populated for Create and Update operations. + * `projects//locations//builds/`. + * + * Generated from protobuf field string build_name = 8; + */ + protected $build_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $target + * Target of the operation - for example + * `projects/project-1/locations/region-1/functions/function-1` + * @type int $type + * Type of operation. + * @type \Google\Protobuf\Any $request + * The original request that started the operation. + * @type int|string $version_id + * Version id of the function created or updated by an API call. + * This field is only populated for Create and Update operations. + * @type \Google\Protobuf\Timestamp $update_time + * The last update timestamp of the operation. + * @type string $build_id + * The Cloud Build ID of the function created or updated by an API call. + * This field is only populated for Create and Update operations. + * @type string $source_token + * An identifier for Firebase function sources. Disclaimer: This field is only + * supported for Firebase function deployments. + * @type string $build_name + * The Cloud Build Name of the function deployment. + * This field is only populated for Create and Update operations. + * `projects//locations//builds/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Operations::initOnce(); + parent::__construct($data); + } + + /** + * Target of the operation - for example + * `projects/project-1/locations/region-1/functions/function-1` + * + * Generated from protobuf field string target = 1; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Target of the operation - for example + * `projects/project-1/locations/region-1/functions/function-1` + * + * Generated from protobuf field string target = 1; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Type of operation. + * + * Generated from protobuf field .google.cloud.functions.v1.OperationType type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Type of operation. + * + * Generated from protobuf field .google.cloud.functions.v1.OperationType type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V1\OperationType::class); + $this->type = $var; + + return $this; + } + + /** + * The original request that started the operation. + * + * Generated from protobuf field .google.protobuf.Any request = 3; + * @return \Google\Protobuf\Any|null + */ + public function getRequest() + { + return $this->request; + } + + public function hasRequest() + { + return isset($this->request); + } + + public function clearRequest() + { + unset($this->request); + } + + /** + * The original request that started the operation. + * + * Generated from protobuf field .google.protobuf.Any request = 3; + * @param \Google\Protobuf\Any $var + * @return $this + */ + public function setRequest($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + $this->request = $var; + + return $this; + } + + /** + * Version id of the function created or updated by an API call. + * This field is only populated for Create and Update operations. + * + * Generated from protobuf field int64 version_id = 4; + * @return int|string + */ + public function getVersionId() + { + return $this->version_id; + } + + /** + * Version id of the function created or updated by an API call. + * This field is only populated for Create and Update operations. + * + * 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; + } + + /** + * The last update timestamp of the operation. + * + * 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 last update timestamp of the operation. + * + * 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; + } + + /** + * The Cloud Build ID of the function created or updated by an API call. + * This field is only populated for Create and Update operations. + * + * Generated from protobuf field string build_id = 6; + * @return string + */ + public function getBuildId() + { + return $this->build_id; + } + + /** + * The Cloud Build ID of the function created or updated by an API call. + * This field is only populated for Create and Update operations. + * + * Generated from protobuf field string build_id = 6; + * @param string $var + * @return $this + */ + public function setBuildId($var) + { + GPBUtil::checkString($var, True); + $this->build_id = $var; + + return $this; + } + + /** + * An identifier for Firebase function sources. Disclaimer: This field is only + * supported for Firebase function deployments. + * + * Generated from protobuf field string source_token = 7; + * @return string + */ + public function getSourceToken() + { + return $this->source_token; + } + + /** + * An identifier for Firebase function sources. Disclaimer: This field is only + * supported for Firebase function deployments. + * + * Generated from protobuf field string source_token = 7; + * @param string $var + * @return $this + */ + public function setSourceToken($var) + { + GPBUtil::checkString($var, True); + $this->source_token = $var; + + return $this; + } + + /** + * The Cloud Build Name of the function deployment. + * This field is only populated for Create and Update operations. + * `projects//locations//builds/`. + * + * Generated from protobuf field string build_name = 8; + * @return string + */ + public function getBuildName() + { + return $this->build_name; + } + + /** + * The Cloud Build Name of the function deployment. + * This field is only populated for Create and Update operations. + * `projects//locations//builds/`. + * + * Generated from protobuf field string build_name = 8; + * @param string $var + * @return $this + */ + public function setBuildName($var) + { + GPBUtil::checkString($var, True); + $this->build_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationType.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationType.php new file mode 100644 index 000000000000..665dca661df7 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationType.php @@ -0,0 +1,68 @@ +google.cloud.functions.v1.OperationType + */ +class OperationType +{ + /** + * Unknown operation type. + * + * Generated from protobuf enum OPERATION_UNSPECIFIED = 0; + */ + const OPERATION_UNSPECIFIED = 0; + /** + * Triggered by CreateFunction call + * + * Generated from protobuf enum CREATE_FUNCTION = 1; + */ + const CREATE_FUNCTION = 1; + /** + * Triggered by UpdateFunction call + * + * Generated from protobuf enum UPDATE_FUNCTION = 2; + */ + const UPDATE_FUNCTION = 2; + /** + * Triggered by DeleteFunction call. + * + * Generated from protobuf enum DELETE_FUNCTION = 3; + */ + const DELETE_FUNCTION = 3; + + private static $valueToName = [ + self::OPERATION_UNSPECIFIED => 'OPERATION_UNSPECIFIED', + self::CREATE_FUNCTION => 'CREATE_FUNCTION', + self::UPDATE_FUNCTION => 'UPDATE_FUNCTION', + self::DELETE_FUNCTION => 'DELETE_FUNCTION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretEnvVar.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretEnvVar.php new file mode 100644 index 000000000000..c47df271d7a9 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretEnvVar.php @@ -0,0 +1,191 @@ +google.cloud.functions.v1.SecretEnvVar + */ +class SecretEnvVar extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the environment variable. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * Project identifier (preferrably project number but can also be the project + * ID) of the project that contains the secret. If not set, it will be + * populated with the function's project assuming that the secret exists in + * the same project as of the function. + * + * Generated from protobuf field string project_id = 2; + */ + protected $project_id = ''; + /** + * Name of the secret in secret manager (not the full resource name). + * + * Generated from protobuf field string secret = 3; + */ + protected $secret = ''; + /** + * Version of the secret (version number or the string 'latest'). It is + * recommended to use a numeric version for secret environment variables as + * any updates to the secret value is not reflected until new instances start. + * + * Generated from protobuf field string version = 4; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * Name of the environment variable. + * @type string $project_id + * Project identifier (preferrably project number but can also be the project + * ID) of the project that contains the secret. If not set, it will be + * populated with the function's project assuming that the secret exists in + * the same project as of the function. + * @type string $secret + * Name of the secret in secret manager (not the full resource name). + * @type string $version + * Version of the secret (version number or the string 'latest'). It is + * recommended to use a numeric version for secret environment variables as + * any updates to the secret value is not reflected until new instances start. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Name of the environment variable. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Name of the environment variable. + * + * 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; + } + + /** + * Project identifier (preferrably project number but can also be the project + * ID) of the project that contains the secret. If not set, it will be + * populated with the function's project assuming that the secret exists in + * the same project as of the function. + * + * Generated from protobuf field string project_id = 2; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Project identifier (preferrably project number but can also be the project + * ID) of the project that contains the secret. If not set, it will be + * populated with the function's project assuming that the secret exists in + * the same project as of the function. + * + * 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; + } + + /** + * Name of the secret in secret manager (not the full resource name). + * + * Generated from protobuf field string secret = 3; + * @return string + */ + public function getSecret() + { + return $this->secret; + } + + /** + * Name of the secret in secret manager (not the full resource name). + * + * Generated from protobuf field string secret = 3; + * @param string $var + * @return $this + */ + public function setSecret($var) + { + GPBUtil::checkString($var, True); + $this->secret = $var; + + return $this; + } + + /** + * Version of the secret (version number or the string 'latest'). It is + * recommended to use a numeric version for secret environment variables as + * any updates to the secret value is not reflected until new instances start. + * + * Generated from protobuf field string version = 4; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version of the secret (version number or the string 'latest'). It is + * recommended to use a numeric version for secret environment variables as + * any updates to the secret value is not reflected until new instances start. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume.php new file mode 100644 index 000000000000..66e6c00d8ac1 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume.php @@ -0,0 +1,213 @@ +google.cloud.functions.v1.SecretVolume + */ +class SecretVolume extends \Google\Protobuf\Internal\Message +{ + /** + * The path within the container to mount the secret volume. For example, + * setting the mount_path as `/etc/secrets` would mount the secret value files + * under the `/etc/secrets` directory. This directory will also be completely + * shadowed and unavailable to mount any other secrets. + * Recommended mount paths: /etc/secrets + * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log + * + * Generated from protobuf field string mount_path = 1; + */ + protected $mount_path = ''; + /** + * Project identifier (preferrably project number but can also be the project + * ID) of the project that contains the secret. If not set, it will be + * populated with the function's project assuming that the secret exists in + * the same project as of the function. + * + * Generated from protobuf field string project_id = 2; + */ + protected $project_id = ''; + /** + * Name of the secret in secret manager (not the full resource name). + * + * Generated from protobuf field string secret = 3; + */ + protected $secret = ''; + /** + * List of secret versions to mount for this secret. If empty, the `latest` + * version of the secret will be made available in a file named after the + * secret under the mount point. + * + * Generated from protobuf field repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + private $versions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mount_path + * The path within the container to mount the secret volume. For example, + * setting the mount_path as `/etc/secrets` would mount the secret value files + * under the `/etc/secrets` directory. This directory will also be completely + * shadowed and unavailable to mount any other secrets. + * Recommended mount paths: /etc/secrets + * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log + * @type string $project_id + * Project identifier (preferrably project number but can also be the project + * ID) of the project that contains the secret. If not set, it will be + * populated with the function's project assuming that the secret exists in + * the same project as of the function. + * @type string $secret + * Name of the secret in secret manager (not the full resource name). + * @type array<\Google\Cloud\Functions\V1\SecretVolume\SecretVersion>|\Google\Protobuf\Internal\RepeatedField $versions + * List of secret versions to mount for this secret. If empty, the `latest` + * version of the secret will be made available in a file named after the + * secret under the mount point. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * The path within the container to mount the secret volume. For example, + * setting the mount_path as `/etc/secrets` would mount the secret value files + * under the `/etc/secrets` directory. This directory will also be completely + * shadowed and unavailable to mount any other secrets. + * Recommended mount paths: /etc/secrets + * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log + * + * Generated from protobuf field string mount_path = 1; + * @return string + */ + public function getMountPath() + { + return $this->mount_path; + } + + /** + * The path within the container to mount the secret volume. For example, + * setting the mount_path as `/etc/secrets` would mount the secret value files + * under the `/etc/secrets` directory. This directory will also be completely + * shadowed and unavailable to mount any other secrets. + * Recommended mount paths: /etc/secrets + * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log + * + * Generated from protobuf field string mount_path = 1; + * @param string $var + * @return $this + */ + public function setMountPath($var) + { + GPBUtil::checkString($var, True); + $this->mount_path = $var; + + return $this; + } + + /** + * Project identifier (preferrably project number but can also be the project + * ID) of the project that contains the secret. If not set, it will be + * populated with the function's project assuming that the secret exists in + * the same project as of the function. + * + * Generated from protobuf field string project_id = 2; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Project identifier (preferrably project number but can also be the project + * ID) of the project that contains the secret. If not set, it will be + * populated with the function's project assuming that the secret exists in + * the same project as of the function. + * + * 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; + } + + /** + * Name of the secret in secret manager (not the full resource name). + * + * Generated from protobuf field string secret = 3; + * @return string + */ + public function getSecret() + { + return $this->secret; + } + + /** + * Name of the secret in secret manager (not the full resource name). + * + * Generated from protobuf field string secret = 3; + * @param string $var + * @return $this + */ + public function setSecret($var) + { + GPBUtil::checkString($var, True); + $this->secret = $var; + + return $this; + } + + /** + * List of secret versions to mount for this secret. If empty, the `latest` + * version of the secret will be made available in a file named after the + * secret under the mount point. + * + * Generated from protobuf field repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVersions() + { + return $this->versions; + } + + /** + * List of secret versions to mount for this secret. If empty, the `latest` + * version of the secret will be made available in a file named after the + * secret under the mount point. + * + * Generated from protobuf field repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + * @param array<\Google\Cloud\Functions\V1\SecretVolume\SecretVersion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V1\SecretVolume\SecretVersion::class); + $this->versions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume/SecretVersion.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume/SecretVersion.php new file mode 100644 index 000000000000..02ed3c23ded0 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume/SecretVersion.php @@ -0,0 +1,124 @@ +google.cloud.functions.v1.SecretVolume.SecretVersion + */ +class SecretVersion extends \Google\Protobuf\Internal\Message +{ + /** + * Version of the secret (version number or the string 'latest'). It is + * preferrable to use `latest` version with secret volumes as secret value + * changes are reflected immediately. + * + * Generated from protobuf field string version = 1; + */ + protected $version = ''; + /** + * Relative path of the file under the mount path where the secret value for + * this version will be fetched and made available. For example, setting the + * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the + * secret value file at `/etc/secrets/secret_foo`. + * + * Generated from protobuf field string path = 2; + */ + protected $path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * Version of the secret (version number or the string 'latest'). It is + * preferrable to use `latest` version with secret volumes as secret value + * changes are reflected immediately. + * @type string $path + * Relative path of the file under the mount path where the secret value for + * this version will be fetched and made available. For example, setting the + * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the + * secret value file at `/etc/secrets/secret_foo`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Version of the secret (version number or the string 'latest'). It is + * preferrable to use `latest` version with secret volumes as secret value + * changes are reflected immediately. + * + * Generated from protobuf field string version = 1; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version of the secret (version number or the string 'latest'). It is + * preferrable to use `latest` version with secret volumes as secret value + * changes are reflected immediately. + * + * Generated from protobuf field string version = 1; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Relative path of the file under the mount path where the secret value for + * this version will be fetched and made available. For example, setting the + * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the + * secret value file at `/etc/secrets/secret_foo`. + * + * Generated from protobuf field string path = 2; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Relative path of the file under the mount path where the secret value for + * this version will be fetched and made available. For example, setting the + * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the + * secret value file at `/etc/secrets/secret_foo`. + * + * 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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SecretVersion::class, \Google\Cloud\Functions\V1\SecretVolume_SecretVersion::class); + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume_SecretVersion.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume_SecretVersion.php new file mode 100644 index 000000000000..6a33ad16f375 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume_SecretVersion.php @@ -0,0 +1,16 @@ +google.cloud.functions.v1.SourceRepository + */ +class SourceRepository extends \Google\Protobuf\Internal\Message +{ + /** + * The URL pointing to the hosted repository where the function is defined. + * There are supported Cloud Source Repository URLs in the following + * formats: + * To refer to a specific commit: + * `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` + * To refer to a moveable alias (branch): + * `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` + * In particular, to refer to HEAD use `master` moveable alias. + * To refer to a specific fixed alias (tag): + * `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` + * You may omit `paths/*` if you want to use the main directory. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + /** + * Output only. The URL pointing to the hosted repository where the function + * were defined at the time of deployment. It always points to a specific + * commit in the format described above. + * + * Generated from protobuf field string deployed_url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $deployed_url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * The URL pointing to the hosted repository where the function is defined. + * There are supported Cloud Source Repository URLs in the following + * formats: + * To refer to a specific commit: + * `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` + * To refer to a moveable alias (branch): + * `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` + * In particular, to refer to HEAD use `master` moveable alias. + * To refer to a specific fixed alias (tag): + * `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` + * You may omit `paths/*` if you want to use the main directory. + * @type string $deployed_url + * Output only. The URL pointing to the hosted repository where the function + * were defined at the time of deployment. It always points to a specific + * commit in the format described above. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * The URL pointing to the hosted repository where the function is defined. + * There are supported Cloud Source Repository URLs in the following + * formats: + * To refer to a specific commit: + * `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` + * To refer to a moveable alias (branch): + * `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` + * In particular, to refer to HEAD use `master` moveable alias. + * To refer to a specific fixed alias (tag): + * `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` + * You may omit `paths/*` if you want to use the main directory. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The URL pointing to the hosted repository where the function is defined. + * There are supported Cloud Source Repository URLs in the following + * formats: + * To refer to a specific commit: + * `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` + * To refer to a moveable alias (branch): + * `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` + * In particular, to refer to HEAD use `master` moveable alias. + * To refer to a specific fixed alias (tag): + * `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` + * You may omit `paths/*` if you want to use the main directory. + * + * 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; + } + + /** + * Output only. The URL pointing to the hosted repository where the function + * were defined at the time of deployment. It always points to a specific + * commit in the format described above. + * + * Generated from protobuf field string deployed_url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDeployedUrl() + { + return $this->deployed_url; + } + + /** + * Output only. The URL pointing to the hosted repository where the function + * were defined at the time of deployment. It always points to a specific + * commit in the format described above. + * + * Generated from protobuf field string deployed_url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDeployedUrl($var) + { + GPBUtil::checkString($var, True); + $this->deployed_url = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/UpdateFunctionRequest.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/UpdateFunctionRequest.php new file mode 100644 index 000000000000..9d09690f55e7 --- /dev/null +++ b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/UpdateFunctionRequest.php @@ -0,0 +1,121 @@ +google.cloud.functions.v1.UpdateFunctionRequest + */ +class UpdateFunctionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. New version of the function. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunction function = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $function = null; + /** + * Required. The list of fields in `CloudFunction` that have to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Functions\V1\CloudFunction $function + * Required. New version of the function. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields in `CloudFunction` that have to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Required. New version of the function. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunction function = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Functions\V1\CloudFunction|null + */ + public function getFunction() + { + return $this->function; + } + + public function hasFunction() + { + return isset($this->function); + } + + public function clearFunction() + { + unset($this->function); + } + + /** + * Required. New version of the function. + * + * Generated from protobuf field .google.cloud.functions.v1.CloudFunction function = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Functions\V1\CloudFunction $var + * @return $this + */ + public function setFunction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V1\CloudFunction::class); + $this->function = $var; + + return $this; + } + + /** + * Required. The list of fields in `CloudFunction` that have to be updated. + * + * 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); + } + + /** + * Required. The list of fields in `CloudFunction` that have to be updated. + * + * 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/Functions/v1/samples/V1/CloudFunctionsServiceClient/call_function.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/call_function.php new file mode 100644 index 000000000000..edc277de9f19 --- /dev/null +++ b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/call_function.php @@ -0,0 +1,75 @@ +callFunction($formattedName, $data); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudFunctionsServiceClient::cloudFunctionName( + '[PROJECT]', + '[LOCATION]', + '[FUNCTION]' + ); + $data = '[DATA]'; + + call_function_sample($formattedName, $data); +} +// [END cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/create_function.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/create_function.php new file mode 100644 index 000000000000..198807c62088 --- /dev/null +++ b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/create_function.php @@ -0,0 +1,84 @@ +createFunction($formattedLocation, $function); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CloudFunction $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedLocation = CloudFunctionsServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_function_sample($formattedLocation); +} +// [END cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/delete_function.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/delete_function.php new file mode 100644 index 000000000000..2d0db28addc4 --- /dev/null +++ b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/delete_function.php @@ -0,0 +1,81 @@ +deleteFunction($formattedName); + $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 = CloudFunctionsServiceClient::cloudFunctionName( + '[PROJECT]', + '[LOCATION]', + '[FUNCTION]' + ); + + delete_function_sample($formattedName); +} +// [END cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_download_url.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_download_url.php new file mode 100644 index 000000000000..baf1afdab994 --- /dev/null +++ b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_download_url.php @@ -0,0 +1,57 @@ +generateDownloadUrl(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_upload_url.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_upload_url.php new file mode 100644 index 000000000000..971a3299a9ca --- /dev/null +++ b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_upload_url.php @@ -0,0 +1,77 @@ +generateUploadUrl(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_function.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_function.php new file mode 100644 index 000000000000..3d4ea2574eee --- /dev/null +++ b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_function.php @@ -0,0 +1,70 @@ +getFunction($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudFunctionsServiceClient::cloudFunctionName( + '[PROJECT]', + '[LOCATION]', + '[FUNCTION]' + ); + + get_function_sample($formattedName); +} +// [END cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_iam_policy.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..cd081bf965fc --- /dev/null +++ b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_iam_policy.php @@ -0,0 +1,68 @@ +getIamPolicy($resource); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/list_functions.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/list_functions.php new file mode 100644 index 000000000000..4c88d8657e18 --- /dev/null +++ b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/list_functions.php @@ -0,0 +1,58 @@ +listFunctions(); + + /** @var CloudFunction $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 cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/set_iam_policy.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..f86b825bf887 --- /dev/null +++ b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/set_iam_policy.php @@ -0,0 +1,70 @@ +setIamPolicy($resource, $policy); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/test_iam_permissions.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..b7dff5dfed0b --- /dev/null +++ b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/test_iam_permissions.php @@ -0,0 +1,77 @@ +testIamPermissions($resource, $permissions); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/update_function.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/update_function.php new file mode 100644 index 000000000000..9f8ea1e1fd6c --- /dev/null +++ b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/update_function.php @@ -0,0 +1,68 @@ +updateFunction($function); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CloudFunction $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + 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 cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_sync] diff --git a/owl-bot-staging/Functions/v1/src/V1/CloudFunctionsServiceClient.php b/owl-bot-staging/Functions/v1/src/V1/CloudFunctionsServiceClient.php new file mode 100644 index 000000000000..2760531c5365 --- /dev/null +++ b/owl-bot-staging/Functions/v1/src/V1/CloudFunctionsServiceClient.php @@ -0,0 +1,34 @@ +cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + * $data = 'data'; + * $response = $cloudFunctionsServiceClient->callFunction($formattedName, $data); + * } finally { + * $cloudFunctionsServiceClient->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. + */ +class CloudFunctionsServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.functions.v1.CloudFunctionsService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'cloudfunctions.googleapis.com'; + + /** 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 $cloudFunctionNameTemplate; + + private static $cryptoKeyNameTemplate; + + private static $locationNameTemplate; + + private static $repositoryNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/cloud_functions_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_functions_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_functions_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/cloud_functions_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getCloudFunctionNameTemplate() + { + if (self::$cloudFunctionNameTemplate == null) { + self::$cloudFunctionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/functions/{function}'); + } + + return self::$cloudFunctionNameTemplate; + } + + private static function getCryptoKeyNameTemplate() + { + if (self::$cryptoKeyNameTemplate == null) { + self::$cryptoKeyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}'); + } + + return self::$cryptoKeyNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getRepositoryNameTemplate() + { + if (self::$repositoryNameTemplate == null) { + self::$repositoryNameTemplate = new PathTemplate('projects/{project}/locations/{location}/repositories/{repository}'); + } + + return self::$repositoryNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'cloudFunction' => self::getCloudFunctionNameTemplate(), + 'cryptoKey' => self::getCryptoKeyNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'repository' => self::getRepositoryNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * cloud_function resource. + * + * @param string $project + * @param string $location + * @param string $function + * + * @return string The formatted cloud_function resource. + */ + public static function cloudFunctionName($project, $location, $function) + { + return self::getCloudFunctionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'function' => $function, + ]); + } + + /** + * 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($project, $location, $keyRing, $cryptoKey) + { + return self::getCryptoKeyNameTemplate()->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($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a repository + * resource. + * + * @param string $project + * @param string $location + * @param string $repository + * + * @return string The formatted repository resource. + */ + public static function repositoryName($project, $location, $repository) + { + return self::getRepositoryNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'repository' => $repository, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cloudFunction: projects/{project}/locations/{location}/functions/{function} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - location: projects/{project}/locations/{location} + * - repository: projects/{project}/locations/{location}/repositories/{repository} + * + * 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"); + } + + /** + * 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; + } + + /** + * 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 'cloudfunctions.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Synchronously invokes a deployed Cloud Function. To be used for testing + * purposes as very limited traffic is allowed. For more information on + * the actual limits, refer to + * [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits). + * + * Sample code: + * ``` + * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); + * try { + * $formattedName = $cloudFunctionsServiceClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + * $data = 'data'; + * $response = $cloudFunctionsServiceClient->callFunction($formattedName, $data); + * } finally { + * $cloudFunctionsServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the function to be called. + * @param string $data Required. Input to be passed to the function. + * @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\Functions\V1\CallFunctionResponse + * + * @throws ApiException if the remote call fails + */ + public function callFunction($name, $data, array $optionalArgs = []) + { + $request = new CallFunctionRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setData($data); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CallFunction', CallFunctionResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a new function. If a function with the given name already exists in + * the specified project, the long running operation will return + * `ALREADY_EXISTS` error. + * + * Sample code: + * ``` + * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); + * try { + * $formattedLocation = $cloudFunctionsServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $function = new CloudFunction(); + * $operationResponse = $cloudFunctionsServiceClient->createFunction($formattedLocation, $function); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $cloudFunctionsServiceClient->createFunction($formattedLocation, $function); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $cloudFunctionsServiceClient->resumeOperation($operationName, 'createFunction'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $cloudFunctionsServiceClient->close(); + * } + * ``` + * + * @param string $location Required. The project and location in which the function should be created, specified + * in the format `projects/*/locations/*` + * @param CloudFunction $function Required. Function to be created. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createFunction($location, $function, array $optionalArgs = []) + { + $request = new CreateFunctionRequest(); + $requestParamHeaders = []; + $request->setLocation($location); + $request->setFunction($function); + $requestParamHeaders['location'] = $location; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateFunction', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a function with the given name from the specified project. If the + * given function is used by some trigger, the trigger will be updated to + * remove this function. + * + * Sample code: + * ``` + * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); + * try { + * $formattedName = $cloudFunctionsServiceClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + * $operationResponse = $cloudFunctionsServiceClient->deleteFunction($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $cloudFunctionsServiceClient->deleteFunction($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $cloudFunctionsServiceClient->resumeOperation($operationName, 'deleteFunction'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $cloudFunctionsServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the function which should be deleted. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteFunction($name, array $optionalArgs = []) + { + $request = new DeleteFunctionRequest(); + $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->startOperationsCall('DeleteFunction', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Returns a signed URL for downloading deployed function source code. + * The URL is only valid for a limited period and should be used within + * minutes after generation. + * For more information about the signed URL usage see: + * https://cloud.google.com/storage/docs/access-control/signed-urls + * + * Sample code: + * ``` + * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); + * try { + * $response = $cloudFunctionsServiceClient->generateDownloadUrl(); + * } finally { + * $cloudFunctionsServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The name of function for which source code Google Cloud Storage signed + * URL should be generated. + * @type int $versionId + * The optional version of function. If not set, default, current version + * is used. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Functions\V1\GenerateDownloadUrlResponse + * + * @throws ApiException if the remote call fails + */ + public function generateDownloadUrl(array $optionalArgs = []) + { + $request = new GenerateDownloadUrlRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['versionId'])) { + $request->setVersionId($optionalArgs['versionId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GenerateDownloadUrl', GenerateDownloadUrlResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns a signed URL for uploading a function source code. + * For more information about the signed URL usage see: + * https://cloud.google.com/storage/docs/access-control/signed-urls. + * Once the function source code upload is complete, the used signed + * URL should be provided in CreateFunction or UpdateFunction request + * as a reference to the function source code. + * + * When uploading source code to the generated signed URL, please follow + * these restrictions: + * + * * Source file type should be a zip file. + * * Source file size should not exceed 100MB limit. + * * No credentials should be attached - the signed URLs provide access to the + * target bucket using internal service identity; if credentials were + * attached, the identity from the credentials would be used, but that + * identity does not have permissions to upload files to the URL. + * + * When making a HTTP PUT request, these two headers need to be specified: + * + * * `content-type: application/zip` + * * `x-goog-content-length-range: 0,104857600` + * + * And this header SHOULD NOT be specified: + * + * * `Authorization: Bearer YOUR_TOKEN` + * + * Sample code: + * ``` + * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); + * try { + * $response = $cloudFunctionsServiceClient->generateUploadUrl(); + * } finally { + * $cloudFunctionsServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $parent + * The project and location in which the Google Cloud Storage signed URL + * should be generated, specified in the format `projects/*/locations/*`. + * @type string $kmsKeyName + * Resource name of a KMS crypto key (managed by the user) used to + * encrypt/decrypt function source code objects in staging Cloud Storage + * buckets. When you generate an upload url and upload your source code, it + * gets copied to a staging Cloud Storage bucket in an internal regional + * project. The source code is then copied to a versioned directory in the + * sources bucket in the consumer project during the function deployment. + * + * It must match the pattern + * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * The Google Cloud Functions service account + * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be + * granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter + * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the + * Key/KeyRing/Project/Organization (least access preferred). GCF will + * delegate access to the Google Storage service account in the internal + * project. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Functions\V1\GenerateUploadUrlResponse + * + * @throws ApiException if the remote call fails + */ + public function generateUploadUrl(array $optionalArgs = []) + { + $request = new GenerateUploadUrlRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['parent'])) { + $request->setParent($optionalArgs['parent']); + $requestParamHeaders['parent'] = $optionalArgs['parent']; + } + + if (isset($optionalArgs['kmsKeyName'])) { + $request->setKmsKeyName($optionalArgs['kmsKeyName']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GenerateUploadUrl', GenerateUploadUrlResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns a function with the given name from the requested project. + * + * Sample code: + * ``` + * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); + * try { + * $formattedName = $cloudFunctionsServiceClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + * $response = $cloudFunctionsServiceClient->getFunction($formattedName); + * } finally { + * $cloudFunctionsServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the function which details should be obtained. + * @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\Functions\V1\CloudFunction + * + * @throws ApiException if the remote call fails + */ + public function getFunction($name, array $optionalArgs = []) + { + $request = new GetFunctionRequest(); + $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('GetFunction', CloudFunction::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the IAM access control policy for a function. + * Returns an empty policy if the function exists and does not have a policy + * set. + * + * Sample code: + * ``` + * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); + * try { + * $resource = 'resource'; + * $response = $cloudFunctionsServiceClient->getIamPolicy($resource); + * } finally { + * $cloudFunctionsServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns a list of functions that belong to the requested project. + * + * Sample code: + * ``` + * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $cloudFunctionsServiceClient->listFunctions(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $cloudFunctionsServiceClient->listFunctions(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $cloudFunctionsServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $parent + * The project and location from which the function should be listed, + * specified in the format `projects/*/locations/*` + * If you want to list functions in all locations, use "-" in place of a + * location. When listing functions in all locations, if one or more + * location(s) are unreachable, the response will contain functions from all + * reachable locations along with the names of any unreachable locations. + * @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 listFunctions(array $optionalArgs = []) + { + $request = new ListFunctionsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['parent'])) { + $request->setParent($optionalArgs['parent']); + $requestParamHeaders['parent'] = $optionalArgs['parent']; + } + + 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('ListFunctions', $optionalArgs, ListFunctionsResponse::class, $request); + } + + /** + * Sets the IAM access control policy on the specified function. + * Replaces any existing policy. + * + * Sample code: + * ``` + * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $cloudFunctionsServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $cloudFunctionsServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + 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('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Tests the specified permissions against the IAM access control policy + * for a function. + * If the function does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Sample code: + * ``` + * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $cloudFunctionsServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $cloudFunctionsServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @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\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates existing function. + * + * Sample code: + * ``` + * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); + * try { + * $function = new CloudFunction(); + * $operationResponse = $cloudFunctionsServiceClient->updateFunction($function); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $cloudFunctionsServiceClient->updateFunction($function); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $cloudFunctionsServiceClient->resumeOperation($operationName, 'updateFunction'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $cloudFunctionsServiceClient->close(); + * } + * ``` + * + * @param CloudFunction $function Required. New version of the function. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Required. The list of fields in `CloudFunction` that have to be updated. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateFunction($function, array $optionalArgs = []) + { + $request = new UpdateFunctionRequest(); + $requestParamHeaders = []; + $request->setFunction($function); + $requestParamHeaders['function.name'] = $function->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->startOperationsCall('UpdateFunction', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/Functions/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Functions/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..0571f724aa05 --- /dev/null +++ b/owl-bot-staging/Functions/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.functions.v1", + "libraryPackage": "Google\\Cloud\\Functions\\V1", + "services": { + "CloudFunctionsService": { + "clients": { + "grpc": { + "libraryClient": "CloudFunctionsServiceGapicClient", + "rpcs": { + "CallFunction": { + "methods": [ + "callFunction" + ] + }, + "CreateFunction": { + "methods": [ + "createFunction" + ] + }, + "DeleteFunction": { + "methods": [ + "deleteFunction" + ] + }, + "GenerateDownloadUrl": { + "methods": [ + "generateDownloadUrl" + ] + }, + "GenerateUploadUrl": { + "methods": [ + "generateUploadUrl" + ] + }, + "GetFunction": { + "methods": [ + "getFunction" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "ListFunctions": { + "methods": [ + "listFunctions" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UpdateFunction": { + "methods": [ + "updateFunction" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_client_config.json b/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_client_config.json new file mode 100644 index 000000000000..ef89754d42df --- /dev/null +++ b/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_client_config.json @@ -0,0 +1,100 @@ +{ + "interfaces": { + "google.cloud.functions.v1.CloudFunctionsService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "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": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + }, + "no_retry_1_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": { + "CallFunction": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateFunction": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteFunction": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GenerateDownloadUrl": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GenerateUploadUrl": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetFunction": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListFunctions": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateFunction": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_descriptor_config.php b/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_descriptor_config.php new file mode 100644 index 000000000000..d908323e3be1 --- /dev/null +++ b/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_descriptor_config.php @@ -0,0 +1,48 @@ + [ + 'google.cloud.functions.v1.CloudFunctionsService' => [ + 'CreateFunction' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Functions\V1\CloudFunction', + 'metadataReturnType' => '\Google\Cloud\Functions\V1\OperationMetadataV1', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteFunction' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Functions\V1\OperationMetadataV1', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateFunction' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Functions\V1\CloudFunction', + 'metadataReturnType' => '\Google\Cloud\Functions\V1\OperationMetadataV1', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListFunctions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFunctions', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_rest_client_config.php b/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_rest_client_config.php new file mode 100644 index 000000000000..4ccbce38fd50 --- /dev/null +++ b/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_rest_client_config.php @@ -0,0 +1,168 @@ + [ + 'google.cloud.functions.v1.CloudFunctionsService' => [ + 'CallFunction' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/functions/*}:call', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateFunction' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{location=projects/*/locations/*}/functions', + 'body' => 'function', + 'placeholders' => [ + 'location' => [ + 'getters' => [ + 'getLocation', + ], + ], + ], + ], + 'DeleteFunction' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/functions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateDownloadUrl' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/functions/*}:generateDownloadUrl', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateUploadUrl' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/functions:generateUploadUrl', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetFunction' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/functions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/functions/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'ListFunctions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/functions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/functions/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/functions/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateFunction' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{function.name=projects/*/locations/*/functions/*}', + 'body' => 'function', + 'placeholders' => [ + 'function.name' => [ + 'getters' => [ + 'getFunction', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/operations', + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Functions/v1/tests/Unit/V1/CloudFunctionsServiceClientTest.php b/owl-bot-staging/Functions/v1/tests/Unit/V1/CloudFunctionsServiceClientTest.php new file mode 100644 index 000000000000..49b419f2fcfc --- /dev/null +++ b/owl-bot-staging/Functions/v1/tests/Unit/V1/CloudFunctionsServiceClientTest.php @@ -0,0 +1,1021 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CloudFunctionsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CloudFunctionsServiceClient($options); + } + + /** @test */ + public function callFunctionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $executionId = 'executionId-1217171550'; + $result = 'result-934426595'; + $error = 'error96784904'; + $expectedResponse = new CallFunctionResponse(); + $expectedResponse->setExecutionId($executionId); + $expectedResponse->setResult($result); + $expectedResponse->setError($error); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + $data = 'data3076010'; + $response = $gapicClient->callFunction($formattedName, $data); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/CallFunction', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getData(); + $this->assertProtobufEquals($data, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function callFunctionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + $data = 'data3076010'; + try { + $gapicClient->callFunction($formattedName, $data); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createFunctionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFunctionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $sourceArchiveUrl = 'sourceArchiveUrl-289007026'; + $entryPoint = 'entryPoint-799136893'; + $runtime = 'runtime1550962648'; + $availableMemoryMb = 1964533661; + $serviceAccountEmail = 'serviceAccountEmail-1300473088'; + $versionId = 670497310; + $network = 'network1843485230'; + $maxInstances = 330682013; + $minInstances = 1491624145; + $vpcConnector = 'vpcConnector1732864119'; + $kmsKeyName = 'kmsKeyName2094986649'; + $buildWorkerPool = 'buildWorkerPool1575447532'; + $buildId = 'buildId-1430655860'; + $buildName = 'buildName-470597188'; + $sourceToken = 'sourceToken1671283925'; + $dockerRepository = 'dockerRepository-1273385271'; + $expectedResponse = new CloudFunction(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceArchiveUrl($sourceArchiveUrl); + $expectedResponse->setEntryPoint($entryPoint); + $expectedResponse->setRuntime($runtime); + $expectedResponse->setAvailableMemoryMb($availableMemoryMb); + $expectedResponse->setServiceAccountEmail($serviceAccountEmail); + $expectedResponse->setVersionId($versionId); + $expectedResponse->setNetwork($network); + $expectedResponse->setMaxInstances($maxInstances); + $expectedResponse->setMinInstances($minInstances); + $expectedResponse->setVpcConnector($vpcConnector); + $expectedResponse->setKmsKeyName($kmsKeyName); + $expectedResponse->setBuildWorkerPool($buildWorkerPool); + $expectedResponse->setBuildId($buildId); + $expectedResponse->setBuildName($buildName); + $expectedResponse->setSourceToken($sourceToken); + $expectedResponse->setDockerRepository($dockerRepository); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createFunctionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $function = new CloudFunction(); + $response = $gapicClient->createFunction($formattedLocation, $function); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/CreateFunction', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getLocation(); + $this->assertProtobufEquals($formattedLocation, $actualValue); + $actualValue = $actualApiRequestObject->getFunction(); + $this->assertProtobufEquals($function, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFunctionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createFunctionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFunctionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $function = new CloudFunction(); + $response = $gapicClient->createFunction($formattedLocation, $function); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFunctionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFunctionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFunctionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteFunctionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + $response = $gapicClient->deleteFunction($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/DeleteFunction', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFunctionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFunctionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFunctionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + $response = $gapicClient->deleteFunction($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFunctionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateDownloadUrlTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $downloadUrl = 'downloadUrl1109408056'; + $expectedResponse = new GenerateDownloadUrlResponse(); + $expectedResponse->setDownloadUrl($downloadUrl); + $transport->addResponse($expectedResponse); + $response = $gapicClient->generateDownloadUrl(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/GenerateDownloadUrl', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateDownloadUrlExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->generateDownloadUrl(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateUploadUrlTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $uploadUrl = 'uploadUrl-242738639'; + $expectedResponse = new GenerateUploadUrlResponse(); + $expectedResponse->setUploadUrl($uploadUrl); + $transport->addResponse($expectedResponse); + $response = $gapicClient->generateUploadUrl(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/GenerateUploadUrl', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateUploadUrlExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->generateUploadUrl(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFunctionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $sourceArchiveUrl = 'sourceArchiveUrl-289007026'; + $entryPoint = 'entryPoint-799136893'; + $runtime = 'runtime1550962648'; + $availableMemoryMb = 1964533661; + $serviceAccountEmail = 'serviceAccountEmail-1300473088'; + $versionId = 670497310; + $network = 'network1843485230'; + $maxInstances = 330682013; + $minInstances = 1491624145; + $vpcConnector = 'vpcConnector1732864119'; + $kmsKeyName = 'kmsKeyName2094986649'; + $buildWorkerPool = 'buildWorkerPool1575447532'; + $buildId = 'buildId-1430655860'; + $buildName = 'buildName-470597188'; + $sourceToken = 'sourceToken1671283925'; + $dockerRepository = 'dockerRepository-1273385271'; + $expectedResponse = new CloudFunction(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceArchiveUrl($sourceArchiveUrl); + $expectedResponse->setEntryPoint($entryPoint); + $expectedResponse->setRuntime($runtime); + $expectedResponse->setAvailableMemoryMb($availableMemoryMb); + $expectedResponse->setServiceAccountEmail($serviceAccountEmail); + $expectedResponse->setVersionId($versionId); + $expectedResponse->setNetwork($network); + $expectedResponse->setMaxInstances($maxInstances); + $expectedResponse->setMinInstances($minInstances); + $expectedResponse->setVpcConnector($vpcConnector); + $expectedResponse->setKmsKeyName($kmsKeyName); + $expectedResponse->setBuildWorkerPool($buildWorkerPool); + $expectedResponse->setBuildId($buildId); + $expectedResponse->setBuildName($buildName); + $expectedResponse->setSourceToken($sourceToken); + $expectedResponse->setDockerRepository($dockerRepository); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + $response = $gapicClient->getFunction($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/GetFunction', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFunctionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + try { + $gapicClient->getFunction($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 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'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/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'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFunctionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $functionsElement = new CloudFunction(); + $functions = [ + $functionsElement, + ]; + $expectedResponse = new ListFunctionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFunctions($functions); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listFunctions(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFunctions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/ListFunctions', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFunctionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->listFunctions(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/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(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/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 = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateFunctionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFunctionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $sourceArchiveUrl = 'sourceArchiveUrl-289007026'; + $entryPoint = 'entryPoint-799136893'; + $runtime = 'runtime1550962648'; + $availableMemoryMb = 1964533661; + $serviceAccountEmail = 'serviceAccountEmail-1300473088'; + $versionId = 670497310; + $network = 'network1843485230'; + $maxInstances = 330682013; + $minInstances = 1491624145; + $vpcConnector = 'vpcConnector1732864119'; + $kmsKeyName = 'kmsKeyName2094986649'; + $buildWorkerPool = 'buildWorkerPool1575447532'; + $buildId = 'buildId-1430655860'; + $buildName = 'buildName-470597188'; + $sourceToken = 'sourceToken1671283925'; + $dockerRepository = 'dockerRepository-1273385271'; + $expectedResponse = new CloudFunction(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceArchiveUrl($sourceArchiveUrl); + $expectedResponse->setEntryPoint($entryPoint); + $expectedResponse->setRuntime($runtime); + $expectedResponse->setAvailableMemoryMb($availableMemoryMb); + $expectedResponse->setServiceAccountEmail($serviceAccountEmail); + $expectedResponse->setVersionId($versionId); + $expectedResponse->setNetwork($network); + $expectedResponse->setMaxInstances($maxInstances); + $expectedResponse->setMinInstances($minInstances); + $expectedResponse->setVpcConnector($vpcConnector); + $expectedResponse->setKmsKeyName($kmsKeyName); + $expectedResponse->setBuildWorkerPool($buildWorkerPool); + $expectedResponse->setBuildId($buildId); + $expectedResponse->setBuildName($buildName); + $expectedResponse->setSourceToken($sourceToken); + $expectedResponse->setDockerRepository($dockerRepository); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateFunctionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $function = new CloudFunction(); + $response = $gapicClient->updateFunction($function); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/UpdateFunction', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getFunction(); + $this->assertProtobufEquals($function, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFunctionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateFunctionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFunctionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $function = new CloudFunction(); + $response = $gapicClient->updateFunction($function); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFunctionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Functions/v2/proto/src/GPBMetadata/Google/Cloud/Functions/V2/Functions.php b/owl-bot-staging/Functions/v2/proto/src/GPBMetadata/Google/Cloud/Functions/V2/Functions.php new file mode 100644 index 0000000000000000000000000000000000000000..6d4a316f9ddca3f0a417ca237f166b0b0b52d925 GIT binary patch literal 10714 zcmcIq&2!t<5f3Fx7MC(jKU*;^+YJr7wyfA>LMLt_e}WXGu%<|cq~toI4hoSFg%|=@ z0Fq zGnHyHqs*6@7m(DodrnKA%XDnJW9qq^`6!84BK*ZTlw8TvWzQ$rEThNS8M5+ z#adxW_q4X=X{(Ej!D^8*SY7ZLtghs50kllbbu+G!OrG$#7M} zGCV^wjUV7i?qt?A)76oB?^<8J3?-;qEq&%{hV!IrFLiA^`JId}QjIDD6|q{fJl(N0 zb9G*KTaMB7Y^R1x=jJ-P7pRcFnYk*qrRuo!nA|m1Wy`Xu7Et4JbGv8SWpNN;(KK|+I~>h|p_}c3zM*XywsSbrx-Q&h zXd%nC)p2^3WmuinYL`0c;SL$tPPVp(mo=bbXI;|V$FD%!G|N5=>{fpIwBVw34UAT5ejb<8Z-qXr zQyZ&m!pLHQV490gSsK82%4ycN_~fUL;1d^M6E!bZ_|gR{ zJYT(hf%K)W%cNtO*i4+M zE*#Uh@GPq57@dypq{kS8)hiJk6iU$K>&YD$qd7@Wk0W6+e>H;6S8BFF2@0cM$)n^w zNc6gxwsn=7A$^qXKJ7E{ZIlf{fK%OraZ_8GYZA>oNY3X zilaiP7+J2?(cN^MF^W7l6MKmhFgd2LLn6#I0i%!gZQ(1&U~Ee>dpbAt+{gzp>3cB7 zc#tVL(P+v|MP05mYD%%RP*UboZxDcSx!5eND5)5IUXV*=d_O{tL401Rm8*|RmBrL3 z`sBpCQdXMuuOlP@N0%!PD%FRT)Y#k)zm}iDWu}GQSmo}C!RBVM{N{XxklU!ZRtR0o}%7OsUtabyO{C?4ew* zQ1y+F2{=-!EL2mYQW1_dun?m+G#C^iNf=-2wI1u9uqgg*uTh1G*hL$4INqW0Oe1$x z`fUuLu6J$0VhR##j%KwsRF*~Pn)pX=5CRjP*5U7H#L{=C5S`eYn}(;l8yX8kz7m9O zRHH5AI0117x8USFjiBeX4Tr^G963!I7V6wn9lfJJWkEGj0GM#}EyG1wrC-EgTu4}; zk-$!^@{-CnN#r9_NLWoM`fW%sfdm68QX>D&2s`g;=%Y6Z6EMyRrO#rJ;$qbt82a?rMK1Blav(URKV(01(tq&1QOvKd=ti42Is~ptX{#i_Cme@Z?Pz3pM)lY z2xR2ckr9xvw8xEz1p*VRv#oY*Eau$1$-BOG(mb_ah)^rn9eDsJxI$HQ9ic`{l+-A1 zzm$4c^E}nwg~Suvd8|7qm2GmrEL?pdUxrHuAMhcgpa7PrFcm79>Xzmh+M0<8cbp~M z`w;?#v>Yy^D?SUJ%9r3o+r}t$(A&GVYoKp#GnbDS@?XiZ7xFcj)f~@Q*IFLNgW;lv z2Mt2~kyB3Jf-|9_J+Rly68zsLFo*Qj*BfwDRA}KJ5_6ApFpah!6hn}b({P-+h26tk zpd&D7yDa03ku;>VEzQ8%XVTKONsoGr<`1GBq~;?`&4max_X!-K=xHFE+EZ+eT#p7O zA`bLk<`83qelx7WZ<8q67(s}!)ooFLVqxyIMV7)qc_Ci{2|sDA78cb(WgtM|>&d5Z zzK?;bcQA}y)Q#sMoOhYEllkJ%XI$yF0`3aq)ex*m9a6}$pFItoWd4Jp*_SwjfM*Iu zdyat!0}aK4>O4#duTb&uRFA5@iFRd(GEOeTH#E~kNT#i?8!gqgR1>j^OY=ET;OP|d znjlMX4*dhWJazvNJ23>NVf5(n=;`Dhg_DfmmTmU1%BD{a%VC8PAg~FFOqvAeeZ8RS z!E}VduEW)pT2U=lD;1^KtkzX!v92^4YC~yKfYca(0jJ?)tzKH8*sCsA7L|rtt&|@j zC^!xYxm;G8b$MZ-R7{OXPvQ8WAv16eSw^u(q=sCo4^{jZnc{Bz&r+qS)GKnC?>0it z!s&qza%Em!ES3uhL~4kk!e;5qItV&KfPfbc1SZ^WqGn)a!SYWlJu4b<>8}))F_ywk z$YqncU03rq1gsc_^CC?!sPbWRL|}jEm1=+vf^|e&hl@2gr!S~bWoz8 z-4;tGF;am^)G~t&IK|?%FPXm)VVAHXvvo>avneS(ZH%C1TN@fCUz34`IMXcFQG_%H zX|~AMOKXq_u_NaoU00g*M{2EFE)@q6`FS|g_jSIi;yh4g?=W`W1k(4JzaPQqNHF<@ za^Hlw=Ak*)df0<KOsdemj2XJ zL$U<8wr4rIhF*oZ1vNi96Q_;RR1sf#y3fGZ(1!yWy2@045ia-*=^m(17ELRegP;{< zx*1M#?i`4|*Tt}ywpz?Tq@SXc%WOU|C}nsn>UM|ODi;hr=v+!jx_9Ui%nYSvn3~s3 zeXp)w&qzenL8;>$q6d{e zfoXrsdHabqaF*B8(hWGfFK=-m?6%ut%iSa4sOKb&t~zha&LS&#PX8kYN5%8NB$S@oaJ#0q&BqXQY#7JRlMVwrJTWEn zw_kBz90PT9nzEi~4jtILJZB7!Uui=;^!Qc!5lo7saQ3wPELWPPB}K(q+~VLY4)NeT zPLj&i+LBUfVm-nEl3cERB=eb3L21f3iW`TKMHz>1NdTPC)s-Rw%lXt84tSFDO0l}M zRBALz)e62Fm;O8gCxV*?|F()?EIHTNb!nxHdmoMNaxQlsPA zILSgvti$zu@*u_yr+f!M$jWZMvUqz!-a)uZE$k0nGybZ5rnk&i(%(nfwxgpq{|yGeA@oQ4sQ&3PA9f5q zU8Z&C2owDjq$)DHX#b!X=f`rrSz5qpG2*4gQUgI2chSOfsZ2-4IOA+6^_5alK`+HW zn)TA+qEbg!MULW&TCbMN1-bYD9Twk;CA)9OrOHbN))*udvSIwxso%3Ms#H;H^(yO< zP!60`V;IzMT8)Ct-bd^fx)H%HNU5xp>eUL3v4JyUye%pf^<920`j}6RGqHR`R|{P*U&?1W(KR2u1rLbgp35JDbnxw*??~kB zgVzMI1{wQTsF!|B7^#>3r9{7vR>{@Jp_I$l^or+n&b;--y)&i{*M{u9Hp z*N0OhHPgRzNX`6&YbH1QN|E?no`)%6?4Twon_X}Fa6a%n1}A(_7(izd)pPGz?VtBO zKSK7Ye)|xK;Qls?n|bLT^N*q9rXzlz6UaOlni82L+ILE2cBBPKK2(aupUm)|9EDiYLw$}TuQ0YH*$A=13;kofEJF)0iO^oie}~DR zCD(>Ai6antkZz|xelDM9F5rjjV4M4eoZaxet~-~@J$dp(oF=$a(t6$o|IyTSMCIPP z?Q9nQdlb&&o#MdhFPrS_$RvMK0nX870CVB z$mn8m;cMAG%*6|lgL?Xs+vwn$$I$WSI{0gQ=WF@V%WvIo4!aGzxx)?E|B<&bbUf+ql9-15W2;z{-Q+J8R>})U$6~34Zx? cjsG|>^jkvOpBSxuen-ew^56UIzz)Fw09RVLLI3~& literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/BuildConfig.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/BuildConfig.php new file mode 100644 index 000000000000..54c9603ba859 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/BuildConfig.php @@ -0,0 +1,442 @@ +google.cloud.functions.v2.BuildConfig + */ +class BuildConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The Cloud Build name of the latest successful deployment of the + * function. + * + * Generated from protobuf field string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $build = ''; + /** + * The runtime in which to run the function. Required when deploying a new + * function, optional when updating an existing function. For a complete + * list of possible choices, see the + * [`gcloud` command + * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). + * + * Generated from protobuf field string runtime = 2; + */ + protected $runtime = ''; + /** + * The name of the function (as defined in source code) that will be + * executed. Defaults to the resource name suffix, if not specified. For + * backward compatibility, if function with given name is not found, then the + * system will try to use function named "function". + * For Node.js this is name of a function exported by the module specified + * in `source_location`. + * + * Generated from protobuf field string entry_point = 3; + */ + protected $entry_point = ''; + /** + * The location of the function source code. + * + * Generated from protobuf field .google.cloud.functions.v2.Source source = 4; + */ + protected $source = null; + /** + * Output only. A permanent fixed identifier for source. + * + * Generated from protobuf field .google.cloud.functions.v2.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_provenance = null; + /** + * Name of the Cloud Build Custom Worker Pool that should be used to build the + * function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * {project} and {region} are the project id and region respectively where the + * worker pool is defined and {workerPool} is the short name of the worker + * pool. + * If the project id is not the same as the function, then the Cloud + * Functions Service Agent + * (service-@gcf-admin-robot.iam.gserviceaccount.com) must be + * granted the role Cloud Build Custom Workers Builder + * (roles/cloudbuild.customworkers.builder) in the project. + * + * Generated from protobuf field string worker_pool = 5 [(.google.api.resource_reference) = { + */ + protected $worker_pool = ''; + /** + * User-provided build-time environment variables for the function + * + * Generated from protobuf field map environment_variables = 6; + */ + private $environment_variables; + /** + * Optional. User managed repository created in Artifact Registry optionally with a + * customer managed encryption key. This is the repository to which the + * function docker image will be pushed after it is built by Cloud Build. + * If unspecified, GCF will create and use a repository named 'gcf-artifacts' + * for every deployed region. + * It must match the pattern + * `projects/{project}/locations/{location}/repositories/{repository}`. + * Cross-project repositories are not supported. + * Cross-location repositories are not supported. + * Repository format must be 'DOCKER'. + * + * Generated from protobuf field string docker_repository = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $docker_repository = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $build + * Output only. The Cloud Build name of the latest successful deployment of the + * function. + * @type string $runtime + * The runtime in which to run the function. Required when deploying a new + * function, optional when updating an existing function. For a complete + * list of possible choices, see the + * [`gcloud` command + * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). + * @type string $entry_point + * The name of the function (as defined in source code) that will be + * executed. Defaults to the resource name suffix, if not specified. For + * backward compatibility, if function with given name is not found, then the + * system will try to use function named "function". + * For Node.js this is name of a function exported by the module specified + * in `source_location`. + * @type \Google\Cloud\Functions\V2\Source $source + * The location of the function source code. + * @type \Google\Cloud\Functions\V2\SourceProvenance $source_provenance + * Output only. A permanent fixed identifier for source. + * @type string $worker_pool + * Name of the Cloud Build Custom Worker Pool that should be used to build the + * function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * {project} and {region} are the project id and region respectively where the + * worker pool is defined and {workerPool} is the short name of the worker + * pool. + * If the project id is not the same as the function, then the Cloud + * Functions Service Agent + * (service-@gcf-admin-robot.iam.gserviceaccount.com) must be + * granted the role Cloud Build Custom Workers Builder + * (roles/cloudbuild.customworkers.builder) in the project. + * @type array|\Google\Protobuf\Internal\MapField $environment_variables + * User-provided build-time environment variables for the function + * @type string $docker_repository + * Optional. User managed repository created in Artifact Registry optionally with a + * customer managed encryption key. This is the repository to which the + * function docker image will be pushed after it is built by Cloud Build. + * If unspecified, GCF will create and use a repository named 'gcf-artifacts' + * for every deployed region. + * It must match the pattern + * `projects/{project}/locations/{location}/repositories/{repository}`. + * Cross-project repositories are not supported. + * Cross-location repositories are not supported. + * Repository format must be 'DOCKER'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The Cloud Build name of the latest successful deployment of the + * function. + * + * Generated from protobuf field string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getBuild() + { + return $this->build; + } + + /** + * Output only. The Cloud Build name of the latest successful deployment of the + * function. + * + * Generated from protobuf field string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBuild($var) + { + GPBUtil::checkString($var, True); + $this->build = $var; + + return $this; + } + + /** + * The runtime in which to run the function. Required when deploying a new + * function, optional when updating an existing function. For a complete + * list of possible choices, see the + * [`gcloud` command + * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). + * + * Generated from protobuf field string runtime = 2; + * @return string + */ + public function getRuntime() + { + return $this->runtime; + } + + /** + * The runtime in which to run the function. Required when deploying a new + * function, optional when updating an existing function. For a complete + * list of possible choices, see the + * [`gcloud` command + * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). + * + * Generated from protobuf field string runtime = 2; + * @param string $var + * @return $this + */ + public function setRuntime($var) + { + GPBUtil::checkString($var, True); + $this->runtime = $var; + + return $this; + } + + /** + * The name of the function (as defined in source code) that will be + * executed. Defaults to the resource name suffix, if not specified. For + * backward compatibility, if function with given name is not found, then the + * system will try to use function named "function". + * For Node.js this is name of a function exported by the module specified + * in `source_location`. + * + * Generated from protobuf field string entry_point = 3; + * @return string + */ + public function getEntryPoint() + { + return $this->entry_point; + } + + /** + * The name of the function (as defined in source code) that will be + * executed. Defaults to the resource name suffix, if not specified. For + * backward compatibility, if function with given name is not found, then the + * system will try to use function named "function". + * For Node.js this is name of a function exported by the module specified + * in `source_location`. + * + * Generated from protobuf field string entry_point = 3; + * @param string $var + * @return $this + */ + public function setEntryPoint($var) + { + GPBUtil::checkString($var, True); + $this->entry_point = $var; + + return $this; + } + + /** + * The location of the function source code. + * + * Generated from protobuf field .google.cloud.functions.v2.Source source = 4; + * @return \Google\Cloud\Functions\V2\Source|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * The location of the function source code. + * + * Generated from protobuf field .google.cloud.functions.v2.Source source = 4; + * @param \Google\Cloud\Functions\V2\Source $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\Source::class); + $this->source = $var; + + return $this; + } + + /** + * Output only. A permanent fixed identifier for source. + * + * Generated from protobuf field .google.cloud.functions.v2.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Functions\V2\SourceProvenance|null + */ + public function getSourceProvenance() + { + return $this->source_provenance; + } + + public function hasSourceProvenance() + { + return isset($this->source_provenance); + } + + public function clearSourceProvenance() + { + unset($this->source_provenance); + } + + /** + * Output only. A permanent fixed identifier for source. + * + * Generated from protobuf field .google.cloud.functions.v2.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Functions\V2\SourceProvenance $var + * @return $this + */ + public function setSourceProvenance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\SourceProvenance::class); + $this->source_provenance = $var; + + return $this; + } + + /** + * Name of the Cloud Build Custom Worker Pool that should be used to build the + * function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * {project} and {region} are the project id and region respectively where the + * worker pool is defined and {workerPool} is the short name of the worker + * pool. + * If the project id is not the same as the function, then the Cloud + * Functions Service Agent + * (service-@gcf-admin-robot.iam.gserviceaccount.com) must be + * granted the role Cloud Build Custom Workers Builder + * (roles/cloudbuild.customworkers.builder) in the project. + * + * Generated from protobuf field string worker_pool = 5 [(.google.api.resource_reference) = { + * @return string + */ + public function getWorkerPool() + { + return $this->worker_pool; + } + + /** + * Name of the Cloud Build Custom Worker Pool that should be used to build the + * function. The format of this field is + * `projects/{project}/locations/{region}/workerPools/{workerPool}` where + * {project} and {region} are the project id and region respectively where the + * worker pool is defined and {workerPool} is the short name of the worker + * pool. + * If the project id is not the same as the function, then the Cloud + * Functions Service Agent + * (service-@gcf-admin-robot.iam.gserviceaccount.com) must be + * granted the role Cloud Build Custom Workers Builder + * (roles/cloudbuild.customworkers.builder) in the project. + * + * Generated from protobuf field string worker_pool = 5 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setWorkerPool($var) + { + GPBUtil::checkString($var, True); + $this->worker_pool = $var; + + return $this; + } + + /** + * User-provided build-time environment variables for the function + * + * Generated from protobuf field map environment_variables = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getEnvironmentVariables() + { + return $this->environment_variables; + } + + /** + * User-provided build-time environment variables for the function + * + * Generated from protobuf field map environment_variables = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setEnvironmentVariables($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->environment_variables = $arr; + + return $this; + } + + /** + * Optional. User managed repository created in Artifact Registry optionally with a + * customer managed encryption key. This is the repository to which the + * function docker image will be pushed after it is built by Cloud Build. + * If unspecified, GCF will create and use a repository named 'gcf-artifacts' + * for every deployed region. + * It must match the pattern + * `projects/{project}/locations/{location}/repositories/{repository}`. + * Cross-project repositories are not supported. + * Cross-location repositories are not supported. + * Repository format must be 'DOCKER'. + * + * Generated from protobuf field string docker_repository = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getDockerRepository() + { + return $this->docker_repository; + } + + /** + * Optional. User managed repository created in Artifact Registry optionally with a + * customer managed encryption key. This is the repository to which the + * function docker image will be pushed after it is built by Cloud Build. + * If unspecified, GCF will create and use a repository named 'gcf-artifacts' + * for every deployed region. + * It must match the pattern + * `projects/{project}/locations/{location}/repositories/{repository}`. + * Cross-project repositories are not supported. + * Cross-location repositories are not supported. + * Repository format must be 'DOCKER'. + * + * Generated from protobuf field string docker_repository = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDockerRepository($var) + { + GPBUtil::checkString($var, True); + $this->docker_repository = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/CreateFunctionRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/CreateFunctionRequest.php new file mode 100644 index 000000000000..5b43acc2c855 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/CreateFunctionRequest.php @@ -0,0 +1,161 @@ +google.cloud.functions.v2.CreateFunctionRequest + */ +class CreateFunctionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location in which the function should be created, specified + * in the format `projects/*/locations/*` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Function to be created. + * + * Generated from protobuf field .google.cloud.functions.v2.Function function = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $function = null; + /** + * The ID to use for the function, which will become the final component of + * the function's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * + * Generated from protobuf field string function_id = 3; + */ + protected $function_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location in which the function should be created, specified + * in the format `projects/*/locations/*` + * @type \Google\Cloud\Functions\V2\PBFunction $function + * Required. Function to be created. + * @type string $function_id + * The ID to use for the function, which will become the final component of + * the function's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location in which the function should be created, 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 in which the function should be created, 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; + } + + /** + * Required. Function to be created. + * + * Generated from protobuf field .google.cloud.functions.v2.Function function = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Functions\V2\PBFunction|null + */ + public function getFunction() + { + return $this->function; + } + + public function hasFunction() + { + return isset($this->function); + } + + public function clearFunction() + { + unset($this->function); + } + + /** + * Required. Function to be created. + * + * Generated from protobuf field .google.cloud.functions.v2.Function function = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Functions\V2\PBFunction $var + * @return $this + */ + public function setFunction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\PBFunction::class); + $this->function = $var; + + return $this; + } + + /** + * The ID to use for the function, which will become the final component of + * the function's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * + * Generated from protobuf field string function_id = 3; + * @return string + */ + public function getFunctionId() + { + return $this->function_id; + } + + /** + * The ID to use for the function, which will become the final component of + * the function's resource name. + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-9]-/. + * + * Generated from protobuf field string function_id = 3; + * @param string $var + * @return $this + */ + public function setFunctionId($var) + { + GPBUtil::checkString($var, True); + $this->function_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/DeleteFunctionRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/DeleteFunctionRequest.php new file mode 100644 index 000000000000..dded725ad3ae --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/DeleteFunctionRequest.php @@ -0,0 +1,67 @@ +google.cloud.functions.v2.DeleteFunctionRequest + */ +class DeleteFunctionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the function which should be deleted. + * + * 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 name of the function which should be deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the function which should 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 function which should 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/Functions/v2/proto/src/Google/Cloud/Functions/V2/Environment.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Environment.php new file mode 100644 index 000000000000..a1fd8153a794 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Environment.php @@ -0,0 +1,61 @@ +google.cloud.functions.v2.Environment + */ +class Environment +{ + /** + * Unspecified + * + * Generated from protobuf enum ENVIRONMENT_UNSPECIFIED = 0; + */ + const ENVIRONMENT_UNSPECIFIED = 0; + /** + * Gen 1 + * + * Generated from protobuf enum GEN_1 = 1; + */ + const GEN_1 = 1; + /** + * Gen 2 + * + * Generated from protobuf enum GEN_2 = 2; + */ + const GEN_2 = 2; + + private static $valueToName = [ + self::ENVIRONMENT_UNSPECIFIED => 'ENVIRONMENT_UNSPECIFIED', + self::GEN_1 => 'GEN_1', + self::GEN_2 => 'GEN_2', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventFilter.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventFilter.php new file mode 100644 index 000000000000..15ec540f1dd6 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventFilter.php @@ -0,0 +1,147 @@ +google.cloud.functions.v2.EventFilter + */ +class EventFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of a CloudEvents attribute. + * + * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $attribute = ''; + /** + * Required. The value for the attribute. + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value = ''; + /** + * Optional. The operator used for matching the events with the value of the + * filter. If not specified, only events that have an exact key-value pair + * specified in the filter are matched. The only allowed value is + * `match-path-pattern`. + * + * Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $operator = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $attribute + * Required. The name of a CloudEvents attribute. + * @type string $value + * Required. The value for the attribute. + * @type string $operator + * Optional. The operator used for matching the events with the value of the + * filter. If not specified, only events that have an exact key-value pair + * specified in the filter are matched. The only allowed value is + * `match-path-pattern`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of a CloudEvents attribute. + * + * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAttribute() + { + return $this->attribute; + } + + /** + * Required. The name of a CloudEvents attribute. + * + * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAttribute($var) + { + GPBUtil::checkString($var, True); + $this->attribute = $var; + + return $this; + } + + /** + * Required. The value for the attribute. + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Required. The value for the attribute. + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * Optional. The operator used for matching the events with the value of the + * filter. If not specified, only events that have an exact key-value pair + * specified in the filter are matched. The only allowed value is + * `match-path-pattern`. + * + * Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOperator() + { + return $this->operator; + } + + /** + * Optional. The operator used for matching the events with the value of the + * filter. If not specified, only events that have an exact key-value pair + * specified in the filter are matched. The only allowed value is + * `match-path-pattern`. + * + * Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOperator($var) + { + GPBUtil::checkString($var, True); + $this->operator = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger.php new file mode 100644 index 000000000000..dba1a3fd15bf --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger.php @@ -0,0 +1,374 @@ +google.cloud.functions.v2.EventTrigger + */ +class EventTrigger extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the Eventarc trigger. The format of this field is + * `projects/{project}/locations/{region}/triggers/{trigger}`. + * + * Generated from protobuf field string trigger = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $trigger = ''; + /** + * The region that the trigger will be in. The trigger will only receive + * events originating in this region. It can be the same + * region as the function, a different region or multi-region, or the global + * region. If not provided, defaults to the same region as the function. + * + * Generated from protobuf field string trigger_region = 2; + */ + protected $trigger_region = ''; + /** + * Required. The type of event to observe. For example: + * `google.cloud.audit.log.v1.written` or + * `google.cloud.pubsub.topic.v1.messagePublished`. + * + * Generated from protobuf field string event_type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event_type = ''; + /** + * Criteria used to filter events. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.EventFilter event_filters = 4; + */ + private $event_filters; + /** + * Optional. The name of a Pub/Sub topic in the same project that will be used + * as the transport topic for the event delivery. Format: + * `projects/{project}/topics/{topic}`. + * This is only valid for events of type + * `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here + * will not be deleted at function deletion. + * + * Generated from protobuf field string pubsub_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $pubsub_topic = ''; + /** + * Optional. The email of the trigger's service account. The service account must have + * permission to invoke Cloud Run services, the permission is + * `run.routes.invoke`. + * If empty, defaults to the Compute Engine default service account: + * `{project_number}-compute@developer.gserviceaccount.com`. + * + * Generated from protobuf field string service_account_email = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_account_email = ''; + /** + * Optional. If unset, then defaults to ignoring failures (i.e. not retrying them). + * + * Generated from protobuf field .google.cloud.functions.v2.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $retry_policy = 0; + /** + * Optional. The name of the channel associated with the trigger in + * `projects/{project}/locations/{location}/channels/{channel}` format. + * You must provide a channel to receive events from Eventarc SaaS partners. + * + * Generated from protobuf field string channel = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $channel = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $trigger + * Output only. The resource name of the Eventarc trigger. The format of this field is + * `projects/{project}/locations/{region}/triggers/{trigger}`. + * @type string $trigger_region + * The region that the trigger will be in. The trigger will only receive + * events originating in this region. It can be the same + * region as the function, a different region or multi-region, or the global + * region. If not provided, defaults to the same region as the function. + * @type string $event_type + * Required. The type of event to observe. For example: + * `google.cloud.audit.log.v1.written` or + * `google.cloud.pubsub.topic.v1.messagePublished`. + * @type array<\Google\Cloud\Functions\V2\EventFilter>|\Google\Protobuf\Internal\RepeatedField $event_filters + * Criteria used to filter events. + * @type string $pubsub_topic + * Optional. The name of a Pub/Sub topic in the same project that will be used + * as the transport topic for the event delivery. Format: + * `projects/{project}/topics/{topic}`. + * This is only valid for events of type + * `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here + * will not be deleted at function deletion. + * @type string $service_account_email + * Optional. The email of the trigger's service account. The service account must have + * permission to invoke Cloud Run services, the permission is + * `run.routes.invoke`. + * If empty, defaults to the Compute Engine default service account: + * `{project_number}-compute@developer.gserviceaccount.com`. + * @type int $retry_policy + * Optional. If unset, then defaults to ignoring failures (i.e. not retrying them). + * @type string $channel + * Optional. The name of the channel associated with the trigger in + * `projects/{project}/locations/{location}/channels/{channel}` format. + * You must provide a channel to receive events from Eventarc SaaS partners. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the Eventarc trigger. The format of this field is + * `projects/{project}/locations/{region}/triggers/{trigger}`. + * + * Generated from protobuf field string trigger = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getTrigger() + { + return $this->trigger; + } + + /** + * Output only. The resource name of the Eventarc trigger. The format of this field is + * `projects/{project}/locations/{region}/triggers/{trigger}`. + * + * Generated from protobuf field string trigger = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTrigger($var) + { + GPBUtil::checkString($var, True); + $this->trigger = $var; + + return $this; + } + + /** + * The region that the trigger will be in. The trigger will only receive + * events originating in this region. It can be the same + * region as the function, a different region or multi-region, or the global + * region. If not provided, defaults to the same region as the function. + * + * Generated from protobuf field string trigger_region = 2; + * @return string + */ + public function getTriggerRegion() + { + return $this->trigger_region; + } + + /** + * The region that the trigger will be in. The trigger will only receive + * events originating in this region. It can be the same + * region as the function, a different region or multi-region, or the global + * region. If not provided, defaults to the same region as the function. + * + * Generated from protobuf field string trigger_region = 2; + * @param string $var + * @return $this + */ + public function setTriggerRegion($var) + { + GPBUtil::checkString($var, True); + $this->trigger_region = $var; + + return $this; + } + + /** + * Required. The type of event to observe. For example: + * `google.cloud.audit.log.v1.written` or + * `google.cloud.pubsub.topic.v1.messagePublished`. + * + * Generated from protobuf field string event_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEventType() + { + return $this->event_type; + } + + /** + * Required. The type of event to observe. For example: + * `google.cloud.audit.log.v1.written` or + * `google.cloud.pubsub.topic.v1.messagePublished`. + * + * Generated from protobuf field string event_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEventType($var) + { + GPBUtil::checkString($var, True); + $this->event_type = $var; + + return $this; + } + + /** + * Criteria used to filter events. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.EventFilter event_filters = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEventFilters() + { + return $this->event_filters; + } + + /** + * Criteria used to filter events. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.EventFilter event_filters = 4; + * @param array<\Google\Cloud\Functions\V2\EventFilter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEventFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\EventFilter::class); + $this->event_filters = $arr; + + return $this; + } + + /** + * Optional. The name of a Pub/Sub topic in the same project that will be used + * as the transport topic for the event delivery. Format: + * `projects/{project}/topics/{topic}`. + * This is only valid for events of type + * `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here + * will not be deleted at function deletion. + * + * Generated from protobuf field string pubsub_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getPubsubTopic() + { + return $this->pubsub_topic; + } + + /** + * Optional. The name of a Pub/Sub topic in the same project that will be used + * as the transport topic for the event delivery. Format: + * `projects/{project}/topics/{topic}`. + * This is only valid for events of type + * `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here + * will not be deleted at function deletion. + * + * Generated from protobuf field string pubsub_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPubsubTopic($var) + { + GPBUtil::checkString($var, True); + $this->pubsub_topic = $var; + + return $this; + } + + /** + * Optional. The email of the trigger's service account. The service account must have + * permission to invoke Cloud Run services, the permission is + * `run.routes.invoke`. + * If empty, defaults to the Compute Engine default service account: + * `{project_number}-compute@developer.gserviceaccount.com`. + * + * Generated from protobuf field string service_account_email = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServiceAccountEmail() + { + return $this->service_account_email; + } + + /** + * Optional. The email of the trigger's service account. The service account must have + * permission to invoke Cloud Run services, the permission is + * `run.routes.invoke`. + * If empty, defaults to the Compute Engine default service account: + * `{project_number}-compute@developer.gserviceaccount.com`. + * + * Generated from protobuf field string service_account_email = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->service_account_email = $var; + + return $this; + } + + /** + * Optional. If unset, then defaults to ignoring failures (i.e. not retrying them). + * + * Generated from protobuf field .google.cloud.functions.v2.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getRetryPolicy() + { + return $this->retry_policy; + } + + /** + * Optional. If unset, then defaults to ignoring failures (i.e. not retrying them). + * + * Generated from protobuf field .google.cloud.functions.v2.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setRetryPolicy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\EventTrigger\RetryPolicy::class); + $this->retry_policy = $var; + + return $this; + } + + /** + * Optional. The name of the channel associated with the trigger in + * `projects/{project}/locations/{location}/channels/{channel}` format. + * You must provide a channel to receive events from Eventarc SaaS partners. + * + * Generated from protobuf field string channel = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Optional. The name of the channel associated with the trigger in + * `projects/{project}/locations/{location}/channels/{channel}` format. + * You must provide a channel to receive events from Eventarc SaaS partners. + * + * Generated from protobuf field string channel = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger/RetryPolicy.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger/RetryPolicy.php new file mode 100644 index 000000000000..fe9035ebeee4 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger/RetryPolicy.php @@ -0,0 +1,66 @@ +google.cloud.functions.v2.EventTrigger.RetryPolicy + */ +class RetryPolicy +{ + /** + * Not specified. + * + * Generated from protobuf enum RETRY_POLICY_UNSPECIFIED = 0; + */ + const RETRY_POLICY_UNSPECIFIED = 0; + /** + * Do not retry. + * + * Generated from protobuf enum RETRY_POLICY_DO_NOT_RETRY = 1; + */ + const RETRY_POLICY_DO_NOT_RETRY = 1; + /** + * Retry on any failure, retry up to 7 days with an exponential backoff + * (capped at 10 seconds). + * + * Generated from protobuf enum RETRY_POLICY_RETRY = 2; + */ + const RETRY_POLICY_RETRY = 2; + + private static $valueToName = [ + self::RETRY_POLICY_UNSPECIFIED => 'RETRY_POLICY_UNSPECIFIED', + self::RETRY_POLICY_DO_NOT_RETRY => 'RETRY_POLICY_DO_NOT_RETRY', + self::RETRY_POLICY_RETRY => 'RETRY_POLICY_RETRY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RetryPolicy::class, \Google\Cloud\Functions\V2\EventTrigger_RetryPolicy::class); + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger_RetryPolicy.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger_RetryPolicy.php new file mode 100644 index 000000000000..9151d76491e1 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger_RetryPolicy.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.functions.v2.FunctionService/GetFunction', + $argument, + ['\Google\Cloud\Functions\V2\PBFunction', 'decode'], + $metadata, $options); + } + + /** + * Returns a list of functions that belong to the requested project. + * @param \Google\Cloud\Functions\V2\ListFunctionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListFunctions(\Google\Cloud\Functions\V2\ListFunctionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v2.FunctionService/ListFunctions', + $argument, + ['\Google\Cloud\Functions\V2\ListFunctionsResponse', 'decode'], + $metadata, $options); + } + + /** + * Creates a new function. If a function with the given name already exists in + * the specified project, the long running operation will return + * `ALREADY_EXISTS` error. + * @param \Google\Cloud\Functions\V2\CreateFunctionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateFunction(\Google\Cloud\Functions\V2\CreateFunctionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v2.FunctionService/CreateFunction', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates existing function. + * @param \Google\Cloud\Functions\V2\UpdateFunctionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateFunction(\Google\Cloud\Functions\V2\UpdateFunctionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v2.FunctionService/UpdateFunction', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a function with the given name from the specified project. If the + * given function is used by some trigger, the trigger will be updated to + * remove this function. + * @param \Google\Cloud\Functions\V2\DeleteFunctionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteFunction(\Google\Cloud\Functions\V2\DeleteFunctionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v2.FunctionService/DeleteFunction', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Returns a signed URL for uploading a function source code. + * For more information about the signed URL usage see: + * https://cloud.google.com/storage/docs/access-control/signed-urls. + * Once the function source code upload is complete, the used signed + * URL should be provided in CreateFunction or UpdateFunction request + * as a reference to the function source code. + * + * When uploading source code to the generated signed URL, please follow + * these restrictions: + * + * * Source file type should be a zip file. + * * No credentials should be attached - the signed URLs provide access to the + * target bucket using internal service identity; if credentials were + * attached, the identity from the credentials would be used, but that + * identity does not have permissions to upload files to the URL. + * + * When making a HTTP PUT request, these two headers need to be specified: + * + * * `content-type: application/zip` + * + * And this header SHOULD NOT be specified: + * + * * `Authorization: Bearer YOUR_TOKEN` + * @param \Google\Cloud\Functions\V2\GenerateUploadUrlRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GenerateUploadUrl(\Google\Cloud\Functions\V2\GenerateUploadUrlRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v2.FunctionService/GenerateUploadUrl', + $argument, + ['\Google\Cloud\Functions\V2\GenerateUploadUrlResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns a signed URL for downloading deployed function source code. + * The URL is only valid for a limited period and should be used within + * 30 minutes of generation. + * For more information about the signed URL usage see: + * https://cloud.google.com/storage/docs/access-control/signed-urls + * @param \Google\Cloud\Functions\V2\GenerateDownloadUrlRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GenerateDownloadUrl(\Google\Cloud\Functions\V2\GenerateDownloadUrlRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v2.FunctionService/GenerateDownloadUrl', + $argument, + ['\Google\Cloud\Functions\V2\GenerateDownloadUrlResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns a list of runtimes that are supported for the requested project. + * @param \Google\Cloud\Functions\V2\ListRuntimesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListRuntimes(\Google\Cloud\Functions\V2\ListRuntimesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.functions.v2.FunctionService/ListRuntimes', + $argument, + ['\Google\Cloud\Functions\V2\ListRuntimesResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Function_State.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Function_State.php new file mode 100644 index 000000000000..1534eb8d1b1d --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Function_State.php @@ -0,0 +1,16 @@ +google.cloud.functions.v2.GenerateDownloadUrlRequest + */ +class GenerateDownloadUrlRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of function for which source code Google Cloud Storage signed + * URL should be generated. + * + * 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 name of function for which source code Google Cloud Storage signed + * URL should be generated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of function for which source code Google Cloud Storage signed + * URL should be generated. + * + * Generated 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 function for which source code Google Cloud Storage signed + * URL should be generated. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlResponse.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlResponse.php new file mode 100644 index 000000000000..c49cbe0ed3f5 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlResponse.php @@ -0,0 +1,71 @@ +google.cloud.functions.v2.GenerateDownloadUrlResponse + */ +class GenerateDownloadUrlResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The generated Google Cloud Storage signed URL that should be used for + * function source code download. + * + * Generated from protobuf field string download_url = 1; + */ + protected $download_url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $download_url + * The generated Google Cloud Storage signed URL that should be used for + * function source code download. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * The generated Google Cloud Storage signed URL that should be used for + * function source code download. + * + * Generated from protobuf field string download_url = 1; + * @return string + */ + public function getDownloadUrl() + { + return $this->download_url; + } + + /** + * The generated Google Cloud Storage signed URL that should be used for + * function source code download. + * + * Generated from protobuf field string download_url = 1; + * @param string $var + * @return $this + */ + public function setDownloadUrl($var) + { + GPBUtil::checkString($var, True); + $this->download_url = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlRequest.php new file mode 100644 index 000000000000..c21ddc7808a2 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlRequest.php @@ -0,0 +1,71 @@ +google.cloud.functions.v2.GenerateUploadUrlRequest + */ +class GenerateUploadUrlRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location in which the Google Cloud Storage signed URL + * should be generated, specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location in which the Google Cloud Storage signed URL + * should be generated, specified in the format `projects/*/locations/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location in which the Google Cloud Storage signed URL + * should be generated, 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 in which the Google Cloud Storage signed URL + * should be generated, 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; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlResponse.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlResponse.php new file mode 100644 index 000000000000..ec4ee0a82cfa --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlResponse.php @@ -0,0 +1,139 @@ +google.cloud.functions.v2.GenerateUploadUrlResponse + */ +class GenerateUploadUrlResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The generated Google Cloud Storage signed URL that should be used for a + * function source code upload. The uploaded file should be a zip archive + * which contains a function. + * + * Generated from protobuf field string upload_url = 1; + */ + protected $upload_url = ''; + /** + * The location of the source code in the upload bucket. + * Once the archive is uploaded using the `upload_url` use this field to + * set the `function.build_config.source.storage_source` + * during CreateFunction and UpdateFunction. + * Generation defaults to 0, as Cloud Storage provides a new generation only + * upon uploading a new object or version of an object. + * + * Generated from protobuf field .google.cloud.functions.v2.StorageSource storage_source = 2; + */ + protected $storage_source = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $upload_url + * The generated Google Cloud Storage signed URL that should be used for a + * function source code upload. The uploaded file should be a zip archive + * which contains a function. + * @type \Google\Cloud\Functions\V2\StorageSource $storage_source + * The location of the source code in the upload bucket. + * Once the archive is uploaded using the `upload_url` use this field to + * set the `function.build_config.source.storage_source` + * during CreateFunction and UpdateFunction. + * Generation defaults to 0, as Cloud Storage provides a new generation only + * upon uploading a new object or version of an object. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * The generated Google Cloud Storage signed URL that should be used for a + * function source code upload. The uploaded file should be a zip archive + * which contains a function. + * + * Generated from protobuf field string upload_url = 1; + * @return string + */ + public function getUploadUrl() + { + return $this->upload_url; + } + + /** + * The generated Google Cloud Storage signed URL that should be used for a + * function source code upload. The uploaded file should be a zip archive + * which contains a function. + * + * Generated from protobuf field string upload_url = 1; + * @param string $var + * @return $this + */ + public function setUploadUrl($var) + { + GPBUtil::checkString($var, True); + $this->upload_url = $var; + + return $this; + } + + /** + * The location of the source code in the upload bucket. + * Once the archive is uploaded using the `upload_url` use this field to + * set the `function.build_config.source.storage_source` + * during CreateFunction and UpdateFunction. + * Generation defaults to 0, as Cloud Storage provides a new generation only + * upon uploading a new object or version of an object. + * + * Generated from protobuf field .google.cloud.functions.v2.StorageSource storage_source = 2; + * @return \Google\Cloud\Functions\V2\StorageSource|null + */ + public function getStorageSource() + { + return $this->storage_source; + } + + public function hasStorageSource() + { + return isset($this->storage_source); + } + + public function clearStorageSource() + { + unset($this->storage_source); + } + + /** + * The location of the source code in the upload bucket. + * Once the archive is uploaded using the `upload_url` use this field to + * set the `function.build_config.source.storage_source` + * during CreateFunction and UpdateFunction. + * Generation defaults to 0, as Cloud Storage provides a new generation only + * upon uploading a new object or version of an object. + * + * Generated from protobuf field .google.cloud.functions.v2.StorageSource storage_source = 2; + * @param \Google\Cloud\Functions\V2\StorageSource $var + * @return $this + */ + public function setStorageSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\StorageSource::class); + $this->storage_source = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GetFunctionRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GetFunctionRequest.php new file mode 100644 index 000000000000..06f63b7331af --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GetFunctionRequest.php @@ -0,0 +1,67 @@ +google.cloud.functions.v2.GetFunctionRequest + */ +class GetFunctionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the function which details should be obtained. + * + * 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 name of the function which details should be obtained. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the function which details should be obtained. + * + * Generated 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 function which details should be obtained. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsRequest.php new file mode 100644 index 000000000000..dcc1a6056520 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsRequest.php @@ -0,0 +1,247 @@ +google.cloud.functions.v2.ListFunctionsRequest + */ +class ListFunctionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the function should be listed, + * specified in the format `projects/*/locations/*` + * If you want to list functions in all locations, use "-" in place of a + * location. When listing functions in all locations, if one or more + * location(s) are unreachable, the response will contain functions from all + * reachable locations along with the names of any unreachable locations. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of functions to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last + * `ListFunctionsResponse`; indicates that + * this is a continuation of a prior `ListFunctions` call, and that the + * system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter for Functions that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * The sorting order of the resources returned. Value should be a comma + * separated list of fields. The default sorting oder is ascending. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the function should be listed, + * specified in the format `projects/*/locations/*` + * If you want to list functions in all locations, use "-" in place of a + * location. When listing functions in all locations, if one or more + * location(s) are unreachable, the response will contain functions from all + * reachable locations along with the names of any unreachable locations. + * @type int $page_size + * Maximum number of functions to return per call. + * @type string $page_token + * The value returned by the last + * `ListFunctionsResponse`; indicates that + * this is a continuation of a prior `ListFunctions` call, and that the + * system should return the next page of data. + * @type string $filter + * The filter for Functions that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + * @type string $order_by + * The sorting order of the resources returned. Value should be a comma + * separated list of fields. The default sorting oder is ascending. + * See https://google.aip.dev/132#ordering. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the function should be listed, + * specified in the format `projects/*/locations/*` + * If you want to list functions in all locations, use "-" in place of a + * location. When listing functions in all locations, if one or more + * location(s) are unreachable, the response will contain functions from all + * reachable locations along with the names of any unreachable 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 function should be listed, + * specified in the format `projects/*/locations/*` + * If you want to list functions in all locations, use "-" in place of a + * location. When listing functions in all locations, if one or more + * location(s) are unreachable, the response will contain functions from all + * reachable locations along with the names of any unreachable 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 functions to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of functions 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 + * `ListFunctionsResponse`; indicates that + * this is a continuation of a prior `ListFunctions` 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 + * `ListFunctionsResponse`; indicates that + * this is a continuation of a prior `ListFunctions` 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; + } + + /** + * The filter for Functions that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter for Functions that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + * + * 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; + } + + /** + * The sorting order of the resources returned. Value should be a comma + * separated list of fields. The default sorting oder is ascending. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * The sorting order of the resources returned. Value should be a comma + * separated list of fields. The default sorting oder is ascending. + * See https://google.aip.dev/132#ordering. + * + * 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/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsResponse.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsResponse.php new file mode 100644 index 000000000000..edfa21aa7abe --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsResponse.php @@ -0,0 +1,143 @@ +google.cloud.functions.v2.ListFunctionsResponse + */ +class ListFunctionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The functions that match the request. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.Function functions = 1; + */ + private $functions; + /** + * A token, which 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. The response does not include any + * functions from these locations. + * + * 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\Functions\V2\PBFunction>|\Google\Protobuf\Internal\RepeatedField $functions + * The functions that match the request. + * @type string $next_page_token + * A token, which 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. The response does not include any + * functions from these locations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * The functions that match the request. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.Function functions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFunctions() + { + return $this->functions; + } + + /** + * The functions that match the request. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.Function functions = 1; + * @param array<\Google\Cloud\Functions\V2\PBFunction>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFunctions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\PBFunction::class); + $this->functions = $arr; + + return $this; + } + + /** + * A token, which 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, which 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. The response does not include any + * functions from these locations. + * + * 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. The response does not include any + * functions from these locations. + * + * 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/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesRequest.php new file mode 100644 index 000000000000..314ecc916c6c --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesRequest.php @@ -0,0 +1,109 @@ +google.cloud.functions.v2.ListRuntimesRequest + */ +class ListRuntimesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the runtimes 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 = ''; + /** + * The filter for Runtimes that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the runtimes should be listed, + * specified in the format `projects/*/locations/*` + * @type string $filter + * The filter for Runtimes that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the runtimes 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 runtimes 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; + } + + /** + * The filter for Runtimes that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter for Runtimes that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse.php new file mode 100644 index 000000000000..b833f9d472e1 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse.php @@ -0,0 +1,67 @@ +google.cloud.functions.v2.ListRuntimesResponse + */ +class ListRuntimesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The runtimes that match the request. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.ListRuntimesResponse.Runtime runtimes = 1; + */ + private $runtimes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Functions\V2\ListRuntimesResponse\Runtime>|\Google\Protobuf\Internal\RepeatedField $runtimes + * The runtimes that match the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * The runtimes that match the request. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.ListRuntimesResponse.Runtime runtimes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRuntimes() + { + return $this->runtimes; + } + + /** + * The runtimes that match the request. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.ListRuntimesResponse.Runtime runtimes = 1; + * @param array<\Google\Cloud\Functions\V2\ListRuntimesResponse\Runtime>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRuntimes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\ListRuntimesResponse\Runtime::class); + $this->runtimes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/Runtime.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/Runtime.php new file mode 100644 index 000000000000..3a6de70b406f --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/Runtime.php @@ -0,0 +1,207 @@ +google.cloud.functions.v2.ListRuntimesResponse.Runtime + */ +class Runtime extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the runtime, e.g., 'go113', 'nodejs12', etc. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The user facing name, eg 'Go 1.13', 'Node.js 12', etc. + * + * Generated from protobuf field string display_name = 5; + */ + protected $display_name = ''; + /** + * The stage of life this runtime is in, e.g., BETA, GA, etc. + * + * Generated from protobuf field .google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage stage = 2; + */ + protected $stage = 0; + /** + * Warning messages, e.g., a deprecation warning. + * + * Generated from protobuf field repeated string warnings = 3; + */ + private $warnings; + /** + * The environment for the runtime. + * + * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 4; + */ + protected $environment = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the runtime, e.g., 'go113', 'nodejs12', etc. + * @type string $display_name + * The user facing name, eg 'Go 1.13', 'Node.js 12', etc. + * @type int $stage + * The stage of life this runtime is in, e.g., BETA, GA, etc. + * @type array|\Google\Protobuf\Internal\RepeatedField $warnings + * Warning messages, e.g., a deprecation warning. + * @type int $environment + * The environment for the runtime. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * The name of the runtime, e.g., 'go113', 'nodejs12', etc. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the runtime, e.g., 'go113', 'nodejs12', etc. + * + * 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 user facing name, eg 'Go 1.13', 'Node.js 12', etc. + * + * Generated from protobuf field string display_name = 5; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The user facing name, eg 'Go 1.13', 'Node.js 12', etc. + * + * 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 stage of life this runtime is in, e.g., BETA, GA, etc. + * + * Generated from protobuf field .google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage stage = 2; + * @return int + */ + public function getStage() + { + return $this->stage; + } + + /** + * The stage of life this runtime is in, e.g., BETA, GA, etc. + * + * Generated from protobuf field .google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage stage = 2; + * @param int $var + * @return $this + */ + public function setStage($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\ListRuntimesResponse\RuntimeStage::class); + $this->stage = $var; + + return $this; + } + + /** + * Warning messages, e.g., a deprecation warning. + * + * Generated from protobuf field repeated string warnings = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWarnings() + { + return $this->warnings; + } + + /** + * Warning messages, e.g., a deprecation warning. + * + * Generated from protobuf field repeated string warnings = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWarnings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->warnings = $arr; + + return $this; + } + + /** + * The environment for the runtime. + * + * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 4; + * @return int + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * The environment for the runtime. + * + * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 4; + * @param int $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\Environment::class); + $this->environment = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Runtime::class, \Google\Cloud\Functions\V2\ListRuntimesResponse_Runtime::class); + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/RuntimeStage.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/RuntimeStage.php new file mode 100644 index 000000000000..60d76ac6285e --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/RuntimeStage.php @@ -0,0 +1,92 @@ +google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage + */ +class RuntimeStage +{ + /** + * Not specified. + * + * Generated from protobuf enum RUNTIME_STAGE_UNSPECIFIED = 0; + */ + const RUNTIME_STAGE_UNSPECIFIED = 0; + /** + * The runtime is in development. + * + * Generated from protobuf enum DEVELOPMENT = 1; + */ + const DEVELOPMENT = 1; + /** + * The runtime is in the Alpha stage. + * + * Generated from protobuf enum ALPHA = 2; + */ + const ALPHA = 2; + /** + * The runtime is in the Beta stage. + * + * Generated from protobuf enum BETA = 3; + */ + const BETA = 3; + /** + * The runtime is generally available. + * + * Generated from protobuf enum GA = 4; + */ + const GA = 4; + /** + * The runtime is deprecated. + * + * Generated from protobuf enum DEPRECATED = 5; + */ + const DEPRECATED = 5; + /** + * The runtime is no longer supported. + * + * Generated from protobuf enum DECOMMISSIONED = 6; + */ + const DECOMMISSIONED = 6; + + private static $valueToName = [ + self::RUNTIME_STAGE_UNSPECIFIED => 'RUNTIME_STAGE_UNSPECIFIED', + self::DEVELOPMENT => 'DEVELOPMENT', + self::ALPHA => 'ALPHA', + self::BETA => 'BETA', + self::GA => 'GA', + self::DEPRECATED => 'DEPRECATED', + self::DECOMMISSIONED => 'DECOMMISSIONED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RuntimeStage::class, \Google\Cloud\Functions\V2\ListRuntimesResponse_RuntimeStage::class); + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse_Runtime.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse_Runtime.php new file mode 100644 index 000000000000..3cbf643acd9d --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse_Runtime.php @@ -0,0 +1,16 @@ +google.cloud.functions.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_detail = 5; + */ + protected $status_detail = ''; + /** + * 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; + */ + protected $cancel_requested = false; + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 7; + */ + protected $api_version = ''; + /** + * The original request that started the operation. + * + * Generated from protobuf field .google.protobuf.Any request_resource = 8; + */ + protected $request_resource = null; + /** + * Mechanism for reporting in-progress stages + * + * Generated from protobuf field repeated .google.cloud.functions.v2.Stage stages = 9; + */ + private $stages; + + /** + * 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_detail + * Human-readable status of the operation, if any. + * @type bool $cancel_requested + * 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 \Google\Protobuf\Any $request_resource + * The original request that started the operation. + * @type array<\Google\Cloud\Functions\V2\Stage>|\Google\Protobuf\Internal\RepeatedField $stages + * Mechanism for reporting in-progress stages + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::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_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; + } + + /** + * 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; + * @return bool + */ + public function getCancelRequested() + { + return $this->cancel_requested; + } + + /** + * 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; + * @param bool $var + * @return $this + */ + public function setCancelRequested($var) + { + GPBUtil::checkBool($var); + $this->cancel_requested = $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; + } + + /** + * The original request that started the operation. + * + * Generated from protobuf field .google.protobuf.Any request_resource = 8; + * @return \Google\Protobuf\Any|null + */ + public function getRequestResource() + { + return $this->request_resource; + } + + public function hasRequestResource() + { + return isset($this->request_resource); + } + + public function clearRequestResource() + { + unset($this->request_resource); + } + + /** + * The original request that started the operation. + * + * Generated from protobuf field .google.protobuf.Any request_resource = 8; + * @param \Google\Protobuf\Any $var + * @return $this + */ + public function setRequestResource($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + $this->request_resource = $var; + + return $this; + } + + /** + * Mechanism for reporting in-progress stages + * + * Generated from protobuf field repeated .google.cloud.functions.v2.Stage stages = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStages() + { + return $this->stages; + } + + /** + * Mechanism for reporting in-progress stages + * + * Generated from protobuf field repeated .google.cloud.functions.v2.Stage stages = 9; + * @param array<\Google\Cloud\Functions\V2\Stage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\Stage::class); + $this->stages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction.php new file mode 100644 index 000000000000..2a7245aa57aa --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction.php @@ -0,0 +1,430 @@ +google.cloud.functions.v2.Function + */ +class PBFunction extends \Google\Protobuf\Internal\Message +{ + /** + * A user-defined name of the function. Function names must be unique + * globally and match pattern `projects/*/locations/*/functions/*` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Describe whether the function is gen1 or gen2. + * + * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 10; + */ + protected $environment = 0; + /** + * User-provided description of a function. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Describes the Build step of the function that builds a container from the + * given source. + * + * Generated from protobuf field .google.cloud.functions.v2.BuildConfig build_config = 3; + */ + protected $build_config = null; + /** + * Describes the Service being deployed. Currently deploys services to Cloud + * Run (fully managed). + * + * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig service_config = 4; + */ + protected $service_config = null; + /** + * An Eventarc trigger managed by Google Cloud Functions that fires events in + * response to a condition in another service. + * + * Generated from protobuf field .google.cloud.functions.v2.EventTrigger event_trigger = 5; + */ + protected $event_trigger = null; + /** + * Output only. State of the function. + * + * Generated from protobuf field .google.cloud.functions.v2.Function.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The last update timestamp of a Cloud Function. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels associated with this Cloud Function. + * + * Generated from protobuf field map labels = 8; + */ + private $labels; + /** + * Output only. State Messages for this Cloud Function. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $state_messages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * A user-defined name of the function. Function names must be unique + * globally and match pattern `projects/*/locations/*/functions/*` + * @type int $environment + * Describe whether the function is gen1 or gen2. + * @type string $description + * User-provided description of a function. + * @type \Google\Cloud\Functions\V2\BuildConfig $build_config + * Describes the Build step of the function that builds a container from the + * given source. + * @type \Google\Cloud\Functions\V2\ServiceConfig $service_config + * Describes the Service being deployed. Currently deploys services to Cloud + * Run (fully managed). + * @type \Google\Cloud\Functions\V2\EventTrigger $event_trigger + * An Eventarc trigger managed by Google Cloud Functions that fires events in + * response to a condition in another service. + * @type int $state + * Output only. State of the function. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update timestamp of a Cloud Function. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels associated with this Cloud Function. + * @type array<\Google\Cloud\Functions\V2\StateMessage>|\Google\Protobuf\Internal\RepeatedField $state_messages + * Output only. State Messages for this Cloud Function. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * A user-defined name of the function. Function names must be unique + * globally and match pattern `projects/*/locations/*/functions/*` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * A user-defined name of the function. Function names must be unique + * globally and match pattern `projects/*/locations/*/functions/*` + * + * 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; + } + + /** + * Describe whether the function is gen1 or gen2. + * + * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 10; + * @return int + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * Describe whether the function is gen1 or gen2. + * + * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 10; + * @param int $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\Environment::class); + $this->environment = $var; + + return $this; + } + + /** + * User-provided description of a function. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description of a function. + * + * 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; + } + + /** + * Describes the Build step of the function that builds a container from the + * given source. + * + * Generated from protobuf field .google.cloud.functions.v2.BuildConfig build_config = 3; + * @return \Google\Cloud\Functions\V2\BuildConfig|null + */ + public function getBuildConfig() + { + return $this->build_config; + } + + public function hasBuildConfig() + { + return isset($this->build_config); + } + + public function clearBuildConfig() + { + unset($this->build_config); + } + + /** + * Describes the Build step of the function that builds a container from the + * given source. + * + * Generated from protobuf field .google.cloud.functions.v2.BuildConfig build_config = 3; + * @param \Google\Cloud\Functions\V2\BuildConfig $var + * @return $this + */ + public function setBuildConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\BuildConfig::class); + $this->build_config = $var; + + return $this; + } + + /** + * Describes the Service being deployed. Currently deploys services to Cloud + * Run (fully managed). + * + * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig service_config = 4; + * @return \Google\Cloud\Functions\V2\ServiceConfig|null + */ + public function getServiceConfig() + { + return $this->service_config; + } + + public function hasServiceConfig() + { + return isset($this->service_config); + } + + public function clearServiceConfig() + { + unset($this->service_config); + } + + /** + * Describes the Service being deployed. Currently deploys services to Cloud + * Run (fully managed). + * + * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig service_config = 4; + * @param \Google\Cloud\Functions\V2\ServiceConfig $var + * @return $this + */ + public function setServiceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\ServiceConfig::class); + $this->service_config = $var; + + return $this; + } + + /** + * An Eventarc trigger managed by Google Cloud Functions that fires events in + * response to a condition in another service. + * + * Generated from protobuf field .google.cloud.functions.v2.EventTrigger event_trigger = 5; + * @return \Google\Cloud\Functions\V2\EventTrigger|null + */ + public function getEventTrigger() + { + return $this->event_trigger; + } + + public function hasEventTrigger() + { + return isset($this->event_trigger); + } + + public function clearEventTrigger() + { + unset($this->event_trigger); + } + + /** + * An Eventarc trigger managed by Google Cloud Functions that fires events in + * response to a condition in another service. + * + * Generated from protobuf field .google.cloud.functions.v2.EventTrigger event_trigger = 5; + * @param \Google\Cloud\Functions\V2\EventTrigger $var + * @return $this + */ + public function setEventTrigger($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\EventTrigger::class); + $this->event_trigger = $var; + + return $this; + } + + /** + * Output only. State of the function. + * + * Generated from protobuf field .google.cloud.functions.v2.Function.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the function. + * + * Generated from protobuf field .google.cloud.functions.v2.Function.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\PBFunction\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The last update timestamp of a Cloud Function. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.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 timestamp of a Cloud Function. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.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 associated with this Cloud Function. + * + * Generated from protobuf field map labels = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels associated with this Cloud Function. + * + * 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. State Messages for this Cloud Function. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStateMessages() + { + return $this->state_messages; + } + + /** + * Output only. State Messages for this Cloud Function. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Functions\V2\StateMessage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStateMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\StateMessage::class); + $this->state_messages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction/State.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction/State.php new file mode 100644 index 000000000000..f6e8c8a0e5cd --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction/State.php @@ -0,0 +1,86 @@ +google.cloud.functions.v2.Function.State + */ +class State +{ + /** + * Not specified. Invalid state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Function has been successfully deployed and is serving. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Function deployment failed and the function is not serving. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * Function is being created or updated. + * + * Generated from protobuf enum DEPLOYING = 3; + */ + const DEPLOYING = 3; + /** + * Function is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * Function deployment failed and the function serving state is undefined. + * The function should be updated or deleted to move it out of this state. + * + * Generated from protobuf enum UNKNOWN = 5; + */ + const UNKNOWN = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::FAILED => 'FAILED', + self::DEPLOYING => 'DEPLOYING', + self::DELETING => 'DELETING', + self::UNKNOWN => 'UNKNOWN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Functions\V2\Function_State::class); + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/RepoSource.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/RepoSource.php new file mode 100644 index 000000000000..5326f62530e6 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/RepoSource.php @@ -0,0 +1,309 @@ +google.cloud.functions.v2.RepoSource + */ +class RepoSource extends \Google\Protobuf\Internal\Message +{ + /** + * ID of the project that owns the Cloud Source Repository. If omitted, the + * project ID requesting the build is assumed. + * + * Generated from protobuf field string project_id = 1; + */ + protected $project_id = ''; + /** + * Name of the Cloud Source Repository. + * + * Generated from protobuf field string repo_name = 2; + */ + protected $repo_name = ''; + /** + * Directory, relative to the source root, in which to run the build. + * This must be a relative path. If a step's `dir` is specified and is an + * absolute path, this value is ignored for that step's execution. + * eg. helloworld (no leading slash allowed) + * + * Generated from protobuf field string dir = 6; + */ + protected $dir = ''; + /** + * Only trigger a build if the revision regex does NOT match the revision + * regex. + * + * Generated from protobuf field bool invert_regex = 7; + */ + protected $invert_regex = false; + protected $revision; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $branch_name + * Regex matching branches to build. + * The syntax of the regular expressions accepted is the syntax accepted by + * RE2 and described at https://github.com/google/re2/wiki/Syntax + * @type string $tag_name + * Regex matching tags to build. + * The syntax of the regular expressions accepted is the syntax accepted by + * RE2 and described at https://github.com/google/re2/wiki/Syntax + * @type string $commit_sha + * Explicit commit SHA to build. + * @type string $project_id + * ID of the project that owns the Cloud Source Repository. If omitted, the + * project ID requesting the build is assumed. + * @type string $repo_name + * Name of the Cloud Source Repository. + * @type string $dir + * Directory, relative to the source root, in which to run the build. + * This must be a relative path. If a step's `dir` is specified and is an + * absolute path, this value is ignored for that step's execution. + * eg. helloworld (no leading slash allowed) + * @type bool $invert_regex + * Only trigger a build if the revision regex does NOT match the revision + * regex. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Regex matching branches to build. + * The syntax of the regular expressions accepted is the syntax accepted by + * RE2 and described at https://github.com/google/re2/wiki/Syntax + * + * Generated from protobuf field string branch_name = 3; + * @return string + */ + public function getBranchName() + { + return $this->readOneof(3); + } + + public function hasBranchName() + { + return $this->hasOneof(3); + } + + /** + * Regex matching branches to build. + * The syntax of the regular expressions accepted is the syntax accepted by + * RE2 and described at https://github.com/google/re2/wiki/Syntax + * + * Generated from protobuf field string branch_name = 3; + * @param string $var + * @return $this + */ + public function setBranchName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Regex matching tags to build. + * The syntax of the regular expressions accepted is the syntax accepted by + * RE2 and described at https://github.com/google/re2/wiki/Syntax + * + * Generated from protobuf field string tag_name = 4; + * @return string + */ + public function getTagName() + { + return $this->readOneof(4); + } + + public function hasTagName() + { + return $this->hasOneof(4); + } + + /** + * Regex matching tags to build. + * The syntax of the regular expressions accepted is the syntax accepted by + * RE2 and described at https://github.com/google/re2/wiki/Syntax + * + * Generated from protobuf field string tag_name = 4; + * @param string $var + * @return $this + */ + public function setTagName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Explicit commit SHA to build. + * + * Generated from protobuf field string commit_sha = 5; + * @return string + */ + public function getCommitSha() + { + return $this->readOneof(5); + } + + public function hasCommitSha() + { + return $this->hasOneof(5); + } + + /** + * Explicit commit SHA to build. + * + * Generated from protobuf field string commit_sha = 5; + * @param string $var + * @return $this + */ + public function setCommitSha($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * ID of the project that owns the Cloud Source Repository. If omitted, the + * project ID requesting the build is assumed. + * + * Generated from protobuf field string project_id = 1; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * ID of the project that owns the Cloud Source Repository. If omitted, the + * project ID requesting the build is assumed. + * + * Generated from protobuf field string project_id = 1; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Name of the Cloud Source Repository. + * + * Generated from protobuf field string repo_name = 2; + * @return string + */ + public function getRepoName() + { + return $this->repo_name; + } + + /** + * Name of the Cloud Source Repository. + * + * Generated from protobuf field string repo_name = 2; + * @param string $var + * @return $this + */ + public function setRepoName($var) + { + GPBUtil::checkString($var, True); + $this->repo_name = $var; + + return $this; + } + + /** + * Directory, relative to the source root, in which to run the build. + * This must be a relative path. If a step's `dir` is specified and is an + * absolute path, this value is ignored for that step's execution. + * eg. helloworld (no leading slash allowed) + * + * Generated from protobuf field string dir = 6; + * @return string + */ + public function getDir() + { + return $this->dir; + } + + /** + * Directory, relative to the source root, in which to run the build. + * This must be a relative path. If a step's `dir` is specified and is an + * absolute path, this value is ignored for that step's execution. + * eg. helloworld (no leading slash allowed) + * + * Generated from protobuf field string dir = 6; + * @param string $var + * @return $this + */ + public function setDir($var) + { + GPBUtil::checkString($var, True); + $this->dir = $var; + + return $this; + } + + /** + * Only trigger a build if the revision regex does NOT match the revision + * regex. + * + * Generated from protobuf field bool invert_regex = 7; + * @return bool + */ + public function getInvertRegex() + { + return $this->invert_regex; + } + + /** + * Only trigger a build if the revision regex does NOT match the revision + * regex. + * + * Generated from protobuf field bool invert_regex = 7; + * @param bool $var + * @return $this + */ + public function setInvertRegex($var) + { + GPBUtil::checkBool($var); + $this->invert_regex = $var; + + return $this; + } + + /** + * @return string + */ + public function getRevision() + { + return $this->whichOneof("revision"); + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretEnvVar.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretEnvVar.php new file mode 100644 index 000000000000..d14b7f6d187b --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretEnvVar.php @@ -0,0 +1,191 @@ +google.cloud.functions.v2.SecretEnvVar + */ +class SecretEnvVar extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the environment variable. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * Project identifier (preferably project number but can also be the + * project ID) of the project that contains the secret. If not set, it is + * assumed that the secret is in the same project as the function. + * + * Generated from protobuf field string project_id = 2; + */ + protected $project_id = ''; + /** + * Name of the secret in secret manager (not the full resource name). + * + * Generated from protobuf field string secret = 3; + */ + protected $secret = ''; + /** + * Version of the secret (version number or the string 'latest'). It is + * recommended to use a numeric version for secret environment variables as + * any updates to the secret value is not reflected until new instances + * start. + * + * Generated from protobuf field string version = 4; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * Name of the environment variable. + * @type string $project_id + * Project identifier (preferably project number but can also be the + * project ID) of the project that contains the secret. If not set, it is + * assumed that the secret is in the same project as the function. + * @type string $secret + * Name of the secret in secret manager (not the full resource name). + * @type string $version + * Version of the secret (version number or the string 'latest'). It is + * recommended to use a numeric version for secret environment variables as + * any updates to the secret value is not reflected until new instances + * start. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Name of the environment variable. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Name of the environment variable. + * + * 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; + } + + /** + * Project identifier (preferably project number but can also be the + * project ID) of the project that contains the secret. If not set, it is + * assumed that the secret is in the same project as the function. + * + * Generated from protobuf field string project_id = 2; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Project identifier (preferably project number but can also be the + * project ID) of the project that contains the secret. If not set, it is + * assumed that the secret is in the same project as the function. + * + * 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; + } + + /** + * Name of the secret in secret manager (not the full resource name). + * + * Generated from protobuf field string secret = 3; + * @return string + */ + public function getSecret() + { + return $this->secret; + } + + /** + * Name of the secret in secret manager (not the full resource name). + * + * Generated from protobuf field string secret = 3; + * @param string $var + * @return $this + */ + public function setSecret($var) + { + GPBUtil::checkString($var, True); + $this->secret = $var; + + return $this; + } + + /** + * Version of the secret (version number or the string 'latest'). It is + * recommended to use a numeric version for secret environment variables as + * any updates to the secret value is not reflected until new instances + * start. + * + * Generated from protobuf field string version = 4; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version of the secret (version number or the string 'latest'). It is + * recommended to use a numeric version for secret environment variables as + * any updates to the secret value is not reflected until new instances + * start. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume.php new file mode 100644 index 000000000000..505db9251bf8 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume.php @@ -0,0 +1,203 @@ +google.cloud.functions.v2.SecretVolume + */ +class SecretVolume extends \Google\Protobuf\Internal\Message +{ + /** + * The path within the container to mount the secret volume. For example, + * setting the mount_path as `/etc/secrets` would mount the secret value files + * under the `/etc/secrets` directory. This directory will also be completely + * shadowed and unavailable to mount any other secrets. + * Recommended mount path: /etc/secrets + * + * Generated from protobuf field string mount_path = 1; + */ + protected $mount_path = ''; + /** + * Project identifier (preferably project number but can also be the project + * ID) of the project that contains the secret. If not set, it is + * assumed that the secret is in the same project as the function. + * + * Generated from protobuf field string project_id = 2; + */ + protected $project_id = ''; + /** + * Name of the secret in secret manager (not the full resource name). + * + * Generated from protobuf field string secret = 3; + */ + protected $secret = ''; + /** + * List of secret versions to mount for this secret. If empty, the `latest` + * version of the secret will be made available in a file named after the + * secret under the mount point. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4; + */ + private $versions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mount_path + * The path within the container to mount the secret volume. For example, + * setting the mount_path as `/etc/secrets` would mount the secret value files + * under the `/etc/secrets` directory. This directory will also be completely + * shadowed and unavailable to mount any other secrets. + * Recommended mount path: /etc/secrets + * @type string $project_id + * Project identifier (preferably project number but can also be the project + * ID) of the project that contains the secret. If not set, it is + * assumed that the secret is in the same project as the function. + * @type string $secret + * Name of the secret in secret manager (not the full resource name). + * @type array<\Google\Cloud\Functions\V2\SecretVolume\SecretVersion>|\Google\Protobuf\Internal\RepeatedField $versions + * List of secret versions to mount for this secret. If empty, the `latest` + * version of the secret will be made available in a file named after the + * secret under the mount point. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * The path within the container to mount the secret volume. For example, + * setting the mount_path as `/etc/secrets` would mount the secret value files + * under the `/etc/secrets` directory. This directory will also be completely + * shadowed and unavailable to mount any other secrets. + * Recommended mount path: /etc/secrets + * + * Generated from protobuf field string mount_path = 1; + * @return string + */ + public function getMountPath() + { + return $this->mount_path; + } + + /** + * The path within the container to mount the secret volume. For example, + * setting the mount_path as `/etc/secrets` would mount the secret value files + * under the `/etc/secrets` directory. This directory will also be completely + * shadowed and unavailable to mount any other secrets. + * Recommended mount path: /etc/secrets + * + * Generated from protobuf field string mount_path = 1; + * @param string $var + * @return $this + */ + public function setMountPath($var) + { + GPBUtil::checkString($var, True); + $this->mount_path = $var; + + return $this; + } + + /** + * Project identifier (preferably project number but can also be the project + * ID) of the project that contains the secret. If not set, it is + * assumed that the secret is in the same project as the function. + * + * Generated from protobuf field string project_id = 2; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Project identifier (preferably project number but can also be the project + * ID) of the project that contains the secret. If not set, it is + * assumed that the secret is in the same project as the function. + * + * 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; + } + + /** + * Name of the secret in secret manager (not the full resource name). + * + * Generated from protobuf field string secret = 3; + * @return string + */ + public function getSecret() + { + return $this->secret; + } + + /** + * Name of the secret in secret manager (not the full resource name). + * + * Generated from protobuf field string secret = 3; + * @param string $var + * @return $this + */ + public function setSecret($var) + { + GPBUtil::checkString($var, True); + $this->secret = $var; + + return $this; + } + + /** + * List of secret versions to mount for this secret. If empty, the `latest` + * version of the secret will be made available in a file named after the + * secret under the mount point. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVersions() + { + return $this->versions; + } + + /** + * List of secret versions to mount for this secret. If empty, the `latest` + * version of the secret will be made available in a file named after the + * secret under the mount point. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4; + * @param array<\Google\Cloud\Functions\V2\SecretVolume\SecretVersion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\SecretVolume\SecretVersion::class); + $this->versions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume/SecretVersion.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume/SecretVersion.php new file mode 100644 index 000000000000..fe99c1e3ddd3 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume/SecretVersion.php @@ -0,0 +1,124 @@ +google.cloud.functions.v2.SecretVolume.SecretVersion + */ +class SecretVersion extends \Google\Protobuf\Internal\Message +{ + /** + * Version of the secret (version number or the string 'latest'). It is + * preferable to use `latest` version with secret volumes as secret value + * changes are reflected immediately. + * + * Generated from protobuf field string version = 1; + */ + protected $version = ''; + /** + * Relative path of the file under the mount path where the secret value for + * this version will be fetched and made available. For example, setting the + * mount_path as '/etc/secrets' and path as `secret_foo` would mount the + * secret value file at `/etc/secrets/secret_foo`. + * + * Generated from protobuf field string path = 2; + */ + protected $path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * Version of the secret (version number or the string 'latest'). It is + * preferable to use `latest` version with secret volumes as secret value + * changes are reflected immediately. + * @type string $path + * Relative path of the file under the mount path where the secret value for + * this version will be fetched and made available. For example, setting the + * mount_path as '/etc/secrets' and path as `secret_foo` would mount the + * secret value file at `/etc/secrets/secret_foo`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Version of the secret (version number or the string 'latest'). It is + * preferable to use `latest` version with secret volumes as secret value + * changes are reflected immediately. + * + * Generated from protobuf field string version = 1; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version of the secret (version number or the string 'latest'). It is + * preferable to use `latest` version with secret volumes as secret value + * changes are reflected immediately. + * + * Generated from protobuf field string version = 1; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Relative path of the file under the mount path where the secret value for + * this version will be fetched and made available. For example, setting the + * mount_path as '/etc/secrets' and path as `secret_foo` would mount the + * secret value file at `/etc/secrets/secret_foo`. + * + * Generated from protobuf field string path = 2; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Relative path of the file under the mount path where the secret value for + * this version will be fetched and made available. For example, setting the + * mount_path as '/etc/secrets' and path as `secret_foo` would mount the + * secret value file at `/etc/secrets/secret_foo`. + * + * 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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SecretVersion::class, \Google\Cloud\Functions\V2\SecretVolume_SecretVersion::class); + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume_SecretVersion.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume_SecretVersion.php new file mode 100644 index 000000000000..250534c263c5 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume_SecretVersion.php @@ -0,0 +1,16 @@ +google.cloud.functions.v2.ServiceConfig + */ +class ServiceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of the service associated with a Function. + * The format of this field is + * `projects/{project}/locations/{region}/services/{service}` + * + * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $service = ''; + /** + * The function execution timeout. Execution is considered failed and + * can be terminated if the function is not completed at the end of the + * timeout period. Defaults to 60 seconds. + * + * Generated from protobuf field int32 timeout_seconds = 2; + */ + protected $timeout_seconds = 0; + /** + * The amount of memory available for a function. + * Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is + * supplied the value is interpreted as bytes. + * See + * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go + * a full description. + * + * Generated from protobuf field string available_memory = 13; + */ + protected $available_memory = ''; + /** + * Environment variables that shall be available during function execution. + * + * Generated from protobuf field map environment_variables = 4; + */ + private $environment_variables; + /** + * The limit on the maximum number of function instances that may coexist at a + * given time. + * In some cases, such as rapid traffic surges, Cloud Functions may, for a + * short period of time, create more instances than the specified max + * instances limit. If your function cannot tolerate this temporary behavior, + * you may want to factor in a safety margin and set a lower max instances + * value than your function can tolerate. + * See the [Max + * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for + * more details. + * + * Generated from protobuf field int32 max_instance_count = 5; + */ + protected $max_instance_count = 0; + /** + * The limit on the minimum number of function instances that may coexist at a + * given time. + * Function instances are kept in idle state for a short period after they + * finished executing the request to reduce cold start time for subsequent + * requests. Setting a minimum instance count will ensure that the given + * number of instances are kept running in idle state always. This can help + * with cold start times when jump in incoming request count occurs after the + * idle instance would have been stopped in the default case. + * + * Generated from protobuf field int32 min_instance_count = 12; + */ + protected $min_instance_count = 0; + /** + * The Serverless VPC Access connector that this cloud function can connect + * to. The format of this field is `projects/*/locations/*/connectors/*`. + * + * Generated from protobuf field string vpc_connector = 6 [(.google.api.resource_reference) = { + */ + protected $vpc_connector = ''; + /** + * The egress settings for the connector, controlling what traffic is diverted + * through it. + * + * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7; + */ + protected $vpc_connector_egress_settings = 0; + /** + * The ingress settings for the function, controlling what traffic can reach + * it. + * + * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.IngressSettings ingress_settings = 8; + */ + protected $ingress_settings = 0; + /** + * Output only. URI of the Service deployed. + * + * Generated from protobuf field string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uri = ''; + /** + * The email of the service's service account. If empty, defaults to + * `{project_number}-compute@developer.gserviceaccount.com`. + * + * Generated from protobuf field string service_account_email = 10; + */ + protected $service_account_email = ''; + /** + * Whether 100% of traffic is routed to the latest revision. + * On CreateFunction and UpdateFunction, when set to true, the revision being + * deployed will serve 100% of traffic, ignoring any traffic split settings, + * if any. On GetFunction, true will be returned if the latest revision is + * serving 100% of traffic. + * + * Generated from protobuf field bool all_traffic_on_latest_revision = 16; + */ + protected $all_traffic_on_latest_revision = false; + /** + * Secret environment variables configuration. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17; + */ + private $secret_environment_variables; + /** + * Secret volumes configuration. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19; + */ + private $secret_volumes; + /** + * Output only. The name of service revision. + * + * Generated from protobuf field string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * Output only. Name of the service associated with a Function. + * The format of this field is + * `projects/{project}/locations/{region}/services/{service}` + * @type int $timeout_seconds + * The function execution timeout. Execution is considered failed and + * can be terminated if the function is not completed at the end of the + * timeout period. Defaults to 60 seconds. + * @type string $available_memory + * The amount of memory available for a function. + * Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is + * supplied the value is interpreted as bytes. + * See + * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go + * a full description. + * @type array|\Google\Protobuf\Internal\MapField $environment_variables + * Environment variables that shall be available during function execution. + * @type int $max_instance_count + * The limit on the maximum number of function instances that may coexist at a + * given time. + * In some cases, such as rapid traffic surges, Cloud Functions may, for a + * short period of time, create more instances than the specified max + * instances limit. If your function cannot tolerate this temporary behavior, + * you may want to factor in a safety margin and set a lower max instances + * value than your function can tolerate. + * See the [Max + * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for + * more details. + * @type int $min_instance_count + * The limit on the minimum number of function instances that may coexist at a + * given time. + * Function instances are kept in idle state for a short period after they + * finished executing the request to reduce cold start time for subsequent + * requests. Setting a minimum instance count will ensure that the given + * number of instances are kept running in idle state always. This can help + * with cold start times when jump in incoming request count occurs after the + * idle instance would have been stopped in the default case. + * @type string $vpc_connector + * The Serverless VPC Access connector that this cloud function can connect + * to. The format of this field is `projects/*/locations/*/connectors/*`. + * @type int $vpc_connector_egress_settings + * The egress settings for the connector, controlling what traffic is diverted + * through it. + * @type int $ingress_settings + * The ingress settings for the function, controlling what traffic can reach + * it. + * @type string $uri + * Output only. URI of the Service deployed. + * @type string $service_account_email + * The email of the service's service account. If empty, defaults to + * `{project_number}-compute@developer.gserviceaccount.com`. + * @type bool $all_traffic_on_latest_revision + * Whether 100% of traffic is routed to the latest revision. + * On CreateFunction and UpdateFunction, when set to true, the revision being + * deployed will serve 100% of traffic, ignoring any traffic split settings, + * if any. On GetFunction, true will be returned if the latest revision is + * serving 100% of traffic. + * @type array<\Google\Cloud\Functions\V2\SecretEnvVar>|\Google\Protobuf\Internal\RepeatedField $secret_environment_variables + * Secret environment variables configuration. + * @type array<\Google\Cloud\Functions\V2\SecretVolume>|\Google\Protobuf\Internal\RepeatedField $secret_volumes + * Secret volumes configuration. + * @type string $revision + * Output only. The name of service revision. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of the service associated with a Function. + * The format of this field is + * `projects/{project}/locations/{region}/services/{service}` + * + * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Output only. Name of the service associated with a Function. + * The format of this field is + * `projects/{project}/locations/{region}/services/{service}` + * + * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * The function execution timeout. Execution is considered failed and + * can be terminated if the function is not completed at the end of the + * timeout period. Defaults to 60 seconds. + * + * Generated from protobuf field int32 timeout_seconds = 2; + * @return int + */ + public function getTimeoutSeconds() + { + return $this->timeout_seconds; + } + + /** + * The function execution timeout. Execution is considered failed and + * can be terminated if the function is not completed at the end of the + * timeout period. Defaults to 60 seconds. + * + * Generated from protobuf field int32 timeout_seconds = 2; + * @param int $var + * @return $this + */ + public function setTimeoutSeconds($var) + { + GPBUtil::checkInt32($var); + $this->timeout_seconds = $var; + + return $this; + } + + /** + * The amount of memory available for a function. + * Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is + * supplied the value is interpreted as bytes. + * See + * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go + * a full description. + * + * Generated from protobuf field string available_memory = 13; + * @return string + */ + public function getAvailableMemory() + { + return $this->available_memory; + } + + /** + * The amount of memory available for a function. + * Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is + * supplied the value is interpreted as bytes. + * See + * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go + * a full description. + * + * Generated from protobuf field string available_memory = 13; + * @param string $var + * @return $this + */ + public function setAvailableMemory($var) + { + GPBUtil::checkString($var, True); + $this->available_memory = $var; + + return $this; + } + + /** + * Environment variables that shall be available during function execution. + * + * Generated from protobuf field map environment_variables = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getEnvironmentVariables() + { + return $this->environment_variables; + } + + /** + * Environment variables that shall be available during function execution. + * + * Generated from protobuf field map environment_variables = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setEnvironmentVariables($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->environment_variables = $arr; + + return $this; + } + + /** + * The limit on the maximum number of function instances that may coexist at a + * given time. + * In some cases, such as rapid traffic surges, Cloud Functions may, for a + * short period of time, create more instances than the specified max + * instances limit. If your function cannot tolerate this temporary behavior, + * you may want to factor in a safety margin and set a lower max instances + * value than your function can tolerate. + * See the [Max + * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for + * more details. + * + * Generated from protobuf field int32 max_instance_count = 5; + * @return int + */ + public function getMaxInstanceCount() + { + return $this->max_instance_count; + } + + /** + * The limit on the maximum number of function instances that may coexist at a + * given time. + * In some cases, such as rapid traffic surges, Cloud Functions may, for a + * short period of time, create more instances than the specified max + * instances limit. If your function cannot tolerate this temporary behavior, + * you may want to factor in a safety margin and set a lower max instances + * value than your function can tolerate. + * See the [Max + * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for + * more details. + * + * Generated from protobuf field int32 max_instance_count = 5; + * @param int $var + * @return $this + */ + public function setMaxInstanceCount($var) + { + GPBUtil::checkInt32($var); + $this->max_instance_count = $var; + + return $this; + } + + /** + * The limit on the minimum number of function instances that may coexist at a + * given time. + * Function instances are kept in idle state for a short period after they + * finished executing the request to reduce cold start time for subsequent + * requests. Setting a minimum instance count will ensure that the given + * number of instances are kept running in idle state always. This can help + * with cold start times when jump in incoming request count occurs after the + * idle instance would have been stopped in the default case. + * + * Generated from protobuf field int32 min_instance_count = 12; + * @return int + */ + public function getMinInstanceCount() + { + return $this->min_instance_count; + } + + /** + * The limit on the minimum number of function instances that may coexist at a + * given time. + * Function instances are kept in idle state for a short period after they + * finished executing the request to reduce cold start time for subsequent + * requests. Setting a minimum instance count will ensure that the given + * number of instances are kept running in idle state always. This can help + * with cold start times when jump in incoming request count occurs after the + * idle instance would have been stopped in the default case. + * + * Generated from protobuf field int32 min_instance_count = 12; + * @param int $var + * @return $this + */ + public function setMinInstanceCount($var) + { + GPBUtil::checkInt32($var); + $this->min_instance_count = $var; + + return $this; + } + + /** + * The Serverless VPC Access connector that this cloud function can connect + * to. The format of this field is `projects/*/locations/*/connectors/*`. + * + * Generated from protobuf field string vpc_connector = 6 [(.google.api.resource_reference) = { + * @return string + */ + public function getVpcConnector() + { + return $this->vpc_connector; + } + + /** + * The Serverless VPC Access connector that this cloud function can connect + * to. The format of this field is `projects/*/locations/*/connectors/*`. + * + * Generated from protobuf field string vpc_connector = 6 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVpcConnector($var) + { + GPBUtil::checkString($var, True); + $this->vpc_connector = $var; + + return $this; + } + + /** + * The egress settings for the connector, controlling what traffic is diverted + * through it. + * + * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7; + * @return int + */ + public function getVpcConnectorEgressSettings() + { + return $this->vpc_connector_egress_settings; + } + + /** + * The egress settings for the connector, controlling what traffic is diverted + * through it. + * + * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7; + * @param int $var + * @return $this + */ + public function setVpcConnectorEgressSettings($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\ServiceConfig\VpcConnectorEgressSettings::class); + $this->vpc_connector_egress_settings = $var; + + return $this; + } + + /** + * The ingress settings for the function, controlling what traffic can reach + * it. + * + * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.IngressSettings ingress_settings = 8; + * @return int + */ + public function getIngressSettings() + { + return $this->ingress_settings; + } + + /** + * The ingress settings for the function, controlling what traffic can reach + * it. + * + * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.IngressSettings ingress_settings = 8; + * @param int $var + * @return $this + */ + public function setIngressSettings($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\ServiceConfig\IngressSettings::class); + $this->ingress_settings = $var; + + return $this; + } + + /** + * Output only. URI of the Service deployed. + * + * Generated from protobuf field string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Output only. URI of the Service deployed. + * + * Generated from protobuf field string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * The email of the service's service account. If empty, defaults to + * `{project_number}-compute@developer.gserviceaccount.com`. + * + * Generated from protobuf field string service_account_email = 10; + * @return string + */ + public function getServiceAccountEmail() + { + return $this->service_account_email; + } + + /** + * The email of the service's service account. If empty, defaults to + * `{project_number}-compute@developer.gserviceaccount.com`. + * + * Generated from protobuf field string service_account_email = 10; + * @param string $var + * @return $this + */ + public function setServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->service_account_email = $var; + + return $this; + } + + /** + * Whether 100% of traffic is routed to the latest revision. + * On CreateFunction and UpdateFunction, when set to true, the revision being + * deployed will serve 100% of traffic, ignoring any traffic split settings, + * if any. On GetFunction, true will be returned if the latest revision is + * serving 100% of traffic. + * + * Generated from protobuf field bool all_traffic_on_latest_revision = 16; + * @return bool + */ + public function getAllTrafficOnLatestRevision() + { + return $this->all_traffic_on_latest_revision; + } + + /** + * Whether 100% of traffic is routed to the latest revision. + * On CreateFunction and UpdateFunction, when set to true, the revision being + * deployed will serve 100% of traffic, ignoring any traffic split settings, + * if any. On GetFunction, true will be returned if the latest revision is + * serving 100% of traffic. + * + * Generated from protobuf field bool all_traffic_on_latest_revision = 16; + * @param bool $var + * @return $this + */ + public function setAllTrafficOnLatestRevision($var) + { + GPBUtil::checkBool($var); + $this->all_traffic_on_latest_revision = $var; + + return $this; + } + + /** + * Secret environment variables configuration. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecretEnvironmentVariables() + { + return $this->secret_environment_variables; + } + + /** + * Secret environment variables configuration. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17; + * @param array<\Google\Cloud\Functions\V2\SecretEnvVar>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecretEnvironmentVariables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\SecretEnvVar::class); + $this->secret_environment_variables = $arr; + + return $this; + } + + /** + * Secret volumes configuration. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecretVolumes() + { + return $this->secret_volumes; + } + + /** + * Secret volumes configuration. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19; + * @param array<\Google\Cloud\Functions\V2\SecretVolume>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecretVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\SecretVolume::class); + $this->secret_volumes = $arr; + + return $this; + } + + /** + * Output only. The name of service revision. + * + * Generated from protobuf field string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRevision() + { + return $this->revision; + } + + /** + * Output only. The name of service revision. + * + * Generated from protobuf field string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRevision($var) + { + GPBUtil::checkString($var, True); + $this->revision = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/IngressSettings.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/IngressSettings.php new file mode 100644 index 000000000000..0dfd22d07834 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/IngressSettings.php @@ -0,0 +1,73 @@ +google.cloud.functions.v2.ServiceConfig.IngressSettings + */ +class IngressSettings +{ + /** + * Unspecified. + * + * Generated from protobuf enum INGRESS_SETTINGS_UNSPECIFIED = 0; + */ + const INGRESS_SETTINGS_UNSPECIFIED = 0; + /** + * Allow HTTP traffic from public and private sources. + * + * Generated from protobuf enum ALLOW_ALL = 1; + */ + const ALLOW_ALL = 1; + /** + * Allow HTTP traffic from only private VPC sources. + * + * Generated from protobuf enum ALLOW_INTERNAL_ONLY = 2; + */ + const ALLOW_INTERNAL_ONLY = 2; + /** + * Allow HTTP traffic from private VPC sources and through GCLB. + * + * Generated from protobuf enum ALLOW_INTERNAL_AND_GCLB = 3; + */ + const ALLOW_INTERNAL_AND_GCLB = 3; + + private static $valueToName = [ + self::INGRESS_SETTINGS_UNSPECIFIED => 'INGRESS_SETTINGS_UNSPECIFIED', + self::ALLOW_ALL => 'ALLOW_ALL', + self::ALLOW_INTERNAL_ONLY => 'ALLOW_INTERNAL_ONLY', + self::ALLOW_INTERNAL_AND_GCLB => 'ALLOW_INTERNAL_AND_GCLB', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IngressSettings::class, \Google\Cloud\Functions\V2\ServiceConfig_IngressSettings::class); + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/VpcConnectorEgressSettings.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/VpcConnectorEgressSettings.php new file mode 100644 index 000000000000..77a3f98e3ae3 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/VpcConnectorEgressSettings.php @@ -0,0 +1,67 @@ +google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings + */ +class VpcConnectorEgressSettings +{ + /** + * Unspecified. + * + * Generated from protobuf enum VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0; + */ + const VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0; + /** + * Use the VPC Access Connector only for private IP space from RFC1918. + * + * Generated from protobuf enum PRIVATE_RANGES_ONLY = 1; + */ + const PRIVATE_RANGES_ONLY = 1; + /** + * Force the use of VPC Access Connector for all egress traffic from the + * function. + * + * Generated from protobuf enum ALL_TRAFFIC = 2; + */ + const ALL_TRAFFIC = 2; + + private static $valueToName = [ + self::VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED => 'VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED', + self::PRIVATE_RANGES_ONLY => 'PRIVATE_RANGES_ONLY', + self::ALL_TRAFFIC => 'ALL_TRAFFIC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VpcConnectorEgressSettings::class, \Google\Cloud\Functions\V2\ServiceConfig_VpcConnectorEgressSettings::class); + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig_IngressSettings.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig_IngressSettings.php new file mode 100644 index 000000000000..445083fb01da --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig_IngressSettings.php @@ -0,0 +1,16 @@ +google.cloud.functions.v2.Source + */ +class Source extends \Google\Protobuf\Internal\Message +{ + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Functions\V2\StorageSource $storage_source + * If provided, get the source from this location in Google Cloud Storage. + * @type \Google\Cloud\Functions\V2\RepoSource $repo_source + * If provided, get the source from this location in a Cloud Source + * Repository. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * If provided, get the source from this location in Google Cloud Storage. + * + * Generated from protobuf field .google.cloud.functions.v2.StorageSource storage_source = 1; + * @return \Google\Cloud\Functions\V2\StorageSource|null + */ + public function getStorageSource() + { + return $this->readOneof(1); + } + + public function hasStorageSource() + { + return $this->hasOneof(1); + } + + /** + * If provided, get the source from this location in Google Cloud Storage. + * + * Generated from protobuf field .google.cloud.functions.v2.StorageSource storage_source = 1; + * @param \Google\Cloud\Functions\V2\StorageSource $var + * @return $this + */ + public function setStorageSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\StorageSource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * If provided, get the source from this location in a Cloud Source + * Repository. + * + * Generated from protobuf field .google.cloud.functions.v2.RepoSource repo_source = 2; + * @return \Google\Cloud\Functions\V2\RepoSource|null + */ + public function getRepoSource() + { + return $this->readOneof(2); + } + + public function hasRepoSource() + { + return $this->hasOneof(2); + } + + /** + * If provided, get the source from this location in a Cloud Source + * Repository. + * + * Generated from protobuf field .google.cloud.functions.v2.RepoSource repo_source = 2; + * @param \Google\Cloud\Functions\V2\RepoSource $var + * @return $this + */ + public function setRepoSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\RepoSource::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SourceProvenance.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SourceProvenance.php new file mode 100644 index 000000000000..f49a857e6dae --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SourceProvenance.php @@ -0,0 +1,130 @@ +google.cloud.functions.v2.SourceProvenance + */ +class SourceProvenance extends \Google\Protobuf\Internal\Message +{ + /** + * A copy of the build's `source.storage_source`, if exists, with any + * generations resolved. + * + * Generated from protobuf field .google.cloud.functions.v2.StorageSource resolved_storage_source = 1; + */ + protected $resolved_storage_source = null; + /** + * A copy of the build's `source.repo_source`, if exists, with any + * revisions resolved. + * + * Generated from protobuf field .google.cloud.functions.v2.RepoSource resolved_repo_source = 2; + */ + protected $resolved_repo_source = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Functions\V2\StorageSource $resolved_storage_source + * A copy of the build's `source.storage_source`, if exists, with any + * generations resolved. + * @type \Google\Cloud\Functions\V2\RepoSource $resolved_repo_source + * A copy of the build's `source.repo_source`, if exists, with any + * revisions resolved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * A copy of the build's `source.storage_source`, if exists, with any + * generations resolved. + * + * Generated from protobuf field .google.cloud.functions.v2.StorageSource resolved_storage_source = 1; + * @return \Google\Cloud\Functions\V2\StorageSource|null + */ + public function getResolvedStorageSource() + { + return $this->resolved_storage_source; + } + + public function hasResolvedStorageSource() + { + return isset($this->resolved_storage_source); + } + + public function clearResolvedStorageSource() + { + unset($this->resolved_storage_source); + } + + /** + * A copy of the build's `source.storage_source`, if exists, with any + * generations resolved. + * + * Generated from protobuf field .google.cloud.functions.v2.StorageSource resolved_storage_source = 1; + * @param \Google\Cloud\Functions\V2\StorageSource $var + * @return $this + */ + public function setResolvedStorageSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\StorageSource::class); + $this->resolved_storage_source = $var; + + return $this; + } + + /** + * A copy of the build's `source.repo_source`, if exists, with any + * revisions resolved. + * + * Generated from protobuf field .google.cloud.functions.v2.RepoSource resolved_repo_source = 2; + * @return \Google\Cloud\Functions\V2\RepoSource|null + */ + public function getResolvedRepoSource() + { + return $this->resolved_repo_source; + } + + public function hasResolvedRepoSource() + { + return isset($this->resolved_repo_source); + } + + public function clearResolvedRepoSource() + { + unset($this->resolved_repo_source); + } + + /** + * A copy of the build's `source.repo_source`, if exists, with any + * revisions resolved. + * + * Generated from protobuf field .google.cloud.functions.v2.RepoSource resolved_repo_source = 2; + * @param \Google\Cloud\Functions\V2\RepoSource $var + * @return $this + */ + public function setResolvedRepoSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\RepoSource::class); + $this->resolved_repo_source = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage.php new file mode 100644 index 000000000000..e965c5a3023b --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage.php @@ -0,0 +1,237 @@ +google.cloud.functions.v2.Stage + */ +class Stage extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the Stage. This will be unique for each Stage. + * + * Generated from protobuf field .google.cloud.functions.v2.Stage.Name name = 1; + */ + protected $name = 0; + /** + * Message describing the Stage + * + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + /** + * Current state of the Stage + * + * Generated from protobuf field .google.cloud.functions.v2.Stage.State state = 3; + */ + protected $state = 0; + /** + * Resource of the Stage + * + * Generated from protobuf field string resource = 4; + */ + protected $resource = ''; + /** + * Link to the current Stage resource + * + * Generated from protobuf field string resource_uri = 5; + */ + protected $resource_uri = ''; + /** + * State messages from the current Stage. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 6; + */ + private $state_messages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $name + * Name of the Stage. This will be unique for each Stage. + * @type string $message + * Message describing the Stage + * @type int $state + * Current state of the Stage + * @type string $resource + * Resource of the Stage + * @type string $resource_uri + * Link to the current Stage resource + * @type array<\Google\Cloud\Functions\V2\StateMessage>|\Google\Protobuf\Internal\RepeatedField $state_messages + * State messages from the current Stage. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Name of the Stage. This will be unique for each Stage. + * + * Generated from protobuf field .google.cloud.functions.v2.Stage.Name name = 1; + * @return int + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the Stage. This will be unique for each Stage. + * + * Generated from protobuf field .google.cloud.functions.v2.Stage.Name name = 1; + * @param int $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\Stage\Name::class); + $this->name = $var; + + return $this; + } + + /** + * Message describing the Stage + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Message describing the Stage + * + * 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; + } + + /** + * Current state of the Stage + * + * Generated from protobuf field .google.cloud.functions.v2.Stage.State state = 3; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Current state of the Stage + * + * Generated from protobuf field .google.cloud.functions.v2.Stage.State state = 3; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\Stage\State::class); + $this->state = $var; + + return $this; + } + + /** + * Resource of the Stage + * + * Generated from protobuf field string resource = 4; + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * Resource of the Stage + * + * Generated from protobuf field string resource = 4; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + + /** + * Link to the current Stage resource + * + * Generated from protobuf field string resource_uri = 5; + * @return string + */ + public function getResourceUri() + { + return $this->resource_uri; + } + + /** + * Link to the current Stage resource + * + * Generated from protobuf field string resource_uri = 5; + * @param string $var + * @return $this + */ + public function setResourceUri($var) + { + GPBUtil::checkString($var, True); + $this->resource_uri = $var; + + return $this; + } + + /** + * State messages from the current Stage. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStateMessages() + { + return $this->state_messages; + } + + /** + * State messages from the current Stage. + * + * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 6; + * @param array<\Google\Cloud\Functions\V2\StateMessage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStateMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\StateMessage::class); + $this->state_messages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/Name.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/Name.php new file mode 100644 index 000000000000..6dbaa6f06046 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/Name.php @@ -0,0 +1,92 @@ +google.cloud.functions.v2.Stage.Name + */ +class Name +{ + /** + * Not specified. Invalid name. + * + * Generated from protobuf enum NAME_UNSPECIFIED = 0; + */ + const NAME_UNSPECIFIED = 0; + /** + * Artifact Regsitry Stage + * + * Generated from protobuf enum ARTIFACT_REGISTRY = 1; + */ + const ARTIFACT_REGISTRY = 1; + /** + * Build Stage + * + * Generated from protobuf enum BUILD = 2; + */ + const BUILD = 2; + /** + * Service Stage + * + * Generated from protobuf enum SERVICE = 3; + */ + const SERVICE = 3; + /** + * Trigger Stage + * + * Generated from protobuf enum TRIGGER = 4; + */ + const TRIGGER = 4; + /** + * Service Rollback Stage + * + * Generated from protobuf enum SERVICE_ROLLBACK = 5; + */ + const SERVICE_ROLLBACK = 5; + /** + * Trigger Rollback Stage + * + * Generated from protobuf enum TRIGGER_ROLLBACK = 6; + */ + const TRIGGER_ROLLBACK = 6; + + private static $valueToName = [ + self::NAME_UNSPECIFIED => 'NAME_UNSPECIFIED', + self::ARTIFACT_REGISTRY => 'ARTIFACT_REGISTRY', + self::BUILD => 'BUILD', + self::SERVICE => 'SERVICE', + self::TRIGGER => 'TRIGGER', + self::SERVICE_ROLLBACK => 'SERVICE_ROLLBACK', + self::TRIGGER_ROLLBACK => 'TRIGGER_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(Name::class, \Google\Cloud\Functions\V2\Stage_Name::class); + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/State.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/State.php new file mode 100644 index 000000000000..5a0be65fc0dc --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/State.php @@ -0,0 +1,71 @@ +google.cloud.functions.v2.Stage.State + */ +class State +{ + /** + * Not specified. Invalid state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Stage has not started. + * + * Generated from protobuf enum NOT_STARTED = 1; + */ + const NOT_STARTED = 1; + /** + * Stage is in progress. + * + * Generated from protobuf enum IN_PROGRESS = 2; + */ + const IN_PROGRESS = 2; + /** + * Stage has completed. + * + * Generated from protobuf enum COMPLETE = 3; + */ + const COMPLETE = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::NOT_STARTED => 'NOT_STARTED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::COMPLETE => 'COMPLETE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Functions\V2\Stage_State::class); + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage_Name.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage_Name.php new file mode 100644 index 000000000000..813cd25229e0 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage_Name.php @@ -0,0 +1,16 @@ +google.cloud.functions.v2.StateMessage + */ +class StateMessage extends \Google\Protobuf\Internal\Message +{ + /** + * Severity of the state message. + * + * Generated from protobuf field .google.cloud.functions.v2.StateMessage.Severity severity = 1; + */ + protected $severity = 0; + /** + * One-word CamelCase type of the state message. + * + * Generated from protobuf field string type = 2; + */ + protected $type = ''; + /** + * The message. + * + * Generated from protobuf field string message = 3; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $severity + * Severity of the state message. + * @type string $type + * One-word CamelCase type of the state message. + * @type string $message + * The message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Severity of the state message. + * + * Generated from protobuf field .google.cloud.functions.v2.StateMessage.Severity severity = 1; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Severity of the state message. + * + * Generated from protobuf field .google.cloud.functions.v2.StateMessage.Severity severity = 1; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\StateMessage\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * One-word CamelCase type of the state message. + * + * Generated from protobuf field string type = 2; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * One-word CamelCase type of the state message. + * + * Generated from protobuf field string type = 2; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * The message. + * + * Generated from protobuf field string message = 3; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The message. + * + * Generated from protobuf field string message = 3; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage/Severity.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage/Severity.php new file mode 100644 index 000000000000..d201473a95e0 --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage/Severity.php @@ -0,0 +1,71 @@ +google.cloud.functions.v2.StateMessage.Severity + */ +class Severity +{ + /** + * Not specified. Invalid severity. + * + * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; + */ + const SEVERITY_UNSPECIFIED = 0; + /** + * ERROR-level severity. + * + * Generated from protobuf enum ERROR = 1; + */ + const ERROR = 1; + /** + * WARNING-level severity. + * + * Generated from protobuf enum WARNING = 2; + */ + const WARNING = 2; + /** + * INFO-level severity. + * + * 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\Functions\V2\StateMessage_Severity::class); + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage_Severity.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage_Severity.php new file mode 100644 index 000000000000..1cddc6326e1d --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage_Severity.php @@ -0,0 +1,16 @@ +google.cloud.functions.v2.StorageSource + */ +class StorageSource extends \Google\Protobuf\Internal\Message +{ + /** + * Google Cloud Storage bucket containing the source (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * + * Generated from protobuf field string bucket = 1; + */ + protected $bucket = ''; + /** + * Google Cloud Storage object containing the source. + * This object must be a gzipped archive file (`.tar.gz`) containing source to + * build. + * + * Generated from protobuf field string object = 2; + */ + protected $object = ''; + /** + * Google Cloud Storage generation for the object. If the generation is + * omitted, the latest generation will be used. + * + * Generated from protobuf field int64 generation = 3; + */ + protected $generation = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bucket + * Google Cloud Storage bucket containing the source (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * @type string $object + * Google Cloud Storage object containing the source. + * This object must be a gzipped archive file (`.tar.gz`) containing source to + * build. + * @type int|string $generation + * Google Cloud Storage generation for the object. If the generation is + * omitted, the latest generation will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Google Cloud Storage bucket containing the source (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * + * Generated from protobuf field string bucket = 1; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * Google Cloud Storage bucket containing the source (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * + * 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; + } + + /** + * Google Cloud Storage object containing the source. + * This object must be a gzipped archive file (`.tar.gz`) containing source to + * build. + * + * Generated from protobuf field string object = 2; + * @return string + */ + public function getObject() + { + return $this->object; + } + + /** + * Google Cloud Storage object containing the source. + * This object must be a gzipped archive file (`.tar.gz`) containing source to + * build. + * + * Generated from protobuf field string object = 2; + * @param string $var + * @return $this + */ + public function setObject($var) + { + GPBUtil::checkString($var, True); + $this->object = $var; + + return $this; + } + + /** + * Google Cloud Storage generation for the object. If the generation is + * omitted, the latest generation will be used. + * + * Generated from protobuf field int64 generation = 3; + * @return int|string + */ + public function getGeneration() + { + return $this->generation; + } + + /** + * Google Cloud Storage generation for the object. If the generation is + * omitted, the latest generation will be used. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/UpdateFunctionRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/UpdateFunctionRequest.php new file mode 100644 index 000000000000..8b7d70695b0e --- /dev/null +++ b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/UpdateFunctionRequest.php @@ -0,0 +1,129 @@ +google.cloud.functions.v2.UpdateFunctionRequest + */ +class UpdateFunctionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. New version of the function. + * + * Generated from protobuf field .google.cloud.functions.v2.Function function = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $function = null; + /** + * The list of fields to be updated. + * If no field mask is provided, all provided fields in the request will be + * updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Functions\V2\PBFunction $function + * Required. New version of the function. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * If no field mask is provided, all provided fields in the request will be + * updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); + parent::__construct($data); + } + + /** + * Required. New version of the function. + * + * Generated from protobuf field .google.cloud.functions.v2.Function function = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Functions\V2\PBFunction|null + */ + public function getFunction() + { + return $this->function; + } + + public function hasFunction() + { + return isset($this->function); + } + + public function clearFunction() + { + unset($this->function); + } + + /** + * Required. New version of the function. + * + * Generated from protobuf field .google.cloud.functions.v2.Function function = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Functions\V2\PBFunction $var + * @return $this + */ + public function setFunction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\PBFunction::class); + $this->function = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * If no field mask is provided, all provided fields in the request will be + * updated. + * + * 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); + } + + /** + * The list of fields to be updated. + * If no field mask is provided, all provided fields in the request will be + * updated. + * + * 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/Functions/v2/samples/V2/FunctionServiceClient/create_function.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/create_function.php new file mode 100644 index 000000000000..89b713ed4e72 --- /dev/null +++ b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/create_function.php @@ -0,0 +1,84 @@ +createFunction($formattedParent, $function); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PBFunction $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FunctionServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_function_sample($formattedParent); +} +// [END cloudfunctions_v2_generated_FunctionService_CreateFunction_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/delete_function.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/delete_function.php new file mode 100644 index 000000000000..437039d61657 --- /dev/null +++ b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/delete_function.php @@ -0,0 +1,77 @@ +deleteFunction($formattedName); + $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 = FunctionServiceClient::functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + + delete_function_sample($formattedName); +} +// [END cloudfunctions_v2_generated_FunctionService_DeleteFunction_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_download_url.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_download_url.php new file mode 100644 index 000000000000..439e4416c015 --- /dev/null +++ b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_download_url.php @@ -0,0 +1,71 @@ +generateDownloadUrl($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FunctionServiceClient::functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + + generate_download_url_sample($formattedName); +} +// [END cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_upload_url.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_upload_url.php new file mode 100644 index 000000000000..b27f37e9e539 --- /dev/null +++ b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_upload_url.php @@ -0,0 +1,89 @@ +generateUploadUrl($formattedParent); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FunctionServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + generate_upload_url_sample($formattedParent); +} +// [END cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_function.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_function.php new file mode 100644 index 000000000000..01c816215e87 --- /dev/null +++ b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_function.php @@ -0,0 +1,66 @@ +getFunction($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FunctionServiceClient::functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + + get_function_sample($formattedName); +} +// [END cloudfunctions_v2_generated_FunctionService_GetFunction_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_iam_policy.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..1250bde096bf --- /dev/null +++ b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_iam_policy.php @@ -0,0 +1,67 @@ +getIamPolicy($resource); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 cloudfunctions_v2_generated_FunctionService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_functions.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_functions.php new file mode 100644 index 000000000000..a32f9c9ef44b --- /dev/null +++ b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_functions.php @@ -0,0 +1,76 @@ +listFunctions($formattedParent); + + /** @var PBFunction $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 = FunctionServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_functions_sample($formattedParent); +} +// [END cloudfunctions_v2_generated_FunctionService_ListFunctions_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_locations.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_locations.php new file mode 100644 index 000000000000..a1116d3741c6 --- /dev/null +++ b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @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 cloudfunctions_v2_generated_FunctionService_ListLocations_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_runtimes.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_runtimes.php new file mode 100644 index 000000000000..fb54f55b4649 --- /dev/null +++ b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_runtimes.php @@ -0,0 +1,67 @@ +listRuntimes($formattedParent); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FunctionServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_runtimes_sample($formattedParent); +} +// [END cloudfunctions_v2_generated_FunctionService_ListRuntimes_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/set_iam_policy.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..b4ccd1f305cc --- /dev/null +++ b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/set_iam_policy.php @@ -0,0 +1,73 @@ +setIamPolicy($resource, $policy); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 cloudfunctions_v2_generated_FunctionService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/test_iam_permissions.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..6d7889f66e03 --- /dev/null +++ b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/test_iam_permissions.php @@ -0,0 +1,80 @@ +testIamPermissions($resource, $permissions); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 cloudfunctions_v2_generated_FunctionService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/update_function.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/update_function.php new file mode 100644 index 000000000000..492d333a975e --- /dev/null +++ b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/update_function.php @@ -0,0 +1,68 @@ +updateFunction($function); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PBFunction $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + 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 cloudfunctions_v2_generated_FunctionService_UpdateFunction_sync] diff --git a/owl-bot-staging/Functions/v2/src/V2/FunctionServiceClient.php b/owl-bot-staging/Functions/v2/src/V2/FunctionServiceClient.php new file mode 100644 index 000000000000..c054325b54d3 --- /dev/null +++ b/owl-bot-staging/Functions/v2/src/V2/FunctionServiceClient.php @@ -0,0 +1,34 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $function = new PBFunction(); + * $operationResponse = $functionServiceClient->createFunction($formattedParent, $function); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $functionServiceClient->createFunction($formattedParent, $function); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $functionServiceClient->resumeOperation($operationName, 'createFunction'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $functionServiceClient->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. + */ +class FunctionServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.functions.v2.FunctionService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'cloudfunctions.googleapis.com'; + + /** 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 $functionNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/function_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/function_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/function_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/function_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getFunctionNameTemplate() + { + if (self::$functionNameTemplate == null) { + self::$functionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/functions/{function}'); + } + + return self::$functionNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'function' => self::getFunctionNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * 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 location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->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 + * - function: projects/{project}/locations/{location}/functions/{function} + * - 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($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"); + } + + /** + * 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; + } + + /** + * 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 'cloudfunctions.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a new function. If a function with the given name already exists in + * the specified project, the long running operation will return + * `ALREADY_EXISTS` error. + * + * Sample code: + * ``` + * $functionServiceClient = new FunctionServiceClient(); + * try { + * $formattedParent = $functionServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $function = new PBFunction(); + * $operationResponse = $functionServiceClient->createFunction($formattedParent, $function); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $functionServiceClient->createFunction($formattedParent, $function); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $functionServiceClient->resumeOperation($operationName, 'createFunction'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $functionServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and location in which the function should be created, specified + * in the format `projects/*/locations/*` + * @param PBFunction $function Required. Function to be created. + * @param array $optionalArgs { + * Optional. + * + * @type string $functionId + * The ID to use for the function, which will become the final component of + * the function's resource name. + * + * This value should be 4-63 characters, and valid characters + * are /[a-z][0-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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createFunction($parent, $function, array $optionalArgs = []) + { + $request = new CreateFunctionRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setFunction($function); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['functionId'])) { + $request->setFunctionId($optionalArgs['functionId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateFunction', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a function with the given name from the specified project. If the + * given function is used by some trigger, the trigger will be updated to + * remove this function. + * + * Sample code: + * ``` + * $functionServiceClient = new FunctionServiceClient(); + * try { + * $formattedName = $functionServiceClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + * $operationResponse = $functionServiceClient->deleteFunction($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $functionServiceClient->deleteFunction($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $functionServiceClient->resumeOperation($operationName, 'deleteFunction'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $functionServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the function which should be deleted. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteFunction($name, array $optionalArgs = []) + { + $request = new DeleteFunctionRequest(); + $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->startOperationsCall('DeleteFunction', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Returns a signed URL for downloading deployed function source code. + * The URL is only valid for a limited period and should be used within + * 30 minutes of generation. + * For more information about the signed URL usage see: + * https://cloud.google.com/storage/docs/access-control/signed-urls + * + * Sample code: + * ``` + * $functionServiceClient = new FunctionServiceClient(); + * try { + * $formattedName = $functionServiceClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + * $response = $functionServiceClient->generateDownloadUrl($formattedName); + * } finally { + * $functionServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of function for which source code Google Cloud Storage signed + * URL should be generated. + * @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\Functions\V2\GenerateDownloadUrlResponse + * + * @throws ApiException if the remote call fails + */ + public function generateDownloadUrl($name, array $optionalArgs = []) + { + $request = new GenerateDownloadUrlRequest(); + $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('GenerateDownloadUrl', GenerateDownloadUrlResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns a signed URL for uploading a function source code. + * For more information about the signed URL usage see: + * https://cloud.google.com/storage/docs/access-control/signed-urls. + * Once the function source code upload is complete, the used signed + * URL should be provided in CreateFunction or UpdateFunction request + * as a reference to the function source code. + * + * When uploading source code to the generated signed URL, please follow + * these restrictions: + * + * * Source file type should be a zip file. + * * No credentials should be attached - the signed URLs provide access to the + * target bucket using internal service identity; if credentials were + * attached, the identity from the credentials would be used, but that + * identity does not have permissions to upload files to the URL. + * + * When making a HTTP PUT request, these two headers need to be specified: + * + * * `content-type: application/zip` + * + * And this header SHOULD NOT be specified: + * + * * `Authorization: Bearer YOUR_TOKEN` + * + * Sample code: + * ``` + * $functionServiceClient = new FunctionServiceClient(); + * try { + * $formattedParent = $functionServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $response = $functionServiceClient->generateUploadUrl($formattedParent); + * } finally { + * $functionServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and location in which the Google Cloud Storage signed URL + * should be generated, specified in the format `projects/*/locations/*`. + * @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\Functions\V2\GenerateUploadUrlResponse + * + * @throws ApiException if the remote call fails + */ + public function generateUploadUrl($parent, array $optionalArgs = []) + { + $request = new GenerateUploadUrlRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GenerateUploadUrl', GenerateUploadUrlResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns a function with the given name from the requested project. + * + * Sample code: + * ``` + * $functionServiceClient = new FunctionServiceClient(); + * try { + * $formattedName = $functionServiceClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + * $response = $functionServiceClient->getFunction($formattedName); + * } finally { + * $functionServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the function which details should be obtained. + * @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\Functions\V2\PBFunction + * + * @throws ApiException if the remote call fails + */ + public function getFunction($name, array $optionalArgs = []) + { + $request = new GetFunctionRequest(); + $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('GetFunction', PBFunction::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns a list of functions that belong to the requested project. + * + * Sample code: + * ``` + * $functionServiceClient = new FunctionServiceClient(); + * try { + * $formattedParent = $functionServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $functionServiceClient->listFunctions($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $functionServiceClient->listFunctions($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $functionServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and location from which the function should be listed, + * specified in the format `projects/*/locations/*` + * If you want to list functions in all locations, use "-" in place of a + * location. When listing functions in all locations, if one or more + * location(s) are unreachable, the response will contain functions from all + * reachable locations along with the names of any unreachable locations. + * @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 + * The filter for Functions that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + * @type string $orderBy + * The sorting order of the resources returned. Value should be a comma + * separated list of fields. The default sorting oder is ascending. + * See https://google.aip.dev/132#ordering. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listFunctions($parent, array $optionalArgs = []) + { + $request = new ListFunctionsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListFunctions', $optionalArgs, ListFunctionsResponse::class, $request); + } + + /** + * Returns a list of runtimes that are supported for the requested project. + * + * Sample code: + * ``` + * $functionServiceClient = new FunctionServiceClient(); + * try { + * $formattedParent = $functionServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $response = $functionServiceClient->listRuntimes($formattedParent); + * } finally { + * $functionServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and location from which the runtimes should be listed, + * specified in the format `projects/*/locations/*` + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * The filter for Runtimes that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Functions\V2\ListRuntimesResponse + * + * @throws ApiException if the remote call fails + */ + public function listRuntimes($parent, array $optionalArgs = []) + { + $request = new ListRuntimesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ListRuntimes', ListRuntimesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates existing function. + * + * Sample code: + * ``` + * $functionServiceClient = new FunctionServiceClient(); + * try { + * $function = new PBFunction(); + * $operationResponse = $functionServiceClient->updateFunction($function); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $functionServiceClient->updateFunction($function); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $functionServiceClient->resumeOperation($operationName, 'updateFunction'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $functionServiceClient->close(); + * } + * ``` + * + * @param PBFunction $function Required. New version of the function. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The list of fields to be updated. + * If no field mask is provided, all provided fields in the request will be + * updated. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateFunction($function, array $optionalArgs = []) + { + $request = new UpdateFunctionRequest(); + $requestParamHeaders = []; + $request->setFunction($function); + $requestParamHeaders['function.name'] = $function->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->startOperationsCall('UpdateFunction', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $functionServiceClient = new FunctionServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $functionServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $functionServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $functionServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * Sample code: + * ``` + * $functionServiceClient = new FunctionServiceClient(); + * try { + * $resource = 'resource'; + * $response = $functionServiceClient->getIamPolicy($resource); + * } finally { + * $functionServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * Sample code: + * ``` + * $functionServiceClient = new FunctionServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $functionServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $functionServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + 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('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->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. + * + * Sample code: + * ``` + * $functionServiceClient = new FunctionServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $functionServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $functionServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @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\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } +} diff --git a/owl-bot-staging/Functions/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Functions/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..9e109ca2916e --- /dev/null +++ b/owl-bot-staging/Functions/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.functions.v2", + "libraryPackage": "Google\\Cloud\\Functions\\V2", + "services": { + "FunctionService": { + "clients": { + "grpc": { + "libraryClient": "FunctionServiceGapicClient", + "rpcs": { + "CreateFunction": { + "methods": [ + "createFunction" + ] + }, + "DeleteFunction": { + "methods": [ + "deleteFunction" + ] + }, + "GenerateDownloadUrl": { + "methods": [ + "generateDownloadUrl" + ] + }, + "GenerateUploadUrl": { + "methods": [ + "generateUploadUrl" + ] + }, + "GetFunction": { + "methods": [ + "getFunction" + ] + }, + "ListFunctions": { + "methods": [ + "listFunctions" + ] + }, + "ListRuntimes": { + "methods": [ + "listRuntimes" + ] + }, + "UpdateFunction": { + "methods": [ + "updateFunction" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Functions/v2/src/V2/resources/function_service_client_config.json b/owl-bot-staging/Functions/v2/src/V2/resources/function_service_client_config.json new file mode 100644 index 000000000000..bfc64e4b21e5 --- /dev/null +++ b/owl-bot-staging/Functions/v2/src/V2/resources/function_service_client_config.json @@ -0,0 +1,82 @@ +{ + "interfaces": { + "google.cloud.functions.v2.FunctionService": { + "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": { + "CreateFunction": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteFunction": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GenerateDownloadUrl": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GenerateUploadUrl": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetFunction": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListFunctions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListRuntimes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateFunction": { + "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" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Functions/v2/src/V2/resources/function_service_descriptor_config.php b/owl-bot-staging/Functions/v2/src/V2/resources/function_service_descriptor_config.php new file mode 100644 index 000000000000..a73efd804546 --- /dev/null +++ b/owl-bot-staging/Functions/v2/src/V2/resources/function_service_descriptor_config.php @@ -0,0 +1,58 @@ + [ + 'google.cloud.functions.v2.FunctionService' => [ + 'CreateFunction' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Functions\V2\PBFunction', + 'metadataReturnType' => '\Google\Cloud\Functions\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteFunction' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Functions\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateFunction' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Functions\V2\PBFunction', + 'metadataReturnType' => '\Google\Cloud\Functions\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListFunctions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFunctions', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Functions/v2/src/V2/resources/function_service_rest_client_config.php b/owl-bot-staging/Functions/v2/src/V2/resources/function_service_rest_client_config.php new file mode 100644 index 000000000000..07539b7883bc --- /dev/null +++ b/owl-bot-staging/Functions/v2/src/V2/resources/function_service_rest_client_config.php @@ -0,0 +1,176 @@ + [ + 'google.cloud.functions.v2.FunctionService' => [ + 'CreateFunction' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/functions', + 'body' => 'function', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteFunction' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/functions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateDownloadUrl' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/functions/*}:generateDownloadUrl', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateUploadUrl' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/functions:generateUploadUrl', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetFunction' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/functions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListFunctions' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/functions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRuntimes' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/runtimes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateFunction' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{function.name=projects/*/locations/*/functions/*}', + 'body' => 'function', + 'placeholders' => [ + 'function.name' => [ + 'getters' => [ + 'getFunction', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/functions/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/functions/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/functions/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + '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/Functions/v2/tests/Unit/V2/FunctionServiceClientTest.php b/owl-bot-staging/Functions/v2/tests/Unit/V2/FunctionServiceClientTest.php new file mode 100644 index 000000000000..5583e58d58f7 --- /dev/null +++ b/owl-bot-staging/Functions/v2/tests/Unit/V2/FunctionServiceClientTest.php @@ -0,0 +1,997 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return FunctionServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new FunctionServiceClient($options); + } + + /** @test */ + public function createFunctionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFunctionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new PBFunction(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createFunctionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $function = new PBFunction(); + $response = $gapicClient->createFunction($formattedParent, $function); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v2.FunctionService/CreateFunction', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getFunction(); + $this->assertProtobufEquals($function, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFunctionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createFunctionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createFunctionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $function = new PBFunction(); + $response = $gapicClient->createFunction($formattedParent, $function); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createFunctionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFunctionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFunctionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteFunctionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + $response = $gapicClient->deleteFunction($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v2.FunctionService/DeleteFunction', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFunctionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFunctionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFunctionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + $response = $gapicClient->deleteFunction($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFunctionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateDownloadUrlTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $downloadUrl = 'downloadUrl1109408056'; + $expectedResponse = new GenerateDownloadUrlResponse(); + $expectedResponse->setDownloadUrl($downloadUrl); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + $response = $gapicClient->generateDownloadUrl($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v2.FunctionService/GenerateDownloadUrl', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateDownloadUrlExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + try { + $gapicClient->generateDownloadUrl($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 generateUploadUrlTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $uploadUrl = 'uploadUrl-242738639'; + $expectedResponse = new GenerateUploadUrlResponse(); + $expectedResponse->setUploadUrl($uploadUrl); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->generateUploadUrl($formattedParent); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v2.FunctionService/GenerateUploadUrl', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateUploadUrlExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->generateUploadUrl($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 getFunctionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new PBFunction(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + $response = $gapicClient->getFunction($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v2.FunctionService/GetFunction', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFunctionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); + try { + $gapicClient->getFunction($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 listFunctionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $functionsElement = new PBFunction(); + $functions = [ + $functionsElement, + ]; + $expectedResponse = new ListFunctionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFunctions($functions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listFunctions($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFunctions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v2.FunctionService/ListFunctions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFunctionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listFunctions($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 listRuntimesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListRuntimesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listRuntimes($formattedParent); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v2.FunctionService/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]'); + try { + $gapicClient->listRuntimes($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 updateFunctionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFunctionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new PBFunction(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateFunctionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $function = new PBFunction(); + $response = $gapicClient->updateFunction($function); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.functions.v2.FunctionService/UpdateFunction', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getFunction(); + $this->assertProtobufEquals($function, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFunctionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateFunctionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFunctionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $function = new PBFunction(); + $response = $gapicClient->updateFunction($function); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFunctionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->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); + $response = $gapicClient->listLocations(); + $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); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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'; + $response = $gapicClient->getIamPolicy($resource); + $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'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $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(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $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 = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->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/GSuiteAddOns/v1/proto/src/GPBMetadata/Google/Cloud/Gsuiteaddons/V1/Gsuiteaddons.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/GPBMetadata/Google/Cloud/Gsuiteaddons/V1/Gsuiteaddons.php new file mode 100644 index 000000000000..2c63a7362f35 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/GPBMetadata/Google/Cloud/Gsuiteaddons/V1/Gsuiteaddons.php @@ -0,0 +1,116 @@ +internalAddGeneratedFile( + ' +ž% +/google/cloud/gsuiteaddons/v1/gsuiteaddons.protogoogle.cloud.gsuiteaddons.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto>google/apps/script/type/calendar/calendar_addon_manifest.proto6google/apps/script/type/docs/docs_addon_manifest.proto8google/apps/script/type/drive/drive_addon_manifest.proto8google/apps/script/type/gmail/gmail_addon_manifest.proto-google/apps/script/type/script_manifest.proto:google/apps/script/type/sheets/sheets_addon_manifest.proto:google/apps/script/type/slides/slides_addon_manifest.protogoogle/protobuf/empty.protogoogle/protobuf/wrappers.proto"Z +GetAuthorizationRequest? +name ( B1àAúA+ +)gsuiteaddons.googleapis.com/Authorization"§ + Authorization +name (  +service_account_email (  +oauth_client_id ( :PêAM +)gsuiteaddons.googleapis.com/Authorization projects/{project}/authorization"½ +CreateDeploymentRequestC +parent ( B3àAúA- ++cloudresourcemanager.googleapis.com/Project + deployment_id ( BàAA + +deployment ( 2(.google.cloud.gsuiteaddons.v1.DeploymentBàA"] +ReplaceDeploymentRequestA + +deployment ( 2(.google.cloud.gsuiteaddons.v1.DeploymentBàA"T +GetDeploymentRequest< +name ( B.àAúA( +&gsuiteaddons.googleapis.com/Deployment"„ +ListDeploymentsRequestC +parent ( B3àAúA- ++cloudresourcemanager.googleapis.com/Project + page_size ( + +page_token ( "q +ListDeploymentsResponse= + deployments ( 2(.google.cloud.gsuiteaddons.v1.Deployment +next_page_token ( "e +DeleteDeploymentRequest< +name ( B.àAúA( +&gsuiteaddons.googleapis.com/Deployment +etag ( "X +InstallDeploymentRequest< +name ( B.àAúA( +&gsuiteaddons.googleapis.com/Deployment"Z +UninstallDeploymentRequest< +name ( B.àAúA( +&gsuiteaddons.googleapis.com/Deployment"Z +GetInstallStatusRequest? +name ( B1àAúA+ +)gsuiteaddons.googleapis.com/InstallStatus"· + InstallStatus +name ( - + installed ( 2.google.protobuf.BoolValue:iêAf +)gsuiteaddons.googleapis.com/InstallStatus9projects/{project}/deployments/{deployment}/installStatus"Ï + +Deployment +name (  + oauth_scopes ( 5 +add_ons ( 2$.google.cloud.gsuiteaddons.v1.AddOns +etag ( :XêAU +&gsuiteaddons.googleapis.com/Deployment+projects/{project}/deployments/{deployment}"š +AddOns< +common ( 2,.google.apps.script.type.CommonAddOnManifest@ +gmail ( 21.google.apps.script.type.gmail.GmailAddOnManifest@ +drive ( 21.google.apps.script.type.drive.DriveAddOnManifestI +calendar ( 27.google.apps.script.type.calendar.CalendarAddOnManifest= +docs ( 2/.google.apps.script.type.docs.DocsAddOnManifestC +sheets ( 23.google.apps.script.type.sheets.SheetsAddOnManifestC +slides + ( 23.google.apps.script.type.slides.SlidesAddOnManifest: + http_options ( 2$.google.apps.script.type.HttpOptions2¤ + GSuiteAddOnsª +GetAuthorization5.google.cloud.gsuiteaddons.v1.GetAuthorizationRequest+.google.cloud.gsuiteaddons.v1.Authorization"2‚Óä“%#/v1/{name=projects/*/authorization}ÚAnameÎ +CreateDeployment5.google.cloud.gsuiteaddons.v1.CreateDeploymentRequest(.google.cloud.gsuiteaddons.v1.Deployment"Y‚Óä“1"#/v1/{parent=projects/*}/deployments: +deploymentÚAparent,deployment,deployment_idÆ +ReplaceDeployment6.google.cloud.gsuiteaddons.v1.ReplaceDeploymentRequest(.google.cloud.gsuiteaddons.v1.Deployment"O‚Óä“<./v1/{deployment.name=projects/*/deployments/*}: +deploymentÚA +deployment¡ + GetDeployment2.google.cloud.gsuiteaddons.v1.GetDeploymentRequest(.google.cloud.gsuiteaddons.v1.Deployment"2‚Óä“%#/v1/{name=projects/*/deployments/*}ÚAname´ +ListDeployments4.google.cloud.gsuiteaddons.v1.ListDeploymentsRequest5.google.cloud.gsuiteaddons.v1.ListDeploymentsResponse"4‚Óä“%#/v1/{parent=projects/*}/deploymentsÚAparent• +DeleteDeployment5.google.cloud.gsuiteaddons.v1.DeleteDeploymentRequest.google.protobuf.Empty"2‚Óä“%*#/v1/{name=projects/*/deployments/*}ÚAname¢ +InstallDeployment6.google.cloud.gsuiteaddons.v1.InstallDeploymentRequest.google.protobuf.Empty"=‚Óä“0"+/v1/{name=projects/*/deployments/*}:install:*ÚAname¨ +UninstallDeployment8.google.cloud.gsuiteaddons.v1.UninstallDeploymentRequest.google.protobuf.Empty"?‚Óä“2"-/v1/{name=projects/*/deployments/*}:uninstall:*ÚAname¸ +GetInstallStatus5.google.cloud.gsuiteaddons.v1.GetInstallStatusRequest+.google.cloud.gsuiteaddons.v1.InstallStatus"@‚Óä“31/v1/{name=projects/*/deployments/*/installStatus}ÚAnameOÊAgsuiteaddons.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBá + com.google.cloud.gsuiteaddons.v1BGSuiteAddOnsProtoPZHgoogle.golang.org/genproto/googleapis/cloud/gsuiteaddons/v1;gsuiteaddonsªGoogle.Cloud.GSuiteAddOns.V1ÊGoogle\\Cloud\\GSuiteAddOns\\V1êGoogle::Cloud::GSuiteAddOns::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/AddOns.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/AddOns.php new file mode 100644 index 000000000000..e03bb68d1fd1 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/AddOns.php @@ -0,0 +1,385 @@ +google.cloud.gsuiteaddons.v1.AddOns + */ +class AddOns extends \Google\Protobuf\Internal\Message +{ + /** + * Configuration that is common across all Google Workspace Add-ons. + * + * Generated from protobuf field .google.apps.script.type.CommonAddOnManifest common = 1; + */ + protected $common = null; + /** + * Gmail add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.gmail.GmailAddOnManifest gmail = 2; + */ + protected $gmail = null; + /** + * Drive add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.drive.DriveAddOnManifest drive = 5; + */ + protected $drive = null; + /** + * Calendar add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.calendar.CalendarAddOnManifest calendar = 6; + */ + protected $calendar = null; + /** + * Docs add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.docs.DocsAddOnManifest docs = 7; + */ + protected $docs = null; + /** + * Sheets add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.sheets.SheetsAddOnManifest sheets = 8; + */ + protected $sheets = null; + /** + * Slides add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.slides.SlidesAddOnManifest slides = 10; + */ + protected $slides = null; + /** + * Options for sending requests to add-on HTTP endpoints + * + * Generated from protobuf field .google.apps.script.type.HttpOptions http_options = 15; + */ + protected $http_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Script\Type\CommonAddOnManifest $common + * Configuration that is common across all Google Workspace Add-ons. + * @type \Google\Apps\Script\Type\Gmail\GmailAddOnManifest $gmail + * Gmail add-on configuration. + * @type \Google\Apps\Script\Type\Drive\DriveAddOnManifest $drive + * Drive add-on configuration. + * @type \Google\Apps\Script\Type\Calendar\CalendarAddOnManifest $calendar + * Calendar add-on configuration. + * @type \Google\Apps\Script\Type\Docs\DocsAddOnManifest $docs + * Docs add-on configuration. + * @type \Google\Apps\Script\Type\Sheets\SheetsAddOnManifest $sheets + * Sheets add-on configuration. + * @type \Google\Apps\Script\Type\Slides\SlidesAddOnManifest $slides + * Slides add-on configuration. + * @type \Google\Apps\Script\Type\HttpOptions $http_options + * Options for sending requests to add-on HTTP endpoints + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); + parent::__construct($data); + } + + /** + * Configuration that is common across all Google Workspace Add-ons. + * + * Generated from protobuf field .google.apps.script.type.CommonAddOnManifest common = 1; + * @return \Google\Apps\Script\Type\CommonAddOnManifest|null + */ + public function getCommon() + { + return $this->common; + } + + public function hasCommon() + { + return isset($this->common); + } + + public function clearCommon() + { + unset($this->common); + } + + /** + * Configuration that is common across all Google Workspace Add-ons. + * + * Generated from protobuf field .google.apps.script.type.CommonAddOnManifest common = 1; + * @param \Google\Apps\Script\Type\CommonAddOnManifest $var + * @return $this + */ + public function setCommon($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Script\Type\CommonAddOnManifest::class); + $this->common = $var; + + return $this; + } + + /** + * Gmail add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.gmail.GmailAddOnManifest gmail = 2; + * @return \Google\Apps\Script\Type\Gmail\GmailAddOnManifest|null + */ + public function getGmail() + { + return $this->gmail; + } + + public function hasGmail() + { + return isset($this->gmail); + } + + public function clearGmail() + { + unset($this->gmail); + } + + /** + * Gmail add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.gmail.GmailAddOnManifest gmail = 2; + * @param \Google\Apps\Script\Type\Gmail\GmailAddOnManifest $var + * @return $this + */ + public function setGmail($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Gmail\GmailAddOnManifest::class); + $this->gmail = $var; + + return $this; + } + + /** + * Drive add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.drive.DriveAddOnManifest drive = 5; + * @return \Google\Apps\Script\Type\Drive\DriveAddOnManifest|null + */ + public function getDrive() + { + return $this->drive; + } + + public function hasDrive() + { + return isset($this->drive); + } + + public function clearDrive() + { + unset($this->drive); + } + + /** + * Drive add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.drive.DriveAddOnManifest drive = 5; + * @param \Google\Apps\Script\Type\Drive\DriveAddOnManifest $var + * @return $this + */ + public function setDrive($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Drive\DriveAddOnManifest::class); + $this->drive = $var; + + return $this; + } + + /** + * Calendar add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.calendar.CalendarAddOnManifest calendar = 6; + * @return \Google\Apps\Script\Type\Calendar\CalendarAddOnManifest|null + */ + public function getCalendar() + { + return $this->calendar; + } + + public function hasCalendar() + { + return isset($this->calendar); + } + + public function clearCalendar() + { + unset($this->calendar); + } + + /** + * Calendar add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.calendar.CalendarAddOnManifest calendar = 6; + * @param \Google\Apps\Script\Type\Calendar\CalendarAddOnManifest $var + * @return $this + */ + public function setCalendar($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Calendar\CalendarAddOnManifest::class); + $this->calendar = $var; + + return $this; + } + + /** + * Docs add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.docs.DocsAddOnManifest docs = 7; + * @return \Google\Apps\Script\Type\Docs\DocsAddOnManifest|null + */ + public function getDocs() + { + return $this->docs; + } + + public function hasDocs() + { + return isset($this->docs); + } + + public function clearDocs() + { + unset($this->docs); + } + + /** + * Docs add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.docs.DocsAddOnManifest docs = 7; + * @param \Google\Apps\Script\Type\Docs\DocsAddOnManifest $var + * @return $this + */ + public function setDocs($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Docs\DocsAddOnManifest::class); + $this->docs = $var; + + return $this; + } + + /** + * Sheets add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.sheets.SheetsAddOnManifest sheets = 8; + * @return \Google\Apps\Script\Type\Sheets\SheetsAddOnManifest|null + */ + public function getSheets() + { + return $this->sheets; + } + + public function hasSheets() + { + return isset($this->sheets); + } + + public function clearSheets() + { + unset($this->sheets); + } + + /** + * Sheets add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.sheets.SheetsAddOnManifest sheets = 8; + * @param \Google\Apps\Script\Type\Sheets\SheetsAddOnManifest $var + * @return $this + */ + public function setSheets($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Sheets\SheetsAddOnManifest::class); + $this->sheets = $var; + + return $this; + } + + /** + * Slides add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.slides.SlidesAddOnManifest slides = 10; + * @return \Google\Apps\Script\Type\Slides\SlidesAddOnManifest|null + */ + public function getSlides() + { + return $this->slides; + } + + public function hasSlides() + { + return isset($this->slides); + } + + public function clearSlides() + { + unset($this->slides); + } + + /** + * Slides add-on configuration. + * + * Generated from protobuf field .google.apps.script.type.slides.SlidesAddOnManifest slides = 10; + * @param \Google\Apps\Script\Type\Slides\SlidesAddOnManifest $var + * @return $this + */ + public function setSlides($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Slides\SlidesAddOnManifest::class); + $this->slides = $var; + + return $this; + } + + /** + * Options for sending requests to add-on HTTP endpoints + * + * Generated from protobuf field .google.apps.script.type.HttpOptions http_options = 15; + * @return \Google\Apps\Script\Type\HttpOptions|null + */ + public function getHttpOptions() + { + return $this->http_options; + } + + public function hasHttpOptions() + { + return isset($this->http_options); + } + + public function clearHttpOptions() + { + unset($this->http_options); + } + + /** + * Options for sending requests to add-on HTTP endpoints + * + * Generated from protobuf field .google.apps.script.type.HttpOptions http_options = 15; + * @param \Google\Apps\Script\Type\HttpOptions $var + * @return $this + */ + public function setHttpOptions($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Script\Type\HttpOptions::class); + $this->http_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Authorization.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Authorization.php new file mode 100644 index 000000000000..904cb85121ea --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Authorization.php @@ -0,0 +1,147 @@ +google.cloud.gsuiteaddons.v1.Authorization + */ +class Authorization extends \Google\Protobuf\Internal\Message +{ + /** + * The canonical full name of this resource. + * Example: `projects/123/authorization` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The email address of the service account used to authenticate requests to + * add-on callback endpoints. + * + * Generated from protobuf field string service_account_email = 2; + */ + protected $service_account_email = ''; + /** + * The OAuth client ID used to obtain OAuth access tokens for a user on the + * add-on's behalf. + * + * Generated from protobuf field string oauth_client_id = 3; + */ + protected $oauth_client_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The canonical full name of this resource. + * Example: `projects/123/authorization` + * @type string $service_account_email + * The email address of the service account used to authenticate requests to + * add-on callback endpoints. + * @type string $oauth_client_id + * The OAuth client ID used to obtain OAuth access tokens for a user on the + * add-on's behalf. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); + parent::__construct($data); + } + + /** + * The canonical full name of this resource. + * Example: `projects/123/authorization` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The canonical full name of this resource. + * Example: `projects/123/authorization` + * + * 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 email address of the service account used to authenticate requests to + * add-on callback endpoints. + * + * Generated from protobuf field string service_account_email = 2; + * @return string + */ + public function getServiceAccountEmail() + { + return $this->service_account_email; + } + + /** + * The email address of the service account used to authenticate requests to + * add-on callback endpoints. + * + * Generated from protobuf field string service_account_email = 2; + * @param string $var + * @return $this + */ + public function setServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->service_account_email = $var; + + return $this; + } + + /** + * The OAuth client ID used to obtain OAuth access tokens for a user on the + * add-on's behalf. + * + * Generated from protobuf field string oauth_client_id = 3; + * @return string + */ + public function getOauthClientId() + { + return $this->oauth_client_id; + } + + /** + * The OAuth client ID used to obtain OAuth access tokens for a user on the + * add-on's behalf. + * + * Generated from protobuf field string oauth_client_id = 3; + * @param string $var + * @return $this + */ + public function setOauthClientId($var) + { + GPBUtil::checkString($var, True); + $this->oauth_client_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/CreateDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/CreateDeploymentRequest.php new file mode 100644 index 000000000000..5dcdd273d80a --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/CreateDeploymentRequest.php @@ -0,0 +1,153 @@ +google.cloud.gsuiteaddons.v1.CreateDeploymentRequest + */ +class CreateDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the project in which to create the deployment. + * Example: `projects/my_project`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The id to use for this deployment. The full name of the created + * resource will be `projects//deployments/`. + * + * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $deployment_id = ''; + /** + * Required. The deployment to create (deployment.name cannot be set). + * + * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $deployment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the project in which to create the deployment. + * Example: `projects/my_project`. + * @type string $deployment_id + * Required. The id to use for this deployment. The full name of the created + * resource will be `projects//deployments/`. + * @type \Google\Cloud\GSuiteAddOns\V1\Deployment $deployment + * Required. The deployment to create (deployment.name cannot be set). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the project in which to create the deployment. + * Example: `projects/my_project`. + * + * Generated 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 project in which to create the deployment. + * Example: `projects/my_project`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 this deployment. The full name of the created + * resource will be `projects//deployments/`. + * + * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDeploymentId() + { + return $this->deployment_id; + } + + /** + * Required. The id to use for this deployment. The full name of the created + * resource will be `projects//deployments/`. + * + * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDeploymentId($var) + { + GPBUtil::checkString($var, True); + $this->deployment_id = $var; + + return $this; + } + + /** + * Required. The deployment to create (deployment.name cannot be set). + * + * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GSuiteAddOns\V1\Deployment|null + */ + public function getDeployment() + { + return $this->deployment; + } + + public function hasDeployment() + { + return isset($this->deployment); + } + + public function clearDeployment() + { + unset($this->deployment); + } + + /** + * Required. The deployment to create (deployment.name cannot be set). + * + * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GSuiteAddOns\V1\Deployment $var + * @return $this + */ + public function setDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GSuiteAddOns\V1\Deployment::class); + $this->deployment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/DeleteDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/DeleteDeploymentRequest.php new file mode 100644 index 000000000000..bd45cf7ec24a --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/DeleteDeploymentRequest.php @@ -0,0 +1,109 @@ +google.cloud.gsuiteaddons.v1.DeleteDeploymentRequest + */ +class DeleteDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the deployment to delete. + * Example: `projects/my_project/deployments/my_deployment`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The etag of the deployment to delete. + * If this is provided, it must match the server's etag. + * + * Generated from protobuf field string etag = 2; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full resource name of the deployment to delete. + * Example: `projects/my_project/deployments/my_deployment`. + * @type string $etag + * The etag of the deployment to delete. + * If this is provided, it must match the server's etag. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the deployment to delete. + * Example: `projects/my_project/deployments/my_deployment`. + * + * Generated 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 full resource name of the deployment to delete. + * Example: `projects/my_project/deployments/my_deployment`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 etag of the deployment to delete. + * If this is provided, it must match the server's etag. + * + * Generated from protobuf field string etag = 2; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The etag of the deployment to delete. + * If this is provided, it must match the server's etag. + * + * Generated from protobuf field string etag = 2; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Deployment.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Deployment.php new file mode 100644 index 000000000000..4eb8c8fefa1d --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Deployment.php @@ -0,0 +1,195 @@ +google.cloud.gsuiteaddons.v1.Deployment + */ +class Deployment extends \Google\Protobuf\Internal\Message +{ + /** + * The deployment resource name. + * Example: projects/123/deployments/my_deployment. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The list of Google OAuth scopes for which to request consent from the end + * user before executing an add-on endpoint. + * + * Generated from protobuf field repeated string oauth_scopes = 2; + */ + private $oauth_scopes; + /** + * The Google Workspace Add-on configuration. + * + * Generated from protobuf field .google.cloud.gsuiteaddons.v1.AddOns add_ons = 3; + */ + protected $add_ons = null; + /** + * This value is computed by the server based on the version of the + * deployment in storage, 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; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The deployment resource name. + * Example: projects/123/deployments/my_deployment. + * @type array|\Google\Protobuf\Internal\RepeatedField $oauth_scopes + * The list of Google OAuth scopes for which to request consent from the end + * user before executing an add-on endpoint. + * @type \Google\Cloud\GSuiteAddOns\V1\AddOns $add_ons + * The Google Workspace Add-on configuration. + * @type string $etag + * This value is computed by the server based on the version of the + * deployment in storage, 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\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); + parent::__construct($data); + } + + /** + * The deployment resource name. + * Example: projects/123/deployments/my_deployment. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The deployment resource name. + * Example: projects/123/deployments/my_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; + } + + /** + * The list of Google OAuth scopes for which to request consent from the end + * user before executing an add-on endpoint. + * + * Generated from protobuf field repeated string oauth_scopes = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOauthScopes() + { + return $this->oauth_scopes; + } + + /** + * The list of Google OAuth scopes for which to request consent from the end + * user before executing an add-on endpoint. + * + * Generated from protobuf field repeated string oauth_scopes = 2; + * @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; + } + + /** + * The Google Workspace Add-on configuration. + * + * Generated from protobuf field .google.cloud.gsuiteaddons.v1.AddOns add_ons = 3; + * @return \Google\Cloud\GSuiteAddOns\V1\AddOns|null + */ + public function getAddOns() + { + return $this->add_ons; + } + + public function hasAddOns() + { + return isset($this->add_ons); + } + + public function clearAddOns() + { + unset($this->add_ons); + } + + /** + * The Google Workspace Add-on configuration. + * + * Generated from protobuf field .google.cloud.gsuiteaddons.v1.AddOns add_ons = 3; + * @param \Google\Cloud\GSuiteAddOns\V1\AddOns $var + * @return $this + */ + public function setAddOns($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GSuiteAddOns\V1\AddOns::class); + $this->add_ons = $var; + + return $this; + } + + /** + * This value is computed by the server based on the version of the + * deployment in storage, 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; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This value is computed by the server based on the version of the + * deployment in storage, 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; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GSuiteAddOnsGrpcClient.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GSuiteAddOnsGrpcClient.php new file mode 100644 index 000000000000..49592e751e79 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GSuiteAddOnsGrpcClient.php @@ -0,0 +1,201 @@ +_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/GetAuthorization', + $argument, + ['\Google\Cloud\GSuiteAddOns\V1\Authorization', 'decode'], + $metadata, $options); + } + + /** + * Creates a deployment with the specified name and configuration. + * @param \Google\Cloud\GSuiteAddOns\V1\CreateDeploymentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateDeployment(\Google\Cloud\GSuiteAddOns\V1\CreateDeploymentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/CreateDeployment', + $argument, + ['\Google\Cloud\GSuiteAddOns\V1\Deployment', 'decode'], + $metadata, $options); + } + + /** + * Creates or replaces a deployment with the specified name. + * @param \Google\Cloud\GSuiteAddOns\V1\ReplaceDeploymentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ReplaceDeployment(\Google\Cloud\GSuiteAddOns\V1\ReplaceDeploymentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/ReplaceDeployment', + $argument, + ['\Google\Cloud\GSuiteAddOns\V1\Deployment', 'decode'], + $metadata, $options); + } + + /** + * Gets the deployment with the specified name. + * @param \Google\Cloud\GSuiteAddOns\V1\GetDeploymentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetDeployment(\Google\Cloud\GSuiteAddOns\V1\GetDeploymentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/GetDeployment', + $argument, + ['\Google\Cloud\GSuiteAddOns\V1\Deployment', 'decode'], + $metadata, $options); + } + + /** + * Lists all deployments in a particular project. + * @param \Google\Cloud\GSuiteAddOns\V1\ListDeploymentsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListDeployments(\Google\Cloud\GSuiteAddOns\V1\ListDeploymentsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/ListDeployments', + $argument, + ['\Google\Cloud\GSuiteAddOns\V1\ListDeploymentsResponse', 'decode'], + $metadata, $options); + } + + /** + * Deletes the deployment with the given name. + * @param \Google\Cloud\GSuiteAddOns\V1\DeleteDeploymentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteDeployment(\Google\Cloud\GSuiteAddOns\V1\DeleteDeploymentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/DeleteDeployment', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Installs a deployment in developer mode. + * See: + * https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons. + * @param \Google\Cloud\GSuiteAddOns\V1\InstallDeploymentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function InstallDeployment(\Google\Cloud\GSuiteAddOns\V1\InstallDeploymentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/InstallDeployment', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Uninstalls a developer mode deployment. + * See: + * https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons. + * @param \Google\Cloud\GSuiteAddOns\V1\UninstallDeploymentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UninstallDeployment(\Google\Cloud\GSuiteAddOns\V1\UninstallDeploymentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/UninstallDeployment', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Fetches the install status of a developer mode deployment. + * @param \Google\Cloud\GSuiteAddOns\V1\GetInstallStatusRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetInstallStatus(\Google\Cloud\GSuiteAddOns\V1\GetInstallStatusRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/GetInstallStatus', + $argument, + ['\Google\Cloud\GSuiteAddOns\V1\InstallStatus', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetAuthorizationRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetAuthorizationRequest.php new file mode 100644 index 000000000000..5d97c9470fa7 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetAuthorizationRequest.php @@ -0,0 +1,75 @@ +google.cloud.gsuiteaddons.v1.GetAuthorizationRequest + */ +class GetAuthorizationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the project for which to get the Google Workspace Add-ons + * authorization information. + * Example: `projects/my_project/authorization`. + * + * Generated from protobuf field string name = 2 [(.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 project for which to get the Google Workspace Add-ons + * authorization information. + * Example: `projects/my_project/authorization`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the project for which to get the Google Workspace Add-ons + * authorization information. + * Example: `projects/my_project/authorization`. + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the project for which to get the Google Workspace Add-ons + * authorization information. + * Example: `projects/my_project/authorization`. + * + * Generated from protobuf field string name = 2 [(.google.api.field_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/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetDeploymentRequest.php new file mode 100644 index 000000000000..0ac235205729 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetDeploymentRequest.php @@ -0,0 +1,71 @@ +google.cloud.gsuiteaddons.v1.GetDeploymentRequest + */ +class GetDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the deployment to get. + * Example: `projects/my_project/deployments/my_deployment`. + * + * 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 full resource name of the deployment to get. + * Example: `projects/my_project/deployments/my_deployment`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the deployment to get. + * Example: `projects/my_project/deployments/my_deployment`. + * + * Generated 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 full resource name of the deployment to get. + * Example: `projects/my_project/deployments/my_deployment`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetInstallStatusRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetInstallStatusRequest.php new file mode 100644 index 000000000000..d1821b4cbb93 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetInstallStatusRequest.php @@ -0,0 +1,71 @@ +google.cloud.gsuiteaddons.v1.GetInstallStatusRequest + */ +class GetInstallStatusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the deployment. + * Example: `projects/my_project/deployments/my_deployment/installStatus`. + * + * 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 full resource name of the deployment. + * Example: `projects/my_project/deployments/my_deployment/installStatus`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the deployment. + * Example: `projects/my_project/deployments/my_deployment/installStatus`. + * + * Generated 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 full resource name of the deployment. + * Example: `projects/my_project/deployments/my_deployment/installStatus`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallDeploymentRequest.php new file mode 100644 index 000000000000..357413474442 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallDeploymentRequest.php @@ -0,0 +1,71 @@ +google.cloud.gsuiteaddons.v1.InstallDeploymentRequest + */ +class InstallDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the deployment to install. + * Example: `projects/my_project/deployments/my_deployment`. + * + * 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 full resource name of the deployment to install. + * Example: `projects/my_project/deployments/my_deployment`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the deployment to install. + * Example: `projects/my_project/deployments/my_deployment`. + * + * Generated 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 full resource name of the deployment to install. + * Example: `projects/my_project/deployments/my_deployment`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallStatus.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallStatus.php new file mode 100644 index 000000000000..d3636bd3028c --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallStatus.php @@ -0,0 +1,142 @@ +google.cloud.gsuiteaddons.v1.InstallStatus + */ +class InstallStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The canonical full resource name of the deployment install status. + * Example: `projects/123/deployments/my_deployment/installStatus`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * True if the deployment is installed for the user + * + * Generated from protobuf field .google.protobuf.BoolValue installed = 2; + */ + protected $installed = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The canonical full resource name of the deployment install status. + * Example: `projects/123/deployments/my_deployment/installStatus`. + * @type \Google\Protobuf\BoolValue $installed + * True if the deployment is installed for the user + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); + parent::__construct($data); + } + + /** + * The canonical full resource name of the deployment install status. + * Example: `projects/123/deployments/my_deployment/installStatus`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The canonical full resource name of the deployment install status. + * Example: `projects/123/deployments/my_deployment/installStatus`. + * + * 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; + } + + /** + * True if the deployment is installed for the user + * + * Generated from protobuf field .google.protobuf.BoolValue installed = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getInstalled() + { + return $this->installed; + } + + public function hasInstalled() + { + return isset($this->installed); + } + + public function clearInstalled() + { + unset($this->installed); + } + + /** + * Returns the unboxed value from getInstalled() + + * True if the deployment is installed for the user + * + * Generated from protobuf field .google.protobuf.BoolValue installed = 2; + * @return bool|null + */ + public function getInstalledUnwrapped() + { + return $this->readWrapperValue("installed"); + } + + /** + * True if the deployment is installed for the user + * + * Generated from protobuf field .google.protobuf.BoolValue installed = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setInstalled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->installed = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * True if the deployment is installed for the user + * + * Generated from protobuf field .google.protobuf.BoolValue installed = 2; + * @param bool|null $var + * @return $this + */ + public function setInstalledUnwrapped($var) + { + $this->writeWrapperValue("installed", $var); + return $this;} + +} + diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsRequest.php new file mode 100644 index 000000000000..3f57c4a53c3f --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsRequest.php @@ -0,0 +1,163 @@ +google.cloud.gsuiteaddons.v1.ListDeploymentsRequest + */ +class ListDeploymentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the project in which to create the deployment. + * Example: `projects/my_project`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of deployments to return. The service may return fewer + * than this value. + * If unspecified, at most 1000 deployments 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 `ListDeployments` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeployments` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the project in which to create the deployment. + * Example: `projects/my_project`. + * @type int $page_size + * The maximum number of deployments to return. The service may return fewer + * than this value. + * If unspecified, at most 1000 deployments 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 `ListDeployments` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeployments` must + * match the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the project in which to create the deployment. + * Example: `projects/my_project`. + * + * Generated 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 project in which to create the deployment. + * Example: `projects/my_project`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 deployments to return. The service may return fewer + * than this value. + * If unspecified, at most 1000 deployments 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 deployments to return. The service may return fewer + * than this value. + * If unspecified, at most 1000 deployments 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 `ListDeployments` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeployments` 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 `ListDeployments` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeployments` 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; + } + +} + diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsResponse.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsResponse.php new file mode 100644 index 000000000000..4a2b06a63091 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsResponse.php @@ -0,0 +1,105 @@ +google.cloud.gsuiteaddons.v1.ListDeploymentsResponse + */ +class ListDeploymentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of deployments for the given project. + * + * Generated from protobuf field repeated .google.cloud.gsuiteaddons.v1.Deployment deployments = 1; + */ + private $deployments; + /** + * A token, which 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 = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GSuiteAddOns\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $deployments + * The list of deployments for the given project. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); + parent::__construct($data); + } + + /** + * The list of deployments for the given project. + * + * Generated from protobuf field repeated .google.cloud.gsuiteaddons.v1.Deployment deployments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeployments() + { + return $this->deployments; + } + + /** + * The list of deployments for the given project. + * + * Generated from protobuf field repeated .google.cloud.gsuiteaddons.v1.Deployment deployments = 1; + * @param array<\Google\Cloud\GSuiteAddOns\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GSuiteAddOns\V1\Deployment::class); + $this->deployments = $arr; + + return $this; + } + + /** + * A token, which 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, which 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; + } + +} + diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ReplaceDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ReplaceDeploymentRequest.php new file mode 100644 index 000000000000..d882de2fdaee --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ReplaceDeploymentRequest.php @@ -0,0 +1,77 @@ +google.cloud.gsuiteaddons.v1.ReplaceDeploymentRequest + */ +class ReplaceDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The deployment to create or replace. + * + * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $deployment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GSuiteAddOns\V1\Deployment $deployment + * Required. The deployment to create or replace. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); + parent::__construct($data); + } + + /** + * Required. The deployment to create or replace. + * + * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GSuiteAddOns\V1\Deployment|null + */ + public function getDeployment() + { + return $this->deployment; + } + + public function hasDeployment() + { + return isset($this->deployment); + } + + public function clearDeployment() + { + unset($this->deployment); + } + + /** + * Required. The deployment to create or replace. + * + * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GSuiteAddOns\V1\Deployment $var + * @return $this + */ + public function setDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GSuiteAddOns\V1\Deployment::class); + $this->deployment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/UninstallDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/UninstallDeploymentRequest.php new file mode 100644 index 000000000000..1245770faf7f --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/UninstallDeploymentRequest.php @@ -0,0 +1,71 @@ +google.cloud.gsuiteaddons.v1.UninstallDeploymentRequest + */ +class UninstallDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the deployment to install. + * Example: `projects/my_project/deployments/my_deployment`. + * + * 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 full resource name of the deployment to install. + * Example: `projects/my_project/deployments/my_deployment`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the deployment to install. + * Example: `projects/my_project/deployments/my_deployment`. + * + * Generated 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 full resource name of the deployment to install. + * Example: `projects/my_project/deployments/my_deployment`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/create_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/create_deployment.php new file mode 100644 index 000000000000..f2adc0c41f3d --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/create_deployment.php @@ -0,0 +1,74 @@ +/deployments/`. + */ +function create_deployment_sample(string $formattedParent, string $deploymentId): void +{ + // Create a client. + $gSuiteAddOnsClient = new GSuiteAddOnsClient(); + + // Prepare any non-scalar elements to be passed along with the request. + $deployment = new Deployment(); + + // Call the API and handle any network failures. + try { + /** @var Deployment $response */ + $response = $gSuiteAddOnsClient->createDeployment($formattedParent, $deploymentId, $deployment); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GSuiteAddOnsClient::projectName('[PROJECT]'); + $deploymentId = '[DEPLOYMENT_ID]'; + + create_deployment_sample($formattedParent, $deploymentId); +} +// [END gsuiteaddons_v1_generated_GSuiteAddOns_CreateDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/delete_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/delete_deployment.php new file mode 100644 index 000000000000..ba4dd15cf4f2 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/delete_deployment.php @@ -0,0 +1,66 @@ +deleteDeployment($formattedName); + 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 = GSuiteAddOnsClient::deploymentName('[PROJECT]', '[DEPLOYMENT]'); + + delete_deployment_sample($formattedName); +} +// [END gsuiteaddons_v1_generated_GSuiteAddOns_DeleteDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_authorization.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_authorization.php new file mode 100644 index 000000000000..5b1bbd12a79b --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_authorization.php @@ -0,0 +1,69 @@ +getAuthorization($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GSuiteAddOnsClient::authorizationName('[PROJECT]'); + + get_authorization_sample($formattedName); +} +// [END gsuiteaddons_v1_generated_GSuiteAddOns_GetAuthorization_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_deployment.php new file mode 100644 index 000000000000..6372bbb3ed1b --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_deployment.php @@ -0,0 +1,68 @@ +getDeployment($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GSuiteAddOnsClient::deploymentName('[PROJECT]', '[DEPLOYMENT]'); + + get_deployment_sample($formattedName); +} +// [END gsuiteaddons_v1_generated_GSuiteAddOns_GetDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_install_status.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_install_status.php new file mode 100644 index 000000000000..56b1b64fb3c4 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_install_status.php @@ -0,0 +1,68 @@ +getInstallStatus($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GSuiteAddOnsClient::installStatusName('[PROJECT]', '[DEPLOYMENT]'); + + get_install_status_sample($formattedName); +} +// [END gsuiteaddons_v1_generated_GSuiteAddOns_GetInstallStatus_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/install_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/install_deployment.php new file mode 100644 index 000000000000..d3aa7a62c546 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/install_deployment.php @@ -0,0 +1,68 @@ +installDeployment($formattedName); + 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 = GSuiteAddOnsClient::deploymentName('[PROJECT]', '[DEPLOYMENT]'); + + install_deployment_sample($formattedName); +} +// [END gsuiteaddons_v1_generated_GSuiteAddOns_InstallDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/list_deployments.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/list_deployments.php new file mode 100644 index 000000000000..7e14f45199b8 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/list_deployments.php @@ -0,0 +1,73 @@ +listDeployments($formattedParent); + + /** @var Deployment $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 = GSuiteAddOnsClient::projectName('[PROJECT]'); + + list_deployments_sample($formattedParent); +} +// [END gsuiteaddons_v1_generated_GSuiteAddOns_ListDeployments_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/replace_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/replace_deployment.php new file mode 100644 index 000000000000..936118667ee3 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/replace_deployment.php @@ -0,0 +1,56 @@ +replaceDeployment($deployment); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END gsuiteaddons_v1_generated_GSuiteAddOns_ReplaceDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/uninstall_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/uninstall_deployment.php new file mode 100644 index 000000000000..6ce7ea0c67b3 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/uninstall_deployment.php @@ -0,0 +1,68 @@ +uninstallDeployment($formattedName); + 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 = GSuiteAddOnsClient::deploymentName('[PROJECT]', '[DEPLOYMENT]'); + + uninstall_deployment_sample($formattedName); +} +// [END gsuiteaddons_v1_generated_GSuiteAddOns_UninstallDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/src/V1/GSuiteAddOnsClient.php b/owl-bot-staging/GSuiteAddOns/v1/src/V1/GSuiteAddOnsClient.php new file mode 100644 index 000000000000..6d79879fbeec --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/src/V1/GSuiteAddOnsClient.php @@ -0,0 +1,34 @@ +projectName('[PROJECT]'); + * $deploymentId = 'deployment_id'; + * $deployment = new Deployment(); + * $response = $gSuiteAddOnsClient->createDeployment($formattedParent, $deploymentId, $deployment); + * } finally { + * $gSuiteAddOnsClient->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. + */ +class GSuiteAddOnsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.gsuiteaddons.v1.GSuiteAddOns'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'gsuiteaddons.googleapis.com'; + + /** 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 $authorizationNameTemplate; + + private static $deploymentNameTemplate; + + private static $installStatusNameTemplate; + + private static $projectNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/g_suite_add_ons_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/g_suite_add_ons_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/g_suite_add_ons_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/g_suite_add_ons_rest_client_config.php', + ], + ], + ]; + } + + private static function getAuthorizationNameTemplate() + { + if (self::$authorizationNameTemplate == null) { + self::$authorizationNameTemplate = new PathTemplate('projects/{project}/authorization'); + } + + return self::$authorizationNameTemplate; + } + + private static function getDeploymentNameTemplate() + { + if (self::$deploymentNameTemplate == null) { + self::$deploymentNameTemplate = new PathTemplate('projects/{project}/deployments/{deployment}'); + } + + return self::$deploymentNameTemplate; + } + + private static function getInstallStatusNameTemplate() + { + if (self::$installStatusNameTemplate == null) { + self::$installStatusNameTemplate = new PathTemplate('projects/{project}/deployments/{deployment}/installStatus'); + } + + return self::$installStatusNameTemplate; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'authorization' => self::getAuthorizationNameTemplate(), + 'deployment' => self::getDeploymentNameTemplate(), + 'installStatus' => self::getInstallStatusNameTemplate(), + 'project' => self::getProjectNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * authorization resource. + * + * @param string $project + * + * @return string The formatted authorization resource. + */ + public static function authorizationName($project) + { + return self::getAuthorizationNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a deployment + * resource. + * + * @param string $project + * @param string $deployment + * + * @return string The formatted deployment resource. + */ + public static function deploymentName($project, $deployment) + { + return self::getDeploymentNameTemplate()->render([ + 'project' => $project, + 'deployment' => $deployment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * install_status resource. + * + * @param string $project + * @param string $deployment + * + * @return string The formatted install_status resource. + */ + public static function installStatusName($project, $deployment) + { + return self::getInstallStatusNameTemplate()->render([ + 'project' => $project, + 'deployment' => $deployment, + ]); + } + + /** + * 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, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - authorization: projects/{project}/authorization + * - deployment: projects/{project}/deployments/{deployment} + * - installStatus: projects/{project}/deployments/{deployment}/installStatus + * - 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($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 'gsuiteaddons.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 deployment with the specified name and configuration. + * + * Sample code: + * ``` + * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); + * try { + * $formattedParent = $gSuiteAddOnsClient->projectName('[PROJECT]'); + * $deploymentId = 'deployment_id'; + * $deployment = new Deployment(); + * $response = $gSuiteAddOnsClient->createDeployment($formattedParent, $deploymentId, $deployment); + * } finally { + * $gSuiteAddOnsClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the project in which to create the deployment. + * + * Example: `projects/my_project`. + * @param string $deploymentId Required. The id to use for this deployment. The full name of the created + * resource will be `projects//deployments/`. + * @param Deployment $deployment Required. The deployment to create (deployment.name cannot be set). + * @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\GSuiteAddOns\V1\Deployment + * + * @throws ApiException if the remote call fails + */ + public function createDeployment($parent, $deploymentId, $deployment, array $optionalArgs = []) + { + $request = new CreateDeploymentRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setDeploymentId($deploymentId); + $request->setDeployment($deployment); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateDeployment', Deployment::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes the deployment with the given name. + * + * Sample code: + * ``` + * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); + * try { + * $formattedName = $gSuiteAddOnsClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); + * $gSuiteAddOnsClient->deleteDeployment($formattedName); + * } finally { + * $gSuiteAddOnsClient->close(); + * } + * ``` + * + * @param string $name Required. The full resource name of the deployment to delete. + * + * Example: `projects/my_project/deployments/my_deployment`. + * @param array $optionalArgs { + * Optional. + * + * @type string $etag + * The etag of the deployment to delete. + * If this is provided, it must match the server's etag. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteDeployment($name, array $optionalArgs = []) + { + $request = new DeleteDeploymentRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteDeployment', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the authorization information for deployments in a given project. + * + * Sample code: + * ``` + * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); + * try { + * $formattedName = $gSuiteAddOnsClient->authorizationName('[PROJECT]'); + * $response = $gSuiteAddOnsClient->getAuthorization($formattedName); + * } finally { + * $gSuiteAddOnsClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the project for which to get the Google Workspace Add-ons + * authorization information. + * + * Example: `projects/my_project/authorization`. + * @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\GSuiteAddOns\V1\Authorization + * + * @throws ApiException if the remote call fails + */ + public function getAuthorization($name, array $optionalArgs = []) + { + $request = new GetAuthorizationRequest(); + $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('GetAuthorization', Authorization::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the deployment with the specified name. + * + * Sample code: + * ``` + * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); + * try { + * $formattedName = $gSuiteAddOnsClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); + * $response = $gSuiteAddOnsClient->getDeployment($formattedName); + * } finally { + * $gSuiteAddOnsClient->close(); + * } + * ``` + * + * @param string $name Required. The full resource name of the deployment to get. + * + * Example: `projects/my_project/deployments/my_deployment`. + * @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\GSuiteAddOns\V1\Deployment + * + * @throws ApiException if the remote call fails + */ + public function getDeployment($name, array $optionalArgs = []) + { + $request = new GetDeploymentRequest(); + $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('GetDeployment', Deployment::class, $optionalArgs, $request)->wait(); + } + + /** + * Fetches the install status of a developer mode deployment. + * + * Sample code: + * ``` + * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); + * try { + * $formattedName = $gSuiteAddOnsClient->installStatusName('[PROJECT]', '[DEPLOYMENT]'); + * $response = $gSuiteAddOnsClient->getInstallStatus($formattedName); + * } finally { + * $gSuiteAddOnsClient->close(); + * } + * ``` + * + * @param string $name Required. The full resource name of the deployment. + * + * Example: `projects/my_project/deployments/my_deployment/installStatus`. + * @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\GSuiteAddOns\V1\InstallStatus + * + * @throws ApiException if the remote call fails + */ + public function getInstallStatus($name, array $optionalArgs = []) + { + $request = new GetInstallStatusRequest(); + $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('GetInstallStatus', InstallStatus::class, $optionalArgs, $request)->wait(); + } + + /** + * Installs a deployment in developer mode. + * See: + * https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons. + * + * Sample code: + * ``` + * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); + * try { + * $formattedName = $gSuiteAddOnsClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); + * $gSuiteAddOnsClient->installDeployment($formattedName); + * } finally { + * $gSuiteAddOnsClient->close(); + * } + * ``` + * + * @param string $name Required. The full resource name of the deployment to install. + * + * Example: `projects/my_project/deployments/my_deployment`. + * @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 installDeployment($name, array $optionalArgs = []) + { + $request = new InstallDeploymentRequest(); + $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('InstallDeployment', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists all deployments in a particular project. + * + * Sample code: + * ``` + * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); + * try { + * $formattedParent = $gSuiteAddOnsClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $gSuiteAddOnsClient->listDeployments($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $gSuiteAddOnsClient->listDeployments($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $gSuiteAddOnsClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the project in which to create the deployment. + * + * Example: `projects/my_project`. + * @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 listDeployments($parent, array $optionalArgs = []) + { + $request = new ListDeploymentsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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('ListDeployments', $optionalArgs, ListDeploymentsResponse::class, $request); + } + + /** + * Creates or replaces a deployment with the specified name. + * + * Sample code: + * ``` + * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); + * try { + * $deployment = new Deployment(); + * $response = $gSuiteAddOnsClient->replaceDeployment($deployment); + * } finally { + * $gSuiteAddOnsClient->close(); + * } + * ``` + * + * @param Deployment $deployment Required. The deployment to create or replace. + * @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\GSuiteAddOns\V1\Deployment + * + * @throws ApiException if the remote call fails + */ + public function replaceDeployment($deployment, array $optionalArgs = []) + { + $request = new ReplaceDeploymentRequest(); + $requestParamHeaders = []; + $request->setDeployment($deployment); + $requestParamHeaders['deployment.name'] = $deployment->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ReplaceDeployment', Deployment::class, $optionalArgs, $request)->wait(); + } + + /** + * Uninstalls a developer mode deployment. + * See: + * https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons. + * + * Sample code: + * ``` + * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); + * try { + * $formattedName = $gSuiteAddOnsClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); + * $gSuiteAddOnsClient->uninstallDeployment($formattedName); + * } finally { + * $gSuiteAddOnsClient->close(); + * } + * ``` + * + * @param string $name Required. The full resource name of the deployment to install. + * + * Example: `projects/my_project/deployments/my_deployment`. + * @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 uninstallDeployment($name, array $optionalArgs = []) + { + $request = new UninstallDeploymentRequest(); + $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('UninstallDeployment', GPBEmpty::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/GSuiteAddOns/v1/src/V1/gapic_metadata.json b/owl-bot-staging/GSuiteAddOns/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..7e5b8ce080e6 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/src/V1/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.gsuiteaddons.v1", + "libraryPackage": "Google\\Cloud\\GSuiteAddOns\\V1", + "services": { + "GSuiteAddOns": { + "clients": { + "grpc": { + "libraryClient": "GSuiteAddOnsGapicClient", + "rpcs": { + "CreateDeployment": { + "methods": [ + "createDeployment" + ] + }, + "DeleteDeployment": { + "methods": [ + "deleteDeployment" + ] + }, + "GetAuthorization": { + "methods": [ + "getAuthorization" + ] + }, + "GetDeployment": { + "methods": [ + "getDeployment" + ] + }, + "GetInstallStatus": { + "methods": [ + "getInstallStatus" + ] + }, + "InstallDeployment": { + "methods": [ + "installDeployment" + ] + }, + "ListDeployments": { + "methods": [ + "listDeployments" + ] + }, + "ReplaceDeployment": { + "methods": [ + "replaceDeployment" + ] + }, + "UninstallDeployment": { + "methods": [ + "uninstallDeployment" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_client_config.json b/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_client_config.json new file mode 100644 index 000000000000..72ccdb04dcea --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_client_config.json @@ -0,0 +1,100 @@ +{ + "interfaces": { + "google.cloud.gsuiteaddons.v1.GSuiteAddOns": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "UNKNOWN" + ], + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 10000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 10000, + "total_timeout_millis": 10000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 10000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 10000, + "total_timeout_millis": 10000 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000 + } + }, + "methods": { + "CreateDeployment": { + "timeout_millis": 10000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteDeployment": { + "timeout_millis": 10000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetAuthorization": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "GetDeployment": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetInstallStatus": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "InstallDeployment": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDeployments": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ReplaceDeployment": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UninstallDeployment": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_descriptor_config.php b/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_descriptor_config.php new file mode 100644 index 000000000000..1060fd869fce --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_descriptor_config.php @@ -0,0 +1,18 @@ + [ + 'google.cloud.gsuiteaddons.v1.GSuiteAddOns' => [ + 'ListDeployments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDeployments', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_rest_client_config.php b/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_rest_client_config.php new file mode 100644 index 000000000000..38e022bdead8 --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_rest_client_config.php @@ -0,0 +1,116 @@ + [ + 'google.cloud.gsuiteaddons.v1.GSuiteAddOns' => [ + 'CreateDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/deployments', + 'body' => 'deployment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'deployment_id', + ], + ], + 'DeleteDeployment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/deployments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAuthorization' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/authorization}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDeployment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/deployments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInstallStatus' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/deployments/*/installStatus}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'InstallDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/deployments/*}:install', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDeployments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/deployments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ReplaceDeployment' => [ + 'method' => 'put', + 'uriTemplate' => '/v1/{deployment.name=projects/*/deployments/*}', + 'body' => 'deployment', + 'placeholders' => [ + 'deployment.name' => [ + 'getters' => [ + 'getDeployment', + 'getName', + ], + ], + ], + ], + 'UninstallDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/deployments/*}:uninstall', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/GSuiteAddOns/v1/tests/Unit/V1/GSuiteAddOnsClientTest.php b/owl-bot-staging/GSuiteAddOns/v1/tests/Unit/V1/GSuiteAddOnsClientTest.php new file mode 100644 index 000000000000..4041c03a9c5d --- /dev/null +++ b/owl-bot-staging/GSuiteAddOns/v1/tests/Unit/V1/GSuiteAddOnsClientTest.php @@ -0,0 +1,622 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return GSuiteAddOnsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new GSuiteAddOnsClient($options); + } + + /** @test */ + public function createDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $etag = 'etag3123477'; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $deploymentId = 'deploymentId51250389'; + $deployment = new Deployment(); + $response = $gapicClient->createDeployment($formattedParent, $deploymentId, $deployment); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/CreateDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDeploymentId(); + $this->assertProtobufEquals($deploymentId, $actualValue); + $actualValue = $actualRequestObject->getDeployment(); + $this->assertProtobufEquals($deployment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $deploymentId = 'deploymentId51250389'; + $deployment = new Deployment(); + try { + $gapicClient->createDeployment($formattedParent, $deploymentId, $deployment); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); + $gapicClient->deleteDeployment($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/DeleteDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); + try { + $gapicClient->deleteDeployment($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 getAuthorizationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $serviceAccountEmail = 'serviceAccountEmail-1300473088'; + $oauthClientId = 'oauthClientId-1137123737'; + $expectedResponse = new Authorization(); + $expectedResponse->setName($name2); + $expectedResponse->setServiceAccountEmail($serviceAccountEmail); + $expectedResponse->setOauthClientId($oauthClientId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->authorizationName('[PROJECT]'); + $response = $gapicClient->getAuthorization($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/GetAuthorization', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuthorizationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->authorizationName('[PROJECT]'); + try { + $gapicClient->getAuthorization($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 getDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $etag = 'etag3123477'; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name2); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); + $response = $gapicClient->getDeployment($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/GetDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); + try { + $gapicClient->getDeployment($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 getInstallStatusTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new InstallStatus(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->installStatusName('[PROJECT]', '[DEPLOYMENT]'); + $response = $gapicClient->getInstallStatus($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/GetInstallStatus', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstallStatusExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->installStatusName('[PROJECT]', '[DEPLOYMENT]'); + try { + $gapicClient->getInstallStatus($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 installDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); + $gapicClient->installDeployment($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/InstallDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function installDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); + try { + $gapicClient->installDeployment($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 listDeploymentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $deploymentsElement = new Deployment(); + $deployments = [ + $deploymentsElement, + ]; + $expectedResponse = new ListDeploymentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDeployments($deployments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listDeployments($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDeployments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/ListDeployments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeploymentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listDeployments($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 replaceDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $etag = 'etag3123477'; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $deployment = new Deployment(); + $response = $gapicClient->replaceDeployment($deployment); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/ReplaceDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getDeployment(); + $this->assertProtobufEquals($deployment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function replaceDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $deployment = new Deployment(); + try { + $gapicClient->replaceDeployment($deployment); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function uninstallDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); + $gapicClient->uninstallDeployment($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/UninstallDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function uninstallDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); + try { + $gapicClient->uninstallDeployment($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()); + } +} diff --git a/owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/Common.php b/owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/Common.php new file mode 100644 index 0000000000000000000000000000000000000000..6faa739885f74f716d45175e54bd921fa175708b GIT binary patch literal 3371 zcmb_fU2fY(5UwoSu|}0^Z)`_l(1w*$!~qftc8fMpehNpD4FQQ{NJ<|HHN=Ws$xJDd z<&Ock$U{-|6g@*9dWPPjK!Kj1XXxxMDN?qCxIz44b9d&OpKoS%{P=6{)Pr61m^sX+ zAv4wCxf-4_)$`rZHC$UAMxzn)Rl}Wlmd$)kRT~|(-RY~%MyvlRss?W48?2^|U3YA= zs$sj4Ssl}f<&3Lm`&Cq&xQ-_90314DfkzFd9-lmW!9r@%kPeQ8>Y&b52ggEn@Xh`s z0K=w1pw! z9mimM_f(0=W$$<{M*BofoH^kMz~BchCuF`u?LmVDhHrVH>z|-#tu|)iG;RE3?_O+{ z!&xJBPx@G^U2^h?8u}5-T31z{g^}+(5`J@lH`Bicb5eEaS%V{s+2%8LO3y6Uuhr71 zQjmG7)4&=LGLHFp2i3lXG=_BI&DRyVeDKtYGk0j3(?lI%5$#Pwv^`Op_(1o$V{1#LA+^kg}>7M<%OIxqb0IOx%|OmA~?^+3|P-U^I#F#eC#k2fBhk3FOYs@jF%F@+TuET0beJrPP9u*1_XA_psm_IBp zr$@J7otIP;=$QS0j#+snz1)QzpZyRaEzHynisfzFBA)Up3av@dG8Cz2=?ENPq~&X= zI^IMMMr)kXq0P!`YCdt~JJ@iO-00GNxq#QjgQrO@E)b$!%4K@e69F`x&_5S0DLQOT z#WRI{XxyX8fd7hNJdK3*(wm)5KRG$Wk6aG4nY~Pbo`JK_vY)l)8-C zlc@{qu!`knPoxWl${#sc>lvrajBG|U0IV!Oyke)3`~RoOu#qs|C_t!fy9VFX(>oqxp4@~@pNUzN zx#E%L$p)-Vf%ra=SANaGjTysfhIs-r+|BJ04sx{wehk}^jTBN6BUhcl02KTWVL{2A zX;_vPlDS=2ebmN92Z N7m{+7egkg+{saD8DL4QC literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerClusters.php b/owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerClusters.php new file mode 100644 index 0000000000000000000000000000000000000000..3e65307f2926ae04321cf5626b0c2549127b025b GIT binary patch literal 4910 zcmds5-EJF26s~`g*2n$Jq)kl<$>OA~1C6a1D!^@_w&NI6*RgCTNR_44dOdcQtarD& z>p+Nd2NG|<1HdJ(z%y{e4dSL;A@K-Yab|YCc5Sbkv=Ku1#;ch#XU_S~|2+7_*fU^7 zC{m4@l1rk-ws9>17t;@P9wECS6H3eDk8H!5Hq#$f=3zhALP}nRr-o~Sr-Zy2M z5xTnGRcT6A^?p0mm3oTSO&x5oFDhEpJfNm1t9{F+rj_K}0W{pR3`wR!v6_2AZK*BU zQnSbzHS>&7v&b1WcQ@_>$f{&n0L-%5{|aXt z3VM<)^^ECfxe3=lR$PN++ilN2TjB8$oz~YL}Ef{Txp-VJ~EFLuIcc~6Duh>JRT#99vjYnY*;BW}y-v;5WvSQhj zu~VbZ`iLAUz^oyeRI_6NA&`jV?mf>2|IVh!I_g1L_$o5BlFmJ-h?PVUQxojS0z?d{ zivf=@7Yib%nOx|3Hb8Cw@O4|?r&=t;uizW=Fxyd7jH6h1xOg2d=w=%eM(Z#(GhBWI z;RA(!8JoqW%jtDjnsL076H@KsAudMz`v5HY;b0lMW>HdvYfRj9a0r&6UhWX_XPzy6g*;)m}im@!0?;@Cp5myez2YQ5_h^u>MZMtf~=Iw5s!xhJGjW0_$Yx69r^w#9Mh@KanLvtm#vw z7F8|YghbQ#d@&ktOOj=NuAtfGA*sR@*|P->T^*ex7EOO}Vt!+`98>_->G6iC?M_%Y zq;Y#jCUbj~oB368`{Fu8NA-z9XrCTBh9j3?=0H;WPB$CL1V0R9z6<=7{U&hQ=Btj? z^$YY@D|O_49j8=X#$grv&eYN1^B89YN$ueZ|3Bsf^o#Ru>d5u2gm!Y zOO7m@(Xh&ryRbYVtw>E%H$@ynEF3L{b3%yVoPbasC^#w%=Y$Yhg&Sj_bGJ~d^AkJO>UOPxlmW5?i!R|{7dd(RK?MJnKci975Lt$s6Rc{5{C2TYdWv_2 z$qFn_k!GhdLNvp;3?#vSR4DJLxs@%Ik;^QJ!8P|9eB%*aC~)WeJG*dwB7w2ViX>pQ zn0-xCNf6!YbsdISG=ONGzJfQ!IPE?Y0<5t$1R-r6abuLg6?CM@DG>El1uz|#lL z)QJSDq;-?J*-dq+#(UM&a3CFjc)H)^FGsCePWav(Z^XarJh6internalAddGeneratedFile( + ' +· +9google/cloud/gaming/v1/game_server_clusters_service.protogoogle.cloud.gaming.v1google/api/client.proto1google/cloud/gaming/v1/game_server_clusters.proto#google/longrunning/operations.proto2Š +GameServerClustersServiceÙ +ListGameServerClusters5.google.cloud.gaming.v1.ListGameServerClustersRequest6.google.cloud.gaming.v1.ListGameServerClustersResponse"P‚Óä“A?/v1/{parent=projects/*/locations/*/realms/*}/gameServerClustersÚAparentÆ +GetGameServerCluster3.google.cloud.gaming.v1.GetGameServerClusterRequest).google.cloud.gaming.v1.GameServerCluster"N‚Óä“A?/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}ÚAname¬ +CreateGameServerCluster6.google.cloud.gaming.v1.CreateGameServerClusterRequest.google.longrunning.Operation"¹‚Óä“V"?/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters:game_server_clusterÚA1parent,game_server_cluster,game_server_cluster_idÊA& +GameServerClusterOperationMetadata‹ +PreviewCreateGameServerCluster=.google.cloud.gaming.v1.PreviewCreateGameServerClusterRequest>.google.cloud.gaming.v1.PreviewCreateGameServerClusterResponse"j‚Óä“d"M/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters:previewCreate:game_server_clusterí +DeleteGameServerCluster6.google.cloud.gaming.v1.DeleteGameServerClusterRequest.google.longrunning.Operation"{‚Óä“A*?/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadataö +PreviewDeleteGameServerCluster=.google.cloud.gaming.v1.PreviewDeleteGameServerClusterRequest>.google.cloud.gaming.v1.PreviewDeleteGameServerClusterResponse"U‚Óä“O*M/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewDelete® +UpdateGameServerCluster6.google.cloud.gaming.v1.UpdateGameServerClusterRequest.google.longrunning.Operation"»‚Óä“j2S/v1/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}:game_server_clusterÚAgame_server_cluster,update_maskÊA& +GameServerClusterOperationMetadataŸ +PreviewUpdateGameServerCluster=.google.cloud.gaming.v1.PreviewUpdateGameServerClusterRequest>.google.cloud.gaming.v1.PreviewUpdateGameServerClusterResponse"~‚Óä“x2a/v1/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewUpdate:game_server_clusterOÊAgameservices.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB\\ +com.google.cloud.gaming.v1PZinternalAddGeneratedFile( + ' +Ž +0google/cloud/gaming/v1/game_server_configs.protogoogle.cloud.gaming.v1google/api/resource.proto#google/cloud/gaming/v1/common.protogoogle/protobuf/timestamp.proto"Á +ListGameServerConfigsRequestD +parent ( B4àAúA.,gameservices.googleapis.com/GameServerConfig + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA"” +ListGameServerConfigsResponseE +game_server_configs ( 2(.google.cloud.gaming.v1.GameServerConfig +next_page_token (  + unreachable ( "` +GetGameServerConfigRequestB +name ( B4àAúA. +,gameservices.googleapis.com/GameServerConfig"È +CreateGameServerConfigRequestD +parent ( B4àAúA.,gameservices.googleapis.com/GameServerConfig + config_id ( BàAI +game_server_config ( 2(.google.cloud.gaming.v1.GameServerConfigBàA"c +DeleteGameServerConfigRequestB +name ( B4àAúA. +,gameservices.googleapis.com/GameServerConfig"µ + ScalingConfig +name ( BàA" +fleet_autoscaler_spec ( BàA8 + selectors ( 2%.google.cloud.gaming.v1.LabelSelector3 + schedules ( 2 .google.cloud.gaming.v1.Schedule"/ + FleetConfig + +fleet_spec (  +name ( "¤ +GameServerConfig +name ( 4 + create_time ( 2.google.protobuf.TimestampBàA4 + update_time ( 2.google.protobuf.TimestampBàAD +labels ( 24.google.cloud.gaming.v1.GameServerConfig.LabelsEntry: + fleet_configs ( 2#.google.cloud.gaming.v1.FleetConfig> +scaling_configs ( 2%.google.cloud.gaming.v1.ScalingConfig + description ( - + LabelsEntry +key (  +value ( :8:êA‹ +,gameservices.googleapis.com/GameServerConfig[projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}B\\ +com.google.cloud.gaming.v1PZinternalAddGeneratedFile( + ' +Æ + +8google/cloud/gaming/v1/game_server_configs_service.protogoogle.cloud.gaming.v1google/api/client.proto0google/cloud/gaming/v1/game_server_configs.proto#google/longrunning/operations.proto2› +GameServerConfigsServiceÚ +ListGameServerConfigs4.google.cloud.gaming.v1.ListGameServerConfigsRequest5.google.cloud.gaming.v1.ListGameServerConfigsResponse"T‚Óä“EC/v1/{parent=projects/*/locations/*/gameServerDeployments/*}/configsÚAparentÇ +GetGameServerConfig2.google.cloud.gaming.v1.GetGameServerConfigRequest(.google.cloud.gaming.v1.GameServerConfig"R‚Óä“EC/v1/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}ÚAname” +CreateGameServerConfig5.google.cloud.gaming.v1.CreateGameServerConfigRequest.google.longrunning.Operation"£‚Óä“Y"C/v1/{parent=projects/*/locations/*/gameServerDeployments/*}/configs:game_server_configÚAparent,game_server_configÊA% +GameServerConfigOperationMetadataï +DeleteGameServerConfig5.google.cloud.gaming.v1.DeleteGameServerConfigRequest.google.longrunning.Operation"‚Óä“E*C/v1/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadataOÊAgameservices.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB\\ +com.google.cloud.gaming.v1PZX}>mGp1ojA7W1fMFC3w?{Q0~Y;-oej=hD;AERf0tR@U_KMf z;p`iV?t#^Gc#LFeuWYm9yMhJ2B^6eD7t7ZyZBxo#4g*5tftC8UDgh#J>dU^s$ai>s z0b@5}p$MW?60KHSD0;BUlk&CXT4|0ot+Mv9THWL114~359K7AKA{3p-zo-0`26lU2 z^$g_ZLRMd7$h{hFI$ah-)oMSgzL8O?YnWtp-&#Yds?P`QcHr;-)*hV7>nBdUbqL*c zM#UtYc9^ZJQh4KimLzP>^LqJNq}nd`5S92|g}=_jox>Ehc~)yxR4Y_;D^$9-isut+ zPRQ&iL0I=e@zRKksO<>GL?~@B)jCvqc2j1!(I&7GiMJ9nJqeK_q6JES8elzUvB>P8 zHT<$e_?eGjGIS#9(t=?b<>}hp=W`SP&CQxODHN2g%v_8s`YMVgu8@~@mPPX{OovX3 z`k$JwFhRzS*K*J24D%d-Iv2qf`h}djMg4FZCYy{?Lluto4_}9=Ao7SmHnt1Ld&i|; z47fNZmN*Rj7|kbePP&~zK@?rCoS(g(L^7PNN@hgo;FOPFi^hQaGOlU!G~_#egpRxE zY;Yv^bLHvMCcL>sERaE0Db|Z{Oj6*BNW+1VE(LI9)J*{=8Wl%<;opS*JjE+;TzE%U zN=2CIkB3Tn$u}0u(NW4a zJxrA59V%LNuOblzX@0htHblxIl^!Q+Y<@MMJjUG@>uniMMEXS4cz*VFYJP|wGy82# ztLii#&fA-CVG)J9*=*?@3$~ny@PS;^vvB`vFlOl&RnZl>wMBk#e_}EN`^`6{h52@do4vHS&<#!tDg$893f` zct?jjU7fgVRKGL+o%{CS#BF{=UG@dKBDQyuuU(r5E^V(gzU-a!b5||WdzM~%$Lnpt zyQLouDD*?05Bw%;t`2LUB!sKTU)mykL-88v{Z)M#xACTRxxEiCoy5+>a9u;wd@x9YC_xn sO?>$EeUHkD-r*aQO7Qm8-V5iteqjzgNaY}7ZpLF&N$Mx#F6;vQ4^WJ1F8}}l literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerDeploymentsService.php b/owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerDeploymentsService.php new file mode 100644 index 000000000000..581042f333f1 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerDeploymentsService.php @@ -0,0 +1,45 @@ +internalAddGeneratedFile( + ' +› +internalAddGeneratedFile( + ' +« +#google/cloud/gaming/v1/realms.protogoogle.cloud.gaming.v1google/api/resource.proto#google/cloud/gaming/v1/common.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"« +ListRealmsRequest9 +parent ( B)àAúA#!gameservices.googleapis.com/Realm + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA"q +ListRealmsResponse- +realms ( 2.google.cloud.gaming.v1.Realm +next_page_token (  + unreachable ( "J +GetRealmRequest7 +name ( B)àAúA# +!gameservices.googleapis.com/Realm"™ +CreateRealmRequest9 +parent ( B)àAúA#!gameservices.googleapis.com/Realm +realm_id ( BàA1 +realm ( 2.google.cloud.gaming.v1.RealmBàA"M +DeleteRealmRequest7 +name ( B)àAúA# +!gameservices.googleapis.com/Realm"} +UpdateRealmRequest1 +realm ( 2.google.cloud.gaming.v1.RealmBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"» +PreviewRealmUpdateRequest1 +realm ( 2.google.cloud.gaming.v1.RealmBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA5 + preview_time ( 2.google.protobuf.TimestampBàA"e +PreviewRealmUpdateResponse +etag ( 9 + target_state ( 2#.google.cloud.gaming.v1.TargetState"† +Realm +name ( 4 + create_time ( 2.google.protobuf.TimestampBàA4 + update_time ( 2.google.protobuf.TimestampBàA9 +labels ( 2).google.cloud.gaming.v1.Realm.LabelsEntry + time_zone ( BàA +etag (  + description ( - + LabelsEntry +key (  +value ( :8:^êA[ +!gameservices.googleapis.com/Realm6projects/{project}/locations/{location}/realms/{realm}B\\ +com.google.cloud.gaming.v1PZinternalAddGeneratedFile( + ' +Ì ++google/cloud/gaming/v1/realms_service.protogoogle.cloud.gaming.v1google/api/client.proto#google/cloud/gaming/v1/realms.proto#google/longrunning/operations.proto2» + RealmsService  + +ListRealms).google.cloud.gaming.v1.ListRealmsRequest*.google.cloud.gaming.v1.ListRealmsResponse";‚Óä“,*/v1/{parent=projects/*/locations/*}/realmsÚAparent +GetRealm\'.google.cloud.gaming.v1.GetRealmRequest.google.cloud.gaming.v1.Realm"9‚Óä“,*/v1/{name=projects/*/locations/*/realms/*}ÚAnameÈ + CreateRealm*.google.cloud.gaming.v1.CreateRealmRequest.google.longrunning.Operation"n‚Óä“3"*/v1/{parent=projects/*/locations/*}/realms:realmÚAparent,realm,realm_idÊA +RealmOperationMetadataÀ + DeleteRealm*.google.cloud.gaming.v1.DeleteRealmRequest.google.longrunning.Operation"f‚Óä“,**/v1/{name=projects/*/locations/*/realms/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadataÊ + UpdateRealm*.google.cloud.gaming.v1.UpdateRealmRequest.google.longrunning.Operation"p‚Óä“920/v1/{realm.name=projects/*/locations/*/realms/*}:realmÚArealm,update_maskÊA +RealmOperationMetadataÊ +PreviewRealmUpdate1.google.cloud.gaming.v1.PreviewRealmUpdateRequest2.google.cloud.gaming.v1.PreviewRealmUpdateResponse"M‚Óä“G2>/v1/{realm.name=projects/*/locations/*/realms/*}:previewUpdate:realmOÊAgameservices.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB\\ +com.google.cloud.gaming.v1PZgoogle.cloud.gaming.v1.CreateGameServerClusterRequest + */ +class CreateGameServerClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/realms/{realm-id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID of the game server cluster resource to be created. + * + * Generated from protobuf field string game_server_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $game_server_cluster_id = ''; + /** + * Required. The game server cluster resource to be created. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $game_server_cluster = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/realms/{realm-id}`. + * @type string $game_server_cluster_id + * Required. The ID of the game server cluster resource to be created. + * @type \Google\Cloud\Gaming\V1\GameServerCluster $game_server_cluster + * Required. The game server cluster resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/realms/{realm-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 parent resource name, in the following form: + * `projects/{project}/locations/{location}/realms/{realm-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 of the game server cluster resource to be created. + * + * Generated from protobuf field string game_server_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGameServerClusterId() + { + return $this->game_server_cluster_id; + } + + /** + * Required. The ID of the game server cluster resource to be created. + * + * Generated from protobuf field string game_server_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGameServerClusterId($var) + { + GPBUtil::checkString($var, True); + $this->game_server_cluster_id = $var; + + return $this; + } + + /** + * Required. The game server cluster resource to be created. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Gaming\V1\GameServerCluster|null + */ + public function getGameServerCluster() + { + return $this->game_server_cluster; + } + + public function hasGameServerCluster() + { + return isset($this->game_server_cluster); + } + + public function clearGameServerCluster() + { + unset($this->game_server_cluster); + } + + /** + * Required. The game server cluster resource to be created. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Gaming\V1\GameServerCluster $var + * @return $this + */ + public function setGameServerCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerCluster::class); + $this->game_server_cluster = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerConfigRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerConfigRequest.php new file mode 100644 index 000000000000..ca9312fdc389 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerConfigRequest.php @@ -0,0 +1,149 @@ +google.cloud.gaming.v1.CreateGameServerConfigRequest + */ +class CreateGameServerConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID of the game server config resource to be created. + * + * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $config_id = ''; + /** + * Required. The game server config resource to be created. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerConfig game_server_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $game_server_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`. + * @type string $config_id + * Required. The ID of the game server config resource to be created. + * @type \Google\Cloud\Gaming\V1\GameServerConfig $game_server_config + * Required. The game server config resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`. + * + * Generated 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 following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 game server config resource to be created. + * + * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getConfigId() + { + return $this->config_id; + } + + /** + * Required. The ID of the game server config resource to be created. + * + * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setConfigId($var) + { + GPBUtil::checkString($var, True); + $this->config_id = $var; + + return $this; + } + + /** + * Required. The game server config resource to be created. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerConfig game_server_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Gaming\V1\GameServerConfig|null + */ + public function getGameServerConfig() + { + return $this->game_server_config; + } + + public function hasGameServerConfig() + { + return isset($this->game_server_config); + } + + public function clearGameServerConfig() + { + unset($this->game_server_config); + } + + /** + * Required. The game server config resource to be created. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerConfig game_server_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Gaming\V1\GameServerConfig $var + * @return $this + */ + public function setGameServerConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerConfig::class); + $this->game_server_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerDeploymentRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerDeploymentRequest.php new file mode 100644 index 000000000000..7c7a1103b5ef --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerDeploymentRequest.php @@ -0,0 +1,149 @@ +google.cloud.gaming.v1.CreateGameServerDeploymentRequest + */ +class CreateGameServerDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, in the following 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 ID of the game server delpoyment resource to be created. + * + * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $deployment_id = ''; + /** + * Required. The game server delpoyment resource to be created. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeployment game_server_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $game_server_deployment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}`. + * @type string $deployment_id + * Required. The ID of the game server delpoyment resource to be created. + * @type \Google\Cloud\Gaming\V1\GameServerDeployment $game_server_deployment + * Required. The game server delpoyment resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, in the following 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 following 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 ID of the game server delpoyment resource to be created. + * + * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDeploymentId() + { + return $this->deployment_id; + } + + /** + * Required. The ID of the game server delpoyment resource to be created. + * + * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDeploymentId($var) + { + GPBUtil::checkString($var, True); + $this->deployment_id = $var; + + return $this; + } + + /** + * Required. The game server delpoyment resource to be created. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeployment game_server_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Gaming\V1\GameServerDeployment|null + */ + public function getGameServerDeployment() + { + return $this->game_server_deployment; + } + + public function hasGameServerDeployment() + { + return isset($this->game_server_deployment); + } + + public function clearGameServerDeployment() + { + unset($this->game_server_deployment); + } + + /** + * Required. The game server delpoyment resource to be created. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeployment game_server_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Gaming\V1\GameServerDeployment $var + * @return $this + */ + public function setGameServerDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerDeployment::class); + $this->game_server_deployment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateRealmRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateRealmRequest.php new file mode 100644 index 000000000000..29c2bceae3fe --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateRealmRequest.php @@ -0,0 +1,149 @@ +google.cloud.gaming.v1.CreateRealmRequest + */ +class CreateRealmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, in the following 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 ID of the realm resource to be created. + * + * Generated from protobuf field string realm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $realm_id = ''; + /** + * Required. The realm resource to be created. + * + * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $realm = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}`. + * @type string $realm_id + * Required. The ID of the realm resource to be created. + * @type \Google\Cloud\Gaming\V1\Realm $realm + * Required. The realm resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, in the following 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 following 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 ID of the realm resource to be created. + * + * Generated from protobuf field string realm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRealmId() + { + return $this->realm_id; + } + + /** + * Required. The ID of the realm resource to be created. + * + * Generated from protobuf field string realm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRealmId($var) + { + GPBUtil::checkString($var, True); + $this->realm_id = $var; + + return $this; + } + + /** + * Required. The realm resource to be created. + * + * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Gaming\V1\Realm|null + */ + public function getRealm() + { + return $this->realm; + } + + public function hasRealm() + { + return isset($this->realm); + } + + public function clearRealm() + { + unset($this->realm); + } + + /** + * Required. The realm resource to be created. + * + * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Gaming\V1\Realm $var + * @return $this + */ + public function setRealm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\Realm::class); + $this->realm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerClusterRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerClusterRequest.php new file mode 100644 index 000000000000..ddb1ebcd6406 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerClusterRequest.php @@ -0,0 +1,71 @@ +google.cloud.gaming.v1.DeleteGameServerClusterRequest + */ +class DeleteGameServerClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the game server cluster to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`. + * + * 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 name of the game server cluster to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the game server cluster to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerClusters/{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 game server cluster to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerClusters/{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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerConfigRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerConfigRequest.php new file mode 100644 index 000000000000..a980d33d11aa --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerConfigRequest.php @@ -0,0 +1,71 @@ +google.cloud.gaming.v1.DeleteGameServerConfigRequest + */ +class DeleteGameServerConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the game server config to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. + * + * 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 name of the game server config to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the game server config to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. + * + * Generated 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 game server config to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerDeploymentRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerDeploymentRequest.php new file mode 100644 index 000000000000..f58374f87100 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerDeploymentRequest.php @@ -0,0 +1,71 @@ +google.cloud.gaming.v1.DeleteGameServerDeploymentRequest + */ +class DeleteGameServerDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the game server delpoyment to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * + * 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 name of the game server delpoyment to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the game server delpoyment to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * + * Generated 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 game server delpoyment to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteRealmRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteRealmRequest.php new file mode 100644 index 000000000000..067f4143976c --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteRealmRequest.php @@ -0,0 +1,71 @@ +google.cloud.gaming.v1.DeleteRealmRequest + */ +class DeleteRealmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the realm to delete, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. + * + * 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 name of the realm to delete, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the realm to delete, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. + * + * Generated 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 realm to delete, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails.php new file mode 100644 index 000000000000..67c811c9f883 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails.php @@ -0,0 +1,121 @@ +google.cloud.gaming.v1.DeployedFleetDetails + */ +class DeployedFleetDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Information about the Agones fleet. + * + * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet deployed_fleet = 1; + */ + protected $deployed_fleet = null; + /** + * Information about the Agones autoscaler for that fleet. + * + * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleetAutoscaler deployed_autoscaler = 2; + */ + protected $deployed_autoscaler = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet $deployed_fleet + * Information about the Agones fleet. + * @type \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleetAutoscaler $deployed_autoscaler + * Information about the Agones autoscaler for that fleet. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Information about the Agones fleet. + * + * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet deployed_fleet = 1; + * @return \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet|null + */ + public function getDeployedFleet() + { + return $this->deployed_fleet; + } + + public function hasDeployedFleet() + { + return isset($this->deployed_fleet); + } + + public function clearDeployedFleet() + { + unset($this->deployed_fleet); + } + + /** + * Information about the Agones fleet. + * + * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet deployed_fleet = 1; + * @param \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet $var + * @return $this + */ + public function setDeployedFleet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet::class); + $this->deployed_fleet = $var; + + return $this; + } + + /** + * Information about the Agones autoscaler for that fleet. + * + * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleetAutoscaler deployed_autoscaler = 2; + * @return \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleetAutoscaler|null + */ + public function getDeployedAutoscaler() + { + return $this->deployed_autoscaler; + } + + public function hasDeployedAutoscaler() + { + return isset($this->deployed_autoscaler); + } + + public function clearDeployedAutoscaler() + { + unset($this->deployed_autoscaler); + } + + /** + * Information about the Agones autoscaler for that fleet. + * + * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleetAutoscaler deployed_autoscaler = 2; + * @param \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleetAutoscaler $var + * @return $this + */ + public function setDeployedAutoscaler($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleetAutoscaler::class); + $this->deployed_autoscaler = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet.php new file mode 100644 index 000000000000..1846f588feac --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet.php @@ -0,0 +1,200 @@ +google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet + */ +class DeployedFleet extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Agones fleet. + * + * Generated from protobuf field string fleet = 1; + */ + protected $fleet = ''; + /** + * The fleet spec retrieved from the Agones fleet. + * + * Generated from protobuf field string fleet_spec = 2; + */ + protected $fleet_spec = ''; + /** + * The source spec that is used to create the Agones fleet. + * The GameServerConfig resource may no longer exist in the system. + * + * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 3; + */ + protected $spec_source = null; + /** + * The current status of the Agones fleet. + * Includes count of game servers in various states. + * + * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet.DeployedFleetStatus status = 5; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $fleet + * The name of the Agones fleet. + * @type string $fleet_spec + * The fleet spec retrieved from the Agones fleet. + * @type \Google\Cloud\Gaming\V1\SpecSource $spec_source + * The source spec that is used to create the Agones fleet. + * The GameServerConfig resource may no longer exist in the system. + * @type \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet\DeployedFleetStatus $status + * The current status of the Agones fleet. + * Includes count of game servers in various states. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Agones fleet. + * + * Generated from protobuf field string fleet = 1; + * @return string + */ + public function getFleet() + { + return $this->fleet; + } + + /** + * The name of the Agones fleet. + * + * Generated from protobuf field string fleet = 1; + * @param string $var + * @return $this + */ + public function setFleet($var) + { + GPBUtil::checkString($var, True); + $this->fleet = $var; + + return $this; + } + + /** + * The fleet spec retrieved from the Agones fleet. + * + * Generated from protobuf field string fleet_spec = 2; + * @return string + */ + public function getFleetSpec() + { + return $this->fleet_spec; + } + + /** + * The fleet spec retrieved from the Agones fleet. + * + * Generated from protobuf field string fleet_spec = 2; + * @param string $var + * @return $this + */ + public function setFleetSpec($var) + { + GPBUtil::checkString($var, True); + $this->fleet_spec = $var; + + return $this; + } + + /** + * The source spec that is used to create the Agones fleet. + * The GameServerConfig resource may no longer exist in the system. + * + * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 3; + * @return \Google\Cloud\Gaming\V1\SpecSource|null + */ + public function getSpecSource() + { + return $this->spec_source; + } + + public function hasSpecSource() + { + return isset($this->spec_source); + } + + public function clearSpecSource() + { + unset($this->spec_source); + } + + /** + * The source spec that is used to create the Agones fleet. + * The GameServerConfig resource may no longer exist in the system. + * + * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 3; + * @param \Google\Cloud\Gaming\V1\SpecSource $var + * @return $this + */ + public function setSpecSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\SpecSource::class); + $this->spec_source = $var; + + return $this; + } + + /** + * The current status of the Agones fleet. + * Includes count of game servers in various states. + * + * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet.DeployedFleetStatus status = 5; + * @return \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet\DeployedFleetStatus|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * The current status of the Agones fleet. + * Includes count of game servers in various states. + * + * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet.DeployedFleetStatus status = 5; + * @param \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet\DeployedFleetStatus $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet\DeployedFleetStatus::class); + $this->status = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DeployedFleet::class, \Google\Cloud\Gaming\V1\DeployedFleetDetails_DeployedFleet::class); + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet/DeployedFleetStatus.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet/DeployedFleetStatus.php new file mode 100644 index 000000000000..0f470fb218fb --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet/DeployedFleetStatus.php @@ -0,0 +1,181 @@ +google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet.DeployedFleetStatus + */ +class DeployedFleetStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The number of GameServer replicas in the READY state in this fleet. + * + * Generated from protobuf field int64 ready_replicas = 1; + */ + protected $ready_replicas = 0; + /** + * The number of GameServer replicas in the ALLOCATED state in this fleet. + * + * Generated from protobuf field int64 allocated_replicas = 2; + */ + protected $allocated_replicas = 0; + /** + * The number of GameServer replicas in the RESERVED state in this fleet. + * Reserved instances won't be deleted on scale down, but won't cause + * an autoscaler to scale up. + * + * Generated from protobuf field int64 reserved_replicas = 3; + */ + protected $reserved_replicas = 0; + /** + * The total number of current GameServer replicas in this fleet. + * + * Generated from protobuf field int64 replicas = 4; + */ + protected $replicas = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $ready_replicas + * The number of GameServer replicas in the READY state in this fleet. + * @type int|string $allocated_replicas + * The number of GameServer replicas in the ALLOCATED state in this fleet. + * @type int|string $reserved_replicas + * The number of GameServer replicas in the RESERVED state in this fleet. + * Reserved instances won't be deleted on scale down, but won't cause + * an autoscaler to scale up. + * @type int|string $replicas + * The total number of current GameServer replicas in this fleet. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The number of GameServer replicas in the READY state in this fleet. + * + * Generated from protobuf field int64 ready_replicas = 1; + * @return int|string + */ + public function getReadyReplicas() + { + return $this->ready_replicas; + } + + /** + * The number of GameServer replicas in the READY state in this fleet. + * + * Generated from protobuf field int64 ready_replicas = 1; + * @param int|string $var + * @return $this + */ + public function setReadyReplicas($var) + { + GPBUtil::checkInt64($var); + $this->ready_replicas = $var; + + return $this; + } + + /** + * The number of GameServer replicas in the ALLOCATED state in this fleet. + * + * Generated from protobuf field int64 allocated_replicas = 2; + * @return int|string + */ + public function getAllocatedReplicas() + { + return $this->allocated_replicas; + } + + /** + * The number of GameServer replicas in the ALLOCATED state in this fleet. + * + * Generated from protobuf field int64 allocated_replicas = 2; + * @param int|string $var + * @return $this + */ + public function setAllocatedReplicas($var) + { + GPBUtil::checkInt64($var); + $this->allocated_replicas = $var; + + return $this; + } + + /** + * The number of GameServer replicas in the RESERVED state in this fleet. + * Reserved instances won't be deleted on scale down, but won't cause + * an autoscaler to scale up. + * + * Generated from protobuf field int64 reserved_replicas = 3; + * @return int|string + */ + public function getReservedReplicas() + { + return $this->reserved_replicas; + } + + /** + * The number of GameServer replicas in the RESERVED state in this fleet. + * Reserved instances won't be deleted on scale down, but won't cause + * an autoscaler to scale up. + * + * Generated from protobuf field int64 reserved_replicas = 3; + * @param int|string $var + * @return $this + */ + public function setReservedReplicas($var) + { + GPBUtil::checkInt64($var); + $this->reserved_replicas = $var; + + return $this; + } + + /** + * The total number of current GameServer replicas in this fleet. + * + * Generated from protobuf field int64 replicas = 4; + * @return int|string + */ + public function getReplicas() + { + return $this->replicas; + } + + /** + * The total number of current GameServer replicas in this fleet. + * + * Generated from protobuf field int64 replicas = 4; + * @param int|string $var + * @return $this + */ + public function setReplicas($var) + { + GPBUtil::checkInt64($var); + $this->replicas = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DeployedFleetStatus::class, \Google\Cloud\Gaming\V1\DeployedFleetDetails_DeployedFleet_DeployedFleetStatus::class); + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleetAutoscaler.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleetAutoscaler.php new file mode 100644 index 000000000000..5c58ffbbe14e --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleetAutoscaler.php @@ -0,0 +1,152 @@ +google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleetAutoscaler + */ +class DeployedFleetAutoscaler extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Agones autoscaler. + * + * Generated from protobuf field string autoscaler = 1; + */ + protected $autoscaler = ''; + /** + * The source spec that is used to create the autoscaler. + * The GameServerConfig resource may no longer exist in the system. + * + * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 4; + */ + protected $spec_source = null; + /** + * The autoscaler spec retrieved from Agones. + * + * Generated from protobuf field string fleet_autoscaler_spec = 3; + */ + protected $fleet_autoscaler_spec = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $autoscaler + * The name of the Agones autoscaler. + * @type \Google\Cloud\Gaming\V1\SpecSource $spec_source + * The source spec that is used to create the autoscaler. + * The GameServerConfig resource may no longer exist in the system. + * @type string $fleet_autoscaler_spec + * The autoscaler spec retrieved from Agones. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Agones autoscaler. + * + * Generated from protobuf field string autoscaler = 1; + * @return string + */ + public function getAutoscaler() + { + return $this->autoscaler; + } + + /** + * The name of the Agones autoscaler. + * + * Generated from protobuf field string autoscaler = 1; + * @param string $var + * @return $this + */ + public function setAutoscaler($var) + { + GPBUtil::checkString($var, True); + $this->autoscaler = $var; + + return $this; + } + + /** + * The source spec that is used to create the autoscaler. + * The GameServerConfig resource may no longer exist in the system. + * + * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 4; + * @return \Google\Cloud\Gaming\V1\SpecSource|null + */ + public function getSpecSource() + { + return $this->spec_source; + } + + public function hasSpecSource() + { + return isset($this->spec_source); + } + + public function clearSpecSource() + { + unset($this->spec_source); + } + + /** + * The source spec that is used to create the autoscaler. + * The GameServerConfig resource may no longer exist in the system. + * + * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 4; + * @param \Google\Cloud\Gaming\V1\SpecSource $var + * @return $this + */ + public function setSpecSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\SpecSource::class); + $this->spec_source = $var; + + return $this; + } + + /** + * The autoscaler spec retrieved from Agones. + * + * Generated from protobuf field string fleet_autoscaler_spec = 3; + * @return string + */ + public function getFleetAutoscalerSpec() + { + return $this->fleet_autoscaler_spec; + } + + /** + * The autoscaler spec retrieved from Agones. + * + * Generated from protobuf field string fleet_autoscaler_spec = 3; + * @param string $var + * @return $this + */ + public function setFleetAutoscalerSpec($var) + { + GPBUtil::checkString($var, True); + $this->fleet_autoscaler_spec = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DeployedFleetAutoscaler::class, \Google\Cloud\Gaming\V1\DeployedFleetDetails_DeployedFleetAutoscaler::class); + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails_DeployedFleet.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails_DeployedFleet.php new file mode 100644 index 000000000000..451c5ebeaa20 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails_DeployedFleet.php @@ -0,0 +1,16 @@ +google.cloud.gaming.v1.FetchDeploymentStateRequest + */ +class FetchDeploymentStateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the game server delpoyment, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * + * 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. The name of the game server delpoyment, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the game server delpoyment, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * + * 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 game server delpoyment, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * + * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse.php new file mode 100644 index 000000000000..0f8fbc2454da --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse.php @@ -0,0 +1,101 @@ +google.cloud.gaming.v1.FetchDeploymentStateResponse + */ +class FetchDeploymentStateResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The state of the game server deployment in each game server cluster. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.FetchDeploymentStateResponse.DeployedClusterState cluster_state = 1; + */ + private $cluster_state; + /** + * List of locations that could not be reached. + * + * Generated from protobuf field repeated string unavailable = 2; + */ + private $unavailable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Gaming\V1\FetchDeploymentStateResponse\DeployedClusterState>|\Google\Protobuf\Internal\RepeatedField $cluster_state + * The state of the game server deployment in each game server cluster. + * @type array|\Google\Protobuf\Internal\RepeatedField $unavailable + * List of locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * The state of the game server deployment in each game server cluster. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.FetchDeploymentStateResponse.DeployedClusterState cluster_state = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClusterState() + { + return $this->cluster_state; + } + + /** + * The state of the game server deployment in each game server cluster. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.FetchDeploymentStateResponse.DeployedClusterState cluster_state = 1; + * @param array<\Google\Cloud\Gaming\V1\FetchDeploymentStateResponse\DeployedClusterState>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClusterState($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\FetchDeploymentStateResponse\DeployedClusterState::class); + $this->cluster_state = $arr; + + return $this; + } + + /** + * List of locations that could not be reached. + * + * Generated from protobuf field repeated string unavailable = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnavailable() + { + return $this->unavailable; + } + + /** + * List of locations that could not be reached. + * + * Generated from protobuf field repeated string unavailable = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnavailable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unavailable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse/DeployedClusterState.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse/DeployedClusterState.php new file mode 100644 index 000000000000..396153c3ae72 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse/DeployedClusterState.php @@ -0,0 +1,108 @@ +google.cloud.gaming.v1.FetchDeploymentStateResponse.DeployedClusterState + */ +class DeployedClusterState extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the cluster. + * + * Generated from protobuf field string cluster = 1; + */ + protected $cluster = ''; + /** + * The details about the Agones fleets and autoscalers created in the + * game server cluster. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.DeployedFleetDetails fleet_details = 2; + */ + private $fleet_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster + * The name of the cluster. + * @type array<\Google\Cloud\Gaming\V1\DeployedFleetDetails>|\Google\Protobuf\Internal\RepeatedField $fleet_details + * The details about the Agones fleets and autoscalers created in the + * game server cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * The name of the cluster. + * + * Generated from protobuf field string cluster = 1; + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * The name of the cluster. + * + * 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; + } + + /** + * The details about the Agones fleets and autoscalers created in the + * game server cluster. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.DeployedFleetDetails fleet_details = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFleetDetails() + { + return $this->fleet_details; + } + + /** + * The details about the Agones fleets and autoscalers created in the + * game server cluster. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.DeployedFleetDetails fleet_details = 2; + * @param array<\Google\Cloud\Gaming\V1\DeployedFleetDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFleetDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\DeployedFleetDetails::class); + $this->fleet_details = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DeployedClusterState::class, \Google\Cloud\Gaming\V1\FetchDeploymentStateResponse_DeployedClusterState::class); + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse_DeployedClusterState.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse_DeployedClusterState.php new file mode 100644 index 000000000000..22dbef9a7a4d --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse_DeployedClusterState.php @@ -0,0 +1,16 @@ +google.cloud.gaming.v1.FleetConfig + */ +class FleetConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Agones fleet spec. Example spec: + * `https://agones.dev/site/docs/reference/fleet/`. + * + * Generated from protobuf field string fleet_spec = 1; + */ + protected $fleet_spec = ''; + /** + * The name of the FleetConfig. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $fleet_spec + * Agones fleet spec. Example spec: + * `https://agones.dev/site/docs/reference/fleet/`. + * @type string $name + * The name of the FleetConfig. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); + parent::__construct($data); + } + + /** + * Agones fleet spec. Example spec: + * `https://agones.dev/site/docs/reference/fleet/`. + * + * Generated from protobuf field string fleet_spec = 1; + * @return string + */ + public function getFleetSpec() + { + return $this->fleet_spec; + } + + /** + * Agones fleet spec. Example spec: + * `https://agones.dev/site/docs/reference/fleet/`. + * + * Generated from protobuf field string fleet_spec = 1; + * @param string $var + * @return $this + */ + public function setFleetSpec($var) + { + GPBUtil::checkString($var, True); + $this->fleet_spec = $var; + + return $this; + } + + /** + * The name of the FleetConfig. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the FleetConfig. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerCluster.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerCluster.php new file mode 100644 index 000000000000..7605b425d3de --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerCluster.php @@ -0,0 +1,369 @@ +google.cloud.gaming.v1.GameServerCluster + */ +class GameServerCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the game server cluster, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. + * For example, + * `projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The labels associated with this game server cluster. Each label is a + * key-value pair. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * The game server cluster connection information. This information is used to + * manage game server clusters. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterConnectionInfo connection_info = 5; + */ + protected $connection_info = null; + /** + * ETag of the resource. + * + * Generated from protobuf field string etag = 6; + */ + protected $etag = ''; + /** + * Human readable description of the cluster. + * + * Generated from protobuf field string description = 7; + */ + protected $description = ''; + /** + * Output only. The state of the Kubernetes cluster, this will be available if + * 'view' is set to `FULL` in the relevant List/Get/Preview request. + * + * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState cluster_state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cluster_state = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the game server cluster, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. + * For example, + * `projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels associated with this game server cluster. Each label is a + * key-value pair. + * @type \Google\Cloud\Gaming\V1\GameServerClusterConnectionInfo $connection_info + * The game server cluster connection information. This information is used to + * manage game server clusters. + * @type string $etag + * ETag of the resource. + * @type string $description + * Human readable description of the cluster. + * @type \Google\Cloud\Gaming\V1\KubernetesClusterState $cluster_state + * Output only. The state of the Kubernetes cluster, this will be available if + * 'view' is set to `FULL` in the relevant List/Get/Preview request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the game server cluster, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. + * For example, + * `projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the game server cluster, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. + * For example, + * `projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster`. + * + * 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 creation time. + * + * 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 creation time. + * + * 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 last-modified time. + * + * 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 last-modified time. + * + * 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; + } + + /** + * The labels associated with this game server cluster. Each label is a + * key-value pair. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels associated with this game server cluster. Each label is a + * key-value pair. + * + * 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; + } + + /** + * The game server cluster connection information. This information is used to + * manage game server clusters. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterConnectionInfo connection_info = 5; + * @return \Google\Cloud\Gaming\V1\GameServerClusterConnectionInfo|null + */ + public function getConnectionInfo() + { + return $this->connection_info; + } + + public function hasConnectionInfo() + { + return isset($this->connection_info); + } + + public function clearConnectionInfo() + { + unset($this->connection_info); + } + + /** + * The game server cluster connection information. This information is used to + * manage game server clusters. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterConnectionInfo connection_info = 5; + * @param \Google\Cloud\Gaming\V1\GameServerClusterConnectionInfo $var + * @return $this + */ + public function setConnectionInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerClusterConnectionInfo::class); + $this->connection_info = $var; + + return $this; + } + + /** + * ETag of the resource. + * + * Generated from protobuf field string etag = 6; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * ETag of the resource. + * + * Generated from protobuf field string etag = 6; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Human readable description of the cluster. + * + * Generated from protobuf field string description = 7; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Human readable description of the cluster. + * + * 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 state of the Kubernetes cluster, this will be available if + * 'view' is set to `FULL` in the relevant List/Get/Preview request. + * + * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState cluster_state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Gaming\V1\KubernetesClusterState|null + */ + public function getClusterState() + { + return $this->cluster_state; + } + + public function hasClusterState() + { + return isset($this->cluster_state); + } + + public function clearClusterState() + { + unset($this->cluster_state); + } + + /** + * Output only. The state of the Kubernetes cluster, this will be available if + * 'view' is set to `FULL` in the relevant List/Get/Preview request. + * + * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState cluster_state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Gaming\V1\KubernetesClusterState $var + * @return $this + */ + public function setClusterState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\KubernetesClusterState::class); + $this->cluster_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterConnectionInfo.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterConnectionInfo.php new file mode 100644 index 000000000000..910ba19f936f --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterConnectionInfo.php @@ -0,0 +1,117 @@ +google.cloud.gaming.v1.GameServerClusterConnectionInfo + */ +class GameServerClusterConnectionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace designated on the game server cluster where the Agones game + * server instances will be created. Existence of the namespace will be + * validated during creation. + * + * Generated from protobuf field string namespace = 5; + */ + protected $namespace = ''; + protected $cluster_reference; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Gaming\V1\GkeClusterReference $gke_cluster_reference + * Reference to the GKE cluster where the game servers are installed. + * @type string $namespace + * Namespace designated on the game server cluster where the Agones game + * server instances will be created. Existence of the namespace will be + * validated during creation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * Reference to the GKE cluster where the game servers are installed. + * + * Generated from protobuf field .google.cloud.gaming.v1.GkeClusterReference gke_cluster_reference = 7; + * @return \Google\Cloud\Gaming\V1\GkeClusterReference|null + */ + public function getGkeClusterReference() + { + return $this->readOneof(7); + } + + public function hasGkeClusterReference() + { + return $this->hasOneof(7); + } + + /** + * Reference to the GKE cluster where the game servers are installed. + * + * Generated from protobuf field .google.cloud.gaming.v1.GkeClusterReference gke_cluster_reference = 7; + * @param \Google\Cloud\Gaming\V1\GkeClusterReference $var + * @return $this + */ + public function setGkeClusterReference($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GkeClusterReference::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Namespace designated on the game server cluster where the Agones game + * server instances will be created. Existence of the namespace will be + * validated during creation. + * + * Generated from protobuf field string namespace = 5; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace designated on the game server cluster where the Agones game + * server instances will be created. Existence of the namespace will be + * validated during creation. + * + * Generated from protobuf field string namespace = 5; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * @return string + */ + public function getClusterReference() + { + return $this->whichOneof("cluster_reference"); + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterView.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterView.php new file mode 100644 index 000000000000..5efedb2bbc4f --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterView.php @@ -0,0 +1,64 @@ +google.cloud.gaming.v1.GameServerClusterView + */ +class GameServerClusterView +{ + /** + * The default / unset value. + * The API will default to the BASIC view. + * + * Generated from protobuf enum GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED = 0; + */ + const GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED = 0; + /** + * Include basic information of a GameServerCluster resource and omit + * `cluster_state`. This is the default value (for ListGameServerClusters, + * GetGameServerCluster and PreviewCreateGameServerCluster). + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * Include everything. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + + private static $valueToName = [ + self::GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED => 'GAME_SERVER_CLUSTER_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClustersServiceGrpcClient.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClustersServiceGrpcClient.php new file mode 100644 index 000000000000..b3f0ee2d9358 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClustersServiceGrpcClient.php @@ -0,0 +1,157 @@ +_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/ListGameServerClusters', + $argument, + ['\Google\Cloud\Gaming\V1\ListGameServerClustersResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single game server cluster. + * @param \Google\Cloud\Gaming\V1\GetGameServerClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetGameServerCluster(\Google\Cloud\Gaming\V1\GetGameServerClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/GetGameServerCluster', + $argument, + ['\Google\Cloud\Gaming\V1\GameServerCluster', 'decode'], + $metadata, $options); + } + + /** + * Creates a new game server cluster in a given project and location. + * @param \Google\Cloud\Gaming\V1\CreateGameServerClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateGameServerCluster(\Google\Cloud\Gaming\V1\CreateGameServerClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/CreateGameServerCluster', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Previews creation of a new game server cluster in a given project and + * location. + * @param \Google\Cloud\Gaming\V1\PreviewCreateGameServerClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function PreviewCreateGameServerCluster(\Google\Cloud\Gaming\V1\PreviewCreateGameServerClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/PreviewCreateGameServerCluster', + $argument, + ['\Google\Cloud\Gaming\V1\PreviewCreateGameServerClusterResponse', 'decode'], + $metadata, $options); + } + + /** + * Deletes a single game server cluster. + * @param \Google\Cloud\Gaming\V1\DeleteGameServerClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteGameServerCluster(\Google\Cloud\Gaming\V1\DeleteGameServerClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/DeleteGameServerCluster', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Previews deletion of a single game server cluster. + * @param \Google\Cloud\Gaming\V1\PreviewDeleteGameServerClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function PreviewDeleteGameServerCluster(\Google\Cloud\Gaming\V1\PreviewDeleteGameServerClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/PreviewDeleteGameServerCluster', + $argument, + ['\Google\Cloud\Gaming\V1\PreviewDeleteGameServerClusterResponse', 'decode'], + $metadata, $options); + } + + /** + * Patches a single game server cluster. + * @param \Google\Cloud\Gaming\V1\UpdateGameServerClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateGameServerCluster(\Google\Cloud\Gaming\V1\UpdateGameServerClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/UpdateGameServerCluster', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Previews updating a GameServerCluster. + * @param \Google\Cloud\Gaming\V1\PreviewUpdateGameServerClusterRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function PreviewUpdateGameServerCluster(\Google\Cloud\Gaming\V1\PreviewUpdateGameServerClusterRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/PreviewUpdateGameServerCluster', + $argument, + ['\Google\Cloud\Gaming\V1\PreviewUpdateGameServerClusterResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfig.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfig.php new file mode 100644 index 000000000000..02b28dc880dd --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfig.php @@ -0,0 +1,311 @@ +google.cloud.gaming.v1.GameServerConfig + */ +class GameServerConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the game server config, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. + * For example, + * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The labels associated with this game server config. Each label is a + * key-value pair. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * FleetConfig contains a list of Agones fleet specs. Only one FleetConfig + * is allowed. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.FleetConfig fleet_configs = 5; + */ + private $fleet_configs; + /** + * The autoscaling settings. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.ScalingConfig scaling_configs = 6; + */ + private $scaling_configs; + /** + * The description of the game server config. + * + * Generated from protobuf field string description = 7; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the game server config, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. + * For example, + * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels associated with this game server config. Each label is a + * key-value pair. + * @type array<\Google\Cloud\Gaming\V1\FleetConfig>|\Google\Protobuf\Internal\RepeatedField $fleet_configs + * FleetConfig contains a list of Agones fleet specs. Only one FleetConfig + * is allowed. + * @type array<\Google\Cloud\Gaming\V1\ScalingConfig>|\Google\Protobuf\Internal\RepeatedField $scaling_configs + * The autoscaling settings. + * @type string $description + * The description of the game server config. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the game server config, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. + * For example, + * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the game server config, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. + * For example, + * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. + * + * 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; + } + + /** + * Output only. The creation time. + * + * 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 creation time. + * + * 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 last-modified time. + * + * 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 last-modified time. + * + * 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; + } + + /** + * The labels associated with this game server config. Each label is a + * key-value pair. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels associated with this game server config. Each label is a + * key-value pair. + * + * 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; + } + + /** + * FleetConfig contains a list of Agones fleet specs. Only one FleetConfig + * is allowed. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.FleetConfig fleet_configs = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFleetConfigs() + { + return $this->fleet_configs; + } + + /** + * FleetConfig contains a list of Agones fleet specs. Only one FleetConfig + * is allowed. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.FleetConfig fleet_configs = 5; + * @param array<\Google\Cloud\Gaming\V1\FleetConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFleetConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\FleetConfig::class); + $this->fleet_configs = $arr; + + return $this; + } + + /** + * The autoscaling settings. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.ScalingConfig scaling_configs = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScalingConfigs() + { + return $this->scaling_configs; + } + + /** + * The autoscaling settings. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.ScalingConfig scaling_configs = 6; + * @param array<\Google\Cloud\Gaming\V1\ScalingConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScalingConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\ScalingConfig::class); + $this->scaling_configs = $arr; + + return $this; + } + + /** + * The description of the game server config. + * + * Generated from protobuf field string description = 7; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the game server config. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigOverride.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigOverride.php new file mode 100644 index 000000000000..14b12c3d3403 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigOverride.php @@ -0,0 +1,117 @@ +google.cloud.gaming.v1.GameServerConfigOverride + */ +class GameServerConfigOverride extends \Google\Protobuf\Internal\Message +{ + protected $selector; + protected $change; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Gaming\V1\RealmSelector $realms_selector + * Selector for choosing applicable realms. + * @type string $config_version + * The game server config for this override. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Selector for choosing applicable realms. + * + * Generated from protobuf field .google.cloud.gaming.v1.RealmSelector realms_selector = 1; + * @return \Google\Cloud\Gaming\V1\RealmSelector|null + */ + public function getRealmsSelector() + { + return $this->readOneof(1); + } + + public function hasRealmsSelector() + { + return $this->hasOneof(1); + } + + /** + * Selector for choosing applicable realms. + * + * Generated from protobuf field .google.cloud.gaming.v1.RealmSelector realms_selector = 1; + * @param \Google\Cloud\Gaming\V1\RealmSelector $var + * @return $this + */ + public function setRealmsSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\RealmSelector::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The game server config for this override. + * + * Generated from protobuf field string config_version = 100; + * @return string + */ + public function getConfigVersion() + { + return $this->readOneof(100); + } + + public function hasConfigVersion() + { + return $this->hasOneof(100); + } + + /** + * The game server config for this override. + * + * Generated from protobuf field string config_version = 100; + * @param string $var + * @return $this + */ + public function setConfigVersion($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * @return string + */ + public function getSelector() + { + return $this->whichOneof("selector"); + } + + /** + * @return string + */ + public function getChange() + { + return $this->whichOneof("change"); + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigsServiceGrpcClient.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigsServiceGrpcClient.php new file mode 100644 index 000000000000..e8ffca94ef24 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigsServiceGrpcClient.php @@ -0,0 +1,99 @@ +_simpleRequest('/google.cloud.gaming.v1.GameServerConfigsService/ListGameServerConfigs', + $argument, + ['\Google\Cloud\Gaming\V1\ListGameServerConfigsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single game server config. + * @param \Google\Cloud\Gaming\V1\GetGameServerConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetGameServerConfig(\Google\Cloud\Gaming\V1\GetGameServerConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerConfigsService/GetGameServerConfig', + $argument, + ['\Google\Cloud\Gaming\V1\GameServerConfig', 'decode'], + $metadata, $options); + } + + /** + * Creates a new game server config in a given project, location, and game + * server deployment. Game server configs are immutable, and are not applied + * until referenced in the game server deployment rollout resource. + * @param \Google\Cloud\Gaming\V1\CreateGameServerConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateGameServerConfig(\Google\Cloud\Gaming\V1\CreateGameServerConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerConfigsService/CreateGameServerConfig', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a single game server config. The deletion will fail if the game + * server config is referenced in a game server deployment rollout. + * @param \Google\Cloud\Gaming\V1\DeleteGameServerConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteGameServerConfig(\Google\Cloud\Gaming\V1\DeleteGameServerConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerConfigsService/DeleteGameServerConfig', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeployment.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeployment.php new file mode 100644 index 000000000000..c4eaf5178cbf --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeployment.php @@ -0,0 +1,273 @@ +google.cloud.gaming.v1.GameServerDeployment + */ +class GameServerDeployment extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the game server deployment, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * For example, + * `projects/my-project/locations/global/gameServerDeployments/my-deployment`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The labels associated with this game server deployment. Each label is a + * key-value pair. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * ETag of the resource. + * + * Generated from protobuf field string etag = 7; + */ + protected $etag = ''; + /** + * Human readable description of the game server delpoyment. + * + * Generated from protobuf field string description = 8; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the game server deployment, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * For example, + * `projects/my-project/locations/global/gameServerDeployments/my-deployment`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels associated with this game server deployment. Each label is a + * key-value pair. + * @type string $etag + * ETag of the resource. + * @type string $description + * Human readable description of the game server delpoyment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the game server deployment, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * For example, + * `projects/my-project/locations/global/gameServerDeployments/my-deployment`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the game server deployment, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * For example, + * `projects/my-project/locations/global/gameServerDeployments/my-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; + } + + /** + * Output only. The creation time. + * + * 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 creation time. + * + * 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 last-modified time. + * + * 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 last-modified time. + * + * 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; + } + + /** + * The labels associated with this game server deployment. Each label is a + * key-value pair. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels associated with this game server deployment. Each label is a + * key-value pair. + * + * 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; + } + + /** + * ETag of the resource. + * + * Generated from protobuf field string etag = 7; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * ETag of the resource. + * + * Generated from protobuf field string etag = 7; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Human readable description of the game server delpoyment. + * + * Generated from protobuf field string description = 8; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Human readable description of the game server delpoyment. + * + * Generated from protobuf field string description = 8; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentRollout.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentRollout.php new file mode 100644 index 000000000000..97d7ee92c7c2 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentRollout.php @@ -0,0 +1,290 @@ +google.cloud.gaming.v1.GameServerDeploymentRollout + */ +class GameServerDeploymentRollout extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the game server deployment rollout, in the following + * form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. + * For example, + * `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The default game server config is applied to all realms unless overridden + * in the rollout. For example, + * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. + * + * Generated from protobuf field string default_game_server_config = 4; + */ + protected $default_game_server_config = ''; + /** + * Contains the game server config rollout overrides. Overrides are processed + * in the order they are listed. Once a match is found for a realm, the rest + * of the list is not processed. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerConfigOverride game_server_config_overrides = 5; + */ + private $game_server_config_overrides; + /** + * ETag of the resource. + * + * Generated from protobuf field string etag = 6; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the game server deployment rollout, in the following + * form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. + * For example, + * `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type string $default_game_server_config + * The default game server config is applied to all realms unless overridden + * in the rollout. For example, + * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. + * @type array<\Google\Cloud\Gaming\V1\GameServerConfigOverride>|\Google\Protobuf\Internal\RepeatedField $game_server_config_overrides + * Contains the game server config rollout overrides. Overrides are processed + * in the order they are listed. Once a match is found for a realm, the rest + * of the list is not processed. + * @type string $etag + * ETag of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the game server deployment rollout, in the following + * form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. + * For example, + * `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the game server deployment rollout, in the following + * form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. + * For example, + * `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`. + * + * 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; + } + + /** + * Output only. The creation time. + * + * 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 creation time. + * + * 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 last-modified time. + * + * 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 last-modified time. + * + * 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; + } + + /** + * The default game server config is applied to all realms unless overridden + * in the rollout. For example, + * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. + * + * Generated from protobuf field string default_game_server_config = 4; + * @return string + */ + public function getDefaultGameServerConfig() + { + return $this->default_game_server_config; + } + + /** + * The default game server config is applied to all realms unless overridden + * in the rollout. For example, + * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. + * + * Generated from protobuf field string default_game_server_config = 4; + * @param string $var + * @return $this + */ + public function setDefaultGameServerConfig($var) + { + GPBUtil::checkString($var, True); + $this->default_game_server_config = $var; + + return $this; + } + + /** + * Contains the game server config rollout overrides. Overrides are processed + * in the order they are listed. Once a match is found for a realm, the rest + * of the list is not processed. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerConfigOverride game_server_config_overrides = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGameServerConfigOverrides() + { + return $this->game_server_config_overrides; + } + + /** + * Contains the game server config rollout overrides. Overrides are processed + * in the order they are listed. Once a match is found for a realm, the rest + * of the list is not processed. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerConfigOverride game_server_config_overrides = 5; + * @param array<\Google\Cloud\Gaming\V1\GameServerConfigOverride>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGameServerConfigOverrides($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\GameServerConfigOverride::class); + $this->game_server_config_overrides = $arr; + + return $this; + } + + /** + * ETag of the resource. + * + * Generated from protobuf field string etag = 6; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * ETag of the resource. + * + * Generated from protobuf field string etag = 6; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentsServiceGrpcClient.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentsServiceGrpcClient.php new file mode 100644 index 000000000000..161da3237e3c --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentsServiceGrpcClient.php @@ -0,0 +1,179 @@ +_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/ListGameServerDeployments', + $argument, + ['\Google\Cloud\Gaming\V1\ListGameServerDeploymentsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single game server deployment. + * @param \Google\Cloud\Gaming\V1\GetGameServerDeploymentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetGameServerDeployment(\Google\Cloud\Gaming\V1\GetGameServerDeploymentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/GetGameServerDeployment', + $argument, + ['\Google\Cloud\Gaming\V1\GameServerDeployment', 'decode'], + $metadata, $options); + } + + /** + * Creates a new game server deployment in a given project and location. + * @param \Google\Cloud\Gaming\V1\CreateGameServerDeploymentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateGameServerDeployment(\Google\Cloud\Gaming\V1\CreateGameServerDeploymentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/CreateGameServerDeployment', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a single game server deployment. + * @param \Google\Cloud\Gaming\V1\DeleteGameServerDeploymentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteGameServerDeployment(\Google\Cloud\Gaming\V1\DeleteGameServerDeploymentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/DeleteGameServerDeployment', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Patches a game server deployment. + * @param \Google\Cloud\Gaming\V1\UpdateGameServerDeploymentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateGameServerDeployment(\Google\Cloud\Gaming\V1\UpdateGameServerDeploymentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/UpdateGameServerDeployment', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Gets details a single game server deployment rollout. + * @param \Google\Cloud\Gaming\V1\GetGameServerDeploymentRolloutRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetGameServerDeploymentRollout(\Google\Cloud\Gaming\V1\GetGameServerDeploymentRolloutRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/GetGameServerDeploymentRollout', + $argument, + ['\Google\Cloud\Gaming\V1\GameServerDeploymentRollout', 'decode'], + $metadata, $options); + } + + /** + * Patches a single game server deployment rollout. + * The method will not return an error if the update does not affect any + * existing realms. For example - if the default_game_server_config is changed + * but all existing realms use the override, that is valid. Similarly, if a + * non existing realm is explicitly called out in game_server_config_overrides + * field, that will also not result in an error. + * @param \Google\Cloud\Gaming\V1\UpdateGameServerDeploymentRolloutRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateGameServerDeploymentRollout(\Google\Cloud\Gaming\V1\UpdateGameServerDeploymentRolloutRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/UpdateGameServerDeploymentRollout', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Previews the game server deployment rollout. This API does not mutate the + * rollout resource. + * @param \Google\Cloud\Gaming\V1\PreviewGameServerDeploymentRolloutRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function PreviewGameServerDeploymentRollout(\Google\Cloud\Gaming\V1\PreviewGameServerDeploymentRolloutRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/PreviewGameServerDeploymentRollout', + $argument, + ['\Google\Cloud\Gaming\V1\PreviewGameServerDeploymentRolloutResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves information about the current state of the game server + * deployment. Gathers all the Agones fleets and Agones autoscalers, + * including fleets running an older version of the game server deployment. + * @param \Google\Cloud\Gaming\V1\FetchDeploymentStateRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function FetchDeploymentState(\Google\Cloud\Gaming\V1\FetchDeploymentStateRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/FetchDeploymentState', + $argument, + ['\Google\Cloud\Gaming\V1\FetchDeploymentStateResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerClusterRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerClusterRequest.php new file mode 100644 index 000000000000..eafb6d4e2783 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerClusterRequest.php @@ -0,0 +1,125 @@ +google.cloud.gaming.v1.GetGameServerClusterRequest + */ +class GetGameServerClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the game server cluster to retrieve, in the following form: + * `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. View for the returned GameServerCluster objects. When `FULL` is + * specified, the `cluster_state` field is also returned in the + * GameServerCluster object, which includes the state of the referenced + * Kubernetes cluster such as versions and provider info. The default/unset + * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does + * not return the `cluster_state` field. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the game server cluster to retrieve, in the following form: + * `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`. + * @type int $view + * Optional. View for the returned GameServerCluster objects. When `FULL` is + * specified, the `cluster_state` field is also returned in the + * GameServerCluster object, which includes the state of the referenced + * Kubernetes cluster such as versions and provider info. The default/unset + * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does + * not return the `cluster_state` field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the game server cluster to retrieve, in the following form: + * `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{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 game server cluster to retrieve, in the following form: + * `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{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. View for the returned GameServerCluster objects. When `FULL` is + * specified, the `cluster_state` field is also returned in the + * GameServerCluster object, which includes the state of the referenced + * Kubernetes cluster such as versions and provider info. The default/unset + * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does + * not return the `cluster_state` field. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. View for the returned GameServerCluster objects. When `FULL` is + * specified, the `cluster_state` field is also returned in the + * GameServerCluster object, which includes the state of the referenced + * Kubernetes cluster such as versions and provider info. The default/unset + * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does + * not return the `cluster_state` field. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Gaming\V1\GameServerClusterView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerConfigRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerConfigRequest.php new file mode 100644 index 000000000000..8ef282eb2219 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerConfigRequest.php @@ -0,0 +1,71 @@ +google.cloud.gaming.v1.GetGameServerConfigRequest + */ +class GetGameServerConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the game server config to retrieve, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. + * + * 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 name of the game server config to retrieve, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the game server config to retrieve, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. + * + * Generated 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 game server config to retrieve, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRequest.php new file mode 100644 index 000000000000..e04ee5d9259c --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRequest.php @@ -0,0 +1,71 @@ +google.cloud.gaming.v1.GetGameServerDeploymentRequest + */ +class GetGameServerDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the game server delpoyment to retrieve, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * + * 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 name of the game server delpoyment to retrieve, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the game server delpoyment to retrieve, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * + * Generated 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 game server delpoyment to retrieve, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRolloutRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRolloutRequest.php new file mode 100644 index 000000000000..94863ef2ecff --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRolloutRequest.php @@ -0,0 +1,72 @@ +google.cloud.gaming.v1.GetGameServerDeploymentRolloutRequest + */ +class GetGameServerDeploymentRolloutRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the game server delpoyment to retrieve, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. + * + * 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 name of the game server delpoyment to retrieve, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the game server delpoyment to retrieve, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. + * + * Generated 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 game server delpoyment to retrieve, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetRealmRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetRealmRequest.php new file mode 100644 index 000000000000..2b70220dc1f9 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetRealmRequest.php @@ -0,0 +1,71 @@ +google.cloud.gaming.v1.GetRealmRequest + */ +class GetRealmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the realm to retrieve, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. + * + * 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 name of the realm to retrieve, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the realm to retrieve, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. + * + * Generated 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 realm to retrieve, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GkeClusterReference.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GkeClusterReference.php new file mode 100644 index 000000000000..840bdbbe75ac --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GkeClusterReference.php @@ -0,0 +1,95 @@ +google.cloud.gaming.v1.GkeClusterReference + */ +class GkeClusterReference extends \Google\Protobuf\Internal\Message +{ + /** + * The full or partial name of a GKE cluster, using one of the following + * forms: + * * `projects/{project}/locations/{location}/clusters/{cluster}` + * * `locations/{location}/clusters/{cluster}` + * * `{cluster}` + * If project and location are not specified, the project and location of the + * GameServerCluster resource are used to generate the full name of the + * GKE cluster. + * + * Generated from protobuf field string cluster = 1; + */ + protected $cluster = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster + * The full or partial name of a GKE cluster, using one of the following + * forms: + * * `projects/{project}/locations/{location}/clusters/{cluster}` + * * `locations/{location}/clusters/{cluster}` + * * `{cluster}` + * If project and location are not specified, the project and location of the + * GameServerCluster resource are used to generate the full name of the + * GKE cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * The full or partial name of a GKE cluster, using one of the following + * forms: + * * `projects/{project}/locations/{location}/clusters/{cluster}` + * * `locations/{location}/clusters/{cluster}` + * * `{cluster}` + * If project and location are not specified, the project and location of the + * GameServerCluster resource are used to generate the full name of the + * GKE cluster. + * + * Generated from protobuf field string cluster = 1; + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * The full or partial name of a GKE cluster, using one of the following + * forms: + * * `projects/{project}/locations/{location}/clusters/{cluster}` + * * `locations/{location}/clusters/{cluster}` + * * `{cluster}` + * If project and location are not specified, the project and location of the + * GameServerCluster resource are used to generate the full name of the + * GKE cluster. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState.php new file mode 100644 index 000000000000..5bf297caf838 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState.php @@ -0,0 +1,253 @@ +google.cloud.gaming.v1.KubernetesClusterState + */ +class KubernetesClusterState extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The version of Agones currently installed in the registered Kubernetes + * cluster. + * + * Generated from protobuf field string agones_version_installed = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $agones_version_installed = ''; + /** + * Output only. The version of Kubernetes that is currently used in the registered + * Kubernetes cluster (as detected by the Cloud Game Servers service). + * + * Generated from protobuf field string kubernetes_version_installed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $kubernetes_version_installed = ''; + /** + * Output only. The state for the installed versions of Agones/Kubernetes. + * + * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState.InstallationState installation_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $installation_state = 0; + /** + * Output only. The detailed error message for the installed versions of Agones/Kubernetes. + * + * Generated from protobuf field string version_installed_error_message = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $version_installed_error_message = ''; + /** + * Output only. The cloud provider type reported by the first node's providerID in the list + * of nodes on the Kubernetes endpoint. On Kubernetes platforms that support + * zero-node clusters (like GKE-on-GCP), the provider type will be empty. + * + * Generated from protobuf field string provider = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $provider = ''; + /** + * Output only. The version of Agones that is targeted to be installed in the cluster. + * + * Generated from protobuf field string agones_version_targeted = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $agones_version_targeted = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $agones_version_installed + * Output only. The version of Agones currently installed in the registered Kubernetes + * cluster. + * @type string $kubernetes_version_installed + * Output only. The version of Kubernetes that is currently used in the registered + * Kubernetes cluster (as detected by the Cloud Game Servers service). + * @type int $installation_state + * Output only. The state for the installed versions of Agones/Kubernetes. + * @type string $version_installed_error_message + * Output only. The detailed error message for the installed versions of Agones/Kubernetes. + * @type string $provider + * Output only. The cloud provider type reported by the first node's providerID in the list + * of nodes on the Kubernetes endpoint. On Kubernetes platforms that support + * zero-node clusters (like GKE-on-GCP), the provider type will be empty. + * @type string $agones_version_targeted + * Output only. The version of Agones that is targeted to be installed in the cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The version of Agones currently installed in the registered Kubernetes + * cluster. + * + * Generated from protobuf field string agones_version_installed = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAgonesVersionInstalled() + { + return $this->agones_version_installed; + } + + /** + * Output only. The version of Agones currently installed in the registered Kubernetes + * cluster. + * + * Generated from protobuf field string agones_version_installed = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAgonesVersionInstalled($var) + { + GPBUtil::checkString($var, True); + $this->agones_version_installed = $var; + + return $this; + } + + /** + * Output only. The version of Kubernetes that is currently used in the registered + * Kubernetes cluster (as detected by the Cloud Game Servers service). + * + * Generated from protobuf field string kubernetes_version_installed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getKubernetesVersionInstalled() + { + return $this->kubernetes_version_installed; + } + + /** + * Output only. The version of Kubernetes that is currently used in the registered + * Kubernetes cluster (as detected by the Cloud Game Servers service). + * + * Generated from protobuf field string kubernetes_version_installed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setKubernetesVersionInstalled($var) + { + GPBUtil::checkString($var, True); + $this->kubernetes_version_installed = $var; + + return $this; + } + + /** + * Output only. The state for the installed versions of Agones/Kubernetes. + * + * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState.InstallationState installation_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getInstallationState() + { + return $this->installation_state; + } + + /** + * Output only. The state for the installed versions of Agones/Kubernetes. + * + * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState.InstallationState installation_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setInstallationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Gaming\V1\KubernetesClusterState\InstallationState::class); + $this->installation_state = $var; + + return $this; + } + + /** + * Output only. The detailed error message for the installed versions of Agones/Kubernetes. + * + * Generated from protobuf field string version_installed_error_message = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVersionInstalledErrorMessage() + { + return $this->version_installed_error_message; + } + + /** + * Output only. The detailed error message for the installed versions of Agones/Kubernetes. + * + * Generated from protobuf field string version_installed_error_message = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVersionInstalledErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->version_installed_error_message = $var; + + return $this; + } + + /** + * Output only. The cloud provider type reported by the first node's providerID in the list + * of nodes on the Kubernetes endpoint. On Kubernetes platforms that support + * zero-node clusters (like GKE-on-GCP), the provider type will be empty. + * + * Generated from protobuf field string provider = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProvider() + { + return $this->provider; + } + + /** + * Output only. The cloud provider type reported by the first node's providerID in the list + * of nodes on the Kubernetes endpoint. On Kubernetes platforms that support + * zero-node clusters (like GKE-on-GCP), the provider type will be empty. + * + * Generated from protobuf field string provider = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProvider($var) + { + GPBUtil::checkString($var, True); + $this->provider = $var; + + return $this; + } + + /** + * Output only. The version of Agones that is targeted to be installed in the cluster. + * + * Generated from protobuf field string agones_version_targeted = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAgonesVersionTargeted() + { + return $this->agones_version_targeted; + } + + /** + * Output only. The version of Agones that is targeted to be installed in the cluster. + * + * Generated from protobuf field string agones_version_targeted = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAgonesVersionTargeted($var) + { + GPBUtil::checkString($var, True); + $this->agones_version_targeted = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState/InstallationState.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState/InstallationState.php new file mode 100644 index 000000000000..b3d990d8f9f4 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState/InstallationState.php @@ -0,0 +1,108 @@ +google.cloud.gaming.v1.KubernetesClusterState.InstallationState + */ +class InstallationState +{ + /** + * The default value. This value is used if the state is omitted. + * + * Generated from protobuf enum INSTALLATION_STATE_UNSPECIFIED = 0; + */ + const INSTALLATION_STATE_UNSPECIFIED = 0; + /** + * The combination of Agones and Kubernetes versions is supported by Google + * Cloud Game Servers. + * + * Generated from protobuf enum AGONES_KUBERNETES_VERSION_SUPPORTED = 1; + */ + const AGONES_KUBERNETES_VERSION_SUPPORTED = 1; + /** + * The installed version of Agones is not supported by Google Cloud Game + * Servers. + * + * Generated from protobuf enum AGONES_VERSION_UNSUPPORTED = 2; + */ + const AGONES_VERSION_UNSUPPORTED = 2; + /** + * The installed version of Agones is supported by Google Cloud Game + * Servers, but the installed version of Kubernetes is not recommended or + * supported by the version of Agones. + * + * Generated from protobuf enum AGONES_KUBERNETES_VERSION_UNSUPPORTED = 3; + */ + const AGONES_KUBERNETES_VERSION_UNSUPPORTED = 3; + /** + * The installed version of Agones is not recognized because the Agones + * controller's image name does not have a version string reported as + * {major}.{minor}(.{patch}). + * + * Generated from protobuf enum AGONES_VERSION_UNRECOGNIZED = 4; + */ + const AGONES_VERSION_UNRECOGNIZED = 4; + /** + * The server version of Kubernetes cluster is not recognized because the + * API server didn't return parsable version info on path/version. + * + * Generated from protobuf enum KUBERNETES_VERSION_UNRECOGNIZED = 5; + */ + const KUBERNETES_VERSION_UNRECOGNIZED = 5; + /** + * Failed to read or verify the version of Agones or Kubernetes. See + * version_installed_error_message for details. + * + * Generated from protobuf enum VERSION_VERIFICATION_FAILED = 6; + */ + const VERSION_VERIFICATION_FAILED = 6; + /** + * Agones is not installed. + * + * Generated from protobuf enum AGONES_NOT_INSTALLED = 7; + */ + const AGONES_NOT_INSTALLED = 7; + + private static $valueToName = [ + self::INSTALLATION_STATE_UNSPECIFIED => 'INSTALLATION_STATE_UNSPECIFIED', + self::AGONES_KUBERNETES_VERSION_SUPPORTED => 'AGONES_KUBERNETES_VERSION_SUPPORTED', + self::AGONES_VERSION_UNSUPPORTED => 'AGONES_VERSION_UNSUPPORTED', + self::AGONES_KUBERNETES_VERSION_UNSUPPORTED => 'AGONES_KUBERNETES_VERSION_UNSUPPORTED', + self::AGONES_VERSION_UNRECOGNIZED => 'AGONES_VERSION_UNRECOGNIZED', + self::KUBERNETES_VERSION_UNRECOGNIZED => 'KUBERNETES_VERSION_UNRECOGNIZED', + self::VERSION_VERIFICATION_FAILED => 'VERSION_VERIFICATION_FAILED', + self::AGONES_NOT_INSTALLED => 'AGONES_NOT_INSTALLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InstallationState::class, \Google\Cloud\Gaming\V1\KubernetesClusterState_InstallationState::class); + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState_InstallationState.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState_InstallationState.php new file mode 100644 index 000000000000..cd6b02cddd86 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState_InstallationState.php @@ -0,0 +1,16 @@ +google.cloud.gaming.v1.LabelSelector + */ +class LabelSelector extends \Google\Protobuf\Internal\Message +{ + /** + * Resource labels for this selector. + * + * 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 + * Resource labels for this selector. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Resource labels for this selector. + * + * Generated from protobuf field map labels = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Resource labels for this selector. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersRequest.php new file mode 100644 index 000000000000..68f9961f30f0 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersRequest.php @@ -0,0 +1,281 @@ +google.cloud.gaming.v1.ListGameServerClustersRequest + */ +class ListGameServerClustersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, in the following form: + * "projects/{project}/locations/{location}/realms/{realm}". + * + * 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, the server + * will pick an appropriate default. The server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListGameServerClustersResponse.next_page_token] to + * determine if there are more GameServerClusters left to be queried. + * + * 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 filter to apply to list results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. View for the returned GameServerCluster objects. When `FULL` is + * specified, the `cluster_state` field is also returned in the + * GameServerCluster object, which includes the state of the referenced + * Kubernetes cluster such as versions and provider info. The default/unset + * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does + * not return the `cluster_state` field. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, in the following form: + * "projects/{project}/locations/{location}/realms/{realm}". + * @type int $page_size + * Optional. The maximum number of items to return. If unspecified, the server + * will pick an appropriate default. The server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListGameServerClustersResponse.next_page_token] to + * determine if there are more GameServerClusters left to be queried. + * @type string $page_token + * Optional. The next_page_token value returned from a previous List request, if any. + * @type string $filter + * Optional. The filter to apply to list results. + * @type string $order_by + * Optional. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * @type int $view + * Optional. View for the returned GameServerCluster objects. When `FULL` is + * specified, the `cluster_state` field is also returned in the + * GameServerCluster object, which includes the state of the referenced + * Kubernetes cluster such as versions and provider info. The default/unset + * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does + * not return the `cluster_state` field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, in the following form: + * "projects/{project}/locations/{location}/realms/{realm}". + * + * Generated 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 following form: + * "projects/{project}/locations/{location}/realms/{realm}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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, the server + * will pick an appropriate default. The server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListGameServerClustersResponse.next_page_token] to + * determine if there are more GameServerClusters left to be queried. + * + * 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, the server + * will pick an appropriate default. The server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListGameServerClustersResponse.next_page_token] to + * determine if there are more GameServerClusters left to be queried. + * + * 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 filter to apply to list results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter to apply to list 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. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * 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 following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * 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. View for the returned GameServerCluster objects. When `FULL` is + * specified, the `cluster_state` field is also returned in the + * GameServerCluster object, which includes the state of the referenced + * Kubernetes cluster such as versions and provider info. The default/unset + * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does + * not return the `cluster_state` field. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. View for the returned GameServerCluster objects. When `FULL` is + * specified, the `cluster_state` field is also returned in the + * GameServerCluster object, which includes the state of the referenced + * Kubernetes cluster such as versions and provider info. The default/unset + * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does + * not return the `cluster_state` field. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Gaming\V1\GameServerClusterView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersResponse.php new file mode 100644 index 000000000000..e1747c6e8bc0 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersResponse.php @@ -0,0 +1,139 @@ +google.cloud.gaming.v1.ListGameServerClustersResponse + */ +class ListGameServerClustersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of game server clusters. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerCluster game_server_clusters = 1; + */ + private $game_server_clusters; + /** + * 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 = ''; + /** + * List of locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 4; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Gaming\V1\GameServerCluster>|\Google\Protobuf\Internal\RepeatedField $game_server_clusters + * The list of game server clusters. + * @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 + * List of locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * The list of game server clusters. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerCluster game_server_clusters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGameServerClusters() + { + return $this->game_server_clusters; + } + + /** + * The list of game server clusters. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerCluster game_server_clusters = 1; + * @param array<\Google\Cloud\Gaming\V1\GameServerCluster>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGameServerClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\GameServerCluster::class); + $this->game_server_clusters = $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; + } + + /** + * List of locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * List of locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 4; + * @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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsRequest.php new file mode 100644 index 000000000000..c2a457b0d92e --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsRequest.php @@ -0,0 +1,227 @@ +google.cloud.gaming.v1.ListGameServerConfigsRequest + */ +class ListGameServerConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`. + * + * 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, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListGameServerConfigsResponse.next_page_token] to + * determine if there are more GameServerConfigs left to be queried. + * + * 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 filter to apply to list results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`. + * @type int $page_size + * Optional. The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListGameServerConfigsResponse.next_page_token] to + * determine if there are more GameServerConfigs left to be queried. + * @type string $page_token + * Optional. The next_page_token value returned from a previous list request, if any. + * @type string $filter + * Optional. The filter to apply to list results. + * @type string $order_by + * Optional. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`. + * + * Generated 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 following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListGameServerConfigsResponse.next_page_token] to + * determine if there are more GameServerConfigs left to be queried. + * + * 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, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListGameServerConfigsResponse.next_page_token] to + * determine if there are more GameServerConfigs left to be queried. + * + * 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 filter to apply to list results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter to apply to list 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. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * 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 following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsResponse.php new file mode 100644 index 000000000000..fd617826cae9 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsResponse.php @@ -0,0 +1,139 @@ +google.cloud.gaming.v1.ListGameServerConfigsResponse + */ +class ListGameServerConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of game server configs. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerConfig game_server_configs = 1; + */ + private $game_server_configs; + /** + * 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 = ''; + /** + * List of locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 4; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Gaming\V1\GameServerConfig>|\Google\Protobuf\Internal\RepeatedField $game_server_configs + * The list of game server configs. + * @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 + * List of locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); + parent::__construct($data); + } + + /** + * The list of game server configs. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerConfig game_server_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGameServerConfigs() + { + return $this->game_server_configs; + } + + /** + * The list of game server configs. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerConfig game_server_configs = 1; + * @param array<\Google\Cloud\Gaming\V1\GameServerConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGameServerConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\GameServerConfig::class); + $this->game_server_configs = $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; + } + + /** + * List of locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * List of locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 4; + * @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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsRequest.php new file mode 100644 index 000000000000..22f09037364d --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsRequest.php @@ -0,0 +1,231 @@ +google.cloud.gaming.v1.ListGameServerDeploymentsRequest + */ +class ListGameServerDeploymentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, in the following form: + * `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, the server + * will pick an appropriate default. The server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListGameServerDeploymentsResponse.next_page_token] to + * determine if there are more GameServerDeployments left to be queried. + * + * 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 filter to apply to list results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}`. + * @type int $page_size + * Optional. The maximum number of items to return. If unspecified, the server + * will pick an appropriate default. The server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListGameServerDeploymentsResponse.next_page_token] to + * determine if there are more GameServerDeployments left to be queried. + * @type string $page_token + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @type string $filter + * Optional. The filter to apply to list results. + * @type string $order_by + * Optional. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, in the following 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 following 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; + } + + /** + * Optional. The maximum number of items to return. If unspecified, the server + * will pick an appropriate default. The server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListGameServerDeploymentsResponse.next_page_token] to + * determine if there are more GameServerDeployments left to be queried. + * + * 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, the server + * will pick an appropriate default. The server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListGameServerDeploymentsResponse.next_page_token] to + * determine if there are more GameServerDeployments left to be queried. + * + * 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 filter to apply to list results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter to apply to list 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. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * 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 following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsResponse.php new file mode 100644 index 000000000000..9ec8a5850b74 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsResponse.php @@ -0,0 +1,139 @@ +google.cloud.gaming.v1.ListGameServerDeploymentsResponse + */ +class ListGameServerDeploymentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of game server deployments. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerDeployment game_server_deployments = 1; + */ + private $game_server_deployments; + /** + * 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 = ''; + /** + * List of locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 4; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Gaming\V1\GameServerDeployment>|\Google\Protobuf\Internal\RepeatedField $game_server_deployments + * The list of game server deployments. + * @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 + * List of locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * The list of game server deployments. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerDeployment game_server_deployments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGameServerDeployments() + { + return $this->game_server_deployments; + } + + /** + * The list of game server deployments. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerDeployment game_server_deployments = 1; + * @param array<\Google\Cloud\Gaming\V1\GameServerDeployment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGameServerDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\GameServerDeployment::class); + $this->game_server_deployments = $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; + } + + /** + * List of locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * List of locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 4; + * @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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsRequest.php new file mode 100644 index 000000000000..c20090ff6fb6 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsRequest.php @@ -0,0 +1,231 @@ +google.cloud.gaming.v1.ListRealmsRequest + */ +class ListRealmsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, in the following form: + * `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, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListRealmsResponse.next_page_token] to + * determine if there are more realms left to be queried. + * + * 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 filter to apply to list results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}`. + * @type int $page_size + * Optional. The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListRealmsResponse.next_page_token] to + * determine if there are more realms left to be queried. + * @type string $page_token + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @type string $filter + * Optional. The filter to apply to list results. + * @type string $order_by + * Optional. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, in the following 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 following 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; + } + + /** + * Optional. The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListRealmsResponse.next_page_token] to + * determine if there are more realms left to be queried. + * + * 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, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.gaming.v1.ListRealmsResponse.next_page_token] to + * determine if there are more realms left to be queried. + * + * 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 filter to apply to list results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter to apply to list 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. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * 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 following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsResponse.php new file mode 100644 index 000000000000..6239ac7fda3f --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsResponse.php @@ -0,0 +1,139 @@ +google.cloud.gaming.v1.ListRealmsResponse + */ +class ListRealmsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of realms. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.Realm realms = 1; + */ + private $realms; + /** + * 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 = ''; + /** + * 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\Gaming\V1\Realm>|\Google\Protobuf\Internal\RepeatedField $realms + * The list of realms. + * @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 + * List of locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); + parent::__construct($data); + } + + /** + * The list of realms. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.Realm realms = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRealms() + { + return $this->realms; + } + + /** + * The list of realms. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.Realm realms = 1; + * @param array<\Google\Cloud\Gaming\V1\Realm>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRealms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\Realm::class); + $this->realms = $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; + } + + /** + * 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; + } + + /** + * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationMetadata.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationMetadata.php new file mode 100644 index 000000000000..fccc59db35e0 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationMetadata.php @@ -0,0 +1,383 @@ +google.cloud.gaming.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 = ''; + /** + * Output only. List of Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + /** + * Output only. Operation status for Game Services API operations. Operation status is in + * the form of key-value pairs where keys are resource IDs and the values show + * the status of the operation. In case of failures, the value includes an + * error code and error message. + * + * Generated from protobuf field map operation_status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $operation_status; + + /** + * 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. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. List of Locations that could not be reached. + * @type array|\Google\Protobuf\Internal\MapField $operation_status + * Output only. Operation status for Game Services API operations. Operation status is in + * the form of key-value pairs where keys are resource IDs and the values show + * the status of the operation. In case of failures, the value includes an + * error code and error message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\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; + } + + /** + * Output only. List of Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. List of Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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; + } + + /** + * Output only. Operation status for Game Services API operations. Operation status is in + * the form of key-value pairs where keys are resource IDs and the values show + * the status of the operation. In case of failures, the value includes an + * error code and error message. + * + * Generated from protobuf field map operation_status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getOperationStatus() + { + return $this->operation_status; + } + + /** + * Output only. Operation status for Game Services API operations. Operation status is in + * the form of key-value pairs where keys are resource IDs and the values show + * the status of the operation. In case of failures, the value includes an + * error code and error message. + * + * Generated from protobuf field map operation_status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setOperationStatus($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\OperationStatus::class); + $this->operation_status = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus.php new file mode 100644 index 000000000000..4b9bfb4f79ce --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus.php @@ -0,0 +1,133 @@ +google.cloud.gaming.v1.OperationStatus + */ +class OperationStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Whether the operation is done or still in progress. + * + * Generated from protobuf field bool done = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $done = false; + /** + * The error code in case of failures. + * + * Generated from protobuf field .google.cloud.gaming.v1.OperationStatus.ErrorCode error_code = 2; + */ + protected $error_code = 0; + /** + * The human-readable error message. + * + * Generated from protobuf field string error_message = 3; + */ + protected $error_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $done + * Output only. Whether the operation is done or still in progress. + * @type int $error_code + * The error code in case of failures. + * @type string $error_message + * The human-readable error message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Whether the operation is done or still in progress. + * + * Generated from protobuf field bool done = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getDone() + { + return $this->done; + } + + /** + * Output only. Whether the operation is done or still in progress. + * + * Generated from protobuf field bool done = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setDone($var) + { + GPBUtil::checkBool($var); + $this->done = $var; + + return $this; + } + + /** + * The error code in case of failures. + * + * Generated from protobuf field .google.cloud.gaming.v1.OperationStatus.ErrorCode error_code = 2; + * @return int + */ + public function getErrorCode() + { + return $this->error_code; + } + + /** + * The error code in case of failures. + * + * Generated from protobuf field .google.cloud.gaming.v1.OperationStatus.ErrorCode error_code = 2; + * @param int $var + * @return $this + */ + public function setErrorCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Gaming\V1\OperationStatus\ErrorCode::class); + $this->error_code = $var; + + return $this; + } + + /** + * The human-readable error message. + * + * Generated from protobuf field string error_message = 3; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * The human-readable error message. + * + * Generated from protobuf field string error_message = 3; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus/ErrorCode.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus/ErrorCode.php new file mode 100644 index 000000000000..80dd9072d84a --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus/ErrorCode.php @@ -0,0 +1,61 @@ +google.cloud.gaming.v1.OperationStatus.ErrorCode + */ +class ErrorCode +{ + /** + * Generated from protobuf enum ERROR_CODE_UNSPECIFIED = 0; + */ + const ERROR_CODE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum INTERNAL_ERROR = 1; + */ + const INTERNAL_ERROR = 1; + /** + * Generated from protobuf enum PERMISSION_DENIED = 2; + */ + const PERMISSION_DENIED = 2; + /** + * Generated from protobuf enum CLUSTER_CONNECTION = 3; + */ + const CLUSTER_CONNECTION = 3; + + private static $valueToName = [ + self::ERROR_CODE_UNSPECIFIED => 'ERROR_CODE_UNSPECIFIED', + self::INTERNAL_ERROR => 'INTERNAL_ERROR', + self::PERMISSION_DENIED => 'PERMISSION_DENIED', + self::CLUSTER_CONNECTION => 'CLUSTER_CONNECTION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ErrorCode::class, \Google\Cloud\Gaming\V1\OperationStatus_ErrorCode::class); + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus_ErrorCode.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus_ErrorCode.php new file mode 100644 index 000000000000..8ffb98e421f9 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus_ErrorCode.php @@ -0,0 +1,16 @@ +google.cloud.gaming.v1.PreviewCreateGameServerClusterRequest + */ +class PreviewCreateGameServerClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID of the game server cluster resource to be created. + * + * Generated from protobuf field string game_server_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $game_server_cluster_id = ''; + /** + * Required. The game server cluster resource to be created. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $game_server_cluster = null; + /** + * Optional. The target timestamp to compute the preview. + * + * Generated from protobuf field .google.protobuf.Timestamp preview_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $preview_time = null; + /** + * Optional. This field is deprecated, preview will always return + * KubernetesClusterState. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. + * @type string $game_server_cluster_id + * Required. The ID of the game server cluster resource to be created. + * @type \Google\Cloud\Gaming\V1\GameServerCluster $game_server_cluster + * Required. The game server cluster resource to be created. + * @type \Google\Protobuf\Timestamp $preview_time + * Optional. The target timestamp to compute the preview. + * @type int $view + * Optional. This field is deprecated, preview will always return + * KubernetesClusterState. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. + * + * Generated 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 following form: + * `projects/{project}/locations/{location}/realms/{realm}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 game server cluster resource to be created. + * + * Generated from protobuf field string game_server_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGameServerClusterId() + { + return $this->game_server_cluster_id; + } + + /** + * Required. The ID of the game server cluster resource to be created. + * + * Generated from protobuf field string game_server_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGameServerClusterId($var) + { + GPBUtil::checkString($var, True); + $this->game_server_cluster_id = $var; + + return $this; + } + + /** + * Required. The game server cluster resource to be created. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Gaming\V1\GameServerCluster|null + */ + public function getGameServerCluster() + { + return $this->game_server_cluster; + } + + public function hasGameServerCluster() + { + return isset($this->game_server_cluster); + } + + public function clearGameServerCluster() + { + unset($this->game_server_cluster); + } + + /** + * Required. The game server cluster resource to be created. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Gaming\V1\GameServerCluster $var + * @return $this + */ + public function setGameServerCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerCluster::class); + $this->game_server_cluster = $var; + + return $this; + } + + /** + * Optional. The target timestamp to compute the preview. + * + * Generated from protobuf field .google.protobuf.Timestamp preview_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPreviewTime() + { + return $this->preview_time; + } + + public function hasPreviewTime() + { + return isset($this->preview_time); + } + + public function clearPreviewTime() + { + unset($this->preview_time); + } + + /** + * Optional. The target timestamp to compute the preview. + * + * Generated from protobuf field .google.protobuf.Timestamp preview_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPreviewTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->preview_time = $var; + + return $this; + } + + /** + * Optional. This field is deprecated, preview will always return + * KubernetesClusterState. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return int + * @deprecated + */ + public function getView() + { + @trigger_error('view is deprecated.', E_USER_DEPRECATED); + return $this->view; + } + + /** + * Optional. This field is deprecated, preview will always return + * KubernetesClusterState. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + * @deprecated + */ + public function setView($var) + { + @trigger_error('view is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Cloud\Gaming\V1\GameServerClusterView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewCreateGameServerClusterResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewCreateGameServerClusterResponse.php new file mode 100644 index 000000000000..1d14622447e3 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewCreateGameServerClusterResponse.php @@ -0,0 +1,160 @@ +google.cloud.gaming.v1.PreviewCreateGameServerClusterResponse + */ +class PreviewCreateGameServerClusterResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The ETag of the game server cluster. + * + * Generated from protobuf field string etag = 2; + */ + protected $etag = ''; + /** + * The target state. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; + */ + protected $target_state = null; + /** + * Output only. The state of the Kubernetes cluster in preview, this will be available if + * 'view' is set to `FULL` in the relevant List/Get/Preview request. + * + * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState cluster_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cluster_state = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $etag + * The ETag of the game server cluster. + * @type \Google\Cloud\Gaming\V1\TargetState $target_state + * The target state. + * @type \Google\Cloud\Gaming\V1\KubernetesClusterState $cluster_state + * Output only. The state of the Kubernetes cluster in preview, this will be available if + * 'view' is set to `FULL` in the relevant List/Get/Preview request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * The ETag of the game server cluster. + * + * Generated from protobuf field string etag = 2; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The ETag of the game server cluster. + * + * Generated from protobuf field string etag = 2; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * The target state. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; + * @return \Google\Cloud\Gaming\V1\TargetState|null + */ + public function getTargetState() + { + return $this->target_state; + } + + public function hasTargetState() + { + return isset($this->target_state); + } + + public function clearTargetState() + { + unset($this->target_state); + } + + /** + * The target state. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; + * @param \Google\Cloud\Gaming\V1\TargetState $var + * @return $this + */ + public function setTargetState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\TargetState::class); + $this->target_state = $var; + + return $this; + } + + /** + * Output only. The state of the Kubernetes cluster in preview, this will be available if + * 'view' is set to `FULL` in the relevant List/Get/Preview request. + * + * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState cluster_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Gaming\V1\KubernetesClusterState|null + */ + public function getClusterState() + { + return $this->cluster_state; + } + + public function hasClusterState() + { + return isset($this->cluster_state); + } + + public function clearClusterState() + { + unset($this->cluster_state); + } + + /** + * Output only. The state of the Kubernetes cluster in preview, this will be available if + * 'view' is set to `FULL` in the relevant List/Get/Preview request. + * + * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState cluster_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Gaming\V1\KubernetesClusterState $var + * @return $this + */ + public function setClusterState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\KubernetesClusterState::class); + $this->cluster_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterRequest.php new file mode 100644 index 000000000000..7fff9d6dbd17 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterRequest.php @@ -0,0 +1,115 @@ +google.cloud.gaming.v1.PreviewDeleteGameServerClusterRequest + */ +class PreviewDeleteGameServerClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the game server cluster to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The target timestamp to compute the preview. + * + * Generated from protobuf field .google.protobuf.Timestamp preview_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $preview_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the game server cluster to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`. + * @type \Google\Protobuf\Timestamp $preview_time + * Optional. The target timestamp to compute the preview. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the game server cluster to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerClusters/{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 game server cluster to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerClusters/{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. The target timestamp to compute the preview. + * + * Generated from protobuf field .google.protobuf.Timestamp preview_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPreviewTime() + { + return $this->preview_time; + } + + public function hasPreviewTime() + { + return isset($this->preview_time); + } + + public function clearPreviewTime() + { + unset($this->preview_time); + } + + /** + * Optional. The target timestamp to compute the preview. + * + * Generated from protobuf field .google.protobuf.Timestamp preview_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPreviewTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->preview_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterResponse.php new file mode 100644 index 000000000000..c640460cc14e --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterResponse.php @@ -0,0 +1,112 @@ +google.cloud.gaming.v1.PreviewDeleteGameServerClusterResponse + */ +class PreviewDeleteGameServerClusterResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The ETag of the game server cluster. + * + * Generated from protobuf field string etag = 2; + */ + protected $etag = ''; + /** + * The target state. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; + */ + protected $target_state = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $etag + * The ETag of the game server cluster. + * @type \Google\Cloud\Gaming\V1\TargetState $target_state + * The target state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * The ETag of the game server cluster. + * + * Generated from protobuf field string etag = 2; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The ETag of the game server cluster. + * + * Generated from protobuf field string etag = 2; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * The target state. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; + * @return \Google\Cloud\Gaming\V1\TargetState|null + */ + public function getTargetState() + { + return $this->target_state; + } + + public function hasTargetState() + { + return isset($this->target_state); + } + + public function clearTargetState() + { + unset($this->target_state); + } + + /** + * The target state. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; + * @param \Google\Cloud\Gaming\V1\TargetState $var + * @return $this + */ + public function setTargetState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\TargetState::class); + $this->target_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutRequest.php new file mode 100644 index 000000000000..f832098d5e61 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutRequest.php @@ -0,0 +1,181 @@ +google.cloud.gaming.v1.PreviewGameServerDeploymentRolloutRequest + */ +class PreviewGameServerDeploymentRolloutRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The game server deployment rollout to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeploymentRollout rollout = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rollout = null; + /** + * Optional. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Optional. The target timestamp to compute the preview. Defaults to the immediately + * after the proposed rollout completes. + * + * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $preview_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Gaming\V1\GameServerDeploymentRollout $rollout + * Required. The game server deployment rollout to be updated. + * Only fields specified in update_mask are updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @type \Google\Protobuf\Timestamp $preview_time + * Optional. The target timestamp to compute the preview. Defaults to the immediately + * after the proposed rollout completes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The game server deployment rollout to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeploymentRollout rollout = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Gaming\V1\GameServerDeploymentRollout|null + */ + public function getRollout() + { + return $this->rollout; + } + + public function hasRollout() + { + return isset($this->rollout); + } + + public function clearRollout() + { + unset($this->rollout); + } + + /** + * Required. The game server deployment rollout to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeploymentRollout rollout = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Gaming\V1\GameServerDeploymentRollout $var + * @return $this + */ + public function setRollout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerDeploymentRollout::class); + $this->rollout = $var; + + return $this; + } + + /** + * Optional. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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; + } + + /** + * Optional. The target timestamp to compute the preview. Defaults to the immediately + * after the proposed rollout completes. + * + * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPreviewTime() + { + return $this->preview_time; + } + + public function hasPreviewTime() + { + return isset($this->preview_time); + } + + public function clearPreviewTime() + { + unset($this->preview_time); + } + + /** + * Optional. The target timestamp to compute the preview. Defaults to the immediately + * after the proposed rollout completes. + * + * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPreviewTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->preview_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutResponse.php new file mode 100644 index 000000000000..db7ed288e165 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutResponse.php @@ -0,0 +1,146 @@ +google.cloud.gaming.v1.PreviewGameServerDeploymentRolloutResponse + */ +class PreviewGameServerDeploymentRolloutResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Locations that could not be reached on this request. + * + * Generated from protobuf field repeated string unavailable = 2; + */ + private $unavailable; + /** + * ETag of the game server deployment. + * + * Generated from protobuf field string etag = 3; + */ + protected $etag = ''; + /** + * The target state. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 4; + */ + protected $target_state = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $unavailable + * Locations that could not be reached on this request. + * @type string $etag + * ETag of the game server deployment. + * @type \Google\Cloud\Gaming\V1\TargetState $target_state + * The target state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Locations that could not be reached on this request. + * + * Generated from protobuf field repeated string unavailable = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnavailable() + { + return $this->unavailable; + } + + /** + * Locations that could not be reached on this request. + * + * Generated from protobuf field repeated string unavailable = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnavailable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unavailable = $arr; + + return $this; + } + + /** + * ETag of the game server deployment. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * ETag of the game server deployment. + * + * Generated from protobuf field string etag = 3; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * The target state. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 4; + * @return \Google\Cloud\Gaming\V1\TargetState|null + */ + public function getTargetState() + { + return $this->target_state; + } + + public function hasTargetState() + { + return isset($this->target_state); + } + + public function clearTargetState() + { + unset($this->target_state); + } + + /** + * The target state. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 4; + * @param \Google\Cloud\Gaming\V1\TargetState $var + * @return $this + */ + public function setTargetState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\TargetState::class); + $this->target_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateRequest.php new file mode 100644 index 000000000000..3a42b331a426 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateRequest.php @@ -0,0 +1,177 @@ +google.cloud.gaming.v1.PreviewRealmUpdateRequest + */ +class PreviewRealmUpdateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The realm to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $realm = null; + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. The target timestamp to compute the preview. + * + * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $preview_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Gaming\V1\Realm $realm + * Required. The realm to be updated. + * Only fields specified in update_mask are updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @type \Google\Protobuf\Timestamp $preview_time + * Optional. The target timestamp to compute the preview. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); + parent::__construct($data); + } + + /** + * Required. The realm to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Gaming\V1\Realm|null + */ + public function getRealm() + { + return $this->realm; + } + + public function hasRealm() + { + return isset($this->realm); + } + + public function clearRealm() + { + unset($this->realm); + } + + /** + * Required. The realm to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Gaming\V1\Realm $var + * @return $this + */ + public function setRealm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\Realm::class); + $this->realm = $var; + + return $this; + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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 update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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. The target timestamp to compute the preview. + * + * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPreviewTime() + { + return $this->preview_time; + } + + public function hasPreviewTime() + { + return isset($this->preview_time); + } + + public function clearPreviewTime() + { + unset($this->preview_time); + } + + /** + * Optional. The target timestamp to compute the preview. + * + * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPreviewTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->preview_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateResponse.php new file mode 100644 index 000000000000..54be6afca495 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateResponse.php @@ -0,0 +1,111 @@ +google.cloud.gaming.v1.PreviewRealmUpdateResponse + */ +class PreviewRealmUpdateResponse extends \Google\Protobuf\Internal\Message +{ + /** + * ETag of the realm. + * + * Generated from protobuf field string etag = 2; + */ + protected $etag = ''; + /** + * The target state. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; + */ + protected $target_state = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $etag + * ETag of the realm. + * @type \Google\Cloud\Gaming\V1\TargetState $target_state + * The target state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); + parent::__construct($data); + } + + /** + * ETag of the realm. + * + * Generated from protobuf field string etag = 2; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * ETag of the realm. + * + * Generated from protobuf field string etag = 2; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * The target state. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; + * @return \Google\Cloud\Gaming\V1\TargetState|null + */ + public function getTargetState() + { + return $this->target_state; + } + + public function hasTargetState() + { + return isset($this->target_state); + } + + public function clearTargetState() + { + unset($this->target_state); + } + + /** + * The target state. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; + * @param \Google\Cloud\Gaming\V1\TargetState $var + * @return $this + */ + public function setTargetState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\TargetState::class); + $this->target_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterRequest.php new file mode 100644 index 000000000000..e62448b13902 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterRequest.php @@ -0,0 +1,177 @@ +google.cloud.gaming.v1.PreviewUpdateGameServerClusterRequest + */ +class PreviewUpdateGameServerClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The game server cluster to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $game_server_cluster = null; + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. The target timestamp to compute the preview. + * + * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $preview_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Gaming\V1\GameServerCluster $game_server_cluster + * Required. The game server cluster to be updated. + * Only fields specified in update_mask are updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @type \Google\Protobuf\Timestamp $preview_time + * Optional. The target timestamp to compute the preview. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * Required. The game server cluster to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Gaming\V1\GameServerCluster|null + */ + public function getGameServerCluster() + { + return $this->game_server_cluster; + } + + public function hasGameServerCluster() + { + return isset($this->game_server_cluster); + } + + public function clearGameServerCluster() + { + unset($this->game_server_cluster); + } + + /** + * Required. The game server cluster to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Gaming\V1\GameServerCluster $var + * @return $this + */ + public function setGameServerCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerCluster::class); + $this->game_server_cluster = $var; + + return $this; + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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. The target timestamp to compute the preview. + * + * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPreviewTime() + { + return $this->preview_time; + } + + public function hasPreviewTime() + { + return isset($this->preview_time); + } + + public function clearPreviewTime() + { + unset($this->preview_time); + } + + /** + * Optional. The target timestamp to compute the preview. + * + * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPreviewTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->preview_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterResponse.php new file mode 100644 index 000000000000..d8f4bb1541c3 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterResponse.php @@ -0,0 +1,111 @@ +google.cloud.gaming.v1.PreviewUpdateGameServerClusterResponse + */ +class PreviewUpdateGameServerClusterResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The ETag of the game server cluster. + * + * Generated from protobuf field string etag = 2; + */ + protected $etag = ''; + /** + * The target state. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; + */ + protected $target_state = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $etag + * The ETag of the game server cluster. + * @type \Google\Cloud\Gaming\V1\TargetState $target_state + * The target state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * The ETag of the game server cluster. + * + * Generated from protobuf field string etag = 2; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The ETag of the game server cluster. + * + * Generated from protobuf field string etag = 2; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * The target state. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; + * @return \Google\Cloud\Gaming\V1\TargetState|null + */ + public function getTargetState() + { + return $this->target_state; + } + + public function hasTargetState() + { + return isset($this->target_state); + } + + public function clearTargetState() + { + unset($this->target_state); + } + + /** + * The target state. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; + * @param \Google\Cloud\Gaming\V1\TargetState $var + * @return $this + */ + public function setTargetState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\TargetState::class); + $this->target_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Realm.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Realm.php new file mode 100644 index 000000000000..69c976834791 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Realm.php @@ -0,0 +1,307 @@ +google.cloud.gaming.v1.Realm + */ +class Realm extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the realm, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. For + * example, `projects/my-project/locations/{location}/realms/my-realm`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last-modified time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The labels associated with this realm. Each label is a key-value pair. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Required. Time zone where all policies targeting this realm are evaluated. The value + * of this field must be from the IANA time zone database: + * https://www.iana.org/time-zones. + * + * Generated from protobuf field string time_zone = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $time_zone = ''; + /** + * ETag of the resource. + * + * Generated from protobuf field string etag = 7; + */ + protected $etag = ''; + /** + * Human readable description of the realm. + * + * Generated from protobuf field string description = 8; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the realm, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. For + * example, `projects/my-project/locations/{location}/realms/my-realm`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last-modified time. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels associated with this realm. Each label is a key-value pair. + * @type string $time_zone + * Required. Time zone where all policies targeting this realm are evaluated. The value + * of this field must be from the IANA time zone database: + * https://www.iana.org/time-zones. + * @type string $etag + * ETag of the resource. + * @type string $description + * Human readable description of the realm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the realm, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. For + * example, `projects/my-project/locations/{location}/realms/my-realm`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the realm, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. For + * example, `projects/my-project/locations/{location}/realms/my-realm`. + * + * 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; + } + + /** + * Output only. The creation time. + * + * 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 creation time. + * + * 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 last-modified time. + * + * 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 last-modified time. + * + * 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; + } + + /** + * The labels associated with this realm. Each label is a key-value pair. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels associated with this realm. Each label is a key-value pair. + * + * 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; + } + + /** + * Required. Time zone where all policies targeting this realm are evaluated. The value + * of this field must be from the IANA time zone database: + * https://www.iana.org/time-zones. + * + * Generated from protobuf field string time_zone = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * Required. Time zone where all policies targeting this realm are evaluated. The value + * of this field must be from the IANA time zone database: + * https://www.iana.org/time-zones. + * + * Generated from protobuf field string time_zone = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * ETag of the resource. + * + * Generated from protobuf field string etag = 7; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * ETag of the resource. + * + * Generated from protobuf field string etag = 7; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Human readable description of the realm. + * + * Generated from protobuf field string description = 8; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Human readable description of the realm. + * + * Generated from protobuf field string description = 8; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmSelector.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmSelector.php new file mode 100644 index 000000000000..062ffb20f315 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmSelector.php @@ -0,0 +1,67 @@ +google.cloud.gaming.v1.RealmSelector + */ +class RealmSelector extends \Google\Protobuf\Internal\Message +{ + /** + * List of realms to match. + * + * Generated from protobuf field repeated string realms = 1; + */ + private $realms; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $realms + * List of realms to match. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * List of realms to match. + * + * Generated from protobuf field repeated string realms = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRealms() + { + return $this->realms; + } + + /** + * List of realms to match. + * + * Generated from protobuf field repeated string realms = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRealms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->realms = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmsServiceGrpcClient.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmsServiceGrpcClient.php new file mode 100644 index 000000000000..19a0749215a5 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmsServiceGrpcClient.php @@ -0,0 +1,126 @@ +_simpleRequest('/google.cloud.gaming.v1.RealmsService/ListRealms', + $argument, + ['\Google\Cloud\Gaming\V1\ListRealmsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single realm. + * @param \Google\Cloud\Gaming\V1\GetRealmRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetRealm(\Google\Cloud\Gaming\V1\GetRealmRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.RealmsService/GetRealm', + $argument, + ['\Google\Cloud\Gaming\V1\Realm', 'decode'], + $metadata, $options); + } + + /** + * Creates a new realm in a given project and location. + * @param \Google\Cloud\Gaming\V1\CreateRealmRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateRealm(\Google\Cloud\Gaming\V1\CreateRealmRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.RealmsService/CreateRealm', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a single realm. + * @param \Google\Cloud\Gaming\V1\DeleteRealmRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteRealm(\Google\Cloud\Gaming\V1\DeleteRealmRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.RealmsService/DeleteRealm', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Patches a single realm. + * @param \Google\Cloud\Gaming\V1\UpdateRealmRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateRealm(\Google\Cloud\Gaming\V1\UpdateRealmRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.RealmsService/UpdateRealm', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Previews patches to a single realm. + * @param \Google\Cloud\Gaming\V1\PreviewRealmUpdateRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function PreviewRealmUpdate(\Google\Cloud\Gaming\V1\PreviewRealmUpdateRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gaming.v1.RealmsService/PreviewRealmUpdate', + $argument, + ['\Google\Cloud\Gaming\V1\PreviewRealmUpdateResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ScalingConfig.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ScalingConfig.php new file mode 100644 index 000000000000..b211fac9b3b6 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ScalingConfig.php @@ -0,0 +1,181 @@ +google.cloud.gaming.v1.ScalingConfig + */ +class ScalingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Scaling Config + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. Agones fleet autoscaler spec. Example spec: + * https://agones.dev/site/docs/reference/fleetautoscaler/ + * + * Generated from protobuf field string fleet_autoscaler_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $fleet_autoscaler_spec = ''; + /** + * Labels used to identify the game server clusters to which this Agones + * scaling config applies. A game server cluster is subject to this Agones + * scaling config if its labels match any of the selector entries. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.LabelSelector selectors = 4; + */ + private $selectors; + /** + * The schedules to which this Scaling Config applies. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.Schedule schedules = 5; + */ + private $schedules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Scaling Config + * @type string $fleet_autoscaler_spec + * Required. Agones fleet autoscaler spec. Example spec: + * https://agones.dev/site/docs/reference/fleetautoscaler/ + * @type array<\Google\Cloud\Gaming\V1\LabelSelector>|\Google\Protobuf\Internal\RepeatedField $selectors + * Labels used to identify the game server clusters to which this Agones + * scaling config applies. A game server cluster is subject to this Agones + * scaling config if its labels match any of the selector entries. + * @type array<\Google\Cloud\Gaming\V1\Schedule>|\Google\Protobuf\Internal\RepeatedField $schedules + * The schedules to which this Scaling Config applies. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Scaling Config + * + * 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 Scaling Config + * + * 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. Agones fleet autoscaler spec. Example spec: + * https://agones.dev/site/docs/reference/fleetautoscaler/ + * + * Generated from protobuf field string fleet_autoscaler_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFleetAutoscalerSpec() + { + return $this->fleet_autoscaler_spec; + } + + /** + * Required. Agones fleet autoscaler spec. Example spec: + * https://agones.dev/site/docs/reference/fleetautoscaler/ + * + * Generated from protobuf field string fleet_autoscaler_spec = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFleetAutoscalerSpec($var) + { + GPBUtil::checkString($var, True); + $this->fleet_autoscaler_spec = $var; + + return $this; + } + + /** + * Labels used to identify the game server clusters to which this Agones + * scaling config applies. A game server cluster is subject to this Agones + * scaling config if its labels match any of the selector entries. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.LabelSelector selectors = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSelectors() + { + return $this->selectors; + } + + /** + * Labels used to identify the game server clusters to which this Agones + * scaling config applies. A game server cluster is subject to this Agones + * scaling config if its labels match any of the selector entries. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.LabelSelector selectors = 4; + * @param array<\Google\Cloud\Gaming\V1\LabelSelector>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSelectors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\LabelSelector::class); + $this->selectors = $arr; + + return $this; + } + + /** + * The schedules to which this Scaling Config applies. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.Schedule schedules = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSchedules() + { + return $this->schedules; + } + + /** + * The schedules to which this Scaling Config applies. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.Schedule schedules = 5; + * @param array<\Google\Cloud\Gaming\V1\Schedule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSchedules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\Schedule::class); + $this->schedules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Schedule.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Schedule.php new file mode 100644 index 000000000000..20928aea9944 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Schedule.php @@ -0,0 +1,219 @@ +google.cloud.gaming.v1.Schedule + */ +class Schedule extends \Google\Protobuf\Internal\Message +{ + /** + * The start time of the event. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The end time of the event. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The duration for the cron job event. The duration of the event is effective + * after the cron job's start time. + * + * Generated from protobuf field .google.protobuf.Duration cron_job_duration = 3; + */ + protected $cron_job_duration = null; + /** + * The cron definition of the scheduled event. See + * https://en.wikipedia.org/wiki/Cron. Cron spec specifies the local time as + * defined by the realm. + * + * Generated from protobuf field string cron_spec = 4; + */ + protected $cron_spec = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The start time of the event. + * @type \Google\Protobuf\Timestamp $end_time + * The end time of the event. + * @type \Google\Protobuf\Duration $cron_job_duration + * The duration for the cron job event. The duration of the event is effective + * after the cron job's start time. + * @type string $cron_spec + * The cron definition of the scheduled event. See + * https://en.wikipedia.org/wiki/Cron. Cron spec specifies the local time as + * defined by the realm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The start time of the event. + * + * 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 start time of the event. + * + * 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 end time of the event. + * + * 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 end time of the event. + * + * 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 duration for the cron job event. The duration of the event is effective + * after the cron job's start time. + * + * Generated from protobuf field .google.protobuf.Duration cron_job_duration = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getCronJobDuration() + { + return $this->cron_job_duration; + } + + public function hasCronJobDuration() + { + return isset($this->cron_job_duration); + } + + public function clearCronJobDuration() + { + unset($this->cron_job_duration); + } + + /** + * The duration for the cron job event. The duration of the event is effective + * after the cron job's start time. + * + * Generated from protobuf field .google.protobuf.Duration cron_job_duration = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setCronJobDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->cron_job_duration = $var; + + return $this; + } + + /** + * The cron definition of the scheduled event. See + * https://en.wikipedia.org/wiki/Cron. Cron spec specifies the local time as + * defined by the realm. + * + * Generated from protobuf field string cron_spec = 4; + * @return string + */ + public function getCronSpec() + { + return $this->cron_spec; + } + + /** + * The cron definition of the scheduled event. See + * https://en.wikipedia.org/wiki/Cron. Cron spec specifies the local time as + * defined by the realm. + * + * Generated from protobuf field string cron_spec = 4; + * @param string $var + * @return $this + */ + public function setCronSpec($var) + { + GPBUtil::checkString($var, True); + $this->cron_spec = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/SpecSource.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/SpecSource.php new file mode 100644 index 000000000000..4a91da42f36a --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/SpecSource.php @@ -0,0 +1,109 @@ +google.cloud.gaming.v1.SpecSource + */ +class SpecSource extends \Google\Protobuf\Internal\Message +{ + /** + * The game server config resource. Uses the form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}/configs/{config_id}`. + * + * Generated from protobuf field string game_server_config_name = 1; + */ + protected $game_server_config_name = ''; + /** + * The name of the Agones leet config or Agones scaling config used to derive + * the Agones fleet or Agones autoscaler spec. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $game_server_config_name + * The game server config resource. Uses the form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}/configs/{config_id}`. + * @type string $name + * The name of the Agones leet config or Agones scaling config used to derive + * the Agones fleet or Agones autoscaler spec. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The game server config resource. Uses the form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}/configs/{config_id}`. + * + * Generated from protobuf field string game_server_config_name = 1; + * @return string + */ + public function getGameServerConfigName() + { + return $this->game_server_config_name; + } + + /** + * The game server config resource. Uses the form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}/configs/{config_id}`. + * + * Generated from protobuf field string game_server_config_name = 1; + * @param string $var + * @return $this + */ + public function setGameServerConfigName($var) + { + GPBUtil::checkString($var, True); + $this->game_server_config_name = $var; + + return $this; + } + + /** + * The name of the Agones leet config or Agones scaling config used to derive + * the Agones fleet or Agones autoscaler spec. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the Agones leet config or Agones scaling config used to derive + * the Agones fleet or Agones autoscaler spec. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails.php new file mode 100644 index 000000000000..f3fb6e45dc2e --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails.php @@ -0,0 +1,143 @@ +google.cloud.gaming.v1.TargetDetails + */ +class TargetDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The game server cluster name. Uses the form: + * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. + * + * Generated from protobuf field string game_server_cluster_name = 1; + */ + protected $game_server_cluster_name = ''; + /** + * The game server deployment name. Uses the form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}`. + * + * Generated from protobuf field string game_server_deployment_name = 2; + */ + protected $game_server_deployment_name = ''; + /** + * Agones fleet details for game server clusters and game server deployments. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails fleet_details = 3; + */ + private $fleet_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $game_server_cluster_name + * The game server cluster name. Uses the form: + * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. + * @type string $game_server_deployment_name + * The game server deployment name. Uses the form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}`. + * @type array<\Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails>|\Google\Protobuf\Internal\RepeatedField $fleet_details + * Agones fleet details for game server clusters and game server deployments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The game server cluster name. Uses the form: + * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. + * + * Generated from protobuf field string game_server_cluster_name = 1; + * @return string + */ + public function getGameServerClusterName() + { + return $this->game_server_cluster_name; + } + + /** + * The game server cluster name. Uses the form: + * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. + * + * Generated from protobuf field string game_server_cluster_name = 1; + * @param string $var + * @return $this + */ + public function setGameServerClusterName($var) + { + GPBUtil::checkString($var, True); + $this->game_server_cluster_name = $var; + + return $this; + } + + /** + * The game server deployment name. Uses the form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}`. + * + * Generated from protobuf field string game_server_deployment_name = 2; + * @return string + */ + public function getGameServerDeploymentName() + { + return $this->game_server_deployment_name; + } + + /** + * The game server deployment name. Uses the form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}`. + * + * Generated from protobuf field string game_server_deployment_name = 2; + * @param string $var + * @return $this + */ + public function setGameServerDeploymentName($var) + { + GPBUtil::checkString($var, True); + $this->game_server_deployment_name = $var; + + return $this; + } + + /** + * Agones fleet details for game server clusters and game server deployments. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails fleet_details = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFleetDetails() + { + return $this->fleet_details; + } + + /** + * Agones fleet details for game server clusters and game server deployments. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails fleet_details = 3; + * @param array<\Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFleetDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails::class); + $this->fleet_details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails.php new file mode 100644 index 000000000000..514d4fd81306 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails.php @@ -0,0 +1,124 @@ +google.cloud.gaming.v1.TargetDetails.TargetFleetDetails + */ +class TargetFleetDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Reference to target Agones fleet. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleet fleet = 1; + */ + protected $fleet = null; + /** + * Reference to target Agones fleet autoscaling policy. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleetAutoscaler autoscaler = 2; + */ + protected $autoscaler = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleet $fleet + * Reference to target Agones fleet. + * @type \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleetAutoscaler $autoscaler + * Reference to target Agones fleet autoscaling policy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Reference to target Agones fleet. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleet fleet = 1; + * @return \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleet|null + */ + public function getFleet() + { + return $this->fleet; + } + + public function hasFleet() + { + return isset($this->fleet); + } + + public function clearFleet() + { + unset($this->fleet); + } + + /** + * Reference to target Agones fleet. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleet fleet = 1; + * @param \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleet $var + * @return $this + */ + public function setFleet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleet::class); + $this->fleet = $var; + + return $this; + } + + /** + * Reference to target Agones fleet autoscaling policy. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleetAutoscaler autoscaler = 2; + * @return \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleetAutoscaler|null + */ + public function getAutoscaler() + { + return $this->autoscaler; + } + + public function hasAutoscaler() + { + return isset($this->autoscaler); + } + + public function clearAutoscaler() + { + unset($this->autoscaler); + } + + /** + * Reference to target Agones fleet autoscaling policy. + * + * Generated from protobuf field .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleetAutoscaler autoscaler = 2; + * @param \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleetAutoscaler $var + * @return $this + */ + public function setAutoscaler($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleetAutoscaler::class); + $this->autoscaler = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TargetFleetDetails::class, \Google\Cloud\Gaming\V1\TargetDetails_TargetFleetDetails::class); + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleet.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleet.php new file mode 100644 index 000000000000..a16791a16363 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleet.php @@ -0,0 +1,118 @@ +google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleet + */ +class TargetFleet extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Agones fleet. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Encapsulates the source of the Agones fleet spec. + * The Agones fleet spec source. + * + * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 2; + */ + protected $spec_source = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the Agones fleet. + * @type \Google\Cloud\Gaming\V1\SpecSource $spec_source + * Encapsulates the source of the Agones fleet spec. + * The Agones fleet spec source. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Agones fleet. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the Agones fleet. + * + * 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; + } + + /** + * Encapsulates the source of the Agones fleet spec. + * The Agones fleet spec source. + * + * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 2; + * @return \Google\Cloud\Gaming\V1\SpecSource|null + */ + public function getSpecSource() + { + return $this->spec_source; + } + + public function hasSpecSource() + { + return isset($this->spec_source); + } + + public function clearSpecSource() + { + unset($this->spec_source); + } + + /** + * Encapsulates the source of the Agones fleet spec. + * The Agones fleet spec source. + * + * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 2; + * @param \Google\Cloud\Gaming\V1\SpecSource $var + * @return $this + */ + public function setSpecSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\SpecSource::class); + $this->spec_source = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TargetFleet::class, \Google\Cloud\Gaming\V1\TargetDetails_TargetFleetDetails_TargetFleet::class); + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleetAutoscaler.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleetAutoscaler.php new file mode 100644 index 000000000000..1e0f88f4cf71 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleetAutoscaler.php @@ -0,0 +1,118 @@ +google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleetAutoscaler + */ +class TargetFleetAutoscaler extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Agones autoscaler. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Encapsulates the source of the Agones fleet spec. + * Details about the Agones autoscaler spec. + * + * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 2; + */ + protected $spec_source = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the Agones autoscaler. + * @type \Google\Cloud\Gaming\V1\SpecSource $spec_source + * Encapsulates the source of the Agones fleet spec. + * Details about the Agones autoscaler spec. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Agones autoscaler. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the Agones autoscaler. + * + * 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; + } + + /** + * Encapsulates the source of the Agones fleet spec. + * Details about the Agones autoscaler spec. + * + * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 2; + * @return \Google\Cloud\Gaming\V1\SpecSource|null + */ + public function getSpecSource() + { + return $this->spec_source; + } + + public function hasSpecSource() + { + return isset($this->spec_source); + } + + public function clearSpecSource() + { + unset($this->spec_source); + } + + /** + * Encapsulates the source of the Agones fleet spec. + * Details about the Agones autoscaler spec. + * + * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 2; + * @param \Google\Cloud\Gaming\V1\SpecSource $var + * @return $this + */ + public function setSpecSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\SpecSource::class); + $this->spec_source = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TargetFleetAutoscaler::class, \Google\Cloud\Gaming\V1\TargetDetails_TargetFleetDetails_TargetFleetAutoscaler::class); + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails_TargetFleetDetails.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails_TargetFleetDetails.php new file mode 100644 index 000000000000..9cae71b46a0a --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails_TargetFleetDetails.php @@ -0,0 +1,16 @@ +google.cloud.gaming.v1.TargetState + */ +class TargetState extends \Google\Protobuf\Internal\Message +{ + /** + * Details about Agones fleets. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.TargetDetails details = 1; + */ + private $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Gaming\V1\TargetDetails>|\Google\Protobuf\Internal\RepeatedField $details + * Details about Agones fleets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Details about Agones fleets. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.TargetDetails details = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDetails() + { + return $this->details; + } + + /** + * Details about Agones fleets. + * + * Generated from protobuf field repeated .google.cloud.gaming.v1.TargetDetails details = 1; + * @param array<\Google\Cloud\Gaming\V1\TargetDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\TargetDetails::class); + $this->details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerClusterRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerClusterRequest.php new file mode 100644 index 000000000000..8767bae25f04 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerClusterRequest.php @@ -0,0 +1,133 @@ +google.cloud.gaming.v1.UpdateGameServerClusterRequest + */ +class UpdateGameServerClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The game server cluster to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $game_server_cluster = null; + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Gaming\V1\GameServerCluster $game_server_cluster + * Required. The game server cluster to be updated. + * Only fields specified in update_mask are updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); + parent::__construct($data); + } + + /** + * Required. The game server cluster to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Gaming\V1\GameServerCluster|null + */ + public function getGameServerCluster() + { + return $this->game_server_cluster; + } + + public function hasGameServerCluster() + { + return isset($this->game_server_cluster); + } + + public function clearGameServerCluster() + { + unset($this->game_server_cluster); + } + + /** + * Required. The game server cluster to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Gaming\V1\GameServerCluster $var + * @return $this + */ + public function setGameServerCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerCluster::class); + $this->game_server_cluster = $var; + + return $this; + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRequest.php new file mode 100644 index 000000000000..4febc4c1d9c5 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRequest.php @@ -0,0 +1,134 @@ +google.cloud.gaming.v1.UpdateGameServerDeploymentRequest + */ +class UpdateGameServerDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The game server delpoyment to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeployment game_server_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $game_server_deployment = null; + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Gaming\V1\GameServerDeployment $game_server_deployment + * Required. The game server delpoyment to be updated. + * Only fields specified in update_mask are updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The game server delpoyment to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeployment game_server_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Gaming\V1\GameServerDeployment|null + */ + public function getGameServerDeployment() + { + return $this->game_server_deployment; + } + + public function hasGameServerDeployment() + { + return isset($this->game_server_deployment); + } + + public function clearGameServerDeployment() + { + unset($this->game_server_deployment); + } + + /** + * Required. The game server delpoyment to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeployment game_server_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Gaming\V1\GameServerDeployment $var + * @return $this + */ + public function setGameServerDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerDeployment::class); + $this->game_server_deployment = $var; + + return $this; + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRolloutRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRolloutRequest.php new file mode 100644 index 000000000000..eb1657eb299b --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRolloutRequest.php @@ -0,0 +1,134 @@ +google.cloud.gaming.v1.UpdateGameServerDeploymentRolloutRequest + */ +class UpdateGameServerDeploymentRolloutRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The game server delpoyment rollout to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeploymentRollout rollout = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rollout = null; + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Gaming\V1\GameServerDeploymentRollout $rollout + * Required. The game server delpoyment rollout to be updated. + * Only fields specified in update_mask are updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The game server delpoyment rollout to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeploymentRollout rollout = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Gaming\V1\GameServerDeploymentRollout|null + */ + public function getRollout() + { + return $this->rollout; + } + + public function hasRollout() + { + return isset($this->rollout); + } + + public function clearRollout() + { + unset($this->rollout); + } + + /** + * Required. The game server delpoyment rollout to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeploymentRollout rollout = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Gaming\V1\GameServerDeploymentRollout $var + * @return $this + */ + public function setRollout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerDeploymentRollout::class); + $this->rollout = $var; + + return $this; + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateRealmRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateRealmRequest.php new file mode 100644 index 000000000000..0eda8f0b8597 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateRealmRequest.php @@ -0,0 +1,133 @@ +google.cloud.gaming.v1.UpdateRealmRequest + */ +class UpdateRealmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The realm to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $realm = null; + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Gaming\V1\Realm $realm + * Required. The realm to be updated. + * Only fields specified in update_mask are updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); + parent::__construct($data); + } + + /** + * Required. The realm to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Gaming\V1\Realm|null + */ + public function getRealm() + { + return $this->realm; + } + + public function hasRealm() + { + return isset($this->realm); + } + + public function clearRealm() + { + unset($this->realm); + } + + /** + * Required. The realm to be updated. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Gaming\V1\Realm $var + * @return $this + */ + public function setRealm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\Realm::class); + $this->realm = $var; + + return $this; + } + + /** + * Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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 update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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/Gaming/v1/samples/V1/GameServerClustersServiceClient/create_game_server_cluster.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/create_game_server_cluster.php new file mode 100644 index 000000000000..8728444aeef9 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/create_game_server_cluster.php @@ -0,0 +1,97 @@ +setName($gameServerClusterName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gameServerClustersServiceClient->createGameServerCluster( + $formattedParent, + $gameServerClusterId, + $gameServerCluster + ); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var GameServerCluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GameServerClustersServiceClient::realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + $gameServerClusterId = '[GAME_SERVER_CLUSTER_ID]'; + $gameServerClusterName = '[NAME]'; + + create_game_server_cluster_sample($formattedParent, $gameServerClusterId, $gameServerClusterName); +} +// [END gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/delete_game_server_cluster.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/delete_game_server_cluster.php new file mode 100644 index 000000000000..320f95750c72 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/delete_game_server_cluster.php @@ -0,0 +1,81 @@ +deleteGameServerCluster($formattedName); + $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 = GameServerClustersServiceClient::gameServerClusterName( + '[PROJECT]', + '[LOCATION]', + '[REALM]', + '[CLUSTER]' + ); + + delete_game_server_cluster_sample($formattedName); +} +// [END gameservices_v1_generated_GameServerClustersService_DeleteGameServerCluster_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/get_game_server_cluster.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/get_game_server_cluster.php new file mode 100644 index 000000000000..ccd812d8d561 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/get_game_server_cluster.php @@ -0,0 +1,72 @@ +getGameServerCluster($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GameServerClustersServiceClient::gameServerClusterName( + '[PROJECT]', + '[LOCATION]', + '[REALM]', + '[CLUSTER]' + ); + + get_game_server_cluster_sample($formattedName); +} +// [END gameservices_v1_generated_GameServerClustersService_GetGameServerCluster_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/list_game_server_clusters.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/list_game_server_clusters.php new file mode 100644 index 000000000000..45808814017c --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/list_game_server_clusters.php @@ -0,0 +1,72 @@ +listGameServerClusters($formattedParent); + + /** @var GameServerCluster $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 = GameServerClustersServiceClient::realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + + list_game_server_clusters_sample($formattedParent); +} +// [END gameservices_v1_generated_GameServerClustersService_ListGameServerClusters_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_create_game_server_cluster.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_create_game_server_cluster.php new file mode 100644 index 000000000000..237ec5d2a79c --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_create_game_server_cluster.php @@ -0,0 +1,91 @@ +setName($gameServerClusterName); + + // Call the API and handle any network failures. + try { + /** @var PreviewCreateGameServerClusterResponse $response */ + $response = $gameServerClustersServiceClient->previewCreateGameServerCluster( + $formattedParent, + $gameServerClusterId, + $gameServerCluster + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GameServerClustersServiceClient::realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + $gameServerClusterId = '[GAME_SERVER_CLUSTER_ID]'; + $gameServerClusterName = '[NAME]'; + + preview_create_game_server_cluster_sample( + $formattedParent, + $gameServerClusterId, + $gameServerClusterName + ); +} +// [END gameservices_v1_generated_GameServerClustersService_PreviewCreateGameServerCluster_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_delete_game_server_cluster.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_delete_game_server_cluster.php new file mode 100644 index 000000000000..48903ec144b9 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_delete_game_server_cluster.php @@ -0,0 +1,72 @@ +previewDeleteGameServerCluster($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GameServerClustersServiceClient::gameServerClusterName( + '[PROJECT]', + '[LOCATION]', + '[REALM]', + '[CLUSTER]' + ); + + preview_delete_game_server_cluster_sample($formattedName); +} +// [END gameservices_v1_generated_GameServerClustersService_PreviewDeleteGameServerCluster_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_update_game_server_cluster.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_update_game_server_cluster.php new file mode 100644 index 000000000000..2e19dc8cbf08 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_update_game_server_cluster.php @@ -0,0 +1,78 @@ +setName($gameServerClusterName); + $updateMask = new FieldMask(); + + // Call the API and handle any network failures. + try { + /** @var PreviewUpdateGameServerClusterResponse $response */ + $response = $gameServerClustersServiceClient->previewUpdateGameServerCluster( + $gameServerCluster, + $updateMask + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $gameServerClusterName = '[NAME]'; + + preview_update_game_server_cluster_sample($gameServerClusterName); +} +// [END gameservices_v1_generated_GameServerClustersService_PreviewUpdateGameServerCluster_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/update_game_server_cluster.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/update_game_server_cluster.php new file mode 100644 index 000000000000..493611403880 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/update_game_server_cluster.php @@ -0,0 +1,89 @@ +setName($gameServerClusterName); + $updateMask = new FieldMask(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $gameServerClustersServiceClient->updateGameServerCluster( + $gameServerCluster, + $updateMask + ); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var GameServerCluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $gameServerClusterName = '[NAME]'; + + update_game_server_cluster_sample($gameServerClusterName); +} +// [END gameservices_v1_generated_GameServerClustersService_UpdateGameServerCluster_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/create_game_server_config.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/create_game_server_config.php new file mode 100644 index 000000000000..1343ed5bcad6 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/create_game_server_config.php @@ -0,0 +1,94 @@ +createGameServerConfig( + $formattedParent, + $configId, + $gameServerConfig + ); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var GameServerConfig $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GameServerConfigsServiceClient::gameServerDeploymentName( + '[PROJECT]', + '[LOCATION]', + '[DEPLOYMENT]' + ); + $configId = '[CONFIG_ID]'; + + create_game_server_config_sample($formattedParent, $configId); +} +// [END gameservices_v1_generated_GameServerConfigsService_CreateGameServerConfig_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/delete_game_server_config.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/delete_game_server_config.php new file mode 100644 index 000000000000..57d5cf71d6d4 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/delete_game_server_config.php @@ -0,0 +1,82 @@ +deleteGameServerConfig($formattedName); + $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 = GameServerConfigsServiceClient::gameServerConfigName( + '[PROJECT]', + '[LOCATION]', + '[DEPLOYMENT]', + '[CONFIG]' + ); + + delete_game_server_config_sample($formattedName); +} +// [END gameservices_v1_generated_GameServerConfigsService_DeleteGameServerConfig_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/get_game_server_config.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/get_game_server_config.php new file mode 100644 index 000000000000..bfebeb5bfc83 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/get_game_server_config.php @@ -0,0 +1,72 @@ +getGameServerConfig($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GameServerConfigsServiceClient::gameServerConfigName( + '[PROJECT]', + '[LOCATION]', + '[DEPLOYMENT]', + '[CONFIG]' + ); + + get_game_server_config_sample($formattedName); +} +// [END gameservices_v1_generated_GameServerConfigsService_GetGameServerConfig_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/list_game_server_configs.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/list_game_server_configs.php new file mode 100644 index 000000000000..d1528119fbce --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/list_game_server_configs.php @@ -0,0 +1,77 @@ +listGameServerConfigs($formattedParent); + + /** @var GameServerConfig $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 = GameServerConfigsServiceClient::gameServerDeploymentName( + '[PROJECT]', + '[LOCATION]', + '[DEPLOYMENT]' + ); + + list_game_server_configs_sample($formattedParent); +} +// [END gameservices_v1_generated_GameServerConfigsService_ListGameServerConfigs_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/create_game_server_deployment.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/create_game_server_deployment.php new file mode 100644 index 000000000000..e543e6ae7a98 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/create_game_server_deployment.php @@ -0,0 +1,88 @@ +createGameServerDeployment( + $formattedParent, + $deploymentId, + $gameServerDeployment + ); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var GameServerDeployment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GameServerDeploymentsServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $deploymentId = '[DEPLOYMENT_ID]'; + + create_game_server_deployment_sample($formattedParent, $deploymentId); +} +// [END gameservices_v1_generated_GameServerDeploymentsService_CreateGameServerDeployment_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/delete_game_server_deployment.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/delete_game_server_deployment.php new file mode 100644 index 000000000000..f0c5dd2b9ce4 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/delete_game_server_deployment.php @@ -0,0 +1,80 @@ +deleteGameServerDeployment($formattedName); + $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 = GameServerDeploymentsServiceClient::gameServerDeploymentName( + '[PROJECT]', + '[LOCATION]', + '[DEPLOYMENT]' + ); + + delete_game_server_deployment_sample($formattedName); +} +// [END gameservices_v1_generated_GameServerDeploymentsService_DeleteGameServerDeployment_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/fetch_deployment_state.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/fetch_deployment_state.php new file mode 100644 index 000000000000..8d54743451b1 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/fetch_deployment_state.php @@ -0,0 +1,68 @@ +fetchDeploymentState($name); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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]'; + + fetch_deployment_state_sample($name); +} +// [END gameservices_v1_generated_GameServerDeploymentsService_FetchDeploymentState_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment.php new file mode 100644 index 000000000000..40e01c3cce9b --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment.php @@ -0,0 +1,71 @@ +getGameServerDeployment($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GameServerDeploymentsServiceClient::gameServerDeploymentName( + '[PROJECT]', + '[LOCATION]', + '[DEPLOYMENT]' + ); + + get_game_server_deployment_sample($formattedName); +} +// [END gameservices_v1_generated_GameServerDeploymentsService_GetGameServerDeployment_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment_rollout.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment_rollout.php new file mode 100644 index 000000000000..59b6ed3c3e8c --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment_rollout.php @@ -0,0 +1,71 @@ +getGameServerDeploymentRollout($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GameServerDeploymentsServiceClient::gameServerDeploymentName( + '[PROJECT]', + '[LOCATION]', + '[DEPLOYMENT]' + ); + + get_game_server_deployment_rollout_sample($formattedName); +} +// [END gameservices_v1_generated_GameServerDeploymentsService_GetGameServerDeploymentRollout_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/list_game_server_deployments.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/list_game_server_deployments.php new file mode 100644 index 000000000000..30597f29a4f0 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/list_game_server_deployments.php @@ -0,0 +1,72 @@ +listGameServerDeployments($formattedParent); + + /** @var GameServerDeployment $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 = GameServerDeploymentsServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_game_server_deployments_sample($formattedParent); +} +// [END gameservices_v1_generated_GameServerDeploymentsService_ListGameServerDeployments_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/preview_game_server_deployment_rollout.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/preview_game_server_deployment_rollout.php new file mode 100644 index 000000000000..bb2109b12c93 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/preview_game_server_deployment_rollout.php @@ -0,0 +1,58 @@ +previewGameServerDeploymentRollout($rollout); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END gameservices_v1_generated_GameServerDeploymentsService_PreviewGameServerDeploymentRollout_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment.php new file mode 100644 index 000000000000..41e09054c003 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment.php @@ -0,0 +1,73 @@ +updateGameServerDeployment( + $gameServerDeployment, + $updateMask + ); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var GameServerDeployment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + 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 gameservices_v1_generated_GameServerDeploymentsService_UpdateGameServerDeployment_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment_rollout.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment_rollout.php new file mode 100644 index 000000000000..926ca55f7e40 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment_rollout.php @@ -0,0 +1,79 @@ +updateGameServerDeploymentRollout( + $rollout, + $updateMask + ); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var GameServerDeployment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + 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 gameservices_v1_generated_GameServerDeploymentsService_UpdateGameServerDeploymentRollout_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/create_realm.php b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/create_realm.php new file mode 100644 index 000000000000..0164fbbf3c49 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/create_realm.php @@ -0,0 +1,92 @@ +setTimeZone($realmTimeZone); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $realmsServiceClient->createRealm($formattedParent, $realmId, $realm); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Realm $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = RealmsServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $realmId = '[REALM_ID]'; + $realmTimeZone = '[TIME_ZONE]'; + + create_realm_sample($formattedParent, $realmId, $realmTimeZone); +} +// [END gameservices_v1_generated_RealmsService_CreateRealm_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/delete_realm.php b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/delete_realm.php new file mode 100644 index 000000000000..b22cb14c6b1c --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/delete_realm.php @@ -0,0 +1,76 @@ +deleteRealm($formattedName); + $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 = RealmsServiceClient::realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + + delete_realm_sample($formattedName); +} +// [END gameservices_v1_generated_RealmsService_DeleteRealm_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/get_realm.php b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/get_realm.php new file mode 100644 index 000000000000..a894cc9dc6ae --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/get_realm.php @@ -0,0 +1,67 @@ +getRealm($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = RealmsServiceClient::realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + + get_realm_sample($formattedName); +} +// [END gameservices_v1_generated_RealmsService_GetRealm_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/list_realms.php b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/list_realms.php new file mode 100644 index 000000000000..704e8a4dde3e --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/list_realms.php @@ -0,0 +1,72 @@ +listRealms($formattedParent); + + /** @var Realm $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 = RealmsServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_realms_sample($formattedParent); +} +// [END gameservices_v1_generated_RealmsService_ListRealms_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/preview_realm_update.php b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/preview_realm_update.php new file mode 100644 index 000000000000..3ed3c4b353ff --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/preview_realm_update.php @@ -0,0 +1,74 @@ +setTimeZone($realmTimeZone); + $updateMask = new FieldMask(); + + // Call the API and handle any network failures. + try { + /** @var PreviewRealmUpdateResponse $response */ + $response = $realmsServiceClient->previewRealmUpdate($realm, $updateMask); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $realmTimeZone = '[TIME_ZONE]'; + + preview_realm_update_sample($realmTimeZone); +} +// [END gameservices_v1_generated_RealmsService_PreviewRealmUpdate_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/update_realm.php b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/update_realm.php new file mode 100644 index 000000000000..1c88d6d58cfb --- /dev/null +++ b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/update_realm.php @@ -0,0 +1,85 @@ +setTimeZone($realmTimeZone); + $updateMask = new FieldMask(); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $realmsServiceClient->updateRealm($realm, $updateMask); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Realm $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $realmTimeZone = '[TIME_ZONE]'; + + update_realm_sample($realmTimeZone); +} +// [END gameservices_v1_generated_RealmsService_UpdateRealm_sync] diff --git a/owl-bot-staging/Gaming/v1/src/V1/GameServerClustersServiceClient.php b/owl-bot-staging/Gaming/v1/src/V1/GameServerClustersServiceClient.php new file mode 100644 index 000000000000..bde9fd013e32 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/src/V1/GameServerClustersServiceClient.php @@ -0,0 +1,34 @@ +realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + * $gameServerClusterId = 'game_server_cluster_id'; + * $gameServerCluster = new GameServerCluster(); + * $operationResponse = $gameServerClustersServiceClient->createGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gameServerClustersServiceClient->createGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gameServerClustersServiceClient->resumeOperation($operationName, 'createGameServerCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gameServerClustersServiceClient->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. + */ +class GameServerClustersServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.gaming.v1.GameServerClustersService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'gameservices.googleapis.com'; + + /** 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 $gameServerClusterNameTemplate; + + private static $realmNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/game_server_clusters_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/game_server_clusters_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/game_server_clusters_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/game_server_clusters_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getGameServerClusterNameTemplate() + { + if (self::$gameServerClusterNameTemplate == null) { + self::$gameServerClusterNameTemplate = new PathTemplate('projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}'); + } + + return self::$gameServerClusterNameTemplate; + } + + private static function getRealmNameTemplate() + { + if (self::$realmNameTemplate == null) { + self::$realmNameTemplate = new PathTemplate('projects/{project}/locations/{location}/realms/{realm}'); + } + + return self::$realmNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'gameServerCluster' => self::getGameServerClusterNameTemplate(), + 'realm' => self::getRealmNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * game_server_cluster resource. + * + * @param string $project + * @param string $location + * @param string $realm + * @param string $cluster + * + * @return string The formatted game_server_cluster resource. + */ + public static function gameServerClusterName($project, $location, $realm, $cluster) + { + return self::getGameServerClusterNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'realm' => $realm, + 'cluster' => $cluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a realm + * resource. + * + * @param string $project + * @param string $location + * @param string $realm + * + * @return string The formatted realm resource. + */ + public static function realmName($project, $location, $realm) + { + return self::getRealmNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'realm' => $realm, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - gameServerCluster: projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster} + * - realm: projects/{project}/locations/{location}/realms/{realm} + * + * 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"); + } + + /** + * 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; + } + + /** + * 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 'gameservices.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a new game server cluster in a given project and location. + * + * Sample code: + * ``` + * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); + * try { + * $formattedParent = $gameServerClustersServiceClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + * $gameServerClusterId = 'game_server_cluster_id'; + * $gameServerCluster = new GameServerCluster(); + * $operationResponse = $gameServerClustersServiceClient->createGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gameServerClustersServiceClient->createGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gameServerClustersServiceClient->resumeOperation($operationName, 'createGameServerCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gameServerClustersServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/realms/{realm-id}`. + * @param string $gameServerClusterId Required. The ID of the game server cluster resource to be created. + * @param GameServerCluster $gameServerCluster Required. The game server cluster resource to be created. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createGameServerCluster($parent, $gameServerClusterId, $gameServerCluster, array $optionalArgs = []) + { + $request = new CreateGameServerClusterRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setGameServerClusterId($gameServerClusterId); + $request->setGameServerCluster($gameServerCluster); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateGameServerCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a single game server cluster. + * + * Sample code: + * ``` + * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); + * try { + * $formattedName = $gameServerClustersServiceClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); + * $operationResponse = $gameServerClustersServiceClient->deleteGameServerCluster($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gameServerClustersServiceClient->deleteGameServerCluster($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gameServerClustersServiceClient->resumeOperation($operationName, 'deleteGameServerCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gameServerClustersServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the game server cluster to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteGameServerCluster($name, array $optionalArgs = []) + { + $request = new DeleteGameServerClusterRequest(); + $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->startOperationsCall('DeleteGameServerCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets details of a single game server cluster. + * + * Sample code: + * ``` + * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); + * try { + * $formattedName = $gameServerClustersServiceClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); + * $response = $gameServerClustersServiceClient->getGameServerCluster($formattedName); + * } finally { + * $gameServerClustersServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the game server cluster to retrieve, in the following form: + * `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $view + * Optional. View for the returned GameServerCluster objects. When `FULL` is + * specified, the `cluster_state` field is also returned in the + * GameServerCluster object, which includes the state of the referenced + * Kubernetes cluster such as versions and provider info. The default/unset + * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does + * not return the `cluster_state` field. + * For allowed values, use constants defined on {@see \Google\Cloud\Gaming\V1\GameServerClusterView} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Gaming\V1\GameServerCluster + * + * @throws ApiException if the remote call fails + */ + public function getGameServerCluster($name, array $optionalArgs = []) + { + $request = new GetGameServerClusterRequest(); + $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('GetGameServerCluster', GameServerCluster::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists game server clusters in a given project and location. + * + * Sample code: + * ``` + * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); + * try { + * $formattedParent = $gameServerClustersServiceClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + * // Iterate over pages of elements + * $pagedResponse = $gameServerClustersServiceClient->listGameServerClusters($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $gameServerClustersServiceClient->listGameServerClusters($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $gameServerClustersServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name, in the following form: + * "projects/{project}/locations/{location}/realms/{realm}". + * @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 + * Optional. The filter to apply to list results. + * @type string $orderBy + * Optional. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * @type int $view + * Optional. View for the returned GameServerCluster objects. When `FULL` is + * specified, the `cluster_state` field is also returned in the + * GameServerCluster object, which includes the state of the referenced + * Kubernetes cluster such as versions and provider info. The default/unset + * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does + * not return the `cluster_state` field. + * For allowed values, use constants defined on {@see \Google\Cloud\Gaming\V1\GameServerClusterView} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listGameServerClusters($parent, array $optionalArgs = []) + { + $request = new ListGameServerClustersRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + 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('ListGameServerClusters', $optionalArgs, ListGameServerClustersResponse::class, $request); + } + + /** + * Previews creation of a new game server cluster in a given project and + * location. + * + * Sample code: + * ``` + * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); + * try { + * $formattedParent = $gameServerClustersServiceClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + * $gameServerClusterId = 'game_server_cluster_id'; + * $gameServerCluster = new GameServerCluster(); + * $response = $gameServerClustersServiceClient->previewCreateGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); + * } finally { + * $gameServerClustersServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. + * @param string $gameServerClusterId Required. The ID of the game server cluster resource to be created. + * @param GameServerCluster $gameServerCluster Required. The game server cluster resource to be created. + * @param array $optionalArgs { + * Optional. + * + * @type Timestamp $previewTime + * Optional. The target timestamp to compute the preview. + * @type int $view + * Optional. This field is deprecated, preview will always return + * KubernetesClusterState. + * For allowed values, use constants defined on {@see \Google\Cloud\Gaming\V1\GameServerClusterView} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Gaming\V1\PreviewCreateGameServerClusterResponse + * + * @throws ApiException if the remote call fails + */ + public function previewCreateGameServerCluster($parent, $gameServerClusterId, $gameServerCluster, array $optionalArgs = []) + { + $request = new PreviewCreateGameServerClusterRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setGameServerClusterId($gameServerClusterId); + $request->setGameServerCluster($gameServerCluster); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['previewTime'])) { + $request->setPreviewTime($optionalArgs['previewTime']); + } + + 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('PreviewCreateGameServerCluster', PreviewCreateGameServerClusterResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Previews deletion of a single game server cluster. + * + * Sample code: + * ``` + * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); + * try { + * $formattedName = $gameServerClustersServiceClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); + * $response = $gameServerClustersServiceClient->previewDeleteGameServerCluster($formattedName); + * } finally { + * $gameServerClustersServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the game server cluster to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`. + * @param array $optionalArgs { + * Optional. + * + * @type Timestamp $previewTime + * Optional. The target timestamp to compute the preview. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Gaming\V1\PreviewDeleteGameServerClusterResponse + * + * @throws ApiException if the remote call fails + */ + public function previewDeleteGameServerCluster($name, array $optionalArgs = []) + { + $request = new PreviewDeleteGameServerClusterRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['previewTime'])) { + $request->setPreviewTime($optionalArgs['previewTime']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('PreviewDeleteGameServerCluster', PreviewDeleteGameServerClusterResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Previews updating a GameServerCluster. + * + * Sample code: + * ``` + * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); + * try { + * $gameServerCluster = new GameServerCluster(); + * $updateMask = new FieldMask(); + * $response = $gameServerClustersServiceClient->previewUpdateGameServerCluster($gameServerCluster, $updateMask); + * } finally { + * $gameServerClustersServiceClient->close(); + * } + * ``` + * + * @param GameServerCluster $gameServerCluster Required. The game server cluster to be updated. + * Only fields specified in update_mask are updated. + * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @param array $optionalArgs { + * Optional. + * + * @type Timestamp $previewTime + * Optional. The target timestamp to compute the preview. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Gaming\V1\PreviewUpdateGameServerClusterResponse + * + * @throws ApiException if the remote call fails + */ + public function previewUpdateGameServerCluster($gameServerCluster, $updateMask, array $optionalArgs = []) + { + $request = new PreviewUpdateGameServerClusterRequest(); + $requestParamHeaders = []; + $request->setGameServerCluster($gameServerCluster); + $request->setUpdateMask($updateMask); + $requestParamHeaders['game_server_cluster.name'] = $gameServerCluster->getName(); + if (isset($optionalArgs['previewTime'])) { + $request->setPreviewTime($optionalArgs['previewTime']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('PreviewUpdateGameServerCluster', PreviewUpdateGameServerClusterResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Patches a single game server cluster. + * + * Sample code: + * ``` + * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); + * try { + * $gameServerCluster = new GameServerCluster(); + * $updateMask = new FieldMask(); + * $operationResponse = $gameServerClustersServiceClient->updateGameServerCluster($gameServerCluster, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gameServerClustersServiceClient->updateGameServerCluster($gameServerCluster, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gameServerClustersServiceClient->resumeOperation($operationName, 'updateGameServerCluster'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gameServerClustersServiceClient->close(); + * } + * ``` + * + * @param GameServerCluster $gameServerCluster Required. The game server cluster to be updated. + * Only fields specified in update_mask are updated. + * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateGameServerCluster($gameServerCluster, $updateMask, array $optionalArgs = []) + { + $request = new UpdateGameServerClusterRequest(); + $requestParamHeaders = []; + $request->setGameServerCluster($gameServerCluster); + $request->setUpdateMask($updateMask); + $requestParamHeaders['game_server_cluster.name'] = $gameServerCluster->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateGameServerCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerConfigsServiceGapicClient.php b/owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerConfigsServiceGapicClient.php new file mode 100644 index 000000000000..738292e74e85 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerConfigsServiceGapicClient.php @@ -0,0 +1,603 @@ +gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + * $configId = 'config_id'; + * $gameServerConfig = new GameServerConfig(); + * $operationResponse = $gameServerConfigsServiceClient->createGameServerConfig($formattedParent, $configId, $gameServerConfig); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gameServerConfigsServiceClient->createGameServerConfig($formattedParent, $configId, $gameServerConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gameServerConfigsServiceClient->resumeOperation($operationName, 'createGameServerConfig'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gameServerConfigsServiceClient->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. + */ +class GameServerConfigsServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.gaming.v1.GameServerConfigsService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'gameservices.googleapis.com'; + + /** 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 $gameServerConfigNameTemplate; + + private static $gameServerDeploymentNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/game_server_configs_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/game_server_configs_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/game_server_configs_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/game_server_configs_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getGameServerConfigNameTemplate() + { + if (self::$gameServerConfigNameTemplate == null) { + self::$gameServerConfigNameTemplate = new PathTemplate('projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}'); + } + + return self::$gameServerConfigNameTemplate; + } + + private static function getGameServerDeploymentNameTemplate() + { + if (self::$gameServerDeploymentNameTemplate == null) { + self::$gameServerDeploymentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/gameServerDeployments/{deployment}'); + } + + return self::$gameServerDeploymentNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'gameServerConfig' => self::getGameServerConfigNameTemplate(), + 'gameServerDeployment' => self::getGameServerDeploymentNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * game_server_config resource. + * + * @param string $project + * @param string $location + * @param string $deployment + * @param string $config + * + * @return string The formatted game_server_config resource. + */ + public static function gameServerConfigName($project, $location, $deployment, $config) + { + return self::getGameServerConfigNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'deployment' => $deployment, + 'config' => $config, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * game_server_deployment resource. + * + * @param string $project + * @param string $location + * @param string $deployment + * + * @return string The formatted game_server_deployment resource. + */ + public static function gameServerDeploymentName($project, $location, $deployment) + { + return self::getGameServerDeploymentNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'deployment' => $deployment, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - gameServerConfig: projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config} + * - gameServerDeployment: projects/{project}/locations/{location}/gameServerDeployments/{deployment} + * + * 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"); + } + + /** + * 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; + } + + /** + * 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 'gameservices.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a new game server config in a given project, location, and game + * server deployment. Game server configs are immutable, and are not applied + * until referenced in the game server deployment rollout resource. + * + * Sample code: + * ``` + * $gameServerConfigsServiceClient = new GameServerConfigsServiceClient(); + * try { + * $formattedParent = $gameServerConfigsServiceClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + * $configId = 'config_id'; + * $gameServerConfig = new GameServerConfig(); + * $operationResponse = $gameServerConfigsServiceClient->createGameServerConfig($formattedParent, $configId, $gameServerConfig); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gameServerConfigsServiceClient->createGameServerConfig($formattedParent, $configId, $gameServerConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gameServerConfigsServiceClient->resumeOperation($operationName, 'createGameServerConfig'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gameServerConfigsServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`. + * @param string $configId Required. The ID of the game server config resource to be created. + * @param GameServerConfig $gameServerConfig Required. The game server config resource to be created. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createGameServerConfig($parent, $configId, $gameServerConfig, array $optionalArgs = []) + { + $request = new CreateGameServerConfigRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setConfigId($configId); + $request->setGameServerConfig($gameServerConfig); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateGameServerConfig', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a single game server config. The deletion will fail if the game + * server config is referenced in a game server deployment rollout. + * + * Sample code: + * ``` + * $gameServerConfigsServiceClient = new GameServerConfigsServiceClient(); + * try { + * $formattedName = $gameServerConfigsServiceClient->gameServerConfigName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[CONFIG]'); + * $operationResponse = $gameServerConfigsServiceClient->deleteGameServerConfig($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gameServerConfigsServiceClient->deleteGameServerConfig($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gameServerConfigsServiceClient->resumeOperation($operationName, 'deleteGameServerConfig'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gameServerConfigsServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the game server config to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteGameServerConfig($name, array $optionalArgs = []) + { + $request = new DeleteGameServerConfigRequest(); + $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->startOperationsCall('DeleteGameServerConfig', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets details of a single game server config. + * + * Sample code: + * ``` + * $gameServerConfigsServiceClient = new GameServerConfigsServiceClient(); + * try { + * $formattedName = $gameServerConfigsServiceClient->gameServerConfigName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[CONFIG]'); + * $response = $gameServerConfigsServiceClient->getGameServerConfig($formattedName); + * } finally { + * $gameServerConfigsServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the game server config to retrieve, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. + * @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\Gaming\V1\GameServerConfig + * + * @throws ApiException if the remote call fails + */ + public function getGameServerConfig($name, array $optionalArgs = []) + { + $request = new GetGameServerConfigRequest(); + $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('GetGameServerConfig', GameServerConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists game server configs in a given project, location, and game server + * deployment. + * + * Sample code: + * ``` + * $gameServerConfigsServiceClient = new GameServerConfigsServiceClient(); + * try { + * $formattedParent = $gameServerConfigsServiceClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + * // Iterate over pages of elements + * $pagedResponse = $gameServerConfigsServiceClient->listGameServerConfigs($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $gameServerConfigsServiceClient->listGameServerConfigs($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $gameServerConfigsServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`. + * @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 + * Optional. The filter to apply to list results. + * @type string $orderBy + * Optional. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listGameServerConfigs($parent, array $optionalArgs = []) + { + $request = new ListGameServerConfigsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListGameServerConfigs', $optionalArgs, ListGameServerConfigsResponse::class, $request); + } +} diff --git a/owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerDeploymentsServiceGapicClient.php b/owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerDeploymentsServiceGapicClient.php new file mode 100644 index 000000000000..6cf0119962c1 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerDeploymentsServiceGapicClient.php @@ -0,0 +1,921 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $deploymentId = 'deployment_id'; + * $gameServerDeployment = new GameServerDeployment(); + * $operationResponse = $gameServerDeploymentsServiceClient->createGameServerDeployment($formattedParent, $deploymentId, $gameServerDeployment); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gameServerDeploymentsServiceClient->createGameServerDeployment($formattedParent, $deploymentId, $gameServerDeployment); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gameServerDeploymentsServiceClient->resumeOperation($operationName, 'createGameServerDeployment'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gameServerDeploymentsServiceClient->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. + */ +class GameServerDeploymentsServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.gaming.v1.GameServerDeploymentsService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'gameservices.googleapis.com'; + + /** 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 $gameServerDeploymentNameTemplate; + + private static $gameServerDeploymentRolloutNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/game_server_deployments_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/game_server_deployments_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/game_server_deployments_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/game_server_deployments_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getGameServerDeploymentNameTemplate() + { + if (self::$gameServerDeploymentNameTemplate == null) { + self::$gameServerDeploymentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/gameServerDeployments/{deployment}'); + } + + return self::$gameServerDeploymentNameTemplate; + } + + private static function getGameServerDeploymentRolloutNameTemplate() + { + if (self::$gameServerDeploymentRolloutNameTemplate == null) { + self::$gameServerDeploymentRolloutNameTemplate = new PathTemplate('projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout'); + } + + return self::$gameServerDeploymentRolloutNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'gameServerDeployment' => self::getGameServerDeploymentNameTemplate(), + 'gameServerDeploymentRollout' => self::getGameServerDeploymentRolloutNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * game_server_deployment resource. + * + * @param string $project + * @param string $location + * @param string $deployment + * + * @return string The formatted game_server_deployment resource. + */ + public static function gameServerDeploymentName($project, $location, $deployment) + { + return self::getGameServerDeploymentNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'deployment' => $deployment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * game_server_deployment_rollout resource. + * + * @param string $project + * @param string $location + * @param string $deployment + * + * @return string The formatted game_server_deployment_rollout resource. + */ + public static function gameServerDeploymentRolloutName($project, $location, $deployment) + { + return self::getGameServerDeploymentRolloutNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'deployment' => $deployment, + ]); + } + + /** + * 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($project, $location) + { + return self::getLocationNameTemplate()->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 + * - gameServerDeployment: projects/{project}/locations/{location}/gameServerDeployments/{deployment} + * - gameServerDeploymentRollout: projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout + * - 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($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"); + } + + /** + * 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; + } + + /** + * 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 'gameservices.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a new game server deployment in a given project and location. + * + * Sample code: + * ``` + * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); + * try { + * $formattedParent = $gameServerDeploymentsServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $deploymentId = 'deployment_id'; + * $gameServerDeployment = new GameServerDeployment(); + * $operationResponse = $gameServerDeploymentsServiceClient->createGameServerDeployment($formattedParent, $deploymentId, $gameServerDeployment); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gameServerDeploymentsServiceClient->createGameServerDeployment($formattedParent, $deploymentId, $gameServerDeployment); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gameServerDeploymentsServiceClient->resumeOperation($operationName, 'createGameServerDeployment'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gameServerDeploymentsServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}`. + * @param string $deploymentId Required. The ID of the game server delpoyment resource to be created. + * @param GameServerDeployment $gameServerDeployment Required. The game server delpoyment resource to be created. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createGameServerDeployment($parent, $deploymentId, $gameServerDeployment, array $optionalArgs = []) + { + $request = new CreateGameServerDeploymentRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setDeploymentId($deploymentId); + $request->setGameServerDeployment($gameServerDeployment); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateGameServerDeployment', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a single game server deployment. + * + * Sample code: + * ``` + * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); + * try { + * $formattedName = $gameServerDeploymentsServiceClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + * $operationResponse = $gameServerDeploymentsServiceClient->deleteGameServerDeployment($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gameServerDeploymentsServiceClient->deleteGameServerDeployment($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gameServerDeploymentsServiceClient->resumeOperation($operationName, 'deleteGameServerDeployment'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gameServerDeploymentsServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the game server delpoyment to delete, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteGameServerDeployment($name, array $optionalArgs = []) + { + $request = new DeleteGameServerDeploymentRequest(); + $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->startOperationsCall('DeleteGameServerDeployment', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Retrieves information about the current state of the game server + * deployment. Gathers all the Agones fleets and Agones autoscalers, + * including fleets running an older version of the game server deployment. + * + * Sample code: + * ``` + * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); + * try { + * $name = 'name'; + * $response = $gameServerDeploymentsServiceClient->fetchDeploymentState($name); + * } finally { + * $gameServerDeploymentsServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the game server delpoyment, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * @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\Gaming\V1\FetchDeploymentStateResponse + * + * @throws ApiException if the remote call fails + */ + public function fetchDeploymentState($name, array $optionalArgs = []) + { + $request = new FetchDeploymentStateRequest(); + $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('FetchDeploymentState', FetchDeploymentStateResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets details of a single game server deployment. + * + * Sample code: + * ``` + * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); + * try { + * $formattedName = $gameServerDeploymentsServiceClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + * $response = $gameServerDeploymentsServiceClient->getGameServerDeployment($formattedName); + * } finally { + * $gameServerDeploymentsServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the game server delpoyment to retrieve, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. + * @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\Gaming\V1\GameServerDeployment + * + * @throws ApiException if the remote call fails + */ + public function getGameServerDeployment($name, array $optionalArgs = []) + { + $request = new GetGameServerDeploymentRequest(); + $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('GetGameServerDeployment', GameServerDeployment::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets details a single game server deployment rollout. + * + * Sample code: + * ``` + * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); + * try { + * $formattedName = $gameServerDeploymentsServiceClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + * $response = $gameServerDeploymentsServiceClient->getGameServerDeploymentRollout($formattedName); + * } finally { + * $gameServerDeploymentsServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the game server delpoyment to retrieve, in the following form: + * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. + * @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\Gaming\V1\GameServerDeploymentRollout + * + * @throws ApiException if the remote call fails + */ + public function getGameServerDeploymentRollout($name, array $optionalArgs = []) + { + $request = new GetGameServerDeploymentRolloutRequest(); + $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('GetGameServerDeploymentRollout', GameServerDeploymentRollout::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists game server deployments in a given project and location. + * + * Sample code: + * ``` + * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); + * try { + * $formattedParent = $gameServerDeploymentsServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $gameServerDeploymentsServiceClient->listGameServerDeployments($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $gameServerDeploymentsServiceClient->listGameServerDeployments($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $gameServerDeploymentsServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}`. + * @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 + * Optional. The filter to apply to list results. + * @type string $orderBy + * Optional. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listGameServerDeployments($parent, array $optionalArgs = []) + { + $request = new ListGameServerDeploymentsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListGameServerDeployments', $optionalArgs, ListGameServerDeploymentsResponse::class, $request); + } + + /** + * Previews the game server deployment rollout. This API does not mutate the + * rollout resource. + * + * Sample code: + * ``` + * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); + * try { + * $rollout = new GameServerDeploymentRollout(); + * $response = $gameServerDeploymentsServiceClient->previewGameServerDeploymentRollout($rollout); + * } finally { + * $gameServerDeploymentsServiceClient->close(); + * } + * ``` + * + * @param GameServerDeploymentRollout $rollout Required. The game server deployment rollout to be updated. + * Only fields specified in update_mask are updated. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Optional. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @type Timestamp $previewTime + * Optional. The target timestamp to compute the preview. Defaults to the immediately + * after the proposed rollout completes. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Gaming\V1\PreviewGameServerDeploymentRolloutResponse + * + * @throws ApiException if the remote call fails + */ + public function previewGameServerDeploymentRollout($rollout, array $optionalArgs = []) + { + $request = new PreviewGameServerDeploymentRolloutRequest(); + $requestParamHeaders = []; + $request->setRollout($rollout); + $requestParamHeaders['rollout.name'] = $rollout->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + if (isset($optionalArgs['previewTime'])) { + $request->setPreviewTime($optionalArgs['previewTime']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('PreviewGameServerDeploymentRollout', PreviewGameServerDeploymentRolloutResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Patches a game server deployment. + * + * Sample code: + * ``` + * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); + * try { + * $gameServerDeployment = new GameServerDeployment(); + * $updateMask = new FieldMask(); + * $operationResponse = $gameServerDeploymentsServiceClient->updateGameServerDeployment($gameServerDeployment, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gameServerDeploymentsServiceClient->updateGameServerDeployment($gameServerDeployment, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gameServerDeploymentsServiceClient->resumeOperation($operationName, 'updateGameServerDeployment'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gameServerDeploymentsServiceClient->close(); + * } + * ``` + * + * @param GameServerDeployment $gameServerDeployment Required. The game server delpoyment to be updated. + * Only fields specified in update_mask are updated. + * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateGameServerDeployment($gameServerDeployment, $updateMask, array $optionalArgs = []) + { + $request = new UpdateGameServerDeploymentRequest(); + $requestParamHeaders = []; + $request->setGameServerDeployment($gameServerDeployment); + $request->setUpdateMask($updateMask); + $requestParamHeaders['game_server_deployment.name'] = $gameServerDeployment->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateGameServerDeployment', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Patches a single game server deployment rollout. + * The method will not return an error if the update does not affect any + * existing realms. For example - if the default_game_server_config is changed + * but all existing realms use the override, that is valid. Similarly, if a + * non existing realm is explicitly called out in game_server_config_overrides + * field, that will also not result in an error. + * + * Sample code: + * ``` + * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); + * try { + * $rollout = new GameServerDeploymentRollout(); + * $updateMask = new FieldMask(); + * $operationResponse = $gameServerDeploymentsServiceClient->updateGameServerDeploymentRollout($rollout, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gameServerDeploymentsServiceClient->updateGameServerDeploymentRollout($rollout, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gameServerDeploymentsServiceClient->resumeOperation($operationName, 'updateGameServerDeploymentRollout'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gameServerDeploymentsServiceClient->close(); + * } + * ``` + * + * @param GameServerDeploymentRollout $rollout Required. The game server delpoyment rollout to be updated. + * Only fields specified in update_mask are updated. + * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateGameServerDeploymentRollout($rollout, $updateMask, array $optionalArgs = []) + { + $request = new UpdateGameServerDeploymentRolloutRequest(); + $requestParamHeaders = []; + $request->setRollout($rollout); + $request->setUpdateMask($updateMask); + $requestParamHeaders['rollout.name'] = $rollout->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateGameServerDeploymentRollout', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/Gaming/v1/src/V1/Gapic/RealmsServiceGapicClient.php b/owl-bot-staging/Gaming/v1/src/V1/Gapic/RealmsServiceGapicClient.php new file mode 100644 index 000000000000..d66da8009071 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/src/V1/Gapic/RealmsServiceGapicClient.php @@ -0,0 +1,722 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $realmId = 'realm_id'; + * $realm = new Realm(); + * $operationResponse = $realmsServiceClient->createRealm($formattedParent, $realmId, $realm); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $realmsServiceClient->createRealm($formattedParent, $realmId, $realm); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $realmsServiceClient->resumeOperation($operationName, 'createRealm'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $realmsServiceClient->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. + */ +class RealmsServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.gaming.v1.RealmsService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'gameservices.googleapis.com'; + + /** 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 $locationNameTemplate; + + private static $realmNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/realms_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/realms_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/realms_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/realms_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getRealmNameTemplate() + { + if (self::$realmNameTemplate == null) { + self::$realmNameTemplate = new PathTemplate('projects/{project}/locations/{location}/realms/{realm}'); + } + + return self::$realmNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), + 'realm' => self::getRealmNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * 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($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a realm + * resource. + * + * @param string $project + * @param string $location + * @param string $realm + * + * @return string The formatted realm resource. + */ + public static function realmName($project, $location, $realm) + { + return self::getRealmNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'realm' => $realm, + ]); + } + + /** + * 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} + * - realm: projects/{project}/locations/{location}/realms/{realm} + * + * 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"); + } + + /** + * 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; + } + + /** + * 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 'gameservices.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a new realm in a given project and location. + * + * Sample code: + * ``` + * $realmsServiceClient = new RealmsServiceClient(); + * try { + * $formattedParent = $realmsServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $realmId = 'realm_id'; + * $realm = new Realm(); + * $operationResponse = $realmsServiceClient->createRealm($formattedParent, $realmId, $realm); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $realmsServiceClient->createRealm($formattedParent, $realmId, $realm); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $realmsServiceClient->resumeOperation($operationName, 'createRealm'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $realmsServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}`. + * @param string $realmId Required. The ID of the realm resource to be created. + * @param Realm $realm Required. The realm resource to be created. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createRealm($parent, $realmId, $realm, array $optionalArgs = []) + { + $request = new CreateRealmRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setRealmId($realmId); + $request->setRealm($realm); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateRealm', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a single realm. + * + * Sample code: + * ``` + * $realmsServiceClient = new RealmsServiceClient(); + * try { + * $formattedName = $realmsServiceClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + * $operationResponse = $realmsServiceClient->deleteRealm($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $realmsServiceClient->deleteRealm($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $realmsServiceClient->resumeOperation($operationName, 'deleteRealm'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $realmsServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the realm to delete, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteRealm($name, array $optionalArgs = []) + { + $request = new DeleteRealmRequest(); + $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->startOperationsCall('DeleteRealm', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets details of a single realm. + * + * Sample code: + * ``` + * $realmsServiceClient = new RealmsServiceClient(); + * try { + * $formattedName = $realmsServiceClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + * $response = $realmsServiceClient->getRealm($formattedName); + * } finally { + * $realmsServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the realm to retrieve, in the following form: + * `projects/{project}/locations/{location}/realms/{realm}`. + * @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\Gaming\V1\Realm + * + * @throws ApiException if the remote call fails + */ + public function getRealm($name, array $optionalArgs = []) + { + $request = new GetRealmRequest(); + $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('GetRealm', Realm::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists realms in a given project and location. + * + * Sample code: + * ``` + * $realmsServiceClient = new RealmsServiceClient(); + * try { + * $formattedParent = $realmsServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $realmsServiceClient->listRealms($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $realmsServiceClient->listRealms($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $realmsServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}`. + * @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 + * Optional. The filter to apply to list results. + * @type string $orderBy + * Optional. Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listRealms($parent, array $optionalArgs = []) + { + $request = new ListRealmsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListRealms', $optionalArgs, ListRealmsResponse::class, $request); + } + + /** + * Previews patches to a single realm. + * + * Sample code: + * ``` + * $realmsServiceClient = new RealmsServiceClient(); + * try { + * $realm = new Realm(); + * $updateMask = new FieldMask(); + * $response = $realmsServiceClient->previewRealmUpdate($realm, $updateMask); + * } finally { + * $realmsServiceClient->close(); + * } + * ``` + * + * @param Realm $realm Required. The realm to be updated. + * Only fields specified in update_mask are updated. + * @param FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @param array $optionalArgs { + * Optional. + * + * @type Timestamp $previewTime + * Optional. The target timestamp to compute the preview. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Gaming\V1\PreviewRealmUpdateResponse + * + * @throws ApiException if the remote call fails + */ + public function previewRealmUpdate($realm, $updateMask, array $optionalArgs = []) + { + $request = new PreviewRealmUpdateRequest(); + $requestParamHeaders = []; + $request->setRealm($realm); + $request->setUpdateMask($updateMask); + $requestParamHeaders['realm.name'] = $realm->getName(); + if (isset($optionalArgs['previewTime'])) { + $request->setPreviewTime($optionalArgs['previewTime']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('PreviewRealmUpdate', PreviewRealmUpdateResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Patches a single realm. + * + * Sample code: + * ``` + * $realmsServiceClient = new RealmsServiceClient(); + * try { + * $realm = new Realm(); + * $updateMask = new FieldMask(); + * $operationResponse = $realmsServiceClient->updateRealm($realm, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $realmsServiceClient->updateRealm($realm, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $realmsServiceClient->resumeOperation($operationName, 'updateRealm'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $realmsServiceClient->close(); + * } + * ``` + * + * @param Realm $realm Required. The realm to be updated. + * Only fields specified in update_mask are updated. + * @param FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateRealm($realm, $updateMask, array $optionalArgs = []) + { + $request = new UpdateRealmRequest(); + $requestParamHeaders = []; + $request->setRealm($realm); + $request->setUpdateMask($updateMask); + $requestParamHeaders['realm.name'] = $realm->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateRealm', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/Gaming/v1/src/V1/RealmsServiceClient.php b/owl-bot-staging/Gaming/v1/src/V1/RealmsServiceClient.php new file mode 100644 index 000000000000..0eed2256ef9f --- /dev/null +++ b/owl-bot-staging/Gaming/v1/src/V1/RealmsServiceClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.gaming.v1.GameServerClustersService' => [ + 'CreateGameServerCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Gaming\V1\GameServerCluster', + 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteGameServerCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateGameServerCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Gaming\V1\GameServerCluster', + 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListGameServerClusters' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGameServerClusters', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_clusters_service_rest_client_config.php b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_clusters_service_rest_client_config.php new file mode 100644 index 000000000000..71744f4afe82 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_clusters_service_rest_client_config.php @@ -0,0 +1,217 @@ + [ + 'google.cloud.gaming.v1.GameServerClustersService' => [ + 'CreateGameServerCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters', + 'body' => 'game_server_cluster', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'game_server_cluster_id', + ], + ], + 'DeleteGameServerCluster' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGameServerCluster' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListGameServerClusters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PreviewCreateGameServerCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters:previewCreate', + 'body' => 'game_server_cluster', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PreviewDeleteGameServerCluster' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewDelete', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'PreviewUpdateGameServerCluster' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewUpdate', + 'body' => 'game_server_cluster', + 'placeholders' => [ + 'game_server_cluster.name' => [ + 'getters' => [ + 'getGameServerCluster', + 'getName', + ], + ], + ], + ], + 'UpdateGameServerCluster' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}', + 'body' => 'game_server_cluster', + 'placeholders' => [ + 'game_server_cluster.name' => [ + 'getters' => [ + 'getGameServerCluster', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + '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.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}: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/Gaming/v1/src/V1/resources/game_server_configs_service_client_config.json b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_client_config.json new file mode 100644 index 000000000000..22173ad16e96 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_client_config.json @@ -0,0 +1,64 @@ +{ + "interfaces": { + "google.cloud.gaming.v1.GameServerConfigsService": { + "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": { + "CreateGameServerConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteGameServerConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetGameServerConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListGameServerConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_descriptor_config.php b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_descriptor_config.php new file mode 100644 index 000000000000..387d7108151e --- /dev/null +++ b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_descriptor_config.php @@ -0,0 +1,38 @@ + [ + 'google.cloud.gaming.v1.GameServerConfigsService' => [ + 'CreateGameServerConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Gaming\V1\GameServerConfig', + 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteGameServerConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListGameServerConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGameServerConfigs', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_rest_client_config.php b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_rest_client_config.php new file mode 100644 index 000000000000..105c41262ae0 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_rest_client_config.php @@ -0,0 +1,165 @@ + [ + 'google.cloud.gaming.v1.GameServerConfigsService' => [ + 'CreateGameServerConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/gameServerDeployments/*}/configs', + 'body' => 'game_server_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'config_id', + ], + ], + 'DeleteGameServerConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGameServerConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListGameServerConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/gameServerDeployments/*}/configs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + '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.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}: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/Gaming/v1/src/V1/resources/game_server_deployments_service_client_config.json b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_client_config.json new file mode 100644 index 000000000000..2a3e3208f33c --- /dev/null +++ b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_client_config.json @@ -0,0 +1,89 @@ +{ + "interfaces": { + "google.cloud.gaming.v1.GameServerDeploymentsService": { + "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": { + "CreateGameServerDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteGameServerDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "FetchDeploymentState": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetGameServerDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetGameServerDeploymentRollout": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListGameServerDeployments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "PreviewGameServerDeploymentRollout": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateGameServerDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateGameServerDeploymentRollout": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_descriptor_config.php b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_descriptor_config.php new file mode 100644 index 000000000000..cb7573d4faa7 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_descriptor_config.php @@ -0,0 +1,58 @@ + [ + 'google.cloud.gaming.v1.GameServerDeploymentsService' => [ + 'CreateGameServerDeployment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Gaming\V1\GameServerDeployment', + 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteGameServerDeployment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateGameServerDeployment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Gaming\V1\GameServerDeployment', + 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateGameServerDeploymentRollout' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Gaming\V1\GameServerDeployment', + 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListGameServerDeployments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGameServerDeployments', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_rest_client_config.php b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_rest_client_config.php new file mode 100644 index 000000000000..8924ef153b6a --- /dev/null +++ b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_rest_client_config.php @@ -0,0 +1,233 @@ + [ + 'google.cloud.gaming.v1.GameServerDeploymentsService' => [ + 'CreateGameServerDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/gameServerDeployments', + 'body' => 'game_server_deployment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'deployment_id', + ], + ], + 'DeleteGameServerDeployment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gameServerDeployments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'FetchDeploymentState' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gameServerDeployments/*}:fetchDeploymentState', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGameServerDeployment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gameServerDeployments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGameServerDeploymentRollout' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gameServerDeployments/*}/rollout', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListGameServerDeployments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/gameServerDeployments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PreviewGameServerDeploymentRollout' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{rollout.name=projects/*/locations/*/gameServerDeployments/*}/rollout:preview', + 'body' => 'rollout', + 'placeholders' => [ + 'rollout.name' => [ + 'getters' => [ + 'getRollout', + 'getName', + ], + ], + ], + ], + 'UpdateGameServerDeployment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{game_server_deployment.name=projects/*/locations/*/gameServerDeployments/*}', + 'body' => 'game_server_deployment', + 'placeholders' => [ + 'game_server_deployment.name' => [ + 'getters' => [ + 'getGameServerDeployment', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateGameServerDeploymentRollout' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{rollout.name=projects/*/locations/*/gameServerDeployments/*}/rollout', + 'body' => 'rollout', + 'placeholders' => [ + 'rollout.name' => [ + 'getters' => [ + 'getRollout', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + '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.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}: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/Gaming/v1/src/V1/resources/realms_service_client_config.json b/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_client_config.json new file mode 100644 index 000000000000..829b592b0664 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_client_config.json @@ -0,0 +1,74 @@ +{ + "interfaces": { + "google.cloud.gaming.v1.RealmsService": { + "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": { + "CreateRealm": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteRealm": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetRealm": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListRealms": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "PreviewRealmUpdate": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateRealm": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_descriptor_config.php b/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_descriptor_config.php new file mode 100644 index 000000000000..777d5d79104e --- /dev/null +++ b/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_descriptor_config.php @@ -0,0 +1,48 @@ + [ + 'google.cloud.gaming.v1.RealmsService' => [ + 'CreateRealm' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Gaming\V1\Realm', + 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteRealm' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateRealm' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Gaming\V1\Realm', + 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListRealms' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRealms', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_rest_client_config.php b/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_rest_client_config.php new file mode 100644 index 000000000000..564af8d59c6c --- /dev/null +++ b/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_rest_client_config.php @@ -0,0 +1,194 @@ + [ + 'google.cloud.gaming.v1.RealmsService' => [ + 'CreateRealm' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/realms', + 'body' => 'realm', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'realm_id', + ], + ], + 'DeleteRealm' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/realms/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRealm' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/realms/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListRealms' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/realms', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PreviewRealmUpdate' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{realm.name=projects/*/locations/*/realms/*}:previewUpdate', + 'body' => 'realm', + 'placeholders' => [ + 'realm.name' => [ + 'getters' => [ + 'getRealm', + 'getName', + ], + ], + ], + ], + 'UpdateRealm' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{realm.name=projects/*/locations/*/realms/*}', + 'body' => 'realm', + 'placeholders' => [ + 'realm.name' => [ + 'getters' => [ + 'getRealm', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + '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.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}: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/Gaming/v1/tests/Unit/V1/GameServerClustersServiceClientTest.php b/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerClustersServiceClientTest.php new file mode 100644 index 000000000000..609e417fbfe4 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerClustersServiceClientTest.php @@ -0,0 +1,786 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return GameServerClustersServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new GameServerClustersServiceClient($options); + } + + /** @test */ + public function createGameServerClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGameServerClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $expectedResponse = new GameServerCluster(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createGameServerClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + $gameServerClusterId = 'gameServerClusterId-858763025'; + $gameServerCluster = new GameServerCluster(); + $gameServerClusterName = 'gameServerClusterName-525342064'; + $gameServerCluster->setName($gameServerClusterName); + $response = $gapicClient->createGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/CreateGameServerCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getGameServerClusterId(); + $this->assertProtobufEquals($gameServerClusterId, $actualValue); + $actualValue = $actualApiRequestObject->getGameServerCluster(); + $this->assertProtobufEquals($gameServerCluster, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGameServerClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGameServerClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGameServerClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + $gameServerClusterId = 'gameServerClusterId-858763025'; + $gameServerCluster = new GameServerCluster(); + $gameServerClusterName = 'gameServerClusterName-525342064'; + $gameServerCluster->setName($gameServerClusterName); + $response = $gapicClient->createGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGameServerClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGameServerClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGameServerClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteGameServerClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); + $response = $gapicClient->deleteGameServerCluster($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/DeleteGameServerCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGameServerClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGameServerClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGameServerClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); + $response = $gapicClient->deleteGameServerCluster($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGameServerClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getGameServerClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $expectedResponse = new GameServerCluster(); + $expectedResponse->setName($name2); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); + $response = $gapicClient->getGameServerCluster($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/GetGameServerCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGameServerClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); + try { + $gapicClient->getGameServerCluster($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 listGameServerClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $gameServerClustersElement = new GameServerCluster(); + $gameServerClusters = [ + $gameServerClustersElement, + ]; + $expectedResponse = new ListGameServerClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGameServerClusters($gameServerClusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + $response = $gapicClient->listGameServerClusters($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGameServerClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/ListGameServerClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGameServerClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + try { + $gapicClient->listGameServerClusters($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 previewCreateGameServerClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $etag = 'etag3123477'; + $expectedResponse = new PreviewCreateGameServerClusterResponse(); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + $gameServerClusterId = 'gameServerClusterId-858763025'; + $gameServerCluster = new GameServerCluster(); + $gameServerClusterName = 'gameServerClusterName-525342064'; + $gameServerCluster->setName($gameServerClusterName); + $response = $gapicClient->previewCreateGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/PreviewCreateGameServerCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getGameServerClusterId(); + $this->assertProtobufEquals($gameServerClusterId, $actualValue); + $actualValue = $actualRequestObject->getGameServerCluster(); + $this->assertProtobufEquals($gameServerCluster, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function previewCreateGameServerClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + $gameServerClusterId = 'gameServerClusterId-858763025'; + $gameServerCluster = new GameServerCluster(); + $gameServerClusterName = 'gameServerClusterName-525342064'; + $gameServerCluster->setName($gameServerClusterName); + try { + $gapicClient->previewCreateGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function previewDeleteGameServerClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $etag = 'etag3123477'; + $expectedResponse = new PreviewDeleteGameServerClusterResponse(); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); + $response = $gapicClient->previewDeleteGameServerCluster($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/PreviewDeleteGameServerCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function previewDeleteGameServerClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); + try { + $gapicClient->previewDeleteGameServerCluster($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 previewUpdateGameServerClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $etag = 'etag3123477'; + $expectedResponse = new PreviewUpdateGameServerClusterResponse(); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $gameServerCluster = new GameServerCluster(); + $gameServerClusterName = 'gameServerClusterName-525342064'; + $gameServerCluster->setName($gameServerClusterName); + $updateMask = new FieldMask(); + $response = $gapicClient->previewUpdateGameServerCluster($gameServerCluster, $updateMask); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/PreviewUpdateGameServerCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getGameServerCluster(); + $this->assertProtobufEquals($gameServerCluster, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function previewUpdateGameServerClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $gameServerCluster = new GameServerCluster(); + $gameServerClusterName = 'gameServerClusterName-525342064'; + $gameServerCluster->setName($gameServerClusterName); + $updateMask = new FieldMask(); + try { + $gapicClient->previewUpdateGameServerCluster($gameServerCluster, $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()); + } + + /** @test */ + public function updateGameServerClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGameServerClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $expectedResponse = new GameServerCluster(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGameServerClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $gameServerCluster = new GameServerCluster(); + $gameServerClusterName = 'gameServerClusterName-525342064'; + $gameServerCluster->setName($gameServerClusterName); + $updateMask = new FieldMask(); + $response = $gapicClient->updateGameServerCluster($gameServerCluster, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/UpdateGameServerCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGameServerCluster(); + $this->assertProtobufEquals($gameServerCluster, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGameServerClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGameServerClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGameServerClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $gameServerCluster = new GameServerCluster(); + $gameServerClusterName = 'gameServerClusterName-525342064'; + $gameServerCluster->setName($gameServerClusterName); + $updateMask = new FieldMask(); + $response = $gapicClient->updateGameServerCluster($gameServerCluster, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGameServerClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerConfigsServiceClientTest.php b/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerConfigsServiceClientTest.php new file mode 100644 index 000000000000..6ed70f77b915 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerConfigsServiceClientTest.php @@ -0,0 +1,443 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return GameServerConfigsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new GameServerConfigsServiceClient($options); + } + + /** @test */ + public function createGameServerConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGameServerConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new GameServerConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createGameServerConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + $configId = 'configId-804450504'; + $gameServerConfig = new GameServerConfig(); + $response = $gapicClient->createGameServerConfig($formattedParent, $configId, $gameServerConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerConfigsService/CreateGameServerConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getConfigId(); + $this->assertProtobufEquals($configId, $actualValue); + $actualValue = $actualApiRequestObject->getGameServerConfig(); + $this->assertProtobufEquals($gameServerConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGameServerConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGameServerConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGameServerConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + $configId = 'configId-804450504'; + $gameServerConfig = new GameServerConfig(); + $response = $gapicClient->createGameServerConfig($formattedParent, $configId, $gameServerConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGameServerConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGameServerConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGameServerConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteGameServerConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->gameServerConfigName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[CONFIG]'); + $response = $gapicClient->deleteGameServerConfig($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerConfigsService/DeleteGameServerConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGameServerConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGameServerConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGameServerConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->gameServerConfigName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[CONFIG]'); + $response = $gapicClient->deleteGameServerConfig($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGameServerConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getGameServerConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new GameServerConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->gameServerConfigName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[CONFIG]'); + $response = $gapicClient->getGameServerConfig($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerConfigsService/GetGameServerConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGameServerConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->gameServerConfigName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[CONFIG]'); + try { + $gapicClient->getGameServerConfig($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 listGameServerConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $gameServerConfigsElement = new GameServerConfig(); + $gameServerConfigs = [ + $gameServerConfigsElement, + ]; + $expectedResponse = new ListGameServerConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGameServerConfigs($gameServerConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + $response = $gapicClient->listGameServerConfigs($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGameServerConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerConfigsService/ListGameServerConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGameServerConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + try { + $gapicClient->listGameServerConfigs($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()); + } +} diff --git a/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerDeploymentsServiceClientTest.php b/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerDeploymentsServiceClientTest.php new file mode 100644 index 000000000000..6c6ff369ce81 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerDeploymentsServiceClientTest.php @@ -0,0 +1,887 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return GameServerDeploymentsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new GameServerDeploymentsServiceClient($options); + } + + /** @test */ + public function createGameServerDeploymentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGameServerDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $expectedResponse = new GameServerDeployment(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createGameServerDeploymentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $deploymentId = 'deploymentId51250389'; + $gameServerDeployment = new GameServerDeployment(); + $response = $gapicClient->createGameServerDeployment($formattedParent, $deploymentId, $gameServerDeployment); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/CreateGameServerDeployment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDeploymentId(); + $this->assertProtobufEquals($deploymentId, $actualValue); + $actualValue = $actualApiRequestObject->getGameServerDeployment(); + $this->assertProtobufEquals($gameServerDeployment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGameServerDeploymentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGameServerDeploymentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGameServerDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $deploymentId = 'deploymentId51250389'; + $gameServerDeployment = new GameServerDeployment(); + $response = $gapicClient->createGameServerDeployment($formattedParent, $deploymentId, $gameServerDeployment); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGameServerDeploymentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGameServerDeploymentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGameServerDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteGameServerDeploymentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + $response = $gapicClient->deleteGameServerDeployment($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/DeleteGameServerDeployment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGameServerDeploymentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGameServerDeploymentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGameServerDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + $response = $gapicClient->deleteGameServerDeployment($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGameServerDeploymentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function fetchDeploymentStateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new FetchDeploymentStateResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->fetchDeploymentState($name); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/FetchDeploymentState', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fetchDeploymentStateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->fetchDeploymentState($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 getGameServerDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $expectedResponse = new GameServerDeployment(); + $expectedResponse->setName($name2); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + $response = $gapicClient->getGameServerDeployment($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/GetGameServerDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGameServerDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + try { + $gapicClient->getGameServerDeployment($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 getGameServerDeploymentRolloutTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $defaultGameServerConfig = 'defaultGameServerConfig-1758159633'; + $etag = 'etag3123477'; + $expectedResponse = new GameServerDeploymentRollout(); + $expectedResponse->setName($name2); + $expectedResponse->setDefaultGameServerConfig($defaultGameServerConfig); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + $response = $gapicClient->getGameServerDeploymentRollout($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/GetGameServerDeploymentRollout', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGameServerDeploymentRolloutExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); + try { + $gapicClient->getGameServerDeploymentRollout($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 listGameServerDeploymentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $gameServerDeploymentsElement = new GameServerDeployment(); + $gameServerDeployments = [ + $gameServerDeploymentsElement, + ]; + $expectedResponse = new ListGameServerDeploymentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGameServerDeployments($gameServerDeployments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listGameServerDeployments($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGameServerDeployments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/ListGameServerDeployments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGameServerDeploymentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listGameServerDeployments($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 previewGameServerDeploymentRolloutTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $etag = 'etag3123477'; + $expectedResponse = new PreviewGameServerDeploymentRolloutResponse(); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $rollout = new GameServerDeploymentRollout(); + $response = $gapicClient->previewGameServerDeploymentRollout($rollout); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/PreviewGameServerDeploymentRollout', $actualFuncCall); + $actualValue = $actualRequestObject->getRollout(); + $this->assertProtobufEquals($rollout, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function previewGameServerDeploymentRolloutExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $rollout = new GameServerDeploymentRollout(); + try { + $gapicClient->previewGameServerDeploymentRollout($rollout); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGameServerDeploymentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGameServerDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $expectedResponse = new GameServerDeployment(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGameServerDeploymentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $gameServerDeployment = new GameServerDeployment(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateGameServerDeployment($gameServerDeployment, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/UpdateGameServerDeployment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGameServerDeployment(); + $this->assertProtobufEquals($gameServerDeployment, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGameServerDeploymentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGameServerDeploymentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGameServerDeploymentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $gameServerDeployment = new GameServerDeployment(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateGameServerDeployment($gameServerDeployment, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGameServerDeploymentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGameServerDeploymentRolloutTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGameServerDeploymentRolloutTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $expectedResponse = new GameServerDeployment(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGameServerDeploymentRolloutTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $rollout = new GameServerDeploymentRollout(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateGameServerDeploymentRollout($rollout, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/UpdateGameServerDeploymentRollout', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRollout(); + $this->assertProtobufEquals($rollout, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGameServerDeploymentRolloutTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGameServerDeploymentRolloutExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGameServerDeploymentRolloutTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $rollout = new GameServerDeploymentRollout(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateGameServerDeploymentRollout($rollout, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGameServerDeploymentRolloutTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Gaming/v1/tests/Unit/V1/RealmsServiceClientTest.php b/owl-bot-staging/Gaming/v1/tests/Unit/V1/RealmsServiceClientTest.php new file mode 100644 index 000000000000..26fce1c09a50 --- /dev/null +++ b/owl-bot-staging/Gaming/v1/tests/Unit/V1/RealmsServiceClientTest.php @@ -0,0 +1,658 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return RealmsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new RealmsServiceClient($options); + } + + /** @test */ + public function createRealmTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRealmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $timeZone = 'timeZone36848094'; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $expectedResponse = new Realm(); + $expectedResponse->setName($name); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createRealmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $realmId = 'realmId-859416373'; + $realm = new Realm(); + $realmTimeZone = 'realmTimeZone1648425928'; + $realm->setTimeZone($realmTimeZone); + $response = $gapicClient->createRealm($formattedParent, $realmId, $realm); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.RealmsService/CreateRealm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRealmId(); + $this->assertProtobufEquals($realmId, $actualValue); + $actualValue = $actualApiRequestObject->getRealm(); + $this->assertProtobufEquals($realm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRealmTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createRealmExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRealmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $realmId = 'realmId-859416373'; + $realm = new Realm(); + $realmTimeZone = 'realmTimeZone1648425928'; + $realm->setTimeZone($realmTimeZone); + $response = $gapicClient->createRealm($formattedParent, $realmId, $realm); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRealmTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRealmTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRealmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteRealmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + $response = $gapicClient->deleteRealm($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.RealmsService/DeleteRealm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRealmTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRealmExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRealmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + $response = $gapicClient->deleteRealm($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRealmTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getRealmTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $timeZone = 'timeZone36848094'; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $expectedResponse = new Realm(); + $expectedResponse->setName($name2); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + $response = $gapicClient->getRealm($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.RealmsService/GetRealm', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRealmExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); + try { + $gapicClient->getRealm($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 listRealmsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $realmsElement = new Realm(); + $realms = [ + $realmsElement, + ]; + $expectedResponse = new ListRealmsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRealms($realms); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listRealms($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRealms()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.RealmsService/ListRealms', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRealmsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listRealms($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 previewRealmUpdateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $etag = 'etag3123477'; + $expectedResponse = new PreviewRealmUpdateResponse(); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $realm = new Realm(); + $realmTimeZone = 'realmTimeZone1648425928'; + $realm->setTimeZone($realmTimeZone); + $updateMask = new FieldMask(); + $response = $gapicClient->previewRealmUpdate($realm, $updateMask); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.RealmsService/PreviewRealmUpdate', $actualFuncCall); + $actualValue = $actualRequestObject->getRealm(); + $this->assertProtobufEquals($realm, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function previewRealmUpdateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $realm = new Realm(); + $realmTimeZone = 'realmTimeZone1648425928'; + $realm->setTimeZone($realmTimeZone); + $updateMask = new FieldMask(); + try { + $gapicClient->previewRealmUpdate($realm, $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()); + } + + /** @test */ + public function updateRealmTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRealmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $timeZone = 'timeZone36848094'; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $expectedResponse = new Realm(); + $expectedResponse->setName($name); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateRealmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $realm = new Realm(); + $realmTimeZone = 'realmTimeZone1648425928'; + $realm->setTimeZone($realmTimeZone); + $updateMask = new FieldMask(); + $response = $gapicClient->updateRealm($realm, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gaming.v1.RealmsService/UpdateRealm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRealm(); + $this->assertProtobufEquals($realm, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRealmTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateRealmExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRealmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $realm = new Realm(); + $realmTimeZone = 'realmTimeZone1648425928'; + $realm->setTimeZone($realmTimeZone); + $updateMask = new FieldMask(); + $response = $gapicClient->updateRealm($realm, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRealmTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Backup.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Backup.php new file mode 100644 index 0000000000000000000000000000000000000000..24e87b17b19ea4bd4807a4aab5e5b04ea092e530 GIT binary patch literal 2893 zcma)8;Zoa15Dqvdum<9YkO-%lC~4A=PLYPR)5(a^);7ZNBn1x;esnyek)^Xyk#!oK z#Kg_;D1CvxL8nj9K1F}$DZ08l$(}&K{$tJU?zem2?R~dD{1lx;@TJxwA&H%Ycv^3y zB_~9SVwzBw23jxe_erd|bQt*oiFHle+1K{=k2Gtiee@VZ8BJrCnA(8SK|l;Qps8mJ zPD#&kPt(Xa+cd^6nMHS7d35)9a|^%?9LBT; z$Ab@`;V(*if$wT8aT5G{>NDF9{ls?y|99NOw$^t7MlkfEZ$Ay)#HXQ_1?-0|S%0Ak z%*^*`L~+mCT3$~lqX8-Cw!?(Pp%Zj>2y~WFuFXJpTx$GzT~~`c?He8*of-|F&RzI;jb!uHC+cP zYr;?GovIg|s-JDvq{(n1--snUqHk+gpyS;@3Z&m7Sq1NQ>>MM>_bD8n{JjKoqL-CB za5K9N>WntCzR)QBS1&15D5buq&W=~UgNhpyyqk80q?XW9d0ErtCh|0TL8rjMs5HWx zC8KUm7qtR&Lnlm~KrLgyynxzfT?p@33G4cxi1o^i;d}TxxW=A@kmjj>XCq8 zB>{C$ZO<7o^%kO+m7n4Mq=meX{8-jIKW)7gyfKa+3fKh>y9J6|oJ54_5G`0Hp&O5) zOe5@5GEyr%aQ%u+TSdSdG7_9Ugk>iP>_Y39x`;4>(APJVHmoq@#6`iK^jYGmo?Ve@ zFBeb7^B`0QRtqR6icl3%5^2cPWe)cBG+-Ww%@H5NU6+O#tIR&5K{_PJZsMr7iybHr zp<1{wg6)|wwK_I;&>W-;71JI{fmiSFayG9hNA^xrMCLDp;ByPgnT`@wL73&2-RIZi z9A^F^dJPtNw2k+O(NJAM5P9Feho$UkdBn7G4L}` z@ksjq!0z#f(w<23ph#2uV-{|I!mx51Zpq^kN~B=o(^q)-BxYG+E=CH06^ZP|UT$Nk zN0}zPzWzKu$ttCy8GFYf4HI&)3Kf*(9AC|ZYXRF_#S0ZCCv;p@rch|9y@Gq9b1pzt zpp;!;uCB@wl+T%rO*5Z+6^Zmzq3XjHbl~8|trkIZHYX}0A1AGmBLsenM2l;hwpy&!g zFh1m;=W-(J1Wt&q@>G$EFt-$|=Z$4pln%_L5o!E00}nCf=g+%Q5!H0E(Wx`@YeT+N z1BwX-I*kX$fQ0m1Gj{s%tTjGX`g literal 0 HcmV?d00001 diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/BackupPlan.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/BackupPlan.php new file mode 100644 index 0000000000000000000000000000000000000000..fcbd35996867fc186bd73e3c18e44f557290ddb5 GIT binary patch literal 2426 zcmb7G-ESL35GQt>I^%qli>h7?s7pUxO7G+V61p^iounozG**f7fKFKJyR~ydCAE;zu(OKW@cw!d>x%c@PKq!$YPo@pY$gr zJz*q@MJhbONk1D5SWG-IiUQ7Ji;%rT^7`jVWU8hMM>dTDJJu5A4P1YGy$hTa)IrrTH(PL(PjBPHRuHnPohwZPhKE$jp^h=$i8&DvNN; zH0s7;s7@5H>RqWNN$!{uUFbCIk!GjvyhjTS6(+Gjj5tE7xlG#8`! zPGR=LG@ck8*wD9B;+-%*RPJ2F`B&zo+MjZ@ofW^Xk=4Y}CE5z*?7eEe3DrV?+py-vSlB{G)yfhQ z(JVoTq^Q<^E5Yi&vM^zta^5QzLmo%<+xLt;*i0}+mEMJ8$y3{U^bWyZ&z4MrEU(~p z!9t@5yAC&o2opU%pDe=TD@G*y05*dVN5E&jvEbQ=p*krwtbRb7(Mf-K8Jf`Vt!ointernalAddGeneratedFile( + ' + +&google/cloud/gkebackup/v1/common.protogoogle.cloud.gkebackup.v1" + +Namespaces + +namespaces ( "1 +NamespacedName + namespace (  +name ( "V +NamespacedNamesC +namespaced_names ( 2).google.cloud.gkebackup.v1.NamespacedName"W + EncryptionKeyF +gcp_kms_encryption_key ( B&úA# +!cloudkms.googleapis.com/CryptoKeyBÉ +com.google.cloud.gkebackup.v1B CommonProtoPZBgoogle.golang.org/genproto/googleapis/cloud/gkebackup/v1;gkebackupªGoogle.Cloud.GkeBackup.V1ÊGoogle\\Cloud\\GkeBackup\\V1êGoogle::Cloud::GkeBackup::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Gkebackup.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Gkebackup.php new file mode 100644 index 000000000000..a4a6316d1d48 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Gkebackup.php @@ -0,0 +1,228 @@ +internalAddGeneratedFile( + ' +éO +)google/cloud/gkebackup/v1/gkebackup.protogoogle.cloud.gkebackup.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/gkebackup/v1/backup.proto+google/cloud/gkebackup/v1/backup_plan.proto\'google/cloud/gkebackup/v1/restore.proto,google/cloud/gkebackup/v1/restore_plan.proto&google/cloud/gkebackup/v1/volume.proto#google/longrunning/operations.proto google/protobuf/field_mask.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àA"² +CreateBackupPlanRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location? + backup_plan ( 2%.google.cloud.gkebackup.v1.BackupPlanBàA +backup_plan_id ( BàA"œ +ListBackupPlansRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location + page_size ( + +page_token (  +filter (  +order_by ( "„ +ListBackupPlansResponse; + backup_plans ( 2%.google.cloud.gkebackup.v1.BackupPlan +next_page_token (  + unreachable ( "Q +GetBackupPlanRequest9 +name ( B+àAúA% +#gkebackup.googleapis.com/BackupPlan"‹ +UpdateBackupPlanRequest? + backup_plan ( 2%.google.cloud.gkebackup.v1.BackupPlanBàA/ + update_mask ( 2.google.protobuf.FieldMask"b +DeleteBackupPlanRequest9 +name ( B+àAúA% +#gkebackup.googleapis.com/BackupPlan +etag ( "˜ +CreateBackupRequest; +parent ( B+àAúA% +#gkebackup.googleapis.com/BackupPlan1 +backup ( 2!.google.cloud.gkebackup.v1.Backup + backup_id ( "š +ListBackupsRequest; +parent ( B+àAúA% +#gkebackup.googleapis.com/BackupPlan + page_size ( + +page_token (  +filter (  +order_by ( "b +ListBackupsResponse2 +backups ( 2!.google.cloud.gkebackup.v1.Backup +next_page_token ( "I +GetBackupRequest5 +name ( B\'àAúA! +gkebackup.googleapis.com/Backup"~ +UpdateBackupRequest6 +backup ( 2!.google.cloud.gkebackup.v1.BackupBàA/ + update_mask ( 2.google.protobuf.FieldMask"i +DeleteBackupRequest5 +name ( B\'àAúA! +gkebackup.googleapis.com/Backup +etag (  +force ("œ +ListVolumeBackupsRequest7 +parent ( B\'àAúA! +gkebackup.googleapis.com/Backup + page_size ( + +page_token (  +filter (  +order_by ( "u +ListVolumeBackupsResponse? +volume_backups ( 2\'.google.cloud.gkebackup.v1.VolumeBackup +next_page_token ( "U +GetVolumeBackupRequest; +name ( B-àAúA\' +%gkebackup.googleapis.com/VolumeBackup"¶ +CreateRestorePlanRequest9 +parent ( B)àAúA# +!locations.googleapis.com/LocationA + restore_plan ( 2&.google.cloud.gkebackup.v1.RestorePlanBàA +restore_plan_id ( BàA" +ListRestorePlansRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location + page_size ( + +page_token (  +filter (  +order_by ( "‡ +ListRestorePlansResponse= + restore_plans ( 2&.google.cloud.gkebackup.v1.RestorePlan +next_page_token (  + unreachable ( "S +GetRestorePlanRequest: +name ( B,àAúA& +$gkebackup.googleapis.com/RestorePlan"Ž +UpdateRestorePlanRequestA + restore_plan ( 2&.google.cloud.gkebackup.v1.RestorePlanBàA/ + update_mask ( 2.google.protobuf.FieldMask"s +DeleteRestorePlanRequest: +name ( B,àAúA& +$gkebackup.googleapis.com/RestorePlan +etag (  +force ("§ +CreateRestoreRequest< +parent ( B,àAúA& +$gkebackup.googleapis.com/RestorePlan8 +restore ( 2".google.cloud.gkebackup.v1.RestoreBàA + +restore_id ( BàA"œ +ListRestoresRequest< +parent ( B,àAúA& +$gkebackup.googleapis.com/RestorePlan + page_size ( + +page_token (  +filter (  +order_by ( "z +ListRestoresResponse4 +restores ( 2".google.cloud.gkebackup.v1.Restore +next_page_token (  + unreachable ( "K +GetRestoreRequest6 +name ( B(àAúA" + gkebackup.googleapis.com/Restore" +UpdateRestoreRequest8 +restore ( 2".google.cloud.gkebackup.v1.RestoreBàA/ + update_mask ( 2.google.protobuf.FieldMask"k +DeleteRestoreRequest6 +name ( B(àAúA" + gkebackup.googleapis.com/Restore +etag (  +force ("ž +ListVolumeRestoresRequest8 +parent ( B(àAúA" + gkebackup.googleapis.com/Restore + page_size ( + +page_token (  +filter (  +order_by ( "x +ListVolumeRestoresResponseA +volume_restores ( 2(.google.cloud.gkebackup.v1.VolumeRestore +next_page_token ( "W +GetVolumeRestoreRequest< +name ( B.àAúA( +&gkebackup.googleapis.com/VolumeRestore2Å( + BackupForGKEò +CreateBackupPlan2.google.cloud.gkebackup.v1.CreateBackupPlanRequest.google.longrunning.Operation"Š‚Óä“>"//v1/{parent=projects/*/locations/*}/backupPlans: backup_planÚA!parent,backup_plan,backup_plan_idÊA + +BackupPlanOperationMetadataº +ListBackupPlans1.google.cloud.gkebackup.v1.ListBackupPlansRequest2.google.cloud.gkebackup.v1.ListBackupPlansResponse"@‚Óä“1//v1/{parent=projects/*/locations/*}/backupPlansÚAparent§ + GetBackupPlan/.google.cloud.gkebackup.v1.GetBackupPlanRequest%.google.cloud.gkebackup.v1.BackupPlan">‚Óä“1//v1/{name=projects/*/locations/*/backupPlans/*}ÚAnameô +UpdateBackupPlan2.google.cloud.gkebackup.v1.UpdateBackupPlanRequest.google.longrunning.Operation"Œ‚Óä“J2;/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}: backup_planÚAbackup_plan,update_maskÊA + +BackupPlanOperationMetadataÒ +DeleteBackupPlan2.google.cloud.gkebackup.v1.DeleteBackupPlanRequest.google.longrunning.Operation"k‚Óä“1*//v1/{name=projects/*/locations/*/backupPlans/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadataá + CreateBackup..google.cloud.gkebackup.v1.CreateBackupRequest.google.longrunning.Operation"‚Óä“C"9/v1/{parent=projects/*/locations/*/backupPlans/*}/backups:backupÚAparent,backup,backup_idÊA +BackupOperationMetadata¸ + ListBackups-.google.cloud.gkebackup.v1.ListBackupsRequest..google.cloud.gkebackup.v1.ListBackupsResponse"J‚Óä“;9/v1/{parent=projects/*/locations/*/backupPlans/*}/backupsÚAparent¥ + GetBackup+.google.cloud.gkebackup.v1.GetBackupRequest!.google.cloud.gkebackup.v1.Backup"H‚Óä“;9/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}ÚAnameã + UpdateBackup..google.cloud.gkebackup.v1.UpdateBackupRequest.google.longrunning.Operation"ƒ‚Óä“J2@/v1/{backup.name=projects/*/locations/*/backupPlans/*/backups/*}:backupÚAbackup,update_maskÊA +BackupOperationMetadataÔ + DeleteBackup..google.cloud.gkebackup.v1.DeleteBackupRequest.google.longrunning.Operation"u‚Óä“;*9/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadataÚ +ListVolumeBackups3.google.cloud.gkebackup.v1.ListVolumeBackupsRequest4.google.cloud.gkebackup.v1.ListVolumeBackupsResponse"Z‚Óä“KI/v1/{parent=projects/*/locations/*/backupPlans/*/backups/*}/volumeBackupsÚAparentÇ +GetVolumeBackup1.google.cloud.gkebackup.v1.GetVolumeBackupRequest\'.google.cloud.gkebackup.v1.VolumeBackup"X‚Óä“KI/v1/{name=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}ÚAnameù +CreateRestorePlan3.google.cloud.gkebackup.v1.CreateRestorePlanRequest.google.longrunning.Operation"‚Óä“@"0/v1/{parent=projects/*/locations/*}/restorePlans: restore_planÚA#parent,restore_plan,restore_plan_idÊA + RestorePlanOperationMetadata¾ +ListRestorePlans2.google.cloud.gkebackup.v1.ListRestorePlansRequest3.google.cloud.gkebackup.v1.ListRestorePlansResponse"A‚Óä“20/v1/{parent=projects/*/locations/*}/restorePlansÚAparent« +GetRestorePlan0.google.cloud.gkebackup.v1.GetRestorePlanRequest&.google.cloud.gkebackup.v1.RestorePlan"?‚Óä“20/v1/{name=projects/*/locations/*/restorePlans/*}ÚAnameû +UpdateRestorePlan3.google.cloud.gkebackup.v1.UpdateRestorePlanRequest.google.longrunning.Operation"‘‚Óä“M2=/v1/{restore_plan.name=projects/*/locations/*/restorePlans/*}: restore_planÚArestore_plan,update_maskÊA + RestorePlanOperationMetadataÕ +DeleteRestorePlan3.google.cloud.gkebackup.v1.DeleteRestorePlanRequest.google.longrunning.Operation"l‚Óä“2*0/v1/{name=projects/*/locations/*/restorePlans/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadataé + CreateRestore/.google.cloud.gkebackup.v1.CreateRestoreRequest.google.longrunning.Operation"‡‚Óä“F";/v1/{parent=projects/*/locations/*/restorePlans/*}/restores:restoreÚAparent,restore,restore_idÊA +RestoreOperationMetadata½ + ListRestores..google.cloud.gkebackup.v1.ListRestoresRequest/.google.cloud.gkebackup.v1.ListRestoresResponse"L‚Óä“=;/v1/{parent=projects/*/locations/*/restorePlans/*}/restoresÚAparentª + +GetRestore,.google.cloud.gkebackup.v1.GetRestoreRequest".google.cloud.gkebackup.v1.Restore"J‚Óä“=;/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}ÚAnameë + UpdateRestore/.google.cloud.gkebackup.v1.UpdateRestoreRequest.google.longrunning.Operation"‰‚Óä“N2C/v1/{restore.name=projects/*/locations/*/restorePlans/*/restores/*}:restoreÚArestore,update_maskÊA +RestoreOperationMetadataØ + DeleteRestore/.google.cloud.gkebackup.v1.DeleteRestoreRequest.google.longrunning.Operation"w‚Óä“=*;/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}ÚAnameÊA* +google.protobuf.EmptyOperationMetadataà +ListVolumeRestores4.google.cloud.gkebackup.v1.ListVolumeRestoresRequest5.google.cloud.gkebackup.v1.ListVolumeRestoresResponse"]‚Óä“NL/v1/{parent=projects/*/locations/*/restorePlans/*/restores/*}/volumeRestoresÚAparentÍ +GetVolumeRestore2.google.cloud.gkebackup.v1.GetVolumeRestoreRequest(.google.cloud.gkebackup.v1.VolumeRestore"[‚Óä“NL/v1/{name=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}ÚAnameLÊAgkebackup.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¨ +com.google.cloud.gkebackup.v1BGKEBackupProtoPZBgoogle.golang.org/genproto/googleapis/cloud/gkebackup/v1;gkebackupªGoogle.Cloud.GkeBackup.V1ÊGoogle\\Cloud\\GkeBackup\\V1êGoogle::Cloud::GkeBackup::V1êA^ + container.googleapis.com/Cluster:projects/{project}/locations/{location}/clusters/{cluster}êAx +!cloudkms.googleapis.com/CryptoKeySprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Restore.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Restore.php new file mode 100644 index 0000000000000000000000000000000000000000..4e7b68cb45e39ded178cf9af48dcbaf0ae25ac0c GIT binary patch literal 3776 zcmbVPTXWM!6vj45$Z--JadX@PBHk=KrhB58C< z3rwaD{WBe2`agK-U*MUaz)O2}SCUOG;F6cfyXSo8obOzA_wkSJt_v$-mDt471JW0F zUW&mk5nay-9K*51op3N9o@hAxu4xfZ62(eGtT#HMTB&tzpsMeLo z`^DiN+0l)?&@CRU6+Pkyjz=Vh31I8{#CLUrh}C9kiv)UK5A1(EK2BvPAuP}-y;y|~2g1X0L2cc~Qrelj# zp1lds+hbSbXc+c1gMFOgmSz;rxW9z`_* zIZYKQ<=LB9>v(>8WoLiiu_rg2FxoM(5CVPQJz1A!;=xlh;$7+Y6Ph=$6ju{sC{1_Z z%@yd~nXm|jB`zqjYL${|l@8Vl(NCP1Kq^Y6Gf6}mbtv3!UE=iP7e)b2j(z; zjs>wAhkiVPQbcT-$#Wu}!nCFD5X;ZciWy{1`n`V!1BZ4EQ%BcoYH0?YLGFi$6|MdBRIvG6{d*;|m0Ytu(q#!w$A3hf|2j}TMb z@<(Ficg#Yc#9|90u@$&HLL2DVT(QvkkAw~!E5w#PYA`nv!eYjOKFlxT5-;Y$1IUh3 znT5*3^Q+PGFy>fu9X#eZUkmF$eZFovnzYSQRY9c4N|WITE;b$SEoy-cH`ZBb zB#3R%xwEjoF|n6Mg(CqrH zPZ&?a^AY7aTuM-M*F|P|@v&K&UB5R8PM;wnSQi98-0=f52x$dtUT6^?XDS_v4?lqv zMI04Zdkmt52n88ttDY0O&rQ28TxK(ym)4N3M$LW+<}nL=eGdhB(-$20>PP{7L~j!= zCgC$Qjq3V{Nqt_Q*yqH*!apg<9gRR(g2h1h@G3W+DQaU@sDlt~joVLuseR!p@-@c)@*Fn%D)_$tt)Un-XGW5Xf?L9l2U%&ZQ{sfLfy8iMIz6X zdSz49#)W7Qg?b~F7&DA>yHU?&mj6t_)gxIyGB&<}`{m7UyQ8+K&y8-YtZL;(eFNR@ zoa}ubE>gGDpKEP8E%D*YSL;aP7-vYu5798rczcbBR^u2 zwi=bA#}k@jhm5KrEiv2Z!bQl@gGg)ClPGfO(hA&22Ez%nkqxWTTjUBa38zinternalAddGeneratedFile( + ' +ý +,google/cloud/gkebackup/v1/restore_plan.protogoogle.cloud.gkebackup.v1google/api/resource.proto\'google/cloud/gkebackup/v1/restore.protogoogle/protobuf/timestamp.proto"ó + RestorePlan +name ( BàA +uid ( BàA4 + create_time ( 2.google.protobuf.TimestampBàA4 + update_time ( 2.google.protobuf.TimestampBàA + description ( C + backup_plan ( B.àAàAúA% +#gkebackup.googleapis.com/BackupPlan< +cluster ( B+àAàAúA" + container.googleapis.com/ClusterE +restore_config ( 2(.google.cloud.gkebackup.v1.RestoreConfigBàAB +labels ( 22.google.cloud.gkebackup.v1.RestorePlan.LabelsEntry +etag + ( BàA- + LabelsEntry +key (  +value ( :8:nêAk +$gkebackup.googleapis.com/RestorePlanCprojects/{project}/locations/{location}/restorePlans/{restore_plan}BÎ +com.google.cloud.gkebackup.v1BRestorePlanProtoPZBgoogle.golang.org/genproto/googleapis/cloud/gkebackup/v1;gkebackupªGoogle.Cloud.GkeBackup.V1ÊGoogle\\Cloud\\GkeBackup\\V1êGoogle::Cloud::GkeBackup::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Volume.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Volume.php new file mode 100644 index 0000000000000000000000000000000000000000..08232b698d26dfd7e7221744f2a300fa5dec6024 GIT binary patch literal 2979 zcmd6p&u`;I6vs)^cDIwZv<9@m-h4kZ@2hXZ%Mg8nYs4p! zosb^xUgPAF;4li3zzICu9rgPp!cH&@U5`XE#+4>+G)=5m>gH20je}9-5ET!CVBitO z@q$rL8C;RB?OcsQWqhcN18+1WGINQLZx2Zv+77`rqjW|RyJshMr^c*1Woq52rPiH` z!()UT&yHh!!MvbX2*WQNbv@U?abhR%x97%|>${0-d+v|0hZEely_kUM{M`P?cM>=7 zF*RuV4%t7z+$Wv87Y4BB6P(6l&@?~_I(0uGk#BpQ3W=S_4U-@;V5+JPNRlOw_Us>s zWvM&2kN0_usyY|s2~MIBnOz;@h$N%PKW1@L2a~MTxg}d#=ys|u@p>h4X^-6?Qq}3M zrcUlMZ4q&H3tP<}Pp2FVhk?KN!dXU57j%%=!|--nb`sCOc17N`UN1{?6@<8-C5EQy z8Tx4(eYTharN?}p%#JF%Kh!qa9gn zC0$I;lFI#n)hGnMgw^t5RwabEFsyLw6jzwhLAum@*5pP?bdR?9%1_bz9D9r31Jhv>Ru-#E^1EU+CsUvvj;YBUoxJt3eWhR}=a z;7Z5Tr0XPRl9H`<0?u2<`NW$PX3 z5qhsy)-6MCwd-wDZvV_oTRjZ#udqo0I75!9acB|?yx!2my zIrQn2L9S=OFP7mzl-aFHA*lQZ;v}*1O0*`57dY?&1U~eo&56PlXLvU47V-<>D;>#t zC*o-;F%Y49%-$Fw*~#udt7wCV09Pd_i~Rps1oDu}g{>yR+oHjiHXCj%mv0%H?QISF$RQa~4gu#`ebq1`-^7Y^V)3MtSx zD4c@13z_A*pwUYoqDO*0^E=}vJ9k3Ydn@RGsg~Y0n=OhMBW{XVeg?7SHxOGlum^Gw4U_@#A^IdxrkBVq)#!1Si9ePe*I3mlv$966T@ii}$QOry zrDGjYlG2)#k9MFaeZBOAo2n|aRn=@*RWA;^t1OTg&$1%rb6)Gsl!o-(aGhJqLN=2Z JZxb{@=wJNCuO$Eg literal 0 HcmV?d00001 diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup.php new file mode 100644 index 000000000000..62ff711d0ae5 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup.php @@ -0,0 +1,1170 @@ +google.cloud.gkebackup.v1.Backup + */ +class Backup extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The fully qualified name of the Backup. + * projects/*/locations/*/backupPlans/*/backups/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Server generated global unique identifier of + * [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The timestamp when this Backup 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 this Backup resource 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. This flag indicates whether this Backup resource was created manually + * by a user or via a schedule in the BackupPlan. A value of True means that + * the Backup was created manually. + * + * Generated from protobuf field bool manual = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $manual = false; + /** + * A set of custom labels supplied by user. + * + * Generated from protobuf field map labels = 6; + */ + private $labels; + /** + * Minimum age for this Backup (in days). If this field is set to a non-zero + * value, the Backup will be "locked" against deletion (either manual or + * automatic deletion) for the number of days provided (measured from the + * creation time of the Backup). MUST be an integer value between 0-90 + * (inclusive). + * Defaults to parent BackupPlan's + * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days] + * setting and may only be increased + * (either at creation time or in a subsequent update). + * + * Generated from protobuf field int32 delete_lock_days = 7; + */ + protected $delete_lock_days = 0; + /** + * Output only. The time at which an existing delete lock will expire for this backup + * (calculated from create_time + [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]). + * + * Generated from protobuf field .google.protobuf.Timestamp delete_lock_expire_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_lock_expire_time = null; + /** + * The age (in days) after which this Backup will be automatically deleted. + * Must be an integer value >= 0: + * - If 0, no automatic deletion will occur for this Backup. + * - If not 0, this must be >= [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]. + * Once a Backup is created, this value may only be increased. + * Defaults to the parent BackupPlan's + * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] value. + * + * Generated from protobuf field int32 retain_days = 9; + */ + protected $retain_days = 0; + /** + * Output only. The time at which this Backup will be automatically deleted (calculated + * from create_time + [retain_days][google.cloud.gkebackup.v1.Backup.retain_days]). + * + * Generated from protobuf field .google.protobuf.Timestamp retain_expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $retain_expire_time = null; + /** + * Output only. The customer managed encryption key that was used to encrypt the Backup's + * artifacts. Inherited from the parent BackupPlan's + * [encryption_key][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.encryption_key] value. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $encryption_key = null; + /** + * Output only. Whether or not the Backup contains volume data. Controlled by the parent + * BackupPlan's + * [include_volume_data][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_volume_data] value. + * + * Generated from protobuf field bool contains_volume_data = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $contains_volume_data = false; + /** + * Output only. Whether or not the Backup contains Kubernetes Secrets. Controlled by the + * parent BackupPlan's + * [include_secrets][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_secrets] value. + * + * Generated from protobuf field bool contains_secrets = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $contains_secrets = false; + /** + * Output only. Information about the GKE cluster from which this Backup was created. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.ClusterMetadata cluster_metadata = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cluster_metadata = null; + /** + * Output only. Current state of the Backup + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.State state = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Human-readable description of why the backup is in the current `state`. + * + * Generated from protobuf field string state_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_reason = ''; + /** + * Output only. Completion time of the Backup + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $complete_time = null; + /** + * Output only. The total number of Kubernetes resources included in the Backup. + * + * Generated from protobuf field int32 resource_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $resource_count = 0; + /** + * Output only. The total number of volume backups contained in the Backup. + * + * Generated from protobuf field int32 volume_count = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $volume_count = 0; + /** + * Output only. The total size of the Backup in bytes = config backup size + sum(volume + * backup sizes) + * + * Generated from protobuf field int64 size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_bytes = 0; + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a backup from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform backup updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetBackup`, + * and systems are expected to put that etag in the request to + * `UpdateBackup` or `DeleteBackup` to ensure that their change will be + * applied to the same version of the resource. + * + * Generated from protobuf field string etag = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + /** + * User specified descriptive string for this Backup. + * + * Generated from protobuf field string description = 25; + */ + protected $description = ''; + /** + * Output only. The total number of Kubernetes Pods contained in the Backup. + * + * Generated from protobuf field int32 pod_count = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pod_count = 0; + /** + * Output only. The size of the config backup in bytes. + * + * Generated from protobuf field int64 config_backup_size_bytes = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $config_backup_size_bytes = 0; + protected $backup_scope; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The fully qualified name of the Backup. + * projects/*/locations/*/backupPlans/*/backups/* + * @type string $uid + * Output only. Server generated global unique identifier of + * [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when this Backup resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when this Backup resource was last updated. + * @type bool $manual + * Output only. This flag indicates whether this Backup resource was created manually + * by a user or via a schedule in the BackupPlan. A value of True means that + * the Backup was created manually. + * @type array|\Google\Protobuf\Internal\MapField $labels + * A set of custom labels supplied by user. + * @type int $delete_lock_days + * Minimum age for this Backup (in days). If this field is set to a non-zero + * value, the Backup will be "locked" against deletion (either manual or + * automatic deletion) for the number of days provided (measured from the + * creation time of the Backup). MUST be an integer value between 0-90 + * (inclusive). + * Defaults to parent BackupPlan's + * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days] + * setting and may only be increased + * (either at creation time or in a subsequent update). + * @type \Google\Protobuf\Timestamp $delete_lock_expire_time + * Output only. The time at which an existing delete lock will expire for this backup + * (calculated from create_time + [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]). + * @type int $retain_days + * The age (in days) after which this Backup will be automatically deleted. + * Must be an integer value >= 0: + * - If 0, no automatic deletion will occur for this Backup. + * - If not 0, this must be >= [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]. + * Once a Backup is created, this value may only be increased. + * Defaults to the parent BackupPlan's + * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] value. + * @type \Google\Protobuf\Timestamp $retain_expire_time + * Output only. The time at which this Backup will be automatically deleted (calculated + * from create_time + [retain_days][google.cloud.gkebackup.v1.Backup.retain_days]). + * @type \Google\Cloud\GkeBackup\V1\EncryptionKey $encryption_key + * Output only. The customer managed encryption key that was used to encrypt the Backup's + * artifacts. Inherited from the parent BackupPlan's + * [encryption_key][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.encryption_key] value. + * @type bool $all_namespaces + * Output only. If True, all namespaces were included in the Backup. + * @type \Google\Cloud\GkeBackup\V1\Namespaces $selected_namespaces + * Output only. If set, the list of namespaces that were included in the Backup. + * @type \Google\Cloud\GkeBackup\V1\NamespacedNames $selected_applications + * Output only. If set, the list of ProtectedApplications whose resources were included + * in the Backup. + * @type bool $contains_volume_data + * Output only. Whether or not the Backup contains volume data. Controlled by the parent + * BackupPlan's + * [include_volume_data][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_volume_data] value. + * @type bool $contains_secrets + * Output only. Whether or not the Backup contains Kubernetes Secrets. Controlled by the + * parent BackupPlan's + * [include_secrets][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_secrets] value. + * @type \Google\Cloud\GkeBackup\V1\Backup\ClusterMetadata $cluster_metadata + * Output only. Information about the GKE cluster from which this Backup was created. + * @type int $state + * Output only. Current state of the Backup + * @type string $state_reason + * Output only. Human-readable description of why the backup is in the current `state`. + * @type \Google\Protobuf\Timestamp $complete_time + * Output only. Completion time of the Backup + * @type int $resource_count + * Output only. The total number of Kubernetes resources included in the Backup. + * @type int $volume_count + * Output only. The total number of volume backups contained in the Backup. + * @type int|string $size_bytes + * Output only. The total size of the Backup in bytes = config backup size + sum(volume + * backup sizes) + * @type string $etag + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a backup from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform backup updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetBackup`, + * and systems are expected to put that etag in the request to + * `UpdateBackup` or `DeleteBackup` to ensure that their change will be + * applied to the same version of the resource. + * @type string $description + * User specified descriptive string for this Backup. + * @type int $pod_count + * Output only. The total number of Kubernetes Pods contained in the Backup. + * @type int|string $config_backup_size_bytes + * Output only. The size of the config backup in bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The fully qualified name of the Backup. + * projects/*/locations/*/backupPlans/*/backups/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The fully qualified name of the Backup. + * projects/*/locations/*/backupPlans/*/backups/* + * + * 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. Server generated global unique identifier of + * [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server generated global unique identifier of + * [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) + * + * Generated from protobuf field string uid = 2 [(.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 timestamp when this Backup 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 this Backup 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 this Backup resource 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 this Backup resource 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. This flag indicates whether this Backup resource was created manually + * by a user or via a schedule in the BackupPlan. A value of True means that + * the Backup was created manually. + * + * Generated from protobuf field bool manual = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getManual() + { + return $this->manual; + } + + /** + * Output only. This flag indicates whether this Backup resource was created manually + * by a user or via a schedule in the BackupPlan. A value of True means that + * the Backup was created manually. + * + * Generated from protobuf field bool manual = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setManual($var) + { + GPBUtil::checkBool($var); + $this->manual = $var; + + return $this; + } + + /** + * A set of custom labels supplied by user. + * + * Generated from protobuf field map labels = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * A set of custom labels supplied by user. + * + * 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; + } + + /** + * Minimum age for this Backup (in days). If this field is set to a non-zero + * value, the Backup will be "locked" against deletion (either manual or + * automatic deletion) for the number of days provided (measured from the + * creation time of the Backup). MUST be an integer value between 0-90 + * (inclusive). + * Defaults to parent BackupPlan's + * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days] + * setting and may only be increased + * (either at creation time or in a subsequent update). + * + * Generated from protobuf field int32 delete_lock_days = 7; + * @return int + */ + public function getDeleteLockDays() + { + return $this->delete_lock_days; + } + + /** + * Minimum age for this Backup (in days). If this field is set to a non-zero + * value, the Backup will be "locked" against deletion (either manual or + * automatic deletion) for the number of days provided (measured from the + * creation time of the Backup). MUST be an integer value between 0-90 + * (inclusive). + * Defaults to parent BackupPlan's + * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days] + * setting and may only be increased + * (either at creation time or in a subsequent update). + * + * Generated from protobuf field int32 delete_lock_days = 7; + * @param int $var + * @return $this + */ + public function setDeleteLockDays($var) + { + GPBUtil::checkInt32($var); + $this->delete_lock_days = $var; + + return $this; + } + + /** + * Output only. The time at which an existing delete lock will expire for this backup + * (calculated from create_time + [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]). + * + * Generated from protobuf field .google.protobuf.Timestamp delete_lock_expire_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteLockExpireTime() + { + return $this->delete_lock_expire_time; + } + + public function hasDeleteLockExpireTime() + { + return isset($this->delete_lock_expire_time); + } + + public function clearDeleteLockExpireTime() + { + unset($this->delete_lock_expire_time); + } + + /** + * Output only. The time at which an existing delete lock will expire for this backup + * (calculated from create_time + [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]). + * + * Generated from protobuf field .google.protobuf.Timestamp delete_lock_expire_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteLockExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_lock_expire_time = $var; + + return $this; + } + + /** + * The age (in days) after which this Backup will be automatically deleted. + * Must be an integer value >= 0: + * - If 0, no automatic deletion will occur for this Backup. + * - If not 0, this must be >= [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]. + * Once a Backup is created, this value may only be increased. + * Defaults to the parent BackupPlan's + * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] value. + * + * Generated from protobuf field int32 retain_days = 9; + * @return int + */ + public function getRetainDays() + { + return $this->retain_days; + } + + /** + * The age (in days) after which this Backup will be automatically deleted. + * Must be an integer value >= 0: + * - If 0, no automatic deletion will occur for this Backup. + * - If not 0, this must be >= [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]. + * Once a Backup is created, this value may only be increased. + * Defaults to the parent BackupPlan's + * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] value. + * + * Generated from protobuf field int32 retain_days = 9; + * @param int $var + * @return $this + */ + public function setRetainDays($var) + { + GPBUtil::checkInt32($var); + $this->retain_days = $var; + + return $this; + } + + /** + * Output only. The time at which this Backup will be automatically deleted (calculated + * from create_time + [retain_days][google.cloud.gkebackup.v1.Backup.retain_days]). + * + * Generated from protobuf field .google.protobuf.Timestamp retain_expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRetainExpireTime() + { + return $this->retain_expire_time; + } + + public function hasRetainExpireTime() + { + return isset($this->retain_expire_time); + } + + public function clearRetainExpireTime() + { + unset($this->retain_expire_time); + } + + /** + * Output only. The time at which this Backup will be automatically deleted (calculated + * from create_time + [retain_days][google.cloud.gkebackup.v1.Backup.retain_days]). + * + * Generated from protobuf field .google.protobuf.Timestamp retain_expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRetainExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->retain_expire_time = $var; + + return $this; + } + + /** + * Output only. The customer managed encryption key that was used to encrypt the Backup's + * artifacts. Inherited from the parent BackupPlan's + * [encryption_key][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.encryption_key] value. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeBackup\V1\EncryptionKey|null + */ + public function getEncryptionKey() + { + return $this->encryption_key; + } + + public function hasEncryptionKey() + { + return isset($this->encryption_key); + } + + public function clearEncryptionKey() + { + unset($this->encryption_key); + } + + /** + * Output only. The customer managed encryption key that was used to encrypt the Backup's + * artifacts. Inherited from the parent BackupPlan's + * [encryption_key][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.encryption_key] value. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeBackup\V1\EncryptionKey $var + * @return $this + */ + public function setEncryptionKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\EncryptionKey::class); + $this->encryption_key = $var; + + return $this; + } + + /** + * Output only. If True, all namespaces were included in the Backup. + * + * Generated from protobuf field bool all_namespaces = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getAllNamespaces() + { + return $this->readOneof(12); + } + + public function hasAllNamespaces() + { + return $this->hasOneof(12); + } + + /** + * Output only. If True, all namespaces were included in the Backup. + * + * Generated from protobuf field bool all_namespaces = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setAllNamespaces($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Output only. If set, the list of namespaces that were included in the Backup. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeBackup\V1\Namespaces|null + */ + public function getSelectedNamespaces() + { + return $this->readOneof(13); + } + + public function hasSelectedNamespaces() + { + return $this->hasOneof(13); + } + + /** + * Output only. If set, the list of namespaces that were included in the Backup. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeBackup\V1\Namespaces $var + * @return $this + */ + public function setSelectedNamespaces($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Namespaces::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Output only. If set, the list of ProtectedApplications whose resources were included + * in the Backup. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeBackup\V1\NamespacedNames|null + */ + public function getSelectedApplications() + { + return $this->readOneof(14); + } + + public function hasSelectedApplications() + { + return $this->hasOneof(14); + } + + /** + * Output only. If set, the list of ProtectedApplications whose resources were included + * in the Backup. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeBackup\V1\NamespacedNames $var + * @return $this + */ + public function setSelectedApplications($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedNames::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Output only. Whether or not the Backup contains volume data. Controlled by the parent + * BackupPlan's + * [include_volume_data][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_volume_data] value. + * + * Generated from protobuf field bool contains_volume_data = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getContainsVolumeData() + { + return $this->contains_volume_data; + } + + /** + * Output only. Whether or not the Backup contains volume data. Controlled by the parent + * BackupPlan's + * [include_volume_data][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_volume_data] value. + * + * Generated from protobuf field bool contains_volume_data = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setContainsVolumeData($var) + { + GPBUtil::checkBool($var); + $this->contains_volume_data = $var; + + return $this; + } + + /** + * Output only. Whether or not the Backup contains Kubernetes Secrets. Controlled by the + * parent BackupPlan's + * [include_secrets][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_secrets] value. + * + * Generated from protobuf field bool contains_secrets = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getContainsSecrets() + { + return $this->contains_secrets; + } + + /** + * Output only. Whether or not the Backup contains Kubernetes Secrets. Controlled by the + * parent BackupPlan's + * [include_secrets][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_secrets] value. + * + * Generated from protobuf field bool contains_secrets = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setContainsSecrets($var) + { + GPBUtil::checkBool($var); + $this->contains_secrets = $var; + + return $this; + } + + /** + * Output only. Information about the GKE cluster from which this Backup was created. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.ClusterMetadata cluster_metadata = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeBackup\V1\Backup\ClusterMetadata|null + */ + public function getClusterMetadata() + { + return $this->cluster_metadata; + } + + public function hasClusterMetadata() + { + return isset($this->cluster_metadata); + } + + public function clearClusterMetadata() + { + unset($this->cluster_metadata); + } + + /** + * Output only. Information about the GKE cluster from which this Backup was created. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.ClusterMetadata cluster_metadata = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeBackup\V1\Backup\ClusterMetadata $var + * @return $this + */ + public function setClusterMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Backup\ClusterMetadata::class); + $this->cluster_metadata = $var; + + return $this; + } + + /** + * Output only. Current state of the Backup + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.State state = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the Backup + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.State state = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\Backup\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Human-readable description of why the backup is in the current `state`. + * + * Generated from protobuf field string state_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateReason() + { + return $this->state_reason; + } + + /** + * Output only. Human-readable description of why the backup is in the current `state`. + * + * Generated from protobuf field string state_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateReason($var) + { + GPBUtil::checkString($var, True); + $this->state_reason = $var; + + return $this; + } + + /** + * Output only. Completion time of the Backup + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 20 [(.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. Completion time of the Backup + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 20 [(.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 total number of Kubernetes resources included in the Backup. + * + * Generated from protobuf field int32 resource_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getResourceCount() + { + return $this->resource_count; + } + + /** + * Output only. The total number of Kubernetes resources included in the Backup. + * + * Generated from protobuf field int32 resource_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setResourceCount($var) + { + GPBUtil::checkInt32($var); + $this->resource_count = $var; + + return $this; + } + + /** + * Output only. The total number of volume backups contained in the Backup. + * + * Generated from protobuf field int32 volume_count = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getVolumeCount() + { + return $this->volume_count; + } + + /** + * Output only. The total number of volume backups contained in the Backup. + * + * Generated from protobuf field int32 volume_count = 22 [(.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. The total size of the Backup in bytes = config backup size + sum(volume + * backup sizes) + * + * Generated from protobuf field int64 size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSizeBytes() + { + return $this->size_bytes; + } + + /** + * Output only. The total size of the Backup in bytes = config backup size + sum(volume + * backup sizes) + * + * Generated from protobuf field int64 size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->size_bytes = $var; + + return $this; + } + + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a backup from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform backup updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetBackup`, + * and systems are expected to put that etag in the request to + * `UpdateBackup` or `DeleteBackup` to ensure that their change will be + * applied to the same version of the resource. + * + * Generated from protobuf field string etag = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a backup from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform backup updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetBackup`, + * and systems are expected to put that etag in the request to + * `UpdateBackup` or `DeleteBackup` to ensure that their change will be + * applied to the same version of the resource. + * + * Generated from protobuf field string etag = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * User specified descriptive string for this Backup. + * + * Generated from protobuf field string description = 25; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User specified descriptive string for this Backup. + * + * Generated from protobuf field string description = 25; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The total number of Kubernetes Pods contained in the Backup. + * + * Generated from protobuf field int32 pod_count = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPodCount() + { + return $this->pod_count; + } + + /** + * Output only. The total number of Kubernetes Pods contained in the Backup. + * + * Generated from protobuf field int32 pod_count = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPodCount($var) + { + GPBUtil::checkInt32($var); + $this->pod_count = $var; + + return $this; + } + + /** + * Output only. The size of the config backup in bytes. + * + * Generated from protobuf field int64 config_backup_size_bytes = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getConfigBackupSizeBytes() + { + return $this->config_backup_size_bytes; + } + + /** + * Output only. The size of the config backup in bytes. + * + * Generated from protobuf field int64 config_backup_size_bytes = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setConfigBackupSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->config_backup_size_bytes = $var; + + return $this; + } + + /** + * @return string + */ + public function getBackupScope() + { + return $this->whichOneof("backup_scope"); + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/ClusterMetadata.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/ClusterMetadata.php new file mode 100644 index 000000000000..7f7fbdbae16b --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/ClusterMetadata.php @@ -0,0 +1,233 @@ +google.cloud.gkebackup.v1.Backup.ClusterMetadata + */ +class ClusterMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The source cluster from which this Backup was created. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * This is inherited from the parent BackupPlan's + * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. + * + * Generated from protobuf field string cluster = 1; + */ + protected $cluster = ''; + /** + * The Kubernetes server version of the source cluster. + * + * Generated from protobuf field string k8s_version = 2; + */ + protected $k8s_version = ''; + /** + * A list of the Backup for GKE CRD versions found in the cluster. + * + * Generated from protobuf field map backup_crd_versions = 3; + */ + private $backup_crd_versions; + protected $platform_version; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster + * The source cluster from which this Backup was created. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * This is inherited from the parent BackupPlan's + * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. + * @type string $k8s_version + * The Kubernetes server version of the source cluster. + * @type array|\Google\Protobuf\Internal\MapField $backup_crd_versions + * A list of the Backup for GKE CRD versions found in the cluster. + * @type string $gke_version + * GKE version + * @type string $anthos_version + * Anthos version + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * The source cluster from which this Backup was created. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * This is inherited from the parent BackupPlan's + * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. + * + * Generated from protobuf field string cluster = 1; + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * The source cluster from which this Backup was created. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * This is inherited from the parent BackupPlan's + * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. + * + * 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; + } + + /** + * The Kubernetes server version of the source cluster. + * + * Generated from protobuf field string k8s_version = 2; + * @return string + */ + public function getK8SVersion() + { + return $this->k8s_version; + } + + /** + * The Kubernetes server version of the source cluster. + * + * Generated from protobuf field string k8s_version = 2; + * @param string $var + * @return $this + */ + public function setK8SVersion($var) + { + GPBUtil::checkString($var, True); + $this->k8s_version = $var; + + return $this; + } + + /** + * A list of the Backup for GKE CRD versions found in the cluster. + * + * Generated from protobuf field map backup_crd_versions = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getBackupCrdVersions() + { + return $this->backup_crd_versions; + } + + /** + * A list of the Backup for GKE CRD versions found in the cluster. + * + * Generated from protobuf field map backup_crd_versions = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setBackupCrdVersions($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->backup_crd_versions = $arr; + + return $this; + } + + /** + * GKE version + * + * Generated from protobuf field string gke_version = 4; + * @return string + */ + public function getGkeVersion() + { + return $this->readOneof(4); + } + + public function hasGkeVersion() + { + return $this->hasOneof(4); + } + + /** + * GKE version + * + * Generated from protobuf field string gke_version = 4; + * @param string $var + * @return $this + */ + public function setGkeVersion($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Anthos version + * + * Generated from protobuf field string anthos_version = 5; + * @return string + */ + public function getAnthosVersion() + { + return $this->readOneof(5); + } + + public function hasAnthosVersion() + { + return $this->hasOneof(5); + } + + /** + * Anthos version + * + * Generated from protobuf field string anthos_version = 5; + * @param string $var + * @return $this + */ + public function setAnthosVersion($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getPlatformVersion() + { + return $this->whichOneof("platform_version"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ClusterMetadata::class, \Google\Cloud\GkeBackup\V1\Backup_ClusterMetadata::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/State.php new file mode 100644 index 000000000000..d3f3a57ba825 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/State.php @@ -0,0 +1,88 @@ +google.cloud.gkebackup.v1.Backup.State + */ +class State +{ + /** + * The Backup resource is in the process of being created. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The Backup resource has been created and the associated BackupJob + * Kubernetes resource has been injected into the source cluster. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The gkebackup agent in the cluster has begun executing the backup + * operation. + * + * Generated from protobuf enum IN_PROGRESS = 2; + */ + const IN_PROGRESS = 2; + /** + * The backup operation has completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * The backup operation has failed. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * This Backup resource (and its associated artifacts) is in the process + * of being deleted. + * + * Generated from protobuf enum DELETING = 5; + */ + const DELETING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::IN_PROGRESS => 'IN_PROGRESS', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + 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\GkeBackup\V1\Backup_State::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupForGKEGrpcClient.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupForGKEGrpcClient.php new file mode 100644 index 000000000000..3e4636e07576 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupForGKEGrpcClient.php @@ -0,0 +1,396 @@ +_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/CreateBackupPlan', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists BackupPlans in a given location. + * @param \Google\Cloud\GkeBackup\V1\ListBackupPlansRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListBackupPlans(\Google\Cloud\GkeBackup\V1\ListBackupPlansRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/ListBackupPlans', + $argument, + ['\Google\Cloud\GkeBackup\V1\ListBackupPlansResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieve the details of a single BackupPlan. + * @param \Google\Cloud\GkeBackup\V1\GetBackupPlanRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetBackupPlan(\Google\Cloud\GkeBackup\V1\GetBackupPlanRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/GetBackupPlan', + $argument, + ['\Google\Cloud\GkeBackup\V1\BackupPlan', 'decode'], + $metadata, $options); + } + + /** + * Update a BackupPlan. + * @param \Google\Cloud\GkeBackup\V1\UpdateBackupPlanRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateBackupPlan(\Google\Cloud\GkeBackup\V1\UpdateBackupPlanRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/UpdateBackupPlan', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes an existing BackupPlan. + * @param \Google\Cloud\GkeBackup\V1\DeleteBackupPlanRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteBackupPlan(\Google\Cloud\GkeBackup\V1\DeleteBackupPlanRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/DeleteBackupPlan', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Creates a Backup for the given BackupPlan. + * @param \Google\Cloud\GkeBackup\V1\CreateBackupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateBackup(\Google\Cloud\GkeBackup\V1\CreateBackupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/CreateBackup', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists the Backups for a given BackupPlan. + * @param \Google\Cloud\GkeBackup\V1\ListBackupsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListBackups(\Google\Cloud\GkeBackup\V1\ListBackupsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/ListBackups', + $argument, + ['\Google\Cloud\GkeBackup\V1\ListBackupsResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieve the details of a single Backup. + * @param \Google\Cloud\GkeBackup\V1\GetBackupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetBackup(\Google\Cloud\GkeBackup\V1\GetBackupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/GetBackup', + $argument, + ['\Google\Cloud\GkeBackup\V1\Backup', 'decode'], + $metadata, $options); + } + + /** + * Update a Backup. + * @param \Google\Cloud\GkeBackup\V1\UpdateBackupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateBackup(\Google\Cloud\GkeBackup\V1\UpdateBackupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/UpdateBackup', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes an existing Backup. + * @param \Google\Cloud\GkeBackup\V1\DeleteBackupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteBackup(\Google\Cloud\GkeBackup\V1\DeleteBackupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/DeleteBackup', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists the VolumeBackups for a given Backup. + * @param \Google\Cloud\GkeBackup\V1\ListVolumeBackupsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListVolumeBackups(\Google\Cloud\GkeBackup\V1\ListVolumeBackupsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/ListVolumeBackups', + $argument, + ['\Google\Cloud\GkeBackup\V1\ListVolumeBackupsResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieve the details of a single VolumeBackup. + * @param \Google\Cloud\GkeBackup\V1\GetVolumeBackupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetVolumeBackup(\Google\Cloud\GkeBackup\V1\GetVolumeBackupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/GetVolumeBackup', + $argument, + ['\Google\Cloud\GkeBackup\V1\VolumeBackup', 'decode'], + $metadata, $options); + } + + /** + * Creates a new RestorePlan in a given location. + * @param \Google\Cloud\GkeBackup\V1\CreateRestorePlanRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateRestorePlan(\Google\Cloud\GkeBackup\V1\CreateRestorePlanRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/CreateRestorePlan', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists RestorePlans in a given location. + * @param \Google\Cloud\GkeBackup\V1\ListRestorePlansRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListRestorePlans(\Google\Cloud\GkeBackup\V1\ListRestorePlansRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/ListRestorePlans', + $argument, + ['\Google\Cloud\GkeBackup\V1\ListRestorePlansResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieve the details of a single RestorePlan. + * @param \Google\Cloud\GkeBackup\V1\GetRestorePlanRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetRestorePlan(\Google\Cloud\GkeBackup\V1\GetRestorePlanRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/GetRestorePlan', + $argument, + ['\Google\Cloud\GkeBackup\V1\RestorePlan', 'decode'], + $metadata, $options); + } + + /** + * Update a RestorePlan. + * @param \Google\Cloud\GkeBackup\V1\UpdateRestorePlanRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateRestorePlan(\Google\Cloud\GkeBackup\V1\UpdateRestorePlanRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/UpdateRestorePlan', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes an existing RestorePlan. + * @param \Google\Cloud\GkeBackup\V1\DeleteRestorePlanRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteRestorePlan(\Google\Cloud\GkeBackup\V1\DeleteRestorePlanRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/DeleteRestorePlan', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Creates a new Restore for the given RestorePlan. + * @param \Google\Cloud\GkeBackup\V1\CreateRestoreRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateRestore(\Google\Cloud\GkeBackup\V1\CreateRestoreRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/CreateRestore', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists the Restores for a given RestorePlan. + * @param \Google\Cloud\GkeBackup\V1\ListRestoresRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListRestores(\Google\Cloud\GkeBackup\V1\ListRestoresRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/ListRestores', + $argument, + ['\Google\Cloud\GkeBackup\V1\ListRestoresResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves the details of a single Restore. + * @param \Google\Cloud\GkeBackup\V1\GetRestoreRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetRestore(\Google\Cloud\GkeBackup\V1\GetRestoreRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/GetRestore', + $argument, + ['\Google\Cloud\GkeBackup\V1\Restore', 'decode'], + $metadata, $options); + } + + /** + * Update a Restore. + * @param \Google\Cloud\GkeBackup\V1\UpdateRestoreRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateRestore(\Google\Cloud\GkeBackup\V1\UpdateRestoreRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/UpdateRestore', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes an existing Restore. + * @param \Google\Cloud\GkeBackup\V1\DeleteRestoreRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteRestore(\Google\Cloud\GkeBackup\V1\DeleteRestoreRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/DeleteRestore', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Lists the VolumeRestores for a given Restore. + * @param \Google\Cloud\GkeBackup\V1\ListVolumeRestoresRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListVolumeRestores(\Google\Cloud\GkeBackup\V1\ListVolumeRestoresRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/ListVolumeRestores', + $argument, + ['\Google\Cloud\GkeBackup\V1\ListVolumeRestoresResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieve the details of a single VolumeRestore. + * @param \Google\Cloud\GkeBackup\V1\GetVolumeRestoreRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetVolumeRestore(\Google\Cloud\GkeBackup\V1\GetVolumeRestoreRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/GetVolumeRestore', + $argument, + ['\Google\Cloud\GkeBackup\V1\VolumeRestore', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan.php new file mode 100644 index 000000000000..cc832b5239e8 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan.php @@ -0,0 +1,605 @@ +google.cloud.gkebackup.v1.BackupPlan + */ +class BackupPlan extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The full name of the BackupPlan resource. + * Format: projects/*/locations/*/backupPlans/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The timestamp when this BackupPlan 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 this BackupPlan resource was last + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User specified descriptive string for this BackupPlan. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Required. Immutable. The source cluster from which Backups will be created via + * this BackupPlan. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * + * Generated from protobuf field string cluster = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $cluster = ''; + /** + * RetentionPolicy governs lifecycle of Backups created under this plan. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy retention_policy = 7; + */ + protected $retention_policy = null; + /** + * A set of custom labels supplied by user. + * + * Generated from protobuf field map labels = 8; + */ + private $labels; + /** + * Defines a schedule for automatic Backup creation via this BackupPlan. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.Schedule backup_schedule = 9; + */ + protected $backup_schedule = null; + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a backup plan from overwriting each other. + * It is strongly suggested that systems make use of the 'etag' in the + * read-modify-write cycle to perform BackupPlan updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetBackupPlan`, + * and systems are expected to put that etag in the request to + * `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change + * will be applied to the same version of the resource. + * + * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + /** + * This flag indicates whether this BackupPlan has been deactivated. + * Setting this field to True locks the BackupPlan such that no further + * updates will be allowed (except deletes), including the deactivated field + * itself. It also prevents any new Backups from being created via this + * BackupPlan (including scheduled Backups). + * Default: False + * + * Generated from protobuf field bool deactivated = 11; + */ + protected $deactivated = false; + /** + * Defines the configuration of Backups created via this BackupPlan. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.BackupConfig backup_config = 12; + */ + protected $backup_config = null; + /** + * Output only. The number of Kubernetes Pods backed up in the + * last successful Backup created via this BackupPlan. + * + * Generated from protobuf field int32 protected_pod_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $protected_pod_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The full name of the BackupPlan resource. + * Format: projects/*/locations/*/backupPlans/* + * @type string $uid + * Output only. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when this BackupPlan resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when this BackupPlan resource was last + * updated. + * @type string $description + * User specified descriptive string for this BackupPlan. + * @type string $cluster + * Required. Immutable. The source cluster from which Backups will be created via + * this BackupPlan. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * @type \Google\Cloud\GkeBackup\V1\BackupPlan\RetentionPolicy $retention_policy + * RetentionPolicy governs lifecycle of Backups created under this plan. + * @type array|\Google\Protobuf\Internal\MapField $labels + * A set of custom labels supplied by user. + * @type \Google\Cloud\GkeBackup\V1\BackupPlan\Schedule $backup_schedule + * Defines a schedule for automatic Backup creation via this BackupPlan. + * @type string $etag + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a backup plan from overwriting each other. + * It is strongly suggested that systems make use of the 'etag' in the + * read-modify-write cycle to perform BackupPlan updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetBackupPlan`, + * and systems are expected to put that etag in the request to + * `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change + * will be applied to the same version of the resource. + * @type bool $deactivated + * This flag indicates whether this BackupPlan has been deactivated. + * Setting this field to True locks the BackupPlan such that no further + * updates will be allowed (except deletes), including the deactivated field + * itself. It also prevents any new Backups from being created via this + * BackupPlan (including scheduled Backups). + * Default: False + * @type \Google\Cloud\GkeBackup\V1\BackupPlan\BackupConfig $backup_config + * Defines the configuration of Backups created via this BackupPlan. + * @type int $protected_pod_count + * Output only. The number of Kubernetes Pods backed up in the + * last successful Backup created via this BackupPlan. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The full name of the BackupPlan resource. + * Format: projects/*/locations/*/backupPlans/* + * + * 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 BackupPlan resource. + * Format: projects/*/locations/*/backupPlans/* + * + * 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. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * + * Generated from protobuf field string uid = 2 [(.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 timestamp when this BackupPlan 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 this BackupPlan 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 this BackupPlan resource 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 this BackupPlan resource 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; + } + + /** + * User specified descriptive string for this BackupPlan. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User specified descriptive string for this BackupPlan. + * + * 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. Immutable. The source cluster from which Backups will be created via + * this BackupPlan. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * + * Generated from protobuf field string cluster = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * Required. Immutable. The source cluster from which Backups will be created via + * this BackupPlan. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * + * Generated from protobuf field string cluster = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkString($var, True); + $this->cluster = $var; + + return $this; + } + + /** + * RetentionPolicy governs lifecycle of Backups created under this plan. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy retention_policy = 7; + * @return \Google\Cloud\GkeBackup\V1\BackupPlan\RetentionPolicy|null + */ + public function getRetentionPolicy() + { + return $this->retention_policy; + } + + public function hasRetentionPolicy() + { + return isset($this->retention_policy); + } + + public function clearRetentionPolicy() + { + unset($this->retention_policy); + } + + /** + * RetentionPolicy governs lifecycle of Backups created under this plan. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy retention_policy = 7; + * @param \Google\Cloud\GkeBackup\V1\BackupPlan\RetentionPolicy $var + * @return $this + */ + public function setRetentionPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\BackupPlan\RetentionPolicy::class); + $this->retention_policy = $var; + + return $this; + } + + /** + * A set of custom labels supplied by user. + * + * Generated from protobuf field map labels = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * A set of custom labels supplied by user. + * + * 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; + } + + /** + * Defines a schedule for automatic Backup creation via this BackupPlan. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.Schedule backup_schedule = 9; + * @return \Google\Cloud\GkeBackup\V1\BackupPlan\Schedule|null + */ + public function getBackupSchedule() + { + return $this->backup_schedule; + } + + public function hasBackupSchedule() + { + return isset($this->backup_schedule); + } + + public function clearBackupSchedule() + { + unset($this->backup_schedule); + } + + /** + * Defines a schedule for automatic Backup creation via this BackupPlan. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.Schedule backup_schedule = 9; + * @param \Google\Cloud\GkeBackup\V1\BackupPlan\Schedule $var + * @return $this + */ + public function setBackupSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\BackupPlan\Schedule::class); + $this->backup_schedule = $var; + + return $this; + } + + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a backup plan from overwriting each other. + * It is strongly suggested that systems make use of the 'etag' in the + * read-modify-write cycle to perform BackupPlan updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetBackupPlan`, + * and systems are expected to put that etag in the request to + * `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change + * will be applied to the same version of the resource. + * + * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a backup plan from overwriting each other. + * It is strongly suggested that systems make use of the 'etag' in the + * read-modify-write cycle to perform BackupPlan updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetBackupPlan`, + * and systems are expected to put that etag in the request to + * `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change + * will be applied to the same version of the resource. + * + * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * This flag indicates whether this BackupPlan has been deactivated. + * Setting this field to True locks the BackupPlan such that no further + * updates will be allowed (except deletes), including the deactivated field + * itself. It also prevents any new Backups from being created via this + * BackupPlan (including scheduled Backups). + * Default: False + * + * Generated from protobuf field bool deactivated = 11; + * @return bool + */ + public function getDeactivated() + { + return $this->deactivated; + } + + /** + * This flag indicates whether this BackupPlan has been deactivated. + * Setting this field to True locks the BackupPlan such that no further + * updates will be allowed (except deletes), including the deactivated field + * itself. It also prevents any new Backups from being created via this + * BackupPlan (including scheduled Backups). + * Default: False + * + * Generated from protobuf field bool deactivated = 11; + * @param bool $var + * @return $this + */ + public function setDeactivated($var) + { + GPBUtil::checkBool($var); + $this->deactivated = $var; + + return $this; + } + + /** + * Defines the configuration of Backups created via this BackupPlan. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.BackupConfig backup_config = 12; + * @return \Google\Cloud\GkeBackup\V1\BackupPlan\BackupConfig|null + */ + public function getBackupConfig() + { + return $this->backup_config; + } + + public function hasBackupConfig() + { + return isset($this->backup_config); + } + + public function clearBackupConfig() + { + unset($this->backup_config); + } + + /** + * Defines the configuration of Backups created via this BackupPlan. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.BackupConfig backup_config = 12; + * @param \Google\Cloud\GkeBackup\V1\BackupPlan\BackupConfig $var + * @return $this + */ + public function setBackupConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\BackupPlan\BackupConfig::class); + $this->backup_config = $var; + + return $this; + } + + /** + * Output only. The number of Kubernetes Pods backed up in the + * last successful Backup created via this BackupPlan. + * + * Generated from protobuf field int32 protected_pod_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getProtectedPodCount() + { + return $this->protected_pod_count; + } + + /** + * Output only. The number of Kubernetes Pods backed up in the + * last successful Backup created via this BackupPlan. + * + * Generated from protobuf field int32 protected_pod_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setProtectedPodCount($var) + { + GPBUtil::checkInt32($var); + $this->protected_pod_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/BackupConfig.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/BackupConfig.php new file mode 100644 index 000000000000..23ab8ab2ec06 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/BackupConfig.php @@ -0,0 +1,288 @@ +google.cloud.gkebackup.v1.BackupPlan.BackupConfig + */ +class BackupConfig extends \Google\Protobuf\Internal\Message +{ + /** + * This flag specifies whether volume data should be backed up when + * PVCs are included in the scope of a Backup. + * Default: False + * + * Generated from protobuf field bool include_volume_data = 4; + */ + protected $include_volume_data = false; + /** + * This flag specifies whether Kubernetes Secret resources should be + * included when they fall into the scope of Backups. + * Default: False + * + * Generated from protobuf field bool include_secrets = 5; + */ + protected $include_secrets = false; + /** + * This defines a customer managed encryption key that will be used to + * encrypt the "config" portion (the Kubernetes resources) of Backups + * created via this plan. + * Default (empty): Config backup artifacts will not be encrypted. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6; + */ + protected $encryption_key = null; + protected $backup_scope; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $all_namespaces + * If True, include all namespaced resources + * @type \Google\Cloud\GkeBackup\V1\Namespaces $selected_namespaces + * If set, include just the resources in the listed namespaces. + * @type \Google\Cloud\GkeBackup\V1\NamespacedNames $selected_applications + * If set, include just the resources referenced by the listed + * ProtectedApplications. + * @type bool $include_volume_data + * This flag specifies whether volume data should be backed up when + * PVCs are included in the scope of a Backup. + * Default: False + * @type bool $include_secrets + * This flag specifies whether Kubernetes Secret resources should be + * included when they fall into the scope of Backups. + * Default: False + * @type \Google\Cloud\GkeBackup\V1\EncryptionKey $encryption_key + * This defines a customer managed encryption key that will be used to + * encrypt the "config" portion (the Kubernetes resources) of Backups + * created via this plan. + * Default (empty): Config backup artifacts will not be encrypted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); + parent::__construct($data); + } + + /** + * If True, include all namespaced resources + * + * Generated from protobuf field bool all_namespaces = 1; + * @return bool + */ + public function getAllNamespaces() + { + return $this->readOneof(1); + } + + public function hasAllNamespaces() + { + return $this->hasOneof(1); + } + + /** + * If True, include all namespaced resources + * + * Generated from protobuf field bool all_namespaces = 1; + * @param bool $var + * @return $this + */ + public function setAllNamespaces($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * If set, include just the resources in the listed namespaces. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 2; + * @return \Google\Cloud\GkeBackup\V1\Namespaces|null + */ + public function getSelectedNamespaces() + { + return $this->readOneof(2); + } + + public function hasSelectedNamespaces() + { + return $this->hasOneof(2); + } + + /** + * If set, include just the resources in the listed namespaces. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 2; + * @param \Google\Cloud\GkeBackup\V1\Namespaces $var + * @return $this + */ + public function setSelectedNamespaces($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Namespaces::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * If set, include just the resources referenced by the listed + * ProtectedApplications. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 3; + * @return \Google\Cloud\GkeBackup\V1\NamespacedNames|null + */ + public function getSelectedApplications() + { + return $this->readOneof(3); + } + + public function hasSelectedApplications() + { + return $this->hasOneof(3); + } + + /** + * If set, include just the resources referenced by the listed + * ProtectedApplications. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 3; + * @param \Google\Cloud\GkeBackup\V1\NamespacedNames $var + * @return $this + */ + public function setSelectedApplications($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedNames::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * This flag specifies whether volume data should be backed up when + * PVCs are included in the scope of a Backup. + * Default: False + * + * Generated from protobuf field bool include_volume_data = 4; + * @return bool + */ + public function getIncludeVolumeData() + { + return $this->include_volume_data; + } + + /** + * This flag specifies whether volume data should be backed up when + * PVCs are included in the scope of a Backup. + * Default: False + * + * Generated from protobuf field bool include_volume_data = 4; + * @param bool $var + * @return $this + */ + public function setIncludeVolumeData($var) + { + GPBUtil::checkBool($var); + $this->include_volume_data = $var; + + return $this; + } + + /** + * This flag specifies whether Kubernetes Secret resources should be + * included when they fall into the scope of Backups. + * Default: False + * + * Generated from protobuf field bool include_secrets = 5; + * @return bool + */ + public function getIncludeSecrets() + { + return $this->include_secrets; + } + + /** + * This flag specifies whether Kubernetes Secret resources should be + * included when they fall into the scope of Backups. + * Default: False + * + * Generated from protobuf field bool include_secrets = 5; + * @param bool $var + * @return $this + */ + public function setIncludeSecrets($var) + { + GPBUtil::checkBool($var); + $this->include_secrets = $var; + + return $this; + } + + /** + * This defines a customer managed encryption key that will be used to + * encrypt the "config" portion (the Kubernetes resources) of Backups + * created via this plan. + * Default (empty): Config backup artifacts will not be encrypted. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6; + * @return \Google\Cloud\GkeBackup\V1\EncryptionKey|null + */ + public function getEncryptionKey() + { + return $this->encryption_key; + } + + public function hasEncryptionKey() + { + return isset($this->encryption_key); + } + + public function clearEncryptionKey() + { + unset($this->encryption_key); + } + + /** + * This defines a customer managed encryption key that will be used to + * encrypt the "config" portion (the Kubernetes resources) of Backups + * created via this plan. + * Default (empty): Config backup artifacts will not be encrypted. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6; + * @param \Google\Cloud\GkeBackup\V1\EncryptionKey $var + * @return $this + */ + public function setEncryptionKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\EncryptionKey::class); + $this->encryption_key = $var; + + return $this; + } + + /** + * @return string + */ + public function getBackupScope() + { + return $this->whichOneof("backup_scope"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BackupConfig::class, \Google\Cloud\GkeBackup\V1\BackupPlan_BackupConfig::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/RetentionPolicy.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/RetentionPolicy.php new file mode 100644 index 000000000000..c675595bb3a9 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/RetentionPolicy.php @@ -0,0 +1,222 @@ +google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy + */ +class RetentionPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Minimum age for Backups created via this BackupPlan (in days). + * This field MUST be an integer value between 0-90 (inclusive). + * A Backup created under this BackupPlan will NOT be deletable until it + * reaches Backup's (create_time + backup_delete_lock_days). + * Updating this field of a BackupPlan does NOT affect existing Backups + * under it. Backups created AFTER a successful update will inherit + * the new value. + * Default: 0 (no delete blocking) + * + * Generated from protobuf field int32 backup_delete_lock_days = 1; + */ + protected $backup_delete_lock_days = 0; + /** + * The default maximum age of a Backup created via this BackupPlan. + * This field MUST be an integer value >= 0. + * If specified, a Backup created under this BackupPlan will be + * automatically deleted after its age reaches (create_time + + * backup_retain_days). + * If not specified, Backups created under this BackupPlan will NOT be + * subject to automatic deletion. + * Updating this field does NOT affect existing Backups under it. Backups + * created AFTER a successful update will automatically pick up the new + * value. + * NOTE: backup_retain_days must be >= [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. + * Default: 0 (no automatic deletion) + * + * Generated from protobuf field int32 backup_retain_days = 2; + */ + protected $backup_retain_days = 0; + /** + * This flag denotes whether the retention policy of this BackupPlan is + * locked. If set to True, no further update is allowed on this policy, + * including the `locked` field itself. + * Default: False + * + * Generated from protobuf field bool locked = 3; + */ + protected $locked = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $backup_delete_lock_days + * Minimum age for Backups created via this BackupPlan (in days). + * This field MUST be an integer value between 0-90 (inclusive). + * A Backup created under this BackupPlan will NOT be deletable until it + * reaches Backup's (create_time + backup_delete_lock_days). + * Updating this field of a BackupPlan does NOT affect existing Backups + * under it. Backups created AFTER a successful update will inherit + * the new value. + * Default: 0 (no delete blocking) + * @type int $backup_retain_days + * The default maximum age of a Backup created via this BackupPlan. + * This field MUST be an integer value >= 0. + * If specified, a Backup created under this BackupPlan will be + * automatically deleted after its age reaches (create_time + + * backup_retain_days). + * If not specified, Backups created under this BackupPlan will NOT be + * subject to automatic deletion. + * Updating this field does NOT affect existing Backups under it. Backups + * created AFTER a successful update will automatically pick up the new + * value. + * NOTE: backup_retain_days must be >= [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. + * Default: 0 (no automatic deletion) + * @type bool $locked + * This flag denotes whether the retention policy of this BackupPlan is + * locked. If set to True, no further update is allowed on this policy, + * including the `locked` field itself. + * Default: False + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); + parent::__construct($data); + } + + /** + * Minimum age for Backups created via this BackupPlan (in days). + * This field MUST be an integer value between 0-90 (inclusive). + * A Backup created under this BackupPlan will NOT be deletable until it + * reaches Backup's (create_time + backup_delete_lock_days). + * Updating this field of a BackupPlan does NOT affect existing Backups + * under it. Backups created AFTER a successful update will inherit + * the new value. + * Default: 0 (no delete blocking) + * + * Generated from protobuf field int32 backup_delete_lock_days = 1; + * @return int + */ + public function getBackupDeleteLockDays() + { + return $this->backup_delete_lock_days; + } + + /** + * Minimum age for Backups created via this BackupPlan (in days). + * This field MUST be an integer value between 0-90 (inclusive). + * A Backup created under this BackupPlan will NOT be deletable until it + * reaches Backup's (create_time + backup_delete_lock_days). + * Updating this field of a BackupPlan does NOT affect existing Backups + * under it. Backups created AFTER a successful update will inherit + * the new value. + * Default: 0 (no delete blocking) + * + * Generated from protobuf field int32 backup_delete_lock_days = 1; + * @param int $var + * @return $this + */ + public function setBackupDeleteLockDays($var) + { + GPBUtil::checkInt32($var); + $this->backup_delete_lock_days = $var; + + return $this; + } + + /** + * The default maximum age of a Backup created via this BackupPlan. + * This field MUST be an integer value >= 0. + * If specified, a Backup created under this BackupPlan will be + * automatically deleted after its age reaches (create_time + + * backup_retain_days). + * If not specified, Backups created under this BackupPlan will NOT be + * subject to automatic deletion. + * Updating this field does NOT affect existing Backups under it. Backups + * created AFTER a successful update will automatically pick up the new + * value. + * NOTE: backup_retain_days must be >= [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. + * Default: 0 (no automatic deletion) + * + * Generated from protobuf field int32 backup_retain_days = 2; + * @return int + */ + public function getBackupRetainDays() + { + return $this->backup_retain_days; + } + + /** + * The default maximum age of a Backup created via this BackupPlan. + * This field MUST be an integer value >= 0. + * If specified, a Backup created under this BackupPlan will be + * automatically deleted after its age reaches (create_time + + * backup_retain_days). + * If not specified, Backups created under this BackupPlan will NOT be + * subject to automatic deletion. + * Updating this field does NOT affect existing Backups under it. Backups + * created AFTER a successful update will automatically pick up the new + * value. + * NOTE: backup_retain_days must be >= [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. + * Default: 0 (no automatic deletion) + * + * Generated from protobuf field int32 backup_retain_days = 2; + * @param int $var + * @return $this + */ + public function setBackupRetainDays($var) + { + GPBUtil::checkInt32($var); + $this->backup_retain_days = $var; + + return $this; + } + + /** + * This flag denotes whether the retention policy of this BackupPlan is + * locked. If set to True, no further update is allowed on this policy, + * including the `locked` field itself. + * Default: False + * + * Generated from protobuf field bool locked = 3; + * @return bool + */ + public function getLocked() + { + return $this->locked; + } + + /** + * This flag denotes whether the retention policy of this BackupPlan is + * locked. If set to True, no further update is allowed on this policy, + * including the `locked` field itself. + * Default: False + * + * Generated from protobuf field bool locked = 3; + * @param bool $var + * @return $this + */ + public function setLocked($var) + { + GPBUtil::checkBool($var); + $this->locked = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RetentionPolicy::class, \Google\Cloud\GkeBackup\V1\BackupPlan_RetentionPolicy::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/Schedule.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/Schedule.php new file mode 100644 index 000000000000..94215c3b9286 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/Schedule.php @@ -0,0 +1,121 @@ +google.cloud.gkebackup.v1.BackupPlan.Schedule + */ +class Schedule extends \Google\Protobuf\Internal\Message +{ + /** + * A standard [cron](https://wikipedia.com/wiki/cron) string that defines a + * repeating schedule for creating Backups via this BackupPlan. + * Default (empty): no automatic backup creation will occur. + * + * Generated from protobuf field string cron_schedule = 1; + */ + protected $cron_schedule = ''; + /** + * This flag denotes whether automatic Backup creation is paused for this + * BackupPlan. + * Default: False + * + * Generated from protobuf field bool paused = 2; + */ + protected $paused = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cron_schedule + * A standard [cron](https://wikipedia.com/wiki/cron) string that defines a + * repeating schedule for creating Backups via this BackupPlan. + * Default (empty): no automatic backup creation will occur. + * @type bool $paused + * This flag denotes whether automatic Backup creation is paused for this + * BackupPlan. + * Default: False + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); + parent::__construct($data); + } + + /** + * A standard [cron](https://wikipedia.com/wiki/cron) string that defines a + * repeating schedule for creating Backups via this BackupPlan. + * Default (empty): no automatic backup creation will occur. + * + * Generated from protobuf field string cron_schedule = 1; + * @return string + */ + public function getCronSchedule() + { + return $this->cron_schedule; + } + + /** + * A standard [cron](https://wikipedia.com/wiki/cron) string that defines a + * repeating schedule for creating Backups via this BackupPlan. + * Default (empty): no automatic backup creation will occur. + * + * Generated from protobuf field string cron_schedule = 1; + * @param string $var + * @return $this + */ + public function setCronSchedule($var) + { + GPBUtil::checkString($var, True); + $this->cron_schedule = $var; + + return $this; + } + + /** + * This flag denotes whether automatic Backup creation is paused for this + * BackupPlan. + * Default: False + * + * Generated from protobuf field bool paused = 2; + * @return bool + */ + public function getPaused() + { + return $this->paused; + } + + /** + * This flag denotes whether automatic Backup creation is paused for this + * BackupPlan. + * Default: False + * + * Generated from protobuf field bool paused = 2; + * @param bool $var + * @return $this + */ + public function setPaused($var) + { + GPBUtil::checkBool($var); + $this->paused = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Schedule::class, \Google\Cloud\GkeBackup\V1\BackupPlan_Schedule::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan_BackupConfig.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan_BackupConfig.php new file mode 100644 index 000000000000..7daaae24bb48 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan_BackupConfig.php @@ -0,0 +1,16 @@ +google.cloud.gkebackup.v1.CreateBackupPlanRequest + */ +class CreateBackupPlanRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location within which to create the BackupPlan. + * Format: projects/*/locations/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The BackupPlan resource object to create. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_plan = null; + /** + * Required. The client-provided short name for the BackupPlan resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of BackupPlans in this location + * + * Generated from protobuf field string backup_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_plan_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location within which to create the BackupPlan. + * Format: projects/*/locations/* + * @type \Google\Cloud\GkeBackup\V1\BackupPlan $backup_plan + * Required. The BackupPlan resource object to create. + * @type string $backup_plan_id + * Required. The client-provided short name for the BackupPlan resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of BackupPlans in this location + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location within which to create the BackupPlan. + * 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 location within which to create the BackupPlan. + * 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. The BackupPlan resource object to create. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeBackup\V1\BackupPlan|null + */ + public function getBackupPlan() + { + return $this->backup_plan; + } + + public function hasBackupPlan() + { + return isset($this->backup_plan); + } + + public function clearBackupPlan() + { + unset($this->backup_plan); + } + + /** + * Required. The BackupPlan resource object to create. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeBackup\V1\BackupPlan $var + * @return $this + */ + public function setBackupPlan($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\BackupPlan::class); + $this->backup_plan = $var; + + return $this; + } + + /** + * Required. The client-provided short name for the BackupPlan resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of BackupPlans in this location + * + * Generated from protobuf field string backup_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBackupPlanId() + { + return $this->backup_plan_id; + } + + /** + * Required. The client-provided short name for the BackupPlan resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of BackupPlans in this location + * + * Generated from protobuf field string backup_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBackupPlanId($var) + { + GPBUtil::checkString($var, True); + $this->backup_plan_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupRequest.php new file mode 100644 index 000000000000..ae48426cf6f9 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupRequest.php @@ -0,0 +1,173 @@ +google.cloud.gkebackup.v1.CreateBackupRequest + */ +class CreateBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The BackupPlan within which to create the Backup. + * Format: projects/*/locations/*/backupPlans/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The Backup resource to create. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 2; + */ + protected $backup = null; + /** + * The client-provided short name for the Backup resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of Backups in this BackupPlan + * + * Generated from protobuf field string backup_id = 3; + */ + protected $backup_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The BackupPlan within which to create the Backup. + * Format: projects/*/locations/*/backupPlans/* + * @type \Google\Cloud\GkeBackup\V1\Backup $backup + * The Backup resource to create. + * @type string $backup_id + * The client-provided short name for the Backup resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of Backups in this BackupPlan + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The BackupPlan within which to create the Backup. + * Format: projects/*/locations/*/backupPlans/* + * + * Generated 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 BackupPlan within which to create the Backup. + * Format: projects/*/locations/*/backupPlans/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 Backup resource to create. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 2; + * @return \Google\Cloud\GkeBackup\V1\Backup|null + */ + public function getBackup() + { + return $this->backup; + } + + public function hasBackup() + { + return isset($this->backup); + } + + public function clearBackup() + { + unset($this->backup); + } + + /** + * The Backup resource to create. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 2; + * @param \Google\Cloud\GkeBackup\V1\Backup $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Backup::class); + $this->backup = $var; + + return $this; + } + + /** + * The client-provided short name for the Backup resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of Backups in this BackupPlan + * + * Generated from protobuf field string backup_id = 3; + * @return string + */ + public function getBackupId() + { + return $this->backup_id; + } + + /** + * The client-provided short name for the Backup resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of Backups in this BackupPlan + * + * Generated from protobuf field string backup_id = 3; + * @param string $var + * @return $this + */ + public function setBackupId($var) + { + GPBUtil::checkString($var, True); + $this->backup_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestorePlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestorePlanRequest.php new file mode 100644 index 000000000000..84967643b4bf --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestorePlanRequest.php @@ -0,0 +1,173 @@ +google.cloud.gkebackup.v1.CreateRestorePlanRequest + */ +class CreateRestorePlanRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location within which to create the RestorePlan. + * Format: projects/*/locations/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The RestorePlan resource object to create. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $restore_plan = null; + /** + * Required. The client-provided short name for the RestorePlan resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of RestorePlans in this location + * + * Generated from protobuf field string restore_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $restore_plan_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location within which to create the RestorePlan. + * Format: projects/*/locations/* + * @type \Google\Cloud\GkeBackup\V1\RestorePlan $restore_plan + * Required. The RestorePlan resource object to create. + * @type string $restore_plan_id + * Required. The client-provided short name for the RestorePlan resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of RestorePlans in this location + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location within which to create the RestorePlan. + * 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 location within which to create the RestorePlan. + * 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. The RestorePlan resource object to create. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeBackup\V1\RestorePlan|null + */ + public function getRestorePlan() + { + return $this->restore_plan; + } + + public function hasRestorePlan() + { + return isset($this->restore_plan); + } + + public function clearRestorePlan() + { + unset($this->restore_plan); + } + + /** + * Required. The RestorePlan resource object to create. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeBackup\V1\RestorePlan $var + * @return $this + */ + public function setRestorePlan($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestorePlan::class); + $this->restore_plan = $var; + + return $this; + } + + /** + * Required. The client-provided short name for the RestorePlan resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of RestorePlans in this location + * + * Generated from protobuf field string restore_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRestorePlanId() + { + return $this->restore_plan_id; + } + + /** + * Required. The client-provided short name for the RestorePlan resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of RestorePlans in this location + * + * Generated from protobuf field string restore_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRestorePlanId($var) + { + GPBUtil::checkString($var, True); + $this->restore_plan_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestoreRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestoreRequest.php new file mode 100644 index 000000000000..c35284ac7255 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestoreRequest.php @@ -0,0 +1,173 @@ +google.cloud.gkebackup.v1.CreateRestoreRequest + */ +class CreateRestoreRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The RestorePlan within which to create the Restore. + * Format: projects/*/locations/*/restorePlans/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The restore resource to create. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $restore = null; + /** + * Required. The client-provided short name for the Restore resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of Restores in this RestorePlan. + * + * Generated from protobuf field string restore_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $restore_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The RestorePlan within which to create the Restore. + * Format: projects/*/locations/*/restorePlans/* + * @type \Google\Cloud\GkeBackup\V1\Restore $restore + * Required. The restore resource to create. + * @type string $restore_id + * Required. The client-provided short name for the Restore resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of Restores in this RestorePlan. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The RestorePlan within which to create the Restore. + * Format: projects/*/locations/*/restorePlans/* + * + * Generated 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 RestorePlan within which to create the Restore. + * Format: projects/*/locations/*/restorePlans/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 restore resource to create. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeBackup\V1\Restore|null + */ + public function getRestore() + { + return $this->restore; + } + + public function hasRestore() + { + return isset($this->restore); + } + + public function clearRestore() + { + unset($this->restore); + } + + /** + * Required. The restore resource to create. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeBackup\V1\Restore $var + * @return $this + */ + public function setRestore($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Restore::class); + $this->restore = $var; + + return $this; + } + + /** + * Required. The client-provided short name for the Restore resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of Restores in this RestorePlan. + * + * Generated from protobuf field string restore_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRestoreId() + { + return $this->restore_id; + } + + /** + * Required. The client-provided short name for the Restore resource. + * This name must: + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of Restores in this RestorePlan. + * + * Generated from protobuf field string restore_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRestoreId($var) + { + GPBUtil::checkString($var, True); + $this->restore_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupPlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupPlanRequest.php new file mode 100644 index 000000000000..357a8913886c --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupPlanRequest.php @@ -0,0 +1,113 @@ +google.cloud.gkebackup.v1.DeleteBackupPlanRequest + */ +class DeleteBackupPlanRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Fully qualified BackupPlan name. + * Format: projects/*/locations/*/backupPlans/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If provided, this value must match the current value of the + * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field or the request is + * rejected. + * + * Generated from protobuf field string etag = 2; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Fully qualified BackupPlan name. + * Format: projects/*/locations/*/backupPlans/* + * @type string $etag + * If provided, this value must match the current value of the + * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field or the request is + * rejected. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. Fully qualified BackupPlan name. + * Format: projects/*/locations/*/backupPlans/* + * + * Generated 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 BackupPlan name. + * Format: projects/*/locations/*/backupPlans/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 provided, this value must match the current value of the + * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field or the request is + * rejected. + * + * Generated from protobuf field string etag = 2; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * If provided, this value must match the current value of the + * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field or the request is + * rejected. + * + * Generated from protobuf field string etag = 2; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupRequest.php new file mode 100644 index 000000000000..8ba40c9f5493 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupRequest.php @@ -0,0 +1,155 @@ +google.cloud.gkebackup.v1.DeleteBackupRequest + */ +class DeleteBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the Backup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If provided, this value must match the current value of the + * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the request is + * rejected. + * + * Generated from protobuf field string etag = 2; + */ + protected $etag = ''; + /** + * If set to true, any VolumeBackups below this Backup will also be deleted. + * Otherwise, the request will only succeed if the Backup has no + * VolumeBackups. + * + * Generated from protobuf field bool force = 3; + */ + protected $force = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the Backup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/* + * @type string $etag + * If provided, this value must match the current value of the + * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the request is + * rejected. + * @type bool $force + * If set to true, any VolumeBackups below this Backup will also be deleted. + * Otherwise, the request will only succeed if the Backup has no + * VolumeBackups. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the Backup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/* + * + * Generated 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 Backup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 provided, this value must match the current value of the + * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the request is + * rejected. + * + * Generated from protobuf field string etag = 2; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * If provided, this value must match the current value of the + * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the request is + * rejected. + * + * Generated from protobuf field string etag = 2; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * If set to true, any VolumeBackups below this Backup will also be deleted. + * Otherwise, the request will only succeed if the Backup has no + * VolumeBackups. + * + * Generated from protobuf field bool force = 3; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * If set to true, any VolumeBackups below this Backup will also be deleted. + * Otherwise, the request will only succeed if the Backup has no + * VolumeBackups. + * + * Generated from protobuf field bool force = 3; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestorePlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestorePlanRequest.php new file mode 100644 index 000000000000..e32bdfc956b9 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestorePlanRequest.php @@ -0,0 +1,155 @@ +google.cloud.gkebackup.v1.DeleteRestorePlanRequest + */ +class DeleteRestorePlanRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Fully qualified RestorePlan name. + * Format: projects/*/locations/*/restorePlans/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If provided, this value must match the current value of the + * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] field or the request is + * rejected. + * + * Generated from protobuf field string etag = 2; + */ + protected $etag = ''; + /** + * If set to true, any Restores below this RestorePlan will also be deleted. + * Otherwise, the request will only succeed if the RestorePlan has no + * Restores. + * + * Generated from protobuf field bool force = 3; + */ + protected $force = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Fully qualified RestorePlan name. + * Format: projects/*/locations/*/restorePlans/* + * @type string $etag + * If provided, this value must match the current value of the + * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] field or the request is + * rejected. + * @type bool $force + * If set to true, any Restores below this RestorePlan will also be deleted. + * Otherwise, the request will only succeed if the RestorePlan has no + * Restores. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. Fully qualified RestorePlan name. + * Format: projects/*/locations/*/restorePlans/* + * + * Generated 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 RestorePlan name. + * Format: projects/*/locations/*/restorePlans/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 provided, this value must match the current value of the + * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] field or the request is + * rejected. + * + * Generated from protobuf field string etag = 2; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * If provided, this value must match the current value of the + * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] field or the request is + * rejected. + * + * Generated from protobuf field string etag = 2; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * If set to true, any Restores below this RestorePlan will also be deleted. + * Otherwise, the request will only succeed if the RestorePlan has no + * Restores. + * + * Generated from protobuf field bool force = 3; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * If set to true, any Restores below this RestorePlan will also be deleted. + * Otherwise, the request will only succeed if the RestorePlan has no + * Restores. + * + * Generated from protobuf field bool force = 3; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestoreRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestoreRequest.php new file mode 100644 index 000000000000..94cdd6cfc825 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestoreRequest.php @@ -0,0 +1,155 @@ +google.cloud.gkebackup.v1.DeleteRestoreRequest + */ +class DeleteRestoreRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full name of the Restore + * Format: projects/*/locations/*/restorePlans/*/restores/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If provided, this value must match the current value of the + * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or the request is + * rejected. + * + * Generated from protobuf field string etag = 2; + */ + protected $etag = ''; + /** + * If set to true, any VolumeRestores below this restore will also be deleted. + * Otherwise, the request will only succeed if the restore has no + * VolumeRestores. + * + * Generated from protobuf field bool force = 3; + */ + protected $force = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Full name of the Restore + * Format: projects/*/locations/*/restorePlans/*/restores/* + * @type string $etag + * If provided, this value must match the current value of the + * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or the request is + * rejected. + * @type bool $force + * If set to true, any VolumeRestores below this restore will also be deleted. + * Otherwise, the request will only succeed if the restore has no + * VolumeRestores. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full name of the Restore + * Format: projects/*/locations/*/restorePlans/*/restores/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Full name of the Restore + * Format: projects/*/locations/*/restorePlans/*/restores/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 provided, this value must match the current value of the + * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or the request is + * rejected. + * + * Generated from protobuf field string etag = 2; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * If provided, this value must match the current value of the + * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or the request is + * rejected. + * + * Generated from protobuf field string etag = 2; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * If set to true, any VolumeRestores below this restore will also be deleted. + * Otherwise, the request will only succeed if the restore has no + * VolumeRestores. + * + * Generated from protobuf field bool force = 3; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * If set to true, any VolumeRestores below this restore will also be deleted. + * Otherwise, the request will only succeed if the restore has no + * VolumeRestores. + * + * Generated from protobuf field bool force = 3; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/EncryptionKey.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/EncryptionKey.php new file mode 100644 index 000000000000..ffbe421a5e81 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/EncryptionKey.php @@ -0,0 +1,72 @@ +google.cloud.gkebackup.v1.EncryptionKey + */ +class EncryptionKey extends \Google\Protobuf\Internal\Message +{ + /** + * Google Cloud KMS encryption key. Format: + * projects/*/locations/*/keyRings/*/cryptoKeys/* + * + * Generated from protobuf field string gcp_kms_encryption_key = 1 [(.google.api.resource_reference) = { + */ + protected $gcp_kms_encryption_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcp_kms_encryption_key + * Google Cloud KMS encryption key. Format: + * projects/*/locations/*/keyRings/*/cryptoKeys/* + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Google Cloud KMS encryption key. Format: + * projects/*/locations/*/keyRings/*/cryptoKeys/* + * + * Generated from protobuf field string gcp_kms_encryption_key = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getGcpKmsEncryptionKey() + { + return $this->gcp_kms_encryption_key; + } + + /** + * Google Cloud KMS encryption key. Format: + * projects/*/locations/*/keyRings/*/cryptoKeys/* + * + * Generated from protobuf field string gcp_kms_encryption_key = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGcpKmsEncryptionKey($var) + { + GPBUtil::checkString($var, True); + $this->gcp_kms_encryption_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupPlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupPlanRequest.php new file mode 100644 index 000000000000..4f060fc131e1 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupPlanRequest.php @@ -0,0 +1,71 @@ +google.cloud.gkebackup.v1.GetBackupPlanRequest + */ +class GetBackupPlanRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Fully qualified BackupPlan name. + * Format: projects/*/locations/*/backupPlans/* + * + * 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. Fully qualified BackupPlan name. + * Format: projects/*/locations/*/backupPlans/* + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. Fully qualified BackupPlan name. + * Format: projects/*/locations/*/backupPlans/* + * + * Generated 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 BackupPlan name. + * Format: projects/*/locations/*/backupPlans/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupRequest.php new file mode 100644 index 000000000000..37cafe87d579 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupRequest.php @@ -0,0 +1,71 @@ +google.cloud.gkebackup.v1.GetBackupRequest + */ +class GetBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full name of the Backup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/* + * + * 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. Full name of the Backup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/* + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full name of the Backup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Full name of the Backup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestorePlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestorePlanRequest.php new file mode 100644 index 000000000000..865b2ed34426 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestorePlanRequest.php @@ -0,0 +1,71 @@ +google.cloud.gkebackup.v1.GetRestorePlanRequest + */ +class GetRestorePlanRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Fully qualified RestorePlan name. + * Format: projects/*/locations/*/restorePlans/* + * + * 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. Fully qualified RestorePlan name. + * Format: projects/*/locations/*/restorePlans/* + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. Fully qualified RestorePlan name. + * Format: projects/*/locations/*/restorePlans/* + * + * Generated 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 RestorePlan name. + * Format: projects/*/locations/*/restorePlans/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestoreRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestoreRequest.php new file mode 100644 index 000000000000..a112ffc96dbe --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestoreRequest.php @@ -0,0 +1,71 @@ +google.cloud.gkebackup.v1.GetRestoreRequest + */ +class GetRestoreRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the restore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/* + * + * 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 restore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/* + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the restore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/* + * + * Generated 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 restore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeBackupRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeBackupRequest.php new file mode 100644 index 000000000000..4ad8baf8f3b3 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeBackupRequest.php @@ -0,0 +1,71 @@ +google.cloud.gkebackup.v1.GetVolumeBackupRequest + */ +class GetVolumeBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full name of the VolumeBackup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/* + * + * 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. Full name of the VolumeBackup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/* + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full name of the VolumeBackup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Full name of the VolumeBackup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeRestoreRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeRestoreRequest.php new file mode 100644 index 000000000000..338a045e5055 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeRestoreRequest.php @@ -0,0 +1,71 @@ +google.cloud.gkebackup.v1.GetVolumeRestoreRequest + */ +class GetVolumeRestoreRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full name of the VolumeRestore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/* + * + * 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. Full name of the VolumeRestore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/* + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full name of the VolumeRestore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Full name of the VolumeRestore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansRequest.php new file mode 100644 index 000000000000..bc47dae8f53b --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansRequest.php @@ -0,0 +1,247 @@ +google.cloud.gkebackup.v1.ListBackupPlansRequest + */ +class ListBackupPlansRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location that contains the BackupPlans to list. + * Format: projects/*/locations/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.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 value of + * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Field match expression used to filter the results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Field by which to sort the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location that contains the BackupPlans to list. + * Format: projects/*/locations/* + * @type int $page_size + * The target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] + * to determine if there are more instances left to be queried. + * @type string $page_token + * The value of + * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @type string $filter + * Field match expression used to filter the results. + * @type string $order_by + * Field by which to sort the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location that contains the BackupPlans to list. + * 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 location that contains the BackupPlans to list. + * 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; + } + + /** + * The target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.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 target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.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 value of + * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` 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; + } + + /** + * The value of + * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` 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; + } + + /** + * Field match expression used to filter the results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Field match expression used to filter the 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 by which to sort the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field by which to sort 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansResponse.php new file mode 100644 index 000000000000..951c36e1be05 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansResponse.php @@ -0,0 +1,151 @@ +google.cloud.gkebackup.v1.ListBackupPlansResponse + */ +class ListBackupPlansResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of BackupPlans matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.BackupPlan backup_plans = 1; + */ + private $backup_plans; + /** + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListBackupPlansRequest.page_token] in a subsequent + * `ListBackupPlans` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * 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\GkeBackup\V1\BackupPlan>|\Google\Protobuf\Internal\RepeatedField $backup_plans + * The list of BackupPlans matching the given criteria. + * @type string $next_page_token + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListBackupPlansRequest.page_token] in a subsequent + * `ListBackupPlans` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * The list of BackupPlans matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.BackupPlan backup_plans = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackupPlans() + { + return $this->backup_plans; + } + + /** + * The list of BackupPlans matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.BackupPlan backup_plans = 1; + * @param array<\Google\Cloud\GkeBackup\V1\BackupPlan>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackupPlans($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\BackupPlan::class); + $this->backup_plans = $arr; + + return $this; + } + + /** + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListBackupPlansRequest.page_token] in a subsequent + * `ListBackupPlans` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListBackupPlansRequest.page_token] in a subsequent + * `ListBackupPlans` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsRequest.php new file mode 100644 index 000000000000..3716d6137891 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsRequest.php @@ -0,0 +1,247 @@ +google.cloud.gkebackup.v1.ListBackupsRequest + */ +class ListBackupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The BackupPlan that contains the Backups to list. + * Format: projects/*/locations/*/backupPlans/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.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 value of + * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] + * received from a previous `ListBackups` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackups` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Field match expression used to filter the results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Field by which to sort the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The BackupPlan that contains the Backups to list. + * Format: projects/*/locations/*/backupPlans/* + * @type int $page_size + * The target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * @type string $page_token + * The value of + * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] + * received from a previous `ListBackups` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackups` must match the call that provided the page token. + * @type string $filter + * Field match expression used to filter the results. + * @type string $order_by + * Field by which to sort the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The BackupPlan that contains the Backups to list. + * Format: projects/*/locations/*/backupPlans/* + * + * Generated 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 BackupPlan that contains the Backups to list. + * Format: projects/*/locations/*/backupPlans/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.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 target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.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 value of + * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] + * received from a previous `ListBackups` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackups` 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; + } + + /** + * The value of + * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] + * received from a previous `ListBackups` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackups` 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; + } + + /** + * Field match expression used to filter the results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Field match expression used to filter the 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 by which to sort the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field by which to sort 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsResponse.php new file mode 100644 index 000000000000..4ec0191e89e9 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsResponse.php @@ -0,0 +1,109 @@ +google.cloud.gkebackup.v1.ListBackupsResponse + */ +class ListBackupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Backups matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Backup backups = 1; + */ + private $backups; + /** + * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListBackupsRequest.page_token] in + * a subsequent `ListBackups` call to retrieve the next page of results. If + * this field is omitted or empty, then there are no more results to 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\GkeBackup\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $backups + * The list of Backups matching the given criteria. + * @type string $next_page_token + * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListBackupsRequest.page_token] in + * a subsequent `ListBackups` call to retrieve the next page of results. If + * this field is omitted or empty, then there are no more results to return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * The list of Backups matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Backup backups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackups() + { + return $this->backups; + } + + /** + * The list of Backups matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Backup backups = 1; + * @param array<\Google\Cloud\GkeBackup\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\Backup::class); + $this->backups = $arr; + + return $this; + } + + /** + * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListBackupsRequest.page_token] in + * a subsequent `ListBackups` call to retrieve the next page of results. If + * this field is omitted or empty, then there are no more results to return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListBackupsRequest.page_token] in + * a subsequent `ListBackups` call to retrieve the next page of results. If + * this field is omitted or empty, then there are no more results to 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansRequest.php new file mode 100644 index 000000000000..b7a9a260d0b5 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansRequest.php @@ -0,0 +1,247 @@ +google.cloud.gkebackup.v1.ListRestorePlansRequest + */ +class ListRestorePlansRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location that contains the RestorePlans to list. + * Format: projects/*/locations/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.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 value of + * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] + * received from a previous `ListRestorePlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListRestorePlans` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Field match expression used to filter the results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Field by which to sort the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location that contains the RestorePlans to list. + * Format: projects/*/locations/* + * @type int $page_size + * The target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] + * to determine if there are more instances left to be queried. + * @type string $page_token + * The value of + * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] + * received from a previous `ListRestorePlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListRestorePlans` must match the call that provided the page token. + * @type string $filter + * Field match expression used to filter the results. + * @type string $order_by + * Field by which to sort the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location that contains the RestorePlans to list. + * 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 location that contains the RestorePlans to list. + * 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; + } + + /** + * The target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.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 target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.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 value of + * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] + * received from a previous `ListRestorePlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListRestorePlans` 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; + } + + /** + * The value of + * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] + * received from a previous `ListRestorePlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListRestorePlans` 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; + } + + /** + * Field match expression used to filter the results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Field match expression used to filter the 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 by which to sort the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field by which to sort 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansResponse.php new file mode 100644 index 000000000000..49e9e0e72d2d --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansResponse.php @@ -0,0 +1,151 @@ +google.cloud.gkebackup.v1.ListRestorePlansResponse + */ +class ListRestorePlansResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of RestorePlans matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestorePlan restore_plans = 1; + */ + private $restore_plans; + /** + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListRestorePlansRequest.page_token] in a subsequent + * `ListRestorePlans` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * 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\GkeBackup\V1\RestorePlan>|\Google\Protobuf\Internal\RepeatedField $restore_plans + * The list of RestorePlans matching the given criteria. + * @type string $next_page_token + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListRestorePlansRequest.page_token] in a subsequent + * `ListRestorePlans` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * The list of RestorePlans matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestorePlan restore_plans = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRestorePlans() + { + return $this->restore_plans; + } + + /** + * The list of RestorePlans matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestorePlan restore_plans = 1; + * @param array<\Google\Cloud\GkeBackup\V1\RestorePlan>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRestorePlans($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestorePlan::class); + $this->restore_plans = $arr; + + return $this; + } + + /** + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListRestorePlansRequest.page_token] in a subsequent + * `ListRestorePlans` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListRestorePlansRequest.page_token] in a subsequent + * `ListRestorePlans` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresRequest.php new file mode 100644 index 000000000000..9056e4b6fe56 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresRequest.php @@ -0,0 +1,247 @@ +google.cloud.gkebackup.v1.ListRestoresRequest + */ +class ListRestoresRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The RestorePlan that contains the Restores to list. + * Format: projects/*/locations/*/restorePlans/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.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 value of + * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] + * received from a previous `ListRestores` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to `ListRestores` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Field match expression used to filter the results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Field by which to sort the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The RestorePlan that contains the Restores to list. + * Format: projects/*/locations/*/restorePlans/* + * @type int $page_size + * The target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] + * to determine if there are more instances left to be queried. + * @type string $page_token + * The value of + * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] + * received from a previous `ListRestores` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to `ListRestores` + * must match the call that provided the page token. + * @type string $filter + * Field match expression used to filter the results. + * @type string $order_by + * Field by which to sort the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The RestorePlan that contains the Restores to list. + * Format: projects/*/locations/*/restorePlans/* + * + * Generated 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 RestorePlan that contains the Restores to list. + * Format: projects/*/locations/*/restorePlans/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.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 target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.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 value of + * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] + * received from a previous `ListRestores` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to `ListRestores` + * 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; + } + + /** + * The value of + * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] + * received from a previous `ListRestores` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to `ListRestores` + * 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; + } + + /** + * Field match expression used to filter the results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Field match expression used to filter the 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 by which to sort the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field by which to sort 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresResponse.php new file mode 100644 index 000000000000..d549a212fd85 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresResponse.php @@ -0,0 +1,147 @@ +google.cloud.gkebackup.v1.ListRestoresResponse + */ +class ListRestoresResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Restores matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Restore restores = 1; + */ + private $restores; + /** + * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListRestoresRequest.page_token] + * in a subsequent `ListRestores` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * 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\GkeBackup\V1\Restore>|\Google\Protobuf\Internal\RepeatedField $restores + * The list of Restores matching the given criteria. + * @type string $next_page_token + * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListRestoresRequest.page_token] + * in a subsequent `ListRestores` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * The list of Restores matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Restore restores = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRestores() + { + return $this->restores; + } + + /** + * The list of Restores matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Restore restores = 1; + * @param array<\Google\Cloud\GkeBackup\V1\Restore>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRestores($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\Restore::class); + $this->restores = $arr; + + return $this; + } + + /** + * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListRestoresRequest.page_token] + * in a subsequent `ListRestores` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListRestoresRequest.page_token] + * in a subsequent `ListRestores` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsRequest.php new file mode 100644 index 000000000000..b01cf4919603 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsRequest.php @@ -0,0 +1,247 @@ +google.cloud.gkebackup.v1.ListVolumeBackupsRequest + */ +class ListVolumeBackupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Backup that contains the VolumeBackups to list. + * Format: projects/*/locations/*/backupPlans/*/backups/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.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 value of + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] + * received from a previous `ListVolumeBackups` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListVolumeBackups` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Field match expression used to filter the results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Field by which to sort the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Backup that contains the VolumeBackups to list. + * Format: projects/*/locations/*/backupPlans/*/backups/* + * @type int $page_size + * The target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] + * to determine if there are more instances left to be queried. + * @type string $page_token + * The value of + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] + * received from a previous `ListVolumeBackups` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListVolumeBackups` must match the call that provided the page token. + * @type string $filter + * Field match expression used to filter the results. + * @type string $order_by + * Field by which to sort the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Backup that contains the VolumeBackups to list. + * Format: projects/*/locations/*/backupPlans/*/backups/* + * + * Generated 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 Backup that contains the VolumeBackups to list. + * Format: projects/*/locations/*/backupPlans/*/backups/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.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 target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.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 value of + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] + * received from a previous `ListVolumeBackups` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListVolumeBackups` 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; + } + + /** + * The value of + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] + * received from a previous `ListVolumeBackups` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListVolumeBackups` 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; + } + + /** + * Field match expression used to filter the results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Field match expression used to filter the 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 by which to sort the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field by which to sort 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsResponse.php new file mode 100644 index 000000000000..77f443d70e93 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsResponse.php @@ -0,0 +1,117 @@ +google.cloud.gkebackup.v1.ListVolumeBackupsResponse + */ +class ListVolumeBackupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of VolumeBackups matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeBackup volume_backups = 1; + */ + private $volume_backups; + /** + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListVolumeBackupsRequest.page_token] in a subsequent + * `ListVolumeBackups` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * 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\GkeBackup\V1\VolumeBackup>|\Google\Protobuf\Internal\RepeatedField $volume_backups + * The list of VolumeBackups matching the given criteria. + * @type string $next_page_token + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListVolumeBackupsRequest.page_token] in a subsequent + * `ListVolumeBackups` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * The list of VolumeBackups matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeBackup volume_backups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumeBackups() + { + return $this->volume_backups; + } + + /** + * The list of VolumeBackups matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeBackup volume_backups = 1; + * @param array<\Google\Cloud\GkeBackup\V1\VolumeBackup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumeBackups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\VolumeBackup::class); + $this->volume_backups = $arr; + + return $this; + } + + /** + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListVolumeBackupsRequest.page_token] in a subsequent + * `ListVolumeBackups` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListVolumeBackupsRequest.page_token] in a subsequent + * `ListVolumeBackups` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresRequest.php new file mode 100644 index 000000000000..bf3861a362e9 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresRequest.php @@ -0,0 +1,247 @@ +google.cloud.gkebackup.v1.ListVolumeRestoresRequest + */ +class ListVolumeRestoresRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Restore that contains the VolumeRestores to list. + * Format: projects/*/locations/*/restorePlans/*/restores/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.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 value of + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] + * received from a previous `ListVolumeRestores` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListVolumeRestores` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Field match expression used to filter the results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Field by which to sort the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Restore that contains the VolumeRestores to list. + * Format: projects/*/locations/*/restorePlans/*/restores/* + * @type int $page_size + * The target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] + * to determine if there are more instances left to be queried. + * @type string $page_token + * The value of + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] + * received from a previous `ListVolumeRestores` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListVolumeRestores` must match the call that provided the page token. + * @type string $filter + * Field match expression used to filter the results. + * @type string $order_by + * Field by which to sort the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Restore that contains the VolumeRestores to list. + * Format: projects/*/locations/*/restorePlans/*/restores/* + * + * Generated 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 Restore that contains the VolumeRestores to list. + * Format: projects/*/locations/*/restorePlans/*/restores/* + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.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 target number of results to return in a single response. + * If not specified, a default value will be chosen by the service. + * Note that the response may inclue a partial list and a caller should + * only rely on the response's + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.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 value of + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] + * received from a previous `ListVolumeRestores` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListVolumeRestores` 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; + } + + /** + * The value of + * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] + * received from a previous `ListVolumeRestores` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListVolumeRestores` 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; + } + + /** + * Field match expression used to filter the results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Field match expression used to filter the 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 by which to sort the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field by which to sort 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresResponse.php new file mode 100644 index 000000000000..6338ff4bc361 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresResponse.php @@ -0,0 +1,117 @@ +google.cloud.gkebackup.v1.ListVolumeRestoresResponse + */ +class ListVolumeRestoresResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of VolumeRestores matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeRestore volume_restores = 1; + */ + private $volume_restores; + /** + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListVolumeRestoresRequest.page_token] in a subsequent + * `ListVolumeRestores` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * 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\GkeBackup\V1\VolumeRestore>|\Google\Protobuf\Internal\RepeatedField $volume_restores + * The list of VolumeRestores matching the given criteria. + * @type string $next_page_token + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListVolumeRestoresRequest.page_token] in a subsequent + * `ListVolumeRestores` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * The list of VolumeRestores matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeRestore volume_restores = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumeRestores() + { + return $this->volume_restores; + } + + /** + * The list of VolumeRestores matching the given criteria. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeRestore volume_restores = 1; + * @param array<\Google\Cloud\GkeBackup\V1\VolumeRestore>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumeRestores($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\VolumeRestore::class); + $this->volume_restores = $arr; + + return $this; + } + + /** + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListVolumeRestoresRequest.page_token] in a subsequent + * `ListVolumeRestores` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token which may be sent as + * [page_token][google.cloud.gkebackup.v1.ListVolumeRestoresRequest.page_token] in a subsequent + * `ListVolumeRestores` call to retrieve the next page of results. + * If this field is omitted or empty, then there are no more results to + * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedName.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedName.php new file mode 100644 index 000000000000..3b3e1b70b41a --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedName.php @@ -0,0 +1,101 @@ +google.cloud.gkebackup.v1.NamespacedName + */ +class NamespacedName extends \Google\Protobuf\Internal\Message +{ + /** + * The Namespace of the Kubernetes resource. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * The name of the Kubernetes resource. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * The Namespace of the Kubernetes resource. + * @type string $name + * The name of the Kubernetes resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The Namespace of the Kubernetes resource. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * The Namespace of the Kubernetes resource. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * The name of the Kubernetes resource. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the Kubernetes resource. + * + * 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; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedNames.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedNames.php new file mode 100644 index 000000000000..89a860984ac8 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedNames.php @@ -0,0 +1,67 @@ +google.cloud.gkebackup.v1.NamespacedNames + */ +class NamespacedNames extends \Google\Protobuf\Internal\Message +{ + /** + * A list of namespaced Kubernetes resources. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.NamespacedName namespaced_names = 1; + */ + private $namespaced_names; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeBackup\V1\NamespacedName>|\Google\Protobuf\Internal\RepeatedField $namespaced_names + * A list of namespaced Kubernetes resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * A list of namespaced Kubernetes resources. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.NamespacedName namespaced_names = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNamespacedNames() + { + return $this->namespaced_names; + } + + /** + * A list of namespaced Kubernetes resources. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.NamespacedName namespaced_names = 1; + * @param array<\Google\Cloud\GkeBackup\V1\NamespacedName>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNamespacedNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\NamespacedName::class); + $this->namespaced_names = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Namespaces.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Namespaces.php new file mode 100644 index 000000000000..641c9e3e1187 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Namespaces.php @@ -0,0 +1,67 @@ +google.cloud.gkebackup.v1.Namespaces + */ +class Namespaces extends \Google\Protobuf\Internal\Message +{ + /** + * A list of Kubernetes Namespaces + * + * Generated from protobuf field repeated string namespaces = 1; + */ + private $namespaces; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $namespaces + * A list of Kubernetes Namespaces + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * A list of Kubernetes Namespaces + * + * Generated from protobuf field repeated string namespaces = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNamespaces() + { + return $this->namespaces; + } + + /** + * A list of Kubernetes Namespaces + * + * Generated from protobuf field repeated string namespaces = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNamespaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->namespaces = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/OperationMetadata.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/OperationMetadata.php new file mode 100644 index 000000000000..c002b5b2034c --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/OperationMetadata.php @@ -0,0 +1,303 @@ +google.cloud.gkebackup.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\Gkebackup\V1\Gkebackup::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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore.php new file mode 100644 index 000000000000..f2ace637bfa5 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore.php @@ -0,0 +1,729 @@ +google.cloud.gkebackup.v1.Restore + */ +class Restore extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The full name of the Restore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/* + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The timestamp when this Restore 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 this Restore resource was last + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User specified descriptive string for this Restore. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Required. Immutable. A reference to the [Backup][google.cloud.gkebackup.v1.Backup] used as the source from which this Restore + * will restore. Note that this Backup must be a sub-resource of the + * RestorePlan's [backup_plan][google.cloud.gkebackup.v1.RestorePlan.backup_plan]. + * Format: projects/*/locations/*/backupPlans/*/backups/*. + * + * Generated from protobuf field string backup = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $backup = ''; + /** + * Output only. The target cluster into which this Restore will restore data. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * Inherited from parent RestorePlan's [cluster][google.cloud.gkebackup.v1.RestorePlan.cluster] value. + * + * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $cluster = ''; + /** + * Output only. Configuration of the Restore. Inherited from parent RestorePlan's + * [restore_config][google.cloud.gkebackup.v1.RestorePlan.restore_config]. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $restore_config = null; + /** + * A set of custom labels supplied by user. + * + * Generated from protobuf field map labels = 9; + */ + private $labels; + /** + * Output only. The current state of the Restore. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Restore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Human-readable description of why the Restore is in its current state. + * + * Generated from protobuf field string state_reason = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_reason = ''; + /** + * Output only. Timestamp of when the restore operation completed. + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $complete_time = null; + /** + * Output only. Number of resources restored during the restore execution. + * + * Generated from protobuf field int32 resources_restored_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $resources_restored_count = 0; + /** + * Output only. Number of resources excluded during the restore execution. + * + * Generated from protobuf field int32 resources_excluded_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $resources_excluded_count = 0; + /** + * Output only. Number of resources that failed to be restored during the restore + * execution. + * + * Generated from protobuf field int32 resources_failed_count = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $resources_failed_count = 0; + /** + * Output only. Number of volumes restored during the restore execution. + * + * Generated from protobuf field int32 volumes_restored_count = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $volumes_restored_count = 0; + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a restore from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform restore updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetRestore`, + * and systems are expected to put that etag in the request to + * `UpdateRestore` or `DeleteRestore` to ensure that their change will be + * applied to the same version of the resource. + * + * Generated from protobuf field string etag = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The full name of the Restore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/* + * @type string $uid + * Output only. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when this Restore resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when this Restore resource was last + * updated. + * @type string $description + * User specified descriptive string for this Restore. + * @type string $backup + * Required. Immutable. A reference to the [Backup][google.cloud.gkebackup.v1.Backup] used as the source from which this Restore + * will restore. Note that this Backup must be a sub-resource of the + * RestorePlan's [backup_plan][google.cloud.gkebackup.v1.RestorePlan.backup_plan]. + * Format: projects/*/locations/*/backupPlans/*/backups/*. + * @type string $cluster + * Output only. The target cluster into which this Restore will restore data. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * Inherited from parent RestorePlan's [cluster][google.cloud.gkebackup.v1.RestorePlan.cluster] value. + * @type \Google\Cloud\GkeBackup\V1\RestoreConfig $restore_config + * Output only. Configuration of the Restore. Inherited from parent RestorePlan's + * [restore_config][google.cloud.gkebackup.v1.RestorePlan.restore_config]. + * @type array|\Google\Protobuf\Internal\MapField $labels + * A set of custom labels supplied by user. + * @type int $state + * Output only. The current state of the Restore. + * @type string $state_reason + * Output only. Human-readable description of why the Restore is in its current state. + * @type \Google\Protobuf\Timestamp $complete_time + * Output only. Timestamp of when the restore operation completed. + * @type int $resources_restored_count + * Output only. Number of resources restored during the restore execution. + * @type int $resources_excluded_count + * Output only. Number of resources excluded during the restore execution. + * @type int $resources_failed_count + * Output only. Number of resources that failed to be restored during the restore + * execution. + * @type int $volumes_restored_count + * Output only. Number of volumes restored during the restore execution. + * @type string $etag + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a restore from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform restore updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetRestore`, + * and systems are expected to put that etag in the request to + * `UpdateRestore` or `DeleteRestore` to ensure that their change will be + * applied to the same version of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The full name of the Restore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/* + * + * 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 Restore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/* + * + * 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. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * + * Generated from protobuf field string uid = 2 [(.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 timestamp when this Restore 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 this Restore 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 this Restore resource 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 this Restore resource 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; + } + + /** + * User specified descriptive string for this Restore. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User specified descriptive string for this Restore. + * + * 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. Immutable. A reference to the [Backup][google.cloud.gkebackup.v1.Backup] used as the source from which this Restore + * will restore. Note that this Backup must be a sub-resource of the + * RestorePlan's [backup_plan][google.cloud.gkebackup.v1.RestorePlan.backup_plan]. + * Format: projects/*/locations/*/backupPlans/*/backups/*. + * + * Generated from protobuf field string backup = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getBackup() + { + return $this->backup; + } + + /** + * Required. Immutable. A reference to the [Backup][google.cloud.gkebackup.v1.Backup] used as the source from which this Restore + * will restore. Note that this Backup must be a sub-resource of the + * RestorePlan's [backup_plan][google.cloud.gkebackup.v1.RestorePlan.backup_plan]. + * Format: projects/*/locations/*/backupPlans/*/backups/*. + * + * Generated from protobuf field string backup = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkString($var, True); + $this->backup = $var; + + return $this; + } + + /** + * Output only. The target cluster into which this Restore will restore data. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * Inherited from parent RestorePlan's [cluster][google.cloud.gkebackup.v1.RestorePlan.cluster] value. + * + * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * Output only. The target cluster into which this Restore will restore data. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * Inherited from parent RestorePlan's [cluster][google.cloud.gkebackup.v1.RestorePlan.cluster] value. + * + * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkString($var, True); + $this->cluster = $var; + + return $this; + } + + /** + * Output only. Configuration of the Restore. Inherited from parent RestorePlan's + * [restore_config][google.cloud.gkebackup.v1.RestorePlan.restore_config]. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeBackup\V1\RestoreConfig|null + */ + public function getRestoreConfig() + { + return $this->restore_config; + } + + public function hasRestoreConfig() + { + return isset($this->restore_config); + } + + public function clearRestoreConfig() + { + unset($this->restore_config); + } + + /** + * Output only. Configuration of the Restore. Inherited from parent RestorePlan's + * [restore_config][google.cloud.gkebackup.v1.RestorePlan.restore_config]. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeBackup\V1\RestoreConfig $var + * @return $this + */ + public function setRestoreConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig::class); + $this->restore_config = $var; + + return $this; + } + + /** + * A set of custom labels supplied by user. + * + * Generated from protobuf field map labels = 9; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * A set of custom labels supplied by user. + * + * 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 current state of the Restore. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Restore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the Restore. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Restore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\Restore\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Human-readable description of why the Restore is in its current state. + * + * Generated from protobuf field string state_reason = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateReason() + { + return $this->state_reason; + } + + /** + * Output only. Human-readable description of why the Restore is in its current state. + * + * Generated from protobuf field string state_reason = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateReason($var) + { + GPBUtil::checkString($var, True); + $this->state_reason = $var; + + return $this; + } + + /** + * Output only. Timestamp of when the restore operation completed. + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 12 [(.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. Timestamp of when the restore operation completed. + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 12 [(.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. Number of resources restored during the restore execution. + * + * Generated from protobuf field int32 resources_restored_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getResourcesRestoredCount() + { + return $this->resources_restored_count; + } + + /** + * Output only. Number of resources restored during the restore execution. + * + * Generated from protobuf field int32 resources_restored_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setResourcesRestoredCount($var) + { + GPBUtil::checkInt32($var); + $this->resources_restored_count = $var; + + return $this; + } + + /** + * Output only. Number of resources excluded during the restore execution. + * + * Generated from protobuf field int32 resources_excluded_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getResourcesExcludedCount() + { + return $this->resources_excluded_count; + } + + /** + * Output only. Number of resources excluded during the restore execution. + * + * Generated from protobuf field int32 resources_excluded_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setResourcesExcludedCount($var) + { + GPBUtil::checkInt32($var); + $this->resources_excluded_count = $var; + + return $this; + } + + /** + * Output only. Number of resources that failed to be restored during the restore + * execution. + * + * Generated from protobuf field int32 resources_failed_count = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getResourcesFailedCount() + { + return $this->resources_failed_count; + } + + /** + * Output only. Number of resources that failed to be restored during the restore + * execution. + * + * Generated from protobuf field int32 resources_failed_count = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setResourcesFailedCount($var) + { + GPBUtil::checkInt32($var); + $this->resources_failed_count = $var; + + return $this; + } + + /** + * Output only. Number of volumes restored during the restore execution. + * + * Generated from protobuf field int32 volumes_restored_count = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getVolumesRestoredCount() + { + return $this->volumes_restored_count; + } + + /** + * Output only. Number of volumes restored during the restore execution. + * + * Generated from protobuf field int32 volumes_restored_count = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setVolumesRestoredCount($var) + { + GPBUtil::checkInt32($var); + $this->volumes_restored_count = $var; + + return $this; + } + + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a restore from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform restore updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetRestore`, + * and systems are expected to put that etag in the request to + * `UpdateRestore` or `DeleteRestore` to ensure that their change will be + * applied to the same version of the resource. + * + * Generated from protobuf field string etag = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a restore from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform restore updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetRestore`, + * and systems are expected to put that etag in the request to + * `UpdateRestore` or `DeleteRestore` to ensure that their change will be + * applied to the same version of the resource. + * + * Generated from protobuf field string etag = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore/State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore/State.php new file mode 100644 index 000000000000..3c28235bc7c4 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore/State.php @@ -0,0 +1,88 @@ +google.cloud.gkebackup.v1.Restore.State + */ +class State +{ + /** + * The Restore resource is in the process of being created. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The Restore resource has been created and the associated RestoreJob + * Kubernetes resource has been injected into target cluster. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The gkebackup agent in the cluster has begun executing the restore + * operation. + * + * Generated from protobuf enum IN_PROGRESS = 2; + */ + const IN_PROGRESS = 2; + /** + * The restore operation has completed successfully. Restored workloads may + * not yet be operational. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * The restore operation has failed. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * This Restore resource is in the process of being deleted. + * + * Generated from protobuf enum DELETING = 5; + */ + const DELETING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::IN_PROGRESS => 'IN_PROGRESS', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + 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\GkeBackup\V1\Restore_State::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig.php new file mode 100644 index 000000000000..46cc7d0c8404 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig.php @@ -0,0 +1,382 @@ +google.cloud.gkebackup.v1.RestoreConfig + */ +class RestoreConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the mechanism to be used to restore volume data. + * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as + * NO_VOLUME_DATA_RESTORATION). + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1; + */ + protected $volume_data_restore_policy = 0; + /** + * Defines the behavior for handling the situation where cluster-scoped + * resources being restored already exist in the target cluster. This MUST be + * set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if + * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] is not empty. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2; + */ + protected $cluster_resource_conflict_policy = 0; + /** + * Defines the behavior for handling the situation where sets of namespaced + * resources being restored already exist in the target cluster. This MUST be + * set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3; + */ + protected $namespaced_resource_restore_mode = 0; + /** + * Identifies the cluster-scoped resources to restore from the Backup. + * Not specifying it means NO cluster resource will be restored. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4; + */ + protected $cluster_resource_restore_scope = null; + /** + * A list of transformation rules to be applied against Kubernetes resources + * as they are selected for restoration from a Backup. Rules are executed in + * order defined - this order matters, as changes made by a rule may impact + * the filtering logic of subsequent rules. An empty list means no + * substitution will occur. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8; + */ + private $substitution_rules; + protected $namespaced_resource_restore_scope; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $volume_data_restore_policy + * Specifies the mechanism to be used to restore volume data. + * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as + * NO_VOLUME_DATA_RESTORATION). + * @type int $cluster_resource_conflict_policy + * Defines the behavior for handling the situation where cluster-scoped + * resources being restored already exist in the target cluster. This MUST be + * set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if + * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] is not empty. + * @type int $namespaced_resource_restore_mode + * Defines the behavior for handling the situation where sets of namespaced + * resources being restored already exist in the target cluster. This MUST be + * set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. + * @type \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceRestoreScope $cluster_resource_restore_scope + * Identifies the cluster-scoped resources to restore from the Backup. + * Not specifying it means NO cluster resource will be restored. + * @type bool $all_namespaces + * Restore all namespaced resources in the Backup if set to "True". + * Specifying this field to "False" is an error. + * @type \Google\Cloud\GkeBackup\V1\Namespaces $selected_namespaces + * A list of selected Namespaces to restore from the Backup. The listed + * Namespaces and all resources contained in them will be restored. + * @type \Google\Cloud\GkeBackup\V1\NamespacedNames $selected_applications + * A list of selected ProtectedApplications to restore. The listed + * ProtectedApplications and all the resources to which they refer will be + * restored. + * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\SubstitutionRule>|\Google\Protobuf\Internal\RepeatedField $substitution_rules + * A list of transformation rules to be applied against Kubernetes resources + * as they are selected for restoration from a Backup. Rules are executed in + * order defined - this order matters, as changes made by a rule may impact + * the filtering logic of subsequent rules. An empty list means no + * substitution will occur. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the mechanism to be used to restore volume data. + * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as + * NO_VOLUME_DATA_RESTORATION). + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1; + * @return int + */ + public function getVolumeDataRestorePolicy() + { + return $this->volume_data_restore_policy; + } + + /** + * Specifies the mechanism to be used to restore volume data. + * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as + * NO_VOLUME_DATA_RESTORATION). + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1; + * @param int $var + * @return $this + */ + public function setVolumeDataRestorePolicy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\VolumeDataRestorePolicy::class); + $this->volume_data_restore_policy = $var; + + return $this; + } + + /** + * Defines the behavior for handling the situation where cluster-scoped + * resources being restored already exist in the target cluster. This MUST be + * set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if + * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] is not empty. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2; + * @return int + */ + public function getClusterResourceConflictPolicy() + { + return $this->cluster_resource_conflict_policy; + } + + /** + * Defines the behavior for handling the situation where cluster-scoped + * resources being restored already exist in the target cluster. This MUST be + * set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if + * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] is not empty. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2; + * @param int $var + * @return $this + */ + public function setClusterResourceConflictPolicy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceConflictPolicy::class); + $this->cluster_resource_conflict_policy = $var; + + return $this; + } + + /** + * Defines the behavior for handling the situation where sets of namespaced + * resources being restored already exist in the target cluster. This MUST be + * set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3; + * @return int + */ + public function getNamespacedResourceRestoreMode() + { + return $this->namespaced_resource_restore_mode; + } + + /** + * Defines the behavior for handling the situation where sets of namespaced + * resources being restored already exist in the target cluster. This MUST be + * set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3; + * @param int $var + * @return $this + */ + public function setNamespacedResourceRestoreMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\NamespacedResourceRestoreMode::class); + $this->namespaced_resource_restore_mode = $var; + + return $this; + } + + /** + * Identifies the cluster-scoped resources to restore from the Backup. + * Not specifying it means NO cluster resource will be restored. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4; + * @return \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceRestoreScope|null + */ + public function getClusterResourceRestoreScope() + { + return $this->cluster_resource_restore_scope; + } + + public function hasClusterResourceRestoreScope() + { + return isset($this->cluster_resource_restore_scope); + } + + public function clearClusterResourceRestoreScope() + { + unset($this->cluster_resource_restore_scope); + } + + /** + * Identifies the cluster-scoped resources to restore from the Backup. + * Not specifying it means NO cluster resource will be restored. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4; + * @param \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceRestoreScope $var + * @return $this + */ + public function setClusterResourceRestoreScope($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceRestoreScope::class); + $this->cluster_resource_restore_scope = $var; + + return $this; + } + + /** + * Restore all namespaced resources in the Backup if set to "True". + * Specifying this field to "False" is an error. + * + * Generated from protobuf field bool all_namespaces = 5; + * @return bool + */ + public function getAllNamespaces() + { + return $this->readOneof(5); + } + + public function hasAllNamespaces() + { + return $this->hasOneof(5); + } + + /** + * Restore all namespaced resources in the Backup if set to "True". + * Specifying this field to "False" is an error. + * + * Generated from protobuf field bool all_namespaces = 5; + * @param bool $var + * @return $this + */ + public function setAllNamespaces($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * A list of selected Namespaces to restore from the Backup. The listed + * Namespaces and all resources contained in them will be restored. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6; + * @return \Google\Cloud\GkeBackup\V1\Namespaces|null + */ + public function getSelectedNamespaces() + { + return $this->readOneof(6); + } + + public function hasSelectedNamespaces() + { + return $this->hasOneof(6); + } + + /** + * A list of selected Namespaces to restore from the Backup. The listed + * Namespaces and all resources contained in them will be restored. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6; + * @param \Google\Cloud\GkeBackup\V1\Namespaces $var + * @return $this + */ + public function setSelectedNamespaces($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Namespaces::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * A list of selected ProtectedApplications to restore. The listed + * ProtectedApplications and all the resources to which they refer will be + * restored. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7; + * @return \Google\Cloud\GkeBackup\V1\NamespacedNames|null + */ + public function getSelectedApplications() + { + return $this->readOneof(7); + } + + public function hasSelectedApplications() + { + return $this->hasOneof(7); + } + + /** + * A list of selected ProtectedApplications to restore. The listed + * ProtectedApplications and all the resources to which they refer will be + * restored. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7; + * @param \Google\Cloud\GkeBackup\V1\NamespacedNames $var + * @return $this + */ + public function setSelectedApplications($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedNames::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * A list of transformation rules to be applied against Kubernetes resources + * as they are selected for restoration from a Backup. Rules are executed in + * order defined - this order matters, as changes made by a rule may impact + * the filtering logic of subsequent rules. An empty list means no + * substitution will occur. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSubstitutionRules() + { + return $this->substitution_rules; + } + + /** + * A list of transformation rules to be applied against Kubernetes resources + * as they are selected for restoration from a Backup. Rules are executed in + * order defined - this order matters, as changes made by a rule may impact + * the filtering logic of subsequent rules. An empty list means no + * substitution will occur. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8; + * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\SubstitutionRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSubstitutionRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\SubstitutionRule::class); + $this->substitution_rules = $arr; + + return $this; + } + + /** + * @return string + */ + public function getNamespacedResourceRestoreScope() + { + return $this->whichOneof("namespaced_resource_restore_scope"); + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceConflictPolicy.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceConflictPolicy.php new file mode 100644 index 000000000000..2c370fe9b4a6 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceConflictPolicy.php @@ -0,0 +1,69 @@ +google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy + */ +class ClusterResourceConflictPolicy +{ + /** + * Unspecified. Only allowed if no cluster-scoped resources will be + * restored. + * + * Generated from protobuf enum CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0; + */ + const CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0; + /** + * Do not attempt to restore the conflicting resource. + * + * Generated from protobuf enum USE_EXISTING_VERSION = 1; + */ + const USE_EXISTING_VERSION = 1; + /** + * Delete the existing version before re-creating it from the Backup. + * Note that this is a dangerous option which could cause unintentional + * data loss if used inappropriately - for example, deleting a CRD will + * cause Kubernetes to delete all CRs of that type. + * + * Generated from protobuf enum USE_BACKUP_VERSION = 2; + */ + const USE_BACKUP_VERSION = 2; + + private static $valueToName = [ + self::CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED => 'CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED', + self::USE_EXISTING_VERSION => 'USE_EXISTING_VERSION', + self::USE_BACKUP_VERSION => 'USE_BACKUP_VERSION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ClusterResourceConflictPolicy::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_ClusterResourceConflictPolicy::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceRestoreScope.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceRestoreScope.php new file mode 100644 index 000000000000..cddcdcd36ca3 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceRestoreScope.php @@ -0,0 +1,82 @@ +google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope + */ +class ClusterResourceRestoreScope extends \Google\Protobuf\Internal\Message +{ + /** + * A list of "types" of cluster-scoped resources to be restored from the + * Backup. An empty list means that NO cluster-scoped resources will be + * restored. Note that Namespaces and PersistentVolume restoration is + * handled separately and is not governed by this field. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1; + */ + private $selected_group_kinds; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $selected_group_kinds + * A list of "types" of cluster-scoped resources to be restored from the + * Backup. An empty list means that NO cluster-scoped resources will be + * restored. Note that Namespaces and PersistentVolume restoration is + * handled separately and is not governed by this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); + parent::__construct($data); + } + + /** + * A list of "types" of cluster-scoped resources to be restored from the + * Backup. An empty list means that NO cluster-scoped resources will be + * restored. Note that Namespaces and PersistentVolume restoration is + * handled separately and is not governed by this field. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSelectedGroupKinds() + { + return $this->selected_group_kinds; + } + + /** + * A list of "types" of cluster-scoped resources to be restored from the + * Backup. An empty list means that NO cluster-scoped resources will be + * restored. Note that Namespaces and PersistentVolume restoration is + * handled separately and is not governed by this field. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1; + * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSelectedGroupKinds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind::class); + $this->selected_group_kinds = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ClusterResourceRestoreScope::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_ClusterResourceRestoreScope::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/GroupKind.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/GroupKind.php new file mode 100644 index 000000000000..bcef89eac771 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/GroupKind.php @@ -0,0 +1,118 @@ +google.cloud.gkebackup.v1.RestoreConfig.GroupKind + */ +class GroupKind extends \Google\Protobuf\Internal\Message +{ + /** + * API group string of a Kubernetes resource, e.g. + * "apiextensions.k8s.io", "storage.k8s.io", etc. + * Note: use empty string for core API group + * + * Generated from protobuf field string resource_group = 1; + */ + protected $resource_group = ''; + /** + * Kind of a Kubernetes resource, e.g. + * "CustomResourceDefinition", "StorageClass", etc. + * + * Generated from protobuf field string resource_kind = 2; + */ + protected $resource_kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_group + * API group string of a Kubernetes resource, e.g. + * "apiextensions.k8s.io", "storage.k8s.io", etc. + * Note: use empty string for core API group + * @type string $resource_kind + * Kind of a Kubernetes resource, e.g. + * "CustomResourceDefinition", "StorageClass", etc. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); + parent::__construct($data); + } + + /** + * API group string of a Kubernetes resource, e.g. + * "apiextensions.k8s.io", "storage.k8s.io", etc. + * Note: use empty string for core API group + * + * Generated from protobuf field string resource_group = 1; + * @return string + */ + public function getResourceGroup() + { + return $this->resource_group; + } + + /** + * API group string of a Kubernetes resource, e.g. + * "apiextensions.k8s.io", "storage.k8s.io", etc. + * Note: use empty string for core API group + * + * Generated from protobuf field string resource_group = 1; + * @param string $var + * @return $this + */ + public function setResourceGroup($var) + { + GPBUtil::checkString($var, True); + $this->resource_group = $var; + + return $this; + } + + /** + * Kind of a Kubernetes resource, e.g. + * "CustomResourceDefinition", "StorageClass", etc. + * + * Generated from protobuf field string resource_kind = 2; + * @return string + */ + public function getResourceKind() + { + return $this->resource_kind; + } + + /** + * Kind of a Kubernetes resource, e.g. + * "CustomResourceDefinition", "StorageClass", etc. + * + * Generated from protobuf field string resource_kind = 2; + * @param string $var + * @return $this + */ + public function setResourceKind($var) + { + GPBUtil::checkString($var, True); + $this->resource_kind = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GroupKind::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_GroupKind::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/NamespacedResourceRestoreMode.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/NamespacedResourceRestoreMode.php new file mode 100644 index 000000000000..d2d978281027 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/NamespacedResourceRestoreMode.php @@ -0,0 +1,75 @@ +google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode + */ +class NamespacedResourceRestoreMode +{ + /** + * Unspecified (invalid). + * + * Generated from protobuf enum NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0; + */ + const NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0; + /** + * When conflicting top-level resources (either Namespaces or + * ProtectedApplications, depending upon the scope) are encountered, this + * will first trigger a delete of the conflicting resource AND ALL OF ITS + * REFERENCED RESOURCES (e.g., all resources in the Namespace or all + * resources referenced by the ProtectedApplication) before restoring the + * resources from the Backup. This mode should only be used when you are + * intending to revert some portion of a cluster to an earlier state. + * + * Generated from protobuf enum DELETE_AND_RESTORE = 1; + */ + const DELETE_AND_RESTORE = 1; + /** + * If conflicting top-level resources (either Namespaces or + * ProtectedApplications, depending upon the scope) are encountered at the + * beginning of a restore process, the Restore will fail. If a conflict + * occurs during the restore process itself (e.g., because an out of band + * process creates conflicting resources), a conflict will be reported. + * + * Generated from protobuf enum FAIL_ON_CONFLICT = 2; + */ + const FAIL_ON_CONFLICT = 2; + + private static $valueToName = [ + self::NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED => 'NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED', + self::DELETE_AND_RESTORE => 'DELETE_AND_RESTORE', + self::FAIL_ON_CONFLICT => 'FAIL_ON_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(NamespacedResourceRestoreMode::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_NamespacedResourceRestoreMode::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/SubstitutionRule.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/SubstitutionRule.php new file mode 100644 index 000000000000..80c9bc843c57 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/SubstitutionRule.php @@ -0,0 +1,312 @@ +google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule + */ +class SubstitutionRule extends \Google\Protobuf\Internal\Message +{ + /** + * (Filtering parameter) Any resource subject to substitution must be + * contained within one of the listed Kubernetes Namespace in the Backup. + * If this field is not provided, no namespace filtering will be performed + * (all resources in all Namespaces, including all cluster-scoped resources, + * will be candidates for substitution). + * To mix cluster-scoped and namespaced resources in the same rule, use an + * empty string ("") as one of the target namespaces. + * + * Generated from protobuf field repeated string target_namespaces = 1; + */ + private $target_namespaces; + /** + * (Filtering parameter) Any resource subject to substitution must belong to + * one of the listed "types". + * If this field is not provided, no type filtering will be performed (all + * resources of all types matching previous filtering parameters will be + * candidates for substitution). + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2; + */ + private $target_group_kinds; + /** + * Required. This is a [JSONPath] + * (https://kubernetes.io/docs/reference/kubectl/jsonpath/) + * expression that matches specific fields of candidate + * resources and it operates as both a filtering parameter (resources that + * are not matched with this expression will not be candidates for + * substitution) as well as a field identifier (identifies exactly which + * fields out of the candidate resources will be modified). + * + * Generated from protobuf field string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_json_path = ''; + /** + * (Filtering parameter) This is a [regular expression] + * (https://en.wikipedia.org/wiki/Regular_expression) + * that is compared against the fields matched by the target_json_path + * expression (and must also have passed the previous filters). + * Substitution will not be performed against fields whose + * value does not match this expression. If this field is NOT specified, + * then ALL fields matched by the target_json_path expression will undergo + * substitution. Note that an empty (e.g., "", rather than unspecified) + * value for for this field will only match empty fields. + * + * Generated from protobuf field string original_value_pattern = 4; + */ + protected $original_value_pattern = ''; + /** + * This is the new value to set for any fields that pass the filtering and + * selection criteria. To remove a value from a Kubernetes resource, either + * leave this field unspecified, or set it to the empty string (""). + * + * Generated from protobuf field string new_value = 5; + */ + protected $new_value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $target_namespaces + * (Filtering parameter) Any resource subject to substitution must be + * contained within one of the listed Kubernetes Namespace in the Backup. + * If this field is not provided, no namespace filtering will be performed + * (all resources in all Namespaces, including all cluster-scoped resources, + * will be candidates for substitution). + * To mix cluster-scoped and namespaced resources in the same rule, use an + * empty string ("") as one of the target namespaces. + * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $target_group_kinds + * (Filtering parameter) Any resource subject to substitution must belong to + * one of the listed "types". + * If this field is not provided, no type filtering will be performed (all + * resources of all types matching previous filtering parameters will be + * candidates for substitution). + * @type string $target_json_path + * Required. This is a [JSONPath] + * (https://kubernetes.io/docs/reference/kubectl/jsonpath/) + * expression that matches specific fields of candidate + * resources and it operates as both a filtering parameter (resources that + * are not matched with this expression will not be candidates for + * substitution) as well as a field identifier (identifies exactly which + * fields out of the candidate resources will be modified). + * @type string $original_value_pattern + * (Filtering parameter) This is a [regular expression] + * (https://en.wikipedia.org/wiki/Regular_expression) + * that is compared against the fields matched by the target_json_path + * expression (and must also have passed the previous filters). + * Substitution will not be performed against fields whose + * value does not match this expression. If this field is NOT specified, + * then ALL fields matched by the target_json_path expression will undergo + * substitution. Note that an empty (e.g., "", rather than unspecified) + * value for for this field will only match empty fields. + * @type string $new_value + * This is the new value to set for any fields that pass the filtering and + * selection criteria. To remove a value from a Kubernetes resource, either + * leave this field unspecified, or set it to the empty string (""). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); + parent::__construct($data); + } + + /** + * (Filtering parameter) Any resource subject to substitution must be + * contained within one of the listed Kubernetes Namespace in the Backup. + * If this field is not provided, no namespace filtering will be performed + * (all resources in all Namespaces, including all cluster-scoped resources, + * will be candidates for substitution). + * To mix cluster-scoped and namespaced resources in the same rule, use an + * empty string ("") as one of the target namespaces. + * + * Generated from protobuf field repeated string target_namespaces = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetNamespaces() + { + return $this->target_namespaces; + } + + /** + * (Filtering parameter) Any resource subject to substitution must be + * contained within one of the listed Kubernetes Namespace in the Backup. + * If this field is not provided, no namespace filtering will be performed + * (all resources in all Namespaces, including all cluster-scoped resources, + * will be candidates for substitution). + * To mix cluster-scoped and namespaced resources in the same rule, use an + * empty string ("") as one of the target namespaces. + * + * Generated from protobuf field repeated string target_namespaces = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetNamespaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->target_namespaces = $arr; + + return $this; + } + + /** + * (Filtering parameter) Any resource subject to substitution must belong to + * one of the listed "types". + * If this field is not provided, no type filtering will be performed (all + * resources of all types matching previous filtering parameters will be + * candidates for substitution). + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetGroupKinds() + { + return $this->target_group_kinds; + } + + /** + * (Filtering parameter) Any resource subject to substitution must belong to + * one of the listed "types". + * If this field is not provided, no type filtering will be performed (all + * resources of all types matching previous filtering parameters will be + * candidates for substitution). + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2; + * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetGroupKinds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind::class); + $this->target_group_kinds = $arr; + + return $this; + } + + /** + * Required. This is a [JSONPath] + * (https://kubernetes.io/docs/reference/kubectl/jsonpath/) + * expression that matches specific fields of candidate + * resources and it operates as both a filtering parameter (resources that + * are not matched with this expression will not be candidates for + * substitution) as well as a field identifier (identifies exactly which + * fields out of the candidate resources will be modified). + * + * Generated from protobuf field string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetJsonPath() + { + return $this->target_json_path; + } + + /** + * Required. This is a [JSONPath] + * (https://kubernetes.io/docs/reference/kubectl/jsonpath/) + * expression that matches specific fields of candidate + * resources and it operates as both a filtering parameter (resources that + * are not matched with this expression will not be candidates for + * substitution) as well as a field identifier (identifies exactly which + * fields out of the candidate resources will be modified). + * + * Generated from protobuf field string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetJsonPath($var) + { + GPBUtil::checkString($var, True); + $this->target_json_path = $var; + + return $this; + } + + /** + * (Filtering parameter) This is a [regular expression] + * (https://en.wikipedia.org/wiki/Regular_expression) + * that is compared against the fields matched by the target_json_path + * expression (and must also have passed the previous filters). + * Substitution will not be performed against fields whose + * value does not match this expression. If this field is NOT specified, + * then ALL fields matched by the target_json_path expression will undergo + * substitution. Note that an empty (e.g., "", rather than unspecified) + * value for for this field will only match empty fields. + * + * Generated from protobuf field string original_value_pattern = 4; + * @return string + */ + public function getOriginalValuePattern() + { + return $this->original_value_pattern; + } + + /** + * (Filtering parameter) This is a [regular expression] + * (https://en.wikipedia.org/wiki/Regular_expression) + * that is compared against the fields matched by the target_json_path + * expression (and must also have passed the previous filters). + * Substitution will not be performed against fields whose + * value does not match this expression. If this field is NOT specified, + * then ALL fields matched by the target_json_path expression will undergo + * substitution. Note that an empty (e.g., "", rather than unspecified) + * value for for this field will only match empty fields. + * + * Generated from protobuf field string original_value_pattern = 4; + * @param string $var + * @return $this + */ + public function setOriginalValuePattern($var) + { + GPBUtil::checkString($var, True); + $this->original_value_pattern = $var; + + return $this; + } + + /** + * This is the new value to set for any fields that pass the filtering and + * selection criteria. To remove a value from a Kubernetes resource, either + * leave this field unspecified, or set it to the empty string (""). + * + * Generated from protobuf field string new_value = 5; + * @return string + */ + public function getNewValue() + { + return $this->new_value; + } + + /** + * This is the new value to set for any fields that pass the filtering and + * selection criteria. To remove a value from a Kubernetes resource, either + * leave this field unspecified, or set it to the empty string (""). + * + * Generated from protobuf field string new_value = 5; + * @param string $var + * @return $this + */ + public function setNewValue($var) + { + GPBUtil::checkString($var, True); + $this->new_value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SubstitutionRule::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_SubstitutionRule::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/VolumeDataRestorePolicy.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/VolumeDataRestorePolicy.php new file mode 100644 index 000000000000..26cc27e5aae1 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/VolumeDataRestorePolicy.php @@ -0,0 +1,77 @@ +google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy + */ +class VolumeDataRestorePolicy +{ + /** + * Unspecified (illegal). + * + * Generated from protobuf enum VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0; + */ + const VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0; + /** + * For each PVC to be restored, will create a new underlying volume (and PV) + * from the corresponding VolumeBackup contained within the Backup. + * + * Generated from protobuf enum RESTORE_VOLUME_DATA_FROM_BACKUP = 1; + */ + const RESTORE_VOLUME_DATA_FROM_BACKUP = 1; + /** + * For each PVC to be restored, attempt to reuse the original PV contained + * in the Backup (with its original underlying volume). Note that option + * is likely only usable when restoring a workload to its original cluster. + * + * Generated from protobuf enum REUSE_VOLUME_HANDLE_FROM_BACKUP = 2; + */ + const REUSE_VOLUME_HANDLE_FROM_BACKUP = 2; + /** + * For each PVC to be restored, PVCs will be created without any particular + * action to restore data. In this case, the normal Kubernetes provisioning + * logic would kick in, and this would likely result in either dynamically + * provisioning blank PVs or binding to statically provisioned PVs. + * + * Generated from protobuf enum NO_VOLUME_DATA_RESTORATION = 3; + */ + const NO_VOLUME_DATA_RESTORATION = 3; + + private static $valueToName = [ + self::VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED => 'VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED', + self::RESTORE_VOLUME_DATA_FROM_BACKUP => 'RESTORE_VOLUME_DATA_FROM_BACKUP', + self::REUSE_VOLUME_HANDLE_FROM_BACKUP => 'REUSE_VOLUME_HANDLE_FROM_BACKUP', + self::NO_VOLUME_DATA_RESTORATION => 'NO_VOLUME_DATA_RESTORATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VolumeDataRestorePolicy::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_VolumeDataRestorePolicy::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_ClusterResourceConflictPolicy.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_ClusterResourceConflictPolicy.php new file mode 100644 index 000000000000..0dfbb30724a9 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_ClusterResourceConflictPolicy.php @@ -0,0 +1,16 @@ +google.cloud.gkebackup.v1.RestorePlan + */ +class RestorePlan extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The full name of the RestorePlan resource. + * Format: projects/*/locations/*/restorePlans/*. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The timestamp when this RestorePlan 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 this RestorePlan resource was last + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User specified descriptive string for this RestorePlan. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Required. Immutable. A reference to the [BackupPlan][google.cloud.gkebackup.v1.BackupPlan] from which Backups may be used as the + * source for Restores created via this RestorePlan. + * Format: projects/*/locations/*/backupPlans/*. + * + * Generated from protobuf field string backup_plan = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $backup_plan = ''; + /** + * Required. Immutable. The target cluster into which Restores created via this RestorePlan + * will restore data. NOTE: the cluster's region must be the same as the + * RestorePlan. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * + * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $cluster = ''; + /** + * Required. Configuration of Restores created via this RestorePlan. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $restore_config = null; + /** + * A set of custom labels supplied by user. + * + * Generated from protobuf field map labels = 9; + */ + private $labels; + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a restore from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform restore updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetRestorePlan`, + * and systems are expected to put that etag in the request to + * `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change + * will be applied to the same version of the resource. + * + * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The full name of the RestorePlan resource. + * Format: projects/*/locations/*/restorePlans/*. + * @type string $uid + * Output only. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when this RestorePlan resource was + * created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when this RestorePlan resource was last + * updated. + * @type string $description + * User specified descriptive string for this RestorePlan. + * @type string $backup_plan + * Required. Immutable. A reference to the [BackupPlan][google.cloud.gkebackup.v1.BackupPlan] from which Backups may be used as the + * source for Restores created via this RestorePlan. + * Format: projects/*/locations/*/backupPlans/*. + * @type string $cluster + * Required. Immutable. The target cluster into which Restores created via this RestorePlan + * will restore data. NOTE: the cluster's region must be the same as the + * RestorePlan. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * @type \Google\Cloud\GkeBackup\V1\RestoreConfig $restore_config + * Required. Configuration of Restores created via this RestorePlan. + * @type array|\Google\Protobuf\Internal\MapField $labels + * A set of custom labels supplied by user. + * @type string $etag + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a restore from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform restore updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetRestorePlan`, + * and systems are expected to put that etag in the request to + * `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change + * will be applied to the same version of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\RestorePlan::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The full name of the RestorePlan resource. + * Format: projects/*/locations/*/restorePlans/*. + * + * 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 RestorePlan resource. + * Format: projects/*/locations/*/restorePlans/*. + * + * 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. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * + * Generated from protobuf field string uid = 2 [(.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 timestamp when this RestorePlan 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 this RestorePlan 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 this RestorePlan resource 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 this RestorePlan resource 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; + } + + /** + * User specified descriptive string for this RestorePlan. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User specified descriptive string for this RestorePlan. + * + * 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. Immutable. A reference to the [BackupPlan][google.cloud.gkebackup.v1.BackupPlan] from which Backups may be used as the + * source for Restores created via this RestorePlan. + * Format: projects/*/locations/*/backupPlans/*. + * + * Generated from protobuf field string backup_plan = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getBackupPlan() + { + return $this->backup_plan; + } + + /** + * Required. Immutable. A reference to the [BackupPlan][google.cloud.gkebackup.v1.BackupPlan] from which Backups may be used as the + * source for Restores created via this RestorePlan. + * Format: projects/*/locations/*/backupPlans/*. + * + * Generated from protobuf field string backup_plan = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBackupPlan($var) + { + GPBUtil::checkString($var, True); + $this->backup_plan = $var; + + return $this; + } + + /** + * Required. Immutable. The target cluster into which Restores created via this RestorePlan + * will restore data. NOTE: the cluster's region must be the same as the + * RestorePlan. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * + * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * Required. Immutable. The target cluster into which Restores created via this RestorePlan + * will restore data. NOTE: the cluster's region must be the same as the + * RestorePlan. + * Valid formats: + * - projects/*/locations/*/clusters/* + * - projects/*/zones/*/clusters/* + * + * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkString($var, True); + $this->cluster = $var; + + return $this; + } + + /** + * Required. Configuration of Restores created via this RestorePlan. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeBackup\V1\RestoreConfig|null + */ + public function getRestoreConfig() + { + return $this->restore_config; + } + + public function hasRestoreConfig() + { + return isset($this->restore_config); + } + + public function clearRestoreConfig() + { + unset($this->restore_config); + } + + /** + * Required. Configuration of Restores created via this RestorePlan. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeBackup\V1\RestoreConfig $var + * @return $this + */ + public function setRestoreConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig::class); + $this->restore_config = $var; + + return $this; + } + + /** + * A set of custom labels supplied by user. + * + * Generated from protobuf field map labels = 9; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * A set of custom labels supplied by user. + * + * 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. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a restore from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform restore updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetRestorePlan`, + * and systems are expected to put that etag in the request to + * `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change + * will be applied to the same version of the resource. + * + * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a restore from overwriting each other. + * It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform restore updates in order to avoid + * race conditions: An `etag` is returned in the response to `GetRestorePlan`, + * and systems are expected to put that etag in the request to + * `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change + * will be applied to the same version of the resource. + * + * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore_State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore_State.php new file mode 100644 index 000000000000..4ee0fe727249 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore_State.php @@ -0,0 +1,16 @@ +google.cloud.gkebackup.v1.UpdateBackupPlanRequest + */ +class UpdateBackupPlanRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A new version of the BackupPlan resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_plan = null; + /** + * This is used to specify the fields to be overwritten in the + * BackupPlan targeted for update. The values for each of these + * updated fields will be taken from the `backup_plan` provided + * with this request. Field names are relative to the root of the resource + * (e.g., `description`, `backup_config.include_volume_data`, etc.) + * If no `update_mask` is provided, all fields in `backup_plan` will be + * written to the target BackupPlan resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored + * and are not used to update the target BackupPlan. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeBackup\V1\BackupPlan $backup_plan + * Required. A new version of the BackupPlan resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * @type \Google\Protobuf\FieldMask $update_mask + * This is used to specify the fields to be overwritten in the + * BackupPlan targeted for update. The values for each of these + * updated fields will be taken from the `backup_plan` provided + * with this request. Field names are relative to the root of the resource + * (e.g., `description`, `backup_config.include_volume_data`, etc.) + * If no `update_mask` is provided, all fields in `backup_plan` will be + * written to the target BackupPlan resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored + * and are not used to update the target BackupPlan. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. A new version of the BackupPlan resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeBackup\V1\BackupPlan|null + */ + public function getBackupPlan() + { + return $this->backup_plan; + } + + public function hasBackupPlan() + { + return isset($this->backup_plan); + } + + public function clearBackupPlan() + { + unset($this->backup_plan); + } + + /** + * Required. A new version of the BackupPlan resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeBackup\V1\BackupPlan $var + * @return $this + */ + public function setBackupPlan($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\BackupPlan::class); + $this->backup_plan = $var; + + return $this; + } + + /** + * This is used to specify the fields to be overwritten in the + * BackupPlan targeted for update. The values for each of these + * updated fields will be taken from the `backup_plan` provided + * with this request. Field names are relative to the root of the resource + * (e.g., `description`, `backup_config.include_volume_data`, etc.) + * If no `update_mask` is provided, all fields in `backup_plan` will be + * written to the target BackupPlan resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored + * and are not used to update the target BackupPlan. + * + * 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); + } + + /** + * This is used to specify the fields to be overwritten in the + * BackupPlan targeted for update. The values for each of these + * updated fields will be taken from the `backup_plan` provided + * with this request. Field names are relative to the root of the resource + * (e.g., `description`, `backup_config.include_volume_data`, etc.) + * If no `update_mask` is provided, all fields in `backup_plan` will be + * written to the target BackupPlan resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored + * and are not used to update the target BackupPlan. + * + * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupRequest.php new file mode 100644 index 000000000000..3be6779fd4d0 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupRequest.php @@ -0,0 +1,153 @@ +google.cloud.gkebackup.v1.UpdateBackupRequest + */ +class UpdateBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A new version of the Backup resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup = null; + /** + * This is used to specify the fields to be overwritten in the + * Backup targeted for update. The values for each of these + * updated fields will be taken from the `backup_plan` provided + * with this request. Field names are relative to the root of the resource. + * If no `update_mask` is provided, all fields in `backup` will be + * written to the target Backup resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored + * and are not used to update the target Backup. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeBackup\V1\Backup $backup + * Required. A new version of the Backup resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * @type \Google\Protobuf\FieldMask $update_mask + * This is used to specify the fields to be overwritten in the + * Backup targeted for update. The values for each of these + * updated fields will be taken from the `backup_plan` provided + * with this request. Field names are relative to the root of the resource. + * If no `update_mask` is provided, all fields in `backup` will be + * written to the target Backup resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored + * and are not used to update the target Backup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. A new version of the Backup resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeBackup\V1\Backup|null + */ + public function getBackup() + { + return $this->backup; + } + + public function hasBackup() + { + return isset($this->backup); + } + + public function clearBackup() + { + unset($this->backup); + } + + /** + * Required. A new version of the Backup resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeBackup\V1\Backup $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Backup::class); + $this->backup = $var; + + return $this; + } + + /** + * This is used to specify the fields to be overwritten in the + * Backup targeted for update. The values for each of these + * updated fields will be taken from the `backup_plan` provided + * with this request. Field names are relative to the root of the resource. + * If no `update_mask` is provided, all fields in `backup` will be + * written to the target Backup resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored + * and are not used to update the target Backup. + * + * 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); + } + + /** + * This is used to specify the fields to be overwritten in the + * Backup targeted for update. The values for each of these + * updated fields will be taken from the `backup_plan` provided + * with this request. Field names are relative to the root of the resource. + * If no `update_mask` is provided, all fields in `backup` will be + * written to the target Backup resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored + * and are not used to update the target Backup. + * + * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestorePlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestorePlanRequest.php new file mode 100644 index 000000000000..3d9fd93a2f81 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestorePlanRequest.php @@ -0,0 +1,153 @@ +google.cloud.gkebackup.v1.UpdateRestorePlanRequest + */ +class UpdateRestorePlanRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A new version of the RestorePlan resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $restore_plan = null; + /** + * This is used to specify the fields to be overwritten in the + * RestorePlan targeted for update. The values for each of these + * updated fields will be taken from the `restore_plan` provided + * with this request. Field names are relative to the root of the resource. + * If no `update_mask` is provided, all fields in `restore_plan` will be + * written to the target RestorePlan resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored + * and are not used to update the target RestorePlan. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeBackup\V1\RestorePlan $restore_plan + * Required. A new version of the RestorePlan resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * @type \Google\Protobuf\FieldMask $update_mask + * This is used to specify the fields to be overwritten in the + * RestorePlan targeted for update. The values for each of these + * updated fields will be taken from the `restore_plan` provided + * with this request. Field names are relative to the root of the resource. + * If no `update_mask` is provided, all fields in `restore_plan` will be + * written to the target RestorePlan resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored + * and are not used to update the target RestorePlan. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. A new version of the RestorePlan resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeBackup\V1\RestorePlan|null + */ + public function getRestorePlan() + { + return $this->restore_plan; + } + + public function hasRestorePlan() + { + return isset($this->restore_plan); + } + + public function clearRestorePlan() + { + unset($this->restore_plan); + } + + /** + * Required. A new version of the RestorePlan resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeBackup\V1\RestorePlan $var + * @return $this + */ + public function setRestorePlan($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestorePlan::class); + $this->restore_plan = $var; + + return $this; + } + + /** + * This is used to specify the fields to be overwritten in the + * RestorePlan targeted for update. The values for each of these + * updated fields will be taken from the `restore_plan` provided + * with this request. Field names are relative to the root of the resource. + * If no `update_mask` is provided, all fields in `restore_plan` will be + * written to the target RestorePlan resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored + * and are not used to update the target RestorePlan. + * + * 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); + } + + /** + * This is used to specify the fields to be overwritten in the + * RestorePlan targeted for update. The values for each of these + * updated fields will be taken from the `restore_plan` provided + * with this request. Field names are relative to the root of the resource. + * If no `update_mask` is provided, all fields in `restore_plan` will be + * written to the target RestorePlan resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored + * and are not used to update the target RestorePlan. + * + * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestoreRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestoreRequest.php new file mode 100644 index 000000000000..df700b76b63f --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestoreRequest.php @@ -0,0 +1,153 @@ +google.cloud.gkebackup.v1.UpdateRestoreRequest + */ +class UpdateRestoreRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A new version of the Restore resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $restore = null; + /** + * This is used to specify the fields to be overwritten in the + * Restore targeted for update. The values for each of these + * updated fields will be taken from the `restore` provided + * with this request. Field names are relative to the root of the resource. + * If no `update_mask` is provided, all fields in `restore` will be + * written to the target Restore resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored + * and are not used to update the target Restore. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeBackup\V1\Restore $restore + * Required. A new version of the Restore resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * @type \Google\Protobuf\FieldMask $update_mask + * This is used to specify the fields to be overwritten in the + * Restore targeted for update. The values for each of these + * updated fields will be taken from the `restore` provided + * with this request. Field names are relative to the root of the resource. + * If no `update_mask` is provided, all fields in `restore` will be + * written to the target Restore resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored + * and are not used to update the target Restore. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. A new version of the Restore resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeBackup\V1\Restore|null + */ + public function getRestore() + { + return $this->restore; + } + + public function hasRestore() + { + return isset($this->restore); + } + + public function clearRestore() + { + unset($this->restore); + } + + /** + * Required. A new version of the Restore resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeBackup\V1\Restore $var + * @return $this + */ + public function setRestore($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Restore::class); + $this->restore = $var; + + return $this; + } + + /** + * This is used to specify the fields to be overwritten in the + * Restore targeted for update. The values for each of these + * updated fields will be taken from the `restore` provided + * with this request. Field names are relative to the root of the resource. + * If no `update_mask` is provided, all fields in `restore` will be + * written to the target Restore resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored + * and are not used to update the target Restore. + * + * 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); + } + + /** + * This is used to specify the fields to be overwritten in the + * Restore targeted for update. The values for each of these + * updated fields will be taken from the `restore` provided + * with this request. Field names are relative to the root of the resource. + * If no `update_mask` is provided, all fields in `restore` will be + * written to the target Restore resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored + * and are not used to update the target Restore. + * + * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup.php new file mode 100644 index 000000000000..63a4cb4fab60 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup.php @@ -0,0 +1,578 @@ +google.cloud.gkebackup.v1.VolumeBackup + */ +class VolumeBackup extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The full name of the VolumeBackup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The timestamp when this VolumeBackup 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 this VolumeBackup resource 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. A reference to the source Kubernetes PVC from which this VolumeBackup + * was created. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName source_pvc = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_pvc = null; + /** + * Output only. A storage system-specific opaque handle to the underlying volume backup. + * + * Generated from protobuf field string volume_backup_handle = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $volume_backup_handle = ''; + /** + * Output only. The format used for the volume backup. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormat format = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $format = 0; + /** + * Output only. The aggregate size of the underlying artifacts associated with this + * VolumeBackup in the backup storage. This may change over time when + * multiple backups of the same volume share the same backup storage + * location. In particular, this is likely to increase in size when + * the immediately preceding backup of the same volume is deleted. + * + * Generated from protobuf field int64 storage_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $storage_bytes = 0; + /** + * Output only. The minimum size of the disk to which this VolumeBackup can be restored. + * + * Generated from protobuf field int64 disk_size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $disk_size_bytes = 0; + /** + * Output only. The timestamp when the associated underlying volume backup + * operation completed. + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $complete_time = null; + /** + * Output only. The current state of this VolumeBackup. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. A human readable message explaining why the VolumeBackup is in its current + * state. + * + * Generated from protobuf field string state_message = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_message = ''; + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a volume backup from overwriting each + * other. It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform volume backup updates in order to avoid + * race conditions. + * + * Generated from protobuf field string etag = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The full name of the VolumeBackup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. + * @type string $uid + * Output only. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when this VolumeBackup resource was + * created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when this VolumeBackup resource was last + * updated. + * @type \Google\Cloud\GkeBackup\V1\NamespacedName $source_pvc + * Output only. A reference to the source Kubernetes PVC from which this VolumeBackup + * was created. + * @type string $volume_backup_handle + * Output only. A storage system-specific opaque handle to the underlying volume backup. + * @type int $format + * Output only. The format used for the volume backup. + * @type int|string $storage_bytes + * Output only. The aggregate size of the underlying artifacts associated with this + * VolumeBackup in the backup storage. This may change over time when + * multiple backups of the same volume share the same backup storage + * location. In particular, this is likely to increase in size when + * the immediately preceding backup of the same volume is deleted. + * @type int|string $disk_size_bytes + * Output only. The minimum size of the disk to which this VolumeBackup can be restored. + * @type \Google\Protobuf\Timestamp $complete_time + * Output only. The timestamp when the associated underlying volume backup + * operation completed. + * @type int $state + * Output only. The current state of this VolumeBackup. + * @type string $state_message + * Output only. A human readable message explaining why the VolumeBackup is in its current + * state. + * @type string $etag + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a volume backup from overwriting each + * other. It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform volume backup updates in order to avoid + * race conditions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The full name of the VolumeBackup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. + * + * 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 VolumeBackup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. + * + * 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. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * + * Generated from protobuf field string uid = 2 [(.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 timestamp when this VolumeBackup 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 this VolumeBackup 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 this VolumeBackup resource 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 this VolumeBackup resource 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. A reference to the source Kubernetes PVC from which this VolumeBackup + * was created. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName source_pvc = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeBackup\V1\NamespacedName|null + */ + public function getSourcePvc() + { + return $this->source_pvc; + } + + public function hasSourcePvc() + { + return isset($this->source_pvc); + } + + public function clearSourcePvc() + { + unset($this->source_pvc); + } + + /** + * Output only. A reference to the source Kubernetes PVC from which this VolumeBackup + * was created. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName source_pvc = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeBackup\V1\NamespacedName $var + * @return $this + */ + public function setSourcePvc($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedName::class); + $this->source_pvc = $var; + + return $this; + } + + /** + * Output only. A storage system-specific opaque handle to the underlying volume backup. + * + * Generated from protobuf field string volume_backup_handle = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVolumeBackupHandle() + { + return $this->volume_backup_handle; + } + + /** + * Output only. A storage system-specific opaque handle to the underlying volume backup. + * + * Generated from protobuf field string volume_backup_handle = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVolumeBackupHandle($var) + { + GPBUtil::checkString($var, True); + $this->volume_backup_handle = $var; + + return $this; + } + + /** + * Output only. The format used for the volume backup. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormat format = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFormat() + { + return $this->format; + } + + /** + * Output only. The format used for the volume backup. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormat format = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\VolumeBackup\VolumeBackupFormat::class); + $this->format = $var; + + return $this; + } + + /** + * Output only. The aggregate size of the underlying artifacts associated with this + * VolumeBackup in the backup storage. This may change over time when + * multiple backups of the same volume share the same backup storage + * location. In particular, this is likely to increase in size when + * the immediately preceding backup of the same volume is deleted. + * + * Generated from protobuf field int64 storage_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getStorageBytes() + { + return $this->storage_bytes; + } + + /** + * Output only. The aggregate size of the underlying artifacts associated with this + * VolumeBackup in the backup storage. This may change over time when + * multiple backups of the same volume share the same backup storage + * location. In particular, this is likely to increase in size when + * the immediately preceding backup of the same volume is deleted. + * + * Generated from protobuf field int64 storage_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setStorageBytes($var) + { + GPBUtil::checkInt64($var); + $this->storage_bytes = $var; + + return $this; + } + + /** + * Output only. The minimum size of the disk to which this VolumeBackup can be restored. + * + * Generated from protobuf field int64 disk_size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getDiskSizeBytes() + { + return $this->disk_size_bytes; + } + + /** + * Output only. The minimum size of the disk to which this VolumeBackup can be restored. + * + * Generated from protobuf field int64 disk_size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setDiskSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->disk_size_bytes = $var; + + return $this; + } + + /** + * Output only. The timestamp when the associated underlying volume backup + * operation completed. + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 10 [(.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 associated underlying volume backup + * operation completed. + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 10 [(.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 current state of this VolumeBackup. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of this VolumeBackup. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\VolumeBackup\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. A human readable message explaining why the VolumeBackup is in its current + * state. + * + * Generated from protobuf field string state_message = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateMessage() + { + return $this->state_message; + } + + /** + * Output only. A human readable message explaining why the VolumeBackup is in its current + * state. + * + * Generated from protobuf field string state_message = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateMessage($var) + { + GPBUtil::checkString($var, True); + $this->state_message = $var; + + return $this; + } + + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a volume backup from overwriting each + * other. It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform volume backup updates in order to avoid + * race conditions. + * + * Generated from protobuf field string etag = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a volume backup from overwriting each + * other. It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform volume backup updates in order to avoid + * race conditions. + * + * Generated from protobuf field string etag = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/State.php new file mode 100644 index 000000000000..fbe20d6856c2 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/State.php @@ -0,0 +1,98 @@ +google.cloud.gkebackup.v1.VolumeBackup.State + */ +class State +{ + /** + * This is an illegal state and should not be encountered. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * A volume for the backup was identified and backup process is about to + * start. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The volume backup operation has begun and is in the initial "snapshot" + * phase of the process. Any defined ProtectedApplication "pre" hooks will + * be executed before entering this state and "post" hooks will be executed + * upon leaving this state. + * + * Generated from protobuf enum SNAPSHOTTING = 2; + */ + const SNAPSHOTTING = 2; + /** + * The snapshot phase of the volume backup operation has completed and + * the snapshot is now being uploaded to backup storage. + * + * Generated from protobuf enum UPLOADING = 3; + */ + const UPLOADING = 3; + /** + * The volume backup operation has completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + /** + * The volume backup operation has failed. + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + /** + * This VolumeBackup resource (and its associated artifacts) is in the + * process of being deleted. + * + * Generated from protobuf enum DELETING = 6; + */ + const DELETING = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::SNAPSHOTTING => 'SNAPSHOTTING', + self::UPLOADING => 'UPLOADING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + 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\GkeBackup\V1\VolumeBackup_State::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/VolumeBackupFormat.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/VolumeBackupFormat.php new file mode 100644 index 000000000000..de6484fc4519 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/VolumeBackupFormat.php @@ -0,0 +1,57 @@ +google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormat + */ +class VolumeBackupFormat +{ + /** + * Default value, not specified. + * + * Generated from protobuf enum VOLUME_BACKUP_FORMAT_UNSPECIFIED = 0; + */ + const VOLUME_BACKUP_FORMAT_UNSPECIFIED = 0; + /** + * Compute Engine Persistent Disk snapshot based volume backup. + * + * Generated from protobuf enum GCE_PERSISTENT_DISK = 1; + */ + const GCE_PERSISTENT_DISK = 1; + + private static $valueToName = [ + self::VOLUME_BACKUP_FORMAT_UNSPECIFIED => 'VOLUME_BACKUP_FORMAT_UNSPECIFIED', + self::GCE_PERSISTENT_DISK => 'GCE_PERSISTENT_DISK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VolumeBackupFormat::class, \Google\Cloud\GkeBackup\V1\VolumeBackup_VolumeBackupFormat::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup_State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup_State.php new file mode 100644 index 000000000000..6f93d4cd336d --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup_State.php @@ -0,0 +1,16 @@ +google.cloud.gkebackup.v1.VolumeRestore + */ +class VolumeRestore extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Full name of the VolumeRestore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The timestamp when this VolumeRestore 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 this VolumeRestore resource 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 full name of the VolumeBackup from which the volume will be restored. + * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. + * + * Generated from protobuf field string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $volume_backup = ''; + /** + * Output only. The reference to the target Kubernetes PVC to be restored. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target_pvc = null; + /** + * Output only. A storage system-specific opaque handler to the underlying volume created + * for the target PVC from the volume backup. + * + * Generated from protobuf field string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $volume_handle = ''; + /** + * Output only. The type of volume provisioned + * + * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $volume_type = 0; + /** + * Output only. The timestamp when the associated underlying volume + * restoration completed. + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $complete_time = null; + /** + * Output only. The current state of this VolumeRestore. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. A human readable message explaining why the VolumeRestore is in its + * current state. + * + * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_message = ''; + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a volume restore from overwriting each + * other. It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform volume restore updates in order to avoid + * race conditions. + * + * Generated from protobuf field string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Full name of the VolumeRestore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*. + * @type string $uid + * Output only. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when this VolumeRestore resource was + * created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when this VolumeRestore resource was last + * updated. + * @type string $volume_backup + * Output only. The full name of the VolumeBackup from which the volume will be restored. + * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. + * @type \Google\Cloud\GkeBackup\V1\NamespacedName $target_pvc + * Output only. The reference to the target Kubernetes PVC to be restored. + * @type string $volume_handle + * Output only. A storage system-specific opaque handler to the underlying volume created + * for the target PVC from the volume backup. + * @type int $volume_type + * Output only. The type of volume provisioned + * @type \Google\Protobuf\Timestamp $complete_time + * Output only. The timestamp when the associated underlying volume + * restoration completed. + * @type int $state + * Output only. The current state of this VolumeRestore. + * @type string $state_message + * Output only. A human readable message explaining why the VolumeRestore is in its + * current state. + * @type string $etag + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a volume restore from overwriting each + * other. It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform volume restore updates in order to avoid + * race conditions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Full name of the VolumeRestore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Full name of the VolumeRestore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*. + * + * 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. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server generated global unique identifier of + * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + * + * Generated from protobuf field string uid = 2 [(.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 timestamp when this VolumeRestore 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 this VolumeRestore 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 this VolumeRestore resource 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 this VolumeRestore resource 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 full name of the VolumeBackup from which the volume will be restored. + * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. + * + * Generated from protobuf field string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVolumeBackup() + { + return $this->volume_backup; + } + + /** + * Output only. The full name of the VolumeBackup from which the volume will be restored. + * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. + * + * Generated from protobuf field string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVolumeBackup($var) + { + GPBUtil::checkString($var, True); + $this->volume_backup = $var; + + return $this; + } + + /** + * Output only. The reference to the target Kubernetes PVC to be restored. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeBackup\V1\NamespacedName|null + */ + public function getTargetPvc() + { + return $this->target_pvc; + } + + public function hasTargetPvc() + { + return isset($this->target_pvc); + } + + public function clearTargetPvc() + { + unset($this->target_pvc); + } + + /** + * Output only. The reference to the target Kubernetes PVC to be restored. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeBackup\V1\NamespacedName $var + * @return $this + */ + public function setTargetPvc($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedName::class); + $this->target_pvc = $var; + + return $this; + } + + /** + * Output only. A storage system-specific opaque handler to the underlying volume created + * for the target PVC from the volume backup. + * + * Generated from protobuf field string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVolumeHandle() + { + return $this->volume_handle; + } + + /** + * Output only. A storage system-specific opaque handler to the underlying volume created + * for the target PVC from the volume backup. + * + * Generated from protobuf field string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVolumeHandle($var) + { + GPBUtil::checkString($var, True); + $this->volume_handle = $var; + + return $this; + } + + /** + * Output only. The type of volume provisioned + * + * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getVolumeType() + { + return $this->volume_type; + } + + /** + * Output only. The type of volume provisioned + * + * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setVolumeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\VolumeRestore\VolumeType::class); + $this->volume_type = $var; + + return $this; + } + + /** + * Output only. The timestamp when the associated underlying volume + * restoration completed. + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 9 [(.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 associated underlying volume + * restoration completed. + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 9 [(.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 current state of this VolumeRestore. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of this VolumeRestore. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\VolumeRestore\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. A human readable message explaining why the VolumeRestore is in its + * current state. + * + * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateMessage() + { + return $this->state_message; + } + + /** + * Output only. A human readable message explaining why the VolumeRestore is in its + * current state. + * + * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateMessage($var) + { + GPBUtil::checkString($var, True); + $this->state_message = $var; + + return $this; + } + + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a volume restore from overwriting each + * other. It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform volume restore updates in order to avoid + * race conditions. + * + * Generated from protobuf field string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Output only. `etag` is used for optimistic concurrency control as a way to help + * prevent simultaneous updates of a volume restore from overwriting each + * other. It is strongly suggested that systems make use of the `etag` in the + * read-modify-write cycle to perform volume restore updates in order to avoid + * race conditions. + * + * Generated from protobuf field string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/State.php new file mode 100644 index 000000000000..2528f29c845a --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/State.php @@ -0,0 +1,86 @@ +google.cloud.gkebackup.v1.VolumeRestore.State + */ +class State +{ + /** + * This is an illegal state and should not be encountered. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * A volume for the restore was identified and restore process is about to + * start. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The volume is currently being restored. + * + * Generated from protobuf enum RESTORING = 2; + */ + const RESTORING = 2; + /** + * The volume has been successfully restored. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * The volume restoration process failed. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * This VolumeRestore resource is in the process of being deleted. + * + * Generated from protobuf enum DELETING = 5; + */ + const DELETING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::RESTORING => 'RESTORING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + 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\GkeBackup\V1\VolumeRestore_State::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/VolumeType.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/VolumeType.php new file mode 100644 index 000000000000..460afb38ce7f --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/VolumeType.php @@ -0,0 +1,57 @@ +google.cloud.gkebackup.v1.VolumeRestore.VolumeType + */ +class VolumeType +{ + /** + * Default + * + * Generated from protobuf enum VOLUME_TYPE_UNSPECIFIED = 0; + */ + const VOLUME_TYPE_UNSPECIFIED = 0; + /** + * Compute Engine Persistent Disk volume + * + * Generated from protobuf enum GCE_PERSISTENT_DISK = 1; + */ + const GCE_PERSISTENT_DISK = 1; + + private static $valueToName = [ + self::VOLUME_TYPE_UNSPECIFIED => 'VOLUME_TYPE_UNSPECIFIED', + self::GCE_PERSISTENT_DISK => 'GCE_PERSISTENT_DISK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VolumeType::class, \Google\Cloud\GkeBackup\V1\VolumeRestore_VolumeType::class); + diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore_State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore_State.php new file mode 100644 index 000000000000..1ebbb83e2801 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore_State.php @@ -0,0 +1,16 @@ +createBackup($formattedParent); + $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 = BackupForGKEClient::backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + + create_backup_sample($formattedParent); +} +// [END gkebackup_v1_generated_BackupForGKE_CreateBackup_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup_plan.php new file mode 100644 index 000000000000..b0baac6c9449 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup_plan.php @@ -0,0 +1,107 @@ +setCluster($formattedBackupPlanCluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $backupForGKEClient->createBackupPlan($formattedParent, $backupPlan, $backupPlanId); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BackupPlan $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = BackupForGKEClient::locationName('[PROJECT]', '[LOCATION]'); + $formattedBackupPlanCluster = BackupForGKEClient::clusterName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]' + ); + $backupPlanId = '[BACKUP_PLAN_ID]'; + + create_backup_plan_sample($formattedParent, $formattedBackupPlanCluster, $backupPlanId); +} +// [END gkebackup_v1_generated_BackupForGKE_CreateBackupPlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore.php new file mode 100644 index 000000000000..f6ecc8047089 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore.php @@ -0,0 +1,106 @@ +setBackup($formattedRestoreBackup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $backupForGKEClient->createRestore($formattedParent, $restore, $restoreId); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Restore $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = BackupForGKEClient::restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + $formattedRestoreBackup = BackupForGKEClient::backupName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_PLAN]', + '[BACKUP]' + ); + $restoreId = '[RESTORE_ID]'; + + create_restore_sample($formattedParent, $formattedRestoreBackup, $restoreId); +} +// [END gkebackup_v1_generated_BackupForGKE_CreateRestore_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore_plan.php new file mode 100644 index 000000000000..b79567c5c12d --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore_plan.php @@ -0,0 +1,127 @@ +setBackupPlan($formattedRestorePlanBackupPlan) + ->setCluster($formattedRestorePlanCluster) + ->setRestoreConfig($restorePlanRestoreConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $backupForGKEClient->createRestorePlan($formattedParent, $restorePlan, $restorePlanId); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RestorePlan $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = BackupForGKEClient::locationName('[PROJECT]', '[LOCATION]'); + $formattedRestorePlanBackupPlan = BackupForGKEClient::backupPlanName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_PLAN]' + ); + $formattedRestorePlanCluster = BackupForGKEClient::clusterName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]' + ); + $restorePlanId = '[RESTORE_PLAN_ID]'; + + create_restore_plan_sample( + $formattedParent, + $formattedRestorePlanBackupPlan, + $formattedRestorePlanCluster, + $restorePlanId + ); +} +// [END gkebackup_v1_generated_BackupForGKE_CreateRestorePlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup.php new file mode 100644 index 000000000000..2f6fedf85543 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup.php @@ -0,0 +1,81 @@ +deleteBackup($formattedName); + $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 = BackupForGKEClient::backupName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_PLAN]', + '[BACKUP]' + ); + + delete_backup_sample($formattedName); +} +// [END gkebackup_v1_generated_BackupForGKE_DeleteBackup_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup_plan.php new file mode 100644 index 000000000000..5d67bfa80ced --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup_plan.php @@ -0,0 +1,76 @@ +deleteBackupPlan($formattedName); + $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 = BackupForGKEClient::backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + + delete_backup_plan_sample($formattedName); +} +// [END gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore.php new file mode 100644 index 000000000000..2cdf657bdb04 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore.php @@ -0,0 +1,81 @@ +deleteRestore($formattedName); + $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 = BackupForGKEClient::restoreName( + '[PROJECT]', + '[LOCATION]', + '[RESTORE_PLAN]', + '[RESTORE]' + ); + + delete_restore_sample($formattedName); +} +// [END gkebackup_v1_generated_BackupForGKE_DeleteRestore_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore_plan.php new file mode 100644 index 000000000000..89546b26719b --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore_plan.php @@ -0,0 +1,76 @@ +deleteRestorePlan($formattedName); + $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 = BackupForGKEClient::restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + + delete_restore_plan_sample($formattedName); +} +// [END gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup.php new file mode 100644 index 000000000000..e751abe43b0b --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup.php @@ -0,0 +1,72 @@ +getBackup($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = BackupForGKEClient::backupName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_PLAN]', + '[BACKUP]' + ); + + get_backup_sample($formattedName); +} +// [END gkebackup_v1_generated_BackupForGKE_GetBackup_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup_plan.php new file mode 100644 index 000000000000..6a665f164113 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup_plan.php @@ -0,0 +1,67 @@ +getBackupPlan($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = BackupForGKEClient::backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + + get_backup_plan_sample($formattedName); +} +// [END gkebackup_v1_generated_BackupForGKE_GetBackupPlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore.php new file mode 100644 index 000000000000..3f2c1ec79699 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore.php @@ -0,0 +1,72 @@ +getRestore($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = BackupForGKEClient::restoreName( + '[PROJECT]', + '[LOCATION]', + '[RESTORE_PLAN]', + '[RESTORE]' + ); + + get_restore_sample($formattedName); +} +// [END gkebackup_v1_generated_BackupForGKE_GetRestore_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore_plan.php new file mode 100644 index 000000000000..a4f9183e73f0 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore_plan.php @@ -0,0 +1,67 @@ +getRestorePlan($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = BackupForGKEClient::restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + + get_restore_plan_sample($formattedName); +} +// [END gkebackup_v1_generated_BackupForGKE_GetRestorePlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_backup.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_backup.php new file mode 100644 index 000000000000..47392af0f84c --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_backup.php @@ -0,0 +1,73 @@ +getVolumeBackup($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = BackupForGKEClient::volumeBackupName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_PLAN]', + '[BACKUP]', + '[VOLUME_BACKUP]' + ); + + get_volume_backup_sample($formattedName); +} +// [END gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_restore.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_restore.php new file mode 100644 index 000000000000..31724bcb0eea --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_restore.php @@ -0,0 +1,73 @@ +getVolumeRestore($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = BackupForGKEClient::volumeRestoreName( + '[PROJECT]', + '[LOCATION]', + '[RESTORE_PLAN]', + '[RESTORE]', + '[VOLUME_RESTORE]' + ); + + get_volume_restore_sample($formattedName); +} +// [END gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backup_plans.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backup_plans.php new file mode 100644 index 000000000000..8f75e078ed52 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backup_plans.php @@ -0,0 +1,72 @@ +listBackupPlans($formattedParent); + + /** @var BackupPlan $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 = BackupForGKEClient::locationName('[PROJECT]', '[LOCATION]'); + + list_backup_plans_sample($formattedParent); +} +// [END gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backups.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backups.php new file mode 100644 index 000000000000..30d808ad2913 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backups.php @@ -0,0 +1,72 @@ +listBackups($formattedParent); + + /** @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 = BackupForGKEClient::backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + + list_backups_sample($formattedParent); +} +// [END gkebackup_v1_generated_BackupForGKE_ListBackups_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restore_plans.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restore_plans.php new file mode 100644 index 000000000000..4dc9ab39c087 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restore_plans.php @@ -0,0 +1,72 @@ +listRestorePlans($formattedParent); + + /** @var RestorePlan $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 = BackupForGKEClient::locationName('[PROJECT]', '[LOCATION]'); + + list_restore_plans_sample($formattedParent); +} +// [END gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restores.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restores.php new file mode 100644 index 000000000000..892677bfe51b --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restores.php @@ -0,0 +1,72 @@ +listRestores($formattedParent); + + /** @var Restore $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 = BackupForGKEClient::restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + + list_restores_sample($formattedParent); +} +// [END gkebackup_v1_generated_BackupForGKE_ListRestores_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_backups.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_backups.php new file mode 100644 index 000000000000..5cd73077222e --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_backups.php @@ -0,0 +1,77 @@ +listVolumeBackups($formattedParent); + + /** @var VolumeBackup $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 = BackupForGKEClient::backupName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_PLAN]', + '[BACKUP]' + ); + + list_volume_backups_sample($formattedParent); +} +// [END gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_restores.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_restores.php new file mode 100644 index 000000000000..565cb026b725 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_restores.php @@ -0,0 +1,77 @@ +listVolumeRestores($formattedParent); + + /** @var VolumeRestore $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 = BackupForGKEClient::restoreName( + '[PROJECT]', + '[LOCATION]', + '[RESTORE_PLAN]', + '[RESTORE]' + ); + + list_volume_restores_sample($formattedParent); +} +// [END gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup.php new file mode 100644 index 000000000000..3ffbc02140fe --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup.php @@ -0,0 +1,68 @@ +updateBackup($backup); + $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 gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup_plan.php new file mode 100644 index 000000000000..e7bc03a39ef3 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup_plan.php @@ -0,0 +1,91 @@ +setCluster($formattedBackupPlanCluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $backupForGKEClient->updateBackupPlan($backupPlan); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BackupPlan $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedBackupPlanCluster = BackupForGKEClient::clusterName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]' + ); + + update_backup_plan_sample($formattedBackupPlanCluster); +} +// [END gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore.php new file mode 100644 index 000000000000..69532e9d0acf --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore.php @@ -0,0 +1,90 @@ +setBackup($formattedRestoreBackup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $backupForGKEClient->updateRestore($restore); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Restore $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRestoreBackup = BackupForGKEClient::backupName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_PLAN]', + '[BACKUP]' + ); + + update_restore_sample($formattedRestoreBackup); +} +// [END gkebackup_v1_generated_BackupForGKE_UpdateRestore_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore_plan.php new file mode 100644 index 000000000000..fc0f53435706 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore_plan.php @@ -0,0 +1,107 @@ +setBackupPlan($formattedRestorePlanBackupPlan) + ->setCluster($formattedRestorePlanCluster) + ->setRestoreConfig($restorePlanRestoreConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $backupForGKEClient->updateRestorePlan($restorePlan); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RestorePlan $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRestorePlanBackupPlan = BackupForGKEClient::backupPlanName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_PLAN]' + ); + $formattedRestorePlanCluster = BackupForGKEClient::clusterName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]' + ); + + update_restore_plan_sample($formattedRestorePlanBackupPlan, $formattedRestorePlanCluster); +} +// [END gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/src/V1/BackupForGKEClient.php b/owl-bot-staging/GkeBackup/v1/src/V1/BackupForGKEClient.php new file mode 100644 index 000000000000..e5186c4c76bf --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/src/V1/BackupForGKEClient.php @@ -0,0 +1,34 @@ +backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + * $operationResponse = $backupForGKEClient->createBackup($formattedParent); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $backupForGKEClient->createBackup($formattedParent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'createBackup'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $backupForGKEClient->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. + */ +class BackupForGKEGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.gkebackup.v1.BackupForGKE'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'gkebackup.googleapis.com'; + + /** 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 $backupNameTemplate; + + private static $backupPlanNameTemplate; + + private static $clusterNameTemplate; + + private static $locationNameTemplate; + + private static $restoreNameTemplate; + + private static $restorePlanNameTemplate; + + private static $volumeBackupNameTemplate; + + private static $volumeRestoreNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/backup_for_gke_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/backup_for_gke_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/backup_for_gke_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/backup_for_gke_rest_client_config.php', + ], + ], + ]; + } + + private static function getBackupNameTemplate() + { + if (self::$backupNameTemplate == null) { + self::$backupNameTemplate = new PathTemplate('projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}'); + } + + return self::$backupNameTemplate; + } + + private static function getBackupPlanNameTemplate() + { + if (self::$backupPlanNameTemplate == null) { + self::$backupPlanNameTemplate = new PathTemplate('projects/{project}/locations/{location}/backupPlans/{backup_plan}'); + } + + return self::$backupPlanNameTemplate; + } + + private static function getClusterNameTemplate() + { + if (self::$clusterNameTemplate == null) { + self::$clusterNameTemplate = new PathTemplate('projects/{project}/locations/{location}/clusters/{cluster}'); + } + + return self::$clusterNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getRestoreNameTemplate() + { + if (self::$restoreNameTemplate == null) { + self::$restoreNameTemplate = new PathTemplate('projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}'); + } + + return self::$restoreNameTemplate; + } + + private static function getRestorePlanNameTemplate() + { + if (self::$restorePlanNameTemplate == null) { + self::$restorePlanNameTemplate = new PathTemplate('projects/{project}/locations/{location}/restorePlans/{restore_plan}'); + } + + return self::$restorePlanNameTemplate; + } + + private static function getVolumeBackupNameTemplate() + { + if (self::$volumeBackupNameTemplate == null) { + self::$volumeBackupNameTemplate = new PathTemplate('projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}/volumeBackups/{volume_backup}'); + } + + return self::$volumeBackupNameTemplate; + } + + private static function getVolumeRestoreNameTemplate() + { + if (self::$volumeRestoreNameTemplate == null) { + self::$volumeRestoreNameTemplate = new PathTemplate('projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}/volumeRestores/{volume_restore}'); + } + + return self::$volumeRestoreNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'backup' => self::getBackupNameTemplate(), + 'backupPlan' => self::getBackupPlanNameTemplate(), + 'cluster' => self::getClusterNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'restore' => self::getRestoreNameTemplate(), + 'restorePlan' => self::getRestorePlanNameTemplate(), + 'volumeBackup' => self::getVolumeBackupNameTemplate(), + 'volumeRestore' => self::getVolumeRestoreNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a backup + * resource. + * + * @param string $project + * @param string $location + * @param string $backupPlan + * @param string $backup + * + * @return string The formatted backup resource. + */ + public static function backupName($project, $location, $backupPlan, $backup) + { + return self::getBackupNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'backup_plan' => $backupPlan, + 'backup' => $backup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a backup_plan + * resource. + * + * @param string $project + * @param string $location + * @param string $backupPlan + * + * @return string The formatted backup_plan resource. + */ + public static function backupPlanName($project, $location, $backupPlan) + { + return self::getBackupPlanNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'backup_plan' => $backupPlan, + ]); + } + + /** + * 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($project, $location, $cluster) + { + return self::getClusterNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + ]); + } + + /** + * 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($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a restore + * resource. + * + * @param string $project + * @param string $location + * @param string $restorePlan + * @param string $restore + * + * @return string The formatted restore resource. + */ + public static function restoreName($project, $location, $restorePlan, $restore) + { + return self::getRestoreNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'restore_plan' => $restorePlan, + 'restore' => $restore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a restore_plan + * resource. + * + * @param string $project + * @param string $location + * @param string $restorePlan + * + * @return string The formatted restore_plan resource. + */ + public static function restorePlanName($project, $location, $restorePlan) + { + return self::getRestorePlanNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'restore_plan' => $restorePlan, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * volume_backup resource. + * + * @param string $project + * @param string $location + * @param string $backupPlan + * @param string $backup + * @param string $volumeBackup + * + * @return string The formatted volume_backup resource. + */ + public static function volumeBackupName($project, $location, $backupPlan, $backup, $volumeBackup) + { + return self::getVolumeBackupNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'backup_plan' => $backupPlan, + 'backup' => $backup, + 'volume_backup' => $volumeBackup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * volume_restore resource. + * + * @param string $project + * @param string $location + * @param string $restorePlan + * @param string $restore + * @param string $volumeRestore + * + * @return string The formatted volume_restore resource. + */ + public static function volumeRestoreName($project, $location, $restorePlan, $restore, $volumeRestore) + { + return self::getVolumeRestoreNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'restore_plan' => $restorePlan, + 'restore' => $restore, + 'volume_restore' => $volumeRestore, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - backup: projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup} + * - backupPlan: projects/{project}/locations/{location}/backupPlans/{backup_plan} + * - cluster: projects/{project}/locations/{location}/clusters/{cluster} + * - location: projects/{project}/locations/{location} + * - restore: projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore} + * - restorePlan: projects/{project}/locations/{location}/restorePlans/{restore_plan} + * - volumeBackup: projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}/volumeBackups/{volume_backup} + * - volumeRestore: projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}/volumeRestores/{volume_restore} + * + * 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"); + } + + /** + * 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; + } + + /** + * 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 'gkebackup.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a Backup for the given BackupPlan. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedParent = $backupForGKEClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + * $operationResponse = $backupForGKEClient->createBackup($formattedParent); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $backupForGKEClient->createBackup($formattedParent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'createBackup'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $parent Required. The BackupPlan within which to create the Backup. + * Format: projects/*/locations/*/backupPlans/* + * @param array $optionalArgs { + * Optional. + * + * @type Backup $backup + * The Backup resource to create. + * @type string $backupId + * The client-provided short name for the Backup resource. + * This name must: + * + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of Backups in this BackupPlan + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createBackup($parent, array $optionalArgs = []) + { + $request = new CreateBackupRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['backup'])) { + $request->setBackup($optionalArgs['backup']); + } + + if (isset($optionalArgs['backupId'])) { + $request->setBackupId($optionalArgs['backupId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateBackup', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new BackupPlan in a given location. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedParent = $backupForGKEClient->locationName('[PROJECT]', '[LOCATION]'); + * $backupPlan = new BackupPlan(); + * $backupPlanId = 'backup_plan_id'; + * $operationResponse = $backupForGKEClient->createBackupPlan($formattedParent, $backupPlan, $backupPlanId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $backupForGKEClient->createBackupPlan($formattedParent, $backupPlan, $backupPlanId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'createBackupPlan'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $parent Required. The location within which to create the BackupPlan. + * Format: projects/*/locations/* + * @param BackupPlan $backupPlan Required. The BackupPlan resource object to create. + * @param string $backupPlanId Required. The client-provided short name for the BackupPlan resource. + * This name must: + * + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of BackupPlans in this location + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createBackupPlan($parent, $backupPlan, $backupPlanId, array $optionalArgs = []) + { + $request = new CreateBackupPlanRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setBackupPlan($backupPlan); + $request->setBackupPlanId($backupPlanId); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateBackupPlan', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new Restore for the given RestorePlan. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedParent = $backupForGKEClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + * $restore = new Restore(); + * $restoreId = 'restore_id'; + * $operationResponse = $backupForGKEClient->createRestore($formattedParent, $restore, $restoreId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $backupForGKEClient->createRestore($formattedParent, $restore, $restoreId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'createRestore'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $parent Required. The RestorePlan within which to create the Restore. + * Format: projects/*/locations/*/restorePlans/* + * @param Restore $restore Required. The restore resource to create. + * @param string $restoreId Required. The client-provided short name for the Restore resource. + * This name must: + * + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of Restores in this RestorePlan. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createRestore($parent, $restore, $restoreId, array $optionalArgs = []) + { + $request = new CreateRestoreRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setRestore($restore); + $request->setRestoreId($restoreId); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateRestore', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a new RestorePlan in a given location. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedParent = $backupForGKEClient->locationName('[PROJECT]', '[LOCATION]'); + * $restorePlan = new RestorePlan(); + * $restorePlanId = 'restore_plan_id'; + * $operationResponse = $backupForGKEClient->createRestorePlan($formattedParent, $restorePlan, $restorePlanId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $backupForGKEClient->createRestorePlan($formattedParent, $restorePlan, $restorePlanId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'createRestorePlan'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $parent Required. The location within which to create the RestorePlan. + * Format: projects/*/locations/* + * @param RestorePlan $restorePlan Required. The RestorePlan resource object to create. + * @param string $restorePlanId Required. The client-provided short name for the RestorePlan resource. + * This name must: + * + * - be between 1 and 63 characters long (inclusive) + * - consist of only lower-case ASCII letters, numbers, and dashes + * - start with a lower-case letter + * - end with a lower-case letter or number + * - be unique within the set of RestorePlans in this location + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createRestorePlan($parent, $restorePlan, $restorePlanId, array $optionalArgs = []) + { + $request = new CreateRestorePlanRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setRestorePlan($restorePlan); + $request->setRestorePlanId($restorePlanId); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateRestorePlan', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes an existing Backup. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedName = $backupForGKEClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); + * $operationResponse = $backupForGKEClient->deleteBackup($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $backupForGKEClient->deleteBackup($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'deleteBackup'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the Backup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/* + * @param array $optionalArgs { + * Optional. + * + * @type string $etag + * If provided, this value must match the current value of the + * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the request is + * rejected. + * @type bool $force + * If set to true, any VolumeBackups below this Backup will also be deleted. + * Otherwise, the request will only succeed if the Backup has no + * VolumeBackups. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteBackup($name, array $optionalArgs = []) + { + $request = new DeleteBackupRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + 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->startOperationsCall('DeleteBackup', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes an existing BackupPlan. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedName = $backupForGKEClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + * $operationResponse = $backupForGKEClient->deleteBackupPlan($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $backupForGKEClient->deleteBackupPlan($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'deleteBackupPlan'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $name Required. Fully qualified BackupPlan name. + * Format: projects/*/locations/*/backupPlans/* + * @param array $optionalArgs { + * Optional. + * + * @type string $etag + * If provided, this value must match the current value of the + * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field or the request is + * rejected. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteBackupPlan($name, array $optionalArgs = []) + { + $request = new DeleteBackupPlanRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteBackupPlan', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes an existing Restore. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedName = $backupForGKEClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); + * $operationResponse = $backupForGKEClient->deleteRestore($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $backupForGKEClient->deleteRestore($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'deleteRestore'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $name Required. Full name of the Restore + * Format: projects/*/locations/*/restorePlans/*/restores/* + * @param array $optionalArgs { + * Optional. + * + * @type string $etag + * If provided, this value must match the current value of the + * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or the request is + * rejected. + * @type bool $force + * If set to true, any VolumeRestores below this restore will also be deleted. + * Otherwise, the request will only succeed if the restore has no + * VolumeRestores. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteRestore($name, array $optionalArgs = []) + { + $request = new DeleteRestoreRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + 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->startOperationsCall('DeleteRestore', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes an existing RestorePlan. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedName = $backupForGKEClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + * $operationResponse = $backupForGKEClient->deleteRestorePlan($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $backupForGKEClient->deleteRestorePlan($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'deleteRestorePlan'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $name Required. Fully qualified RestorePlan name. + * Format: projects/*/locations/*/restorePlans/* + * @param array $optionalArgs { + * Optional. + * + * @type string $etag + * If provided, this value must match the current value of the + * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] field or the request is + * rejected. + * @type bool $force + * If set to true, any Restores below this RestorePlan will also be deleted. + * Otherwise, the request will only succeed if the RestorePlan has no + * Restores. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteRestorePlan($name, array $optionalArgs = []) + { + $request = new DeleteRestorePlanRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + 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->startOperationsCall('DeleteRestorePlan', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Retrieve the details of a single Backup. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedName = $backupForGKEClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); + * $response = $backupForGKEClient->getBackup($formattedName); + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $name Required. Full name of the Backup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/* + * @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\GkeBackup\V1\Backup + * + * @throws ApiException if the remote call fails + */ + public function getBackup($name, array $optionalArgs = []) + { + $request = new GetBackupRequest(); + $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('GetBackup', Backup::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieve the details of a single BackupPlan. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedName = $backupForGKEClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + * $response = $backupForGKEClient->getBackupPlan($formattedName); + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $name Required. Fully qualified BackupPlan name. + * Format: projects/*/locations/*/backupPlans/* + * @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\GkeBackup\V1\BackupPlan + * + * @throws ApiException if the remote call fails + */ + public function getBackupPlan($name, array $optionalArgs = []) + { + $request = new GetBackupPlanRequest(); + $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('GetBackupPlan', BackupPlan::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves the details of a single Restore. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedName = $backupForGKEClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); + * $response = $backupForGKEClient->getRestore($formattedName); + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the restore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/* + * @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\GkeBackup\V1\Restore + * + * @throws ApiException if the remote call fails + */ + public function getRestore($name, array $optionalArgs = []) + { + $request = new GetRestoreRequest(); + $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('GetRestore', Restore::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieve the details of a single RestorePlan. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedName = $backupForGKEClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + * $response = $backupForGKEClient->getRestorePlan($formattedName); + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $name Required. Fully qualified RestorePlan name. + * Format: projects/*/locations/*/restorePlans/* + * @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\GkeBackup\V1\RestorePlan + * + * @throws ApiException if the remote call fails + */ + public function getRestorePlan($name, array $optionalArgs = []) + { + $request = new GetRestorePlanRequest(); + $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('GetRestorePlan', RestorePlan::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieve the details of a single VolumeBackup. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedName = $backupForGKEClient->volumeBackupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]', '[VOLUME_BACKUP]'); + * $response = $backupForGKEClient->getVolumeBackup($formattedName); + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $name Required. Full name of the VolumeBackup resource. + * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/* + * @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\GkeBackup\V1\VolumeBackup + * + * @throws ApiException if the remote call fails + */ + public function getVolumeBackup($name, array $optionalArgs = []) + { + $request = new GetVolumeBackupRequest(); + $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('GetVolumeBackup', VolumeBackup::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieve the details of a single VolumeRestore. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedName = $backupForGKEClient->volumeRestoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]', '[VOLUME_RESTORE]'); + * $response = $backupForGKEClient->getVolumeRestore($formattedName); + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $name Required. Full name of the VolumeRestore resource. + * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/* + * @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\GkeBackup\V1\VolumeRestore + * + * @throws ApiException if the remote call fails + */ + public function getVolumeRestore($name, array $optionalArgs = []) + { + $request = new GetVolumeRestoreRequest(); + $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('GetVolumeRestore', VolumeRestore::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists BackupPlans in a given location. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedParent = $backupForGKEClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $backupForGKEClient->listBackupPlans($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $backupForGKEClient->listBackupPlans($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $parent Required. The location that contains the BackupPlans to list. + * Format: projects/*/locations/* + * @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 + * Field match expression used to filter the results. + * @type string $orderBy + * Field by which to sort the results. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listBackupPlans($parent, array $optionalArgs = []) + { + $request = new ListBackupPlansRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListBackupPlans', $optionalArgs, ListBackupPlansResponse::class, $request); + } + + /** + * Lists the Backups for a given BackupPlan. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedParent = $backupForGKEClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + * // Iterate over pages of elements + * $pagedResponse = $backupForGKEClient->listBackups($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $backupForGKEClient->listBackups($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $parent Required. The BackupPlan that contains the Backups to list. + * Format: projects/*/locations/*/backupPlans/* + * @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 + * Field match expression used to filter the results. + * @type string $orderBy + * Field by which to sort the results. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listBackups($parent, array $optionalArgs = []) + { + $request = new ListBackupsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListBackups', $optionalArgs, ListBackupsResponse::class, $request); + } + + /** + * Lists RestorePlans in a given location. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedParent = $backupForGKEClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $backupForGKEClient->listRestorePlans($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $backupForGKEClient->listRestorePlans($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $parent Required. The location that contains the RestorePlans to list. + * Format: projects/*/locations/* + * @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 + * Field match expression used to filter the results. + * @type string $orderBy + * Field by which to sort the results. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listRestorePlans($parent, array $optionalArgs = []) + { + $request = new ListRestorePlansRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListRestorePlans', $optionalArgs, ListRestorePlansResponse::class, $request); + } + + /** + * Lists the Restores for a given RestorePlan. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedParent = $backupForGKEClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + * // Iterate over pages of elements + * $pagedResponse = $backupForGKEClient->listRestores($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $backupForGKEClient->listRestores($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $parent Required. The RestorePlan that contains the Restores to list. + * Format: projects/*/locations/*/restorePlans/* + * @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 + * Field match expression used to filter the results. + * @type string $orderBy + * Field by which to sort the results. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listRestores($parent, array $optionalArgs = []) + { + $request = new ListRestoresRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListRestores', $optionalArgs, ListRestoresResponse::class, $request); + } + + /** + * Lists the VolumeBackups for a given Backup. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedParent = $backupForGKEClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); + * // Iterate over pages of elements + * $pagedResponse = $backupForGKEClient->listVolumeBackups($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $backupForGKEClient->listVolumeBackups($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $parent Required. The Backup that contains the VolumeBackups to list. + * Format: projects/*/locations/*/backupPlans/*/backups/* + * @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 + * Field match expression used to filter the results. + * @type string $orderBy + * Field by which to sort the results. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listVolumeBackups($parent, array $optionalArgs = []) + { + $request = new ListVolumeBackupsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListVolumeBackups', $optionalArgs, ListVolumeBackupsResponse::class, $request); + } + + /** + * Lists the VolumeRestores for a given Restore. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedParent = $backupForGKEClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); + * // Iterate over pages of elements + * $pagedResponse = $backupForGKEClient->listVolumeRestores($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $backupForGKEClient->listVolumeRestores($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $parent Required. The Restore that contains the VolumeRestores to list. + * Format: projects/*/locations/*/restorePlans/*/restores/* + * @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 + * Field match expression used to filter the results. + * @type string $orderBy + * Field by which to sort the results. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listVolumeRestores($parent, array $optionalArgs = []) + { + $request = new ListVolumeRestoresRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListVolumeRestores', $optionalArgs, ListVolumeRestoresResponse::class, $request); + } + + /** + * Update a Backup. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $backup = new Backup(); + * $operationResponse = $backupForGKEClient->updateBackup($backup); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $backupForGKEClient->updateBackup($backup); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'updateBackup'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param Backup $backup Required. A new version of the Backup resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * This is used to specify the fields to be overwritten in the + * Backup targeted for update. The values for each of these + * updated fields will be taken from the `backup_plan` provided + * with this request. Field names are relative to the root of the resource. + * If no `update_mask` is provided, all fields in `backup` will be + * written to the target Backup resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored + * and are not used to update the target Backup. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateBackup($backup, array $optionalArgs = []) + { + $request = new UpdateBackupRequest(); + $requestParamHeaders = []; + $request->setBackup($backup); + $requestParamHeaders['backup.name'] = $backup->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->startOperationsCall('UpdateBackup', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Update a BackupPlan. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $backupPlan = new BackupPlan(); + * $operationResponse = $backupForGKEClient->updateBackupPlan($backupPlan); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $backupForGKEClient->updateBackupPlan($backupPlan); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'updateBackupPlan'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param BackupPlan $backupPlan Required. A new version of the BackupPlan resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * This is used to specify the fields to be overwritten in the + * BackupPlan targeted for update. The values for each of these + * updated fields will be taken from the `backup_plan` provided + * with this request. Field names are relative to the root of the resource + * (e.g., `description`, `backup_config.include_volume_data`, etc.) + * If no `update_mask` is provided, all fields in `backup_plan` will be + * written to the target BackupPlan resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored + * and are not used to update the target BackupPlan. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateBackupPlan($backupPlan, array $optionalArgs = []) + { + $request = new UpdateBackupPlanRequest(); + $requestParamHeaders = []; + $request->setBackupPlan($backupPlan); + $requestParamHeaders['backup_plan.name'] = $backupPlan->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->startOperationsCall('UpdateBackupPlan', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Update a Restore. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $restore = new Restore(); + * $operationResponse = $backupForGKEClient->updateRestore($restore); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $backupForGKEClient->updateRestore($restore); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'updateRestore'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param Restore $restore Required. A new version of the Restore resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * This is used to specify the fields to be overwritten in the + * Restore targeted for update. The values for each of these + * updated fields will be taken from the `restore` provided + * with this request. Field names are relative to the root of the resource. + * If no `update_mask` is provided, all fields in `restore` will be + * written to the target Restore resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored + * and are not used to update the target Restore. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateRestore($restore, array $optionalArgs = []) + { + $request = new UpdateRestoreRequest(); + $requestParamHeaders = []; + $request->setRestore($restore); + $requestParamHeaders['restore.name'] = $restore->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->startOperationsCall('UpdateRestore', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Update a RestorePlan. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $restorePlan = new RestorePlan(); + * $operationResponse = $backupForGKEClient->updateRestorePlan($restorePlan); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $backupForGKEClient->updateRestorePlan($restorePlan); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'updateRestorePlan'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param RestorePlan $restorePlan Required. A new version of the RestorePlan resource that contains updated fields. + * This may be sparsely populated if an `update_mask` is provided. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * This is used to specify the fields to be overwritten in the + * RestorePlan targeted for update. The values for each of these + * updated fields will be taken from the `restore_plan` provided + * with this request. Field names are relative to the root of the resource. + * If no `update_mask` is provided, all fields in `restore_plan` will be + * written to the target RestorePlan resource. + * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored + * and are not used to update the target RestorePlan. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateRestorePlan($restorePlan, array $optionalArgs = []) + { + $request = new UpdateRestorePlanRequest(); + $requestParamHeaders = []; + $request->setRestorePlan($restorePlan); + $requestParamHeaders['restore_plan.name'] = $restorePlan->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->startOperationsCall('UpdateRestorePlan', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/GkeBackup/v1/src/V1/gapic_metadata.json b/owl-bot-staging/GkeBackup/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..cf8e54b5b4d3 --- /dev/null +++ b/owl-bot-staging/GkeBackup/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.gkebackup.v1", + "libraryPackage": "Google\\Cloud\\GkeBackup\\V1", + "services": { + "BackupForGKE": { + "clients": { + "grpc": { + "libraryClient": "BackupForGKEGapicClient", + "rpcs": { + "CreateBackup": { + "methods": [ + "createBackup" + ] + }, + "CreateBackupPlan": { + "methods": [ + "createBackupPlan" + ] + }, + "CreateRestore": { + "methods": [ + "createRestore" + ] + }, + "CreateRestorePlan": { + "methods": [ + "createRestorePlan" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "DeleteBackupPlan": { + "methods": [ + "deleteBackupPlan" + ] + }, + "DeleteRestore": { + "methods": [ + "deleteRestore" + ] + }, + "DeleteRestorePlan": { + "methods": [ + "deleteRestorePlan" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupPlan": { + "methods": [ + "getBackupPlan" + ] + }, + "GetRestore": { + "methods": [ + "getRestore" + ] + }, + "GetRestorePlan": { + "methods": [ + "getRestorePlan" + ] + }, + "GetVolumeBackup": { + "methods": [ + "getVolumeBackup" + ] + }, + "GetVolumeRestore": { + "methods": [ + "getVolumeRestore" + ] + }, + "ListBackupPlans": { + "methods": [ + "listBackupPlans" + ] + }, + "ListBackups": { + "methods": [ + "listBackups" + ] + }, + "ListRestorePlans": { + "methods": [ + "listRestorePlans" + ] + }, + "ListRestores": { + "methods": [ + "listRestores" + ] + }, + "ListVolumeBackups": { + "methods": [ + "listVolumeBackups" + ] + }, + "ListVolumeRestores": { + "methods": [ + "listVolumeRestores" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "UpdateBackupPlan": { + "methods": [ + "updateBackupPlan" + ] + }, + "UpdateRestore": { + "methods": [ + "updateRestore" + ] + }, + "UpdateRestorePlan": { + "methods": [ + "updateRestorePlan" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_client_config.json b/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_client_config.json new file mode 100644 index 000000000000..7c86f570ac49 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_client_config.json @@ -0,0 +1,184 @@ +{ + "interfaces": { + "google.cloud.gkebackup.v1.BackupForGKE": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [], + "no_retry_2_codes": [], + "no_retry_3_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": 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 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000 + }, + "no_retry_3_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + } + }, + "methods": { + "CreateBackup": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateBackupPlan": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + }, + "CreateRestore": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateRestorePlan": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeleteBackup": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + }, + "DeleteBackupPlan": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteRestore": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteRestorePlan": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetBackup": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetBackupPlan": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetRestore": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetRestorePlan": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetVolumeBackup": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetVolumeRestore": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListBackupPlans": { + "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" + }, + "ListRestorePlans": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListRestores": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListVolumeBackups": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListVolumeRestores": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateBackupPlan": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateRestore": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateRestorePlan": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_descriptor_config.php b/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_descriptor_config.php new file mode 100644 index 000000000000..69f8f5298390 --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_descriptor_config.php @@ -0,0 +1,188 @@ + [ + 'google.cloud.gkebackup.v1.BackupForGKE' => [ + 'CreateBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\Backup', + 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'CreateBackupPlan' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\BackupPlan', + 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'CreateRestore' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\Restore', + 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'CreateRestorePlan' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\RestorePlan', + 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteBackupPlan' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteRestore' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteRestorePlan' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\Backup', + 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateBackupPlan' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\BackupPlan', + 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateRestore' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\Restore', + 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateRestorePlan' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\RestorePlan', + 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListBackupPlans' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBackupPlans', + ], + ], + 'ListBackups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBackups', + ], + ], + 'ListRestorePlans' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRestorePlans', + ], + ], + 'ListRestores' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRestores', + ], + ], + 'ListVolumeBackups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVolumeBackups', + ], + ], + 'ListVolumeRestores' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVolumeRestores', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_rest_client_config.php b/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_rest_client_config.php new file mode 100644 index 000000000000..043e32abae6d --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_rest_client_config.php @@ -0,0 +1,478 @@ + [ + 'google.cloud.gkebackup.v1.BackupForGKE' => [ + 'CreateBackup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupPlans/*}/backups', + 'body' => 'backup', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateBackupPlan' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPlans', + 'body' => 'backup_plan', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'backup_plan_id', + ], + ], + 'CreateRestore' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/restorePlans/*}/restores', + 'body' => 'restore', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'restore_id', + ], + ], + 'CreateRestorePlan' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/restorePlans', + 'body' => 'restore_plan', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'restore_plan_id', + ], + ], + 'DeleteBackup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackupPlan' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteRestore' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteRestorePlan' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/restorePlans/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupPlan' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRestore' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRestorePlan' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/restorePlans/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVolumeBackup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVolumeRestore' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBackupPlans' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPlans', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupPlans/*}/backups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRestorePlans' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/restorePlans', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRestores' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/restorePlans/*}/restores', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListVolumeBackups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupPlans/*/backups/*}/volumeBackups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListVolumeRestores' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/restorePlans/*/restores/*}/volumeRestores', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateBackup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{backup.name=projects/*/locations/*/backupPlans/*/backups/*}', + 'body' => 'backup', + 'placeholders' => [ + 'backup.name' => [ + 'getters' => [ + 'getBackup', + 'getName', + ], + ], + ], + ], + 'UpdateBackupPlan' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}', + 'body' => 'backup_plan', + 'placeholders' => [ + 'backup_plan.name' => [ + 'getters' => [ + 'getBackupPlan', + 'getName', + ], + ], + ], + ], + 'UpdateRestore' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{restore.name=projects/*/locations/*/restorePlans/*/restores/*}', + 'body' => 'restore', + 'placeholders' => [ + 'restore.name' => [ + 'getters' => [ + 'getRestore', + 'getName', + ], + ], + ], + ], + 'UpdateRestorePlan' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{restore_plan.name=projects/*/locations/*/restorePlans/*}', + 'body' => 'restore_plan', + 'placeholders' => [ + 'restore_plan.name' => [ + 'getters' => [ + 'getRestorePlan', + 'getName', + ], + ], + ], + ], + ], + '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.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}: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/GkeBackup/v1/tests/Unit/V1/BackupForGKEClientTest.php b/owl-bot-staging/GkeBackup/v1/tests/Unit/V1/BackupForGKEClientTest.php new file mode 100644 index 000000000000..312423d11e4b --- /dev/null +++ b/owl-bot-staging/GkeBackup/v1/tests/Unit/V1/BackupForGKEClientTest.php @@ -0,0 +1,2568 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return BackupForGKEClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BackupForGKEClient($options); + } + + /** @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'; + $uid = 'uid115792'; + $manual = true; + $deleteLockDays = 1638724265; + $retainDays = 1380805807; + $allNamespaces = true; + $containsVolumeData = false; + $containsSecrets = false; + $stateReason = 'stateReason282113458'; + $resourceCount = 287552926; + $volumeCount = 1362665558; + $sizeBytes = 1796325715; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $podCount = 977657493; + $configBackupSizeBytes = 606785139; + $expectedResponse = new Backup(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setManual($manual); + $expectedResponse->setDeleteLockDays($deleteLockDays); + $expectedResponse->setRetainDays($retainDays); + $expectedResponse->setAllNamespaces($allNamespaces); + $expectedResponse->setContainsVolumeData($containsVolumeData); + $expectedResponse->setContainsSecrets($containsSecrets); + $expectedResponse->setStateReason($stateReason); + $expectedResponse->setResourceCount($resourceCount); + $expectedResponse->setVolumeCount($volumeCount); + $expectedResponse->setSizeBytes($sizeBytes); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $expectedResponse->setPodCount($podCount); + $expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes); + $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->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + $response = $gapicClient->createBackup($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/CreateBackup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $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->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + $response = $gapicClient->createBackup($formattedParent); + $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 createBackupPlanTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackupPlanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $cluster = 'cluster872092154'; + $etag = 'etag3123477'; + $deactivated = true; + $protectedPodCount = 1494678716; + $expectedResponse = new BackupPlan(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setCluster($cluster); + $expectedResponse->setEtag($etag); + $expectedResponse->setDeactivated($deactivated); + $expectedResponse->setProtectedPodCount($protectedPodCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createBackupPlanTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $backupPlan = new BackupPlan(); + $backupPlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $backupPlan->setCluster($backupPlanCluster); + $backupPlanId = 'backupPlanId-25762700'; + $response = $gapicClient->createBackupPlan($formattedParent, $backupPlan, $backupPlanId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/CreateBackupPlan', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getBackupPlan(); + $this->assertProtobufEquals($backupPlan, $actualValue); + $actualValue = $actualApiRequestObject->getBackupPlanId(); + $this->assertProtobufEquals($backupPlanId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupPlanTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackupPlanExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackupPlanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $backupPlan = new BackupPlan(); + $backupPlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $backupPlan->setCluster($backupPlanCluster); + $backupPlanId = 'backupPlanId-25762700'; + $response = $gapicClient->createBackupPlan($formattedParent, $backupPlan, $backupPlanId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupPlanTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createRestoreTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRestoreTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $backup = 'backup-1396673086'; + $cluster = 'cluster872092154'; + $stateReason = 'stateReason282113458'; + $resourcesRestoredCount = 882879616; + $resourcesExcludedCount = 338652236; + $resourcesFailedCount = 217904743; + $volumesRestoredCount = 1005533068; + $etag = 'etag3123477'; + $expectedResponse = new Restore(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setBackup($backup); + $expectedResponse->setCluster($cluster); + $expectedResponse->setStateReason($stateReason); + $expectedResponse->setResourcesRestoredCount($resourcesRestoredCount); + $expectedResponse->setResourcesExcludedCount($resourcesExcludedCount); + $expectedResponse->setResourcesFailedCount($resourcesFailedCount); + $expectedResponse->setVolumesRestoredCount($volumesRestoredCount); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createRestoreTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + $restore = new Restore(); + $restoreBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); + $restore->setBackup($restoreBackup); + $restoreId = 'restoreId-1374819220'; + $response = $gapicClient->createRestore($formattedParent, $restore, $restoreId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/CreateRestore', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRestore(); + $this->assertProtobufEquals($restore, $actualValue); + $actualValue = $actualApiRequestObject->getRestoreId(); + $this->assertProtobufEquals($restoreId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRestoreTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createRestoreExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRestoreTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + $restore = new Restore(); + $restoreBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); + $restore->setBackup($restoreBackup); + $restoreId = 'restoreId-1374819220'; + $response = $gapicClient->createRestore($formattedParent, $restore, $restoreId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRestoreTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createRestorePlanTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRestorePlanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $backupPlan = 'backupPlan1119623046'; + $cluster = 'cluster872092154'; + $etag = 'etag3123477'; + $expectedResponse = new RestorePlan(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setBackupPlan($backupPlan); + $expectedResponse->setCluster($cluster); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createRestorePlanTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $restorePlan = new RestorePlan(); + $restorePlanBackupPlan = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + $restorePlan->setBackupPlan($restorePlanBackupPlan); + $restorePlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $restorePlan->setCluster($restorePlanCluster); + $restorePlanRestoreConfig = new RestoreConfig(); + $restorePlan->setRestoreConfig($restorePlanRestoreConfig); + $restorePlanId = 'restorePlanId126727488'; + $response = $gapicClient->createRestorePlan($formattedParent, $restorePlan, $restorePlanId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/CreateRestorePlan', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRestorePlan(); + $this->assertProtobufEquals($restorePlan, $actualValue); + $actualValue = $actualApiRequestObject->getRestorePlanId(); + $this->assertProtobufEquals($restorePlanId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRestorePlanTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createRestorePlanExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRestorePlanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $restorePlan = new RestorePlan(); + $restorePlanBackupPlan = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + $restorePlan->setBackupPlan($restorePlanBackupPlan); + $restorePlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $restorePlan->setCluster($restorePlanCluster); + $restorePlanRestoreConfig = new RestoreConfig(); + $restorePlan->setRestoreConfig($restorePlanRestoreConfig); + $restorePlanId = 'restorePlanId126727488'; + $response = $gapicClient->createRestorePlan($formattedParent, $restorePlan, $restorePlanId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRestorePlanTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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_PLAN]', '[BACKUP]'); + $response = $gapicClient->deleteBackup($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/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_PLAN]', '[BACKUP]'); + $response = $gapicClient->deleteBackup($formattedName); + $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 deleteBackupPlanTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupPlanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteBackupPlanTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + $response = $gapicClient->deleteBackupPlan($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/DeleteBackupPlan', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupPlanTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackupPlanExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupPlanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + $response = $gapicClient->deleteBackupPlan($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupPlanTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRestoreTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRestoreTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteRestoreTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); + $response = $gapicClient->deleteRestore($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/DeleteRestore', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRestoreTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRestoreExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRestoreTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); + $response = $gapicClient->deleteRestore($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRestoreTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRestorePlanTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRestorePlanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteRestorePlanTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + $response = $gapicClient->deleteRestorePlan($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/DeleteRestorePlan', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRestorePlanTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRestorePlanExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRestorePlanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + $response = $gapicClient->deleteRestorePlan($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRestorePlanTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $manual = true; + $deleteLockDays = 1638724265; + $retainDays = 1380805807; + $allNamespaces = true; + $containsVolumeData = false; + $containsSecrets = false; + $stateReason = 'stateReason282113458'; + $resourceCount = 287552926; + $volumeCount = 1362665558; + $sizeBytes = 1796325715; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $podCount = 977657493; + $configBackupSizeBytes = 606785139; + $expectedResponse = new Backup(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setManual($manual); + $expectedResponse->setDeleteLockDays($deleteLockDays); + $expectedResponse->setRetainDays($retainDays); + $expectedResponse->setAllNamespaces($allNamespaces); + $expectedResponse->setContainsVolumeData($containsVolumeData); + $expectedResponse->setContainsSecrets($containsSecrets); + $expectedResponse->setStateReason($stateReason); + $expectedResponse->setResourceCount($resourceCount); + $expectedResponse->setVolumeCount($volumeCount); + $expectedResponse->setSizeBytes($sizeBytes); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $expectedResponse->setPodCount($podCount); + $expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); + $response = $gapicClient->getBackup($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/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_PLAN]', '[BACKUP]'); + try { + $gapicClient->getBackup($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 getBackupPlanTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $cluster = 'cluster872092154'; + $etag = 'etag3123477'; + $deactivated = true; + $protectedPodCount = 1494678716; + $expectedResponse = new BackupPlan(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setCluster($cluster); + $expectedResponse->setEtag($etag); + $expectedResponse->setDeactivated($deactivated); + $expectedResponse->setProtectedPodCount($protectedPodCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + $response = $gapicClient->getBackupPlan($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/GetBackupPlan', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupPlanExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + try { + $gapicClient->getBackupPlan($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 getRestoreTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $backup = 'backup-1396673086'; + $cluster = 'cluster872092154'; + $stateReason = 'stateReason282113458'; + $resourcesRestoredCount = 882879616; + $resourcesExcludedCount = 338652236; + $resourcesFailedCount = 217904743; + $volumesRestoredCount = 1005533068; + $etag = 'etag3123477'; + $expectedResponse = new Restore(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setBackup($backup); + $expectedResponse->setCluster($cluster); + $expectedResponse->setStateReason($stateReason); + $expectedResponse->setResourcesRestoredCount($resourcesRestoredCount); + $expectedResponse->setResourcesExcludedCount($resourcesExcludedCount); + $expectedResponse->setResourcesFailedCount($resourcesFailedCount); + $expectedResponse->setVolumesRestoredCount($volumesRestoredCount); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); + $response = $gapicClient->getRestore($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/GetRestore', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRestoreExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); + try { + $gapicClient->getRestore($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 getRestorePlanTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $backupPlan = 'backupPlan1119623046'; + $cluster = 'cluster872092154'; + $etag = 'etag3123477'; + $expectedResponse = new RestorePlan(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setBackupPlan($backupPlan); + $expectedResponse->setCluster($cluster); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + $response = $gapicClient->getRestorePlan($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/GetRestorePlan', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRestorePlanExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + try { + $gapicClient->getRestorePlan($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 getVolumeBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $volumeBackupHandle = 'volumeBackupHandle-2105959712'; + $storageBytes = 2035244455; + $diskSizeBytes = 275393905; + $stateMessage = 'stateMessage29641305'; + $etag = 'etag3123477'; + $expectedResponse = new VolumeBackup(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setVolumeBackupHandle($volumeBackupHandle); + $expectedResponse->setStorageBytes($storageBytes); + $expectedResponse->setDiskSizeBytes($diskSizeBytes); + $expectedResponse->setStateMessage($stateMessage); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->volumeBackupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]', '[VOLUME_BACKUP]'); + $response = $gapicClient->getVolumeBackup($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/GetVolumeBackup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVolumeBackupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->volumeBackupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]', '[VOLUME_BACKUP]'); + try { + $gapicClient->getVolumeBackup($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 getVolumeRestoreTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $volumeBackup = 'volumeBackup664943239'; + $volumeHandle = 'volumeHandle837038829'; + $stateMessage = 'stateMessage29641305'; + $etag = 'etag3123477'; + $expectedResponse = new VolumeRestore(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setVolumeBackup($volumeBackup); + $expectedResponse->setVolumeHandle($volumeHandle); + $expectedResponse->setStateMessage($stateMessage); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->volumeRestoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]', '[VOLUME_RESTORE]'); + $response = $gapicClient->getVolumeRestore($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/GetVolumeRestore', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVolumeRestoreExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->volumeRestoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]', '[VOLUME_RESTORE]'); + try { + $gapicClient->getVolumeRestore($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 listBackupPlansTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $backupPlansElement = new BackupPlan(); + $backupPlans = [ + $backupPlansElement, + ]; + $expectedResponse = new ListBackupPlansResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBackupPlans($backupPlans); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listBackupPlans($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBackupPlans()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListBackupPlans', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupPlansExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listBackupPlans($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 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->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + $response = $gapicClient->listBackups($formattedParent); + $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.gkebackup.v1.BackupForGKE/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->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + try { + $gapicClient->listBackups($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 listRestorePlansTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $restorePlansElement = new RestorePlan(); + $restorePlans = [ + $restorePlansElement, + ]; + $expectedResponse = new ListRestorePlansResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRestorePlans($restorePlans); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listRestorePlans($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRestorePlans()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListRestorePlans', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRestorePlansExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listRestorePlans($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 listRestoresTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $restoresElement = new Restore(); + $restores = [ + $restoresElement, + ]; + $expectedResponse = new ListRestoresResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRestores($restores); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + $response = $gapicClient->listRestores($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRestores()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListRestores', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRestoresExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); + try { + $gapicClient->listRestores($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 listVolumeBackupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $volumeBackupsElement = new VolumeBackup(); + $volumeBackups = [ + $volumeBackupsElement, + ]; + $expectedResponse = new ListVolumeBackupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVolumeBackups($volumeBackups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); + $response = $gapicClient->listVolumeBackups($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVolumeBackups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListVolumeBackups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVolumeBackupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); + try { + $gapicClient->listVolumeBackups($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 listVolumeRestoresTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $volumeRestoresElement = new VolumeRestore(); + $volumeRestores = [ + $volumeRestoresElement, + ]; + $expectedResponse = new ListVolumeRestoresResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVolumeRestores($volumeRestores); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); + $response = $gapicClient->listVolumeRestores($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVolumeRestores()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListVolumeRestores', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVolumeRestoresExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); + try { + $gapicClient->listVolumeRestores($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 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'; + $uid = 'uid115792'; + $manual = true; + $deleteLockDays = 1638724265; + $retainDays = 1380805807; + $allNamespaces = true; + $containsVolumeData = false; + $containsSecrets = false; + $stateReason = 'stateReason282113458'; + $resourceCount = 287552926; + $volumeCount = 1362665558; + $sizeBytes = 1796325715; + $etag = 'etag3123477'; + $description = 'description-1724546052'; + $podCount = 977657493; + $configBackupSizeBytes = 606785139; + $expectedResponse = new Backup(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setManual($manual); + $expectedResponse->setDeleteLockDays($deleteLockDays); + $expectedResponse->setRetainDays($retainDays); + $expectedResponse->setAllNamespaces($allNamespaces); + $expectedResponse->setContainsVolumeData($containsVolumeData); + $expectedResponse->setContainsSecrets($containsSecrets); + $expectedResponse->setStateReason($stateReason); + $expectedResponse->setResourceCount($resourceCount); + $expectedResponse->setVolumeCount($volumeCount); + $expectedResponse->setSizeBytes($sizeBytes); + $expectedResponse->setEtag($etag); + $expectedResponse->setDescription($description); + $expectedResponse->setPodCount($podCount); + $expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes); + $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 + $backup = new Backup(); + $response = $gapicClient->updateBackup($backup); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/UpdateBackup', $actualApiFuncCall); + $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 + $backup = new Backup(); + $response = $gapicClient->updateBackup($backup); + $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 updateBackupPlanTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackupPlanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $cluster = 'cluster872092154'; + $etag = 'etag3123477'; + $deactivated = true; + $protectedPodCount = 1494678716; + $expectedResponse = new BackupPlan(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setCluster($cluster); + $expectedResponse->setEtag($etag); + $expectedResponse->setDeactivated($deactivated); + $expectedResponse->setProtectedPodCount($protectedPodCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateBackupPlanTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $backupPlan = new BackupPlan(); + $backupPlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $backupPlan->setCluster($backupPlanCluster); + $response = $gapicClient->updateBackupPlan($backupPlan); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/UpdateBackupPlan', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getBackupPlan(); + $this->assertProtobufEquals($backupPlan, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackupPlanTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackupPlanExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackupPlanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $backupPlan = new BackupPlan(); + $backupPlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $backupPlan->setCluster($backupPlanCluster); + $response = $gapicClient->updateBackupPlan($backupPlan); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackupPlanTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateRestoreTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRestoreTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $backup = 'backup-1396673086'; + $cluster = 'cluster872092154'; + $stateReason = 'stateReason282113458'; + $resourcesRestoredCount = 882879616; + $resourcesExcludedCount = 338652236; + $resourcesFailedCount = 217904743; + $volumesRestoredCount = 1005533068; + $etag = 'etag3123477'; + $expectedResponse = new Restore(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setBackup($backup); + $expectedResponse->setCluster($cluster); + $expectedResponse->setStateReason($stateReason); + $expectedResponse->setResourcesRestoredCount($resourcesRestoredCount); + $expectedResponse->setResourcesExcludedCount($resourcesExcludedCount); + $expectedResponse->setResourcesFailedCount($resourcesFailedCount); + $expectedResponse->setVolumesRestoredCount($volumesRestoredCount); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateRestoreTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $restore = new Restore(); + $restoreBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); + $restore->setBackup($restoreBackup); + $response = $gapicClient->updateRestore($restore); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/UpdateRestore', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRestore(); + $this->assertProtobufEquals($restore, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRestoreTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateRestoreExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRestoreTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $restore = new Restore(); + $restoreBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); + $restore->setBackup($restoreBackup); + $response = $gapicClient->updateRestore($restore); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRestoreTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateRestorePlanTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRestorePlanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $backupPlan = 'backupPlan1119623046'; + $cluster = 'cluster872092154'; + $etag = 'etag3123477'; + $expectedResponse = new RestorePlan(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $expectedResponse->setBackupPlan($backupPlan); + $expectedResponse->setCluster($cluster); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateRestorePlanTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $restorePlan = new RestorePlan(); + $restorePlanBackupPlan = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + $restorePlan->setBackupPlan($restorePlanBackupPlan); + $restorePlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $restorePlan->setCluster($restorePlanCluster); + $restorePlanRestoreConfig = new RestoreConfig(); + $restorePlan->setRestoreConfig($restorePlanRestoreConfig); + $response = $gapicClient->updateRestorePlan($restorePlan); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/UpdateRestorePlan', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRestorePlan(); + $this->assertProtobufEquals($restorePlan, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRestorePlanTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateRestorePlanExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRestorePlanTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $restorePlan = new RestorePlan(); + $restorePlanBackupPlan = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); + $restorePlan->setBackupPlan($restorePlanBackupPlan); + $restorePlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $restorePlan->setCluster($restorePlanCluster); + $restorePlanRestoreConfig = new RestoreConfig(); + $restorePlan->setRestoreConfig($restorePlanRestoreConfig); + $response = $gapicClient->updateRestorePlan($restorePlan); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRestorePlanTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1Beta1/Membership.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1Beta1/Membership.php new file mode 100644 index 0000000000000000000000000000000000000000..ba4dc977623cfb6c217798ec3aedc9bfd059a379 GIT binary patch literal 8786 zcmcIqJ9FFE6<(5(EFDUgeEpK;c#XiDU0Gw3W9`nyLqFCOMa$ZiL@q^b;tVq!5QHeK zKmfr*w&GEfq)3y@B&qTXGLt50Q>93gaha{+CR=1uY>^^ew#vCL0HkP|(rnzA0`56D z&+mNq0{1_1_guK4tQof9X@SvJT8B!oXDF`c1di@lN-NymH9SRkx~^#%UQSU~E6P@- zu9R2T>)%FE-w8e4C@3Ar=~zZyx16w@@9Z0UVJm-dr)31%oqX5mwhYhTGu<3h3}91dRwj>a0((fI7n3e|BBK({pCS2iPE@B$S4=Y}oI)D=I_ z0{rhC({Gx#8JL=7{uupvpzLavZ=m?`wY#CM2c}~yRG?z(#^Ozd>!fSnaUJykfg-J{ z(vV;{8tZmoc(!IWRt;bGOgC`6DlRP)Iz|u$l3rQ7DIQDJnY+p&x3N$-X5<4U@IoW` zbVc!uAoT2e%xzUns;r#VTGWSh7sR4o)WX*fgy6im|61 zn2vWc(V8KOW@IBb9J}L%wr$#-M#ZJ2dNL=Y+%c;+HGh9}izC^(i8UK&U3YZZnyWXq zF(u(^62fZi_Cr%tRI%NT3g|Jm+hUY*S^)3C7x&@TN&1Xj<*Re7D|5UnbD}F3E(=wf zYhv5d3gF$ja6NHjm!`Sd5_uL2t|S(CBAMdW4ROngGnRLvjEO}OEEpJIOXc}fx|o+f z6QUJ?48B+(jrUwVPunW=`3?0?X8>Z1Am?C=V$FO?Ni9yTWWFqB$P<{bw3cD{^Jyis zm|cE9$88=MrCh8lx51>!cHkXSO(`-D*|xv{tjGC`d`1eNF=^Os*TKxrkKyI)a(=|8 zl!X|3!jreiBN(Ut8S~>z&8-pD(5f@IzYk$b3xhq!GlRqVDW>J!p<0S^HTUuZ$m*Vf z>Y6kO^Ak+Ng47^0l#AMfKNY1y7g1eEof%oGZCHksnjB3E^I$yZpxiXu^MFz;*D3M< zF5uJ%n!01#1_OKUM0PaAmtZQi%^!sZRXZ)!W=Nv}=S_RpL)BiWBTl22hpsU{gG$evu_;o5+*Y+exO;QfyIkn7SeZ9>i2*g*F z_4TdCwc>WYwo|I_)XL5J(`vc7v$b6MBa9K82sc`TY?2n~iPhH@kwY2|OAOYoA1NlH+l3 z=v664h=7(+RZ1Gc@*9=V@6tfx$I3O>4VU7AYwBLJtJ&r*&hvOOjFBo_NGy_O$vH7R zdh$t|LN9l86V3_fX~ya@Z0wvy-6t?7)ifQKks#3x!{>rDuEJ$l#8e$-`>vC3!K^g* z00}!CYSG|i<4$k~3}Bl9&?Hku2jTu*zbR$nL8#t`Ir$J788Qcxz0oI^;H=J@wdw0f z7ld;4F+kkMWC3O(?=92bk8K-gmJ1DC)Ax}mvT@Ap%c#Fi!%R;fpHvqGTds>rYVEFR zN4-V8W%tI(r!X!3VDo^E{fLPdK2OzTsghM&%flaE4riIooL)I0c*ovyE$T zuCqbP+x0T;OzCai36Z$b#EwTd4sc%(w%D3jkn=kd{1~9v(pT=+mvIr z_2%c#_I-vQ(;N|gnTFYT{4xqjR$)xXkT4t0F5eki%6+oA5(>)r^)O`~^7MR)yx&U` zX~>7i35C=Sj8WC(0?d^vtNom28YWA%a^X~>Qn3iys=u|D6<qGhM>y zyBf}U9}g&4)>z4;2o@i^9yt3(&t?J(Vb`=I^AXJUB1}3St>D%nt2=&K{b>p=AG6qZ z@kqcR1(=ff>7&(j@AC!{75k0W&Duz^n+X$H7O_mTp^f_keNSsy29{Z7aZ25S3u{Iq zY%*#e_H4&Q%-&2f)xV-!CAJBPO_DlKp9zHWZp1=+pdd{i!lVoqYn>Csik5turqkoK zLN!y!5Gnc`F0ZmZ&T&^x8J^ca>r0H=4%>!(a}SH5jc(Xk1rKW3=%|H<t} zd2CYR`#ecCWQm+Mu4R~!d*Y3Kl-YBV>AjQGQN2oq2$h zR@T$$AqSaqa`VA#=S8B>BL&Q5+i2q^OCFfVMy1svTpehWNU91G{3J|7p2*1K8Ci}F z^Uzm+l>${3N5Zdfs$Z@k|Mk#(xwlHV*XMX*i%^9dLroIyUFg%zND-}tWARk~n}T!E zF>%Bb`_8eb{2<)wJIA`iPV)Gv5p`z-5uDe7=Hc6bIC&X*5QzobiU&c4a$TOVW*b|; zwBk9=h^kI^@D}bH8R5V^5$$oY3BhP4TY#Qpu<4Rn{?}Q!jC-ahVJk-bZREqIZjisE zV78AOkm0AFeXB+NFMJ?NYv2jjF(IBowfvJW{`s5qhvb9k#n1~*p&mpBNK1)>qotk$ zqgO@2x5yt;Fw;XW$Z+uLSt~slnfR!s<5pA1c#X|HXIx81uZj$X$bV8uRr~l086L&{ z<d#Zm-bd=GqFjhb&#U4!o}62f2HlEL2^r1H;`QEx_Q-^&;r@ zUJ$r`A)kNt>{;K*TTO z7{KJ?S1JR)o4Cgf{eAlC8v8H;4+rsOLyk}PocJ)}rM%k^-%ZdDCvf^V@XHDI^~G1| xx4C$sz~l=BzMxPL3tAJ*n)ly}-ZtOjpCcr`UZ6b1)CYXIz*h1v436Lk;D2)UE)M_z literal 0 HcmV?d00001 diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ApplianceCluster.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ApplianceCluster.php new file mode 100644 index 000000000000..30a936417d2c --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ApplianceCluster.php @@ -0,0 +1,76 @@ +google.cloud.gkehub.v1beta1.ApplianceCluster + */ +class ApplianceCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Self-link of the GCP resource for the Appliance Cluster. For + * example: + * //transferappliance.googleapis.com/projects/my-project/locations/us-west1-a/appliances/my-appliance + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $resource_link = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_link + * Immutable. Self-link of the GCP resource for the Appliance Cluster. For + * example: + * //transferappliance.googleapis.com/projects/my-project/locations/us-west1-a/appliances/my-appliance + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Self-link of the GCP resource for the Appliance Cluster. For + * example: + * //transferappliance.googleapis.com/projects/my-project/locations/us-west1-a/appliances/my-appliance + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getResourceLink() + { + return $this->resource_link; + } + + /** + * Immutable. Self-link of the GCP resource for the Appliance Cluster. For + * example: + * //transferappliance.googleapis.com/projects/my-project/locations/us-west1-a/appliances/my-appliance + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setResourceLink($var) + { + GPBUtil::checkString($var, True); + $this->resource_link = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Authority.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Authority.php new file mode 100644 index 000000000000..d6571626e5a5 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Authority.php @@ -0,0 +1,231 @@ +google.cloud.gkehub.v1beta1.Authority + */ +class Authority extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and + * be a valid URL with length <2000 characters. + * If set, then Google will allow valid OIDC tokens from this issuer to + * authenticate within the workload_identity_pool. OIDC discovery will be + * performed on this URI to validate tokens from the issuer. + * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly + * modified; it must be cleared (and Workload Identity disabled) before using + * a new issuer (and re-enabling Workload Identity). + * + * Generated from protobuf field string issuer = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $issuer = ''; + /** + * Output only. The name of the workload identity pool in which `issuer` will be + * recognized. + * There is a single Workload Identity Pool per Hub that is shared + * between all Memberships that belong to that Hub. For a Hub hosted in + * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, + * although this is subject to change in newer versions of this API. + * + * Generated from protobuf field string workload_identity_pool = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $workload_identity_pool = ''; + /** + * Output only. An identity provider that reflects the `issuer` in the workload identity + * pool. + * + * Generated from protobuf field string identity_provider = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $identity_provider = ''; + /** + * Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517). + * When this field is set, OIDC discovery will NOT be performed on `issuer`, + * and instead OIDC tokens will be validated using this field. + * + * Generated from protobuf field bytes oidc_jwks = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $oidc_jwks = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $issuer + * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and + * be a valid URL with length <2000 characters. + * If set, then Google will allow valid OIDC tokens from this issuer to + * authenticate within the workload_identity_pool. OIDC discovery will be + * performed on this URI to validate tokens from the issuer. + * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly + * modified; it must be cleared (and Workload Identity disabled) before using + * a new issuer (and re-enabling Workload Identity). + * @type string $workload_identity_pool + * Output only. The name of the workload identity pool in which `issuer` will be + * recognized. + * There is a single Workload Identity Pool per Hub that is shared + * between all Memberships that belong to that Hub. For a Hub hosted in + * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, + * although this is subject to change in newer versions of this API. + * @type string $identity_provider + * Output only. An identity provider that reflects the `issuer` in the workload identity + * pool. + * @type string $oidc_jwks + * Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517). + * When this field is set, OIDC discovery will NOT be performed on `issuer`, + * and instead OIDC tokens will be validated using this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and + * be a valid URL with length <2000 characters. + * If set, then Google will allow valid OIDC tokens from this issuer to + * authenticate within the workload_identity_pool. OIDC discovery will be + * performed on this URI to validate tokens from the issuer. + * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly + * modified; it must be cleared (and Workload Identity disabled) before using + * a new issuer (and re-enabling Workload Identity). + * + * Generated from protobuf field string issuer = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getIssuer() + { + return $this->issuer; + } + + /** + * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and + * be a valid URL with length <2000 characters. + * If set, then Google will allow valid OIDC tokens from this issuer to + * authenticate within the workload_identity_pool. OIDC discovery will be + * performed on this URI to validate tokens from the issuer. + * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly + * modified; it must be cleared (and Workload Identity disabled) before using + * a new issuer (and re-enabling Workload Identity). + * + * Generated from protobuf field string issuer = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setIssuer($var) + { + GPBUtil::checkString($var, True); + $this->issuer = $var; + + return $this; + } + + /** + * Output only. The name of the workload identity pool in which `issuer` will be + * recognized. + * There is a single Workload Identity Pool per Hub that is shared + * between all Memberships that belong to that Hub. For a Hub hosted in + * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, + * although this is subject to change in newer versions of this API. + * + * Generated from protobuf field string workload_identity_pool = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getWorkloadIdentityPool() + { + return $this->workload_identity_pool; + } + + /** + * Output only. The name of the workload identity pool in which `issuer` will be + * recognized. + * There is a single Workload Identity Pool per Hub that is shared + * between all Memberships that belong to that Hub. For a Hub hosted in + * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, + * although this is subject to change in newer versions of this API. + * + * Generated from protobuf field string workload_identity_pool = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setWorkloadIdentityPool($var) + { + GPBUtil::checkString($var, True); + $this->workload_identity_pool = $var; + + return $this; + } + + /** + * Output only. An identity provider that reflects the `issuer` in the workload identity + * pool. + * + * Generated from protobuf field string identity_provider = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getIdentityProvider() + { + return $this->identity_provider; + } + + /** + * Output only. An identity provider that reflects the `issuer` in the workload identity + * pool. + * + * Generated from protobuf field string identity_provider = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setIdentityProvider($var) + { + GPBUtil::checkString($var, True); + $this->identity_provider = $var; + + return $this; + } + + /** + * Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517). + * When this field is set, OIDC discovery will NOT be performed on `issuer`, + * and instead OIDC tokens will be validated using this field. + * + * Generated from protobuf field bytes oidc_jwks = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOidcJwks() + { + return $this->oidc_jwks; + } + + /** + * Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517). + * When this field is set, OIDC discovery will NOT be performed on `issuer`, + * and instead OIDC tokens will be validated using this field. + * + * Generated from protobuf field bytes oidc_jwks = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOidcJwks($var) + { + GPBUtil::checkString($var, False); + $this->oidc_jwks = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgent.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgent.php new file mode 100644 index 000000000000..07ed8a4a59ef --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgent.php @@ -0,0 +1,168 @@ +google.cloud.gkehub.v1beta1.ConnectAgent + */ +class ConnectAgent extends \Google\Protobuf\Internal\Message +{ + /** + * Do not set. + * + * Generated from protobuf field string name = 1 [deprecated = true]; + * @deprecated + */ + protected $name = ''; + /** + * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com + * requires the use of a proxy. Format must be in the form + * `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + * supported by the proxy. This will direct the connect agent's outbound + * traffic through a HTTP(S) proxy. + * + * Generated from protobuf field bytes proxy = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $proxy = ''; + /** + * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. + * The Connect Agent is authorized automatically when run in the default + * namespace. Otherwise, explicit authorization must be granted with an + * additional IAM binding. + * + * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $namespace = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Do not set. + * @type string $proxy + * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com + * requires the use of a proxy. Format must be in the form + * `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + * supported by the proxy. This will direct the connect agent's outbound + * traffic through a HTTP(S) proxy. + * @type string $namespace + * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. + * The Connect Agent is authorized automatically when run in the default + * namespace. Otherwise, explicit authorization must be granted with an + * additional IAM binding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Do not set. + * + * Generated from protobuf field string name = 1 [deprecated = true]; + * @return string + * @deprecated + */ + public function getName() + { + @trigger_error('name is deprecated.', E_USER_DEPRECATED); + return $this->name; + } + + /** + * Do not set. + * + * Generated from protobuf field string name = 1 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setName($var) + { + @trigger_error('name is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com + * requires the use of a proxy. Format must be in the form + * `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + * supported by the proxy. This will direct the connect agent's outbound + * traffic through a HTTP(S) proxy. + * + * Generated from protobuf field bytes proxy = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getProxy() + { + return $this->proxy; + } + + /** + * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com + * requires the use of a proxy. Format must be in the form + * `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + * supported by the proxy. This will direct the connect agent's outbound + * traffic through a HTTP(S) proxy. + * + * Generated from protobuf field bytes proxy = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setProxy($var) + { + GPBUtil::checkString($var, False); + $this->proxy = $var; + + return $this; + } + + /** + * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. + * The Connect Agent is authorized automatically when run in the default + * namespace. Otherwise, explicit authorization must be granted with an + * additional IAM binding. + * + * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. + * The Connect Agent is authorized automatically when run in the default + * namespace. Otherwise, explicit authorization must be granted with an + * additional IAM binding. + * + * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgentResource.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgentResource.php new file mode 100644 index 000000000000..cb87c2c398b5 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgentResource.php @@ -0,0 +1,112 @@ +google.cloud.gkehub.v1beta1.ConnectAgentResource + */ +class ConnectAgentResource extends \Google\Protobuf\Internal\Message +{ + /** + * Kubernetes type of the resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.TypeMeta type = 1; + */ + protected $type = null; + /** + * YAML manifest of the resource. + * + * Generated from protobuf field string manifest = 2; + */ + protected $manifest = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\V1beta1\TypeMeta $type + * Kubernetes type of the resource. + * @type string $manifest + * YAML manifest of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Kubernetes type of the resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.TypeMeta type = 1; + * @return \Google\Cloud\GkeHub\V1beta1\TypeMeta|null + */ + public function getType() + { + return $this->type; + } + + public function hasType() + { + return isset($this->type); + } + + public function clearType() + { + unset($this->type); + } + + /** + * Kubernetes type of the resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.TypeMeta type = 1; + * @param \Google\Cloud\GkeHub\V1beta1\TypeMeta $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\TypeMeta::class); + $this->type = $var; + + return $this; + } + + /** + * YAML manifest of the resource. + * + * Generated from protobuf field string manifest = 2; + * @return string + */ + public function getManifest() + { + return $this->manifest; + } + + /** + * YAML manifest of the resource. + * + * Generated from protobuf field string manifest = 2; + * @param string $var + * @return $this + */ + public function setManifest($var) + { + GPBUtil::checkString($var, True); + $this->manifest = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/CreateMembershipRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/CreateMembershipRequest.php new file mode 100644 index 000000000000..bb3b559069a9 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/CreateMembershipRequest.php @@ -0,0 +1,247 @@ +google.cloud.gkehub.v1beta1.CreateMembershipRequest + */ +class CreateMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the Memberships will be created. + * Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC + * 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string membership_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $membership_id = ''; + /** + * Required. The membership to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource = null; + /** + * Optional. A 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the Memberships will be created. + * Specified in the format `projects/*/locations/*`. + * @type string $membership_id + * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC + * 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * @type \Google\Cloud\GkeHub\V1beta1\Membership $resource + * Required. The membership to create. + * @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 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\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the Memberships will be created. + * 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 parent (project and location) where the Memberships will be created. + * 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; + } + + /** + * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC + * 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string membership_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMembershipId() + { + return $this->membership_id; + } + + /** + * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC + * 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string membership_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMembershipId($var) + { + GPBUtil::checkString($var, True); + $this->membership_id = $var; + + return $this; + } + + /** + * Required. The membership to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1beta1\Membership|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * Required. The membership to create. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1beta1\Membership $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\Membership::class); + $this->resource = $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 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 = 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 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 = 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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/DeleteMembershipRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/DeleteMembershipRequest.php new file mode 100644 index 000000000000..78e04fbab6d5 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/DeleteMembershipRequest.php @@ -0,0 +1,145 @@ +google.cloud.gkehub.v1beta1.DeleteMembershipRequest + */ +class DeleteMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * 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 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * @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 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\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated 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 Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 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 = 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 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 = 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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/EdgeCluster.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/EdgeCluster.php new file mode 100644 index 000000000000..b37310368881 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/EdgeCluster.php @@ -0,0 +1,75 @@ +google.cloud.gkehub.v1beta1.EdgeCluster + */ +class EdgeCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Self-link of the GCP resource for the Edge Cluster. For + * example: + * //edgecontainer.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $resource_link = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_link + * Immutable. Self-link of the GCP resource for the Edge Cluster. For + * example: + * //edgecontainer.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Self-link of the GCP resource for the Edge Cluster. For + * example: + * //edgecontainer.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getResourceLink() + { + return $this->resource_link; + } + + /** + * Immutable. Self-link of the GCP resource for the Edge Cluster. For + * example: + * //edgecontainer.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setResourceLink($var) + { + GPBUtil::checkString($var, True); + $this->resource_link = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestRequest.php new file mode 100644 index 000000000000..ef7bcab84df7 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestRequest.php @@ -0,0 +1,261 @@ +google.cloud.gkehub.v1beta1.GenerateConnectManifestRequest + */ +class GenerateConnectManifestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Membership resource name the Agent will associate with, in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The connect agent to generate manifest for. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.ConnectAgent connect_agent = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $connect_agent = null; + /** + * Optional. The Connect agent version to use. Defaults to the most current version. + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = ''; + /** + * Optional. If true, generate the resources for upgrade only. Some resources + * generated only for installation (e.g. secrets) will be excluded. + * + * Generated from protobuf field bool is_upgrade = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $is_upgrade = false; + /** + * Optional. The registry to fetch the connect agent image from. Defaults to + * gcr.io/gkeconnect. + * + * Generated from protobuf field string registry = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $registry = ''; + /** + * Optional. The image pull secret content for the registry, if not public. + * + * Generated from protobuf field bytes image_pull_secret_content = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image_pull_secret_content = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The Membership resource name the Agent will associate with, in the format + * `projects/*/locations/*/memberships/*`. + * @type \Google\Cloud\GkeHub\V1beta1\ConnectAgent $connect_agent + * Optional. The connect agent to generate manifest for. + * @type string $version + * Optional. The Connect agent version to use. Defaults to the most current version. + * @type bool $is_upgrade + * Optional. If true, generate the resources for upgrade only. Some resources + * generated only for installation (e.g. secrets) will be excluded. + * @type string $registry + * Optional. The registry to fetch the connect agent image from. Defaults to + * gcr.io/gkeconnect. + * @type string $image_pull_secret_content + * Optional. The image pull secret content for the registry, if not public. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Membership resource name the Agent will associate with, in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated 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 Membership resource name the Agent will associate with, in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 connect agent to generate manifest for. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.ConnectAgent connect_agent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1beta1\ConnectAgent|null + */ + public function getConnectAgent() + { + return $this->connect_agent; + } + + public function hasConnectAgent() + { + return isset($this->connect_agent); + } + + public function clearConnectAgent() + { + unset($this->connect_agent); + } + + /** + * Optional. The connect agent to generate manifest for. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.ConnectAgent connect_agent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1beta1\ConnectAgent $var + * @return $this + */ + public function setConnectAgent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\ConnectAgent::class); + $this->connect_agent = $var; + + return $this; + } + + /** + * Optional. The Connect agent version to use. Defaults to the most current version. + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. The Connect agent version to use. Defaults to the most current version. + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Optional. If true, generate the resources for upgrade only. Some resources + * generated only for installation (e.g. secrets) will be excluded. + * + * Generated from protobuf field bool is_upgrade = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIsUpgrade() + { + return $this->is_upgrade; + } + + /** + * Optional. If true, generate the resources for upgrade only. Some resources + * generated only for installation (e.g. secrets) will be excluded. + * + * Generated from protobuf field bool is_upgrade = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIsUpgrade($var) + { + GPBUtil::checkBool($var); + $this->is_upgrade = $var; + + return $this; + } + + /** + * Optional. The registry to fetch the connect agent image from. Defaults to + * gcr.io/gkeconnect. + * + * Generated from protobuf field string registry = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRegistry() + { + return $this->registry; + } + + /** + * Optional. The registry to fetch the connect agent image from. Defaults to + * gcr.io/gkeconnect. + * + * Generated from protobuf field string registry = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRegistry($var) + { + GPBUtil::checkString($var, True); + $this->registry = $var; + + return $this; + } + + /** + * Optional. The image pull secret content for the registry, if not public. + * + * Generated from protobuf field bytes image_pull_secret_content = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getImagePullSecretContent() + { + return $this->image_pull_secret_content; + } + + /** + * Optional. The image pull secret content for the registry, if not public. + * + * Generated from protobuf field bytes image_pull_secret_content = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setImagePullSecretContent($var) + { + GPBUtil::checkString($var, False); + $this->image_pull_secret_content = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestResponse.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestResponse.php new file mode 100644 index 000000000000..9e192e58618a --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestResponse.php @@ -0,0 +1,72 @@ +google.cloud.gkehub.v1beta1.GenerateConnectManifestResponse + */ +class GenerateConnectManifestResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The ordered list of Kubernetes resources that need to be applied to the + * cluster for GKE Connect agent installation/upgrade. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ConnectAgentResource manifest = 1; + */ + private $manifest; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\GkeHub\V1beta1\ConnectAgentResource>|\Google\Protobuf\Internal\RepeatedField $manifest + * The ordered list of Kubernetes resources that need to be applied to the + * cluster for GKE Connect agent installation/upgrade. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * The ordered list of Kubernetes resources that need to be applied to the + * cluster for GKE Connect agent installation/upgrade. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ConnectAgentResource manifest = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getManifest() + { + return $this->manifest; + } + + /** + * The ordered list of Kubernetes resources that need to be applied to the + * cluster for GKE Connect agent installation/upgrade. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ConnectAgentResource manifest = 1; + * @param array<\Google\Cloud\GkeHub\V1beta1\ConnectAgentResource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setManifest($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1beta1\ConnectAgentResource::class); + $this->manifest = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestRequest.php new file mode 100644 index 000000000000..8e8018991a7f --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestRequest.php @@ -0,0 +1,155 @@ +google.cloud.gkehub.v1beta1.GenerateExclusivityManifestRequest + */ +class GenerateExclusivityManifestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The YAML manifest of the membership CRD retrieved by + * `kubectl get customresourcedefinitions membership`. + * Leave empty if the resource does not exist. + * + * Generated from protobuf field string crd_manifest = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $crd_manifest = ''; + /** + * Optional. The YAML manifest of the membership CR retrieved by + * `kubectl get memberships membership`. + * Leave empty if the resource does not exist. + * + * Generated from protobuf field string cr_manifest = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cr_manifest = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * @type string $crd_manifest + * Optional. The YAML manifest of the membership CRD retrieved by + * `kubectl get customresourcedefinitions membership`. + * Leave empty if the resource does not exist. + * @type string $cr_manifest + * Optional. The YAML manifest of the membership CR retrieved by + * `kubectl get memberships membership`. + * Leave empty if the resource does not exist. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated 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 Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 YAML manifest of the membership CRD retrieved by + * `kubectl get customresourcedefinitions membership`. + * Leave empty if the resource does not exist. + * + * Generated from protobuf field string crd_manifest = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCrdManifest() + { + return $this->crd_manifest; + } + + /** + * Optional. The YAML manifest of the membership CRD retrieved by + * `kubectl get customresourcedefinitions membership`. + * Leave empty if the resource does not exist. + * + * Generated from protobuf field string crd_manifest = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCrdManifest($var) + { + GPBUtil::checkString($var, True); + $this->crd_manifest = $var; + + return $this; + } + + /** + * Optional. The YAML manifest of the membership CR retrieved by + * `kubectl get memberships membership`. + * Leave empty if the resource does not exist. + * + * Generated from protobuf field string cr_manifest = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCrManifest() + { + return $this->cr_manifest; + } + + /** + * Optional. The YAML manifest of the membership CR retrieved by + * `kubectl get memberships membership`. + * Leave empty if the resource does not exist. + * + * Generated from protobuf field string cr_manifest = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCrManifest($var) + { + GPBUtil::checkString($var, True); + $this->cr_manifest = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestResponse.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestResponse.php new file mode 100644 index 000000000000..101caff844b2 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestResponse.php @@ -0,0 +1,109 @@ +google.cloud.gkehub.v1beta1.GenerateExclusivityManifestResponse + */ +class GenerateExclusivityManifestResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The YAML manifest of the membership CRD to apply if a newer version of the + * CRD is available. Empty if no update needs to be applied. + * + * Generated from protobuf field string crd_manifest = 1; + */ + protected $crd_manifest = ''; + /** + * The YAML manifest of the membership CR to apply if a new version of the + * CR is available. Empty if no update needs to be applied. + * + * Generated from protobuf field string cr_manifest = 2; + */ + protected $cr_manifest = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $crd_manifest + * The YAML manifest of the membership CRD to apply if a newer version of the + * CRD is available. Empty if no update needs to be applied. + * @type string $cr_manifest + * The YAML manifest of the membership CR to apply if a new version of the + * CR is available. Empty if no update needs to be applied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * The YAML manifest of the membership CRD to apply if a newer version of the + * CRD is available. Empty if no update needs to be applied. + * + * Generated from protobuf field string crd_manifest = 1; + * @return string + */ + public function getCrdManifest() + { + return $this->crd_manifest; + } + + /** + * The YAML manifest of the membership CRD to apply if a newer version of the + * CRD is available. Empty if no update needs to be applied. + * + * Generated from protobuf field string crd_manifest = 1; + * @param string $var + * @return $this + */ + public function setCrdManifest($var) + { + GPBUtil::checkString($var, True); + $this->crd_manifest = $var; + + return $this; + } + + /** + * The YAML manifest of the membership CR to apply if a new version of the + * CR is available. Empty if no update needs to be applied. + * + * Generated from protobuf field string cr_manifest = 2; + * @return string + */ + public function getCrManifest() + { + return $this->cr_manifest; + } + + /** + * The YAML manifest of the membership CR to apply if a new version of the + * CR is available. Empty if no update needs to be applied. + * + * Generated from protobuf field string cr_manifest = 2; + * @param string $var + * @return $this + */ + public function setCrManifest($var) + { + GPBUtil::checkString($var, True); + $this->cr_manifest = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GetMembershipRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GetMembershipRequest.php new file mode 100644 index 000000000000..73c43eb9afda --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GetMembershipRequest.php @@ -0,0 +1,71 @@ +google.cloud.gkehub.v1beta1.GetMembershipRequest + */ +class GetMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * 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 Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated 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 Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeCluster.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeCluster.php new file mode 100644 index 000000000000..6cae83514f85 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeCluster.php @@ -0,0 +1,113 @@ +google.cloud.gkehub.v1beta1.GkeCluster + */ +class GkeCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Self-link of the GCP resource for the GKE cluster. For example: + * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster + * Zonal clusters are also supported. + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $resource_link = ''; + /** + * Output only. If cluster_missing is set then it denotes that the GKE cluster no longer + * exists in the GKE Control Plane. + * + * Generated from protobuf field bool cluster_missing = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cluster_missing = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_link + * Immutable. Self-link of the GCP resource for the GKE cluster. For example: + * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster + * Zonal clusters are also supported. + * @type bool $cluster_missing + * Output only. If cluster_missing is set then it denotes that the GKE cluster no longer + * exists in the GKE Control Plane. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Self-link of the GCP resource for the GKE cluster. For example: + * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster + * Zonal clusters are also supported. + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getResourceLink() + { + return $this->resource_link; + } + + /** + * Immutable. Self-link of the GCP resource for the GKE cluster. For example: + * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster + * Zonal clusters are also supported. + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setResourceLink($var) + { + GPBUtil::checkString($var, True); + $this->resource_link = $var; + + return $this; + } + + /** + * Output only. If cluster_missing is set then it denotes that the GKE cluster no longer + * exists in the GKE Control Plane. + * + * Generated from protobuf field bool cluster_missing = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getClusterMissing() + { + return $this->cluster_missing; + } + + /** + * Output only. If cluster_missing is set then it denotes that the GKE cluster no longer + * exists in the GKE Control Plane. + * + * Generated from protobuf field bool cluster_missing = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setClusterMissing($var) + { + GPBUtil::checkBool($var); + $this->cluster_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeHubMembershipServiceGrpcClient.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeHubMembershipServiceGrpcClient.php new file mode 100644 index 000000000000..56683e227bd9 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeHubMembershipServiceGrpcClient.php @@ -0,0 +1,185 @@ +_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/ListMemberships', + $argument, + ['\Google\Cloud\GkeHub\V1beta1\ListMembershipsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets the details of a Membership. + * @param \Google\Cloud\GkeHub\V1beta1\GetMembershipRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetMembership(\Google\Cloud\GkeHub\V1beta1\GetMembershipRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/GetMembership', + $argument, + ['\Google\Cloud\GkeHub\V1beta1\Membership', 'decode'], + $metadata, $options); + } + + /** + * Creates a new Membership. + * + * **This is currently only supported for GKE clusters on Google Cloud**. + * To register other clusters, follow the instructions at + * https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. + * @param \Google\Cloud\GkeHub\V1beta1\CreateMembershipRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateMembership(\Google\Cloud\GkeHub\V1beta1\CreateMembershipRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/CreateMembership', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Removes a Membership. + * + * **This is currently only supported for GKE clusters on Google Cloud**. + * To unregister other clusters, follow the instructions at + * https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. + * @param \Google\Cloud\GkeHub\V1beta1\DeleteMembershipRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteMembership(\Google\Cloud\GkeHub\V1beta1\DeleteMembershipRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/DeleteMembership', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates an existing Membership. + * @param \Google\Cloud\GkeHub\V1beta1\UpdateMembershipRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateMembership(\Google\Cloud\GkeHub\V1beta1\UpdateMembershipRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/UpdateMembership', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Generates the manifest for deployment of the GKE connect agent. + * + * **This method is used internally by Google-provided libraries.** + * Most clients should not need to call this method directly. + * @param \Google\Cloud\GkeHub\V1beta1\GenerateConnectManifestRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GenerateConnectManifest(\Google\Cloud\GkeHub\V1beta1\GenerateConnectManifestRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/GenerateConnectManifest', + $argument, + ['\Google\Cloud\GkeHub\V1beta1\GenerateConnectManifestResponse', 'decode'], + $metadata, $options); + } + + /** + * ValidateExclusivity validates the state of exclusivity in the cluster. + * The validation does not depend on an existing Hub membership resource. + * @param \Google\Cloud\GkeHub\V1beta1\ValidateExclusivityRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ValidateExclusivity(\Google\Cloud\GkeHub\V1beta1\ValidateExclusivityRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/ValidateExclusivity', + $argument, + ['\Google\Cloud\GkeHub\V1beta1\ValidateExclusivityResponse', 'decode'], + $metadata, $options); + } + + /** + * GenerateExclusivityManifest generates the manifests to update the + * exclusivity artifacts in the cluster if needed. + * + * Exclusivity artifacts include the Membership custom resource definition + * (CRD) and the singleton Membership custom resource (CR). Combined with + * ValidateExclusivity, exclusivity artifacts guarantee that a Kubernetes + * cluster is only registered to a single GKE Hub. + * + * The Membership CRD is versioned, and may require conversion when the GKE + * Hub API server begins serving a newer version of the CRD and + * corresponding CR. The response will be the converted CRD and CR if there + * are any differences between the versions. + * @param \Google\Cloud\GkeHub\V1beta1\GenerateExclusivityManifestRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GenerateExclusivityManifest(\Google\Cloud\GkeHub\V1beta1\GenerateExclusivityManifestRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/GenerateExclusivityManifest', + $argument, + ['\Google\Cloud\GkeHub\V1beta1\GenerateExclusivityManifestResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesMetadata.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesMetadata.php new file mode 100644 index 000000000000..d9b43c052789 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesMetadata.php @@ -0,0 +1,272 @@ +google.cloud.gkehub.v1beta1.KubernetesMetadata + */ +class KubernetesMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Kubernetes API server version string as reported by '/version'. + * + * Generated from protobuf field string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $kubernetes_api_server_version = ''; + /** + * Output only. Node providerID as reported by the first node in the list of nodes on + * the Kubernetes endpoint. On Kubernetes platforms that support zero-node + * clusters (like GKE-on-GCP), the node_count will be zero and the + * node_provider_id will be empty. + * + * Generated from protobuf field string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $node_provider_id = ''; + /** + * Output only. Node count as reported by Kubernetes nodes resources. + * + * Generated from protobuf field int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $node_count = 0; + /** + * Output only. vCPU count as reported by Kubernetes nodes resources. + * + * Generated from protobuf field int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $vcpu_count = 0; + /** + * Output only. The total memory capacity as reported by the sum of all Kubernetes nodes + * resources, defined in MB. + * + * Generated from protobuf field int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $memory_mb = 0; + /** + * Output only. The time at which these details were last updated. This update_time is + * different from the Membership-level update_time since EndpointDetails are + * updated internally for API consumers. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kubernetes_api_server_version + * Output only. Kubernetes API server version string as reported by '/version'. + * @type string $node_provider_id + * Output only. Node providerID as reported by the first node in the list of nodes on + * the Kubernetes endpoint. On Kubernetes platforms that support zero-node + * clusters (like GKE-on-GCP), the node_count will be zero and the + * node_provider_id will be empty. + * @type int $node_count + * Output only. Node count as reported by Kubernetes nodes resources. + * @type int $vcpu_count + * Output only. vCPU count as reported by Kubernetes nodes resources. + * @type int $memory_mb + * Output only. The total memory capacity as reported by the sum of all Kubernetes nodes + * resources, defined in MB. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which these details were last updated. This update_time is + * different from the Membership-level update_time since EndpointDetails are + * updated internally for API consumers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Kubernetes API server version string as reported by '/version'. + * + * Generated from protobuf field string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getKubernetesApiServerVersion() + { + return $this->kubernetes_api_server_version; + } + + /** + * Output only. Kubernetes API server version string as reported by '/version'. + * + * Generated from protobuf field string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setKubernetesApiServerVersion($var) + { + GPBUtil::checkString($var, True); + $this->kubernetes_api_server_version = $var; + + return $this; + } + + /** + * Output only. Node providerID as reported by the first node in the list of nodes on + * the Kubernetes endpoint. On Kubernetes platforms that support zero-node + * clusters (like GKE-on-GCP), the node_count will be zero and the + * node_provider_id will be empty. + * + * Generated from protobuf field string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNodeProviderId() + { + return $this->node_provider_id; + } + + /** + * Output only. Node providerID as reported by the first node in the list of nodes on + * the Kubernetes endpoint. On Kubernetes platforms that support zero-node + * clusters (like GKE-on-GCP), the node_count will be zero and the + * node_provider_id will be empty. + * + * Generated from protobuf field string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNodeProviderId($var) + { + GPBUtil::checkString($var, True); + $this->node_provider_id = $var; + + return $this; + } + + /** + * Output only. Node count as reported by Kubernetes nodes resources. + * + * Generated from protobuf field int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getNodeCount() + { + return $this->node_count; + } + + /** + * Output only. Node count as reported by Kubernetes nodes resources. + * + * Generated from protobuf field int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->node_count = $var; + + return $this; + } + + /** + * Output only. vCPU count as reported by Kubernetes nodes resources. + * + * Generated from protobuf field int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getVcpuCount() + { + return $this->vcpu_count; + } + + /** + * Output only. vCPU count as reported by Kubernetes nodes resources. + * + * Generated from protobuf field int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setVcpuCount($var) + { + GPBUtil::checkInt32($var); + $this->vcpu_count = $var; + + return $this; + } + + /** + * Output only. The total memory capacity as reported by the sum of all Kubernetes nodes + * resources, defined in MB. + * + * Generated from protobuf field int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getMemoryMb() + { + return $this->memory_mb; + } + + /** + * Output only. The total memory capacity as reported by the sum of all Kubernetes nodes + * resources, defined in MB. + * + * Generated from protobuf field int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setMemoryMb($var) + { + GPBUtil::checkInt32($var); + $this->memory_mb = $var; + + return $this; + } + + /** + * Output only. The time at which these details were last updated. This update_time is + * different from the Membership-level update_time since EndpointDetails are + * updated internally for API consumers. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 100 [(.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 at which these details were last updated. This update_time is + * different from the Membership-level update_time since EndpointDetails are + * updated internally for API consumers. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 100 [(.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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesResource.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesResource.php new file mode 100644 index 000000000000..67e883d2ff54 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesResource.php @@ -0,0 +1,245 @@ +google.cloud.gkehub.v1beta1.KubernetesResource + */ +class KubernetesResource extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. The YAML representation of the Membership CR. This field is ignored for GKE + * clusters where Hub can read the CR directly. + * Callers should provide the CR that is currently present in the cluster + * during CreateMembership or UpdateMembership, or leave this field empty if + * none exists. The CR manifest is used to validate the cluster has not been + * registered with another Membership. + * + * Generated from protobuf field string membership_cr_manifest = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $membership_cr_manifest = ''; + /** + * Output only. Additional Kubernetes resources that need to be applied to the cluster + * after Membership creation, and after every update. + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ResourceManifest membership_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $membership_resources; + /** + * Output only. The Kubernetes resources for installing the GKE Connect agent + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ResourceManifest connect_resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $connect_resources; + /** + * Optional. Options for Kubernetes resource generation. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.ResourceOptions resource_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $resource_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $membership_cr_manifest + * Input only. The YAML representation of the Membership CR. This field is ignored for GKE + * clusters where Hub can read the CR directly. + * Callers should provide the CR that is currently present in the cluster + * during CreateMembership or UpdateMembership, or leave this field empty if + * none exists. The CR manifest is used to validate the cluster has not been + * registered with another Membership. + * @type array<\Google\Cloud\GkeHub\V1beta1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $membership_resources + * Output only. Additional Kubernetes resources that need to be applied to the cluster + * after Membership creation, and after every update. + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * @type array<\Google\Cloud\GkeHub\V1beta1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $connect_resources + * Output only. The Kubernetes resources for installing the GKE Connect agent + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * @type \Google\Cloud\GkeHub\V1beta1\ResourceOptions $resource_options + * Optional. Options for Kubernetes resource generation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Input only. The YAML representation of the Membership CR. This field is ignored for GKE + * clusters where Hub can read the CR directly. + * Callers should provide the CR that is currently present in the cluster + * during CreateMembership or UpdateMembership, or leave this field empty if + * none exists. The CR manifest is used to validate the cluster has not been + * registered with another Membership. + * + * Generated from protobuf field string membership_cr_manifest = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getMembershipCrManifest() + { + return $this->membership_cr_manifest; + } + + /** + * Input only. The YAML representation of the Membership CR. This field is ignored for GKE + * clusters where Hub can read the CR directly. + * Callers should provide the CR that is currently present in the cluster + * during CreateMembership or UpdateMembership, or leave this field empty if + * none exists. The CR manifest is used to validate the cluster has not been + * registered with another Membership. + * + * Generated from protobuf field string membership_cr_manifest = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMembershipCrManifest($var) + { + GPBUtil::checkString($var, True); + $this->membership_cr_manifest = $var; + + return $this; + } + + /** + * Output only. Additional Kubernetes resources that need to be applied to the cluster + * after Membership creation, and after every update. + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ResourceManifest membership_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMembershipResources() + { + return $this->membership_resources; + } + + /** + * Output only. Additional Kubernetes resources that need to be applied to the cluster + * after Membership creation, and after every update. + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ResourceManifest membership_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\GkeHub\V1beta1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMembershipResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1beta1\ResourceManifest::class); + $this->membership_resources = $arr; + + return $this; + } + + /** + * Output only. The Kubernetes resources for installing the GKE Connect agent + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ResourceManifest connect_resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConnectResources() + { + return $this->connect_resources; + } + + /** + * Output only. The Kubernetes resources for installing the GKE Connect agent + * This field is only populated in the Membership returned from a successful + * long-running operation from CreateMembership or UpdateMembership. It is not + * populated during normal GetMembership or ListMemberships requests. To get + * the resource manifest after the initial registration, the caller should + * make a UpdateMembership call with an empty field mask. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ResourceManifest connect_resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\GkeHub\V1beta1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConnectResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1beta1\ResourceManifest::class); + $this->connect_resources = $arr; + + return $this; + } + + /** + * Optional. Options for Kubernetes resource generation. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.ResourceOptions resource_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1beta1\ResourceOptions|null + */ + public function getResourceOptions() + { + return $this->resource_options; + } + + public function hasResourceOptions() + { + return isset($this->resource_options); + } + + public function clearResourceOptions() + { + unset($this->resource_options); + } + + /** + * Optional. Options for Kubernetes resource generation. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.ResourceOptions resource_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1beta1\ResourceOptions $var + * @return $this + */ + public function setResourceOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\ResourceOptions::class); + $this->resource_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsRequest.php new file mode 100644 index 000000000000..f68edc4f1cad --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsRequest.php @@ -0,0 +1,267 @@ +google.cloud.gkehub.v1beta1.ListMembershipsRequest + */ +class ListMembershipsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the Memberships will 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 = ''; + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies number of + * resources to return. If unspecified or set to 0, all resources will + * be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Token returned by previous call to `ListMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Lists Memberships that match the filter expression, following the syntax + * outlined in https://google.aip.dev/160. + * Examples: + * - Name is `bar` in project `foo-proj` and location `global`: + * name = "projects/foo-proj/locations/global/membership/bar" + * - Memberships that have a label called `foo`: + * labels.foo:* + * - Memberships that have a label called `foo` whose value is `bar`: + * labels.foo = bar + * - Memberships in the CREATING state: + * state = CREATING + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the Memberships will be listed. + * Specified in the format `projects/*/locations/*`. + * @type int $page_size + * Optional. When requesting a 'page' of resources, `page_size` specifies number of + * resources to return. If unspecified or set to 0, all resources will + * be returned. + * @type string $page_token + * Optional. Token returned by previous call to `ListMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * @type string $filter + * Optional. Lists Memberships that match the filter expression, following the syntax + * outlined in https://google.aip.dev/160. + * Examples: + * - Name is `bar` in project `foo-proj` and location `global`: + * name = "projects/foo-proj/locations/global/membership/bar" + * - Memberships that have a label called `foo`: + * labels.foo:* + * - Memberships that have a label called `foo` whose value is `bar`: + * labels.foo = bar + * - Memberships in the CREATING state: + * state = CREATING + * @type string $order_by + * Optional. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the Memberships will 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 parent (project and location) where the Memberships will 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; + } + + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies number of + * resources to return. If unspecified or set to 0, all resources will + * be returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies number of + * resources to return. If unspecified or set to 0, all resources will + * be 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. Token returned by previous call to `ListMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Token returned by previous call to `ListMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * + * 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. Lists Memberships that match the filter expression, following the syntax + * outlined in https://google.aip.dev/160. + * Examples: + * - Name is `bar` in project `foo-proj` and location `global`: + * name = "projects/foo-proj/locations/global/membership/bar" + * - Memberships that have a label called `foo`: + * labels.foo:* + * - Memberships that have a label called `foo` whose value is `bar`: + * labels.foo = bar + * - Memberships in the CREATING state: + * state = CREATING + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Lists Memberships that match the filter expression, following the syntax + * outlined in https://google.aip.dev/160. + * Examples: + * - Name is `bar` in project `foo-proj` and location `global`: + * name = "projects/foo-proj/locations/global/membership/bar" + * - Memberships that have a label called `foo`: + * labels.foo:* + * - Memberships that have a label called `foo` whose value is `bar`: + * labels.foo = bar + * - Memberships in the CREATING state: + * state = CREATING + * + * 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. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * 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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsResponse.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsResponse.php new file mode 100644 index 000000000000..62d7d69fcf06 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsResponse.php @@ -0,0 +1,143 @@ +google.cloud.gkehub.v1beta1.ListMembershipsResponse + */ +class ListMembershipsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of matching Memberships. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.Membership resources = 1; + */ + private $resources; + /** + * A token to request the next page of resources from the + * `ListMemberships` method. The value of an empty string means that + * there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * List of locations that could not be reached while fetching this list. + * + * 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\GkeHub\V1beta1\Membership>|\Google\Protobuf\Internal\RepeatedField $resources + * The list of matching Memberships. + * @type string $next_page_token + * A token to request the next page of resources from the + * `ListMemberships` method. The value of an empty string means that + * there are no more resources to return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * List of locations that could not be reached while fetching this list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * The list of matching Memberships. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.Membership resources = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResources() + { + return $this->resources; + } + + /** + * The list of matching Memberships. + * + * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.Membership resources = 1; + * @param array<\Google\Cloud\GkeHub\V1beta1\Membership>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1beta1\Membership::class); + $this->resources = $arr; + + return $this; + } + + /** + * A token to request the next page of resources from the + * `ListMemberships` method. The value of an empty string means that + * there are no more resources to return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to request the next page of resources from the + * `ListMemberships` method. The value of an empty string means that + * there are no more resources to 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; + } + + /** + * List of locations that could not be reached while fetching this list. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * List of locations that could not be reached while fetching this list. + * + * 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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership.php new file mode 100644 index 000000000000..5ea34b72e12a --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership.php @@ -0,0 +1,623 @@ +google.cloud.gkehub.v1beta1.Membership + */ +class Membership extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The full, unique name of this Membership resource in the format + * `projects/*/locations/*/memberships/{membership_id}`, set during creation. + * `membership_id` must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Optional. GCP labels for this membership. + * + * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Description of this membership, limited to 63 characters. + * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. State of the Membership resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = null; + /** + * Optional. How to identify workloads from this Membership. + * See the documentation on Workload Identity for more details: + * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.Authority authority = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $authority = null; + /** + * Output only. When the Membership was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. When the Membership was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. When the Membership was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Optional. An externally-generated and managed ID for this Membership. This ID may + * be modified after creation, but this is not recommended. For GKE clusters, + * external_id is managed by the Hub API and updates will be ignored. + * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` + * If this Membership represents a Kubernetes cluster, this value should be + * set to the UID of the `kube-system` namespace object. + * + * Generated from protobuf field string external_id = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $external_id = ''; + /** + * Output only. For clusters using Connect, the timestamp of the most recent connection + * established with Google Cloud. This time is updated every several minutes, + * not continuously. For clusters that do not use GKE Connect, or that have + * never connected successfully, this field will be unset. + * + * Generated from protobuf field .google.protobuf.Timestamp last_connection_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_connection_time = null; + /** + * Output only. Google-generated UUID for this resource. This is unique across all + * Membership resources. If a Membership resource is deleted and another + * resource with the same name is created, it gets a different unique_id. + * + * Generated from protobuf field string unique_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $unique_id = ''; + /** + * Optional. The infrastructure type this Membership is running on. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership.InfrastructureType infrastructure_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $infrastructure_type = 0; + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The full, unique name of this Membership resource in the format + * `projects/*/locations/*/memberships/{membership_id}`, set during creation. + * `membership_id` must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. GCP labels for this membership. + * @type string $description + * Optional. Description of this membership, limited to 63 characters. + * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` + * @type \Google\Cloud\GkeHub\V1beta1\MembershipEndpoint $endpoint + * Optional. Endpoint information to reach this member. + * @type \Google\Cloud\GkeHub\V1beta1\MembershipState $state + * Output only. State of the Membership resource. + * @type \Google\Cloud\GkeHub\V1beta1\Authority $authority + * Optional. How to identify workloads from this Membership. + * See the documentation on Workload Identity for more details: + * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + * @type \Google\Protobuf\Timestamp $create_time + * Output only. When the Membership was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. When the Membership was last updated. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. When the Membership was deleted. + * @type string $external_id + * Optional. An externally-generated and managed ID for this Membership. This ID may + * be modified after creation, but this is not recommended. For GKE clusters, + * external_id is managed by the Hub API and updates will be ignored. + * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` + * If this Membership represents a Kubernetes cluster, this value should be + * set to the UID of the `kube-system` namespace object. + * @type \Google\Protobuf\Timestamp $last_connection_time + * Output only. For clusters using Connect, the timestamp of the most recent connection + * established with Google Cloud. This time is updated every several minutes, + * not continuously. For clusters that do not use GKE Connect, or that have + * never connected successfully, this field will be unset. + * @type string $unique_id + * Output only. Google-generated UUID for this resource. This is unique across all + * Membership resources. If a Membership resource is deleted and another + * resource with the same name is created, it gets a different unique_id. + * @type int $infrastructure_type + * Optional. The infrastructure type this Membership is running on. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The full, unique name of this Membership resource in the format + * `projects/*/locations/*/memberships/{membership_id}`, set during creation. + * `membership_id` must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * 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, unique name of this Membership resource in the format + * `projects/*/locations/*/memberships/{membership_id}`, set during creation. + * `membership_id` must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * + * 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. GCP labels for this membership. + * + * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. GCP labels for this membership. + * + * 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. Description of this membership, limited to 63 characters. + * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of this membership, limited to 63 characters. + * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Endpoint information to reach this member. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipEndpoint endpoint = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1beta1\MembershipEndpoint|null + */ + public function getEndpoint() + { + return $this->readOneof(4); + } + + public function hasEndpoint() + { + return $this->hasOneof(4); + } + + /** + * Optional. Endpoint information to reach this member. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipEndpoint endpoint = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1beta1\MembershipEndpoint $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\MembershipEndpoint::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Output only. State of the Membership resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeHub\V1beta1\MembershipState|null + */ + public function getState() + { + return $this->state; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * Output only. State of the Membership resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeHub\V1beta1\MembershipState $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\MembershipState::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. How to identify workloads from this Membership. + * See the documentation on Workload Identity for more details: + * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.Authority authority = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1beta1\Authority|null + */ + public function getAuthority() + { + return $this->authority; + } + + public function hasAuthority() + { + return isset($this->authority); + } + + public function clearAuthority() + { + unset($this->authority); + } + + /** + * Optional. How to identify workloads from this Membership. + * See the documentation on Workload Identity for more details: + * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.Authority authority = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1beta1\Authority $var + * @return $this + */ + public function setAuthority($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\Authority::class); + $this->authority = $var; + + return $this; + } + + /** + * Output only. When the Membership 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. When the Membership 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; + } + + /** + * Output only. When the Membership was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.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. When the Membership was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.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. When the Membership was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. When the Membership was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Optional. An externally-generated and managed ID for this Membership. This ID may + * be modified after creation, but this is not recommended. For GKE clusters, + * external_id is managed by the Hub API and updates will be ignored. + * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` + * If this Membership represents a Kubernetes cluster, this value should be + * set to the UID of the `kube-system` namespace object. + * + * Generated from protobuf field string external_id = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getExternalId() + { + return $this->external_id; + } + + /** + * Optional. An externally-generated and managed ID for this Membership. This ID may + * be modified after creation, but this is not recommended. For GKE clusters, + * external_id is managed by the Hub API and updates will be ignored. + * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` + * If this Membership represents a Kubernetes cluster, this value should be + * set to the UID of the `kube-system` namespace object. + * + * Generated from protobuf field string external_id = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setExternalId($var) + { + GPBUtil::checkString($var, True); + $this->external_id = $var; + + return $this; + } + + /** + * Output only. For clusters using Connect, the timestamp of the most recent connection + * established with Google Cloud. This time is updated every several minutes, + * not continuously. For clusters that do not use GKE Connect, or that have + * never connected successfully, this field will be unset. + * + * Generated from protobuf field .google.protobuf.Timestamp last_connection_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastConnectionTime() + { + return $this->last_connection_time; + } + + public function hasLastConnectionTime() + { + return isset($this->last_connection_time); + } + + public function clearLastConnectionTime() + { + unset($this->last_connection_time); + } + + /** + * Output only. For clusters using Connect, the timestamp of the most recent connection + * established with Google Cloud. This time is updated every several minutes, + * not continuously. For clusters that do not use GKE Connect, or that have + * never connected successfully, this field will be unset. + * + * Generated from protobuf field .google.protobuf.Timestamp last_connection_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastConnectionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_connection_time = $var; + + return $this; + } + + /** + * Output only. Google-generated UUID for this resource. This is unique across all + * Membership resources. If a Membership resource is deleted and another + * resource with the same name is created, it gets a different unique_id. + * + * Generated from protobuf field string unique_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUniqueId() + { + return $this->unique_id; + } + + /** + * Output only. Google-generated UUID for this resource. This is unique across all + * Membership resources. If a Membership resource is deleted and another + * resource with the same name is created, it gets a different unique_id. + * + * Generated from protobuf field string unique_id = 12 [(.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; + } + + /** + * Optional. The infrastructure type this Membership is running on. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership.InfrastructureType infrastructure_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getInfrastructureType() + { + return $this->infrastructure_type; + } + + /** + * Optional. The infrastructure type this Membership is running on. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership.InfrastructureType infrastructure_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setInfrastructureType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1beta1\Membership\InfrastructureType::class); + $this->infrastructure_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership/InfrastructureType.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership/InfrastructureType.php new file mode 100644 index 000000000000..1ea7d7212c58 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership/InfrastructureType.php @@ -0,0 +1,70 @@ +google.cloud.gkehub.v1beta1.Membership.InfrastructureType + */ +class InfrastructureType +{ + /** + * No type was specified. Some Hub functionality may require a type be + * specified, and will not support Memberships with this value. + * + * Generated from protobuf enum INFRASTRUCTURE_TYPE_UNSPECIFIED = 0; + */ + const INFRASTRUCTURE_TYPE_UNSPECIFIED = 0; + /** + * Private infrastructure that is owned or operated by customer. This + * includes GKE distributions such as GKE-OnPrem and GKE-OnBareMetal. + * + * Generated from protobuf enum ON_PREM = 1; + */ + const ON_PREM = 1; + /** + * Public cloud infrastructure. + * + * Generated from protobuf enum MULTI_CLOUD = 2; + */ + const MULTI_CLOUD = 2; + + private static $valueToName = [ + self::INFRASTRUCTURE_TYPE_UNSPECIFIED => 'INFRASTRUCTURE_TYPE_UNSPECIFIED', + self::ON_PREM => 'ON_PREM', + self::MULTI_CLOUD => 'MULTI_CLOUD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InfrastructureType::class, \Google\Cloud\GkeHub\V1beta1\Membership_InfrastructureType::class); + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipEndpoint.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipEndpoint.php new file mode 100644 index 000000000000..099118f49f22 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipEndpoint.php @@ -0,0 +1,326 @@ +google.cloud.gkehub.v1beta1.MembershipEndpoint + */ +class MembershipEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Useful Kubernetes-specific metadata. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.KubernetesMetadata kubernetes_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $kubernetes_metadata = null; + /** + * Optional. The in-cluster Kubernetes Resources that should be applied for a correctly + * registered cluster, in the steady state. These resources: + * * Ensure that the cluster is exclusively registered to one and only one + * Hub Membership. + * * Propagate Workload Pool Information available in the Membership + * Authority field. + * * Ensure proper initial configuration of default Hub Features. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.KubernetesResource kubernetes_resource = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $kubernetes_resource = null; + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\GkeHub\V1beta1\GkeCluster $gke_cluster + * Optional. Specific information for a GKE-on-GCP cluster. + * @type \Google\Cloud\GkeHub\V1beta1\OnPremCluster $on_prem_cluster + * Optional. Specific information for a GKE On-Prem cluster. An onprem user-cluster + * who has no resourceLink is not allowed to use this field, it should have + * a nil "type" instead. + * @type \Google\Cloud\GkeHub\V1beta1\MultiCloudCluster $multi_cloud_cluster + * Optional. Specific information for a GKE Multi-Cloud cluster. + * @type \Google\Cloud\GkeHub\V1beta1\EdgeCluster $edge_cluster + * Optional. Specific information for a Google Edge cluster. + * @type \Google\Cloud\GkeHub\V1beta1\ApplianceCluster $appliance_cluster + * Optional. Specific information for a GDC Edge Appliance cluster. + * @type \Google\Cloud\GkeHub\V1beta1\KubernetesMetadata $kubernetes_metadata + * Output only. Useful Kubernetes-specific metadata. + * @type \Google\Cloud\GkeHub\V1beta1\KubernetesResource $kubernetes_resource + * Optional. The in-cluster Kubernetes Resources that should be applied for a correctly + * registered cluster, in the steady state. These resources: + * * Ensure that the cluster is exclusively registered to one and only one + * Hub Membership. + * * Propagate Workload Pool Information available in the Membership + * Authority field. + * * Ensure proper initial configuration of default Hub Features. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Specific information for a GKE-on-GCP cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.GkeCluster gke_cluster = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1beta1\GkeCluster|null + */ + public function getGkeCluster() + { + return $this->readOneof(4); + } + + public function hasGkeCluster() + { + return $this->hasOneof(4); + } + + /** + * Optional. Specific information for a GKE-on-GCP cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.GkeCluster gke_cluster = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1beta1\GkeCluster $var + * @return $this + */ + public function setGkeCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\GkeCluster::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. Specific information for a GKE On-Prem cluster. An onprem user-cluster + * who has no resourceLink is not allowed to use this field, it should have + * a nil "type" instead. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.OnPremCluster on_prem_cluster = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1beta1\OnPremCluster|null + */ + public function getOnPremCluster() + { + return $this->readOneof(7); + } + + public function hasOnPremCluster() + { + return $this->hasOneof(7); + } + + /** + * Optional. Specific information for a GKE On-Prem cluster. An onprem user-cluster + * who has no resourceLink is not allowed to use this field, it should have + * a nil "type" instead. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.OnPremCluster on_prem_cluster = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1beta1\OnPremCluster $var + * @return $this + */ + public function setOnPremCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\OnPremCluster::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Optional. Specific information for a GKE Multi-Cloud cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.MultiCloudCluster multi_cloud_cluster = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1beta1\MultiCloudCluster|null + */ + public function getMultiCloudCluster() + { + return $this->readOneof(8); + } + + public function hasMultiCloudCluster() + { + return $this->hasOneof(8); + } + + /** + * Optional. Specific information for a GKE Multi-Cloud cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.MultiCloudCluster multi_cloud_cluster = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1beta1\MultiCloudCluster $var + * @return $this + */ + public function setMultiCloudCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\MultiCloudCluster::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Optional. Specific information for a Google Edge cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.EdgeCluster edge_cluster = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1beta1\EdgeCluster|null + */ + public function getEdgeCluster() + { + return $this->readOneof(9); + } + + public function hasEdgeCluster() + { + return $this->hasOneof(9); + } + + /** + * Optional. Specific information for a Google Edge cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.EdgeCluster edge_cluster = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1beta1\EdgeCluster $var + * @return $this + */ + public function setEdgeCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\EdgeCluster::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Optional. Specific information for a GDC Edge Appliance cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.ApplianceCluster appliance_cluster = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1beta1\ApplianceCluster|null + */ + public function getApplianceCluster() + { + return $this->readOneof(10); + } + + public function hasApplianceCluster() + { + return $this->hasOneof(10); + } + + /** + * Optional. Specific information for a GDC Edge Appliance cluster. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.ApplianceCluster appliance_cluster = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1beta1\ApplianceCluster $var + * @return $this + */ + public function setApplianceCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\ApplianceCluster::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Output only. Useful Kubernetes-specific metadata. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.KubernetesMetadata kubernetes_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\GkeHub\V1beta1\KubernetesMetadata|null + */ + public function getKubernetesMetadata() + { + return $this->kubernetes_metadata; + } + + public function hasKubernetesMetadata() + { + return isset($this->kubernetes_metadata); + } + + public function clearKubernetesMetadata() + { + unset($this->kubernetes_metadata); + } + + /** + * Output only. Useful Kubernetes-specific metadata. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.KubernetesMetadata kubernetes_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\GkeHub\V1beta1\KubernetesMetadata $var + * @return $this + */ + public function setKubernetesMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\KubernetesMetadata::class); + $this->kubernetes_metadata = $var; + + return $this; + } + + /** + * Optional. The in-cluster Kubernetes Resources that should be applied for a correctly + * registered cluster, in the steady state. These resources: + * * Ensure that the cluster is exclusively registered to one and only one + * Hub Membership. + * * Propagate Workload Pool Information available in the Membership + * Authority field. + * * Ensure proper initial configuration of default Hub Features. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.KubernetesResource kubernetes_resource = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeHub\V1beta1\KubernetesResource|null + */ + public function getKubernetesResource() + { + return $this->kubernetes_resource; + } + + public function hasKubernetesResource() + { + return isset($this->kubernetes_resource); + } + + public function clearKubernetesResource() + { + unset($this->kubernetes_resource); + } + + /** + * Optional. The in-cluster Kubernetes Resources that should be applied for a correctly + * registered cluster, in the steady state. These resources: + * * Ensure that the cluster is exclusively registered to one and only one + * Hub Membership. + * * Propagate Workload Pool Information available in the Membership + * Authority field. + * * Ensure proper initial configuration of default Hub Features. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.KubernetesResource kubernetes_resource = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeHub\V1beta1\KubernetesResource $var + * @return $this + */ + public function setKubernetesResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\KubernetesResource::class); + $this->kubernetes_resource = $var; + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState.php new file mode 100644 index 000000000000..8691c8abb1fe --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState.php @@ -0,0 +1,157 @@ +google.cloud.gkehub.v1beta1.MembershipState + */ +class MembershipState extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The current state of the Membership resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $code = 0; + /** + * This field is never set by the Hub Service. + * + * Generated from protobuf field string description = 2 [deprecated = true]; + * @deprecated + */ + protected $description = ''; + /** + * This field is never set by the Hub Service. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [deprecated = true]; + * @deprecated + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Output only. The current state of the Membership resource. + * @type string $description + * This field is never set by the Hub Service. + * @type \Google\Protobuf\Timestamp $update_time + * This field is never set by the Hub Service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The current state of the Membership resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Output only. The current state of the Membership resource. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1beta1\MembershipState\Code::class); + $this->code = $var; + + return $this; + } + + /** + * This field is never set by the Hub Service. + * + * Generated from protobuf field string description = 2 [deprecated = true]; + * @return string + * @deprecated + */ + public function getDescription() + { + @trigger_error('description is deprecated.', E_USER_DEPRECATED); + return $this->description; + } + + /** + * This field is never set by the Hub Service. + * + * Generated from protobuf field string description = 2 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setDescription($var) + { + @trigger_error('description is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * This field is never set by the Hub Service. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [deprecated = true]; + * @return \Google\Protobuf\Timestamp|null + * @deprecated + */ + public function getUpdateTime() + { + @trigger_error('update_time is deprecated.', E_USER_DEPRECATED); + return $this->update_time; + } + + public function hasUpdateTime() + { + @trigger_error('update_time is deprecated.', E_USER_DEPRECATED); + return isset($this->update_time); + } + + public function clearUpdateTime() + { + @trigger_error('update_time is deprecated.', E_USER_DEPRECATED); + unset($this->update_time); + } + + /** + * This field is never set by the Hub Service. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [deprecated = true]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + * @deprecated + */ + public function setUpdateTime($var) + { + @trigger_error('update_time is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState/Code.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState/Code.php new file mode 100644 index 000000000000..8b63c2a88ee8 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState/Code.php @@ -0,0 +1,85 @@ +google.cloud.gkehub.v1beta1.MembershipState.Code + */ +class Code +{ + /** + * The code is not set. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * The cluster is being registered. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The cluster is registered. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * The cluster is being unregistered. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The Membership is being updated. + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + /** + * The Membership is being updated by the Hub Service. + * + * Generated from protobuf enum SERVICE_UPDATING = 5; + */ + const SERVICE_UPDATING = 5; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + self::SERVICE_UPDATING => 'SERVICE_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(Code::class, \Google\Cloud\GkeHub\V1beta1\MembershipState_Code::class); + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState_Code.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState_Code.php new file mode 100644 index 000000000000..ed81f624ddab --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState_Code.php @@ -0,0 +1,16 @@ +google.cloud.gkehub.v1beta1.MultiCloudCluster + */ +class MultiCloudCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Self-link of the GCP resource for the GKE Multi-Cloud cluster. For + * example: + * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/awsClusters/my-cluster + * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/azureClusters/my-cluster + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $resource_link = ''; + /** + * Output only. If cluster_missing is set then it denotes that + * API(gkemulticloud.googleapis.com) resource for this GKE Multi-Cloud cluster + * no longer exists. + * + * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cluster_missing = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_link + * Immutable. Self-link of the GCP resource for the GKE Multi-Cloud cluster. For + * example: + * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/awsClusters/my-cluster + * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/azureClusters/my-cluster + * @type bool $cluster_missing + * Output only. If cluster_missing is set then it denotes that + * API(gkemulticloud.googleapis.com) resource for this GKE Multi-Cloud cluster + * no longer exists. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Self-link of the GCP resource for the GKE Multi-Cloud cluster. For + * example: + * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/awsClusters/my-cluster + * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/azureClusters/my-cluster + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getResourceLink() + { + return $this->resource_link; + } + + /** + * Immutable. Self-link of the GCP resource for the GKE Multi-Cloud cluster. For + * example: + * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/awsClusters/my-cluster + * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/azureClusters/my-cluster + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setResourceLink($var) + { + GPBUtil::checkString($var, True); + $this->resource_link = $var; + + return $this; + } + + /** + * Output only. If cluster_missing is set then it denotes that + * API(gkemulticloud.googleapis.com) resource for this GKE Multi-Cloud cluster + * no longer exists. + * + * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getClusterMissing() + { + return $this->cluster_missing; + } + + /** + * Output only. If cluster_missing is set then it denotes that + * API(gkemulticloud.googleapis.com) resource for this GKE Multi-Cloud cluster + * no longer exists. + * + * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setClusterMissing($var) + { + GPBUtil::checkBool($var); + $this->cluster_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster.php new file mode 100644 index 000000000000..fb786127d368 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster.php @@ -0,0 +1,185 @@ +google.cloud.gkehub.v1beta1.OnPremCluster + */ +class OnPremCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Self-link of the GCP resource for the GKE On-Prem cluster. For example: + * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/vmwareClusters/my-cluster + * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/bareMetalClusters/my-cluster + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $resource_link = ''; + /** + * Output only. If cluster_missing is set then it denotes that + * API(gkeonprem.googleapis.com) resource for this GKE On-Prem cluster no + * longer exists. + * + * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cluster_missing = false; + /** + * Immutable. Whether the cluster is an admin cluster. + * + * Generated from protobuf field bool admin_cluster = 3 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $admin_cluster = false; + /** + * Immutable. The on prem cluster's type. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.OnPremCluster.ClusterType cluster_type = 4 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $cluster_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_link + * Immutable. Self-link of the GCP resource for the GKE On-Prem cluster. For example: + * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/vmwareClusters/my-cluster + * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/bareMetalClusters/my-cluster + * @type bool $cluster_missing + * Output only. If cluster_missing is set then it denotes that + * API(gkeonprem.googleapis.com) resource for this GKE On-Prem cluster no + * longer exists. + * @type bool $admin_cluster + * Immutable. Whether the cluster is an admin cluster. + * @type int $cluster_type + * Immutable. The on prem cluster's type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Self-link of the GCP resource for the GKE On-Prem cluster. For example: + * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/vmwareClusters/my-cluster + * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/bareMetalClusters/my-cluster + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getResourceLink() + { + return $this->resource_link; + } + + /** + * Immutable. Self-link of the GCP resource for the GKE On-Prem cluster. For example: + * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/vmwareClusters/my-cluster + * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/bareMetalClusters/my-cluster + * + * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setResourceLink($var) + { + GPBUtil::checkString($var, True); + $this->resource_link = $var; + + return $this; + } + + /** + * Output only. If cluster_missing is set then it denotes that + * API(gkeonprem.googleapis.com) resource for this GKE On-Prem cluster no + * longer exists. + * + * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getClusterMissing() + { + return $this->cluster_missing; + } + + /** + * Output only. If cluster_missing is set then it denotes that + * API(gkeonprem.googleapis.com) resource for this GKE On-Prem cluster no + * longer exists. + * + * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setClusterMissing($var) + { + GPBUtil::checkBool($var); + $this->cluster_missing = $var; + + return $this; + } + + /** + * Immutable. Whether the cluster is an admin cluster. + * + * Generated from protobuf field bool admin_cluster = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @return bool + */ + public function getAdminCluster() + { + return $this->admin_cluster; + } + + /** + * Immutable. Whether the cluster is an admin cluster. + * + * Generated from protobuf field bool admin_cluster = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @param bool $var + * @return $this + */ + public function setAdminCluster($var) + { + GPBUtil::checkBool($var); + $this->admin_cluster = $var; + + return $this; + } + + /** + * Immutable. The on prem cluster's type. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.OnPremCluster.ClusterType cluster_type = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getClusterType() + { + return $this->cluster_type; + } + + /** + * Immutable. The on prem cluster's type. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.OnPremCluster.ClusterType cluster_type = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setClusterType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1beta1\OnPremCluster\ClusterType::class); + $this->cluster_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster/ClusterType.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster/ClusterType.php new file mode 100644 index 000000000000..28a857e861c6 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster/ClusterType.php @@ -0,0 +1,78 @@ +google.cloud.gkehub.v1beta1.OnPremCluster.ClusterType + */ +class ClusterType +{ + /** + * The ClusterType is not set. + * + * Generated from protobuf enum CLUSTERTYPE_UNSPECIFIED = 0; + */ + const CLUSTERTYPE_UNSPECIFIED = 0; + /** + * The ClusterType is bootstrap cluster. + * + * Generated from protobuf enum BOOTSTRAP = 1; + */ + const BOOTSTRAP = 1; + /** + * The ClusterType is baremetal hybrid cluster. + * + * Generated from protobuf enum HYBRID = 2; + */ + const HYBRID = 2; + /** + * The ClusterType is baremetal standalone cluster. + * + * Generated from protobuf enum STANDALONE = 3; + */ + const STANDALONE = 3; + /** + * The ClusterType is user cluster. + * + * Generated from protobuf enum USER = 4; + */ + const USER = 4; + + private static $valueToName = [ + self::CLUSTERTYPE_UNSPECIFIED => 'CLUSTERTYPE_UNSPECIFIED', + self::BOOTSTRAP => 'BOOTSTRAP', + self::HYBRID => 'HYBRID', + self::STANDALONE => 'STANDALONE', + self::USER => 'USER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ClusterType::class, \Google\Cloud\GkeHub\V1beta1\OnPremCluster_ClusterType::class); + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster_ClusterType.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster_ClusterType.php new file mode 100644 index 000000000000..f5a979f0e89c --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster_ClusterType.php @@ -0,0 +1,16 @@ +google.cloud.gkehub.v1beta1.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_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. 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_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\Gkehub\V1Beta1\Membership::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_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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceManifest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceManifest.php new file mode 100644 index 000000000000..0cde0ed74bc1 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceManifest.php @@ -0,0 +1,114 @@ +google.cloud.gkehub.v1beta1.ResourceManifest + */ +class ResourceManifest extends \Google\Protobuf\Internal\Message +{ + /** + * YAML manifest of the resource. + * + * Generated from protobuf field string manifest = 1; + */ + protected $manifest = ''; + /** + * Whether the resource provided in the manifest is `cluster_scoped`. + * If unset, the manifest is assumed to be namespace scoped. + * This field is used for REST mapping when applying the resource in a + * cluster. + * + * Generated from protobuf field bool cluster_scoped = 2; + */ + protected $cluster_scoped = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $manifest + * YAML manifest of the resource. + * @type bool $cluster_scoped + * Whether the resource provided in the manifest is `cluster_scoped`. + * If unset, the manifest is assumed to be namespace scoped. + * This field is used for REST mapping when applying the resource in a + * cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * YAML manifest of the resource. + * + * Generated from protobuf field string manifest = 1; + * @return string + */ + public function getManifest() + { + return $this->manifest; + } + + /** + * YAML manifest of the resource. + * + * Generated from protobuf field string manifest = 1; + * @param string $var + * @return $this + */ + public function setManifest($var) + { + GPBUtil::checkString($var, True); + $this->manifest = $var; + + return $this; + } + + /** + * Whether the resource provided in the manifest is `cluster_scoped`. + * If unset, the manifest is assumed to be namespace scoped. + * This field is used for REST mapping when applying the resource in a + * cluster. + * + * Generated from protobuf field bool cluster_scoped = 2; + * @return bool + */ + public function getClusterScoped() + { + return $this->cluster_scoped; + } + + /** + * Whether the resource provided in the manifest is `cluster_scoped`. + * If unset, the manifest is assumed to be namespace scoped. + * This field is used for REST mapping when applying the resource in a + * cluster. + * + * Generated from protobuf field bool cluster_scoped = 2; + * @param bool $var + * @return $this + */ + public function setClusterScoped($var) + { + GPBUtil::checkBool($var); + $this->cluster_scoped = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceOptions.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceOptions.php new file mode 100644 index 000000000000..9d0802994ea1 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceOptions.php @@ -0,0 +1,163 @@ +google.cloud.gkehub.v1beta1.ResourceOptions + */ +class ResourceOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The Connect agent version to use for connect_resources. Defaults to the + * latest GKE Connect version. The version must be a currently supported + * version, obsolete versions will be rejected. + * + * Generated from protobuf field string connect_version = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $connect_version = ''; + /** + * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for + * CustomResourceDefinition resources. + * This option should be set for clusters with Kubernetes apiserver versions + * <1.16. + * + * Generated from protobuf field bool v1beta1_crd = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $v1beta1_crd = false; + /** + * Optional. Major version of the Kubernetes cluster. This is only used to determine + * which version to use for the CustomResourceDefinition resources, + * `apiextensions/v1beta1` or`apiextensions/v1`. + * + * Generated from protobuf field string k8s_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $k8s_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $connect_version + * Optional. The Connect agent version to use for connect_resources. Defaults to the + * latest GKE Connect version. The version must be a currently supported + * version, obsolete versions will be rejected. + * @type bool $v1beta1_crd + * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for + * CustomResourceDefinition resources. + * This option should be set for clusters with Kubernetes apiserver versions + * <1.16. + * @type string $k8s_version + * Optional. Major version of the Kubernetes cluster. This is only used to determine + * which version to use for the CustomResourceDefinition resources, + * `apiextensions/v1beta1` or`apiextensions/v1`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The Connect agent version to use for connect_resources. Defaults to the + * latest GKE Connect version. The version must be a currently supported + * version, obsolete versions will be rejected. + * + * Generated from protobuf field string connect_version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getConnectVersion() + { + return $this->connect_version; + } + + /** + * Optional. The Connect agent version to use for connect_resources. Defaults to the + * latest GKE Connect version. The version must be a currently supported + * version, obsolete versions will be rejected. + * + * Generated from protobuf field string connect_version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setConnectVersion($var) + { + GPBUtil::checkString($var, True); + $this->connect_version = $var; + + return $this; + } + + /** + * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for + * CustomResourceDefinition resources. + * This option should be set for clusters with Kubernetes apiserver versions + * <1.16. + * + * Generated from protobuf field bool v1beta1_crd = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getV1Beta1Crd() + { + return $this->v1beta1_crd; + } + + /** + * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for + * CustomResourceDefinition resources. + * This option should be set for clusters with Kubernetes apiserver versions + * <1.16. + * + * Generated from protobuf field bool v1beta1_crd = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setV1Beta1Crd($var) + { + GPBUtil::checkBool($var); + $this->v1beta1_crd = $var; + + return $this; + } + + /** + * Optional. Major version of the Kubernetes cluster. This is only used to determine + * which version to use for the CustomResourceDefinition resources, + * `apiextensions/v1beta1` or`apiextensions/v1`. + * + * Generated from protobuf field string k8s_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getK8SVersion() + { + return $this->k8s_version; + } + + /** + * Optional. Major version of the Kubernetes cluster. This is only used to determine + * which version to use for the CustomResourceDefinition resources, + * `apiextensions/v1beta1` or`apiextensions/v1`. + * + * Generated from protobuf field string k8s_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setK8SVersion($var) + { + GPBUtil::checkString($var, True); + $this->k8s_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/TypeMeta.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/TypeMeta.php new file mode 100644 index 000000000000..989ef46f9519 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/TypeMeta.php @@ -0,0 +1,102 @@ +google.cloud.gkehub.v1beta1.TypeMeta + */ +class TypeMeta extends \Google\Protobuf\Internal\Message +{ + /** + * Kind of the resource (e.g. Deployment). + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * APIVersion of the resource (e.g. v1). + * + * Generated from protobuf field string api_version = 2; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * Kind of the resource (e.g. Deployment). + * @type string $api_version + * APIVersion of the resource (e.g. v1). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Kind of the resource (e.g. Deployment). + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * Kind of the resource (e.g. Deployment). + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * APIVersion of the resource (e.g. v1). + * + * Generated from protobuf field string api_version = 2; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * APIVersion of the resource (e.g. v1). + * + * Generated from protobuf field string api_version = 2; + * @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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/UpdateMembershipRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/UpdateMembershipRequest.php new file mode 100644 index 000000000000..779c727a1ff0 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/UpdateMembershipRequest.php @@ -0,0 +1,265 @@ +google.cloud.gkehub.v1beta1.UpdateMembershipRequest + */ +class UpdateMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The membership resource name in the format: + * `projects/[project_id]/locations/global/memberships/[membership_id]` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Mask of fields to update. At least one field path must be specified in this + * mask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource = null; + /** + * Optional. A 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The membership resource name in the format: + * `projects/[project_id]/locations/global/memberships/[membership_id]` + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one field path must be specified in this + * mask. + * @type \Google\Cloud\GkeHub\V1beta1\Membership $resource + * Required. Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * @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 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\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. The membership resource name in the format: + * `projects/[project_id]/locations/global/memberships/[membership_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 membership resource name in the format: + * `projects/[project_id]/locations/global/memberships/[membership_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. Mask of fields to update. At least one field path must be specified in this + * mask. + * + * 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. At least one field path must be specified in this + * mask. + * + * 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; + } + + /** + * Required. Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\GkeHub\V1beta1\Membership|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. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * + * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\GkeHub\V1beta1\Membership $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\Membership::class); + $this->resource = $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 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 = 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 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 = 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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityRequest.php new file mode 100644 index 000000000000..c55ce061b402 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityRequest.php @@ -0,0 +1,148 @@ +google.cloud.gkehub.v1beta1.ValidateExclusivityRequest + */ +class ValidateExclusivityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent (project and location) where the Memberships will be created. + * Specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The YAML of the membership CR in the cluster. Empty if the membership + * CR does not exist. + * + * Generated from protobuf field string cr_manifest = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cr_manifest = ''; + /** + * Required. The intended membership name under the `parent`. This method only does + * validation in anticipation of a CreateMembership call with the same name. + * + * Generated from protobuf field string intended_membership = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intended_membership = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent (project and location) where the Memberships will be created. + * Specified in the format `projects/*/locations/*`. + * @type string $cr_manifest + * Optional. The YAML of the membership CR in the cluster. Empty if the membership + * CR does not exist. + * @type string $intended_membership + * Required. The intended membership name under the `parent`. This method only does + * validation in anticipation of a CreateMembership call with the same name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent (project and location) where the Memberships will be created. + * 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 parent (project and location) where the Memberships will be created. + * 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; + } + + /** + * Optional. The YAML of the membership CR in the cluster. Empty if the membership + * CR does not exist. + * + * Generated from protobuf field string cr_manifest = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCrManifest() + { + return $this->cr_manifest; + } + + /** + * Optional. The YAML of the membership CR in the cluster. Empty if the membership + * CR does not exist. + * + * Generated from protobuf field string cr_manifest = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCrManifest($var) + { + GPBUtil::checkString($var, True); + $this->cr_manifest = $var; + + return $this; + } + + /** + * Required. The intended membership name under the `parent`. This method only does + * validation in anticipation of a CreateMembership call with the same name. + * + * Generated from protobuf field string intended_membership = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getIntendedMembership() + { + return $this->intended_membership; + } + + /** + * Required. The intended membership name under the `parent`. This method only does + * validation in anticipation of a CreateMembership call with the same name. + * + * Generated from protobuf field string intended_membership = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setIntendedMembership($var) + { + GPBUtil::checkString($var, True); + $this->intended_membership = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityResponse.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityResponse.php new file mode 100644 index 000000000000..05a5a73831d7 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityResponse.php @@ -0,0 +1,93 @@ +google.cloud.gkehub.v1beta1.ValidateExclusivityResponse + */ +class ValidateExclusivityResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The validation result. + * * `OK` means that exclusivity is validated, assuming the manifest produced + * by GenerateExclusivityManifest is successfully applied. + * * `ALREADY_EXISTS` means that the Membership CRD is already owned by + * another Hub. See `status.message` for more information. + * + * Generated from protobuf field .google.rpc.Status status = 1; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Rpc\Status $status + * The validation result. + * * `OK` means that exclusivity is validated, assuming the manifest produced + * by GenerateExclusivityManifest is successfully applied. + * * `ALREADY_EXISTS` means that the Membership CRD is already owned by + * another Hub. See `status.message` for more information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * The validation result. + * * `OK` means that exclusivity is validated, assuming the manifest produced + * by GenerateExclusivityManifest is successfully applied. + * * `ALREADY_EXISTS` means that the Membership CRD is already owned by + * another Hub. See `status.message` for more information. + * + * 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 validation result. + * * `OK` means that exclusivity is validated, assuming the manifest produced + * by GenerateExclusivityManifest is successfully applied. + * * `ALREADY_EXISTS` means that the Membership CRD is already owned by + * another Hub. See `status.message` for more information. + * + * 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; + } + +} + diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/create_membership.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/create_membership.php new file mode 100644 index 000000000000..d66be83664d3 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/create_membership.php @@ -0,0 +1,100 @@ +createMembership( + $formattedParent, + $membershipId, + $resource + ); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Membership $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GkeHubMembershipServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $membershipId = '[MEMBERSHIP_ID]'; + + create_membership_sample($formattedParent, $membershipId); +} +// [END gkehub_v1beta1_generated_GkeHubMembershipService_CreateMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/delete_membership.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/delete_membership.php new file mode 100644 index 000000000000..9c423841d80c --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/delete_membership.php @@ -0,0 +1,84 @@ +deleteMembership($formattedName); + $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 = GkeHubMembershipServiceClient::membershipName( + '[PROJECT]', + '[LOCATION]', + '[MEMBERSHIP]' + ); + + delete_membership_sample($formattedName); +} +// [END gkehub_v1beta1_generated_GkeHubMembershipService_DeleteMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_connect_manifest.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_connect_manifest.php new file mode 100644 index 000000000000..c91ff100e1fa --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_connect_manifest.php @@ -0,0 +1,74 @@ +generateConnectManifest($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GkeHubMembershipServiceClient::membershipName( + '[PROJECT]', + '[LOCATION]', + '[MEMBERSHIP]' + ); + + generate_connect_manifest_sample($formattedName); +} +// [END gkehub_v1beta1_generated_GkeHubMembershipService_GenerateConnectManifest_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_exclusivity_manifest.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_exclusivity_manifest.php new file mode 100644 index 000000000000..0e1eb02ff105 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_exclusivity_manifest.php @@ -0,0 +1,82 @@ +generateExclusivityManifest($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GkeHubMembershipServiceClient::membershipName( + '[PROJECT]', + '[LOCATION]', + '[MEMBERSHIP]' + ); + + generate_exclusivity_manifest_sample($formattedName); +} +// [END gkehub_v1beta1_generated_GkeHubMembershipService_GenerateExclusivityManifest_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_iam_policy.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..0a58b9a30551 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_iam_policy.php @@ -0,0 +1,67 @@ +getIamPolicy($resource); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 gkehub_v1beta1_generated_GkeHubMembershipService_GetIamPolicy_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_location.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_location.php new file mode 100644 index 000000000000..36ea3116af49 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END gkehub_v1beta1_generated_GkeHubMembershipService_GetLocation_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_membership.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_membership.php new file mode 100644 index 000000000000..dce6cbec555b --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_membership.php @@ -0,0 +1,71 @@ +getMembership($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GkeHubMembershipServiceClient::membershipName( + '[PROJECT]', + '[LOCATION]', + '[MEMBERSHIP]' + ); + + get_membership_sample($formattedName); +} +// [END gkehub_v1beta1_generated_GkeHubMembershipService_GetMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_locations.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_locations.php new file mode 100644 index 000000000000..60d84074726a --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @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 gkehub_v1beta1_generated_GkeHubMembershipService_ListLocations_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_memberships.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_memberships.php new file mode 100644 index 000000000000..fd7781a2bcfa --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_memberships.php @@ -0,0 +1,72 @@ +listMemberships($formattedParent); + + /** @var Membership $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 = GkeHubMembershipServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_memberships_sample($formattedParent); +} +// [END gkehub_v1beta1_generated_GkeHubMembershipService_ListMemberships_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/set_iam_policy.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..7b7f9d4e1e01 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/set_iam_policy.php @@ -0,0 +1,73 @@ +setIamPolicy($resource, $policy); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 gkehub_v1beta1_generated_GkeHubMembershipService_SetIamPolicy_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/test_iam_permissions.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..2ef5da42d5db --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/test_iam_permissions.php @@ -0,0 +1,80 @@ +testIamPermissions($resource, $permissions); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 gkehub_v1beta1_generated_GkeHubMembershipService_TestIamPermissions_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/update_membership.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/update_membership.php new file mode 100644 index 000000000000..0e40c07e40d9 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/update_membership.php @@ -0,0 +1,92 @@ +updateMembership( + $formattedName, + $updateMask, + $resource + ); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Membership $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GkeHubMembershipServiceClient::membershipName( + '[PROJECT]', + '[LOCATION]', + '[MEMBERSHIP]' + ); + + update_membership_sample($formattedName); +} +// [END gkehub_v1beta1_generated_GkeHubMembershipService_UpdateMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/validate_exclusivity.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/validate_exclusivity.php new file mode 100644 index 000000000000..0b0a9b9ad8ae --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/validate_exclusivity.php @@ -0,0 +1,74 @@ +validateExclusivity( + $formattedParent, + $intendedMembership + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GkeHubMembershipServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $intendedMembership = '[INTENDED_MEMBERSHIP]'; + + validate_exclusivity_sample($formattedParent, $intendedMembership); +} +// [END gkehub_v1beta1_generated_GkeHubMembershipService_ValidateExclusivity_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/Gapic/GkeHubMembershipServiceGapicClient.php b/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/Gapic/GkeHubMembershipServiceGapicClient.php new file mode 100644 index 000000000000..0465989da403 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/Gapic/GkeHubMembershipServiceGapicClient.php @@ -0,0 +1,1305 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $membershipId = 'membership_id'; + * $resource = new Membership(); + * $operationResponse = $gkeHubMembershipServiceClient->createMembership($formattedParent, $membershipId, $resource); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gkeHubMembershipServiceClient->createMembership($formattedParent, $membershipId, $resource); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gkeHubMembershipServiceClient->resumeOperation($operationName, 'createMembership'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gkeHubMembershipServiceClient->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. + * + * @experimental + */ +class GkeHubMembershipServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.gkehub.v1beta1.GkeHubMembershipService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'gkehub.googleapis.com'; + + /** 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 $locationNameTemplate; + + private static $membershipNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/gke_hub_membership_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/gke_hub_membership_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/gke_hub_membership_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/gke_hub_membership_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getMembershipNameTemplate() + { + if (self::$membershipNameTemplate == null) { + self::$membershipNameTemplate = new PathTemplate('projects/{project}/locations/{location}/memberships/{membership}'); + } + + return self::$membershipNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), + 'membership' => self::getMembershipNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * 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. + * + * @experimental + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a membership + * resource. + * + * @param string $project + * @param string $location + * @param string $membership + * + * @return string The formatted membership resource. + * + * @experimental + */ + public static function membershipName($project, $location, $membership) + { + return self::getMembershipNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'membership' => $membership, + ]); + } + + /** + * 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} + * - membership: projects/{project}/locations/{location}/memberships/{membership} + * + * 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. + * + * @experimental + */ + 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"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + * + * @experimental + */ + 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 + * + * @experimental + */ + 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; + } + + /** + * 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 'gkehub.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a new Membership. + * + * **This is currently only supported for GKE clusters on Google Cloud**. + * To register other clusters, follow the instructions at + * https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. + * + * Sample code: + * ``` + * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); + * try { + * $formattedParent = $gkeHubMembershipServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $membershipId = 'membership_id'; + * $resource = new Membership(); + * $operationResponse = $gkeHubMembershipServiceClient->createMembership($formattedParent, $membershipId, $resource); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gkeHubMembershipServiceClient->createMembership($formattedParent, $membershipId, $resource); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gkeHubMembershipServiceClient->resumeOperation($operationName, 'createMembership'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gkeHubMembershipServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent (project and location) where the Memberships will be created. + * Specified in the format `projects/*/locations/*`. + * @param string $membershipId Required. Client chosen ID for the membership. `membership_id` must be a valid RFC + * 1123 compliant DNS label: + * + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * @param Membership $resource Required. The membership to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. A 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 RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function createMembership($parent, $membershipId, $resource, array $optionalArgs = []) + { + $request = new CreateMembershipRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setMembershipId($membershipId); + $request->setResource($resource); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateMembership', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Removes a Membership. + * + * **This is currently only supported for GKE clusters on Google Cloud**. + * To unregister other clusters, follow the instructions at + * https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. + * + * Sample code: + * ``` + * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); + * try { + * $formattedName = $gkeHubMembershipServiceClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + * $operationResponse = $gkeHubMembershipServiceClient->deleteMembership($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gkeHubMembershipServiceClient->deleteMembership($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gkeHubMembershipServiceClient->resumeOperation($operationName, 'deleteMembership'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gkeHubMembershipServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. A 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 RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function deleteMembership($name, array $optionalArgs = []) + { + $request = new DeleteMembershipRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteMembership', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Generates the manifest for deployment of the GKE connect agent. + * + * **This method is used internally by Google-provided libraries.** + * Most clients should not need to call this method directly. + * + * Sample code: + * ``` + * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); + * try { + * $formattedName = $gkeHubMembershipServiceClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + * $response = $gkeHubMembershipServiceClient->generateConnectManifest($formattedName); + * } finally { + * $gkeHubMembershipServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The Membership resource name the Agent will associate with, in the format + * `projects/*/locations/*/memberships/*`. + * @param array $optionalArgs { + * Optional. + * + * @type ConnectAgent $connectAgent + * Optional. The connect agent to generate manifest for. + * @type string $version + * Optional. The Connect agent version to use. Defaults to the most current version. + * @type bool $isUpgrade + * Optional. If true, generate the resources for upgrade only. Some resources + * generated only for installation (e.g. secrets) will be excluded. + * @type string $registry + * Optional. The registry to fetch the connect agent image from. Defaults to + * gcr.io/gkeconnect. + * @type string $imagePullSecretContent + * Optional. The image pull secret content for the registry, if not public. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\GkeHub\V1beta1\GenerateConnectManifestResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function generateConnectManifest($name, array $optionalArgs = []) + { + $request = new GenerateConnectManifestRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['connectAgent'])) { + $request->setConnectAgent($optionalArgs['connectAgent']); + } + + if (isset($optionalArgs['version'])) { + $request->setVersion($optionalArgs['version']); + } + + if (isset($optionalArgs['isUpgrade'])) { + $request->setIsUpgrade($optionalArgs['isUpgrade']); + } + + if (isset($optionalArgs['registry'])) { + $request->setRegistry($optionalArgs['registry']); + } + + if (isset($optionalArgs['imagePullSecretContent'])) { + $request->setImagePullSecretContent($optionalArgs['imagePullSecretContent']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GenerateConnectManifest', GenerateConnectManifestResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * GenerateExclusivityManifest generates the manifests to update the + * exclusivity artifacts in the cluster if needed. + * + * Exclusivity artifacts include the Membership custom resource definition + * (CRD) and the singleton Membership custom resource (CR). Combined with + * ValidateExclusivity, exclusivity artifacts guarantee that a Kubernetes + * cluster is only registered to a single GKE Hub. + * + * The Membership CRD is versioned, and may require conversion when the GKE + * Hub API server begins serving a newer version of the CRD and + * corresponding CR. The response will be the converted CRD and CR if there + * are any differences between the versions. + * + * Sample code: + * ``` + * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); + * try { + * $formattedName = $gkeHubMembershipServiceClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + * $response = $gkeHubMembershipServiceClient->generateExclusivityManifest($formattedName); + * } finally { + * $gkeHubMembershipServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * @param array $optionalArgs { + * Optional. + * + * @type string $crdManifest + * Optional. The YAML manifest of the membership CRD retrieved by + * `kubectl get customresourcedefinitions membership`. + * Leave empty if the resource does not exist. + * @type string $crManifest + * Optional. The YAML manifest of the membership CR retrieved by + * `kubectl get memberships membership`. + * Leave empty if the resource does not exist. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\GkeHub\V1beta1\GenerateExclusivityManifestResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function generateExclusivityManifest($name, array $optionalArgs = []) + { + $request = new GenerateExclusivityManifestRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['crdManifest'])) { + $request->setCrdManifest($optionalArgs['crdManifest']); + } + + if (isset($optionalArgs['crManifest'])) { + $request->setCrManifest($optionalArgs['crManifest']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GenerateExclusivityManifest', GenerateExclusivityManifestResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the details of a Membership. + * + * Sample code: + * ``` + * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); + * try { + * $formattedName = $gkeHubMembershipServiceClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + * $response = $gkeHubMembershipServiceClient->getMembership($formattedName); + * } finally { + * $gkeHubMembershipServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The Membership resource name in the format + * `projects/*/locations/*/memberships/*`. + * @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\GkeHub\V1beta1\Membership + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getMembership($name, array $optionalArgs = []) + { + $request = new GetMembershipRequest(); + $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('GetMembership', Membership::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists Memberships in a given project and location. + * + * Sample code: + * ``` + * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); + * try { + * $formattedParent = $gkeHubMembershipServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $gkeHubMembershipServiceClient->listMemberships($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $gkeHubMembershipServiceClient->listMemberships($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $gkeHubMembershipServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent (project and location) where the Memberships will be listed. + * Specified in the format `projects/*/locations/*`. + * @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 + * Optional. Lists Memberships that match the filter expression, following the syntax + * outlined in https://google.aip.dev/160. + * + * Examples: + * + * - Name is `bar` in project `foo-proj` and location `global`: + * + * name = "projects/foo-proj/locations/global/membership/bar" + * + * - Memberships that have a label called `foo`: + * + * labels.foo:* + * + * - Memberships that have a label called `foo` whose value is `bar`: + * + * labels.foo = bar + * + * - Memberships in the CREATING state: + * + * state = CREATING + * @type string $orderBy + * Optional. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 + * + * @experimental + */ + public function listMemberships($parent, array $optionalArgs = []) + { + $request = new ListMembershipsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListMemberships', $optionalArgs, ListMembershipsResponse::class, $request); + } + + /** + * Updates an existing Membership. + * + * Sample code: + * ``` + * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); + * try { + * $formattedName = $gkeHubMembershipServiceClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + * $updateMask = new FieldMask(); + * $resource = new Membership(); + * $operationResponse = $gkeHubMembershipServiceClient->updateMembership($formattedName, $updateMask, $resource); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $gkeHubMembershipServiceClient->updateMembership($formattedName, $updateMask, $resource); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $gkeHubMembershipServiceClient->resumeOperation($operationName, 'updateMembership'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $gkeHubMembershipServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The membership resource name in the format: + * `projects/[project_id]/locations/global/memberships/[membership_id]` + * @param FieldMask $updateMask Required. Mask of fields to update. At least one field path must be specified in this + * mask. + * @param Membership $resource Required. Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * Optional. A 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 RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateMembership($name, $updateMask, $resource, array $optionalArgs = []) + { + $request = new UpdateMembershipRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setUpdateMask($updateMask); + $request->setResource($resource); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateMembership', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * ValidateExclusivity validates the state of exclusivity in the cluster. + * The validation does not depend on an existing Hub membership resource. + * + * Sample code: + * ``` + * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); + * try { + * $formattedParent = $gkeHubMembershipServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $intendedMembership = 'intended_membership'; + * $response = $gkeHubMembershipServiceClient->validateExclusivity($formattedParent, $intendedMembership); + * } finally { + * $gkeHubMembershipServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent (project and location) where the Memberships will be created. + * Specified in the format `projects/*/locations/*`. + * @param string $intendedMembership Required. The intended membership name under the `parent`. This method only does + * validation in anticipation of a CreateMembership call with the same name. + * @param array $optionalArgs { + * Optional. + * + * @type string $crManifest + * Optional. The YAML of the membership CR in the cluster. Empty if the membership + * CR does not exist. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\GkeHub\V1beta1\ValidateExclusivityResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function validateExclusivity($parent, $intendedMembership, array $optionalArgs = []) + { + $request = new ValidateExclusivityRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setIntendedMembership($intendedMembership); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['crManifest'])) { + $request->setCrManifest($optionalArgs['crManifest']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ValidateExclusivity', ValidateExclusivityResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); + * try { + * $response = $gkeHubMembershipServiceClient->getLocation(); + * } finally { + * $gkeHubMembershipServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Location\Location + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $gkeHubMembershipServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $gkeHubMembershipServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $gkeHubMembershipServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 + * + * @experimental + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * Sample code: + * ``` + * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); + * try { + * $resource = 'resource'; + * $response = $gkeHubMembershipServiceClient->getIamPolicy($resource); + * } finally { + * $gkeHubMembershipServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * Sample code: + * ``` + * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $gkeHubMembershipServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $gkeHubMembershipServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + 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('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->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. + * + * Sample code: + * ``` + * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $gkeHubMembershipServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $gkeHubMembershipServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @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\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } +} diff --git a/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/GkeHubMembershipServiceClient.php b/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/GkeHubMembershipServiceClient.php new file mode 100644 index 000000000000..c16c06836595 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/GkeHubMembershipServiceClient.php @@ -0,0 +1,36 @@ + [ + 'google.cloud.gkehub.v1beta1.GkeHubMembershipService' => [ + 'CreateMembership' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1beta1\Membership', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1beta1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteMembership' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1beta1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdateMembership' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\GkeHub\V1beta1\Membership', + 'metadataReturnType' => '\Google\Cloud\GkeHub\V1beta1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListMemberships' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResources', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php b/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php new file mode 100644 index 000000000000..837fb971ce08 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php @@ -0,0 +1,213 @@ + [ + 'google.cloud.gkehub.v1beta1.GkeHubMembershipService' => [ + 'CreateMembership' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/memberships', + 'body' => 'resource', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'membership_id', + ], + ], + 'DeleteMembership' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/memberships/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateConnectManifest' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateExclusivityManifest' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/memberships/*}:generateExclusivityManifest', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMembership' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/memberships/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListMemberships' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/memberships', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateMembership' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/memberships/*}', + 'body' => 'resource', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'ValidateExclusivity' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/memberships:validateExclusivity', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/memberships/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/memberships/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/memberships/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/GkeHub/v1beta1/tests/Unit/V1beta1/GkeHubMembershipServiceClientTest.php b/owl-bot-staging/GkeHub/v1beta1/tests/Unit/V1beta1/GkeHubMembershipServiceClientTest.php new file mode 100644 index 000000000000..e39194df8bb7 --- /dev/null +++ b/owl-bot-staging/GkeHub/v1beta1/tests/Unit/V1beta1/GkeHubMembershipServiceClientTest.php @@ -0,0 +1,1084 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return GkeHubMembershipServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new GkeHubMembershipServiceClient($options); + } + + /** @test */ + public function createMembershipTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $externalId = 'externalId-1153075697'; + $uniqueId = 'uniqueId-538310583'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setExternalId($externalId); + $expectedResponse->setUniqueId($uniqueId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createMembershipTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $membershipId = 'membershipId-1132211676'; + $resource = new Membership(); + $response = $gapicClient->createMembership($formattedParent, $membershipId, $resource); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/CreateMembership', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getMembershipId(); + $this->assertProtobufEquals($membershipId, $actualValue); + $actualValue = $actualApiRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMembershipTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMembershipExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $membershipId = 'membershipId-1132211676'; + $resource = new Membership(); + $response = $gapicClient->createMembership($formattedParent, $membershipId, $resource); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMembershipTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMembershipTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteMembershipTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $response = $gapicClient->deleteMembership($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/DeleteMembership', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMembershipTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMembershipExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $response = $gapicClient->deleteMembership($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMembershipTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateConnectManifestTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GenerateConnectManifestResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $response = $gapicClient->generateConnectManifest($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/GenerateConnectManifest', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateConnectManifestExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + try { + $gapicClient->generateConnectManifest($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 generateExclusivityManifestTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $crdManifest2 = 'crdManifest2194459340'; + $crManifest2 = 'crManifest2618391538'; + $expectedResponse = new GenerateExclusivityManifestResponse(); + $expectedResponse->setCrdManifest($crdManifest2); + $expectedResponse->setCrManifest($crManifest2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $response = $gapicClient->generateExclusivityManifest($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/GenerateExclusivityManifest', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateExclusivityManifestExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + try { + $gapicClient->generateExclusivityManifest($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 getMembershipTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $externalId = 'externalId-1153075697'; + $uniqueId = 'uniqueId-538310583'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setExternalId($externalId); + $expectedResponse->setUniqueId($uniqueId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $response = $gapicClient->getMembership($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/GetMembership', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMembershipExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + try { + $gapicClient->getMembership($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 listMembershipsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $resourcesElement = new Membership(); + $resources = [ + $resourcesElement, + ]; + $expectedResponse = new ListMembershipsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResources($resources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listMemberships($formattedParent); + $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.gkehub.v1beta1.GkeHubMembershipService/ListMemberships', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMembershipsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listMemberships($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 updateMembershipTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $externalId = 'externalId-1153075697'; + $uniqueId = 'uniqueId-538310583'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setExternalId($externalId); + $expectedResponse->setUniqueId($uniqueId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateMembershipTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $updateMask = new FieldMask(); + $resource = new Membership(); + $response = $gapicClient->updateMembership($formattedName, $updateMask, $resource); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/UpdateMembership', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMembershipTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMembershipExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMembershipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); + $updateMask = new FieldMask(); + $resource = new Membership(); + $response = $gapicClient->updateMembership($formattedName, $updateMask, $resource); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMembershipTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function validateExclusivityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ValidateExclusivityResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $intendedMembership = 'intendedMembership1074975850'; + $response = $gapicClient->validateExclusivity($formattedParent, $intendedMembership); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/ValidateExclusivity', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getIntendedMembership(); + $this->assertProtobufEquals($intendedMembership, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function validateExclusivityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $intendedMembership = 'intendedMembership1074975850'; + try { + $gapicClient->validateExclusivity($formattedParent, $intendedMembership); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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); + $response = $gapicClient->getLocation(); + $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); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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); + $response = $gapicClient->listLocations(); + $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); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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'; + $response = $gapicClient->getIamPolicy($resource); + $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'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $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(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $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 = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->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/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Attestation.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Attestation.php new file mode 100644 index 000000000000..8db0f36078c4 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Attestation.php @@ -0,0 +1,40 @@ +internalAddGeneratedFile( + ' +ˆ +grafeas/v1/attestation.proto +grafeas.v1"f +AttestationNote. +hint ( 2 .grafeas.v1.AttestationNote.Hint# +Hint +human_readable_name ( " +Jwt + compact_jwt ( "} +AttestationOccurrence +serialized_payload ( ) + +signatures ( 2.grafeas.v1.Signature +jwts ( 2.grafeas.v1.JwtBQ + io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Build.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Build.php new file mode 100644 index 000000000000..6ab3907fa635 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Build.php @@ -0,0 +1,39 @@ +internalAddGeneratedFile( + ' +´ +grafeas/v1/build.proto +grafeas.v1!grafeas/v1/intoto_statement.protografeas/v1/provenance.proto"$ + BuildNote +builder_version ( "Ì +BuildOccurrence/ + +provenance ( 2.grafeas.v1.BuildProvenance +provenance_bytes ( 7 +intoto_provenance ( 2.grafeas.v1.InTotoProvenance5 +intoto_statement ( 2.grafeas.v1.InTotoStatementBQ + io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Common.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Common.php new file mode 100644 index 0000000000000000000000000000000000000000..24ca668a48945347c6dbd5460f3868abca6a98ff GIT binary patch literal 1213 zcmZ`&e{b715S`=ZhcC{i3N4oXF@Vhq)Ezn-*-)TxmJN=j8bTafi|qgz3<$JzR){gA zAksnIAzx-+W57P!NJ(`A1l2#{k?-BT$K(C_dv=q-4`hG>bE+{Ri#5?VNU~gN8B0zU ztK|}N63g3+am?F#;kn*Hu}Yjx9;6)Y$Dl5_w8=zQTvq3CU5fa&c1Vwh8Vxt3ugNzp+Y3FG)6K z-s8YyW^u4z$J3q+gZ-teWM7jZB7@+54UW1 z^cETumI`VFqWcsY>Qhj_o9=TsD7zB2-!B#XSbtBv*%ZQg7}5{C)eg==P_C8$CxIc=~A5x-ogGQpSzZwUPA#n)cd;GBz(r z3TtR-;wYo~ru1)e?haXuLZRyd;D;Etx z<1#7sqs3ZdiEjS*Uk&y~QsX%jiTfQqH&f$B=fTK}W}`{y_k;I=?>S!?Wd~QY;mE)2 zodv^SdhOKQ25g_rf}!VZ*=2Ci8~9G$*xe0#{c{^UalZ!e{BStFzVJs=XWKNh;RTca z_{zV$c6LlB_IuN*KbiKX!Fc5CTJkI$T=qQQ*|X&S_#zwzy;0wH8tyZ2yvf9m9#Y`! z4>(}*L0iJwpYPIQY}%>hRHSX0r=1iT~8B16qS#HTqxKDVns>DN~9#Z4fvu(R0>*ofEFb@m`yg*+1qyFc4jj(OHvJg z#=qmg@RvBd-F_rR`_j$bbI(2Je(c-#Q8$8Tq>cg=H5iaqpO`L^NJ%4^3`r|)w^0!$ zdl3&&xrCfH$VKCdd^|n7dTLX(j1|Kw=_uMpsw+49l>{7eDj2#c4}hRO)DdM!>do3Y z8X8bTz4{=$ z?N~6wr65T{!-^^IkpX9d-HD`icSO9pl${X0W@6Zy_0EJrC1~iKqGpOmMyjTTR;wK} zqc$ax@?KUpq2p~*9%!sqr$inRqhg$_PKZJiD{+|WP6%#CPu|@v^1k8?DsKAK>e$dY zKlStS9naJs2f;|}Cp)V~7t)}Uhn(Ri#NrH@ zDK9zeupDIFvJEfJra>1Ltzex5=Ez)m`C!`}le%NV>jB6qz>-}-3#XQMe#on^hXGIH z#atTv0C{HDpoM~UdsKZdF4*w$fwy}%eWKSr;kq`&f4=8Df`VpL*j3VYGU=A+;-aNl z**b@nNwBjCdAq}H+d@CI0|-;cIp;at*V#N$yQ>EqljVoAsuf^ud=0+oM_9Uq!nFA{ zSY#3UvEo@vx4;=W^aIJ_9tvX{nY7!2hn-DZU5a31Oxa*8R?50X=MAh2Dg2=V<0n3} z6`YLY$)w;5DTWLt*%xOUHYZaV`pRB+I!h~|bOsNmQdVF-qNbY}cnE6&*HK9ON&Oxb zLADpGurNtgyM#QK6Iz-x-(GjpqjWnmq@v?W)v0t)q~DUt;1!Lyu8bG>FnjzpJ6Hd5 d+*(MXuXaaE|6*`~69@axV@;8RySjy2fWPu-lUe`( literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Cvss.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Cvss.php new file mode 100644 index 0000000000000000000000000000000000000000..77a230e503ff8fc5b474543f37a7a7640f2968cb GIT binary patch literal 3353 zcmeHK-BQ~|6t2xr%i+(6049ZIG08wWtrr*F_v5!S8^`#~ySHT|=&?dgSY& z?zVMP_jJ|Jet72Jw1Ggl9 zlVpP}!St|Wsz$4fUCq&L&vGOJEtUG%8^}~d^~32sv>)VHDkYLUL7p?f^i3S(ZvO33pY$-r;Pa`{=x-JQtgMo{JyR&7Tg zl2Y`s+jj7;1Kq*h{HHX+qm&5J2we}s%nQg3TjM%pC*84XZK3D6)=+78X;-^ zF48ktRfno>+?-;_TeyQ)c%OlV$RTaRCaWkc_p06GIYq3u8#P(tIpIv;%ehaOO<0S% zYrOJWtiQ@-nES9Eb+P3iSdOnLxh%5*t5IK7Q)Zh$eg7#g56`2zyJ{EZumT%15Ia{lcmdG$GuoxI`OxZ#mX2WJ)2S&J% zNSd)o%P=3>=}t4u5T(O9sZSOD0hsnx||a%rOSp+w&Co_iFPz4Zhk z=$hwuh~7qm7k0_vM9G^-dHNy2o5cDkcbDx@?*7QYQmn_mfctDiIVXxu1UN-kh>pel z7mcbS5EUjW;9m?;vMkgp#1)8t)D^zcA0_vHExBLHFz+jF6FV-ED*vkTf0DtVE+=mt z29_e;C!{IjwxeA3wAF$|-5OJZ(>b3<$8ah0^EZ7umKXb$p_=`o<@68w*rfj>4g!~I r>+Zqr;CmcC{*|4o)Y;A~g&ysVhUKq<8GLMHpE#~lWH6au!!^La2Pne9 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Deployment.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Deployment.php new file mode 100644 index 0000000000000000000000000000000000000000..4c9c49aad310e4ccf57902e664e90149b926943c GIT binary patch literal 1084 zcmah|+fLg+5N#3~U??=Qc!=7UEkz|rt)tMF$|eV|o^KjsKh2)+dU!!P}w%maq6?poOxfw9~XkNFrUcknDIHy9Pu?deP=HnkH zlGRJ3(pcU4UWUy%aOk>;l&I4;41gp?ImRhvp$3;4t40&n@?{w-ZLD6_muq`Z%ph}} zFOQyyS-3V@u%7TmO69+l4XC<;`z)w0Wj!CmGW9&IJgz^?F7EoMrap`|tVAJIzL3-U zvc_%f?V9sA%s*K)?HOU~2v&ZbjXG@F#|NX{@a$xKae8idj|RO#w^MsyEJLOLp<62% zE3ni%?tZG3bw<^ri}TU&q*gin2}1XMpU%2z5Kw=xYTHc_avJqq)E{io@oz)ts`B@Ff+udO`!> z;{^=^OepFP&o8OOQ!KIDPZ93B)+qq-a2TRaj)V_@)GvsxJw{L{u~dIASU6!mlMH+8 zz0!JyX4ng5)-Tp-68ImHR>)8M!?)2qu%tK-ryzUqTOCqwIbOBEeabkH3Eqj!TqsU0dXDG`6#>(rWmGc^2LJt zn=wh_zx$D8Z8oOUqN_dSuSU^_xGOK=&mE}$zp*sP&h%xgel$;-)l4j>M%k2k#iS@N+S7yMx3E_j(&mzC-@qPL=C}=&5&vNRv{pi;#{S8nzS5z` zfxoD;n52+Ol6@0o7b+y6wFfHTk#++6YJtc}NU%SNCtur2fb~3AZVSD*2-*+u z7z=X4mNZ3de-3e8`Nyc#U&EJq-&VCgU2}%KRkBK|)JMk-Xd4Fh9FEL^J+kcaVC+l` z+qn46v7E`+c7|Qk>RH`R^$QJP+b~DgyKc3lJ%%02&fdz$f0tlCSCF;u2)-(4oRKk7 zv>&tW!oy+L?pSs|rE^Tfw&S<5b_ms;Wn0eA-Oj`rn`YN>s+BmUIk+5NbVptFb^uR` zn4V!>D1{HS8XOiMRkrbPIJg?AldXEWS~~v~_84C?&9L=y ynI7SQh0WE4Kg}NhDp&ef#`Sg*`u)pdNqn2G*0oI>dxwz?TR4eKcjX=20sIFWgfim* literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/DsseAttestation.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/DsseAttestation.php new file mode 100644 index 0000000000000000000000000000000000000000..ef80894effc944fe157dddad5b1351735c4cb183 GIT binary patch literal 1079 zcmah|(QeZ)6r~$NnO0@T7x0NVNtH&d6M0JPbB@pPJ$d&bnn&ar^iiOq8aS zh=-_bfbI~khZE>^2a{7njb)-3IuI!8BaQ3JM%{~JoKmeZ)>LyT>`aXiK^GWDlp*v- zozJMLM>Tc(Inn*rXcEFg8pqHz0__c-{3KwWD4B(vK_<%JoX1lxxaKtEKaBAf_%w{s zXxzs7iD0P_NC`v1(7J$JGsT`q(gbaR+m|v3(H*7PO>TD}G%7(uw~H}TJknB)4AgM~ z)WwaZE7ryO*i?@DVC5bi=a$J9Xq903bO41qQKFgoP6bxQo4fs<+>dgxkiu~`aW?F` zI3|pVH8vB$1q!{LoL$As_k10^?RiDcPiFj9;Vku8BY$?u>3`>5C2NSiY#f*2<`m;- zn%-4rDX+=dk{ou&<6de0*HUBk4Y@xzjH3!vtb;;Mv-h!5_OdvX=tVkLn3I zoF@w^rV35@W+6_~PG*|>XTK`s=|56K#uBB_G^YBT?4ej`56o5R>v8uI_anlSdvh>7h4`=uIf8*ZD#oa#>=HD&OA*Sv&1OhExQ$R6#vJ wk^Ncqe2Ydru5ZTCT)+O_+3kOA&mLsZ*R^7VFY+puntNw!Gh|+|6P0gwKun`Pig8l+|=FK6#I9+daw#m z_uVA1wB-z&qwy2>n9X-+xPA@gL>+Pfz1@Q zf;wHiYl~;Hy|A=F6w*WrW=(hGy`W)T!2d3L8^j2UrT?{SrR-A99HDjPrk0a=EN z94poc*P7L}co}Zp&Ckn%_T9YF7`yMouslU;l<&WxKV6m?L*o+wg*EFESF&{_ReBA* zk6bv>=@8k!iHM4>g_9+|9#h6YB)hC|VAtcmu> zR5LR4DlpM#A(1u7wHI_p*T4L7qnoq0;XN80Q$LKTMYyVg-wi1%Z@#Il!_^GgURY9& zkb78@en#tQQhF`_IxU4ct8i8Qb6OpN;RepHo}W1X9D)msAT7MR4wK127^k&{oFQ>U zkmR#q!ViOeL()43?=cSgY(z&s`^dpTq}w$;Q_qF?W$cp=VVr&wc{tId`9Aom6Z+l! zY$3E@=i4g443I2_ybLAC&p|9$pR|%)5YZr(L3WmWr1|ZP=7NY<^^9p;N( z1xP;j>$HkgOHU%|tijYKO%-{c)32L2hm(7H>#N@Qdu8C?mFX^ocV5G_pLmJ(lq7r1 z5)4HyHq%t}(CQ3-&=e5O;cZbZ$YmJX^L)H7s?Hi=Q?Dg>Ikgz8FA@U4m(uW%2E4zH zI5n7VGoD0vucH{ms46uHy3j^&6*!rO@qm7l)-(gW!#j^*dY$?-rD}5)USC-{hUqol z-P@njPnt>qDkz?+mZGH|Ume7BJKq;z`X!$dl;k`C;Iz@7Woe zml2H&!I^^#1`ek=d?wrQ?ref(z*v7oUx(C$35F)7|NjK>Q<&7uO8CyfMMl;PxD$F+ zV-9wQY#Am6Wc57sn95f$DPXGW_5;u<7-nwQyoMk$Ms?6ZO2<4cvx^& z!D=_vBb%I4xS=U`IP8A1ao=n`A}7XdsSF70KZOsvnLo#Qul#lbhBw97L{4GMsE)+A zCK)1GcW1h|>a2YGw}1R@V1dlDHzu#yrT0-jYAhL3{?h4LgjrK~mev&y7QP?+D>$e#;vtur#o zUHue0@5x+U>Se1u(=G1)M^1@@>>cj!s@hd9ES*(ITLcODBWAdD1Tr(+D$U&P#)Fq4 z!z;a1|L~DB)9b3wTUxV+e)JIkUM#g-0gv^CDxsj zjItDqhZw|&ad(l6-AyiYlXK)oN0Zz}NmYhlz)05M67s$tWxkx5GH$J!R6^!s!)^!2 z$naVUz}En3P$Gs6wVt`qjq@_*rQTxxWdT67TGOUl&uq3IYK2F-;0SBoA}#Z2>#TA` zvVnz<6WKERO};}qXl#APPTr(Lt2A@RKw|qQc^GTl#iAo{*VV;V=3df#O~|*HCp8P2 zc~a|{W9@koPAsgv{Zz6%UFED~*)jO|rvhBbz^3YJLT-1$sYv;~8H_DuS&U4m{ ztIV+kiKBPev&txUTJ*A+`M*~1lX8Hs(%5Gb{N{R+c!}&%_~9Zc;#-O8&tc39HJ7#v zKYb`0*?#D|!G1A}_e=XUz^0ytB_U$k*#~H(^{TwPe>X6=`MmO`ve@x9Px7%Ke+jrd e#Gm@%o%}n@viO#(efsVC*_ZDWpJz|u6yU#^)internalAddGeneratedFile( + ' +× +grafeas/v1/image.proto +grafeas.v1"- +Layer + directive (  + arguments ( "@ + Fingerprint +v1_name (  +v2_blob (  +v2_name ( "O + ImageNote + resource_url ( , + fingerprint ( 2.grafeas.v1.Fingerprint"“ +ImageOccurrence, + fingerprint ( 2.grafeas.v1.Fingerprint +distance (% + +layer_info ( 2.grafeas.v1.Layer +base_resource_url ( BQ + io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoProvenance.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoProvenance.php new file mode 100644 index 000000000000..5861d7ce8a1b --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoProvenance.php @@ -0,0 +1,54 @@ +internalAddGeneratedFile( + ' +Î +"grafeas/v1/intoto_provenance.proto +grafeas.v1google/protobuf/timestamp.proto"œ +Recipe +type (  +defined_in_material ( + entry_point ( \' + arguments ( 2.google.protobuf.Any) + environment ( 2.google.protobuf.Any"I + Completeness + arguments ( + environment ( + materials ("Ú +Metadata +build_invocation_id ( 4 +build_started_on ( 2.google.protobuf.Timestamp5 +build_finished_on ( 2.google.protobuf.Timestamp. + completeness ( 2.grafeas.v1.Completeness + reproducible (" + BuilderConfig + +id ( "¤ +InTotoProvenance1 +builder_config ( 2.grafeas.v1.BuilderConfig" +recipe ( 2.grafeas.v1.Recipe& +metadata ( 2.grafeas.v1.Metadata + materials ( Bh + io.grafeas.v1BInTotoProvenanceProtoPZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoStatement.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoStatement.php new file mode 100644 index 0000000000000000000000000000000000000000..170908323f19bcfbdf0c0728f7e8fbe00f97ba7f GIT binary patch literal 1374 zcmb_b(N5bi6s0W%aXW?-rm3nX%`ha2G*Xpm5(;AzRaxO-13|S16sdC4+u$wOk?jd_H>86cCDk|}{V~y(NJ1&J@I*lR(Qt^8 zc;YH#0ZN;Y_6hlV(j|xODZ9eQ;m-EK;%BrGQ#}ngh$knBX>BxsT@*3o{ap z&Jl8I>^RQU*p%lf^m(A@|G{3M6y0m_`0+`s+aFCcBq1IQ23cmGO)J$im$Bzf_*I6r zfA)|ClM;K>tmRuy8BaaaW|KhDj;n3u2xlsKH%5C;UyHPK{ZA2Aj(OL_nzfy^3iEm# zVzodD^`*0NFaEGLU{OW=@961jk(BC{omG3P$v#iFte5aSlsI6X8G!^>EyX0(4!~4p zb>94|?7Yeoq#CBzb2MkYhm{%e)p7!?<$?Ea)xZv+Is?l*R~Hie+SB;S%^uCQDzKC} zS-*zGJBQC;KAz_^9IF8f1LmW;3+44a>NFI)om3ohEyuNOsN_Da3Y31}ctW-e4{IKd{>m#;F zMS%dgct!%TM^LkO+9n*2F~@^uWIwn*JO;2F90aHr`N5xn#Lo{$4z*CgF&B@08VspR zImHhBL*#jaCfEsx@V#$430;d*&qdOq>sq9IfFew3yYG9Vt`jt9dYRbl8lZJBRpj8vC3Nl z+$`P(EBr*+nLZtyQ{s$I$rR72$7;1@RZEan*9EnMGjBHY+|T?I!4xsl;%Mi{s4PQN%*46=40ar$-GC40garcE(1b_+XfNq; z9UbX9zzmC$#h)-^Lq^r}poPpaHq~Me^5eMw5-KA%OI_Hy@GK!jk@Tarr1gEs-UXJa zJ`lJ78$RY!m0Pa#UmEhU+&dm8f{6_|CNT{eLBp-NDVZ22_%Z-#0)B;wH9iaR><#%R zpBQ;nQ6k}j+E^!eTkL*`;6#Bt4;Q$~>?0K^X11snYs~JdO@S?@oVWoo^!wNs(UD$) z%$VAu#m1hZKu@-|u1-pSrC~Rwv};)*V?<2;XNlGHC$Qzj{S@+&q&`j}E_(e9tP(1P zrBtdVwX0MlwX5kb*R(4&^#y7prvwL5ZfgR%b&nY&RXZKM!oozkWr@7?YGT~ zVoFSAw%zKq+E?vjS}n{EYN7q~1_~>efWS2SXTP;B8)uhS{l*$*7PJqqUkO0@^6KYe z`t%)aQ!i0UFZKItTV1&o+jFpMS3G7{ZQ`nrST#DrJ`JkN+wC}h{X4BS`{pR4OkX}- Y+?&s%+duKKc<@7^ETilE25tcU2e*VT&;S4c literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Provenance.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Provenance.php new file mode 100644 index 0000000000000000000000000000000000000000..26eac47b31ced6d96f06119abcebb8a3b04a1c0e GIT binary patch literal 2688 zcma)8ZFAE`5XO#i;&n`nLa7_t>7l?73Q;D80%J;A0i0NN44WB56)% zw`qqz&`+J|@TDL7Gy3bgcPHDj6QKTL>F(LR-DjWO(>ITkqXd>on?+1e$$WBnLgW!6 ziHK$F#UVND_j*haFFsCq$b>`4_8xh$cR+TwI|o!YhV=WR0+G8|b8?3LP@qk4% z@|dIj07Uedr3v*IY42}7XOj9<(r(+BbYHJO1n@$dreuF)3cmxvU(!Dexkpk-CH`IG zsmmiSISu)580{m{qhZR>{4}=Lk37lah$w?S3})pfF+LUcS`uS+k4U#2$3e)tc(9By z*={G2Ohh#7ZnM-AJdv^3M`)`RFgc=0t*qS4j#ch>kF1y&Tdh+;J|a@|S^jiF1e1Lc zJ=Ae42X9AD-3f}OqC4P7q@>45t2It*>_um_`Yq3L*zo;P$WO3*E2BfykvHJqI$Zfc z-7Ls9ox!^OX9*TI`#ki=C9(jD+;0>}VWnc>3l{rl=1CXVihAuj%%O0OY2>Gk88Wj{ zZ7w=vm(G^ivsPi@5Iswm3dwualWC)*(UPG?<*xiAh=w=a03qE}YoqG=Ns zDau--0ot>bPw|!RB}JtaJP4RjR93Z%ZKx@Zd^b*%sME&0W@t5UK2;t^zwa6RP9(*N z^{HXnN6!N$Qgqa)Dfdfv;Nod?6=vSBldQfqI6t6apPACOiVq6*yCRgckeA`guy}5Y zEkgt5W+^Kgj7083wTCKnk7#iu?09axw?b|U}l`TVQR%lQb#hMJdkfboj843*w6Ya~MD zT+bV;MD1lLsefx8O7bLOXK_An{{*wcmO-4FsTmFfWzj$rT2U^j2u#COEZp+BzRxcEbyjVDnWw6)ccx8l!AyX7qm0id z@LW!VzlL&14_P==#PvLW0_;4~IIX~?RjB4(6{{cWjLphOu=XDXnBNFFO^4jvg3=ov znX!4H`9=QxJkEKFAXQ9VXU)6)7)pBe64ak|UTnMHzj(F3v(dddE)0GH3E9%VYKilruw>egy=Vlt^xb$sg+s0udV zYH*CEye?V|FJzhy+byd_<9)g9p4$YN8+x+e6=3m<(kh7_#i`VT)J%}eaKWfU4N`U2 zm}xW}my$x|thiJgRGa@duDeigPbo-MzAwV8Cl=43!+r(jjIFz{FuW2csht=@`z8}( zgF)Bugy9W}M3vMXYu|&~1a9iOHSAo3iauwon9c8?#^YQW_6t8g$S%qt4rvrPu?W@z z7Ga<=UNc)X;py7=yWnB=_)l@B{c_{5tf6;qjJ_pqo6nov*U)>vgf!B8uDpe}0RI8H Cun3p{ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Severity.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Severity.php new file mode 100644 index 0000000000000000000000000000000000000000..bd0c81933da82d252d670e0445a98d5e1628beae GIT binary patch literal 744 zcmZ`%U2EGg6kVFG4R;#^vxn{Njuo1Y&7tgNB+Evcq^_a)Sd(^am=?vkb_K3vBstKH z{F(i<{gTOcmKI9&BB6WEx#u3~^Vjq`g}3ODAjJ$VaDI#CnlM$;$WSIY&!UJFhVmxm z2`Lw`KgQ8`hJ(I8dt<3uW-6o>#)?J6baQ#w)U+hU&8=Ig00?$NI%OfDH#r)TVGCwh z;FW~n;;;=6CQNIbu8Hs)(5^I_Cp<)Ln6cX)*H>I{!&$d zwz(XSuu*z!wH}!4pivp!?~bU*WJt0^efV2} z*N^7zz`Eov58quv?SHt=D|k5_Tnx_q*^jI9(R4EC`N#gCUw`5}gWaJ&@`v5idd1m= z>go70} z#I96vGbT}diDp@1Dc8+A|Lyhh&sNnt>&|xy=*Rud%IJe4cm*qfe}6pT A_y7O^ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenance.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenance.php new file mode 100644 index 000000000000..0a0032106807 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenance.php @@ -0,0 +1,61 @@ +internalAddGeneratedFile( + ' +À + grafeas/v1/slsa_provenance.proto +grafeas.v1google/protobuf/timestamp.proto"þ +SlsaProvenance7 +builder ( 2&.grafeas.v1.SlsaProvenance.SlsaBuilder5 +recipe ( 2%.grafeas.v1.SlsaProvenance.SlsaRecipe9 +metadata ( 2\'.grafeas.v1.SlsaProvenance.SlsaMetadata6 + materials ( 2#.grafeas.v1.SlsaProvenance.Material  + +SlsaRecipe +type (  +defined_in_material ( + entry_point ( \' + arguments ( 2.google.protobuf.Any) + environment ( 2.google.protobuf.AnyM +SlsaCompleteness + arguments ( + environment ( + materials (ñ + SlsaMetadata +build_invocation_id ( 4 +build_started_on ( 2.google.protobuf.Timestamp5 +build_finished_on ( 2.google.protobuf.TimestampA + completeness ( 2+.grafeas.v1.SlsaProvenance.SlsaCompleteness + reproducible ( + SlsaBuilder + +id ( ‡ +Material +uri ( ? +digest ( 2/.grafeas.v1.SlsaProvenance.Material.DigestEntry- + DigestEntry +key (  +value ( :8Bf + io.grafeas.v1BSlsaProvenanceProtoPZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenanceZeroTwo.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenanceZeroTwo.php new file mode 100644 index 000000000000..2df7242755b6 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenanceZeroTwo.php @@ -0,0 +1,71 @@ +internalAddGeneratedFile( + ' +¥ +)grafeas/v1/slsa_provenance_zero_two.proto +grafeas.v1google/protobuf/timestamp.proto"Ó +SlsaProvenanceZeroTwo> +builder ( 2-.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder + +build_type ( D + +invocation ( 20.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation- + build_config ( 2.google.protobuf.Struct@ +metadata ( 2..grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataA + materials ( 2..grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial + SlsaBuilder + +id ( – + SlsaMaterial +uri ( J +digest ( 2:.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.DigestEntry- + DigestEntry +key (  +value ( :8¶ +SlsaInvocationI + config_source ( 22.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource+ + +parameters ( 2.google.protobuf.Struct, + environment ( 2.google.protobuf.Struct³ +SlsaConfigSource +uri ( N +digest ( 2>.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.DigestEntry + entry_point ( - + DigestEntry +key (  +value ( :8ø + SlsaMetadata +build_invocation_id ( 4 +build_started_on ( 2.google.protobuf.Timestamp5 +build_finished_on ( 2.google.protobuf.TimestampH + completeness ( 22.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness + reproducible (N +SlsaCompleteness + +parameters ( + environment ( + materials (Bm + io.grafeas.v1BSlsaProvenanceZeroTwoProtoPZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Upgrade.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Upgrade.php new file mode 100644 index 000000000000..ccca29a0b7e1 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Upgrade.php @@ -0,0 +1,60 @@ +internalAddGeneratedFile( + ' +Ù +grafeas/v1/upgrade.proto +grafeas.v1grafeas/v1/package.proto"¯ + UpgradeNote +package ( $ +version ( 2.grafeas.v1.Version6 + distributions ( 2.grafeas.v1.UpgradeDistribution1 +windows_update ( 2.grafeas.v1.WindowsUpdate"] +UpgradeDistribution +cpe_uri (  +classification (  +severity (  +cve ( "ì + WindowsUpdate4 +identity ( 2".grafeas.v1.WindowsUpdate.Identity +title (  + description ( 6 + +categories ( 2".grafeas.v1.WindowsUpdate.Category +kb_article_ids (  + support_url ( < +last_published_timestamp ( 2.google.protobuf.Timestamp/ +Identity + update_id (  +revision (- +Category + category_id (  +name ( "» +UpgradeOccurrence +package ( + +parsed_version ( 2.grafeas.v1.Version5 + distribution ( 2.grafeas.v1.UpgradeDistribution1 +windows_update ( 2.grafeas.v1.WindowsUpdateBQ + io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Vulnerability.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Vulnerability.php new file mode 100644 index 000000000000..d53ef1360fed --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Vulnerability.php @@ -0,0 +1,94 @@ +internalAddGeneratedFile( + ' +è +grafeas/v1/vulnerability.proto +grafeas.v1google/protobuf/timestamp.protografeas/v1/common.protografeas/v1/cvss.protografeas/v1/package.protografeas/v1/severity.proto"É +VulnerabilityNote + +cvss_score (& +severity (2.grafeas.v1.Severity5 +details ( 2$.grafeas.v1.VulnerabilityNote.Detail# +cvss_v3 ( 2.grafeas.v1.CVSSv3D +windows_details ( 2+.grafeas.v1.VulnerabilityNote.WindowsDetail6 +source_update_time ( 2.google.protobuf.Timestamp- + cvss_version (2.grafeas.v1.CVSSVersion­ +Detail + severity_name (  + description (  + package_type (  +affected_cpe_uri (  +affected_package ( 3 +affected_version_start ( 2.grafeas.v1.Version1 +affected_version_end ( 2.grafeas.v1.Version + fixed_cpe_uri (  + fixed_package ( * + fixed_version + ( 2.grafeas.v1.Version + is_obsolete (6 +source_update_time ( 2.google.protobuf.Timestamp +source (  +vendor ( ¾ + WindowsDetail +cpe_uri (  +name (  + description ( M + +fixing_kbs ( 29.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase* + KnowledgeBase +name (  +url ( "Œ +VulnerabilityOccurrence +type ( & +severity (2.grafeas.v1.Severity + +cvss_score ( +cvssv3 + ( 2.grafeas.v1.CVSSG + package_issue ( 20.grafeas.v1.VulnerabilityOccurrence.PackageIssue +short_description (  +long_description ( , + related_urls ( 2.grafeas.v1.RelatedUrl0 +effective_severity (2.grafeas.v1.Severity + fix_available (- + cvss_version (2.grafeas.v1.CVSSVersionà + PackageIssue +affected_cpe_uri (  +affected_package ( - +affected_version ( 2.grafeas.v1.Version + fixed_cpe_uri (  + fixed_package ( * + fixed_version ( 2.grafeas.v1.Version + fix_available ( + package_type ( 5 +effective_severity (2.grafeas.v1.SeverityBàA/ + file_location + ( 2.grafeas.v1.FileLocationBQ + io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext.php new file mode 100644 index 000000000000..36f9800b4f76 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext.php @@ -0,0 +1,101 @@ +grafeas.v1.AliasContext + */ +class AliasContext extends \Google\Protobuf\Internal\Message +{ + /** + * The alias kind. + * + * Generated from protobuf field .grafeas.v1.AliasContext.Kind kind = 1; + */ + protected $kind = 0; + /** + * The alias name. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $kind + * The alias kind. + * @type string $name + * The alias name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Provenance::initOnce(); + parent::__construct($data); + } + + /** + * The alias kind. + * + * Generated from protobuf field .grafeas.v1.AliasContext.Kind kind = 1; + * @return int + */ + public function getKind() + { + return $this->kind; + } + + /** + * The alias kind. + * + * Generated from protobuf field .grafeas.v1.AliasContext.Kind kind = 1; + * @param int $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\AliasContext\Kind::class); + $this->kind = $var; + + return $this; + } + + /** + * The alias name. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The alias name. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext/Kind.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext/Kind.php new file mode 100644 index 000000000000..f46137817ef2 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext/Kind.php @@ -0,0 +1,72 @@ +grafeas.v1.AliasContext.Kind + */ +class Kind +{ + /** + * Unknown. + * + * Generated from protobuf enum KIND_UNSPECIFIED = 0; + */ + const KIND_UNSPECIFIED = 0; + /** + * Git tag. + * + * Generated from protobuf enum FIXED = 1; + */ + const FIXED = 1; + /** + * Git branch. + * + * Generated from protobuf enum MOVABLE = 2; + */ + const MOVABLE = 2; + /** + * Used to specify non-standard aliases. For example, if a Git repo has a + * ref named "refs/foo/bar". + * + * Generated from protobuf enum OTHER = 4; + */ + const OTHER = 4; + + private static $valueToName = [ + self::KIND_UNSPECIFIED => 'KIND_UNSPECIFIED', + self::FIXED => 'FIXED', + self::MOVABLE => 'MOVABLE', + self::OTHER => 'OTHER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Kind::class, \Grafeas\V1\AliasContext_Kind::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext_Kind.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext_Kind.php new file mode 100644 index 000000000000..823c2dd74880 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext_Kind.php @@ -0,0 +1,16 @@ +grafeas.v1.Architecture + */ +class Architecture +{ + /** + * Unknown architecture. + * + * Generated from protobuf enum ARCHITECTURE_UNSPECIFIED = 0; + */ + const ARCHITECTURE_UNSPECIFIED = 0; + /** + * X86 architecture. + * + * Generated from protobuf enum X86 = 1; + */ + const X86 = 1; + /** + * X64 architecture. + * + * Generated from protobuf enum X64 = 2; + */ + const X64 = 2; + + private static $valueToName = [ + self::ARCHITECTURE_UNSPECIFIED => 'ARCHITECTURE_UNSPECIFIED', + self::X86 => 'X86', + self::X64 => 'X64', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Grafeas/v1/proto/src/Grafeas/V1/Artifact.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Artifact.php new file mode 100644 index 000000000000..ff6f4d0a38d3 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Artifact.php @@ -0,0 +1,159 @@ +grafeas.v1.Artifact + */ +class Artifact extends \Google\Protobuf\Internal\Message +{ + /** + * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a + * container. + * + * Generated from protobuf field string checksum = 1; + */ + protected $checksum = ''; + /** + * Artifact ID, if any; for container images, this will be a URL by digest + * like `gcr.io/projectID/imagename@sha256:123456`. + * + * Generated from protobuf field string id = 2; + */ + protected $id = ''; + /** + * Related artifact names. This may be the path to a binary or jar file, or in + * the case of a container build, the name used to push the container image to + * Google Container Registry, as presented to `docker push`. Note that a + * single Artifact ID can have multiple names, for example if two tags are + * applied to one image. + * + * Generated from protobuf field repeated string names = 3; + */ + private $names; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $checksum + * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a + * container. + * @type string $id + * Artifact ID, if any; for container images, this will be a URL by digest + * like `gcr.io/projectID/imagename@sha256:123456`. + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * Related artifact names. This may be the path to a binary or jar file, or in + * the case of a container build, the name used to push the container image to + * Google Container Registry, as presented to `docker push`. Note that a + * single Artifact ID can have multiple names, for example if two tags are + * applied to one image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Provenance::initOnce(); + parent::__construct($data); + } + + /** + * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a + * container. + * + * Generated from protobuf field string checksum = 1; + * @return string + */ + public function getChecksum() + { + return $this->checksum; + } + + /** + * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a + * container. + * + * Generated from protobuf field string checksum = 1; + * @param string $var + * @return $this + */ + public function setChecksum($var) + { + GPBUtil::checkString($var, True); + $this->checksum = $var; + + return $this; + } + + /** + * Artifact ID, if any; for container images, this will be a URL by digest + * like `gcr.io/projectID/imagename@sha256:123456`. + * + * Generated from protobuf field string id = 2; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Artifact ID, if any; for container images, this will be a URL by digest + * like `gcr.io/projectID/imagename@sha256:123456`. + * + * 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; + } + + /** + * Related artifact names. This may be the path to a binary or jar file, or in + * the case of a container build, the name used to push the container image to + * Google Container Registry, as presented to `docker push`. Note that a + * single Artifact ID can have multiple names, for example if two tags are + * applied to one image. + * + * Generated from protobuf field repeated string names = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Related artifact names. This may be the path to a binary or jar file, or in + * the case of a container build, the name used to push the container image to + * Google Container Registry, as presented to `docker push`. Note that a + * single Artifact ID can have multiple names, for example if two tags are + * applied to one image. + * + * Generated from protobuf field repeated string names = 3; + * @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; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote.php new file mode 100644 index 000000000000..f6c61a7ac8f0 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote.php @@ -0,0 +1,84 @@ +grafeas.v1.AttestationNote + */ +class AttestationNote extends \Google\Protobuf\Internal\Message +{ + /** + * Hint hints at the purpose of the attestation authority. + * + * Generated from protobuf field .grafeas.v1.AttestationNote.Hint hint = 1; + */ + protected $hint = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Grafeas\V1\AttestationNote\Hint $hint + * Hint hints at the purpose of the attestation authority. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Attestation::initOnce(); + parent::__construct($data); + } + + /** + * Hint hints at the purpose of the attestation authority. + * + * Generated from protobuf field .grafeas.v1.AttestationNote.Hint hint = 1; + * @return \Grafeas\V1\AttestationNote\Hint|null + */ + public function getHint() + { + return $this->hint; + } + + public function hasHint() + { + return isset($this->hint); + } + + public function clearHint() + { + unset($this->hint); + } + + /** + * Hint hints at the purpose of the attestation authority. + * + * Generated from protobuf field .grafeas.v1.AttestationNote.Hint hint = 1; + * @param \Grafeas\V1\AttestationNote\Hint $var + * @return $this + */ + public function setHint($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\AttestationNote\Hint::class); + $this->hint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote/Hint.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote/Hint.php new file mode 100644 index 000000000000..a9646f504708 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote/Hint.php @@ -0,0 +1,80 @@ +grafeas.v1.AttestationNote.Hint + */ +class Hint extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The human readable name of this attestation authority, for + * example "qa". + * + * Generated from protobuf field string human_readable_name = 1; + */ + protected $human_readable_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $human_readable_name + * Required. The human readable name of this attestation authority, for + * example "qa". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Attestation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The human readable name of this attestation authority, for + * example "qa". + * + * Generated from protobuf field string human_readable_name = 1; + * @return string + */ + public function getHumanReadableName() + { + return $this->human_readable_name; + } + + /** + * Required. The human readable name of this attestation authority, for + * example "qa". + * + * Generated from protobuf field string human_readable_name = 1; + * @param string $var + * @return $this + */ + public function setHumanReadableName($var) + { + GPBUtil::checkString($var, True); + $this->human_readable_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Hint::class, \Grafeas\V1\AttestationNote_Hint::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote_Hint.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote_Hint.php new file mode 100644 index 000000000000..ce2b4bc895f5 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote_Hint.php @@ -0,0 +1,16 @@ +grafeas.v1.AttestationOccurrence + */ +class AttestationOccurrence extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The serialized payload that is verified by one or more + * `signatures`. + * + * Generated from protobuf field bytes serialized_payload = 1; + */ + protected $serialized_payload = ''; + /** + * One or more signatures over `serialized_payload`. Verifier implementations + * should consider this attestation message verified if at least one + * `signature` verifies `serialized_payload`. See `Signature` in common.proto + * for more details on signature structure and verification. + * + * Generated from protobuf field repeated .grafeas.v1.Signature signatures = 2; + */ + private $signatures; + /** + * One or more JWTs encoding a self-contained attestation. + * Each JWT encodes the payload that it verifies within the JWT itself. + * Verifier implementation SHOULD ignore the `serialized_payload` field + * when verifying these JWTs. + * If only JWTs are present on this AttestationOccurrence, then the + * `serialized_payload` SHOULD be left empty. + * Each JWT SHOULD encode a claim specific to the `resource_uri` of this + * Occurrence, but this is not validated by Grafeas metadata API + * implementations. The JWT itself is opaque to Grafeas. + * + * Generated from protobuf field repeated .grafeas.v1.Jwt jwts = 3; + */ + private $jwts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $serialized_payload + * Required. The serialized payload that is verified by one or more + * `signatures`. + * @type array<\Grafeas\V1\Signature>|\Google\Protobuf\Internal\RepeatedField $signatures + * One or more signatures over `serialized_payload`. Verifier implementations + * should consider this attestation message verified if at least one + * `signature` verifies `serialized_payload`. See `Signature` in common.proto + * for more details on signature structure and verification. + * @type array<\Grafeas\V1\Jwt>|\Google\Protobuf\Internal\RepeatedField $jwts + * One or more JWTs encoding a self-contained attestation. + * Each JWT encodes the payload that it verifies within the JWT itself. + * Verifier implementation SHOULD ignore the `serialized_payload` field + * when verifying these JWTs. + * If only JWTs are present on this AttestationOccurrence, then the + * `serialized_payload` SHOULD be left empty. + * Each JWT SHOULD encode a claim specific to the `resource_uri` of this + * Occurrence, but this is not validated by Grafeas metadata API + * implementations. The JWT itself is opaque to Grafeas. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Attestation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The serialized payload that is verified by one or more + * `signatures`. + * + * Generated from protobuf field bytes serialized_payload = 1; + * @return string + */ + public function getSerializedPayload() + { + return $this->serialized_payload; + } + + /** + * Required. The serialized payload that is verified by one or more + * `signatures`. + * + * Generated from protobuf field bytes serialized_payload = 1; + * @param string $var + * @return $this + */ + public function setSerializedPayload($var) + { + GPBUtil::checkString($var, False); + $this->serialized_payload = $var; + + return $this; + } + + /** + * One or more signatures over `serialized_payload`. Verifier implementations + * should consider this attestation message verified if at least one + * `signature` verifies `serialized_payload`. See `Signature` in common.proto + * for more details on signature structure and verification. + * + * Generated from protobuf field repeated .grafeas.v1.Signature signatures = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSignatures() + { + return $this->signatures; + } + + /** + * One or more signatures over `serialized_payload`. Verifier implementations + * should consider this attestation message verified if at least one + * `signature` verifies `serialized_payload`. See `Signature` in common.proto + * for more details on signature structure and verification. + * + * Generated from protobuf field repeated .grafeas.v1.Signature signatures = 2; + * @param array<\Grafeas\V1\Signature>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSignatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Signature::class); + $this->signatures = $arr; + + return $this; + } + + /** + * One or more JWTs encoding a self-contained attestation. + * Each JWT encodes the payload that it verifies within the JWT itself. + * Verifier implementation SHOULD ignore the `serialized_payload` field + * when verifying these JWTs. + * If only JWTs are present on this AttestationOccurrence, then the + * `serialized_payload` SHOULD be left empty. + * Each JWT SHOULD encode a claim specific to the `resource_uri` of this + * Occurrence, but this is not validated by Grafeas metadata API + * implementations. The JWT itself is opaque to Grafeas. + * + * Generated from protobuf field repeated .grafeas.v1.Jwt jwts = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJwts() + { + return $this->jwts; + } + + /** + * One or more JWTs encoding a self-contained attestation. + * Each JWT encodes the payload that it verifies within the JWT itself. + * Verifier implementation SHOULD ignore the `serialized_payload` field + * when verifying these JWTs. + * If only JWTs are present on this AttestationOccurrence, then the + * `serialized_payload` SHOULD be left empty. + * Each JWT SHOULD encode a claim specific to the `resource_uri` of this + * Occurrence, but this is not validated by Grafeas metadata API + * implementations. The JWT itself is opaque to Grafeas. + * + * Generated from protobuf field repeated .grafeas.v1.Jwt jwts = 3; + * @param array<\Grafeas\V1\Jwt>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJwts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Jwt::class); + $this->jwts = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesRequest.php new file mode 100644 index 000000000000..8a0a831cf9d2 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesRequest.php @@ -0,0 +1,105 @@ +grafeas.v1.BatchCreateNotesRequest + */ +class BatchCreateNotesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the notes are to be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The notes to create. Max allowed length is 1000. + * + * Generated from protobuf field map notes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $notes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the notes are to be created. + * @type array|\Google\Protobuf\Internal\MapField $notes + * The notes to create. Max allowed length is 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the notes are to be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the notes are to be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 notes to create. Max allowed length is 1000. + * + * Generated from protobuf field map notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getNotes() + { + return $this->notes; + } + + /** + * The notes to create. Max allowed length is 1000. + * + * Generated from protobuf field map notes = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setNotes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Note::class); + $this->notes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesResponse.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesResponse.php new file mode 100644 index 000000000000..da4f910330f7 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesResponse.php @@ -0,0 +1,67 @@ +grafeas.v1.BatchCreateNotesResponse + */ +class BatchCreateNotesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The notes that were created. + * + * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; + */ + private $notes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Grafeas\V1\Note>|\Google\Protobuf\Internal\RepeatedField $notes + * The notes that were created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The notes that were created. + * + * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNotes() + { + return $this->notes; + } + + /** + * The notes that were created. + * + * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; + * @param array<\Grafeas\V1\Note>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNotes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Note::class); + $this->notes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesRequest.php new file mode 100644 index 000000000000..4497973ea4c9 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesRequest.php @@ -0,0 +1,105 @@ +grafeas.v1.BatchCreateOccurrencesRequest + */ +class BatchCreateOccurrencesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the occurrences are to be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The occurrences to create. Max allowed length is 1000. + * + * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $occurrences; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the occurrences are to be created. + * @type array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $occurrences + * The occurrences to create. Max allowed length is 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the occurrences are to be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the occurrences are to be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 occurrences to create. Max allowed length is 1000. + * + * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOccurrences() + { + return $this->occurrences; + } + + /** + * The occurrences to create. Max allowed length is 1000. + * + * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOccurrences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Occurrence::class); + $this->occurrences = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesResponse.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesResponse.php new file mode 100644 index 000000000000..ff03d5abda45 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesResponse.php @@ -0,0 +1,67 @@ +grafeas.v1.BatchCreateOccurrencesResponse + */ +class BatchCreateOccurrencesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The occurrences that were created. + * + * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; + */ + private $occurrences; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $occurrences + * The occurrences that were created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The occurrences that were created. + * + * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOccurrences() + { + return $this->occurrences; + } + + /** + * The occurrences that were created. + * + * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; + * @param array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOccurrences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Occurrence::class); + $this->occurrences = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildNote.php new file mode 100644 index 000000000000..033b8e22bb8c --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildNote.php @@ -0,0 +1,68 @@ +grafeas.v1.BuildNote + */ +class BuildNote extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Immutable. Version of the builder which produced this build. + * + * Generated from protobuf field string builder_version = 1; + */ + protected $builder_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $builder_version + * Required. Immutable. Version of the builder which produced this build. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Build::initOnce(); + parent::__construct($data); + } + + /** + * Required. Immutable. Version of the builder which produced this build. + * + * Generated from protobuf field string builder_version = 1; + * @return string + */ + public function getBuilderVersion() + { + return $this->builder_version; + } + + /** + * Required. Immutable. Version of the builder which produced this build. + * + * Generated from protobuf field string builder_version = 1; + * @param string $var + * @return $this + */ + public function setBuilderVersion($var) + { + GPBUtil::checkString($var, True); + $this->builder_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildOccurrence.php new file mode 100644 index 000000000000..150d9122a82d --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildOccurrence.php @@ -0,0 +1,251 @@ +grafeas.v1.BuildOccurrence + */ +class BuildOccurrence extends \Google\Protobuf\Internal\Message +{ + /** + * The actual provenance for the build. + * + * Generated from protobuf field .grafeas.v1.BuildProvenance provenance = 1; + */ + protected $provenance = null; + /** + * Serialized JSON representation of the provenance, used in generating the + * build signature in the corresponding build note. After verifying the + * signature, `provenance_bytes` can be unmarshalled and compared to the + * provenance to confirm that it is unchanged. A base64-encoded string + * representation of the provenance bytes is used for the signature in order + * to interoperate with openssl which expects this format for signature + * verification. + * The serialized form is captured both to avoid ambiguity in how the + * provenance is marshalled to json as well to prevent incompatibilities with + * future changes. + * + * Generated from protobuf field string provenance_bytes = 2; + */ + protected $provenance_bytes = ''; + /** + * Deprecated. See InTotoStatement for the replacement. + * In-toto Provenance representation as defined in spec. + * + * Generated from protobuf field .grafeas.v1.InTotoProvenance intoto_provenance = 3; + */ + protected $intoto_provenance = null; + /** + * In-toto Statement representation as defined in spec. + * The intoto_statement can contain any type of provenance. The serialized + * payload of the statement can be stored and signed in the Occurrence's + * envelope. + * + * Generated from protobuf field .grafeas.v1.InTotoStatement intoto_statement = 4; + */ + protected $intoto_statement = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Grafeas\V1\BuildProvenance $provenance + * The actual provenance for the build. + * @type string $provenance_bytes + * Serialized JSON representation of the provenance, used in generating the + * build signature in the corresponding build note. After verifying the + * signature, `provenance_bytes` can be unmarshalled and compared to the + * provenance to confirm that it is unchanged. A base64-encoded string + * representation of the provenance bytes is used for the signature in order + * to interoperate with openssl which expects this format for signature + * verification. + * The serialized form is captured both to avoid ambiguity in how the + * provenance is marshalled to json as well to prevent incompatibilities with + * future changes. + * @type \Grafeas\V1\InTotoProvenance $intoto_provenance + * Deprecated. See InTotoStatement for the replacement. + * In-toto Provenance representation as defined in spec. + * @type \Grafeas\V1\InTotoStatement $intoto_statement + * In-toto Statement representation as defined in spec. + * The intoto_statement can contain any type of provenance. The serialized + * payload of the statement can be stored and signed in the Occurrence's + * envelope. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Build::initOnce(); + parent::__construct($data); + } + + /** + * The actual provenance for the build. + * + * Generated from protobuf field .grafeas.v1.BuildProvenance provenance = 1; + * @return \Grafeas\V1\BuildProvenance|null + */ + public function getProvenance() + { + return $this->provenance; + } + + public function hasProvenance() + { + return isset($this->provenance); + } + + public function clearProvenance() + { + unset($this->provenance); + } + + /** + * The actual provenance for the build. + * + * Generated from protobuf field .grafeas.v1.BuildProvenance provenance = 1; + * @param \Grafeas\V1\BuildProvenance $var + * @return $this + */ + public function setProvenance($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\BuildProvenance::class); + $this->provenance = $var; + + return $this; + } + + /** + * Serialized JSON representation of the provenance, used in generating the + * build signature in the corresponding build note. After verifying the + * signature, `provenance_bytes` can be unmarshalled and compared to the + * provenance to confirm that it is unchanged. A base64-encoded string + * representation of the provenance bytes is used for the signature in order + * to interoperate with openssl which expects this format for signature + * verification. + * The serialized form is captured both to avoid ambiguity in how the + * provenance is marshalled to json as well to prevent incompatibilities with + * future changes. + * + * Generated from protobuf field string provenance_bytes = 2; + * @return string + */ + public function getProvenanceBytes() + { + return $this->provenance_bytes; + } + + /** + * Serialized JSON representation of the provenance, used in generating the + * build signature in the corresponding build note. After verifying the + * signature, `provenance_bytes` can be unmarshalled and compared to the + * provenance to confirm that it is unchanged. A base64-encoded string + * representation of the provenance bytes is used for the signature in order + * to interoperate with openssl which expects this format for signature + * verification. + * The serialized form is captured both to avoid ambiguity in how the + * provenance is marshalled to json as well to prevent incompatibilities with + * future changes. + * + * Generated from protobuf field string provenance_bytes = 2; + * @param string $var + * @return $this + */ + public function setProvenanceBytes($var) + { + GPBUtil::checkString($var, True); + $this->provenance_bytes = $var; + + return $this; + } + + /** + * Deprecated. See InTotoStatement for the replacement. + * In-toto Provenance representation as defined in spec. + * + * Generated from protobuf field .grafeas.v1.InTotoProvenance intoto_provenance = 3; + * @return \Grafeas\V1\InTotoProvenance|null + */ + public function getIntotoProvenance() + { + return $this->intoto_provenance; + } + + public function hasIntotoProvenance() + { + return isset($this->intoto_provenance); + } + + public function clearIntotoProvenance() + { + unset($this->intoto_provenance); + } + + /** + * Deprecated. See InTotoStatement for the replacement. + * In-toto Provenance representation as defined in spec. + * + * Generated from protobuf field .grafeas.v1.InTotoProvenance intoto_provenance = 3; + * @param \Grafeas\V1\InTotoProvenance $var + * @return $this + */ + public function setIntotoProvenance($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\InTotoProvenance::class); + $this->intoto_provenance = $var; + + return $this; + } + + /** + * In-toto Statement representation as defined in spec. + * The intoto_statement can contain any type of provenance. The serialized + * payload of the statement can be stored and signed in the Occurrence's + * envelope. + * + * Generated from protobuf field .grafeas.v1.InTotoStatement intoto_statement = 4; + * @return \Grafeas\V1\InTotoStatement|null + */ + public function getIntotoStatement() + { + return $this->intoto_statement; + } + + public function hasIntotoStatement() + { + return isset($this->intoto_statement); + } + + public function clearIntotoStatement() + { + unset($this->intoto_statement); + } + + /** + * In-toto Statement representation as defined in spec. + * The intoto_statement can contain any type of provenance. The serialized + * payload of the statement can be stored and signed in the Occurrence's + * envelope. + * + * Generated from protobuf field .grafeas.v1.InTotoStatement intoto_statement = 4; + * @param \Grafeas\V1\InTotoStatement $var + * @return $this + */ + public function setIntotoStatement($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\InTotoStatement::class); + $this->intoto_statement = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildProvenance.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildProvenance.php new file mode 100644 index 000000000000..8e8c3289d1ee --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildProvenance.php @@ -0,0 +1,528 @@ +grafeas.v1.BuildProvenance + */ +class BuildProvenance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Unique identifier of the build. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * ID of the project. + * + * Generated from protobuf field string project_id = 2; + */ + protected $project_id = ''; + /** + * Commands requested by the build. + * + * Generated from protobuf field repeated .grafeas.v1.Command commands = 3; + */ + private $commands; + /** + * Output of the build. + * + * Generated from protobuf field repeated .grafeas.v1.Artifact built_artifacts = 4; + */ + private $built_artifacts; + /** + * Time at which the build was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + */ + protected $create_time = null; + /** + * Time at which execution of the build was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; + */ + protected $start_time = null; + /** + * Time at which execution of the build was finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; + */ + protected $end_time = null; + /** + * E-mail address of the user who initiated this build. Note that this was the + * user's e-mail address at the time the build was initiated; this address may + * not represent the same end-user for all time. + * + * Generated from protobuf field string creator = 8; + */ + protected $creator = ''; + /** + * URI where any logs for this provenance were written. + * + * Generated from protobuf field string logs_uri = 9; + */ + protected $logs_uri = ''; + /** + * Details of the Source input to the build. + * + * Generated from protobuf field .grafeas.v1.Source source_provenance = 10; + */ + protected $source_provenance = null; + /** + * Trigger identifier if the build was triggered automatically; empty if not. + * + * Generated from protobuf field string trigger_id = 11; + */ + protected $trigger_id = ''; + /** + * Special options applied to this build. This is a catch-all field where + * build providers can enter any desired additional details. + * + * Generated from protobuf field map build_options = 12; + */ + private $build_options; + /** + * Version string of the builder at the time this build was executed. + * + * Generated from protobuf field string builder_version = 13; + */ + protected $builder_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Required. Unique identifier of the build. + * @type string $project_id + * ID of the project. + * @type array<\Grafeas\V1\Command>|\Google\Protobuf\Internal\RepeatedField $commands + * Commands requested by the build. + * @type array<\Grafeas\V1\Artifact>|\Google\Protobuf\Internal\RepeatedField $built_artifacts + * Output of the build. + * @type \Google\Protobuf\Timestamp $create_time + * Time at which the build was created. + * @type \Google\Protobuf\Timestamp $start_time + * Time at which execution of the build was started. + * @type \Google\Protobuf\Timestamp $end_time + * Time at which execution of the build was finished. + * @type string $creator + * E-mail address of the user who initiated this build. Note that this was the + * user's e-mail address at the time the build was initiated; this address may + * not represent the same end-user for all time. + * @type string $logs_uri + * URI where any logs for this provenance were written. + * @type \Grafeas\V1\Source $source_provenance + * Details of the Source input to the build. + * @type string $trigger_id + * Trigger identifier if the build was triggered automatically; empty if not. + * @type array|\Google\Protobuf\Internal\MapField $build_options + * Special options applied to this build. This is a catch-all field where + * build providers can enter any desired additional details. + * @type string $builder_version + * Version string of the builder at the time this build was executed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Provenance::initOnce(); + parent::__construct($data); + } + + /** + * Required. Unique identifier of the build. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Required. Unique identifier of the build. + * + * 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; + } + + /** + * ID of the project. + * + * Generated from protobuf field string project_id = 2; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * ID of the 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; + } + + /** + * Commands requested by the build. + * + * Generated from protobuf field repeated .grafeas.v1.Command commands = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCommands() + { + return $this->commands; + } + + /** + * Commands requested by the build. + * + * Generated from protobuf field repeated .grafeas.v1.Command commands = 3; + * @param array<\Grafeas\V1\Command>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCommands($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Command::class); + $this->commands = $arr; + + return $this; + } + + /** + * Output of the build. + * + * Generated from protobuf field repeated .grafeas.v1.Artifact built_artifacts = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBuiltArtifacts() + { + return $this->built_artifacts; + } + + /** + * Output of the build. + * + * Generated from protobuf field repeated .grafeas.v1.Artifact built_artifacts = 4; + * @param array<\Grafeas\V1\Artifact>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBuiltArtifacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Artifact::class); + $this->built_artifacts = $arr; + + return $this; + } + + /** + * Time at which the build 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); + } + + /** + * Time at which the build 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; + } + + /** + * Time at which execution of the build was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; + * @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 execution of the build was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Time at which execution of the build was finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; + * @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); + } + + /** + * Time at which execution of the build was finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * E-mail address of the user who initiated this build. Note that this was the + * user's e-mail address at the time the build was initiated; this address may + * not represent the same end-user for all time. + * + * Generated from protobuf field string creator = 8; + * @return string + */ + public function getCreator() + { + return $this->creator; + } + + /** + * E-mail address of the user who initiated this build. Note that this was the + * user's e-mail address at the time the build was initiated; this address may + * not represent the same end-user for all time. + * + * Generated from protobuf field string creator = 8; + * @param string $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkString($var, True); + $this->creator = $var; + + return $this; + } + + /** + * URI where any logs for this provenance were written. + * + * Generated from protobuf field string logs_uri = 9; + * @return string + */ + public function getLogsUri() + { + return $this->logs_uri; + } + + /** + * URI where any logs for this provenance were written. + * + * Generated from protobuf field string logs_uri = 9; + * @param string $var + * @return $this + */ + public function setLogsUri($var) + { + GPBUtil::checkString($var, True); + $this->logs_uri = $var; + + return $this; + } + + /** + * Details of the Source input to the build. + * + * Generated from protobuf field .grafeas.v1.Source source_provenance = 10; + * @return \Grafeas\V1\Source|null + */ + public function getSourceProvenance() + { + return $this->source_provenance; + } + + public function hasSourceProvenance() + { + return isset($this->source_provenance); + } + + public function clearSourceProvenance() + { + unset($this->source_provenance); + } + + /** + * Details of the Source input to the build. + * + * Generated from protobuf field .grafeas.v1.Source source_provenance = 10; + * @param \Grafeas\V1\Source $var + * @return $this + */ + public function setSourceProvenance($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Source::class); + $this->source_provenance = $var; + + return $this; + } + + /** + * Trigger identifier if the build was triggered automatically; empty if not. + * + * Generated from protobuf field string trigger_id = 11; + * @return string + */ + public function getTriggerId() + { + return $this->trigger_id; + } + + /** + * Trigger identifier if the build was triggered automatically; empty if not. + * + * Generated from protobuf field string trigger_id = 11; + * @param string $var + * @return $this + */ + public function setTriggerId($var) + { + GPBUtil::checkString($var, True); + $this->trigger_id = $var; + + return $this; + } + + /** + * Special options applied to this build. This is a catch-all field where + * build providers can enter any desired additional details. + * + * Generated from protobuf field map build_options = 12; + * @return \Google\Protobuf\Internal\MapField + */ + public function getBuildOptions() + { + return $this->build_options; + } + + /** + * Special options applied to this build. This is a catch-all field where + * build providers can enter any desired additional details. + * + * Generated from protobuf field map build_options = 12; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setBuildOptions($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->build_options = $arr; + + return $this; + } + + /** + * Version string of the builder at the time this build was executed. + * + * Generated from protobuf field string builder_version = 13; + * @return string + */ + public function getBuilderVersion() + { + return $this->builder_version; + } + + /** + * Version string of the builder at the time this build was executed. + * + * Generated from protobuf field string builder_version = 13; + * @param string $var + * @return $this + */ + public function setBuilderVersion($var) + { + GPBUtil::checkString($var, True); + $this->builder_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuilderConfig.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuilderConfig.php new file mode 100644 index 000000000000..97732fb870dd --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuilderConfig.php @@ -0,0 +1,58 @@ +grafeas.v1.BuilderConfig + */ +class BuilderConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\IntotoProvenance::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * 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; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS.php new file mode 100644 index 000000000000..eed433379f38 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS.php @@ -0,0 +1,382 @@ +grafeas.v1.CVSS + */ +class CVSS extends \Google\Protobuf\Internal\Message +{ + /** + * The base score is a function of the base metric scores. + * + * Generated from protobuf field float base_score = 1; + */ + protected $base_score = 0.0; + /** + * Generated from protobuf field float exploitability_score = 2; + */ + protected $exploitability_score = 0.0; + /** + * Generated from protobuf field float impact_score = 3; + */ + protected $impact_score = 0.0; + /** + * Base Metrics + * Represents the intrinsic characteristics of a vulnerability that are + * constant over time and across user environments. + * + * Generated from protobuf field .grafeas.v1.CVSS.AttackVector attack_vector = 4; + */ + protected $attack_vector = 0; + /** + * Generated from protobuf field .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + */ + protected $attack_complexity = 0; + /** + * Generated from protobuf field .grafeas.v1.CVSS.Authentication authentication = 6; + */ + protected $authentication = 0; + /** + * Generated from protobuf field .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + */ + protected $privileges_required = 0; + /** + * Generated from protobuf field .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + */ + protected $user_interaction = 0; + /** + * Generated from protobuf field .grafeas.v1.CVSS.Scope scope = 9; + */ + protected $scope = 0; + /** + * Generated from protobuf field .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + */ + protected $confidentiality_impact = 0; + /** + * Generated from protobuf field .grafeas.v1.CVSS.Impact integrity_impact = 11; + */ + protected $integrity_impact = 0; + /** + * Generated from protobuf field .grafeas.v1.CVSS.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. + * @type float $exploitability_score + * @type float $impact_score + * @type int $attack_vector + * Base Metrics + * Represents the intrinsic characteristics of a vulnerability that are + * constant over time and across user environments. + * @type int $attack_complexity + * @type int $authentication + * @type int $privileges_required + * @type int $user_interaction + * @type int $scope + * @type int $confidentiality_impact + * @type int $integrity_impact + * @type int $availability_impact + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Cvss::initOnce(); + parent::__construct($data); + } + + /** + * The base score is a function of the base metric scores. + * + * 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. + * + * 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; + } + + /** + * Generated from protobuf field float exploitability_score = 2; + * @return float + */ + public function getExploitabilityScore() + { + return $this->exploitability_score; + } + + /** + * 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; + } + + /** + * Generated from protobuf field float impact_score = 3; + * @return float + */ + public function getImpactScore() + { + return $this->impact_score; + } + + /** + * 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; + } + + /** + * Base Metrics + * Represents the intrinsic characteristics of a vulnerability that are + * constant over time and across user environments. + * + * Generated from protobuf field .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @return int + */ + public function getAttackVector() + { + return $this->attack_vector; + } + + /** + * Base Metrics + * Represents the intrinsic characteristics of a vulnerability that are + * constant over time and across user environments. + * + * Generated from protobuf field .grafeas.v1.CVSS.AttackVector attack_vector = 4; + * @param int $var + * @return $this + */ + public function setAttackVector($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\AttackVector::class); + $this->attack_vector = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @return int + */ + public function getAttackComplexity() + { + return $this->attack_complexity; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; + * @param int $var + * @return $this + */ + public function setAttackComplexity($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\AttackComplexity::class); + $this->attack_complexity = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.Authentication authentication = 6; + * @return int + */ + public function getAuthentication() + { + return $this->authentication; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.Authentication authentication = 6; + * @param int $var + * @return $this + */ + public function setAuthentication($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\Authentication::class); + $this->authentication = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @return int + */ + public function getPrivilegesRequired() + { + return $this->privileges_required; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; + * @param int $var + * @return $this + */ + public function setPrivilegesRequired($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\PrivilegesRequired::class); + $this->privileges_required = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @return int + */ + public function getUserInteraction() + { + return $this->user_interaction; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.UserInteraction user_interaction = 8; + * @param int $var + * @return $this + */ + public function setUserInteraction($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\UserInteraction::class); + $this->user_interaction = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.Scope scope = 9; + * @return int + */ + public function getScope() + { + return $this->scope; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.Scope scope = 9; + * @param int $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\Scope::class); + $this->scope = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @return int + */ + public function getConfidentialityImpact() + { + return $this->confidentiality_impact; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.Impact confidentiality_impact = 10; + * @param int $var + * @return $this + */ + public function setConfidentialityImpact($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\Impact::class); + $this->confidentiality_impact = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @return int + */ + public function getIntegrityImpact() + { + return $this->integrity_impact; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.Impact integrity_impact = 11; + * @param int $var + * @return $this + */ + public function setIntegrityImpact($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\Impact::class); + $this->integrity_impact = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.Impact availability_impact = 12; + * @return int + */ + public function getAvailabilityImpact() + { + return $this->availability_impact; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSS.Impact availability_impact = 12; + * @param int $var + * @return $this + */ + public function setAvailabilityImpact($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\Impact::class); + $this->availability_impact = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackComplexity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackComplexity.php new file mode 100644 index 000000000000..5921b034341d --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackComplexity.php @@ -0,0 +1,56 @@ +grafeas.v1.CVSS.AttackComplexity + */ +class AttackComplexity +{ + /** + * Generated from protobuf enum ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + const ATTACK_COMPLEXITY_UNSPECIFIED = 0; + /** + * Generated from protobuf enum ATTACK_COMPLEXITY_LOW = 1; + */ + const ATTACK_COMPLEXITY_LOW = 1; + /** + * 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, \Grafeas\V1\CVSS_AttackComplexity::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackVector.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackVector.php new file mode 100644 index 000000000000..e012b40cdfd8 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackVector.php @@ -0,0 +1,66 @@ +grafeas.v1.CVSS.AttackVector + */ +class AttackVector +{ + /** + * Generated from protobuf enum ATTACK_VECTOR_UNSPECIFIED = 0; + */ + const ATTACK_VECTOR_UNSPECIFIED = 0; + /** + * Generated from protobuf enum ATTACK_VECTOR_NETWORK = 1; + */ + const ATTACK_VECTOR_NETWORK = 1; + /** + * Generated from protobuf enum ATTACK_VECTOR_ADJACENT = 2; + */ + const ATTACK_VECTOR_ADJACENT = 2; + /** + * Generated from protobuf enum ATTACK_VECTOR_LOCAL = 3; + */ + const ATTACK_VECTOR_LOCAL = 3; + /** + * 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, \Grafeas\V1\CVSS_AttackVector::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Authentication.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Authentication.php new file mode 100644 index 000000000000..3e49c8c45e11 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Authentication.php @@ -0,0 +1,61 @@ +grafeas.v1.CVSS.Authentication + */ +class Authentication +{ + /** + * Generated from protobuf enum AUTHENTICATION_UNSPECIFIED = 0; + */ + const AUTHENTICATION_UNSPECIFIED = 0; + /** + * Generated from protobuf enum AUTHENTICATION_MULTIPLE = 1; + */ + const AUTHENTICATION_MULTIPLE = 1; + /** + * Generated from protobuf enum AUTHENTICATION_SINGLE = 2; + */ + const AUTHENTICATION_SINGLE = 2; + /** + * Generated from protobuf enum AUTHENTICATION_NONE = 3; + */ + const AUTHENTICATION_NONE = 3; + + private static $valueToName = [ + self::AUTHENTICATION_UNSPECIFIED => 'AUTHENTICATION_UNSPECIFIED', + self::AUTHENTICATION_MULTIPLE => 'AUTHENTICATION_MULTIPLE', + self::AUTHENTICATION_SINGLE => 'AUTHENTICATION_SINGLE', + self::AUTHENTICATION_NONE => 'AUTHENTICATION_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(Authentication::class, \Grafeas\V1\CVSS_Authentication::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Impact.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Impact.php new file mode 100644 index 000000000000..ea32fc11f66f --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Impact.php @@ -0,0 +1,61 @@ +grafeas.v1.CVSS.Impact + */ +class Impact +{ + /** + * Generated from protobuf enum IMPACT_UNSPECIFIED = 0; + */ + const IMPACT_UNSPECIFIED = 0; + /** + * Generated from protobuf enum IMPACT_HIGH = 1; + */ + const IMPACT_HIGH = 1; + /** + * Generated from protobuf enum IMPACT_LOW = 2; + */ + const IMPACT_LOW = 2; + /** + * 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, \Grafeas\V1\CVSS_Impact::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/PrivilegesRequired.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/PrivilegesRequired.php new file mode 100644 index 000000000000..b3f593d06893 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/PrivilegesRequired.php @@ -0,0 +1,61 @@ +grafeas.v1.CVSS.PrivilegesRequired + */ +class PrivilegesRequired +{ + /** + * Generated from protobuf enum PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + const PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + /** + * Generated from protobuf enum PRIVILEGES_REQUIRED_NONE = 1; + */ + const PRIVILEGES_REQUIRED_NONE = 1; + /** + * Generated from protobuf enum PRIVILEGES_REQUIRED_LOW = 2; + */ + const PRIVILEGES_REQUIRED_LOW = 2; + /** + * 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, \Grafeas\V1\CVSS_PrivilegesRequired::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Scope.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Scope.php new file mode 100644 index 000000000000..44ac100792e8 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Scope.php @@ -0,0 +1,56 @@ +grafeas.v1.CVSS.Scope + */ +class Scope +{ + /** + * Generated from protobuf enum SCOPE_UNSPECIFIED = 0; + */ + const SCOPE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum SCOPE_UNCHANGED = 1; + */ + const SCOPE_UNCHANGED = 1; + /** + * 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, \Grafeas\V1\CVSS_Scope::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/UserInteraction.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/UserInteraction.php new file mode 100644 index 000000000000..2e0e911d1c88 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/UserInteraction.php @@ -0,0 +1,56 @@ +grafeas.v1.CVSS.UserInteraction + */ +class UserInteraction +{ + /** + * Generated from protobuf enum USER_INTERACTION_UNSPECIFIED = 0; + */ + const USER_INTERACTION_UNSPECIFIED = 0; + /** + * Generated from protobuf enum USER_INTERACTION_NONE = 1; + */ + const USER_INTERACTION_NONE = 1; + /** + * 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, \Grafeas\V1\CVSS_UserInteraction::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSVersion.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSVersion.php new file mode 100644 index 000000000000..8c25036f4fff --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSVersion.php @@ -0,0 +1,55 @@ +grafeas.v1.CVSSVersion + */ +class CVSSVersion +{ + /** + * Generated from protobuf enum CVSS_VERSION_UNSPECIFIED = 0; + */ + const CVSS_VERSION_UNSPECIFIED = 0; + /** + * Generated from protobuf enum CVSS_VERSION_2 = 1; + */ + const CVSS_VERSION_2 = 1; + /** + * Generated from protobuf enum CVSS_VERSION_3 = 2; + */ + const CVSS_VERSION_3 = 2; + + private static $valueToName = [ + self::CVSS_VERSION_UNSPECIFIED => 'CVSS_VERSION_UNSPECIFIED', + self::CVSS_VERSION_2 => 'CVSS_VERSION_2', + self::CVSS_VERSION_3 => 'CVSS_VERSION_3', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Grafeas/v1/proto/src/Grafeas/V1/CVSS_AttackComplexity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_AttackComplexity.php new file mode 100644 index 000000000000..f53fa0e2874d --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_AttackComplexity.php @@ -0,0 +1,16 @@ +grafeas.v1.CVSSv3 + */ +class CVSSv3 extends \Google\Protobuf\Internal\Message +{ + /** + * The base score is a function of the base metric scores. + * + * Generated from protobuf field float base_score = 1; + */ + protected $base_score = 0.0; + /** + * Generated from protobuf field float exploitability_score = 2; + */ + protected $exploitability_score = 0.0; + /** + * Generated from protobuf field float impact_score = 3; + */ + protected $impact_score = 0.0; + /** + * Base Metrics + * Represents the intrinsic characteristics of a vulnerability that are + * constant over time and across user environments. + * + * Generated from protobuf field .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + */ + protected $attack_vector = 0; + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + */ + protected $attack_complexity = 0; + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + */ + protected $privileges_required = 0; + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + */ + protected $user_interaction = 0; + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.Scope scope = 9; + */ + protected $scope = 0; + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + */ + protected $confidentiality_impact = 0; + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + */ + protected $integrity_impact = 0; + /** + * Generated from protobuf field .grafeas.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. + * @type float $exploitability_score + * @type float $impact_score + * @type int $attack_vector + * Base Metrics + * Represents the intrinsic characteristics of a vulnerability that are + * constant over time and across user environments. + * @type int $attack_complexity + * @type int $privileges_required + * @type int $user_interaction + * @type int $scope + * @type int $confidentiality_impact + * @type int $integrity_impact + * @type int $availability_impact + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Cvss::initOnce(); + parent::__construct($data); + } + + /** + * The base score is a function of the base metric scores. + * + * 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. + * + * 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; + } + + /** + * Generated from protobuf field float exploitability_score = 2; + * @return float + */ + public function getExploitabilityScore() + { + return $this->exploitability_score; + } + + /** + * 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; + } + + /** + * Generated from protobuf field float impact_score = 3; + * @return float + */ + public function getImpactScore() + { + return $this->impact_score; + } + + /** + * 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; + } + + /** + * Base Metrics + * Represents the intrinsic characteristics of a vulnerability that are + * constant over time and across user environments. + * + * Generated from protobuf field .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @return int + */ + public function getAttackVector() + { + return $this->attack_vector; + } + + /** + * Base Metrics + * Represents the intrinsic characteristics of a vulnerability that are + * constant over time and across user environments. + * + * Generated from protobuf field .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; + * @param int $var + * @return $this + */ + public function setAttackVector($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\AttackVector::class); + $this->attack_vector = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return int + */ + public function getAttackComplexity() + { + return $this->attack_complexity; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @param int $var + * @return $this + */ + public function setAttackComplexity($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\AttackComplexity::class); + $this->attack_complexity = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return int + */ + public function getPrivilegesRequired() + { + return $this->privileges_required; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @param int $var + * @return $this + */ + public function setPrivilegesRequired($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\PrivilegesRequired::class); + $this->privileges_required = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return int + */ + public function getUserInteraction() + { + return $this->user_interaction; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; + * @param int $var + * @return $this + */ + public function setUserInteraction($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\UserInteraction::class); + $this->user_interaction = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.Scope scope = 9; + * @return int + */ + public function getScope() + { + return $this->scope; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.Scope scope = 9; + * @param int $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\Scope::class); + $this->scope = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return int + */ + public function getConfidentialityImpact() + { + return $this->confidentiality_impact; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; + * @param int $var + * @return $this + */ + public function setConfidentialityImpact($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\Impact::class); + $this->confidentiality_impact = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @return int + */ + public function getIntegrityImpact() + { + return $this->integrity_impact; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.Impact integrity_impact = 11; + * @param int $var + * @return $this + */ + public function setIntegrityImpact($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\Impact::class); + $this->integrity_impact = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @return int + */ + public function getAvailabilityImpact() + { + return $this->availability_impact; + } + + /** + * Generated from protobuf field .grafeas.v1.CVSSv3.Impact availability_impact = 12; + * @param int $var + * @return $this + */ + public function setAvailabilityImpact($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\Impact::class); + $this->availability_impact = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackComplexity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackComplexity.php new file mode 100644 index 000000000000..6086d84dc982 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackComplexity.php @@ -0,0 +1,56 @@ +grafeas.v1.CVSSv3.AttackComplexity + */ +class AttackComplexity +{ + /** + * Generated from protobuf enum ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + const ATTACK_COMPLEXITY_UNSPECIFIED = 0; + /** + * Generated from protobuf enum ATTACK_COMPLEXITY_LOW = 1; + */ + const ATTACK_COMPLEXITY_LOW = 1; + /** + * 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, \Grafeas\V1\CVSSv3_AttackComplexity::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackVector.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackVector.php new file mode 100644 index 000000000000..9f0892749620 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackVector.php @@ -0,0 +1,66 @@ +grafeas.v1.CVSSv3.AttackVector + */ +class AttackVector +{ + /** + * Generated from protobuf enum ATTACK_VECTOR_UNSPECIFIED = 0; + */ + const ATTACK_VECTOR_UNSPECIFIED = 0; + /** + * Generated from protobuf enum ATTACK_VECTOR_NETWORK = 1; + */ + const ATTACK_VECTOR_NETWORK = 1; + /** + * Generated from protobuf enum ATTACK_VECTOR_ADJACENT = 2; + */ + const ATTACK_VECTOR_ADJACENT = 2; + /** + * Generated from protobuf enum ATTACK_VECTOR_LOCAL = 3; + */ + const ATTACK_VECTOR_LOCAL = 3; + /** + * 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, \Grafeas\V1\CVSSv3_AttackVector::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Impact.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Impact.php new file mode 100644 index 000000000000..d933d36fe7fb --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Impact.php @@ -0,0 +1,61 @@ +grafeas.v1.CVSSv3.Impact + */ +class Impact +{ + /** + * Generated from protobuf enum IMPACT_UNSPECIFIED = 0; + */ + const IMPACT_UNSPECIFIED = 0; + /** + * Generated from protobuf enum IMPACT_HIGH = 1; + */ + const IMPACT_HIGH = 1; + /** + * Generated from protobuf enum IMPACT_LOW = 2; + */ + const IMPACT_LOW = 2; + /** + * 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, \Grafeas\V1\CVSSv3_Impact::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/PrivilegesRequired.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/PrivilegesRequired.php new file mode 100644 index 000000000000..dff9206db9b8 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/PrivilegesRequired.php @@ -0,0 +1,61 @@ +grafeas.v1.CVSSv3.PrivilegesRequired + */ +class PrivilegesRequired +{ + /** + * Generated from protobuf enum PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + const PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + /** + * Generated from protobuf enum PRIVILEGES_REQUIRED_NONE = 1; + */ + const PRIVILEGES_REQUIRED_NONE = 1; + /** + * Generated from protobuf enum PRIVILEGES_REQUIRED_LOW = 2; + */ + const PRIVILEGES_REQUIRED_LOW = 2; + /** + * 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, \Grafeas\V1\CVSSv3_PrivilegesRequired::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Scope.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Scope.php new file mode 100644 index 000000000000..fc48b6eed3d7 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Scope.php @@ -0,0 +1,56 @@ +grafeas.v1.CVSSv3.Scope + */ +class Scope +{ + /** + * Generated from protobuf enum SCOPE_UNSPECIFIED = 0; + */ + const SCOPE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum SCOPE_UNCHANGED = 1; + */ + const SCOPE_UNCHANGED = 1; + /** + * 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, \Grafeas\V1\CVSSv3_Scope::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/UserInteraction.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/UserInteraction.php new file mode 100644 index 000000000000..2348d20766da --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/UserInteraction.php @@ -0,0 +1,56 @@ +grafeas.v1.CVSSv3.UserInteraction + */ +class UserInteraction +{ + /** + * Generated from protobuf enum USER_INTERACTION_UNSPECIFIED = 0; + */ + const USER_INTERACTION_UNSPECIFIED = 0; + /** + * Generated from protobuf enum USER_INTERACTION_NONE = 1; + */ + const USER_INTERACTION_NONE = 1; + /** + * 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, \Grafeas\V1\CVSSv3_UserInteraction::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_AttackComplexity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_AttackComplexity.php new file mode 100644 index 000000000000..5194d471da3e --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_AttackComplexity.php @@ -0,0 +1,16 @@ +grafeas.v1.CloudRepoSourceContext + */ +class CloudRepoSourceContext extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the repo. + * + * Generated from protobuf field .grafeas.v1.RepoId repo_id = 1; + */ + protected $repo_id = null; + protected $revision; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Grafeas\V1\RepoId $repo_id + * The ID of the repo. + * @type string $revision_id + * A revision ID. + * @type \Grafeas\V1\AliasContext $alias_context + * An alias, which may be a branch or tag. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Provenance::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the repo. + * + * Generated from protobuf field .grafeas.v1.RepoId repo_id = 1; + * @return \Grafeas\V1\RepoId|null + */ + public function getRepoId() + { + return $this->repo_id; + } + + public function hasRepoId() + { + return isset($this->repo_id); + } + + public function clearRepoId() + { + unset($this->repo_id); + } + + /** + * The ID of the repo. + * + * Generated from protobuf field .grafeas.v1.RepoId repo_id = 1; + * @param \Grafeas\V1\RepoId $var + * @return $this + */ + public function setRepoId($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\RepoId::class); + $this->repo_id = $var; + + return $this; + } + + /** + * A revision ID. + * + * Generated from protobuf field string revision_id = 2; + * @return string + */ + public function getRevisionId() + { + return $this->readOneof(2); + } + + public function hasRevisionId() + { + return $this->hasOneof(2); + } + + /** + * A revision ID. + * + * Generated from protobuf field string revision_id = 2; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * An alias, which may be a branch or tag. + * + * Generated from protobuf field .grafeas.v1.AliasContext alias_context = 3; + * @return \Grafeas\V1\AliasContext|null + */ + public function getAliasContext() + { + return $this->readOneof(3); + } + + public function hasAliasContext() + { + return $this->hasOneof(3); + } + + /** + * An alias, which may be a branch or tag. + * + * Generated from protobuf field .grafeas.v1.AliasContext alias_context = 3; + * @param \Grafeas\V1\AliasContext $var + * @return $this + */ + public function setAliasContext($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\AliasContext::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getRevision() + { + return $this->whichOneof("revision"); + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Command.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Command.php new file mode 100644 index 000000000000..40d507cfd67f --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Command.php @@ -0,0 +1,249 @@ +grafeas.v1.Command + */ +class Command extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the command, as presented on the command line, or if the + * command is packaged as a Docker container, as presented to `docker pull`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Environment variables set before running this command. + * + * Generated from protobuf field repeated string env = 2; + */ + private $env; + /** + * Command-line arguments used when executing this command. + * + * Generated from protobuf field repeated string args = 3; + */ + private $args; + /** + * Working directory (relative to project source root) used when running this + * command. + * + * Generated from protobuf field string dir = 4; + */ + protected $dir = ''; + /** + * Optional unique identifier for this command, used in wait_for to reference + * this command as a dependency. + * + * Generated from protobuf field string id = 5; + */ + protected $id = ''; + /** + * The ID(s) of the command(s) that this command depends on. + * + * Generated from protobuf field repeated string wait_for = 6; + */ + private $wait_for; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the command, as presented on the command line, or if the + * command is packaged as a Docker container, as presented to `docker pull`. + * @type array|\Google\Protobuf\Internal\RepeatedField $env + * Environment variables set before running this command. + * @type array|\Google\Protobuf\Internal\RepeatedField $args + * Command-line arguments used when executing this command. + * @type string $dir + * Working directory (relative to project source root) used when running this + * command. + * @type string $id + * Optional unique identifier for this command, used in wait_for to reference + * this command as a dependency. + * @type array|\Google\Protobuf\Internal\RepeatedField $wait_for + * The ID(s) of the command(s) that this command depends on. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Provenance::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the command, as presented on the command line, or if the + * command is packaged as a Docker container, as presented to `docker pull`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the command, as presented on the command line, or if the + * command is packaged as a Docker container, as presented to `docker pull`. + * + * 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; + } + + /** + * Environment variables set before running this command. + * + * Generated from protobuf field repeated string env = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEnv() + { + return $this->env; + } + + /** + * Environment variables set before running this command. + * + * Generated from protobuf field repeated string env = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEnv($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->env = $arr; + + return $this; + } + + /** + * Command-line arguments used when executing this command. + * + * Generated from protobuf field repeated string args = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getArgs() + { + return $this->args; + } + + /** + * Command-line arguments used when executing this command. + * + * 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; + } + + /** + * Working directory (relative to project source root) used when running this + * command. + * + * Generated from protobuf field string dir = 4; + * @return string + */ + public function getDir() + { + return $this->dir; + } + + /** + * Working directory (relative to project source root) used when running this + * command. + * + * Generated from protobuf field string dir = 4; + * @param string $var + * @return $this + */ + public function setDir($var) + { + GPBUtil::checkString($var, True); + $this->dir = $var; + + return $this; + } + + /** + * Optional unique identifier for this command, used in wait_for to reference + * this command as a dependency. + * + * Generated from protobuf field string id = 5; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Optional unique identifier for this command, used in wait_for to reference + * this command as a dependency. + * + * Generated from protobuf field string id = 5; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The ID(s) of the command(s) that this command depends on. + * + * Generated from protobuf field repeated string wait_for = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWaitFor() + { + return $this->wait_for; + } + + /** + * The ID(s) of the command(s) that this command depends on. + * + * Generated from protobuf field repeated string wait_for = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWaitFor($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->wait_for = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Completeness.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Completeness.php new file mode 100644 index 000000000000..d5cd151e9b5d --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Completeness.php @@ -0,0 +1,148 @@ +grafeas.v1.Completeness + */ +class Completeness extends \Google\Protobuf\Internal\Message +{ + /** + * If true, the builder claims that recipe.arguments is complete, meaning that + * all external inputs are properly captured in the recipe. + * + * Generated from protobuf field bool arguments = 1; + */ + protected $arguments = false; + /** + * If true, the builder claims that recipe.environment is claimed to be + * complete. + * + * Generated from protobuf field bool environment = 2; + */ + protected $environment = false; + /** + * If true, the builder claims that materials are complete, usually through + * some controls to prevent network access. Sometimes called "hermetic". + * + * Generated from protobuf field bool materials = 3; + */ + protected $materials = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $arguments + * If true, the builder claims that recipe.arguments is complete, meaning that + * all external inputs are properly captured in the recipe. + * @type bool $environment + * If true, the builder claims that recipe.environment is claimed to be + * complete. + * @type bool $materials + * If true, the builder claims that materials are complete, usually through + * some controls to prevent network access. Sometimes called "hermetic". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\IntotoProvenance::initOnce(); + parent::__construct($data); + } + + /** + * If true, the builder claims that recipe.arguments is complete, meaning that + * all external inputs are properly captured in the recipe. + * + * Generated from protobuf field bool arguments = 1; + * @return bool + */ + public function getArguments() + { + return $this->arguments; + } + + /** + * If true, the builder claims that recipe.arguments is complete, meaning that + * all external inputs are properly captured in the recipe. + * + * Generated from protobuf field bool arguments = 1; + * @param bool $var + * @return $this + */ + public function setArguments($var) + { + GPBUtil::checkBool($var); + $this->arguments = $var; + + return $this; + } + + /** + * If true, the builder claims that recipe.environment is claimed to be + * complete. + * + * Generated from protobuf field bool environment = 2; + * @return bool + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * If true, the builder claims that recipe.environment is claimed to be + * complete. + * + * Generated from protobuf field bool environment = 2; + * @param bool $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkBool($var); + $this->environment = $var; + + return $this; + } + + /** + * If true, the builder claims that materials are complete, usually through + * some controls to prevent network access. Sometimes called "hermetic". + * + * Generated from protobuf field bool materials = 3; + * @return bool + */ + public function getMaterials() + { + return $this->materials; + } + + /** + * If true, the builder claims that materials are complete, usually through + * some controls to prevent network access. Sometimes called "hermetic". + * + * Generated from protobuf field bool materials = 3; + * @param bool $var + * @return $this + */ + public function setMaterials($var) + { + GPBUtil::checkBool($var); + $this->materials = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote.php new file mode 100644 index 000000000000..651c3573ec47 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote.php @@ -0,0 +1,272 @@ +grafeas.v1.ComplianceNote + */ +class ComplianceNote extends \Google\Protobuf\Internal\Message +{ + /** + * The title that identifies this compliance check. + * + * Generated from protobuf field string title = 1; + */ + protected $title = ''; + /** + * A description about this compliance check. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * The OS and config versions the benchmark applies to. + * + * Generated from protobuf field repeated .grafeas.v1.ComplianceVersion version = 3; + */ + private $version; + /** + * A rationale for the existence of this compliance check. + * + * Generated from protobuf field string rationale = 4; + */ + protected $rationale = ''; + /** + * A description of remediation steps if the compliance check fails. + * + * Generated from protobuf field string remediation = 5; + */ + protected $remediation = ''; + /** + * Serialized scan instructions with a predefined format. + * + * Generated from protobuf field bytes scan_instructions = 7; + */ + protected $scan_instructions = ''; + protected $compliance_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * The title that identifies this compliance check. + * @type string $description + * A description about this compliance check. + * @type array<\Grafeas\V1\ComplianceVersion>|\Google\Protobuf\Internal\RepeatedField $version + * The OS and config versions the benchmark applies to. + * @type string $rationale + * A rationale for the existence of this compliance check. + * @type string $remediation + * A description of remediation steps if the compliance check fails. + * @type \Grafeas\V1\ComplianceNote\CisBenchmark $cis_benchmark + * @type string $scan_instructions + * Serialized scan instructions with a predefined format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Compliance::initOnce(); + parent::__construct($data); + } + + /** + * The title that identifies this compliance check. + * + * Generated from protobuf field string title = 1; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * The title that identifies this compliance check. + * + * 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; + } + + /** + * A description about this compliance check. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A description about this compliance check. + * + * 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 OS and config versions the benchmark applies to. + * + * Generated from protobuf field repeated .grafeas.v1.ComplianceVersion version = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVersion() + { + return $this->version; + } + + /** + * The OS and config versions the benchmark applies to. + * + * Generated from protobuf field repeated .grafeas.v1.ComplianceVersion version = 3; + * @param array<\Grafeas\V1\ComplianceVersion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVersion($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\ComplianceVersion::class); + $this->version = $arr; + + return $this; + } + + /** + * A rationale for the existence of this compliance check. + * + * Generated from protobuf field string rationale = 4; + * @return string + */ + public function getRationale() + { + return $this->rationale; + } + + /** + * A rationale for the existence of this compliance check. + * + * Generated from protobuf field string rationale = 4; + * @param string $var + * @return $this + */ + public function setRationale($var) + { + GPBUtil::checkString($var, True); + $this->rationale = $var; + + return $this; + } + + /** + * A description of remediation steps if the compliance check fails. + * + * Generated from protobuf field string remediation = 5; + * @return string + */ + public function getRemediation() + { + return $this->remediation; + } + + /** + * A description of remediation steps if the compliance check fails. + * + * Generated from protobuf field string remediation = 5; + * @param string $var + * @return $this + */ + public function setRemediation($var) + { + GPBUtil::checkString($var, True); + $this->remediation = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + * @return \Grafeas\V1\ComplianceNote\CisBenchmark|null + */ + public function getCisBenchmark() + { + return $this->readOneof(6); + } + + public function hasCisBenchmark() + { + return $this->hasOneof(6); + } + + /** + * Generated from protobuf field .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; + * @param \Grafeas\V1\ComplianceNote\CisBenchmark $var + * @return $this + */ + public function setCisBenchmark($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\ComplianceNote\CisBenchmark::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Serialized scan instructions with a predefined format. + * + * Generated from protobuf field bytes scan_instructions = 7; + * @return string + */ + public function getScanInstructions() + { + return $this->scan_instructions; + } + + /** + * Serialized scan instructions with a predefined format. + * + * Generated from protobuf field bytes scan_instructions = 7; + * @param string $var + * @return $this + */ + public function setScanInstructions($var) + { + GPBUtil::checkString($var, False); + $this->scan_instructions = $var; + + return $this; + } + + /** + * @return string + */ + public function getComplianceType() + { + return $this->whichOneof("compliance_type"); + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote/CisBenchmark.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote/CisBenchmark.php new file mode 100644 index 000000000000..be70e77b1666 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote/CisBenchmark.php @@ -0,0 +1,90 @@ +grafeas.v1.ComplianceNote.CisBenchmark + */ +class CisBenchmark extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int32 profile_level = 1; + */ + protected $profile_level = 0; + /** + * Generated from protobuf field .grafeas.v1.Severity severity = 2; + */ + protected $severity = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $profile_level + * @type int $severity + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Compliance::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int32 profile_level = 1; + * @return int + */ + public function getProfileLevel() + { + return $this->profile_level; + } + + /** + * Generated from protobuf field int32 profile_level = 1; + * @param int $var + * @return $this + */ + public function setProfileLevel($var) + { + GPBUtil::checkInt32($var); + $this->profile_level = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.Severity severity = 2; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Generated from protobuf field .grafeas.v1.Severity severity = 2; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class); + $this->severity = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CisBenchmark::class, \Grafeas\V1\ComplianceNote_CisBenchmark::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote_CisBenchmark.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote_CisBenchmark.php new file mode 100644 index 000000000000..05b17cf4e1c0 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote_CisBenchmark.php @@ -0,0 +1,16 @@ +grafeas.v1.ComplianceOccurrence + */ +class ComplianceOccurrence extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + */ + private $non_compliant_files; + /** + * Generated from protobuf field string non_compliance_reason = 3; + */ + protected $non_compliance_reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Grafeas\V1\NonCompliantFile>|\Google\Protobuf\Internal\RepeatedField $non_compliant_files + * @type string $non_compliance_reason + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Compliance::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNonCompliantFiles() + { + return $this->non_compliant_files; + } + + /** + * Generated from protobuf field repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; + * @param array<\Grafeas\V1\NonCompliantFile>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNonCompliantFiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\NonCompliantFile::class); + $this->non_compliant_files = $arr; + + return $this; + } + + /** + * Generated from protobuf field string non_compliance_reason = 3; + * @return string + */ + public function getNonComplianceReason() + { + return $this->non_compliance_reason; + } + + /** + * Generated from protobuf field string non_compliance_reason = 3; + * @param string $var + * @return $this + */ + public function setNonComplianceReason($var) + { + GPBUtil::checkString($var, True); + $this->non_compliance_reason = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceVersion.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceVersion.php new file mode 100644 index 000000000000..19d19abd80bd --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceVersion.php @@ -0,0 +1,148 @@ +grafeas.v1.ComplianceVersion + */ +class ComplianceVersion extends \Google\Protobuf\Internal\Message +{ + /** + * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is + * applicable to. + * + * Generated from protobuf field string cpe_uri = 1; + */ + protected $cpe_uri = ''; + /** + * The name of the document that defines this benchmark, e.g. "CIS + * Container-Optimized OS". + * + * Generated from protobuf field string benchmark_document = 3; + */ + protected $benchmark_document = ''; + /** + * The version of the benchmark. This is set to the version of the OS-specific + * CIS document the benchmark is defined in. + * + * Generated from protobuf field string version = 2; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cpe_uri + * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is + * applicable to. + * @type string $benchmark_document + * The name of the document that defines this benchmark, e.g. "CIS + * Container-Optimized OS". + * @type string $version + * The version of the benchmark. This is set to the version of the OS-specific + * CIS document the benchmark is defined in. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Compliance::initOnce(); + parent::__construct($data); + } + + /** + * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is + * applicable to. + * + * Generated from protobuf field string cpe_uri = 1; + * @return string + */ + public function getCpeUri() + { + return $this->cpe_uri; + } + + /** + * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is + * applicable to. + * + * Generated from protobuf field string cpe_uri = 1; + * @param string $var + * @return $this + */ + public function setCpeUri($var) + { + GPBUtil::checkString($var, True); + $this->cpe_uri = $var; + + return $this; + } + + /** + * The name of the document that defines this benchmark, e.g. "CIS + * Container-Optimized OS". + * + * Generated from protobuf field string benchmark_document = 3; + * @return string + */ + public function getBenchmarkDocument() + { + return $this->benchmark_document; + } + + /** + * The name of the document that defines this benchmark, e.g. "CIS + * Container-Optimized OS". + * + * Generated from protobuf field string benchmark_document = 3; + * @param string $var + * @return $this + */ + public function setBenchmarkDocument($var) + { + GPBUtil::checkString($var, True); + $this->benchmark_document = $var; + + return $this; + } + + /** + * The version of the benchmark. This is set to the version of the OS-specific + * CIS document the benchmark is defined in. + * + * Generated from protobuf field string version = 2; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The version of the benchmark. This is set to the version of the OS-specific + * CIS document the benchmark is defined in. + * + * Generated from protobuf field string version = 2; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateNoteRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateNoteRequest.php new file mode 100644 index 000000000000..65774554b463 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateNoteRequest.php @@ -0,0 +1,149 @@ +grafeas.v1.CreateNoteRequest + */ +class CreateNoteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the note is to be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The ID to use for this note. + * + * Generated from protobuf field string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $note_id = ''; + /** + * The note to create. + * + * Generated from protobuf field .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $note = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the note is to be created. + * @type string $note_id + * The ID to use for this note. + * @type \Grafeas\V1\Note $note + * The note to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the note is to be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the note is to be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 ID to use for this note. + * + * Generated from protobuf field string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNoteId() + { + return $this->note_id; + } + + /** + * The ID to use for this note. + * + * Generated from protobuf field string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNoteId($var) + { + GPBUtil::checkString($var, True); + $this->note_id = $var; + + return $this; + } + + /** + * The note to create. + * + * Generated from protobuf field .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Grafeas\V1\Note|null + */ + public function getNote() + { + return $this->note; + } + + public function hasNote() + { + return isset($this->note); + } + + public function clearNote() + { + unset($this->note); + } + + /** + * The note to create. + * + * Generated from protobuf field .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Grafeas\V1\Note $var + * @return $this + */ + public function setNote($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Note::class); + $this->note = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateOccurrenceRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateOccurrenceRequest.php new file mode 100644 index 000000000000..406afefc2f63 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateOccurrenceRequest.php @@ -0,0 +1,115 @@ +grafeas.v1.CreateOccurrenceRequest + */ +class CreateOccurrenceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the occurrence is to be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The occurrence to create. + * + * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $occurrence = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the occurrence is to be created. + * @type \Grafeas\V1\Occurrence $occurrence + * The occurrence to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the occurrence is to be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the occurrence is to be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 occurrence to create. + * + * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Grafeas\V1\Occurrence|null + */ + public function getOccurrence() + { + return $this->occurrence; + } + + public function hasOccurrence() + { + return isset($this->occurrence); + } + + public function clearOccurrence() + { + unset($this->occurrence); + } + + /** + * The occurrence to create. + * + * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Grafeas\V1\Occurrence $var + * @return $this + */ + public function setOccurrence($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Occurrence::class); + $this->occurrence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote.php new file mode 100644 index 000000000000..b40b73c92c36 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote.php @@ -0,0 +1,75 @@ +grafeas.v1.DSSEAttestationNote + */ +class DSSEAttestationNote extends \Google\Protobuf\Internal\Message +{ + /** + * DSSEHint hints at the purpose of the attestation authority. + * + * Generated from protobuf field .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + */ + protected $hint = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Grafeas\V1\DSSEAttestationNote\DSSEHint $hint + * DSSEHint hints at the purpose of the attestation authority. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\DsseAttestation::initOnce(); + parent::__construct($data); + } + + /** + * DSSEHint hints at the purpose of the attestation authority. + * + * Generated from protobuf field .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + * @return \Grafeas\V1\DSSEAttestationNote\DSSEHint|null + */ + public function getHint() + { + return $this->hint; + } + + public function hasHint() + { + return isset($this->hint); + } + + public function clearHint() + { + unset($this->hint); + } + + /** + * DSSEHint hints at the purpose of the attestation authority. + * + * Generated from protobuf field .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; + * @param \Grafeas\V1\DSSEAttestationNote\DSSEHint $var + * @return $this + */ + public function setHint($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\DSSEAttestationNote\DSSEHint::class); + $this->hint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote/DSSEHint.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote/DSSEHint.php new file mode 100644 index 000000000000..972f84285167 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote/DSSEHint.php @@ -0,0 +1,80 @@ +grafeas.v1.DSSEAttestationNote.DSSEHint + */ +class DSSEHint extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The human readable name of this attestation authority, for + * example "cloudbuild-prod". + * + * Generated from protobuf field string human_readable_name = 1; + */ + protected $human_readable_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $human_readable_name + * Required. The human readable name of this attestation authority, for + * example "cloudbuild-prod". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\DsseAttestation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The human readable name of this attestation authority, for + * example "cloudbuild-prod". + * + * Generated from protobuf field string human_readable_name = 1; + * @return string + */ + public function getHumanReadableName() + { + return $this->human_readable_name; + } + + /** + * Required. The human readable name of this attestation authority, for + * example "cloudbuild-prod". + * + * Generated from protobuf field string human_readable_name = 1; + * @param string $var + * @return $this + */ + public function setHumanReadableName($var) + { + GPBUtil::checkString($var, True); + $this->human_readable_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DSSEHint::class, \Grafeas\V1\DSSEAttestationNote_DSSEHint::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote_DSSEHint.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote_DSSEHint.php new file mode 100644 index 000000000000..59c6d41f9483 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote_DSSEHint.php @@ -0,0 +1,16 @@ +grafeas.v1.DSSEAttestationOccurrence + */ +class DSSEAttestationOccurrence extends \Google\Protobuf\Internal\Message +{ + /** + * If doing something security critical, make sure to verify the signatures in + * this metadata. + * + * Generated from protobuf field .grafeas.v1.Envelope envelope = 1; + */ + protected $envelope = null; + protected $decoded_payload; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Grafeas\V1\Envelope $envelope + * If doing something security critical, make sure to verify the signatures in + * this metadata. + * @type \Grafeas\V1\InTotoStatement $statement + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\DsseAttestation::initOnce(); + parent::__construct($data); + } + + /** + * If doing something security critical, make sure to verify the signatures in + * this metadata. + * + * Generated from protobuf field .grafeas.v1.Envelope envelope = 1; + * @return \Grafeas\V1\Envelope|null + */ + public function getEnvelope() + { + return $this->envelope; + } + + public function hasEnvelope() + { + return isset($this->envelope); + } + + public function clearEnvelope() + { + unset($this->envelope); + } + + /** + * If doing something security critical, make sure to verify the signatures in + * this metadata. + * + * Generated from protobuf field .grafeas.v1.Envelope envelope = 1; + * @param \Grafeas\V1\Envelope $var + * @return $this + */ + public function setEnvelope($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Envelope::class); + $this->envelope = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.InTotoStatement statement = 2; + * @return \Grafeas\V1\InTotoStatement|null + */ + public function getStatement() + { + return $this->readOneof(2); + } + + public function hasStatement() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .grafeas.v1.InTotoStatement statement = 2; + * @param \Grafeas\V1\InTotoStatement $var + * @return $this + */ + public function setStatement($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\InTotoStatement::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getDecodedPayload() + { + return $this->whichOneof("decoded_payload"); + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteNoteRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteNoteRequest.php new file mode 100644 index 000000000000..776c3531767c --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteNoteRequest.php @@ -0,0 +1,71 @@ +grafeas.v1.DeleteNoteRequest + */ +class DeleteNoteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_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 + * The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_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; + } + + /** + * The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_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/Grafeas/v1/proto/src/Grafeas/V1/DeleteOccurrenceRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteOccurrenceRequest.php new file mode 100644 index 000000000000..78bc19ab3724 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteOccurrenceRequest.php @@ -0,0 +1,71 @@ +grafeas.v1.DeleteOccurrenceRequest + */ +class DeleteOccurrenceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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 + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; + } + + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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/Grafeas/v1/proto/src/Grafeas/V1/DeploymentNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentNote.php new file mode 100644 index 000000000000..d934670e3bb8 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentNote.php @@ -0,0 +1,67 @@ +grafeas.v1.DeploymentNote + */ +class DeploymentNote extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource URI for the artifact being deployed. + * + * Generated from protobuf field repeated string resource_uri = 1; + */ + private $resource_uri; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $resource_uri + * Required. Resource URI for the artifact being deployed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Deployment::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource URI for the artifact being deployed. + * + * Generated from protobuf field repeated string resource_uri = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceUri() + { + return $this->resource_uri; + } + + /** + * Required. Resource URI for the artifact being deployed. + * + * Generated from protobuf field repeated string resource_uri = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceUri($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->resource_uri = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence.php new file mode 100644 index 000000000000..9971d3eb3d44 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence.php @@ -0,0 +1,295 @@ +grafeas.v1.DeploymentOccurrence + */ +class DeploymentOccurrence extends \Google\Protobuf\Internal\Message +{ + /** + * Identity of the user that triggered this deployment. + * + * Generated from protobuf field string user_email = 1; + */ + protected $user_email = ''; + /** + * Required. Beginning of the lifetime of this deployment. + * + * Generated from protobuf field .google.protobuf.Timestamp deploy_time = 2; + */ + protected $deploy_time = null; + /** + * End of the lifetime of this deployment. + * + * Generated from protobuf field .google.protobuf.Timestamp undeploy_time = 3; + */ + protected $undeploy_time = null; + /** + * Configuration used to create this deployment. + * + * Generated from protobuf field string config = 4; + */ + protected $config = ''; + /** + * Address of the runtime element hosting this deployment. + * + * Generated from protobuf field string address = 5; + */ + protected $address = ''; + /** + * Output only. Resource URI for the artifact being deployed taken from + * the deployable field with the same name. + * + * Generated from protobuf field repeated string resource_uri = 6; + */ + private $resource_uri; + /** + * Platform hosting this deployment. + * + * Generated from protobuf field .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + */ + protected $platform = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $user_email + * Identity of the user that triggered this deployment. + * @type \Google\Protobuf\Timestamp $deploy_time + * Required. Beginning of the lifetime of this deployment. + * @type \Google\Protobuf\Timestamp $undeploy_time + * End of the lifetime of this deployment. + * @type string $config + * Configuration used to create this deployment. + * @type string $address + * Address of the runtime element hosting this deployment. + * @type array|\Google\Protobuf\Internal\RepeatedField $resource_uri + * Output only. Resource URI for the artifact being deployed taken from + * the deployable field with the same name. + * @type int $platform + * Platform hosting this deployment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Deployment::initOnce(); + parent::__construct($data); + } + + /** + * Identity of the user that triggered this deployment. + * + * Generated from protobuf field string user_email = 1; + * @return string + */ + public function getUserEmail() + { + return $this->user_email; + } + + /** + * Identity of the user that triggered this deployment. + * + * Generated from protobuf field string user_email = 1; + * @param string $var + * @return $this + */ + public function setUserEmail($var) + { + GPBUtil::checkString($var, True); + $this->user_email = $var; + + return $this; + } + + /** + * Required. Beginning of the lifetime of this deployment. + * + * Generated from protobuf field .google.protobuf.Timestamp deploy_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeployTime() + { + return $this->deploy_time; + } + + public function hasDeployTime() + { + return isset($this->deploy_time); + } + + public function clearDeployTime() + { + unset($this->deploy_time); + } + + /** + * Required. Beginning of the lifetime of this deployment. + * + * Generated from protobuf field .google.protobuf.Timestamp deploy_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeployTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->deploy_time = $var; + + return $this; + } + + /** + * End of the lifetime of this deployment. + * + * Generated from protobuf field .google.protobuf.Timestamp undeploy_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUndeployTime() + { + return $this->undeploy_time; + } + + public function hasUndeployTime() + { + return isset($this->undeploy_time); + } + + public function clearUndeployTime() + { + unset($this->undeploy_time); + } + + /** + * End of the lifetime of this deployment. + * + * Generated from protobuf field .google.protobuf.Timestamp undeploy_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUndeployTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->undeploy_time = $var; + + return $this; + } + + /** + * Configuration used to create this deployment. + * + * Generated from protobuf field string config = 4; + * @return string + */ + public function getConfig() + { + return $this->config; + } + + /** + * Configuration used to create this deployment. + * + * Generated from protobuf field string config = 4; + * @param string $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkString($var, True); + $this->config = $var; + + return $this; + } + + /** + * Address of the runtime element hosting this deployment. + * + * Generated from protobuf field string address = 5; + * @return string + */ + public function getAddress() + { + return $this->address; + } + + /** + * Address of the runtime element hosting this deployment. + * + * Generated from protobuf field string address = 5; + * @param string $var + * @return $this + */ + public function setAddress($var) + { + GPBUtil::checkString($var, True); + $this->address = $var; + + return $this; + } + + /** + * Output only. Resource URI for the artifact being deployed taken from + * the deployable field with the same name. + * + * Generated from protobuf field repeated string resource_uri = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceUri() + { + return $this->resource_uri; + } + + /** + * Output only. Resource URI for the artifact being deployed taken from + * the deployable field with the same name. + * + * Generated from protobuf field repeated string resource_uri = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceUri($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->resource_uri = $arr; + + return $this; + } + + /** + * Platform hosting this deployment. + * + * Generated from protobuf field .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @return int + */ + public function getPlatform() + { + return $this->platform; + } + + /** + * Platform hosting this deployment. + * + * Generated from protobuf field .grafeas.v1.DeploymentOccurrence.Platform platform = 7; + * @param int $var + * @return $this + */ + public function setPlatform($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\DeploymentOccurrence\Platform::class); + $this->platform = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence/Platform.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence/Platform.php new file mode 100644 index 000000000000..35b13b4c7858 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence/Platform.php @@ -0,0 +1,71 @@ +grafeas.v1.DeploymentOccurrence.Platform + */ +class Platform +{ + /** + * Unknown. + * + * Generated from protobuf enum PLATFORM_UNSPECIFIED = 0; + */ + const PLATFORM_UNSPECIFIED = 0; + /** + * Google Container Engine. + * + * Generated from protobuf enum GKE = 1; + */ + const GKE = 1; + /** + * Google App Engine: Flexible Environment. + * + * Generated from protobuf enum FLEX = 2; + */ + const FLEX = 2; + /** + * Custom user-defined platform. + * + * Generated from protobuf enum CUSTOM = 3; + */ + const CUSTOM = 3; + + private static $valueToName = [ + self::PLATFORM_UNSPECIFIED => 'PLATFORM_UNSPECIFIED', + self::GKE => 'GKE', + self::FLEX => 'FLEX', + 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(Platform::class, \Grafeas\V1\DeploymentOccurrence_Platform::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence_Platform.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence_Platform.php new file mode 100644 index 000000000000..411764953ea1 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence_Platform.php @@ -0,0 +1,16 @@ +grafeas.v1.Digest + */ +class Digest extends \Google\Protobuf\Internal\Message +{ + /** + * `SHA1`, `SHA512` etc. + * + * Generated from protobuf field string algo = 1; + */ + protected $algo = ''; + /** + * Value of the digest. + * + * Generated from protobuf field bytes digest_bytes = 2; + */ + protected $digest_bytes = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $algo + * `SHA1`, `SHA512` etc. + * @type string $digest_bytes + * Value of the digest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * `SHA1`, `SHA512` etc. + * + * Generated from protobuf field string algo = 1; + * @return string + */ + public function getAlgo() + { + return $this->algo; + } + + /** + * `SHA1`, `SHA512` etc. + * + * Generated from protobuf field string algo = 1; + * @param string $var + * @return $this + */ + public function setAlgo($var) + { + GPBUtil::checkString($var, True); + $this->algo = $var; + + return $this; + } + + /** + * Value of the digest. + * + * Generated from protobuf field bytes digest_bytes = 2; + * @return string + */ + public function getDigestBytes() + { + return $this->digest_bytes; + } + + /** + * Value of the digest. + * + * Generated from protobuf field bytes digest_bytes = 2; + * @param string $var + * @return $this + */ + public function setDigestBytes($var) + { + GPBUtil::checkString($var, False); + $this->digest_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryNote.php new file mode 100644 index 000000000000..d1fa446c046d --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryNote.php @@ -0,0 +1,73 @@ +grafeas.v1.DiscoveryNote + */ +class DiscoveryNote extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Immutable. The kind of analysis that is handled by this + * discovery. + * + * Generated from protobuf field .grafeas.v1.NoteKind analysis_kind = 1; + */ + protected $analysis_kind = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $analysis_kind + * Required. Immutable. The kind of analysis that is handled by this + * discovery. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Discovery::initOnce(); + parent::__construct($data); + } + + /** + * Required. Immutable. The kind of analysis that is handled by this + * discovery. + * + * Generated from protobuf field .grafeas.v1.NoteKind analysis_kind = 1; + * @return int + */ + public function getAnalysisKind() + { + return $this->analysis_kind; + } + + /** + * Required. Immutable. The kind of analysis that is handled by this + * discovery. + * + * Generated from protobuf field .grafeas.v1.NoteKind analysis_kind = 1; + * @param int $var + * @return $this + */ + public function setAnalysisKind($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\NoteKind::class); + $this->analysis_kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence.php new file mode 100644 index 000000000000..e1710bb863ec --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence.php @@ -0,0 +1,350 @@ +grafeas.v1.DiscoveryOccurrence + */ +class DiscoveryOccurrence extends \Google\Protobuf\Internal\Message +{ + /** + * Whether the resource is continuously analyzed. + * + * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + */ + protected $continuous_analysis = 0; + /** + * The status of discovery for the resource. + * + * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + */ + protected $analysis_status = 0; + /** + * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + */ + protected $analysis_completed = null; + /** + * Indicates any errors encountered during analysis of a resource. There + * could be 0 or more of these errors. + * + * Generated from protobuf field repeated .google.rpc.Status analysis_error = 8; + */ + private $analysis_error; + /** + * When an error is encountered this will contain a LocalizedMessage under + * details to show to the user. The LocalizedMessage is output only and + * populated by the API. + * + * Generated from protobuf field .google.rpc.Status analysis_status_error = 3; + */ + protected $analysis_status_error = null; + /** + * The CPE of the resource being scanned. + * + * Generated from protobuf field string cpe = 4; + */ + protected $cpe = ''; + /** + * The last time this resource was scanned. + * + * Generated from protobuf field .google.protobuf.Timestamp last_scan_time = 5; + */ + protected $last_scan_time = null; + /** + * The time occurrences related to this discovery occurrence were archived. + * + * Generated from protobuf field .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $archive_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $continuous_analysis + * Whether the resource is continuously analyzed. + * @type int $analysis_status + * The status of discovery for the resource. + * @type \Grafeas\V1\DiscoveryOccurrence\AnalysisCompleted $analysis_completed + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $analysis_error + * Indicates any errors encountered during analysis of a resource. There + * could be 0 or more of these errors. + * @type \Google\Rpc\Status $analysis_status_error + * When an error is encountered this will contain a LocalizedMessage under + * details to show to the user. The LocalizedMessage is output only and + * populated by the API. + * @type string $cpe + * The CPE of the resource being scanned. + * @type \Google\Protobuf\Timestamp $last_scan_time + * The last time this resource was scanned. + * @type \Google\Protobuf\Timestamp $archive_time + * The time occurrences related to this discovery occurrence were archived. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Discovery::initOnce(); + parent::__construct($data); + } + + /** + * Whether the resource is continuously analyzed. + * + * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @return int + */ + public function getContinuousAnalysis() + { + return $this->continuous_analysis; + } + + /** + * Whether the resource is continuously analyzed. + * + * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; + * @param int $var + * @return $this + */ + public function setContinuousAnalysis($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\DiscoveryOccurrence\ContinuousAnalysis::class); + $this->continuous_analysis = $var; + + return $this; + } + + /** + * The status of discovery for the resource. + * + * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @return int + */ + public function getAnalysisStatus() + { + return $this->analysis_status; + } + + /** + * The status of discovery for the resource. + * + * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; + * @param int $var + * @return $this + */ + public function setAnalysisStatus($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\DiscoveryOccurrence\AnalysisStatus::class); + $this->analysis_status = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + * @return \Grafeas\V1\DiscoveryOccurrence\AnalysisCompleted|null + */ + public function getAnalysisCompleted() + { + return $this->analysis_completed; + } + + public function hasAnalysisCompleted() + { + return isset($this->analysis_completed); + } + + public function clearAnalysisCompleted() + { + unset($this->analysis_completed); + } + + /** + * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; + * @param \Grafeas\V1\DiscoveryOccurrence\AnalysisCompleted $var + * @return $this + */ + public function setAnalysisCompleted($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\DiscoveryOccurrence\AnalysisCompleted::class); + $this->analysis_completed = $var; + + return $this; + } + + /** + * Indicates any errors encountered during analysis of a resource. There + * could be 0 or more of these errors. + * + * Generated from protobuf field repeated .google.rpc.Status analysis_error = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAnalysisError() + { + return $this->analysis_error; + } + + /** + * Indicates any errors encountered during analysis of a resource. There + * could be 0 or more of these errors. + * + * Generated from protobuf field repeated .google.rpc.Status analysis_error = 8; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAnalysisError($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->analysis_error = $arr; + + return $this; + } + + /** + * When an error is encountered this will contain a LocalizedMessage under + * details to show to the user. The LocalizedMessage is output only and + * populated by the API. + * + * Generated from protobuf field .google.rpc.Status analysis_status_error = 3; + * @return \Google\Rpc\Status|null + */ + public function getAnalysisStatusError() + { + return $this->analysis_status_error; + } + + public function hasAnalysisStatusError() + { + return isset($this->analysis_status_error); + } + + public function clearAnalysisStatusError() + { + unset($this->analysis_status_error); + } + + /** + * When an error is encountered this will contain a LocalizedMessage under + * details to show to the user. The LocalizedMessage is output only and + * populated by the API. + * + * Generated from protobuf field .google.rpc.Status analysis_status_error = 3; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setAnalysisStatusError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->analysis_status_error = $var; + + return $this; + } + + /** + * The CPE of the resource being scanned. + * + * Generated from protobuf field string cpe = 4; + * @return string + */ + public function getCpe() + { + return $this->cpe; + } + + /** + * The CPE of the resource being scanned. + * + * Generated from protobuf field string cpe = 4; + * @param string $var + * @return $this + */ + public function setCpe($var) + { + GPBUtil::checkString($var, True); + $this->cpe = $var; + + return $this; + } + + /** + * The last time this resource was scanned. + * + * Generated from protobuf field .google.protobuf.Timestamp last_scan_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastScanTime() + { + return $this->last_scan_time; + } + + public function hasLastScanTime() + { + return isset($this->last_scan_time); + } + + public function clearLastScanTime() + { + unset($this->last_scan_time); + } + + /** + * The last time this resource was scanned. + * + * Generated from protobuf field .google.protobuf.Timestamp last_scan_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastScanTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_scan_time = $var; + + return $this; + } + + /** + * The time occurrences related to this discovery occurrence were archived. + * + * Generated from protobuf field .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getArchiveTime() + { + return $this->archive_time; + } + + public function hasArchiveTime() + { + return isset($this->archive_time); + } + + public function clearArchiveTime() + { + unset($this->archive_time); + } + + /** + * The time occurrences related to this discovery occurrence were archived. + * + * Generated from protobuf field .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setArchiveTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->archive_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisCompleted.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisCompleted.php new file mode 100644 index 000000000000..5d1e7201fb22 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisCompleted.php @@ -0,0 +1,64 @@ +grafeas.v1.DiscoveryOccurrence.AnalysisCompleted + */ +class AnalysisCompleted extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string analysis_type = 1; + */ + private $analysis_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $analysis_type + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Discovery::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string analysis_type = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAnalysisType() + { + return $this->analysis_type; + } + + /** + * Generated from protobuf field repeated string analysis_type = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAnalysisType($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->analysis_type = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AnalysisCompleted::class, \Grafeas\V1\DiscoveryOccurrence_AnalysisCompleted::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisStatus.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisStatus.php new file mode 100644 index 000000000000..fcef24fb33a3 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisStatus.php @@ -0,0 +1,94 @@ +grafeas.v1.DiscoveryOccurrence.AnalysisStatus + */ +class AnalysisStatus +{ + /** + * Unknown. + * + * Generated from protobuf enum ANALYSIS_STATUS_UNSPECIFIED = 0; + */ + const ANALYSIS_STATUS_UNSPECIFIED = 0; + /** + * Resource is known but no action has been taken yet. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * Resource is being analyzed. + * + * Generated from protobuf enum SCANNING = 2; + */ + const SCANNING = 2; + /** + * Analysis has finished successfully. + * + * Generated from protobuf enum FINISHED_SUCCESS = 3; + */ + const FINISHED_SUCCESS = 3; + /** + * Analysis has completed. + * + * Generated from protobuf enum COMPLETE = 3; + */ + const COMPLETE = 3; + /** + * Analysis has finished unsuccessfully, the analysis itself is in a bad + * state. + * + * Generated from protobuf enum FINISHED_FAILED = 4; + */ + const FINISHED_FAILED = 4; + /** + * The resource is known not to be supported. + * + * Generated from protobuf enum FINISHED_UNSUPPORTED = 5; + */ + const FINISHED_UNSUPPORTED = 5; + + private static $valueToName = [ + self::ANALYSIS_STATUS_UNSPECIFIED => 'ANALYSIS_STATUS_UNSPECIFIED', + self::PENDING => 'PENDING', + self::SCANNING => 'SCANNING', + self::FINISHED_SUCCESS => 'FINISHED_SUCCESS', + self::COMPLETE => 'COMPLETE', + self::FINISHED_FAILED => 'FINISHED_FAILED', + self::FINISHED_UNSUPPORTED => 'FINISHED_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(AnalysisStatus::class, \Grafeas\V1\DiscoveryOccurrence_AnalysisStatus::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/ContinuousAnalysis.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/ContinuousAnalysis.php new file mode 100644 index 000000000000..350c2fb7590b --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/ContinuousAnalysis.php @@ -0,0 +1,64 @@ +grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis + */ +class ContinuousAnalysis +{ + /** + * Unknown. + * + * Generated from protobuf enum CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; + */ + const CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; + /** + * The resource is continuously analyzed. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The resource is ignored for continuous analysis. + * + * Generated from protobuf enum INACTIVE = 2; + */ + const INACTIVE = 2; + + private static $valueToName = [ + self::CONTINUOUS_ANALYSIS_UNSPECIFIED => 'CONTINUOUS_ANALYSIS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::INACTIVE => 'INACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ContinuousAnalysis::class, \Grafeas\V1\DiscoveryOccurrence_ContinuousAnalysis::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence_AnalysisCompleted.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence_AnalysisCompleted.php new file mode 100644 index 000000000000..8fb46b02d277 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence_AnalysisCompleted.php @@ -0,0 +1,16 @@ +grafeas.v1.Distribution + */ +class Distribution extends \Google\Protobuf\Internal\Message +{ + /** + * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + * denoting the package manager version distributing a package. + * + * Generated from protobuf field string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cpe_uri = ''; + /** + * The CPU architecture for which packages in this distribution channel were + * built. + * + * Generated from protobuf field .grafeas.v1.Architecture architecture = 2; + */ + protected $architecture = 0; + /** + * The latest available version of this package in this distribution channel. + * + * Generated from protobuf field .grafeas.v1.Version latest_version = 3; + */ + protected $latest_version = null; + /** + * A freeform string denoting the maintainer of this package. + * + * Generated from protobuf field string maintainer = 4; + */ + protected $maintainer = ''; + /** + * The distribution channel-specific homepage for this package. + * + * Generated from protobuf field string url = 5; + */ + protected $url = ''; + /** + * The distribution channel-specific description of this package. + * + * Generated from protobuf field string description = 6; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cpe_uri + * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + * denoting the package manager version distributing a package. + * @type int $architecture + * The CPU architecture for which packages in this distribution channel were + * built. + * @type \Grafeas\V1\Version $latest_version + * The latest available version of this package in this distribution channel. + * @type string $maintainer + * A freeform string denoting the maintainer of this package. + * @type string $url + * The distribution channel-specific homepage for this package. + * @type string $description + * The distribution channel-specific description of this package. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Package::initOnce(); + parent::__construct($data); + } + + /** + * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + * denoting the package manager version distributing a package. + * + * Generated from protobuf field string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCpeUri() + { + return $this->cpe_uri; + } + + /** + * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + * denoting the package manager version distributing a package. + * + * Generated from protobuf field string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCpeUri($var) + { + GPBUtil::checkString($var, True); + $this->cpe_uri = $var; + + return $this; + } + + /** + * The CPU architecture for which packages in this distribution channel were + * built. + * + * Generated from protobuf field .grafeas.v1.Architecture architecture = 2; + * @return int + */ + public function getArchitecture() + { + return $this->architecture; + } + + /** + * The CPU architecture for which packages in this distribution channel were + * built. + * + * Generated from protobuf field .grafeas.v1.Architecture architecture = 2; + * @param int $var + * @return $this + */ + public function setArchitecture($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\Architecture::class); + $this->architecture = $var; + + return $this; + } + + /** + * The latest available version of this package in this distribution channel. + * + * Generated from protobuf field .grafeas.v1.Version latest_version = 3; + * @return \Grafeas\V1\Version|null + */ + public function getLatestVersion() + { + return $this->latest_version; + } + + public function hasLatestVersion() + { + return isset($this->latest_version); + } + + public function clearLatestVersion() + { + unset($this->latest_version); + } + + /** + * The latest available version of this package in this distribution channel. + * + * Generated from protobuf field .grafeas.v1.Version latest_version = 3; + * @param \Grafeas\V1\Version $var + * @return $this + */ + public function setLatestVersion($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); + $this->latest_version = $var; + + return $this; + } + + /** + * A freeform string denoting the maintainer of this package. + * + * Generated from protobuf field string maintainer = 4; + * @return string + */ + public function getMaintainer() + { + return $this->maintainer; + } + + /** + * A freeform string denoting the maintainer of this package. + * + * Generated from protobuf field string maintainer = 4; + * @param string $var + * @return $this + */ + public function setMaintainer($var) + { + GPBUtil::checkString($var, True); + $this->maintainer = $var; + + return $this; + } + + /** + * The distribution channel-specific homepage for this package. + * + * Generated from protobuf field string url = 5; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The distribution channel-specific homepage for this package. + * + * Generated from protobuf field string url = 5; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * The distribution channel-specific description of this package. + * + * Generated from protobuf field string description = 6; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The distribution channel-specific description of this package. + * + * 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/Grafeas/v1/proto/src/Grafeas/V1/Envelope.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Envelope.php new file mode 100644 index 000000000000..17bcc1346ae5 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Envelope.php @@ -0,0 +1,116 @@ +grafeas.v1.Envelope + */ +class Envelope extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes payload = 1; + */ + protected $payload = ''; + /** + * Generated from protobuf field string payload_type = 2; + */ + protected $payload_type = ''; + /** + * Generated from protobuf field repeated .grafeas.v1.EnvelopeSignature signatures = 3; + */ + private $signatures; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $payload + * @type string $payload_type + * @type array<\Grafeas\V1\EnvelopeSignature>|\Google\Protobuf\Internal\RepeatedField $signatures + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes payload = 1; + * @return string + */ + public function getPayload() + { + return $this->payload; + } + + /** + * Generated from protobuf field bytes payload = 1; + * @param string $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkString($var, False); + $this->payload = $var; + + return $this; + } + + /** + * Generated from protobuf field string payload_type = 2; + * @return string + */ + public function getPayloadType() + { + return $this->payload_type; + } + + /** + * Generated from protobuf field string payload_type = 2; + * @param string $var + * @return $this + */ + public function setPayloadType($var) + { + GPBUtil::checkString($var, True); + $this->payload_type = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .grafeas.v1.EnvelopeSignature signatures = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSignatures() + { + return $this->signatures; + } + + /** + * Generated from protobuf field repeated .grafeas.v1.EnvelopeSignature signatures = 3; + * @param array<\Grafeas\V1\EnvelopeSignature>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSignatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\EnvelopeSignature::class); + $this->signatures = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/EnvelopeSignature.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/EnvelopeSignature.php new file mode 100644 index 000000000000..61ebdc60fbcf --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/EnvelopeSignature.php @@ -0,0 +1,85 @@ +grafeas.v1.EnvelopeSignature + */ +class EnvelopeSignature extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes sig = 1; + */ + protected $sig = ''; + /** + * Generated from protobuf field string keyid = 2; + */ + protected $keyid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sig + * @type string $keyid + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes sig = 1; + * @return string + */ + public function getSig() + { + return $this->sig; + } + + /** + * Generated from protobuf field bytes sig = 1; + * @param string $var + * @return $this + */ + public function setSig($var) + { + GPBUtil::checkString($var, False); + $this->sig = $var; + + return $this; + } + + /** + * Generated from protobuf field string keyid = 2; + * @return string + */ + public function getKeyid() + { + return $this->keyid; + } + + /** + * Generated from protobuf field string keyid = 2; + * @param string $var + * @return $this + */ + public function setKeyid($var) + { + GPBUtil::checkString($var, True); + $this->keyid = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileHashes.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileHashes.php new file mode 100644 index 000000000000..a24ab1da8401 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileHashes.php @@ -0,0 +1,68 @@ +grafeas.v1.FileHashes + */ +class FileHashes extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Collection of file hashes. + * + * Generated from protobuf field repeated .grafeas.v1.Hash file_hash = 1; + */ + private $file_hash; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Grafeas\V1\Hash>|\Google\Protobuf\Internal\RepeatedField $file_hash + * Required. Collection of file hashes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Provenance::initOnce(); + parent::__construct($data); + } + + /** + * Required. Collection of file hashes. + * + * Generated from protobuf field repeated .grafeas.v1.Hash file_hash = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFileHash() + { + return $this->file_hash; + } + + /** + * Required. Collection of file hashes. + * + * Generated from protobuf field repeated .grafeas.v1.Hash file_hash = 1; + * @param array<\Grafeas\V1\Hash>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFileHash($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Hash::class); + $this->file_hash = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileLocation.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileLocation.php new file mode 100644 index 000000000000..c7f6d9e7cccc --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileLocation.php @@ -0,0 +1,71 @@ +grafeas.v1.FileLocation + */ +class FileLocation extends \Google\Protobuf\Internal\Message +{ + /** + * For jars that are contained inside .war files, this filepath + * can indicate the path to war file combined with the path to jar file. + * + * Generated from protobuf field string file_path = 1; + */ + protected $file_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $file_path + * For jars that are contained inside .war files, this filepath + * can indicate the path to war file combined with the path to jar file. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * For jars that are contained inside .war files, this filepath + * can indicate the path to war file combined with the path to jar file. + * + * Generated from protobuf field string file_path = 1; + * @return string + */ + public function getFilePath() + { + return $this->file_path; + } + + /** + * For jars that are contained inside .war files, this filepath + * can indicate the path to war file combined with the path to jar file. + * + * Generated from protobuf field string file_path = 1; + * @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/Grafeas/v1/proto/src/Grafeas/V1/Fingerprint.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Fingerprint.php new file mode 100644 index 000000000000..7191d7383ef5 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Fingerprint.php @@ -0,0 +1,151 @@ +grafeas.v1.Fingerprint + */ +class Fingerprint extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The layer ID of the final layer in the Docker image's v1 + * representation. + * + * Generated from protobuf field string v1_name = 1; + */ + protected $v1_name = ''; + /** + * Required. The ordered list of v2 blobs that represent a given image. + * + * Generated from protobuf field repeated string v2_blob = 2; + */ + private $v2_blob; + /** + * Output only. The name of the image's v2 blobs computed via: + * [bottom] := v2_blob[bottom] + * [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) + * Only the name of the final blob is kept. + * + * Generated from protobuf field string v2_name = 3; + */ + protected $v2_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $v1_name + * Required. The layer ID of the final layer in the Docker image's v1 + * representation. + * @type array|\Google\Protobuf\Internal\RepeatedField $v2_blob + * Required. The ordered list of v2 blobs that represent a given image. + * @type string $v2_name + * Output only. The name of the image's v2 blobs computed via: + * [bottom] := v2_blob[bottom] + * [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) + * Only the name of the final blob is kept. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Image::initOnce(); + parent::__construct($data); + } + + /** + * Required. The layer ID of the final layer in the Docker image's v1 + * representation. + * + * Generated from protobuf field string v1_name = 1; + * @return string + */ + public function getV1Name() + { + return $this->v1_name; + } + + /** + * Required. The layer ID of the final layer in the Docker image's v1 + * representation. + * + * Generated from protobuf field string v1_name = 1; + * @param string $var + * @return $this + */ + public function setV1Name($var) + { + GPBUtil::checkString($var, True); + $this->v1_name = $var; + + return $this; + } + + /** + * Required. The ordered list of v2 blobs that represent a given image. + * + * Generated from protobuf field repeated string v2_blob = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getV2Blob() + { + return $this->v2_blob; + } + + /** + * Required. The ordered list of v2 blobs that represent a given image. + * + * Generated from protobuf field repeated string v2_blob = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setV2Blob($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->v2_blob = $arr; + + return $this; + } + + /** + * Output only. The name of the image's v2 blobs computed via: + * [bottom] := v2_blob[bottom] + * [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) + * Only the name of the final blob is kept. + * + * Generated from protobuf field string v2_name = 3; + * @return string + */ + public function getV2Name() + { + return $this->v2_name; + } + + /** + * Output only. The name of the image's v2 blobs computed via: + * [bottom] := v2_blob[bottom] + * [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) + * Only the name of the final blob is kept. + * + * Generated from protobuf field string v2_name = 3; + * @param string $var + * @return $this + */ + public function setV2Name($var) + { + GPBUtil::checkString($var, True); + $this->v2_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GerritSourceContext.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GerritSourceContext.php new file mode 100644 index 000000000000..616fb62984ad --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GerritSourceContext.php @@ -0,0 +1,184 @@ +grafeas.v1.GerritSourceContext + */ +class GerritSourceContext extends \Google\Protobuf\Internal\Message +{ + /** + * The URI of a running Gerrit instance. + * + * Generated from protobuf field string host_uri = 1; + */ + protected $host_uri = ''; + /** + * The full project name within the host. Projects may be nested, so + * "project/subproject" is a valid project name. The "repo name" is the + * hostURI/project. + * + * Generated from protobuf field string gerrit_project = 2; + */ + protected $gerrit_project = ''; + protected $revision; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $host_uri + * The URI of a running Gerrit instance. + * @type string $gerrit_project + * The full project name within the host. Projects may be nested, so + * "project/subproject" is a valid project name. The "repo name" is the + * hostURI/project. + * @type string $revision_id + * A revision (commit) ID. + * @type \Grafeas\V1\AliasContext $alias_context + * An alias, which may be a branch or tag. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Provenance::initOnce(); + parent::__construct($data); + } + + /** + * The URI of a running Gerrit instance. + * + * Generated from protobuf field string host_uri = 1; + * @return string + */ + public function getHostUri() + { + return $this->host_uri; + } + + /** + * The URI of a running Gerrit instance. + * + * Generated from protobuf field string host_uri = 1; + * @param string $var + * @return $this + */ + public function setHostUri($var) + { + GPBUtil::checkString($var, True); + $this->host_uri = $var; + + return $this; + } + + /** + * The full project name within the host. Projects may be nested, so + * "project/subproject" is a valid project name. The "repo name" is the + * hostURI/project. + * + * Generated from protobuf field string gerrit_project = 2; + * @return string + */ + public function getGerritProject() + { + return $this->gerrit_project; + } + + /** + * The full project name within the host. Projects may be nested, so + * "project/subproject" is a valid project name. The "repo name" is the + * hostURI/project. + * + * Generated from protobuf field string gerrit_project = 2; + * @param string $var + * @return $this + */ + public function setGerritProject($var) + { + GPBUtil::checkString($var, True); + $this->gerrit_project = $var; + + return $this; + } + + /** + * A revision (commit) ID. + * + * Generated from protobuf field string revision_id = 3; + * @return string + */ + public function getRevisionId() + { + return $this->readOneof(3); + } + + public function hasRevisionId() + { + return $this->hasOneof(3); + } + + /** + * A revision (commit) ID. + * + * Generated from protobuf field string revision_id = 3; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * An alias, which may be a branch or tag. + * + * Generated from protobuf field .grafeas.v1.AliasContext alias_context = 4; + * @return \Grafeas\V1\AliasContext|null + */ + public function getAliasContext() + { + return $this->readOneof(4); + } + + public function hasAliasContext() + { + return $this->hasOneof(4); + } + + /** + * An alias, which may be a branch or tag. + * + * Generated from protobuf field .grafeas.v1.AliasContext alias_context = 4; + * @param \Grafeas\V1\AliasContext $var + * @return $this + */ + public function setAliasContext($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\AliasContext::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getRevision() + { + return $this->whichOneof("revision"); + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetNoteRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetNoteRequest.php new file mode 100644 index 000000000000..1f34634c9e3a --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetNoteRequest.php @@ -0,0 +1,71 @@ +grafeas.v1.GetNoteRequest + */ +class GetNoteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_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 + * The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_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; + } + + /** + * The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_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/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceNoteRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceNoteRequest.php new file mode 100644 index 000000000000..16072c0db579 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceNoteRequest.php @@ -0,0 +1,71 @@ +grafeas.v1.GetOccurrenceNoteRequest + */ +class GetOccurrenceNoteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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 + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; + } + + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceRequest.php new file mode 100644 index 000000000000..44e659ea0b83 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceRequest.php @@ -0,0 +1,71 @@ +grafeas.v1.GetOccurrenceRequest + */ +class GetOccurrenceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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 + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; + } + + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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/Grafeas/v1/proto/src/Grafeas/V1/GitSourceContext.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GitSourceContext.php new file mode 100644 index 000000000000..6eb31ad84fe2 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GitSourceContext.php @@ -0,0 +1,102 @@ +grafeas.v1.GitSourceContext + */ +class GitSourceContext extends \Google\Protobuf\Internal\Message +{ + /** + * Git repository URL. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + /** + * Git commit hash. + * + * Generated from protobuf field string revision_id = 2; + */ + protected $revision_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * Git repository URL. + * @type string $revision_id + * Git commit hash. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Provenance::initOnce(); + parent::__construct($data); + } + + /** + * Git repository URL. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Git repository URL. + * + * 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; + } + + /** + * Git commit hash. + * + * Generated from protobuf field string revision_id = 2; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * Git commit hash. + * + * Generated from protobuf field string revision_id = 2; + * @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/Grafeas/v1/proto/src/Grafeas/V1/GrafeasGrpcClient.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GrafeasGrpcClient.php new file mode 100644 index 000000000000..5c3784661a8b --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GrafeasGrpcClient.php @@ -0,0 +1,263 @@ +_simpleRequest('/grafeas.v1.Grafeas/GetOccurrence', + $argument, + ['\Grafeas\V1\Occurrence', 'decode'], + $metadata, $options); + } + + /** + * Lists occurrences for the specified project. + * @param \Grafeas\V1\ListOccurrencesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListOccurrences(\Grafeas\V1\ListOccurrencesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grafeas.v1.Grafeas/ListOccurrences', + $argument, + ['\Grafeas\V1\ListOccurrencesResponse', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified occurrence. For example, use this method to delete an + * occurrence when the occurrence is no longer applicable for the given + * resource. + * @param \Grafeas\V1\DeleteOccurrenceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteOccurrence(\Grafeas\V1\DeleteOccurrenceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grafeas.v1.Grafeas/DeleteOccurrence', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Creates a new occurrence. + * @param \Grafeas\V1\CreateOccurrenceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateOccurrence(\Grafeas\V1\CreateOccurrenceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grafeas.v1.Grafeas/CreateOccurrence', + $argument, + ['\Grafeas\V1\Occurrence', 'decode'], + $metadata, $options); + } + + /** + * Creates new occurrences in batch. + * @param \Grafeas\V1\BatchCreateOccurrencesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function BatchCreateOccurrences(\Grafeas\V1\BatchCreateOccurrencesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grafeas.v1.Grafeas/BatchCreateOccurrences', + $argument, + ['\Grafeas\V1\BatchCreateOccurrencesResponse', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified occurrence. + * @param \Grafeas\V1\UpdateOccurrenceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateOccurrence(\Grafeas\V1\UpdateOccurrenceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grafeas.v1.Grafeas/UpdateOccurrence', + $argument, + ['\Grafeas\V1\Occurrence', 'decode'], + $metadata, $options); + } + + /** + * Gets the note attached to the specified occurrence. Consumer projects can + * use this method to get a note that belongs to a provider project. + * @param \Grafeas\V1\GetOccurrenceNoteRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetOccurrenceNote(\Grafeas\V1\GetOccurrenceNoteRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grafeas.v1.Grafeas/GetOccurrenceNote', + $argument, + ['\Grafeas\V1\Note', 'decode'], + $metadata, $options); + } + + /** + * Gets the specified note. + * @param \Grafeas\V1\GetNoteRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetNote(\Grafeas\V1\GetNoteRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grafeas.v1.Grafeas/GetNote', + $argument, + ['\Grafeas\V1\Note', 'decode'], + $metadata, $options); + } + + /** + * Lists notes for the specified project. + * @param \Grafeas\V1\ListNotesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListNotes(\Grafeas\V1\ListNotesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grafeas.v1.Grafeas/ListNotes', + $argument, + ['\Grafeas\V1\ListNotesResponse', 'decode'], + $metadata, $options); + } + + /** + * Deletes the specified note. + * @param \Grafeas\V1\DeleteNoteRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteNote(\Grafeas\V1\DeleteNoteRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grafeas.v1.Grafeas/DeleteNote', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Creates a new note. + * @param \Grafeas\V1\CreateNoteRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateNote(\Grafeas\V1\CreateNoteRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grafeas.v1.Grafeas/CreateNote', + $argument, + ['\Grafeas\V1\Note', 'decode'], + $metadata, $options); + } + + /** + * Creates new notes in batch. + * @param \Grafeas\V1\BatchCreateNotesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function BatchCreateNotes(\Grafeas\V1\BatchCreateNotesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grafeas.v1.Grafeas/BatchCreateNotes', + $argument, + ['\Grafeas\V1\BatchCreateNotesResponse', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified note. + * @param \Grafeas\V1\UpdateNoteRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateNote(\Grafeas\V1\UpdateNoteRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grafeas.v1.Grafeas/UpdateNote', + $argument, + ['\Grafeas\V1\Note', 'decode'], + $metadata, $options); + } + + /** + * Lists occurrences referencing the specified note. Provider projects can use + * this method to get all occurrences across consumer projects referencing the + * specified note. + * @param \Grafeas\V1\ListNoteOccurrencesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListNoteOccurrences(\Grafeas\V1\ListNoteOccurrencesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/grafeas.v1.Grafeas/ListNoteOccurrences', + $argument, + ['\Grafeas\V1\ListNoteOccurrencesResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Hash.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Hash.php new file mode 100644 index 000000000000..a6f6d1b8ae02 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Hash.php @@ -0,0 +1,101 @@ +grafeas.v1.Hash + */ +class Hash extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The type of hash that was performed, e.g. "SHA-256". + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * Required. The hash value. + * + * Generated from protobuf field bytes value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * Required. The type of hash that was performed, e.g. "SHA-256". + * @type string $value + * Required. The hash value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Provenance::initOnce(); + parent::__construct($data); + } + + /** + * Required. The type of hash that was performed, e.g. "SHA-256". + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of hash that was performed, e.g. "SHA-256". + * + * 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; + } + + /** + * Required. The hash value. + * + * Generated from protobuf field bytes value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Required. The hash value. + * + * Generated from protobuf field bytes value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, False); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageNote.php new file mode 100644 index 000000000000..661c99087167 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageNote.php @@ -0,0 +1,119 @@ + + * Or an equivalent reference, e.g., a tag of the resource_url. + * + * Generated from protobuf message grafeas.v1.ImageNote + */ +class ImageNote extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Immutable. The resource_url for the resource representing the + * basis of associated occurrence images. + * + * Generated from protobuf field string resource_url = 1; + */ + protected $resource_url = ''; + /** + * Required. Immutable. The fingerprint of the base image. + * + * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 2; + */ + protected $fingerprint = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_url + * Required. Immutable. The resource_url for the resource representing the + * basis of associated occurrence images. + * @type \Grafeas\V1\Fingerprint $fingerprint + * Required. Immutable. The fingerprint of the base image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Image::initOnce(); + parent::__construct($data); + } + + /** + * Required. Immutable. The resource_url for the resource representing the + * basis of associated occurrence images. + * + * Generated from protobuf field string resource_url = 1; + * @return string + */ + public function getResourceUrl() + { + return $this->resource_url; + } + + /** + * Required. Immutable. The resource_url for the resource representing the + * basis of associated occurrence images. + * + * Generated from protobuf field string resource_url = 1; + * @param string $var + * @return $this + */ + public function setResourceUrl($var) + { + GPBUtil::checkString($var, True); + $this->resource_url = $var; + + return $this; + } + + /** + * Required. Immutable. The fingerprint of the base image. + * + * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 2; + * @return \Grafeas\V1\Fingerprint|null + */ + public function getFingerprint() + { + return $this->fingerprint; + } + + public function hasFingerprint() + { + return isset($this->fingerprint); + } + + public function clearFingerprint() + { + unset($this->fingerprint); + } + + /** + * Required. Immutable. The fingerprint of the base image. + * + * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 2; + * @param \Grafeas\V1\Fingerprint $var + * @return $this + */ + public function setFingerprint($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Fingerprint::class); + $this->fingerprint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageOccurrence.php new file mode 100644 index 000000000000..e6c64fc037e3 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageOccurrence.php @@ -0,0 +1,197 @@ +. + * + * Generated from protobuf message grafeas.v1.ImageOccurrence + */ +class ImageOccurrence extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fingerprint of the derived image. + * + * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 1; + */ + protected $fingerprint = null; + /** + * Output only. The number of layers by which this image differs from the + * associated image basis. + * + * Generated from protobuf field int32 distance = 2; + */ + protected $distance = 0; + /** + * This contains layer-specific metadata, if populated it has length + * "distance" and is ordered with [distance] being the layer immediately + * following the base image and [1] being the final layer. + * + * Generated from protobuf field repeated .grafeas.v1.Layer layer_info = 3; + */ + private $layer_info; + /** + * Output only. This contains the base image URL for the derived image + * occurrence. + * + * Generated from protobuf field string base_resource_url = 4; + */ + protected $base_resource_url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Grafeas\V1\Fingerprint $fingerprint + * Required. The fingerprint of the derived image. + * @type int $distance + * Output only. The number of layers by which this image differs from the + * associated image basis. + * @type array<\Grafeas\V1\Layer>|\Google\Protobuf\Internal\RepeatedField $layer_info + * This contains layer-specific metadata, if populated it has length + * "distance" and is ordered with [distance] being the layer immediately + * following the base image and [1] being the final layer. + * @type string $base_resource_url + * Output only. This contains the base image URL for the derived image + * occurrence. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Image::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fingerprint of the derived image. + * + * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 1; + * @return \Grafeas\V1\Fingerprint|null + */ + public function getFingerprint() + { + return $this->fingerprint; + } + + public function hasFingerprint() + { + return isset($this->fingerprint); + } + + public function clearFingerprint() + { + unset($this->fingerprint); + } + + /** + * Required. The fingerprint of the derived image. + * + * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 1; + * @param \Grafeas\V1\Fingerprint $var + * @return $this + */ + public function setFingerprint($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Fingerprint::class); + $this->fingerprint = $var; + + return $this; + } + + /** + * Output only. The number of layers by which this image differs from the + * associated image basis. + * + * Generated from protobuf field int32 distance = 2; + * @return int + */ + public function getDistance() + { + return $this->distance; + } + + /** + * Output only. The number of layers by which this image differs from the + * associated image basis. + * + * Generated from protobuf field int32 distance = 2; + * @param int $var + * @return $this + */ + public function setDistance($var) + { + GPBUtil::checkInt32($var); + $this->distance = $var; + + return $this; + } + + /** + * This contains layer-specific metadata, if populated it has length + * "distance" and is ordered with [distance] being the layer immediately + * following the base image and [1] being the final layer. + * + * Generated from protobuf field repeated .grafeas.v1.Layer layer_info = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLayerInfo() + { + return $this->layer_info; + } + + /** + * This contains layer-specific metadata, if populated it has length + * "distance" and is ordered with [distance] being the layer immediately + * following the base image and [1] being the final layer. + * + * Generated from protobuf field repeated .grafeas.v1.Layer layer_info = 3; + * @param array<\Grafeas\V1\Layer>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLayerInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Layer::class); + $this->layer_info = $arr; + + return $this; + } + + /** + * Output only. This contains the base image URL for the derived image + * occurrence. + * + * Generated from protobuf field string base_resource_url = 4; + * @return string + */ + public function getBaseResourceUrl() + { + return $this->base_resource_url; + } + + /** + * Output only. This contains the base image URL for the derived image + * occurrence. + * + * Generated from protobuf field string base_resource_url = 4; + * @param string $var + * @return $this + */ + public function setBaseResourceUrl($var) + { + GPBUtil::checkString($var, True); + $this->base_resource_url = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoProvenance.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoProvenance.php new file mode 100644 index 000000000000..74cc83a629ce --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoProvenance.php @@ -0,0 +1,214 @@ +grafeas.v1.InTotoProvenance + */ +class InTotoProvenance extends \Google\Protobuf\Internal\Message +{ + /** + * required + * + * Generated from protobuf field .grafeas.v1.BuilderConfig builder_config = 1; + */ + protected $builder_config = null; + /** + * Identifies the configuration used for the build. + * When combined with materials, this SHOULD fully describe the build, + * such that re-running this recipe results in bit-for-bit identical output + * (if the build is reproducible). + * + * Generated from protobuf field .grafeas.v1.Recipe recipe = 2; + */ + protected $recipe = null; + /** + * Generated from protobuf field .grafeas.v1.Metadata metadata = 3; + */ + protected $metadata = null; + /** + * The collection of artifacts that influenced the build including sources, + * dependencies, build tools, base images, and so on. This is considered to be + * incomplete unless metadata.completeness.materials is true. Unset or null is + * equivalent to empty. + * + * Generated from protobuf field repeated string materials = 4; + */ + private $materials; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Grafeas\V1\BuilderConfig $builder_config + * required + * @type \Grafeas\V1\Recipe $recipe + * Identifies the configuration used for the build. + * When combined with materials, this SHOULD fully describe the build, + * such that re-running this recipe results in bit-for-bit identical output + * (if the build is reproducible). + * @type \Grafeas\V1\Metadata $metadata + * @type array|\Google\Protobuf\Internal\RepeatedField $materials + * The collection of artifacts that influenced the build including sources, + * dependencies, build tools, base images, and so on. This is considered to be + * incomplete unless metadata.completeness.materials is true. Unset or null is + * equivalent to empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\IntotoProvenance::initOnce(); + parent::__construct($data); + } + + /** + * required + * + * Generated from protobuf field .grafeas.v1.BuilderConfig builder_config = 1; + * @return \Grafeas\V1\BuilderConfig|null + */ + public function getBuilderConfig() + { + return $this->builder_config; + } + + public function hasBuilderConfig() + { + return isset($this->builder_config); + } + + public function clearBuilderConfig() + { + unset($this->builder_config); + } + + /** + * required + * + * Generated from protobuf field .grafeas.v1.BuilderConfig builder_config = 1; + * @param \Grafeas\V1\BuilderConfig $var + * @return $this + */ + public function setBuilderConfig($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\BuilderConfig::class); + $this->builder_config = $var; + + return $this; + } + + /** + * Identifies the configuration used for the build. + * When combined with materials, this SHOULD fully describe the build, + * such that re-running this recipe results in bit-for-bit identical output + * (if the build is reproducible). + * + * Generated from protobuf field .grafeas.v1.Recipe recipe = 2; + * @return \Grafeas\V1\Recipe|null + */ + public function getRecipe() + { + return $this->recipe; + } + + public function hasRecipe() + { + return isset($this->recipe); + } + + public function clearRecipe() + { + unset($this->recipe); + } + + /** + * Identifies the configuration used for the build. + * When combined with materials, this SHOULD fully describe the build, + * such that re-running this recipe results in bit-for-bit identical output + * (if the build is reproducible). + * + * Generated from protobuf field .grafeas.v1.Recipe recipe = 2; + * @param \Grafeas\V1\Recipe $var + * @return $this + */ + public function setRecipe($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Recipe::class); + $this->recipe = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.Metadata metadata = 3; + * @return \Grafeas\V1\Metadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Generated from protobuf field .grafeas.v1.Metadata metadata = 3; + * @param \Grafeas\V1\Metadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Metadata::class); + $this->metadata = $var; + + return $this; + } + + /** + * The collection of artifacts that influenced the build including sources, + * dependencies, build tools, base images, and so on. This is considered to be + * incomplete unless metadata.completeness.materials is true. Unset or null is + * equivalent to empty. + * + * Generated from protobuf field repeated string materials = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMaterials() + { + return $this->materials; + } + + /** + * The collection of artifacts that influenced the build including sources, + * dependencies, build tools, base images, and so on. This is considered to be + * incomplete unless metadata.completeness.materials is true. Unset or null is + * equivalent to empty. + * + * Generated from protobuf field repeated string materials = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMaterials($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->materials = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoStatement.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoStatement.php new file mode 100644 index 000000000000..93a86b0dd503 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoStatement.php @@ -0,0 +1,224 @@ +grafeas.v1.InTotoStatement + */ +class InTotoStatement extends \Google\Protobuf\Internal\Message +{ + /** + * Always `https://in-toto.io/Statement/v0.1`. + * + * Generated from protobuf field string type = 1 [json_name = "_type"]; + */ + protected $type = ''; + /** + * Generated from protobuf field repeated .grafeas.v1.Subject subject = 2; + */ + private $subject; + /** + * `https://slsa.dev/provenance/v0.1` for SlsaProvenance. + * + * Generated from protobuf field string predicate_type = 3; + */ + protected $predicate_type = ''; + protected $predicate; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * Always `https://in-toto.io/Statement/v0.1`. + * @type array<\Grafeas\V1\Subject>|\Google\Protobuf\Internal\RepeatedField $subject + * @type string $predicate_type + * `https://slsa.dev/provenance/v0.1` for SlsaProvenance. + * @type \Grafeas\V1\InTotoProvenance $provenance + * @type \Grafeas\V1\SlsaProvenance $slsa_provenance + * @type \Grafeas\V1\SlsaProvenanceZeroTwo $slsa_provenance_zero_two + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\IntotoStatement::initOnce(); + parent::__construct($data); + } + + /** + * Always `https://in-toto.io/Statement/v0.1`. + * + * Generated from protobuf field string type = 1 [json_name = "_type"]; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Always `https://in-toto.io/Statement/v0.1`. + * + * Generated from protobuf field string type = 1 [json_name = "_type"]; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .grafeas.v1.Subject subject = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSubject() + { + return $this->subject; + } + + /** + * Generated from protobuf field repeated .grafeas.v1.Subject subject = 2; + * @param array<\Grafeas\V1\Subject>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSubject($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Subject::class); + $this->subject = $arr; + + return $this; + } + + /** + * `https://slsa.dev/provenance/v0.1` for SlsaProvenance. + * + * Generated from protobuf field string predicate_type = 3; + * @return string + */ + public function getPredicateType() + { + return $this->predicate_type; + } + + /** + * `https://slsa.dev/provenance/v0.1` for SlsaProvenance. + * + * Generated from protobuf field string predicate_type = 3; + * @param string $var + * @return $this + */ + public function setPredicateType($var) + { + GPBUtil::checkString($var, True); + $this->predicate_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.InTotoProvenance provenance = 4; + * @return \Grafeas\V1\InTotoProvenance|null + */ + public function getProvenance() + { + return $this->readOneof(4); + } + + public function hasProvenance() + { + return $this->hasOneof(4); + } + + /** + * Generated from protobuf field .grafeas.v1.InTotoProvenance provenance = 4; + * @param \Grafeas\V1\InTotoProvenance $var + * @return $this + */ + public function setProvenance($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\InTotoProvenance::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenance slsa_provenance = 5; + * @return \Grafeas\V1\SlsaProvenance|null + */ + public function getSlsaProvenance() + { + return $this->readOneof(5); + } + + public function hasSlsaProvenance() + { + return $this->hasOneof(5); + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenance slsa_provenance = 5; + * @param \Grafeas\V1\SlsaProvenance $var + * @return $this + */ + public function setSlsaProvenance($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + * @return \Grafeas\V1\SlsaProvenanceZeroTwo|null + */ + public function getSlsaProvenanceZeroTwo() + { + return $this->readOneof(6); + } + + public function hasSlsaProvenanceZeroTwo() + { + return $this->hasOneof(6); + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; + * @param \Grafeas\V1\SlsaProvenanceZeroTwo $var + * @return $this + */ + public function setSlsaProvenanceZeroTwo($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getPredicate() + { + return $this->whichOneof("predicate"); + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Jwt.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Jwt.php new file mode 100644 index 000000000000..3b9e9a5ece42 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Jwt.php @@ -0,0 +1,73 @@ +grafeas.v1.Jwt + */ +class Jwt extends \Google\Protobuf\Internal\Message +{ + /** + * The compact encoding of a JWS, which is always three base64 encoded strings + * joined by periods. For details, see: + * https://tools.ietf.org/html/rfc7515.html#section-3.1 + * + * Generated from protobuf field string compact_jwt = 1; + */ + protected $compact_jwt = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $compact_jwt + * The compact encoding of a JWS, which is always three base64 encoded strings + * joined by periods. For details, see: + * https://tools.ietf.org/html/rfc7515.html#section-3.1 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Attestation::initOnce(); + parent::__construct($data); + } + + /** + * The compact encoding of a JWS, which is always three base64 encoded strings + * joined by periods. For details, see: + * https://tools.ietf.org/html/rfc7515.html#section-3.1 + * + * Generated from protobuf field string compact_jwt = 1; + * @return string + */ + public function getCompactJwt() + { + return $this->compact_jwt; + } + + /** + * The compact encoding of a JWS, which is always three base64 encoded strings + * joined by periods. For details, see: + * https://tools.ietf.org/html/rfc7515.html#section-3.1 + * + * Generated from protobuf field string compact_jwt = 1; + * @param string $var + * @return $this + */ + public function setCompactJwt($var) + { + GPBUtil::checkString($var, True); + $this->compact_jwt = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Layer.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Layer.php new file mode 100644 index 000000000000..429ce63f2c3a --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Layer.php @@ -0,0 +1,105 @@ +grafeas.v1.Layer + */ +class Layer extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The recovered Dockerfile directive used to construct this layer. + * See https://docs.docker.com/engine/reference/builder/ for more information. + * + * Generated from protobuf field string directive = 1; + */ + protected $directive = ''; + /** + * The recovered arguments to the Dockerfile directive. + * + * Generated from protobuf field string arguments = 2; + */ + protected $arguments = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $directive + * Required. The recovered Dockerfile directive used to construct this layer. + * See https://docs.docker.com/engine/reference/builder/ for more information. + * @type string $arguments + * The recovered arguments to the Dockerfile directive. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Image::initOnce(); + parent::__construct($data); + } + + /** + * Required. The recovered Dockerfile directive used to construct this layer. + * See https://docs.docker.com/engine/reference/builder/ for more information. + * + * Generated from protobuf field string directive = 1; + * @return string + */ + public function getDirective() + { + return $this->directive; + } + + /** + * Required. The recovered Dockerfile directive used to construct this layer. + * See https://docs.docker.com/engine/reference/builder/ for more information. + * + * Generated from protobuf field string directive = 1; + * @param string $var + * @return $this + */ + public function setDirective($var) + { + GPBUtil::checkString($var, True); + $this->directive = $var; + + return $this; + } + + /** + * The recovered arguments to the Dockerfile directive. + * + * Generated from protobuf field string arguments = 2; + * @return string + */ + public function getArguments() + { + return $this->arguments; + } + + /** + * The recovered arguments to the Dockerfile directive. + * + * Generated from protobuf field string arguments = 2; + * @param string $var + * @return $this + */ + public function setArguments($var) + { + GPBUtil::checkString($var, True); + $this->arguments = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/License.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/License.php new file mode 100644 index 000000000000..cf2409f0739f --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/License.php @@ -0,0 +1,117 @@ +grafeas.v1.License + */ +class License extends \Google\Protobuf\Internal\Message +{ + /** + * Often a single license can be used to represent the licensing terms. + * Sometimes it is necessary to include a choice of one or more licenses + * or some combination of license identifiers. + * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", + * "GPL-2.0-or-later WITH Bison-exception-2.2". + * + * Generated from protobuf field string expression = 1; + */ + protected $expression = ''; + /** + * Comments + * + * Generated from protobuf field string comments = 2; + */ + protected $comments = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $expression + * Often a single license can be used to represent the licensing terms. + * Sometimes it is necessary to include a choice of one or more licenses + * or some combination of license identifiers. + * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", + * "GPL-2.0-or-later WITH Bison-exception-2.2". + * @type string $comments + * Comments + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Often a single license can be used to represent the licensing terms. + * Sometimes it is necessary to include a choice of one or more licenses + * or some combination of license identifiers. + * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", + * "GPL-2.0-or-later WITH Bison-exception-2.2". + * + * Generated from protobuf field string expression = 1; + * @return string + */ + public function getExpression() + { + return $this->expression; + } + + /** + * Often a single license can be used to represent the licensing terms. + * Sometimes it is necessary to include a choice of one or more licenses + * or some combination of license identifiers. + * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", + * "GPL-2.0-or-later WITH Bison-exception-2.2". + * + * Generated from protobuf field string expression = 1; + * @param string $var + * @return $this + */ + public function setExpression($var) + { + GPBUtil::checkString($var, True); + $this->expression = $var; + + return $this; + } + + /** + * Comments + * + * Generated from protobuf field string comments = 2; + * @return string + */ + public function getComments() + { + return $this->comments; + } + + /** + * Comments + * + * Generated from protobuf field string comments = 2; + * @param string $var + * @return $this + */ + public function setComments($var) + { + GPBUtil::checkString($var, True); + $this->comments = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesRequest.php new file mode 100644 index 000000000000..2a4ff134f9e3 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesRequest.php @@ -0,0 +1,173 @@ +grafeas.v1.ListNoteOccurrencesRequest + */ +class ListNoteOccurrencesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the note to list occurrences for in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The filter expression. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Number of occurrences to return in the list. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * Token to provide to skip to a particular spot in the list. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the note to list occurrences for in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @type string $filter + * The filter expression. + * @type int $page_size + * Number of occurrences to return in the list. + * @type string $page_token + * Token to provide to skip to a particular spot in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The name of the note to list occurrences for in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_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; + } + + /** + * The name of the note to list occurrences for in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_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; + } + + /** + * The filter expression. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter expression. + * + * 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; + } + + /** + * Number of occurrences to return in the list. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Number of occurrences to return in the list. + * + * 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; + } + + /** + * Token to provide to skip to a particular spot in the list. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Token to provide to skip to a particular spot in the list. + * + * 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/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesResponse.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesResponse.php new file mode 100644 index 000000000000..d76a8a59df99 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesResponse.php @@ -0,0 +1,101 @@ +grafeas.v1.ListNoteOccurrencesResponse + */ +class ListNoteOccurrencesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The occurrences attached to the specified note. + * + * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; + */ + private $occurrences; + /** + * Token to provide to skip to a particular spot in the list. + * + * 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<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $occurrences + * The occurrences attached to the specified note. + * @type string $next_page_token + * Token to provide to skip to a particular spot in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The occurrences attached to the specified note. + * + * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOccurrences() + { + return $this->occurrences; + } + + /** + * The occurrences attached to the specified note. + * + * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; + * @param array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOccurrences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Occurrence::class); + $this->occurrences = $arr; + + return $this; + } + + /** + * Token to provide to skip to a particular spot in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to provide to skip to a particular spot 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; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesRequest.php new file mode 100644 index 000000000000..79a612271451 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesRequest.php @@ -0,0 +1,177 @@ +grafeas.v1.ListNotesRequest + */ +class ListNotesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the project to list notes for in the form of + * `projects/[PROJECT_ID]`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The filter expression. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Number of notes to return in the list. Must be positive. Max allowed page + * size is 1000. If not specified, page size defaults to 20. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * Token to provide to skip to a particular spot in the list. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The name of the project to list notes for in the form of + * `projects/[PROJECT_ID]`. + * @type string $filter + * The filter expression. + * @type int $page_size + * Number of notes to return in the list. Must be positive. Max allowed page + * size is 1000. If not specified, page size defaults to 20. + * @type string $page_token + * Token to provide to skip to a particular spot in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The name of the project to list notes for in the form of + * `projects/[PROJECT_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; + } + + /** + * The name of the project to list notes for in the form of + * `projects/[PROJECT_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 filter expression. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter expression. + * + * 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; + } + + /** + * Number of notes to return in the list. Must be positive. Max allowed page + * size is 1000. If not specified, page size defaults to 20. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Number of notes to return in the list. Must be positive. Max allowed page + * size is 1000. If not specified, page size defaults to 20. + * + * 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; + } + + /** + * Token to provide to skip to a particular spot in the list. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Token to provide to skip to a particular spot in the list. + * + * 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/Grafeas/v1/proto/src/Grafeas/V1/ListNotesResponse.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesResponse.php new file mode 100644 index 000000000000..22c8bc22a257 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesResponse.php @@ -0,0 +1,109 @@ +grafeas.v1.ListNotesResponse + */ +class ListNotesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The notes requested. + * + * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; + */ + private $notes; + /** + * 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 + * 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<\Grafeas\V1\Note>|\Google\Protobuf\Internal\RepeatedField $notes + * The notes requested. + * @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 + * results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The notes requested. + * + * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNotes() + { + return $this->notes; + } + + /** + * The notes requested. + * + * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; + * @param array<\Grafeas\V1\Note>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNotes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Note::class); + $this->notes = $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 + * results. + * + * 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 + * 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/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesRequest.php new file mode 100644 index 000000000000..e6fb40837630 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesRequest.php @@ -0,0 +1,177 @@ +grafeas.v1.ListOccurrencesRequest + */ +class ListOccurrencesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the project to list occurrences for in the form of + * `projects/[PROJECT_ID]`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The filter expression. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Number of occurrences to return in the list. Must be positive. Max allowed + * page size is 1000. If not specified, page size defaults to 20. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * Token to provide to skip to a particular spot in the list. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The name of the project to list occurrences for in the form of + * `projects/[PROJECT_ID]`. + * @type string $filter + * The filter expression. + * @type int $page_size + * Number of occurrences to return in the list. Must be positive. Max allowed + * page size is 1000. If not specified, page size defaults to 20. + * @type string $page_token + * Token to provide to skip to a particular spot in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The name of the project to list occurrences for in the form of + * `projects/[PROJECT_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; + } + + /** + * The name of the project to list occurrences for in the form of + * `projects/[PROJECT_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 filter expression. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter expression. + * + * 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; + } + + /** + * Number of occurrences to return in the list. Must be positive. Max allowed + * page size is 1000. If not specified, page size defaults to 20. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Number of occurrences to return in the list. Must be positive. Max allowed + * page size is 1000. If not specified, page size defaults to 20. + * + * 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; + } + + /** + * Token to provide to skip to a particular spot in the list. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Token to provide to skip to a particular spot in the list. + * + * 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/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesResponse.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesResponse.php new file mode 100644 index 000000000000..c698cc7476a2 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesResponse.php @@ -0,0 +1,109 @@ +grafeas.v1.ListOccurrencesResponse + */ +class ListOccurrencesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The occurrences requested. + * + * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; + */ + private $occurrences; + /** + * 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 + * 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<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $occurrences + * The occurrences requested. + * @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 + * results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The occurrences requested. + * + * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOccurrences() + { + return $this->occurrences; + } + + /** + * The occurrences requested. + * + * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; + * @param array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOccurrences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Occurrence::class); + $this->occurrences = $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 + * results. + * + * 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 + * 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/Grafeas/v1/proto/src/Grafeas/V1/Location.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Location.php new file mode 100644 index 000000000000..b8381eca4d41 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Location.php @@ -0,0 +1,154 @@ +grafeas.v1.Location + */ +class Location extends \Google\Protobuf\Internal\Message +{ + /** + * Deprecated. + * The CPE URI in [CPE format](https://cpe.mitre.org/specification/) + * + * Generated from protobuf field string cpe_uri = 1; + */ + protected $cpe_uri = ''; + /** + * Deprecated. + * The version installed at this location. + * + * Generated from protobuf field .grafeas.v1.Version version = 2; + */ + protected $version = null; + /** + * The path from which we gathered that this package/version is installed. + * + * Generated from protobuf field string path = 3; + */ + protected $path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cpe_uri + * Deprecated. + * The CPE URI in [CPE format](https://cpe.mitre.org/specification/) + * @type \Grafeas\V1\Version $version + * Deprecated. + * The version installed at this location. + * @type string $path + * The path from which we gathered that this package/version is installed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Package::initOnce(); + parent::__construct($data); + } + + /** + * Deprecated. + * The CPE URI in [CPE format](https://cpe.mitre.org/specification/) + * + * Generated from protobuf field string cpe_uri = 1; + * @return string + */ + public function getCpeUri() + { + return $this->cpe_uri; + } + + /** + * Deprecated. + * The CPE URI in [CPE format](https://cpe.mitre.org/specification/) + * + * Generated from protobuf field string cpe_uri = 1; + * @param string $var + * @return $this + */ + public function setCpeUri($var) + { + GPBUtil::checkString($var, True); + $this->cpe_uri = $var; + + return $this; + } + + /** + * Deprecated. + * The version installed at this location. + * + * Generated from protobuf field .grafeas.v1.Version version = 2; + * @return \Grafeas\V1\Version|null + */ + public function getVersion() + { + return $this->version; + } + + public function hasVersion() + { + return isset($this->version); + } + + public function clearVersion() + { + unset($this->version); + } + + /** + * Deprecated. + * The version installed at this location. + * + * Generated from protobuf field .grafeas.v1.Version version = 2; + * @param \Grafeas\V1\Version $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); + $this->version = $var; + + return $this; + } + + /** + * The path from which we gathered that this package/version is installed. + * + * Generated from protobuf field string path = 3; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * The path from which we gathered that this package/version is installed. + * + * Generated from protobuf field string path = 3; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Metadata.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Metadata.php new file mode 100644 index 000000000000..496b347e8c53 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Metadata.php @@ -0,0 +1,249 @@ +grafeas.v1.Metadata + */ +class Metadata extends \Google\Protobuf\Internal\Message +{ + /** + * Identifies the particular build invocation, which can be useful for finding + * associated logs or other ad-hoc analysis. The value SHOULD be globally + * unique, per in-toto Provenance spec. + * + * Generated from protobuf field string build_invocation_id = 1; + */ + protected $build_invocation_id = ''; + /** + * The timestamp of when the build started. + * + * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; + */ + protected $build_started_on = null; + /** + * The timestamp of when the build completed. + * + * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; + */ + protected $build_finished_on = null; + /** + * Indicates that the builder claims certain fields in this message to be + * complete. + * + * Generated from protobuf field .grafeas.v1.Completeness completeness = 4; + */ + protected $completeness = null; + /** + * If true, the builder claims that running the recipe on materials will + * produce bit-for-bit identical output. + * + * Generated from protobuf field bool reproducible = 5; + */ + protected $reproducible = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $build_invocation_id + * Identifies the particular build invocation, which can be useful for finding + * associated logs or other ad-hoc analysis. The value SHOULD be globally + * unique, per in-toto Provenance spec. + * @type \Google\Protobuf\Timestamp $build_started_on + * The timestamp of when the build started. + * @type \Google\Protobuf\Timestamp $build_finished_on + * The timestamp of when the build completed. + * @type \Grafeas\V1\Completeness $completeness + * Indicates that the builder claims certain fields in this message to be + * complete. + * @type bool $reproducible + * If true, the builder claims that running the recipe on materials will + * produce bit-for-bit identical output. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\IntotoProvenance::initOnce(); + parent::__construct($data); + } + + /** + * Identifies the particular build invocation, which can be useful for finding + * associated logs or other ad-hoc analysis. The value SHOULD be globally + * unique, per in-toto Provenance spec. + * + * Generated from protobuf field string build_invocation_id = 1; + * @return string + */ + public function getBuildInvocationId() + { + return $this->build_invocation_id; + } + + /** + * Identifies the particular build invocation, which can be useful for finding + * associated logs or other ad-hoc analysis. The value SHOULD be globally + * unique, per in-toto Provenance spec. + * + * Generated from protobuf field string build_invocation_id = 1; + * @param string $var + * @return $this + */ + public function setBuildInvocationId($var) + { + GPBUtil::checkString($var, True); + $this->build_invocation_id = $var; + + return $this; + } + + /** + * The timestamp of when the build started. + * + * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getBuildStartedOn() + { + return $this->build_started_on; + } + + public function hasBuildStartedOn() + { + return isset($this->build_started_on); + } + + public function clearBuildStartedOn() + { + unset($this->build_started_on); + } + + /** + * The timestamp of when the build started. + * + * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setBuildStartedOn($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->build_started_on = $var; + + return $this; + } + + /** + * The timestamp of when the build completed. + * + * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getBuildFinishedOn() + { + return $this->build_finished_on; + } + + public function hasBuildFinishedOn() + { + return isset($this->build_finished_on); + } + + public function clearBuildFinishedOn() + { + unset($this->build_finished_on); + } + + /** + * The timestamp of when the build completed. + * + * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setBuildFinishedOn($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->build_finished_on = $var; + + return $this; + } + + /** + * Indicates that the builder claims certain fields in this message to be + * complete. + * + * Generated from protobuf field .grafeas.v1.Completeness completeness = 4; + * @return \Grafeas\V1\Completeness|null + */ + public function getCompleteness() + { + return $this->completeness; + } + + public function hasCompleteness() + { + return isset($this->completeness); + } + + public function clearCompleteness() + { + unset($this->completeness); + } + + /** + * Indicates that the builder claims certain fields in this message to be + * complete. + * + * Generated from protobuf field .grafeas.v1.Completeness completeness = 4; + * @param \Grafeas\V1\Completeness $var + * @return $this + */ + public function setCompleteness($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Completeness::class); + $this->completeness = $var; + + return $this; + } + + /** + * If true, the builder claims that running the recipe on materials will + * produce bit-for-bit identical output. + * + * Generated from protobuf field bool reproducible = 5; + * @return bool + */ + public function getReproducible() + { + return $this->reproducible; + } + + /** + * If true, the builder claims that running the recipe on materials will + * produce bit-for-bit identical output. + * + * Generated from protobuf field bool reproducible = 5; + * @param bool $var + * @return $this + */ + public function setReproducible($var) + { + GPBUtil::checkBool($var); + $this->reproducible = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NonCompliantFile.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NonCompliantFile.php new file mode 100644 index 000000000000..db2f7ae1e2f2 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NonCompliantFile.php @@ -0,0 +1,135 @@ +grafeas.v1.NonCompliantFile + */ +class NonCompliantFile extends \Google\Protobuf\Internal\Message +{ + /** + * Empty if `display_command` is set. + * + * Generated from protobuf field string path = 1; + */ + protected $path = ''; + /** + * Command to display the non-compliant files. + * + * Generated from protobuf field string display_command = 2; + */ + protected $display_command = ''; + /** + * Explains why a file is non compliant for a CIS check. + * + * Generated from protobuf field string reason = 3; + */ + protected $reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * Empty if `display_command` is set. + * @type string $display_command + * Command to display the non-compliant files. + * @type string $reason + * Explains why a file is non compliant for a CIS check. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Compliance::initOnce(); + parent::__construct($data); + } + + /** + * Empty if `display_command` is set. + * + * Generated from protobuf field string path = 1; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Empty if `display_command` is set. + * + * Generated from protobuf field string path = 1; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Command to display the non-compliant files. + * + * Generated from protobuf field string display_command = 2; + * @return string + */ + public function getDisplayCommand() + { + return $this->display_command; + } + + /** + * Command to display the non-compliant files. + * + * Generated from protobuf field string display_command = 2; + * @param string $var + * @return $this + */ + public function setDisplayCommand($var) + { + GPBUtil::checkString($var, True); + $this->display_command = $var; + + return $this; + } + + /** + * Explains why a file is non compliant for a CIS check. + * + * Generated from protobuf field string reason = 3; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Explains why a file is non compliant for a CIS check. + * + * Generated from protobuf field string reason = 3; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Note.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Note.php new file mode 100644 index 000000000000..b59a6bf10feb --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Note.php @@ -0,0 +1,724 @@ +grafeas.v1.Note + */ +class Note extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * A one sentence description of this note. + * + * Generated from protobuf field string short_description = 2; + */ + protected $short_description = ''; + /** + * A detailed description of this note. + * + * Generated from protobuf field string long_description = 3; + */ + protected $long_description = ''; + /** + * Output only. The type of analysis. This field can be used as a filter in + * list requests. + * + * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; + */ + protected $kind = 0; + /** + * URLs associated with this note. + * + * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_url = 5; + */ + private $related_url; + /** + * Time of expiration for this note. Empty if note does not expire. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; + */ + protected $expiration_time = null; + /** + * Output only. The time this note was created. This field can be used as a + * filter in list requests. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; + */ + protected $create_time = null; + /** + * Output only. The time this note was last updated. This field can be used as + * a filter in list requests. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8; + */ + protected $update_time = null; + /** + * Other notes related to this note. + * + * Generated from protobuf field repeated string related_note_names = 9; + */ + private $related_note_names; + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @type string $short_description + * A one sentence description of this note. + * @type string $long_description + * A detailed description of this note. + * @type int $kind + * Output only. The type of analysis. This field can be used as a filter in + * list requests. + * @type array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $related_url + * URLs associated with this note. + * @type \Google\Protobuf\Timestamp $expiration_time + * Time of expiration for this note. Empty if note does not expire. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time this note was created. This field can be used as a + * filter in list requests. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time this note was last updated. This field can be used as + * a filter in list requests. + * @type array|\Google\Protobuf\Internal\RepeatedField $related_note_names + * Other notes related to this note. + * @type \Grafeas\V1\VulnerabilityNote $vulnerability + * A note describing a package vulnerability. + * @type \Grafeas\V1\BuildNote $build + * A note describing build provenance for a verifiable build. + * @type \Grafeas\V1\ImageNote $image + * A note describing a base image. + * @type \Grafeas\V1\PackageNote $package + * A note describing a package hosted by various package managers. + * @type \Grafeas\V1\DeploymentNote $deployment + * A note describing something that can be deployed. + * @type \Grafeas\V1\DiscoveryNote $discovery + * A note describing the initial analysis of a resource. + * @type \Grafeas\V1\AttestationNote $attestation + * A note describing an attestation role. + * @type \Grafeas\V1\UpgradeNote $upgrade + * A note describing available package upgrades. + * @type \Grafeas\V1\ComplianceNote $compliance + * A note describing a compliance check. + * @type \Grafeas\V1\DSSEAttestationNote $dsse_attestation + * A note describing a dsse attestation note. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_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; + } + + /** + * A one sentence description of this note. + * + * Generated from protobuf field string short_description = 2; + * @return string + */ + public function getShortDescription() + { + return $this->short_description; + } + + /** + * A one sentence description of this note. + * + * Generated from protobuf field string short_description = 2; + * @param string $var + * @return $this + */ + public function setShortDescription($var) + { + GPBUtil::checkString($var, True); + $this->short_description = $var; + + return $this; + } + + /** + * A detailed description of this note. + * + * Generated from protobuf field string long_description = 3; + * @return string + */ + public function getLongDescription() + { + return $this->long_description; + } + + /** + * A detailed description of this note. + * + * Generated from protobuf field string long_description = 3; + * @param string $var + * @return $this + */ + public function setLongDescription($var) + { + GPBUtil::checkString($var, True); + $this->long_description = $var; + + return $this; + } + + /** + * Output only. The type of analysis. This field can be used as a filter in + * list requests. + * + * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; + * @return int + */ + public function getKind() + { + return $this->kind; + } + + /** + * Output only. The type of analysis. This field can be used as a filter in + * list requests. + * + * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; + * @param int $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\NoteKind::class); + $this->kind = $var; + + return $this; + } + + /** + * URLs associated with this note. + * + * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_url = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRelatedUrl() + { + return $this->related_url; + } + + /** + * URLs associated with this note. + * + * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_url = 5; + * @param array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRelatedUrl($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\RelatedUrl::class); + $this->related_url = $arr; + + return $this; + } + + /** + * Time of expiration for this note. Empty if note does not expire. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpirationTime() + { + return $this->expiration_time; + } + + public function hasExpirationTime() + { + return isset($this->expiration_time); + } + + public function clearExpirationTime() + { + unset($this->expiration_time); + } + + /** + * Time of expiration for this note. Empty if note does not expire. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expiration_time = $var; + + return $this; + } + + /** + * Output only. The time this note was created. This field can be used as a + * filter in list requests. + * + * 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); + } + + /** + * Output only. The time this note was created. This field can be used as a + * filter in list requests. + * + * 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; + } + + /** + * Output only. The time this note was last updated. This field can be used as + * a filter in list requests. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8; + * @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 this note was last updated. This field can be used as + * a filter in list requests. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Other notes related to this note. + * + * Generated from protobuf field repeated string related_note_names = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRelatedNoteNames() + { + return $this->related_note_names; + } + + /** + * Other notes related to this note. + * + * Generated from protobuf field repeated string related_note_names = 9; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRelatedNoteNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->related_note_names = $arr; + + return $this; + } + + /** + * A note describing a package vulnerability. + * + * Generated from protobuf field .grafeas.v1.VulnerabilityNote vulnerability = 10; + * @return \Grafeas\V1\VulnerabilityNote|null + */ + public function getVulnerability() + { + return $this->readOneof(10); + } + + public function hasVulnerability() + { + return $this->hasOneof(10); + } + + /** + * A note describing a package vulnerability. + * + * Generated from protobuf field .grafeas.v1.VulnerabilityNote vulnerability = 10; + * @param \Grafeas\V1\VulnerabilityNote $var + * @return $this + */ + public function setVulnerability($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\VulnerabilityNote::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * A note describing build provenance for a verifiable build. + * + * Generated from protobuf field .grafeas.v1.BuildNote build = 11; + * @return \Grafeas\V1\BuildNote|null + */ + public function getBuild() + { + return $this->readOneof(11); + } + + public function hasBuild() + { + return $this->hasOneof(11); + } + + /** + * A note describing build provenance for a verifiable build. + * + * Generated from protobuf field .grafeas.v1.BuildNote build = 11; + * @param \Grafeas\V1\BuildNote $var + * @return $this + */ + public function setBuild($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\BuildNote::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * A note describing a base image. + * + * Generated from protobuf field .grafeas.v1.ImageNote image = 12; + * @return \Grafeas\V1\ImageNote|null + */ + public function getImage() + { + return $this->readOneof(12); + } + + public function hasImage() + { + return $this->hasOneof(12); + } + + /** + * A note describing a base image. + * + * Generated from protobuf field .grafeas.v1.ImageNote image = 12; + * @param \Grafeas\V1\ImageNote $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\ImageNote::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * A note describing a package hosted by various package managers. + * + * Generated from protobuf field .grafeas.v1.PackageNote package = 13; + * @return \Grafeas\V1\PackageNote|null + */ + public function getPackage() + { + return $this->readOneof(13); + } + + public function hasPackage() + { + return $this->hasOneof(13); + } + + /** + * A note describing a package hosted by various package managers. + * + * Generated from protobuf field .grafeas.v1.PackageNote package = 13; + * @param \Grafeas\V1\PackageNote $var + * @return $this + */ + public function setPackage($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\PackageNote::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * A note describing something that can be deployed. + * + * Generated from protobuf field .grafeas.v1.DeploymentNote deployment = 14; + * @return \Grafeas\V1\DeploymentNote|null + */ + public function getDeployment() + { + return $this->readOneof(14); + } + + public function hasDeployment() + { + return $this->hasOneof(14); + } + + /** + * A note describing something that can be deployed. + * + * Generated from protobuf field .grafeas.v1.DeploymentNote deployment = 14; + * @param \Grafeas\V1\DeploymentNote $var + * @return $this + */ + public function setDeployment($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\DeploymentNote::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * A note describing the initial analysis of a resource. + * + * Generated from protobuf field .grafeas.v1.DiscoveryNote discovery = 15; + * @return \Grafeas\V1\DiscoveryNote|null + */ + public function getDiscovery() + { + return $this->readOneof(15); + } + + public function hasDiscovery() + { + return $this->hasOneof(15); + } + + /** + * A note describing the initial analysis of a resource. + * + * Generated from protobuf field .grafeas.v1.DiscoveryNote discovery = 15; + * @param \Grafeas\V1\DiscoveryNote $var + * @return $this + */ + public function setDiscovery($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\DiscoveryNote::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * A note describing an attestation role. + * + * Generated from protobuf field .grafeas.v1.AttestationNote attestation = 16; + * @return \Grafeas\V1\AttestationNote|null + */ + public function getAttestation() + { + return $this->readOneof(16); + } + + public function hasAttestation() + { + return $this->hasOneof(16); + } + + /** + * A note describing an attestation role. + * + * Generated from protobuf field .grafeas.v1.AttestationNote attestation = 16; + * @param \Grafeas\V1\AttestationNote $var + * @return $this + */ + public function setAttestation($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\AttestationNote::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * A note describing available package upgrades. + * + * Generated from protobuf field .grafeas.v1.UpgradeNote upgrade = 17; + * @return \Grafeas\V1\UpgradeNote|null + */ + public function getUpgrade() + { + return $this->readOneof(17); + } + + public function hasUpgrade() + { + return $this->hasOneof(17); + } + + /** + * A note describing available package upgrades. + * + * Generated from protobuf field .grafeas.v1.UpgradeNote upgrade = 17; + * @param \Grafeas\V1\UpgradeNote $var + * @return $this + */ + public function setUpgrade($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\UpgradeNote::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * A note describing a compliance check. + * + * Generated from protobuf field .grafeas.v1.ComplianceNote compliance = 18; + * @return \Grafeas\V1\ComplianceNote|null + */ + public function getCompliance() + { + return $this->readOneof(18); + } + + public function hasCompliance() + { + return $this->hasOneof(18); + } + + /** + * A note describing a compliance check. + * + * Generated from protobuf field .grafeas.v1.ComplianceNote compliance = 18; + * @param \Grafeas\V1\ComplianceNote $var + * @return $this + */ + public function setCompliance($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\ComplianceNote::class); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * A note describing a dsse attestation note. + * + * Generated from protobuf field .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + * @return \Grafeas\V1\DSSEAttestationNote|null + */ + public function getDsseAttestation() + { + return $this->readOneof(19); + } + + public function hasDsseAttestation() + { + return $this->hasOneof(19); + } + + /** + * A note describing a dsse attestation note. + * + * Generated from protobuf field .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; + * @param \Grafeas\V1\DSSEAttestationNote $var + * @return $this + */ + public function setDsseAttestation($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\DSSEAttestationNote::class); + $this->writeOneof(19, $var); + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NoteKind.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NoteKind.php new file mode 100644 index 000000000000..522f07bb21ca --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NoteKind.php @@ -0,0 +1,117 @@ +grafeas.v1.NoteKind + */ +class NoteKind +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum NOTE_KIND_UNSPECIFIED = 0; + */ + const NOTE_KIND_UNSPECIFIED = 0; + /** + * The note and occurrence represent a package vulnerability. + * + * Generated from protobuf enum VULNERABILITY = 1; + */ + const VULNERABILITY = 1; + /** + * The note and occurrence assert build provenance. + * + * Generated from protobuf enum BUILD = 2; + */ + const BUILD = 2; + /** + * This represents an image basis relationship. + * + * Generated from protobuf enum IMAGE = 3; + */ + const IMAGE = 3; + /** + * This represents a package installed via a package manager. + * + * Generated from protobuf enum PACKAGE = 4; + */ + const PACKAGE = 4; + /** + * The note and occurrence track deployment events. + * + * Generated from protobuf enum DEPLOYMENT = 5; + */ + const DEPLOYMENT = 5; + /** + * The note and occurrence track the initial discovery status of a resource. + * + * Generated from protobuf enum DISCOVERY = 6; + */ + const DISCOVERY = 6; + /** + * This represents a logical "role" that can attest to artifacts. + * + * Generated from protobuf enum ATTESTATION = 7; + */ + const ATTESTATION = 7; + /** + * This represents an available package upgrade. + * + * Generated from protobuf enum UPGRADE = 8; + */ + const UPGRADE = 8; + /** + * This represents a Compliance Note + * + * Generated from protobuf enum COMPLIANCE = 9; + */ + const COMPLIANCE = 9; + /** + * This represents a DSSE attestation Note + * + * Generated from protobuf enum DSSE_ATTESTATION = 10; + */ + const DSSE_ATTESTATION = 10; + + private static $valueToName = [ + self::NOTE_KIND_UNSPECIFIED => 'NOTE_KIND_UNSPECIFIED', + self::VULNERABILITY => 'VULNERABILITY', + self::BUILD => 'BUILD', + self::IMAGE => 'IMAGE', + self::PACKAGE => 'PACKAGE', + self::DEPLOYMENT => 'DEPLOYMENT', + self::DISCOVERY => 'DISCOVERY', + self::ATTESTATION => 'ATTESTATION', + self::UPGRADE => 'UPGRADE', + self::COMPLIANCE => 'COMPLIANCE', + self::DSSE_ATTESTATION => 'DSSE_ATTESTATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Grafeas/v1/proto/src/Grafeas/V1/Occurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Occurrence.php new file mode 100644 index 000000000000..afc520226b1c --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Occurrence.php @@ -0,0 +1,701 @@ +grafeas.v1.Occurrence + */ +class Occurrence extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. Immutable. A URI that represents the resource for which the + * occurrence applies. For example, + * `https://gcr.io/project/image@sha256:123abc` for a Docker image. + * + * Generated from protobuf field string resource_uri = 2; + */ + protected $resource_uri = ''; + /** + * Required. Immutable. The analysis note associated with this occurrence, in + * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be + * used as a filter in list requests. + * + * Generated from protobuf field string note_name = 3; + */ + protected $note_name = ''; + /** + * Output only. This explicitly denotes which of the occurrence details are + * specified. This field can be used as a filter in list requests. + * + * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; + */ + protected $kind = 0; + /** + * A description of actions that can be taken to remedy the note. + * + * Generated from protobuf field string remediation = 5; + */ + protected $remediation = ''; + /** + * Output only. The time this occurrence was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + */ + protected $create_time = null; + /** + * Output only. The time this occurrence was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; + */ + protected $update_time = null; + /** + * https://github.com/secure-systems-lab/dsse + * + * Generated from protobuf field .grafeas.v1.Envelope envelope = 18; + */ + protected $envelope = null; + protected $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @type string $resource_uri + * Required. Immutable. A URI that represents the resource for which the + * occurrence applies. For example, + * `https://gcr.io/project/image@sha256:123abc` for a Docker image. + * @type string $note_name + * Required. Immutable. The analysis note associated with this occurrence, in + * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be + * used as a filter in list requests. + * @type int $kind + * Output only. This explicitly denotes which of the occurrence details are + * specified. This field can be used as a filter in list requests. + * @type string $remediation + * A description of actions that can be taken to remedy the note. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time this occurrence was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time this occurrence was last updated. + * @type \Grafeas\V1\VulnerabilityOccurrence $vulnerability + * Describes a security vulnerability. + * @type \Grafeas\V1\BuildOccurrence $build + * Describes a verifiable build. + * @type \Grafeas\V1\ImageOccurrence $image + * Describes how this resource derives from the basis in the associated + * note. + * @type \Grafeas\V1\PackageOccurrence $package + * Describes the installation of a package on the linked resource. + * @type \Grafeas\V1\DeploymentOccurrence $deployment + * Describes the deployment of an artifact on a runtime. + * @type \Grafeas\V1\DiscoveryOccurrence $discovery + * Describes when a resource was discovered. + * @type \Grafeas\V1\AttestationOccurrence $attestation + * Describes an attestation of an artifact. + * @type \Grafeas\V1\UpgradeOccurrence $upgrade + * Describes an available package upgrade on the linked resource. + * @type \Grafeas\V1\ComplianceOccurrence $compliance + * Describes a compliance violation on a linked resource. + * @type \Grafeas\V1\DSSEAttestationOccurrence $dsse_attestation + * Describes an attestation of an artifact using dsse. + * @type \Grafeas\V1\Envelope $envelope + * https://github.com/secure-systems-lab/dsse + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; + } + + /** + * Required. Immutable. A URI that represents the resource for which the + * occurrence applies. For example, + * `https://gcr.io/project/image@sha256:123abc` for a Docker image. + * + * Generated from protobuf field string resource_uri = 2; + * @return string + */ + public function getResourceUri() + { + return $this->resource_uri; + } + + /** + * Required. Immutable. A URI that represents the resource for which the + * occurrence applies. For example, + * `https://gcr.io/project/image@sha256:123abc` for a Docker image. + * + * 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; + } + + /** + * Required. Immutable. The analysis note associated with this occurrence, in + * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be + * used as a filter in list requests. + * + * Generated from protobuf field string note_name = 3; + * @return string + */ + public function getNoteName() + { + return $this->note_name; + } + + /** + * Required. Immutable. The analysis note associated with this occurrence, in + * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be + * used as a filter in list requests. + * + * Generated from protobuf field string note_name = 3; + * @param string $var + * @return $this + */ + public function setNoteName($var) + { + GPBUtil::checkString($var, True); + $this->note_name = $var; + + return $this; + } + + /** + * Output only. This explicitly denotes which of the occurrence details are + * specified. This field can be used as a filter in list requests. + * + * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; + * @return int + */ + public function getKind() + { + return $this->kind; + } + + /** + * Output only. This explicitly denotes which of the occurrence details are + * specified. This field can be used as a filter in list requests. + * + * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; + * @param int $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\NoteKind::class); + $this->kind = $var; + + return $this; + } + + /** + * A description of actions that can be taken to remedy the note. + * + * Generated from protobuf field string remediation = 5; + * @return string + */ + public function getRemediation() + { + return $this->remediation; + } + + /** + * A description of actions that can be taken to remedy the note. + * + * Generated from protobuf field string remediation = 5; + * @param string $var + * @return $this + */ + public function setRemediation($var) + { + GPBUtil::checkString($var, True); + $this->remediation = $var; + + return $this; + } + + /** + * Output only. The time this occurrence was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + * @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 this occurrence was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + * @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 this occurrence was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; + * @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 this occurrence was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Describes a security vulnerability. + * + * Generated from protobuf field .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + * @return \Grafeas\V1\VulnerabilityOccurrence|null + */ + public function getVulnerability() + { + return $this->readOneof(8); + } + + public function hasVulnerability() + { + return $this->hasOneof(8); + } + + /** + * Describes a security vulnerability. + * + * Generated from protobuf field .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; + * @param \Grafeas\V1\VulnerabilityOccurrence $var + * @return $this + */ + public function setVulnerability($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\VulnerabilityOccurrence::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Describes a verifiable build. + * + * Generated from protobuf field .grafeas.v1.BuildOccurrence build = 9; + * @return \Grafeas\V1\BuildOccurrence|null + */ + public function getBuild() + { + return $this->readOneof(9); + } + + public function hasBuild() + { + return $this->hasOneof(9); + } + + /** + * Describes a verifiable build. + * + * Generated from protobuf field .grafeas.v1.BuildOccurrence build = 9; + * @param \Grafeas\V1\BuildOccurrence $var + * @return $this + */ + public function setBuild($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\BuildOccurrence::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Describes how this resource derives from the basis in the associated + * note. + * + * Generated from protobuf field .grafeas.v1.ImageOccurrence image = 10; + * @return \Grafeas\V1\ImageOccurrence|null + */ + public function getImage() + { + return $this->readOneof(10); + } + + public function hasImage() + { + return $this->hasOneof(10); + } + + /** + * Describes how this resource derives from the basis in the associated + * note. + * + * Generated from protobuf field .grafeas.v1.ImageOccurrence image = 10; + * @param \Grafeas\V1\ImageOccurrence $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\ImageOccurrence::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Describes the installation of a package on the linked resource. + * + * Generated from protobuf field .grafeas.v1.PackageOccurrence package = 11; + * @return \Grafeas\V1\PackageOccurrence|null + */ + public function getPackage() + { + return $this->readOneof(11); + } + + public function hasPackage() + { + return $this->hasOneof(11); + } + + /** + * Describes the installation of a package on the linked resource. + * + * Generated from protobuf field .grafeas.v1.PackageOccurrence package = 11; + * @param \Grafeas\V1\PackageOccurrence $var + * @return $this + */ + public function setPackage($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\PackageOccurrence::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Describes the deployment of an artifact on a runtime. + * + * Generated from protobuf field .grafeas.v1.DeploymentOccurrence deployment = 12; + * @return \Grafeas\V1\DeploymentOccurrence|null + */ + public function getDeployment() + { + return $this->readOneof(12); + } + + public function hasDeployment() + { + return $this->hasOneof(12); + } + + /** + * Describes the deployment of an artifact on a runtime. + * + * Generated from protobuf field .grafeas.v1.DeploymentOccurrence deployment = 12; + * @param \Grafeas\V1\DeploymentOccurrence $var + * @return $this + */ + public function setDeployment($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\DeploymentOccurrence::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Describes when a resource was discovered. + * + * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence discovery = 13; + * @return \Grafeas\V1\DiscoveryOccurrence|null + */ + public function getDiscovery() + { + return $this->readOneof(13); + } + + public function hasDiscovery() + { + return $this->hasOneof(13); + } + + /** + * Describes when a resource was discovered. + * + * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence discovery = 13; + * @param \Grafeas\V1\DiscoveryOccurrence $var + * @return $this + */ + public function setDiscovery($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\DiscoveryOccurrence::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Describes an attestation of an artifact. + * + * Generated from protobuf field .grafeas.v1.AttestationOccurrence attestation = 14; + * @return \Grafeas\V1\AttestationOccurrence|null + */ + public function getAttestation() + { + return $this->readOneof(14); + } + + public function hasAttestation() + { + return $this->hasOneof(14); + } + + /** + * Describes an attestation of an artifact. + * + * Generated from protobuf field .grafeas.v1.AttestationOccurrence attestation = 14; + * @param \Grafeas\V1\AttestationOccurrence $var + * @return $this + */ + public function setAttestation($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\AttestationOccurrence::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Describes an available package upgrade on the linked resource. + * + * Generated from protobuf field .grafeas.v1.UpgradeOccurrence upgrade = 15; + * @return \Grafeas\V1\UpgradeOccurrence|null + */ + public function getUpgrade() + { + return $this->readOneof(15); + } + + public function hasUpgrade() + { + return $this->hasOneof(15); + } + + /** + * Describes an available package upgrade on the linked resource. + * + * Generated from protobuf field .grafeas.v1.UpgradeOccurrence upgrade = 15; + * @param \Grafeas\V1\UpgradeOccurrence $var + * @return $this + */ + public function setUpgrade($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\UpgradeOccurrence::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Describes a compliance violation on a linked resource. + * + * Generated from protobuf field .grafeas.v1.ComplianceOccurrence compliance = 16; + * @return \Grafeas\V1\ComplianceOccurrence|null + */ + public function getCompliance() + { + return $this->readOneof(16); + } + + public function hasCompliance() + { + return $this->hasOneof(16); + } + + /** + * Describes a compliance violation on a linked resource. + * + * Generated from protobuf field .grafeas.v1.ComplianceOccurrence compliance = 16; + * @param \Grafeas\V1\ComplianceOccurrence $var + * @return $this + */ + public function setCompliance($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\ComplianceOccurrence::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Describes an attestation of an artifact using dsse. + * + * Generated from protobuf field .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + * @return \Grafeas\V1\DSSEAttestationOccurrence|null + */ + public function getDsseAttestation() + { + return $this->readOneof(17); + } + + public function hasDsseAttestation() + { + return $this->hasOneof(17); + } + + /** + * Describes an attestation of an artifact using dsse. + * + * Generated from protobuf field .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; + * @param \Grafeas\V1\DSSEAttestationOccurrence $var + * @return $this + */ + public function setDsseAttestation($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\DSSEAttestationOccurrence::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * https://github.com/secure-systems-lab/dsse + * + * Generated from protobuf field .grafeas.v1.Envelope envelope = 18; + * @return \Grafeas\V1\Envelope|null + */ + public function getEnvelope() + { + return $this->envelope; + } + + public function hasEnvelope() + { + return isset($this->envelope); + } + + public function clearEnvelope() + { + unset($this->envelope); + } + + /** + * https://github.com/secure-systems-lab/dsse + * + * Generated from protobuf field .grafeas.v1.Envelope envelope = 18; + * @param \Grafeas\V1\Envelope $var + * @return $this + */ + public function setEnvelope($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Envelope::class); + $this->envelope = $var; + + return $this; + } + + /** + * @return string + */ + public function getDetails() + { + return $this->whichOneof("details"); + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageNote.php new file mode 100644 index 000000000000..a7295d29168a --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageNote.php @@ -0,0 +1,451 @@ +grafeas.v1.PackageNote + */ +class PackageNote extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the package. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Deprecated. + * The various channels by which a package is distributed. + * + * Generated from protobuf field repeated .grafeas.v1.Distribution distribution = 10; + */ + private $distribution; + /** + * The type of package; whether native or non native (e.g., ruby gems, + * node.js packages, etc.). + * + * Generated from protobuf field string package_type = 11; + */ + protected $package_type = ''; + /** + * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + * denoting the package manager version distributing a package. + * The cpe_uri will be blank for language packages. + * + * Generated from protobuf field string cpe_uri = 12; + */ + protected $cpe_uri = ''; + /** + * The CPU architecture for which packages in this distribution channel were + * built. Architecture will be blank for language packages. + * + * Generated from protobuf field .grafeas.v1.Architecture architecture = 13; + */ + protected $architecture = 0; + /** + * The version of the package. + * + * Generated from protobuf field .grafeas.v1.Version version = 14; + */ + protected $version = null; + /** + * A freeform text denoting the maintainer of this package. + * + * Generated from protobuf field string maintainer = 15; + */ + protected $maintainer = ''; + /** + * The homepage for this package. + * + * Generated from protobuf field string url = 16; + */ + protected $url = ''; + /** + * The description of this package. + * + * Generated from protobuf field string description = 17; + */ + protected $description = ''; + /** + * Licenses that have been declared by the authors of the package. + * + * Generated from protobuf field .grafeas.v1.License license = 18; + */ + protected $license = null; + /** + * Hash value, typically a file digest, that allows unique + * identification a specific package. + * + * Generated from protobuf field repeated .grafeas.v1.Digest digest = 19; + */ + private $digest; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the package. + * @type array<\Grafeas\V1\Distribution>|\Google\Protobuf\Internal\RepeatedField $distribution + * Deprecated. + * The various channels by which a package is distributed. + * @type string $package_type + * The type of package; whether native or non native (e.g., ruby gems, + * node.js packages, etc.). + * @type string $cpe_uri + * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + * denoting the package manager version distributing a package. + * The cpe_uri will be blank for language packages. + * @type int $architecture + * The CPU architecture for which packages in this distribution channel were + * built. Architecture will be blank for language packages. + * @type \Grafeas\V1\Version $version + * The version of the package. + * @type string $maintainer + * A freeform text denoting the maintainer of this package. + * @type string $url + * The homepage for this package. + * @type string $description + * The description of this package. + * @type \Grafeas\V1\License $license + * Licenses that have been declared by the authors of the package. + * @type array<\Grafeas\V1\Digest>|\Google\Protobuf\Internal\RepeatedField $digest + * Hash value, typically a file digest, that allows unique + * identification a specific package. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Package::initOnce(); + parent::__construct($data); + } + + /** + * The name of the package. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the package. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Deprecated. + * The various channels by which a package is distributed. + * + * Generated from protobuf field repeated .grafeas.v1.Distribution distribution = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDistribution() + { + return $this->distribution; + } + + /** + * Deprecated. + * The various channels by which a package is distributed. + * + * Generated from protobuf field repeated .grafeas.v1.Distribution distribution = 10; + * @param array<\Grafeas\V1\Distribution>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDistribution($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Distribution::class); + $this->distribution = $arr; + + return $this; + } + + /** + * The type of package; whether native or non native (e.g., ruby gems, + * node.js packages, etc.). + * + * Generated from protobuf field string package_type = 11; + * @return string + */ + public function getPackageType() + { + return $this->package_type; + } + + /** + * The type of package; whether native or non native (e.g., ruby gems, + * node.js packages, etc.). + * + * Generated from protobuf field string package_type = 11; + * @param string $var + * @return $this + */ + public function setPackageType($var) + { + GPBUtil::checkString($var, True); + $this->package_type = $var; + + return $this; + } + + /** + * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + * denoting the package manager version distributing a package. + * The cpe_uri will be blank for language packages. + * + * Generated from protobuf field string cpe_uri = 12; + * @return string + */ + public function getCpeUri() + { + return $this->cpe_uri; + } + + /** + * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + * denoting the package manager version distributing a package. + * The cpe_uri will be blank for language packages. + * + * Generated from protobuf field string cpe_uri = 12; + * @param string $var + * @return $this + */ + public function setCpeUri($var) + { + GPBUtil::checkString($var, True); + $this->cpe_uri = $var; + + return $this; + } + + /** + * The CPU architecture for which packages in this distribution channel were + * built. Architecture will be blank for language packages. + * + * Generated from protobuf field .grafeas.v1.Architecture architecture = 13; + * @return int + */ + public function getArchitecture() + { + return $this->architecture; + } + + /** + * The CPU architecture for which packages in this distribution channel were + * built. Architecture will be blank for language packages. + * + * Generated from protobuf field .grafeas.v1.Architecture architecture = 13; + * @param int $var + * @return $this + */ + public function setArchitecture($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\Architecture::class); + $this->architecture = $var; + + return $this; + } + + /** + * The version of the package. + * + * Generated from protobuf field .grafeas.v1.Version version = 14; + * @return \Grafeas\V1\Version|null + */ + public function getVersion() + { + return $this->version; + } + + public function hasVersion() + { + return isset($this->version); + } + + public function clearVersion() + { + unset($this->version); + } + + /** + * The version of the package. + * + * Generated from protobuf field .grafeas.v1.Version version = 14; + * @param \Grafeas\V1\Version $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); + $this->version = $var; + + return $this; + } + + /** + * A freeform text denoting the maintainer of this package. + * + * Generated from protobuf field string maintainer = 15; + * @return string + */ + public function getMaintainer() + { + return $this->maintainer; + } + + /** + * A freeform text denoting the maintainer of this package. + * + * Generated from protobuf field string maintainer = 15; + * @param string $var + * @return $this + */ + public function setMaintainer($var) + { + GPBUtil::checkString($var, True); + $this->maintainer = $var; + + return $this; + } + + /** + * The homepage for this package. + * + * Generated from protobuf field string url = 16; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The homepage for this package. + * + * Generated from protobuf field string url = 16; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * The description of this package. + * + * Generated from protobuf field string description = 17; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of this package. + * + * 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; + } + + /** + * Licenses that have been declared by the authors of the package. + * + * Generated from protobuf field .grafeas.v1.License license = 18; + * @return \Grafeas\V1\License|null + */ + public function getLicense() + { + return $this->license; + } + + public function hasLicense() + { + return isset($this->license); + } + + public function clearLicense() + { + unset($this->license); + } + + /** + * Licenses that have been declared by the authors of the package. + * + * Generated from protobuf field .grafeas.v1.License license = 18; + * @param \Grafeas\V1\License $var + * @return $this + */ + public function setLicense($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\License::class); + $this->license = $var; + + return $this; + } + + /** + * Hash value, typically a file digest, that allows unique + * identification a specific package. + * + * Generated from protobuf field repeated .grafeas.v1.Digest digest = 19; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDigest() + { + return $this->digest; + } + + /** + * Hash value, typically a file digest, that allows unique + * identification a specific package. + * + * Generated from protobuf field repeated .grafeas.v1.Digest digest = 19; + * @param array<\Grafeas\V1\Digest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDigest($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Digest::class); + $this->digest = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageOccurrence.php new file mode 100644 index 000000000000..dafa0769a930 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageOccurrence.php @@ -0,0 +1,311 @@ +grafeas.v1.PackageOccurrence + */ +class PackageOccurrence extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the installed package. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * All of the places within the filesystem versions of this package + * have been found. + * + * Generated from protobuf field repeated .grafeas.v1.Location location = 2; + */ + private $location; + /** + * The type of package; whether native or non native (e.g., ruby gems, + * node.js packages, etc.). + * + * Generated from protobuf field string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $package_type = ''; + /** + * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + * denoting the package manager version distributing a package. + * The cpe_uri will be blank for language packages. + * + * Generated from protobuf field string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cpe_uri = ''; + /** + * The CPU architecture for which packages in this distribution channel were + * built. Architecture will be blank for language packages. + * + * Generated from protobuf field .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $architecture = 0; + /** + * Licenses that have been declared by the authors of the package. + * + * Generated from protobuf field .grafeas.v1.License license = 6; + */ + protected $license = null; + /** + * The version of the package. + * + * Generated from protobuf field .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $version = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the installed package. + * @type array<\Grafeas\V1\Location>|\Google\Protobuf\Internal\RepeatedField $location + * All of the places within the filesystem versions of this package + * have been found. + * @type string $package_type + * The type of package; whether native or non native (e.g., ruby gems, + * node.js packages, etc.). + * @type string $cpe_uri + * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + * denoting the package manager version distributing a package. + * The cpe_uri will be blank for language packages. + * @type int $architecture + * The CPU architecture for which packages in this distribution channel were + * built. Architecture will be blank for language packages. + * @type \Grafeas\V1\License $license + * Licenses that have been declared by the authors of the package. + * @type \Grafeas\V1\Version $version + * The version of the package. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Package::initOnce(); + parent::__construct($data); + } + + /** + * The name of the installed package. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the installed package. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * All of the places within the filesystem versions of this package + * have been found. + * + * Generated from protobuf field repeated .grafeas.v1.Location location = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLocation() + { + return $this->location; + } + + /** + * All of the places within the filesystem versions of this package + * have been found. + * + * Generated from protobuf field repeated .grafeas.v1.Location location = 2; + * @param array<\Grafeas\V1\Location>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLocation($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Location::class); + $this->location = $arr; + + return $this; + } + + /** + * The type of package; whether native or non native (e.g., ruby gems, + * node.js packages, etc.). + * + * Generated from protobuf field string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPackageType() + { + return $this->package_type; + } + + /** + * The type of package; whether native or non native (e.g., ruby gems, + * node.js packages, etc.). + * + * Generated from protobuf field string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPackageType($var) + { + GPBUtil::checkString($var, True); + $this->package_type = $var; + + return $this; + } + + /** + * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + * denoting the package manager version distributing a package. + * The cpe_uri will be blank for language packages. + * + * Generated from protobuf field string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCpeUri() + { + return $this->cpe_uri; + } + + /** + * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) + * denoting the package manager version distributing a package. + * The cpe_uri will be blank for language packages. + * + * Generated from protobuf field string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCpeUri($var) + { + GPBUtil::checkString($var, True); + $this->cpe_uri = $var; + + return $this; + } + + /** + * The CPU architecture for which packages in this distribution channel were + * built. Architecture will be blank for language packages. + * + * Generated from protobuf field .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getArchitecture() + { + return $this->architecture; + } + + /** + * The CPU architecture for which packages in this distribution channel were + * built. Architecture will be blank for language packages. + * + * Generated from protobuf field .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setArchitecture($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\Architecture::class); + $this->architecture = $var; + + return $this; + } + + /** + * Licenses that have been declared by the authors of the package. + * + * Generated from protobuf field .grafeas.v1.License license = 6; + * @return \Grafeas\V1\License|null + */ + public function getLicense() + { + return $this->license; + } + + public function hasLicense() + { + return isset($this->license); + } + + public function clearLicense() + { + unset($this->license); + } + + /** + * Licenses that have been declared by the authors of the package. + * + * Generated from protobuf field .grafeas.v1.License license = 6; + * @param \Grafeas\V1\License $var + * @return $this + */ + public function setLicense($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\License::class); + $this->license = $var; + + return $this; + } + + /** + * The version of the package. + * + * Generated from protobuf field .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Grafeas\V1\Version|null + */ + public function getVersion() + { + return $this->version; + } + + public function hasVersion() + { + return isset($this->version); + } + + public function clearVersion() + { + unset($this->version); + } + + /** + * The version of the package. + * + * Generated from protobuf field .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Grafeas\V1\Version $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ProjectRepoId.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ProjectRepoId.php new file mode 100644 index 000000000000..d2c9475a063e --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ProjectRepoId.php @@ -0,0 +1,102 @@ +grafeas.v1.ProjectRepoId + */ +class ProjectRepoId extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the project. + * + * Generated from protobuf field string project_id = 1; + */ + protected $project_id = ''; + /** + * The name of the repo. Leave empty for the default repo. + * + * Generated from protobuf field string repo_name = 2; + */ + protected $repo_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * The ID of the project. + * @type string $repo_name + * The name of the repo. Leave empty for the default repo. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Provenance::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the project. + * + * Generated from protobuf field string project_id = 1; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The ID of the project. + * + * Generated from protobuf field string project_id = 1; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * The name of the repo. Leave empty for the default repo. + * + * Generated from protobuf field string repo_name = 2; + * @return string + */ + public function getRepoName() + { + return $this->repo_name; + } + + /** + * The name of the repo. Leave empty for the default repo. + * + * Generated from protobuf field string repo_name = 2; + * @param string $var + * @return $this + */ + public function setRepoName($var) + { + GPBUtil::checkString($var, True); + $this->repo_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Recipe.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Recipe.php new file mode 100644 index 000000000000..0806a1ed630b --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Recipe.php @@ -0,0 +1,273 @@ +grafeas.v1.Recipe + */ +class Recipe extends \Google\Protobuf\Internal\Message +{ + /** + * URI indicating what type of recipe was performed. It determines the meaning + * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * Index in materials containing the recipe steps that are not implied by + * recipe.type. For example, if the recipe type were "make", then this would + * point to the source containing the Makefile, not the make program itself. + * Set to -1 if the recipe doesn't come from a material, as zero is default + * unset value for int64. + * + * Generated from protobuf field int64 defined_in_material = 2; + */ + protected $defined_in_material = 0; + /** + * String identifying the entry point into the build. + * This is often a path to a configuration file and/or a target label within + * that file. The syntax and meaning are defined by recipe.type. For example, + * if the recipe type were "make", then this would reference the directory in + * which to run make as well as which target to use. + * + * Generated from protobuf field string entry_point = 3; + */ + protected $entry_point = ''; + /** + * Collection of all external inputs that influenced the build on top of + * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe + * type were "make", then this might be the flags passed to make aside from + * the target, which is captured in recipe.entryPoint. Since the arguments + * field can greatly vary in structure, depending on the builder and recipe + * type, this is of form "Any". + * + * Generated from protobuf field repeated .google.protobuf.Any arguments = 4; + */ + private $arguments; + /** + * Any other builder-controlled inputs necessary for correctly evaluating the + * recipe. Usually only needed for reproducing the build but not evaluated as + * part of policy. Since the environment field can greatly vary in structure, + * depending on the builder and recipe type, this is of form "Any". + * + * Generated from protobuf field repeated .google.protobuf.Any environment = 5; + */ + private $environment; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * URI indicating what type of recipe was performed. It determines the meaning + * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. + * @type int|string $defined_in_material + * Index in materials containing the recipe steps that are not implied by + * recipe.type. For example, if the recipe type were "make", then this would + * point to the source containing the Makefile, not the make program itself. + * Set to -1 if the recipe doesn't come from a material, as zero is default + * unset value for int64. + * @type string $entry_point + * String identifying the entry point into the build. + * This is often a path to a configuration file and/or a target label within + * that file. The syntax and meaning are defined by recipe.type. For example, + * if the recipe type were "make", then this would reference the directory in + * which to run make as well as which target to use. + * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $arguments + * Collection of all external inputs that influenced the build on top of + * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe + * type were "make", then this might be the flags passed to make aside from + * the target, which is captured in recipe.entryPoint. Since the arguments + * field can greatly vary in structure, depending on the builder and recipe + * type, this is of form "Any". + * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $environment + * Any other builder-controlled inputs necessary for correctly evaluating the + * recipe. Usually only needed for reproducing the build but not evaluated as + * part of policy. Since the environment field can greatly vary in structure, + * depending on the builder and recipe type, this is of form "Any". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\IntotoProvenance::initOnce(); + parent::__construct($data); + } + + /** + * URI indicating what type of recipe was performed. It determines the meaning + * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * URI indicating what type of recipe was performed. It determines the meaning + * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. + * + * 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; + } + + /** + * Index in materials containing the recipe steps that are not implied by + * recipe.type. For example, if the recipe type were "make", then this would + * point to the source containing the Makefile, not the make program itself. + * Set to -1 if the recipe doesn't come from a material, as zero is default + * unset value for int64. + * + * Generated from protobuf field int64 defined_in_material = 2; + * @return int|string + */ + public function getDefinedInMaterial() + { + return $this->defined_in_material; + } + + /** + * Index in materials containing the recipe steps that are not implied by + * recipe.type. For example, if the recipe type were "make", then this would + * point to the source containing the Makefile, not the make program itself. + * Set to -1 if the recipe doesn't come from a material, as zero is default + * unset value for int64. + * + * Generated from protobuf field int64 defined_in_material = 2; + * @param int|string $var + * @return $this + */ + public function setDefinedInMaterial($var) + { + GPBUtil::checkInt64($var); + $this->defined_in_material = $var; + + return $this; + } + + /** + * String identifying the entry point into the build. + * This is often a path to a configuration file and/or a target label within + * that file. The syntax and meaning are defined by recipe.type. For example, + * if the recipe type were "make", then this would reference the directory in + * which to run make as well as which target to use. + * + * Generated from protobuf field string entry_point = 3; + * @return string + */ + public function getEntryPoint() + { + return $this->entry_point; + } + + /** + * String identifying the entry point into the build. + * This is often a path to a configuration file and/or a target label within + * that file. The syntax and meaning are defined by recipe.type. For example, + * if the recipe type were "make", then this would reference the directory in + * which to run make as well as which target to use. + * + * Generated from protobuf field string entry_point = 3; + * @param string $var + * @return $this + */ + public function setEntryPoint($var) + { + GPBUtil::checkString($var, True); + $this->entry_point = $var; + + return $this; + } + + /** + * Collection of all external inputs that influenced the build on top of + * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe + * type were "make", then this might be the flags passed to make aside from + * the target, which is captured in recipe.entryPoint. Since the arguments + * field can greatly vary in structure, depending on the builder and recipe + * type, this is of form "Any". + * + * Generated from protobuf field repeated .google.protobuf.Any arguments = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getArguments() + { + return $this->arguments; + } + + /** + * Collection of all external inputs that influenced the build on top of + * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe + * type were "make", then this might be the flags passed to make aside from + * the target, which is captured in recipe.entryPoint. Since the arguments + * field can greatly vary in structure, depending on the builder and recipe + * type, this is of form "Any". + * + * Generated from protobuf field repeated .google.protobuf.Any arguments = 4; + * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setArguments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); + $this->arguments = $arr; + + return $this; + } + + /** + * Any other builder-controlled inputs necessary for correctly evaluating the + * recipe. Usually only needed for reproducing the build but not evaluated as + * part of policy. Since the environment field can greatly vary in structure, + * depending on the builder and recipe type, this is of form "Any". + * + * Generated from protobuf field repeated .google.protobuf.Any environment = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * Any other builder-controlled inputs necessary for correctly evaluating the + * recipe. Usually only needed for reproducing the build but not evaluated as + * part of policy. Since the environment field can greatly vary in structure, + * depending on the builder and recipe type, this is of form "Any". + * + * Generated from protobuf field repeated .google.protobuf.Any environment = 5; + * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEnvironment($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); + $this->environment = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RelatedUrl.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RelatedUrl.php new file mode 100644 index 000000000000..c407db0064b9 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RelatedUrl.php @@ -0,0 +1,101 @@ +grafeas.v1.RelatedUrl + */ +class RelatedUrl extends \Google\Protobuf\Internal\Message +{ + /** + * Specific URL associated with the resource. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + /** + * Label to describe usage of the URL. + * + * Generated from protobuf field string label = 2; + */ + protected $label = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * Specific URL associated with the resource. + * @type string $label + * Label to describe usage of the URL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Specific URL associated with the resource. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Specific URL associated with the resource. + * + * 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; + } + + /** + * Label to describe usage of the URL. + * + * Generated from protobuf field string label = 2; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Label to describe usage of the URL. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RepoId.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RepoId.php new file mode 100644 index 000000000000..5643c66c7c24 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RepoId.php @@ -0,0 +1,108 @@ +grafeas.v1.RepoId + */ +class RepoId extends \Google\Protobuf\Internal\Message +{ + protected $id; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Grafeas\V1\ProjectRepoId $project_repo_id + * A combination of a project ID and a repo name. + * @type string $uid + * A server-assigned, globally unique identifier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Provenance::initOnce(); + parent::__construct($data); + } + + /** + * A combination of a project ID and a repo name. + * + * Generated from protobuf field .grafeas.v1.ProjectRepoId project_repo_id = 1; + * @return \Grafeas\V1\ProjectRepoId|null + */ + public function getProjectRepoId() + { + return $this->readOneof(1); + } + + public function hasProjectRepoId() + { + return $this->hasOneof(1); + } + + /** + * A combination of a project ID and a repo name. + * + * Generated from protobuf field .grafeas.v1.ProjectRepoId project_repo_id = 1; + * @param \Grafeas\V1\ProjectRepoId $var + * @return $this + */ + public function setProjectRepoId($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\ProjectRepoId::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A server-assigned, globally unique identifier. + * + * Generated from protobuf field string uid = 2; + * @return string + */ + public function getUid() + { + return $this->readOneof(2); + } + + public function hasUid() + { + return $this->hasOneof(2); + } + + /** + * A server-assigned, globally unique identifier. + * + * Generated from protobuf field string uid = 2; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getId() + { + return $this->whichOneof("id"); + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Severity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Severity.php new file mode 100644 index 000000000000..698112c5460e --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Severity.php @@ -0,0 +1,82 @@ +grafeas.v1.Severity + */ +class Severity +{ + /** + * Unknown. + * + * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; + */ + const SEVERITY_UNSPECIFIED = 0; + /** + * Minimal severity. + * + * Generated from protobuf enum MINIMAL = 1; + */ + const MINIMAL = 1; + /** + * Low severity. + * + * Generated from protobuf enum LOW = 2; + */ + const LOW = 2; + /** + * Medium severity. + * + * Generated from protobuf enum MEDIUM = 3; + */ + const MEDIUM = 3; + /** + * High severity. + * + * Generated from protobuf enum HIGH = 4; + */ + const HIGH = 4; + /** + * Critical severity. + * + * Generated from protobuf enum CRITICAL = 5; + */ + const CRITICAL = 5; + + private static $valueToName = [ + self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', + self::MINIMAL => 'MINIMAL', + self::LOW => 'LOW', + self::MEDIUM => 'MEDIUM', + self::HIGH => 'HIGH', + self::CRITICAL => 'CRITICAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Grafeas/v1/proto/src/Grafeas/V1/Signature.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Signature.php new file mode 100644 index 000000000000..de57d7bfe087 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Signature.php @@ -0,0 +1,192 @@ +grafeas.v1.Signature + */ +class Signature extends \Google\Protobuf\Internal\Message +{ + /** + * The content of the signature, an opaque bytestring. + * The payload that this signature verifies MUST be unambiguously provided + * with the Signature during verification. A wrapper message might provide + * the payload explicitly. Alternatively, a message might have a canonical + * serialization that can always be unambiguously computed to derive the + * payload. + * + * Generated from protobuf field bytes signature = 1; + */ + protected $signature = ''; + /** + * The identifier for the public key that verifies this signature. + * * The `public_key_id` is required. + * * The `public_key_id` SHOULD be an RFC3986 conformant URI. + * * When possible, the `public_key_id` SHOULD be an immutable reference, + * such as a cryptographic digest. + * Examples of valid `public_key_id`s: + * OpenPGP V4 public key fingerprint: + * * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" + * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more + * details on this scheme. + * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER + * serialization): + * * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" + * * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" + * + * Generated from protobuf field string public_key_id = 2; + */ + protected $public_key_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $signature + * The content of the signature, an opaque bytestring. + * The payload that this signature verifies MUST be unambiguously provided + * with the Signature during verification. A wrapper message might provide + * the payload explicitly. Alternatively, a message might have a canonical + * serialization that can always be unambiguously computed to derive the + * payload. + * @type string $public_key_id + * The identifier for the public key that verifies this signature. + * * The `public_key_id` is required. + * * The `public_key_id` SHOULD be an RFC3986 conformant URI. + * * When possible, the `public_key_id` SHOULD be an immutable reference, + * such as a cryptographic digest. + * Examples of valid `public_key_id`s: + * OpenPGP V4 public key fingerprint: + * * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" + * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more + * details on this scheme. + * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER + * serialization): + * * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" + * * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The content of the signature, an opaque bytestring. + * The payload that this signature verifies MUST be unambiguously provided + * with the Signature during verification. A wrapper message might provide + * the payload explicitly. Alternatively, a message might have a canonical + * serialization that can always be unambiguously computed to derive the + * payload. + * + * Generated from protobuf field bytes signature = 1; + * @return string + */ + public function getSignature() + { + return $this->signature; + } + + /** + * The content of the signature, an opaque bytestring. + * The payload that this signature verifies MUST be unambiguously provided + * with the Signature during verification. A wrapper message might provide + * the payload explicitly. Alternatively, a message might have a canonical + * serialization that can always be unambiguously computed to derive the + * payload. + * + * Generated from protobuf field bytes signature = 1; + * @param string $var + * @return $this + */ + public function setSignature($var) + { + GPBUtil::checkString($var, False); + $this->signature = $var; + + return $this; + } + + /** + * The identifier for the public key that verifies this signature. + * * The `public_key_id` is required. + * * The `public_key_id` SHOULD be an RFC3986 conformant URI. + * * When possible, the `public_key_id` SHOULD be an immutable reference, + * such as a cryptographic digest. + * Examples of valid `public_key_id`s: + * OpenPGP V4 public key fingerprint: + * * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" + * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more + * details on this scheme. + * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER + * serialization): + * * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" + * * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" + * + * Generated from protobuf field string public_key_id = 2; + * @return string + */ + public function getPublicKeyId() + { + return $this->public_key_id; + } + + /** + * The identifier for the public key that verifies this signature. + * * The `public_key_id` is required. + * * The `public_key_id` SHOULD be an RFC3986 conformant URI. + * * When possible, the `public_key_id` SHOULD be an immutable reference, + * such as a cryptographic digest. + * Examples of valid `public_key_id`s: + * OpenPGP V4 public key fingerprint: + * * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" + * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more + * details on this scheme. + * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER + * serialization): + * * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" + * * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" + * + * Generated from protobuf field string public_key_id = 2; + * @param string $var + * @return $this + */ + public function setPublicKeyId($var) + { + GPBUtil::checkString($var, True); + $this->public_key_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance.php new file mode 100644 index 000000000000..0113d091326d --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance.php @@ -0,0 +1,214 @@ +grafeas.v1.SlsaProvenance + */ +class SlsaProvenance extends \Google\Protobuf\Internal\Message +{ + /** + * required + * + * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + */ + protected $builder = null; + /** + * Identifies the configuration used for the build. + * When combined with materials, this SHOULD fully describe the build, + * such that re-running this recipe results in bit-for-bit identical output + * (if the build is reproducible). + * + * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + */ + protected $recipe = null; + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + */ + protected $metadata = null; + /** + * The collection of artifacts that influenced the build including sources, + * dependencies, build tools, base images, and so on. This is considered to be + * incomplete unless metadata.completeness.materials is true. Unset or null is + * equivalent to empty. + * + * Generated from protobuf field repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + */ + private $materials; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Grafeas\V1\SlsaProvenance\SlsaBuilder $builder + * required + * @type \Grafeas\V1\SlsaProvenance\SlsaRecipe $recipe + * Identifies the configuration used for the build. + * When combined with materials, this SHOULD fully describe the build, + * such that re-running this recipe results in bit-for-bit identical output + * (if the build is reproducible). + * @type \Grafeas\V1\SlsaProvenance\SlsaMetadata $metadata + * @type array<\Grafeas\V1\SlsaProvenance\Material>|\Google\Protobuf\Internal\RepeatedField $materials + * The collection of artifacts that influenced the build including sources, + * dependencies, build tools, base images, and so on. This is considered to be + * incomplete unless metadata.completeness.materials is true. Unset or null is + * equivalent to empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); + parent::__construct($data); + } + + /** + * required + * + * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + * @return \Grafeas\V1\SlsaProvenance\SlsaBuilder|null + */ + public function getBuilder() + { + return $this->builder; + } + + public function hasBuilder() + { + return isset($this->builder); + } + + public function clearBuilder() + { + unset($this->builder); + } + + /** + * required + * + * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; + * @param \Grafeas\V1\SlsaProvenance\SlsaBuilder $var + * @return $this + */ + public function setBuilder($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance\SlsaBuilder::class); + $this->builder = $var; + + return $this; + } + + /** + * Identifies the configuration used for the build. + * When combined with materials, this SHOULD fully describe the build, + * such that re-running this recipe results in bit-for-bit identical output + * (if the build is reproducible). + * + * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + * @return \Grafeas\V1\SlsaProvenance\SlsaRecipe|null + */ + public function getRecipe() + { + return $this->recipe; + } + + public function hasRecipe() + { + return isset($this->recipe); + } + + public function clearRecipe() + { + unset($this->recipe); + } + + /** + * Identifies the configuration used for the build. + * When combined with materials, this SHOULD fully describe the build, + * such that re-running this recipe results in bit-for-bit identical output + * (if the build is reproducible). + * + * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; + * @param \Grafeas\V1\SlsaProvenance\SlsaRecipe $var + * @return $this + */ + public function setRecipe($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance\SlsaRecipe::class); + $this->recipe = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + * @return \Grafeas\V1\SlsaProvenance\SlsaMetadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; + * @param \Grafeas\V1\SlsaProvenance\SlsaMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance\SlsaMetadata::class); + $this->metadata = $var; + + return $this; + } + + /** + * The collection of artifacts that influenced the build including sources, + * dependencies, build tools, base images, and so on. This is considered to be + * incomplete unless metadata.completeness.materials is true. Unset or null is + * equivalent to empty. + * + * Generated from protobuf field repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMaterials() + { + return $this->materials; + } + + /** + * The collection of artifacts that influenced the build including sources, + * dependencies, build tools, base images, and so on. This is considered to be + * incomplete unless metadata.completeness.materials is true. Unset or null is + * equivalent to empty. + * + * Generated from protobuf field repeated .grafeas.v1.SlsaProvenance.Material materials = 4; + * @param array<\Grafeas\V1\SlsaProvenance\Material>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMaterials($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\SlsaProvenance\Material::class); + $this->materials = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/Material.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/Material.php new file mode 100644 index 000000000000..d2165056a94b --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/Material.php @@ -0,0 +1,88 @@ +grafeas.v1.SlsaProvenance.Material + */ +class Material extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * Generated from protobuf field map digest = 2; + */ + private $digest; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * @type array|\Google\Protobuf\Internal\MapField $digest + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * 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; + } + + /** + * Generated from protobuf field map digest = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getDigest() + { + return $this->digest; + } + + /** + * Generated from protobuf field map digest = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setDigest($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->digest = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Material::class, \Grafeas\V1\SlsaProvenance_Material::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaBuilder.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaBuilder.php new file mode 100644 index 000000000000..455fa4993f05 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaBuilder.php @@ -0,0 +1,61 @@ +grafeas.v1.SlsaProvenance.SlsaBuilder + */ +class SlsaBuilder extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * 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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SlsaBuilder::class, \Grafeas\V1\SlsaProvenance_SlsaBuilder::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaCompleteness.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaCompleteness.php new file mode 100644 index 000000000000..15d1ba478108 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaCompleteness.php @@ -0,0 +1,151 @@ +grafeas.v1.SlsaProvenance.SlsaCompleteness + */ +class SlsaCompleteness extends \Google\Protobuf\Internal\Message +{ + /** + * If true, the builder claims that recipe.arguments is complete, meaning + * that all external inputs are properly captured in the recipe. + * + * Generated from protobuf field bool arguments = 1; + */ + protected $arguments = false; + /** + * If true, the builder claims that recipe.environment is claimed to be + * complete. + * + * Generated from protobuf field bool environment = 2; + */ + protected $environment = false; + /** + * If true, the builder claims that materials are complete, usually through + * some controls to prevent network access. Sometimes called "hermetic". + * + * Generated from protobuf field bool materials = 3; + */ + protected $materials = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $arguments + * If true, the builder claims that recipe.arguments is complete, meaning + * that all external inputs are properly captured in the recipe. + * @type bool $environment + * If true, the builder claims that recipe.environment is claimed to be + * complete. + * @type bool $materials + * If true, the builder claims that materials are complete, usually through + * some controls to prevent network access. Sometimes called "hermetic". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); + parent::__construct($data); + } + + /** + * If true, the builder claims that recipe.arguments is complete, meaning + * that all external inputs are properly captured in the recipe. + * + * Generated from protobuf field bool arguments = 1; + * @return bool + */ + public function getArguments() + { + return $this->arguments; + } + + /** + * If true, the builder claims that recipe.arguments is complete, meaning + * that all external inputs are properly captured in the recipe. + * + * Generated from protobuf field bool arguments = 1; + * @param bool $var + * @return $this + */ + public function setArguments($var) + { + GPBUtil::checkBool($var); + $this->arguments = $var; + + return $this; + } + + /** + * If true, the builder claims that recipe.environment is claimed to be + * complete. + * + * Generated from protobuf field bool environment = 2; + * @return bool + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * If true, the builder claims that recipe.environment is claimed to be + * complete. + * + * Generated from protobuf field bool environment = 2; + * @param bool $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkBool($var); + $this->environment = $var; + + return $this; + } + + /** + * If true, the builder claims that materials are complete, usually through + * some controls to prevent network access. Sometimes called "hermetic". + * + * Generated from protobuf field bool materials = 3; + * @return bool + */ + public function getMaterials() + { + return $this->materials; + } + + /** + * If true, the builder claims that materials are complete, usually through + * some controls to prevent network access. Sometimes called "hermetic". + * + * Generated from protobuf field bool materials = 3; + * @param bool $var + * @return $this + */ + public function setMaterials($var) + { + GPBUtil::checkBool($var); + $this->materials = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SlsaCompleteness::class, \Grafeas\V1\SlsaProvenance_SlsaCompleteness::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaMetadata.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaMetadata.php new file mode 100644 index 000000000000..05447be11b5c --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaMetadata.php @@ -0,0 +1,252 @@ +grafeas.v1.SlsaProvenance.SlsaMetadata + */ +class SlsaMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Identifies the particular build invocation, which can be useful for + * finding associated logs or other ad-hoc analysis. The value SHOULD be + * globally unique, per in-toto Provenance spec. + * + * Generated from protobuf field string build_invocation_id = 1; + */ + protected $build_invocation_id = ''; + /** + * The timestamp of when the build started. + * + * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; + */ + protected $build_started_on = null; + /** + * The timestamp of when the build completed. + * + * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; + */ + protected $build_finished_on = null; + /** + * Indicates that the builder claims certain fields in this message to be + * complete. + * + * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + */ + protected $completeness = null; + /** + * If true, the builder claims that running the recipe on materials will + * produce bit-for-bit identical output. + * + * Generated from protobuf field bool reproducible = 5; + */ + protected $reproducible = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $build_invocation_id + * Identifies the particular build invocation, which can be useful for + * finding associated logs or other ad-hoc analysis. The value SHOULD be + * globally unique, per in-toto Provenance spec. + * @type \Google\Protobuf\Timestamp $build_started_on + * The timestamp of when the build started. + * @type \Google\Protobuf\Timestamp $build_finished_on + * The timestamp of when the build completed. + * @type \Grafeas\V1\SlsaProvenance\SlsaCompleteness $completeness + * Indicates that the builder claims certain fields in this message to be + * complete. + * @type bool $reproducible + * If true, the builder claims that running the recipe on materials will + * produce bit-for-bit identical output. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); + parent::__construct($data); + } + + /** + * Identifies the particular build invocation, which can be useful for + * finding associated logs or other ad-hoc analysis. The value SHOULD be + * globally unique, per in-toto Provenance spec. + * + * Generated from protobuf field string build_invocation_id = 1; + * @return string + */ + public function getBuildInvocationId() + { + return $this->build_invocation_id; + } + + /** + * Identifies the particular build invocation, which can be useful for + * finding associated logs or other ad-hoc analysis. The value SHOULD be + * globally unique, per in-toto Provenance spec. + * + * Generated from protobuf field string build_invocation_id = 1; + * @param string $var + * @return $this + */ + public function setBuildInvocationId($var) + { + GPBUtil::checkString($var, True); + $this->build_invocation_id = $var; + + return $this; + } + + /** + * The timestamp of when the build started. + * + * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getBuildStartedOn() + { + return $this->build_started_on; + } + + public function hasBuildStartedOn() + { + return isset($this->build_started_on); + } + + public function clearBuildStartedOn() + { + unset($this->build_started_on); + } + + /** + * The timestamp of when the build started. + * + * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setBuildStartedOn($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->build_started_on = $var; + + return $this; + } + + /** + * The timestamp of when the build completed. + * + * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getBuildFinishedOn() + { + return $this->build_finished_on; + } + + public function hasBuildFinishedOn() + { + return isset($this->build_finished_on); + } + + public function clearBuildFinishedOn() + { + unset($this->build_finished_on); + } + + /** + * The timestamp of when the build completed. + * + * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setBuildFinishedOn($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->build_finished_on = $var; + + return $this; + } + + /** + * Indicates that the builder claims certain fields in this message to be + * complete. + * + * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + * @return \Grafeas\V1\SlsaProvenance\SlsaCompleteness|null + */ + public function getCompleteness() + { + return $this->completeness; + } + + public function hasCompleteness() + { + return isset($this->completeness); + } + + public function clearCompleteness() + { + unset($this->completeness); + } + + /** + * Indicates that the builder claims certain fields in this message to be + * complete. + * + * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; + * @param \Grafeas\V1\SlsaProvenance\SlsaCompleteness $var + * @return $this + */ + public function setCompleteness($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance\SlsaCompleteness::class); + $this->completeness = $var; + + return $this; + } + + /** + * If true, the builder claims that running the recipe on materials will + * produce bit-for-bit identical output. + * + * Generated from protobuf field bool reproducible = 5; + * @return bool + */ + public function getReproducible() + { + return $this->reproducible; + } + + /** + * If true, the builder claims that running the recipe on materials will + * produce bit-for-bit identical output. + * + * Generated from protobuf field bool reproducible = 5; + * @param bool $var + * @return $this + */ + public function setReproducible($var) + { + GPBUtil::checkBool($var); + $this->reproducible = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SlsaMetadata::class, \Grafeas\V1\SlsaProvenance_SlsaMetadata::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaRecipe.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaRecipe.php new file mode 100644 index 000000000000..a448a91e95fb --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaRecipe.php @@ -0,0 +1,296 @@ +grafeas.v1.SlsaProvenance.SlsaRecipe + */ +class SlsaRecipe extends \Google\Protobuf\Internal\Message +{ + /** + * URI indicating what type of recipe was performed. It determines the + * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and + * materials. + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * Index in materials containing the recipe steps that are not implied by + * recipe.type. For example, if the recipe type were "make", then this would + * point to the source containing the Makefile, not the make program itself. + * Set to -1 if the recipe doesn't come from a material, as zero is default + * unset value for int64. + * + * Generated from protobuf field int64 defined_in_material = 2; + */ + protected $defined_in_material = 0; + /** + * String identifying the entry point into the build. + * This is often a path to a configuration file and/or a target label within + * that file. The syntax and meaning are defined by recipe.type. For + * example, if the recipe type were "make", then this would reference the + * directory in which to run make as well as which target to use. + * + * Generated from protobuf field string entry_point = 3; + */ + protected $entry_point = ''; + /** + * Collection of all external inputs that influenced the build on top of + * recipe.definedInMaterial and recipe.entryPoint. For example, if the + * recipe type were "make", then this might be the flags passed to make + * aside from the target, which is captured in recipe.entryPoint. Depending + * on the recipe Type, the structure may be different. + * + * Generated from protobuf field .google.protobuf.Any arguments = 4; + */ + protected $arguments = null; + /** + * Any other builder-controlled inputs necessary for correctly evaluating + * the recipe. Usually only needed for reproducing the build but not + * evaluated as part of policy. Depending on the recipe Type, the structure + * may be different. + * + * Generated from protobuf field .google.protobuf.Any environment = 5; + */ + protected $environment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * URI indicating what type of recipe was performed. It determines the + * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and + * materials. + * @type int|string $defined_in_material + * Index in materials containing the recipe steps that are not implied by + * recipe.type. For example, if the recipe type were "make", then this would + * point to the source containing the Makefile, not the make program itself. + * Set to -1 if the recipe doesn't come from a material, as zero is default + * unset value for int64. + * @type string $entry_point + * String identifying the entry point into the build. + * This is often a path to a configuration file and/or a target label within + * that file. The syntax and meaning are defined by recipe.type. For + * example, if the recipe type were "make", then this would reference the + * directory in which to run make as well as which target to use. + * @type \Google\Protobuf\Any $arguments + * Collection of all external inputs that influenced the build on top of + * recipe.definedInMaterial and recipe.entryPoint. For example, if the + * recipe type were "make", then this might be the flags passed to make + * aside from the target, which is captured in recipe.entryPoint. Depending + * on the recipe Type, the structure may be different. + * @type \Google\Protobuf\Any $environment + * Any other builder-controlled inputs necessary for correctly evaluating + * the recipe. Usually only needed for reproducing the build but not + * evaluated as part of policy. Depending on the recipe Type, the structure + * may be different. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); + parent::__construct($data); + } + + /** + * URI indicating what type of recipe was performed. It determines the + * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and + * materials. + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * URI indicating what type of recipe was performed. It determines the + * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and + * materials. + * + * 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; + } + + /** + * Index in materials containing the recipe steps that are not implied by + * recipe.type. For example, if the recipe type were "make", then this would + * point to the source containing the Makefile, not the make program itself. + * Set to -1 if the recipe doesn't come from a material, as zero is default + * unset value for int64. + * + * Generated from protobuf field int64 defined_in_material = 2; + * @return int|string + */ + public function getDefinedInMaterial() + { + return $this->defined_in_material; + } + + /** + * Index in materials containing the recipe steps that are not implied by + * recipe.type. For example, if the recipe type were "make", then this would + * point to the source containing the Makefile, not the make program itself. + * Set to -1 if the recipe doesn't come from a material, as zero is default + * unset value for int64. + * + * Generated from protobuf field int64 defined_in_material = 2; + * @param int|string $var + * @return $this + */ + public function setDefinedInMaterial($var) + { + GPBUtil::checkInt64($var); + $this->defined_in_material = $var; + + return $this; + } + + /** + * String identifying the entry point into the build. + * This is often a path to a configuration file and/or a target label within + * that file. The syntax and meaning are defined by recipe.type. For + * example, if the recipe type were "make", then this would reference the + * directory in which to run make as well as which target to use. + * + * Generated from protobuf field string entry_point = 3; + * @return string + */ + public function getEntryPoint() + { + return $this->entry_point; + } + + /** + * String identifying the entry point into the build. + * This is often a path to a configuration file and/or a target label within + * that file. The syntax and meaning are defined by recipe.type. For + * example, if the recipe type were "make", then this would reference the + * directory in which to run make as well as which target to use. + * + * Generated from protobuf field string entry_point = 3; + * @param string $var + * @return $this + */ + public function setEntryPoint($var) + { + GPBUtil::checkString($var, True); + $this->entry_point = $var; + + return $this; + } + + /** + * Collection of all external inputs that influenced the build on top of + * recipe.definedInMaterial and recipe.entryPoint. For example, if the + * recipe type were "make", then this might be the flags passed to make + * aside from the target, which is captured in recipe.entryPoint. Depending + * on the recipe Type, the structure may be different. + * + * Generated from protobuf field .google.protobuf.Any arguments = 4; + * @return \Google\Protobuf\Any|null + */ + public function getArguments() + { + return $this->arguments; + } + + public function hasArguments() + { + return isset($this->arguments); + } + + public function clearArguments() + { + unset($this->arguments); + } + + /** + * Collection of all external inputs that influenced the build on top of + * recipe.definedInMaterial and recipe.entryPoint. For example, if the + * recipe type were "make", then this might be the flags passed to make + * aside from the target, which is captured in recipe.entryPoint. Depending + * on the recipe Type, the structure may be different. + * + * Generated from protobuf field .google.protobuf.Any arguments = 4; + * @param \Google\Protobuf\Any $var + * @return $this + */ + public function setArguments($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + $this->arguments = $var; + + return $this; + } + + /** + * Any other builder-controlled inputs necessary for correctly evaluating + * the recipe. Usually only needed for reproducing the build but not + * evaluated as part of policy. Depending on the recipe Type, the structure + * may be different. + * + * Generated from protobuf field .google.protobuf.Any environment = 5; + * @return \Google\Protobuf\Any|null + */ + public function getEnvironment() + { + return $this->environment; + } + + public function hasEnvironment() + { + return isset($this->environment); + } + + public function clearEnvironment() + { + unset($this->environment); + } + + /** + * Any other builder-controlled inputs necessary for correctly evaluating + * the recipe. Usually only needed for reproducing the build but not + * evaluated as part of policy. Depending on the recipe Type, the structure + * may be different. + * + * Generated from protobuf field .google.protobuf.Any environment = 5; + * @param \Google\Protobuf\Any $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + $this->environment = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SlsaRecipe::class, \Grafeas\V1\SlsaProvenance_SlsaRecipe::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo.php new file mode 100644 index 000000000000..c066b7a6521b --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo.php @@ -0,0 +1,235 @@ +grafeas.v1.SlsaProvenanceZeroTwo + */ +class SlsaProvenanceZeroTwo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + */ + protected $builder = null; + /** + * Generated from protobuf field string build_type = 2; + */ + protected $build_type = ''; + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + */ + protected $invocation = null; + /** + * Generated from protobuf field .google.protobuf.Struct build_config = 4; + */ + protected $build_config = null; + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + */ + protected $metadata = null; + /** + * Generated from protobuf field repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + */ + private $materials; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaBuilder $builder + * @type string $build_type + * @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaInvocation $invocation + * @type \Google\Protobuf\Struct $build_config + * @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMetadata $metadata + * @type array<\Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMaterial>|\Google\Protobuf\Internal\RepeatedField $materials + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaBuilder|null + */ + public function getBuilder() + { + return $this->builder; + } + + public function hasBuilder() + { + return isset($this->builder); + } + + public function clearBuilder() + { + unset($this->builder); + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; + * @param \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaBuilder $var + * @return $this + */ + public function setBuilder($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaBuilder::class); + $this->builder = $var; + + return $this; + } + + /** + * Generated from protobuf field string build_type = 2; + * @return string + */ + public function getBuildType() + { + return $this->build_type; + } + + /** + * Generated from protobuf field string build_type = 2; + * @param string $var + * @return $this + */ + public function setBuildType($var) + { + GPBUtil::checkString($var, True); + $this->build_type = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaInvocation|null + */ + public function getInvocation() + { + return $this->invocation; + } + + public function hasInvocation() + { + return isset($this->invocation); + } + + public function clearInvocation() + { + unset($this->invocation); + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; + * @param \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaInvocation $var + * @return $this + */ + public function setInvocation($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaInvocation::class); + $this->invocation = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Struct build_config = 4; + * @return \Google\Protobuf\Struct|null + */ + public function getBuildConfig() + { + return $this->build_config; + } + + public function hasBuildConfig() + { + return isset($this->build_config); + } + + public function clearBuildConfig() + { + unset($this->build_config); + } + + /** + * Generated from protobuf field .google.protobuf.Struct build_config = 4; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setBuildConfig($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->build_config = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMetadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; + * @param \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMetadata::class); + $this->metadata = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMaterials() + { + return $this->materials; + } + + /** + * Generated from protobuf field repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; + * @param array<\Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMaterial>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMaterials($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMaterial::class); + $this->materials = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaBuilder.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaBuilder.php new file mode 100644 index 000000000000..8029c7d4c110 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaBuilder.php @@ -0,0 +1,64 @@ +grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder + */ +class SlsaBuilder extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * 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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SlsaBuilder::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaBuilder::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaCompleteness.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaCompleteness.php new file mode 100644 index 000000000000..dcb6e0a819c6 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaCompleteness.php @@ -0,0 +1,118 @@ +grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness + */ +class SlsaCompleteness extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bool parameters = 1; + */ + protected $parameters = false; + /** + * Generated from protobuf field bool environment = 2; + */ + protected $environment = false; + /** + * Generated from protobuf field bool materials = 3; + */ + protected $materials = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $parameters + * @type bool $environment + * @type bool $materials + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bool parameters = 1; + * @return bool + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * Generated from protobuf field bool parameters = 1; + * @param bool $var + * @return $this + */ + public function setParameters($var) + { + GPBUtil::checkBool($var); + $this->parameters = $var; + + return $this; + } + + /** + * Generated from protobuf field bool environment = 2; + * @return bool + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * Generated from protobuf field bool environment = 2; + * @param bool $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkBool($var); + $this->environment = $var; + + return $this; + } + + /** + * Generated from protobuf field bool materials = 3; + * @return bool + */ + public function getMaterials() + { + return $this->materials; + } + + /** + * Generated from protobuf field bool materials = 3; + * @param bool $var + * @return $this + */ + public function setMaterials($var) + { + GPBUtil::checkBool($var); + $this->materials = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SlsaCompleteness::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaCompleteness::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaConfigSource.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaConfigSource.php new file mode 100644 index 000000000000..236b9d685397 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaConfigSource.php @@ -0,0 +1,118 @@ +grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource + */ +class SlsaConfigSource extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * Generated from protobuf field map digest = 2; + */ + private $digest; + /** + * Generated from protobuf field string entry_point = 3; + */ + protected $entry_point = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * @type array|\Google\Protobuf\Internal\MapField $digest + * @type string $entry_point + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * 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; + } + + /** + * Generated from protobuf field map digest = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getDigest() + { + return $this->digest; + } + + /** + * Generated from protobuf field map digest = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setDigest($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->digest = $arr; + + return $this; + } + + /** + * Generated from protobuf field string entry_point = 3; + * @return string + */ + public function getEntryPoint() + { + return $this->entry_point; + } + + /** + * Generated from protobuf field string entry_point = 3; + * @param string $var + * @return $this + */ + public function setEntryPoint($var) + { + GPBUtil::checkString($var, True); + $this->entry_point = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SlsaConfigSource::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaConfigSource::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaInvocation.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaInvocation.php new file mode 100644 index 000000000000..14076ccc4655 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaInvocation.php @@ -0,0 +1,147 @@ +grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation + */ +class SlsaInvocation extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + */ + protected $config_source = null; + /** + * Generated from protobuf field .google.protobuf.Struct parameters = 2; + */ + protected $parameters = null; + /** + * Generated from protobuf field .google.protobuf.Struct environment = 3; + */ + protected $environment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaConfigSource $config_source + * @type \Google\Protobuf\Struct $parameters + * @type \Google\Protobuf\Struct $environment + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaConfigSource|null + */ + public function getConfigSource() + { + return $this->config_source; + } + + public function hasConfigSource() + { + return isset($this->config_source); + } + + public function clearConfigSource() + { + unset($this->config_source); + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; + * @param \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaConfigSource $var + * @return $this + */ + public function setConfigSource($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaConfigSource::class); + $this->config_source = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Struct parameters = 2; + * @return \Google\Protobuf\Struct|null + */ + public function getParameters() + { + return $this->parameters; + } + + public function hasParameters() + { + return isset($this->parameters); + } + + public function clearParameters() + { + unset($this->parameters); + } + + /** + * Generated from protobuf field .google.protobuf.Struct parameters = 2; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setParameters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->parameters = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Struct environment = 3; + * @return \Google\Protobuf\Struct|null + */ + public function getEnvironment() + { + return $this->environment; + } + + public function hasEnvironment() + { + return isset($this->environment); + } + + public function clearEnvironment() + { + unset($this->environment); + } + + /** + * Generated from protobuf field .google.protobuf.Struct environment = 3; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->environment = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SlsaInvocation::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaInvocation::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMaterial.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMaterial.php new file mode 100644 index 000000000000..e25c459a24c4 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMaterial.php @@ -0,0 +1,91 @@ +grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial + */ +class SlsaMaterial extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * Generated from protobuf field map digest = 2; + */ + private $digest; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * @type array|\Google\Protobuf\Internal\MapField $digest + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * 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; + } + + /** + * Generated from protobuf field map digest = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getDigest() + { + return $this->digest; + } + + /** + * Generated from protobuf field map digest = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setDigest($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->digest = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SlsaMaterial::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaMaterial::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMetadata.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMetadata.php new file mode 100644 index 000000000000..611a1e272054 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMetadata.php @@ -0,0 +1,201 @@ +grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata + */ +class SlsaMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string build_invocation_id = 1; + */ + protected $build_invocation_id = ''; + /** + * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; + */ + protected $build_started_on = null; + /** + * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; + */ + protected $build_finished_on = null; + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + */ + protected $completeness = null; + /** + * Generated from protobuf field bool reproducible = 5; + */ + protected $reproducible = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $build_invocation_id + * @type \Google\Protobuf\Timestamp $build_started_on + * @type \Google\Protobuf\Timestamp $build_finished_on + * @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaCompleteness $completeness + * @type bool $reproducible + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string build_invocation_id = 1; + * @return string + */ + public function getBuildInvocationId() + { + return $this->build_invocation_id; + } + + /** + * Generated from protobuf field string build_invocation_id = 1; + * @param string $var + * @return $this + */ + public function setBuildInvocationId($var) + { + GPBUtil::checkString($var, True); + $this->build_invocation_id = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getBuildStartedOn() + { + return $this->build_started_on; + } + + public function hasBuildStartedOn() + { + return isset($this->build_started_on); + } + + public function clearBuildStartedOn() + { + unset($this->build_started_on); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setBuildStartedOn($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->build_started_on = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getBuildFinishedOn() + { + return $this->build_finished_on; + } + + public function hasBuildFinishedOn() + { + return isset($this->build_finished_on); + } + + public function clearBuildFinishedOn() + { + unset($this->build_finished_on); + } + + /** + * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setBuildFinishedOn($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->build_finished_on = $var; + + return $this; + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaCompleteness|null + */ + public function getCompleteness() + { + return $this->completeness; + } + + public function hasCompleteness() + { + return isset($this->completeness); + } + + public function clearCompleteness() + { + unset($this->completeness); + } + + /** + * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; + * @param \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaCompleteness $var + * @return $this + */ + public function setCompleteness($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaCompleteness::class); + $this->completeness = $var; + + return $this; + } + + /** + * Generated from protobuf field bool reproducible = 5; + * @return bool + */ + public function getReproducible() + { + return $this->reproducible; + } + + /** + * Generated from protobuf field bool reproducible = 5; + * @param bool $var + * @return $this + */ + public function setReproducible($var) + { + GPBUtil::checkBool($var); + $this->reproducible = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SlsaMetadata::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaMetadata::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaBuilder.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaBuilder.php new file mode 100644 index 000000000000..47d4e33cdfd2 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaBuilder.php @@ -0,0 +1,16 @@ +grafeas.v1.Source + */ +class Source extends \Google\Protobuf\Internal\Message +{ + /** + * If provided, the input binary artifacts for the build came from this + * location. + * + * Generated from protobuf field string artifact_storage_source_uri = 1; + */ + protected $artifact_storage_source_uri = ''; + /** + * Hash(es) of the build source, which can be used to verify that the original + * source integrity was maintained in the build. + * The keys to this map are file paths used as build source and the values + * contain the hash values for those files. + * If the build source came in a single package such as a gzipped tarfile + * (.tar.gz), the FileHash will be for the single path to that file. + * + * Generated from protobuf field map file_hashes = 2; + */ + private $file_hashes; + /** + * If provided, the source code used for the build came from this location. + * + * Generated from protobuf field .grafeas.v1.SourceContext context = 3; + */ + protected $context = null; + /** + * If provided, some of the source code used for the build may be found in + * these locations, in the case where the source repository had multiple + * remotes or submodules. This list will not include the context specified in + * the context field. + * + * Generated from protobuf field repeated .grafeas.v1.SourceContext additional_contexts = 4; + */ + private $additional_contexts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $artifact_storage_source_uri + * If provided, the input binary artifacts for the build came from this + * location. + * @type array|\Google\Protobuf\Internal\MapField $file_hashes + * Hash(es) of the build source, which can be used to verify that the original + * source integrity was maintained in the build. + * The keys to this map are file paths used as build source and the values + * contain the hash values for those files. + * If the build source came in a single package such as a gzipped tarfile + * (.tar.gz), the FileHash will be for the single path to that file. + * @type \Grafeas\V1\SourceContext $context + * If provided, the source code used for the build came from this location. + * @type array<\Grafeas\V1\SourceContext>|\Google\Protobuf\Internal\RepeatedField $additional_contexts + * If provided, some of the source code used for the build may be found in + * these locations, in the case where the source repository had multiple + * remotes or submodules. This list will not include the context specified in + * the context field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Provenance::initOnce(); + parent::__construct($data); + } + + /** + * If provided, the input binary artifacts for the build came from this + * location. + * + * Generated from protobuf field string artifact_storage_source_uri = 1; + * @return string + */ + public function getArtifactStorageSourceUri() + { + return $this->artifact_storage_source_uri; + } + + /** + * If provided, the input binary artifacts for the build came from this + * location. + * + * Generated from protobuf field string artifact_storage_source_uri = 1; + * @param string $var + * @return $this + */ + public function setArtifactStorageSourceUri($var) + { + GPBUtil::checkString($var, True); + $this->artifact_storage_source_uri = $var; + + return $this; + } + + /** + * Hash(es) of the build source, which can be used to verify that the original + * source integrity was maintained in the build. + * The keys to this map are file paths used as build source and the values + * contain the hash values for those files. + * If the build source came in a single package such as a gzipped tarfile + * (.tar.gz), the FileHash will be for the single path to that file. + * + * Generated from protobuf field map file_hashes = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFileHashes() + { + return $this->file_hashes; + } + + /** + * Hash(es) of the build source, which can be used to verify that the original + * source integrity was maintained in the build. + * The keys to this map are file paths used as build source and the values + * contain the hash values for those files. + * If the build source came in a single package such as a gzipped tarfile + * (.tar.gz), the FileHash will be for the single path to that file. + * + * Generated from protobuf field map file_hashes = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFileHashes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\FileHashes::class); + $this->file_hashes = $arr; + + return $this; + } + + /** + * If provided, the source code used for the build came from this location. + * + * Generated from protobuf field .grafeas.v1.SourceContext context = 3; + * @return \Grafeas\V1\SourceContext|null + */ + public function getContext() + { + return $this->context; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * If provided, the source code used for the build came from this location. + * + * Generated from protobuf field .grafeas.v1.SourceContext context = 3; + * @param \Grafeas\V1\SourceContext $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\SourceContext::class); + $this->context = $var; + + return $this; + } + + /** + * If provided, some of the source code used for the build may be found in + * these locations, in the case where the source repository had multiple + * remotes or submodules. This list will not include the context specified in + * the context field. + * + * Generated from protobuf field repeated .grafeas.v1.SourceContext additional_contexts = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdditionalContexts() + { + return $this->additional_contexts; + } + + /** + * If provided, some of the source code used for the build may be found in + * these locations, in the case where the source repository had multiple + * remotes or submodules. This list will not include the context specified in + * the context field. + * + * Generated from protobuf field repeated .grafeas.v1.SourceContext additional_contexts = 4; + * @param array<\Grafeas\V1\SourceContext>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdditionalContexts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\SourceContext::class); + $this->additional_contexts = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SourceContext.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SourceContext.php new file mode 100644 index 000000000000..fced17b0d002 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SourceContext.php @@ -0,0 +1,176 @@ +grafeas.v1.SourceContext + */ +class SourceContext extends \Google\Protobuf\Internal\Message +{ + /** + * Labels with user defined metadata. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + protected $context; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Grafeas\V1\CloudRepoSourceContext $cloud_repo + * A SourceContext referring to a revision in a Google Cloud Source Repo. + * @type \Grafeas\V1\GerritSourceContext $gerrit + * A SourceContext referring to a Gerrit project. + * @type \Grafeas\V1\GitSourceContext $git + * A SourceContext referring to any third party Git repo (e.g., GitHub). + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels with user defined metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Provenance::initOnce(); + parent::__construct($data); + } + + /** + * A SourceContext referring to a revision in a Google Cloud Source Repo. + * + * Generated from protobuf field .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + * @return \Grafeas\V1\CloudRepoSourceContext|null + */ + public function getCloudRepo() + { + return $this->readOneof(1); + } + + public function hasCloudRepo() + { + return $this->hasOneof(1); + } + + /** + * A SourceContext referring to a revision in a Google Cloud Source Repo. + * + * Generated from protobuf field .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; + * @param \Grafeas\V1\CloudRepoSourceContext $var + * @return $this + */ + public function setCloudRepo($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\CloudRepoSourceContext::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A SourceContext referring to a Gerrit project. + * + * Generated from protobuf field .grafeas.v1.GerritSourceContext gerrit = 2; + * @return \Grafeas\V1\GerritSourceContext|null + */ + public function getGerrit() + { + return $this->readOneof(2); + } + + public function hasGerrit() + { + return $this->hasOneof(2); + } + + /** + * A SourceContext referring to a Gerrit project. + * + * Generated from protobuf field .grafeas.v1.GerritSourceContext gerrit = 2; + * @param \Grafeas\V1\GerritSourceContext $var + * @return $this + */ + public function setGerrit($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\GerritSourceContext::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A SourceContext referring to any third party Git repo (e.g., GitHub). + * + * Generated from protobuf field .grafeas.v1.GitSourceContext git = 3; + * @return \Grafeas\V1\GitSourceContext|null + */ + public function getGit() + { + return $this->readOneof(3); + } + + public function hasGit() + { + return $this->hasOneof(3); + } + + /** + * A SourceContext referring to any third party Git repo (e.g., GitHub). + * + * Generated from protobuf field .grafeas.v1.GitSourceContext git = 3; + * @param \Grafeas\V1\GitSourceContext $var + * @return $this + */ + public function setGit($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\GitSourceContext::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Labels with user defined metadata. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels with user defined metadata. + * + * 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; + } + + /** + * @return string + */ + public function getContext() + { + return $this->whichOneof("context"); + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Subject.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Subject.php new file mode 100644 index 000000000000..14d4fa6fe2e7 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Subject.php @@ -0,0 +1,104 @@ +grafeas.v1.Subject + */ +class Subject extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * `"": ""` + * Algorithms can be e.g. sha256, sha512 + * See + * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet + * + * Generated from protobuf field map digest = 2; + */ + private $digest; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * @type array|\Google\Protobuf\Internal\MapField $digest + * `"": ""` + * Algorithms can be e.g. sha256, sha512 + * See + * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\IntotoStatement::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * 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; + } + + /** + * `"": ""` + * Algorithms can be e.g. sha256, sha512 + * See + * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet + * + * Generated from protobuf field map digest = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getDigest() + { + return $this->digest; + } + + /** + * `"": ""` + * Algorithms can be e.g. sha256, sha512 + * See + * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet + * + * Generated from protobuf field map digest = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setDigest($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->digest = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateNoteRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateNoteRequest.php new file mode 100644 index 000000000000..f9630fde9793 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateNoteRequest.php @@ -0,0 +1,159 @@ +grafeas.v1.UpdateNoteRequest + */ +class UpdateNoteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The updated note. + * + * Generated from protobuf field .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $note = null; + /** + * The fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @type \Grafeas\V1\Note $note + * The updated note. + * @type \Google\Protobuf\FieldMask $update_mask + * The fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_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; + } + + /** + * The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_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; + } + + /** + * The updated note. + * + * Generated from protobuf field .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Grafeas\V1\Note|null + */ + public function getNote() + { + return $this->note; + } + + public function hasNote() + { + return isset($this->note); + } + + public function clearNote() + { + unset($this->note); + } + + /** + * The updated note. + * + * Generated from protobuf field .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Grafeas\V1\Note $var + * @return $this + */ + public function setNote($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Note::class); + $this->note = $var; + + return $this; + } + + /** + * The fields to update. + * + * 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); + } + + /** + * The fields to update. + * + * 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/Grafeas/v1/proto/src/Grafeas/V1/UpdateOccurrenceRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateOccurrenceRequest.php new file mode 100644 index 000000000000..6e79019d4dec --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateOccurrenceRequest.php @@ -0,0 +1,159 @@ +grafeas.v1.UpdateOccurrenceRequest + */ +class UpdateOccurrenceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The updated occurrence. + * + * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $occurrence = null; + /** + * The fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @type \Grafeas\V1\Occurrence $occurrence + * The updated occurrence. + * @type \Google\Protobuf\FieldMask $update_mask + * The fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); + parent::__construct($data); + } + + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; + } + + /** + * The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; + } + + /** + * The updated occurrence. + * + * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Grafeas\V1\Occurrence|null + */ + public function getOccurrence() + { + return $this->occurrence; + } + + public function hasOccurrence() + { + return isset($this->occurrence); + } + + public function clearOccurrence() + { + unset($this->occurrence); + } + + /** + * The updated occurrence. + * + * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Grafeas\V1\Occurrence $var + * @return $this + */ + public function setOccurrence($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Occurrence::class); + $this->occurrence = $var; + + return $this; + } + + /** + * The fields to update. + * + * 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); + } + + /** + * The fields to update. + * + * 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/Grafeas/v1/proto/src/Grafeas/V1/UpgradeDistribution.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeDistribution.php new file mode 100644 index 000000000000..b5b16a112b02 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeDistribution.php @@ -0,0 +1,187 @@ +grafeas.v1.UpgradeDistribution + */ +class UpgradeDistribution extends \Google\Protobuf\Internal\Message +{ + /** + * Required - The specific operating system this metadata applies to. See + * https://cpe.mitre.org/specification/. + * + * Generated from protobuf field string cpe_uri = 1; + */ + protected $cpe_uri = ''; + /** + * The operating system classification of this Upgrade, as specified by the + * upstream operating system upgrade feed. For Windows the classification is + * one of the category_ids listed at + * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) + * + * Generated from protobuf field string classification = 2; + */ + protected $classification = ''; + /** + * The severity as specified by the upstream operating system. + * + * Generated from protobuf field string severity = 3; + */ + protected $severity = ''; + /** + * The cve tied to this Upgrade. + * + * Generated from protobuf field repeated string cve = 4; + */ + private $cve; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cpe_uri + * Required - The specific operating system this metadata applies to. See + * https://cpe.mitre.org/specification/. + * @type string $classification + * The operating system classification of this Upgrade, as specified by the + * upstream operating system upgrade feed. For Windows the classification is + * one of the category_ids listed at + * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) + * @type string $severity + * The severity as specified by the upstream operating system. + * @type array|\Google\Protobuf\Internal\RepeatedField $cve + * The cve tied to this Upgrade. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); + parent::__construct($data); + } + + /** + * Required - The specific operating system this metadata applies to. See + * https://cpe.mitre.org/specification/. + * + * Generated from protobuf field string cpe_uri = 1; + * @return string + */ + public function getCpeUri() + { + return $this->cpe_uri; + } + + /** + * Required - The specific operating system this metadata applies to. See + * https://cpe.mitre.org/specification/. + * + * Generated from protobuf field string cpe_uri = 1; + * @param string $var + * @return $this + */ + public function setCpeUri($var) + { + GPBUtil::checkString($var, True); + $this->cpe_uri = $var; + + return $this; + } + + /** + * The operating system classification of this Upgrade, as specified by the + * upstream operating system upgrade feed. For Windows the classification is + * one of the category_ids listed at + * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) + * + * Generated from protobuf field string classification = 2; + * @return string + */ + public function getClassification() + { + return $this->classification; + } + + /** + * The operating system classification of this Upgrade, as specified by the + * upstream operating system upgrade feed. For Windows the classification is + * one of the category_ids listed at + * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) + * + * Generated from protobuf field string classification = 2; + * @param string $var + * @return $this + */ + public function setClassification($var) + { + GPBUtil::checkString($var, True); + $this->classification = $var; + + return $this; + } + + /** + * The severity as specified by the upstream operating system. + * + * Generated from protobuf field string severity = 3; + * @return string + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * The severity as specified by the upstream operating system. + * + * 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; + } + + /** + * The cve tied to this Upgrade. + * + * Generated from protobuf field repeated string cve = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCve() + { + return $this->cve; + } + + /** + * The cve tied to this Upgrade. + * + * Generated from protobuf field repeated string cve = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCve($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->cve = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeNote.php new file mode 100644 index 000000000000..b91b637b0c3b --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeNote.php @@ -0,0 +1,196 @@ +grafeas.v1.UpgradeNote + */ +class UpgradeNote extends \Google\Protobuf\Internal\Message +{ + /** + * Required for non-Windows OS. The package this Upgrade is for. + * + * Generated from protobuf field string package = 1; + */ + protected $package = ''; + /** + * Required for non-Windows OS. The version of the package in machine + human + * readable form. + * + * Generated from protobuf field .grafeas.v1.Version version = 2; + */ + protected $version = null; + /** + * Metadata about the upgrade for each specific operating system. + * + * Generated from protobuf field repeated .grafeas.v1.UpgradeDistribution distributions = 3; + */ + private $distributions; + /** + * Required for Windows OS. Represents the metadata about the Windows update. + * + * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 4; + */ + protected $windows_update = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $package + * Required for non-Windows OS. The package this Upgrade is for. + * @type \Grafeas\V1\Version $version + * Required for non-Windows OS. The version of the package in machine + human + * readable form. + * @type array<\Grafeas\V1\UpgradeDistribution>|\Google\Protobuf\Internal\RepeatedField $distributions + * Metadata about the upgrade for each specific operating system. + * @type \Grafeas\V1\WindowsUpdate $windows_update + * Required for Windows OS. Represents the metadata about the Windows update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); + parent::__construct($data); + } + + /** + * Required for non-Windows OS. The package this Upgrade is for. + * + * Generated from protobuf field string package = 1; + * @return string + */ + public function getPackage() + { + return $this->package; + } + + /** + * Required for non-Windows OS. The package this Upgrade is for. + * + * Generated from protobuf field string package = 1; + * @param string $var + * @return $this + */ + public function setPackage($var) + { + GPBUtil::checkString($var, True); + $this->package = $var; + + return $this; + } + + /** + * Required for non-Windows OS. The version of the package in machine + human + * readable form. + * + * Generated from protobuf field .grafeas.v1.Version version = 2; + * @return \Grafeas\V1\Version|null + */ + public function getVersion() + { + return $this->version; + } + + public function hasVersion() + { + return isset($this->version); + } + + public function clearVersion() + { + unset($this->version); + } + + /** + * Required for non-Windows OS. The version of the package in machine + human + * readable form. + * + * Generated from protobuf field .grafeas.v1.Version version = 2; + * @param \Grafeas\V1\Version $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); + $this->version = $var; + + return $this; + } + + /** + * Metadata about the upgrade for each specific operating system. + * + * Generated from protobuf field repeated .grafeas.v1.UpgradeDistribution distributions = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDistributions() + { + return $this->distributions; + } + + /** + * Metadata about the upgrade for each specific operating system. + * + * Generated from protobuf field repeated .grafeas.v1.UpgradeDistribution distributions = 3; + * @param array<\Grafeas\V1\UpgradeDistribution>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDistributions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\UpgradeDistribution::class); + $this->distributions = $arr; + + return $this; + } + + /** + * Required for Windows OS. Represents the metadata about the Windows update. + * + * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 4; + * @return \Grafeas\V1\WindowsUpdate|null + */ + public function getWindowsUpdate() + { + return $this->windows_update; + } + + public function hasWindowsUpdate() + { + return isset($this->windows_update); + } + + public function clearWindowsUpdate() + { + unset($this->windows_update); + } + + /** + * Required for Windows OS. Represents the metadata about the Windows update. + * + * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 4; + * @param \Grafeas\V1\WindowsUpdate $var + * @return $this + */ + public function setWindowsUpdate($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\WindowsUpdate::class); + $this->windows_update = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeOccurrence.php new file mode 100644 index 000000000000..15c700918d0f --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeOccurrence.php @@ -0,0 +1,215 @@ +grafeas.v1.UpgradeOccurrence + */ +class UpgradeOccurrence extends \Google\Protobuf\Internal\Message +{ + /** + * Required for non-Windows OS. The package this Upgrade is for. + * + * Generated from protobuf field string package = 1; + */ + protected $package = ''; + /** + * Required for non-Windows OS. The version of the package in a machine + + * human readable form. + * + * Generated from protobuf field .grafeas.v1.Version parsed_version = 3; + */ + protected $parsed_version = null; + /** + * Metadata about the upgrade for available for the specific operating system + * for the resource_url. This allows efficient filtering, as well as + * making it easier to use the occurrence. + * + * Generated from protobuf field .grafeas.v1.UpgradeDistribution distribution = 4; + */ + protected $distribution = null; + /** + * Required for Windows OS. Represents the metadata about the Windows update. + * + * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 5; + */ + protected $windows_update = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $package + * Required for non-Windows OS. The package this Upgrade is for. + * @type \Grafeas\V1\Version $parsed_version + * Required for non-Windows OS. The version of the package in a machine + + * human readable form. + * @type \Grafeas\V1\UpgradeDistribution $distribution + * Metadata about the upgrade for available for the specific operating system + * for the resource_url. This allows efficient filtering, as well as + * making it easier to use the occurrence. + * @type \Grafeas\V1\WindowsUpdate $windows_update + * Required for Windows OS. Represents the metadata about the Windows update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); + parent::__construct($data); + } + + /** + * Required for non-Windows OS. The package this Upgrade is for. + * + * Generated from protobuf field string package = 1; + * @return string + */ + public function getPackage() + { + return $this->package; + } + + /** + * Required for non-Windows OS. The package this Upgrade is for. + * + * Generated from protobuf field string package = 1; + * @param string $var + * @return $this + */ + public function setPackage($var) + { + GPBUtil::checkString($var, True); + $this->package = $var; + + return $this; + } + + /** + * Required for non-Windows OS. The version of the package in a machine + + * human readable form. + * + * Generated from protobuf field .grafeas.v1.Version parsed_version = 3; + * @return \Grafeas\V1\Version|null + */ + public function getParsedVersion() + { + return $this->parsed_version; + } + + public function hasParsedVersion() + { + return isset($this->parsed_version); + } + + public function clearParsedVersion() + { + unset($this->parsed_version); + } + + /** + * Required for non-Windows OS. The version of the package in a machine + + * human readable form. + * + * Generated from protobuf field .grafeas.v1.Version parsed_version = 3; + * @param \Grafeas\V1\Version $var + * @return $this + */ + public function setParsedVersion($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); + $this->parsed_version = $var; + + return $this; + } + + /** + * Metadata about the upgrade for available for the specific operating system + * for the resource_url. This allows efficient filtering, as well as + * making it easier to use the occurrence. + * + * Generated from protobuf field .grafeas.v1.UpgradeDistribution distribution = 4; + * @return \Grafeas\V1\UpgradeDistribution|null + */ + public function getDistribution() + { + return $this->distribution; + } + + public function hasDistribution() + { + return isset($this->distribution); + } + + public function clearDistribution() + { + unset($this->distribution); + } + + /** + * Metadata about the upgrade for available for the specific operating system + * for the resource_url. This allows efficient filtering, as well as + * making it easier to use the occurrence. + * + * Generated from protobuf field .grafeas.v1.UpgradeDistribution distribution = 4; + * @param \Grafeas\V1\UpgradeDistribution $var + * @return $this + */ + public function setDistribution($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\UpgradeDistribution::class); + $this->distribution = $var; + + return $this; + } + + /** + * Required for Windows OS. Represents the metadata about the Windows update. + * + * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 5; + * @return \Grafeas\V1\WindowsUpdate|null + */ + public function getWindowsUpdate() + { + return $this->windows_update; + } + + public function hasWindowsUpdate() + { + return isset($this->windows_update); + } + + public function clearWindowsUpdate() + { + unset($this->windows_update); + } + + /** + * Required for Windows OS. Represents the metadata about the Windows update. + * + * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 5; + * @param \Grafeas\V1\WindowsUpdate $var + * @return $this + */ + public function setWindowsUpdate($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\WindowsUpdate::class); + $this->windows_update = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version.php new file mode 100644 index 000000000000..ed635362b2f0 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version.php @@ -0,0 +1,269 @@ +grafeas.v1.Version + */ +class Version extends \Google\Protobuf\Internal\Message +{ + /** + * Used to correct mistakes in the version numbering scheme. + * + * Generated from protobuf field int32 epoch = 1; + */ + protected $epoch = 0; + /** + * Required only when version kind is NORMAL. The main part of the version + * name. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * The iteration of the package build from the above version. + * + * Generated from protobuf field string revision = 3; + */ + protected $revision = ''; + /** + * Whether this version is specifying part of an inclusive range. Grafeas + * does not have the capability to specify version ranges; instead we have + * fields that specify start version and end versions. At times this is + * insufficient - we also need to specify whether the version is included in + * the range or is excluded from the range. This boolean is expected to be set + * to true when the version is included in a range. + * + * Generated from protobuf field bool inclusive = 6; + */ + protected $inclusive = false; + /** + * Required. Distinguishes between sentinel MIN/MAX versions and normal + * versions. + * + * Generated from protobuf field .grafeas.v1.Version.VersionKind kind = 4; + */ + protected $kind = 0; + /** + * Human readable version string. This string is of the form + * :- and is only set when kind is NORMAL. + * + * Generated from protobuf field string full_name = 5; + */ + protected $full_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $epoch + * Used to correct mistakes in the version numbering scheme. + * @type string $name + * Required only when version kind is NORMAL. The main part of the version + * name. + * @type string $revision + * The iteration of the package build from the above version. + * @type bool $inclusive + * Whether this version is specifying part of an inclusive range. Grafeas + * does not have the capability to specify version ranges; instead we have + * fields that specify start version and end versions. At times this is + * insufficient - we also need to specify whether the version is included in + * the range or is excluded from the range. This boolean is expected to be set + * to true when the version is included in a range. + * @type int $kind + * Required. Distinguishes between sentinel MIN/MAX versions and normal + * versions. + * @type string $full_name + * Human readable version string. This string is of the form + * :- and is only set when kind is NORMAL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Package::initOnce(); + parent::__construct($data); + } + + /** + * Used to correct mistakes in the version numbering scheme. + * + * Generated from protobuf field int32 epoch = 1; + * @return int + */ + public function getEpoch() + { + return $this->epoch; + } + + /** + * Used to correct mistakes in the version numbering scheme. + * + * Generated from protobuf field int32 epoch = 1; + * @param int $var + * @return $this + */ + public function setEpoch($var) + { + GPBUtil::checkInt32($var); + $this->epoch = $var; + + return $this; + } + + /** + * Required only when version kind is NORMAL. The main part of the version + * name. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required only when version kind is NORMAL. The main part of the version + * name. + * + * 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; + } + + /** + * The iteration of the package build from the above version. + * + * Generated from protobuf field string revision = 3; + * @return string + */ + public function getRevision() + { + return $this->revision; + } + + /** + * The iteration of the package build from the above version. + * + * Generated from protobuf field string revision = 3; + * @param string $var + * @return $this + */ + public function setRevision($var) + { + GPBUtil::checkString($var, True); + $this->revision = $var; + + return $this; + } + + /** + * Whether this version is specifying part of an inclusive range. Grafeas + * does not have the capability to specify version ranges; instead we have + * fields that specify start version and end versions. At times this is + * insufficient - we also need to specify whether the version is included in + * the range or is excluded from the range. This boolean is expected to be set + * to true when the version is included in a range. + * + * Generated from protobuf field bool inclusive = 6; + * @return bool + */ + public function getInclusive() + { + return $this->inclusive; + } + + /** + * Whether this version is specifying part of an inclusive range. Grafeas + * does not have the capability to specify version ranges; instead we have + * fields that specify start version and end versions. At times this is + * insufficient - we also need to specify whether the version is included in + * the range or is excluded from the range. This boolean is expected to be set + * to true when the version is included in a range. + * + * Generated from protobuf field bool inclusive = 6; + * @param bool $var + * @return $this + */ + public function setInclusive($var) + { + GPBUtil::checkBool($var); + $this->inclusive = $var; + + return $this; + } + + /** + * Required. Distinguishes between sentinel MIN/MAX versions and normal + * versions. + * + * Generated from protobuf field .grafeas.v1.Version.VersionKind kind = 4; + * @return int + */ + public function getKind() + { + return $this->kind; + } + + /** + * Required. Distinguishes between sentinel MIN/MAX versions and normal + * versions. + * + * Generated from protobuf field .grafeas.v1.Version.VersionKind kind = 4; + * @param int $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\Version\VersionKind::class); + $this->kind = $var; + + return $this; + } + + /** + * Human readable version string. This string is of the form + * :- and is only set when kind is NORMAL. + * + * Generated from protobuf field string full_name = 5; + * @return string + */ + public function getFullName() + { + return $this->full_name; + } + + /** + * Human readable version string. This string is of the form + * :- and is only set when kind is NORMAL. + * + * Generated from protobuf field string full_name = 5; + * @param string $var + * @return $this + */ + public function setFullName($var) + { + GPBUtil::checkString($var, True); + $this->full_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version/VersionKind.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version/VersionKind.php new file mode 100644 index 000000000000..d978c7d44cf5 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version/VersionKind.php @@ -0,0 +1,71 @@ +grafeas.v1.Version.VersionKind + */ +class VersionKind +{ + /** + * Unknown. + * + * Generated from protobuf enum VERSION_KIND_UNSPECIFIED = 0; + */ + const VERSION_KIND_UNSPECIFIED = 0; + /** + * A standard package version. + * + * Generated from protobuf enum NORMAL = 1; + */ + const NORMAL = 1; + /** + * A special version representing negative infinity. + * + * Generated from protobuf enum MINIMUM = 2; + */ + const MINIMUM = 2; + /** + * A special version representing positive infinity. + * + * Generated from protobuf enum MAXIMUM = 3; + */ + const MAXIMUM = 3; + + private static $valueToName = [ + self::VERSION_KIND_UNSPECIFIED => 'VERSION_KIND_UNSPECIFIED', + self::NORMAL => 'NORMAL', + self::MINIMUM => 'MINIMUM', + self::MAXIMUM => 'MAXIMUM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VersionKind::class, \Grafeas\V1\Version_VersionKind::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version_VersionKind.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version_VersionKind.php new file mode 100644 index 000000000000..681173bb0c70 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version_VersionKind.php @@ -0,0 +1,16 @@ +grafeas.v1.VulnerabilityNote + */ +class VulnerabilityNote extends \Google\Protobuf\Internal\Message +{ + /** + * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 + * where 0 indicates low severity and 10 indicates high severity. + * + * Generated from protobuf field float cvss_score = 1; + */ + protected $cvss_score = 0.0; + /** + * The note provider assigned severity of this vulnerability. + * + * Generated from protobuf field .grafeas.v1.Severity severity = 2; + */ + protected $severity = 0; + /** + * Details of all known distros and packages affected by this vulnerability. + * + * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + */ + private $details; + /** + * The full description of the CVSSv3 for this vulnerability. + * + * Generated from protobuf field .grafeas.v1.CVSSv3 cvss_v3 = 4; + */ + protected $cvss_v3 = null; + /** + * Windows details get their own format because the information format and + * model don't match a normal detail. Specifically Windows updates are done as + * patches, thus Windows vulnerabilities really are a missing package, rather + * than a package being at an incorrect version. + * + * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + */ + private $windows_details; + /** + * The time this information was last changed at the source. This is an + * upstream timestamp from the underlying information source - e.g. Ubuntu + * security tracker. + * + * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 6; + */ + protected $source_update_time = null; + /** + * CVSS version used to populate cvss_score and severity. + * + * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 7; + */ + protected $cvss_version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $cvss_score + * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 + * where 0 indicates low severity and 10 indicates high severity. + * @type int $severity + * The note provider assigned severity of this vulnerability. + * @type array<\Grafeas\V1\VulnerabilityNote\Detail>|\Google\Protobuf\Internal\RepeatedField $details + * Details of all known distros and packages affected by this vulnerability. + * @type \Grafeas\V1\CVSSv3 $cvss_v3 + * The full description of the CVSSv3 for this vulnerability. + * @type array<\Grafeas\V1\VulnerabilityNote\WindowsDetail>|\Google\Protobuf\Internal\RepeatedField $windows_details + * Windows details get their own format because the information format and + * model don't match a normal detail. Specifically Windows updates are done as + * patches, thus Windows vulnerabilities really are a missing package, rather + * than a package being at an incorrect version. + * @type \Google\Protobuf\Timestamp $source_update_time + * The time this information was last changed at the source. This is an + * upstream timestamp from the underlying information source - e.g. Ubuntu + * security tracker. + * @type int $cvss_version + * CVSS version used to populate cvss_score and severity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 + * where 0 indicates low severity and 10 indicates high severity. + * + * Generated from protobuf field float cvss_score = 1; + * @return float + */ + public function getCvssScore() + { + return $this->cvss_score; + } + + /** + * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 + * where 0 indicates low severity and 10 indicates high severity. + * + * Generated from protobuf field float cvss_score = 1; + * @param float $var + * @return $this + */ + public function setCvssScore($var) + { + GPBUtil::checkFloat($var); + $this->cvss_score = $var; + + return $this; + } + + /** + * The note provider assigned severity of this vulnerability. + * + * Generated from protobuf field .grafeas.v1.Severity severity = 2; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * The note provider assigned severity of this vulnerability. + * + * Generated from protobuf field .grafeas.v1.Severity severity = 2; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * Details of all known distros and packages affected by this vulnerability. + * + * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDetails() + { + return $this->details; + } + + /** + * Details of all known distros and packages affected by this vulnerability. + * + * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; + * @param array<\Grafeas\V1\VulnerabilityNote\Detail>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\VulnerabilityNote\Detail::class); + $this->details = $arr; + + return $this; + } + + /** + * The full description of the CVSSv3 for this vulnerability. + * + * Generated from protobuf field .grafeas.v1.CVSSv3 cvss_v3 = 4; + * @return \Grafeas\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. + * + * Generated from protobuf field .grafeas.v1.CVSSv3 cvss_v3 = 4; + * @param \Grafeas\V1\CVSSv3 $var + * @return $this + */ + public function setCvssV3($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\CVSSv3::class); + $this->cvss_v3 = $var; + + return $this; + } + + /** + * Windows details get their own format because the information format and + * model don't match a normal detail. Specifically Windows updates are done as + * patches, thus Windows vulnerabilities really are a missing package, rather + * than a package being at an incorrect version. + * + * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWindowsDetails() + { + return $this->windows_details; + } + + /** + * Windows details get their own format because the information format and + * model don't match a normal detail. Specifically Windows updates are done as + * patches, thus Windows vulnerabilities really are a missing package, rather + * than a package being at an incorrect version. + * + * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; + * @param array<\Grafeas\V1\VulnerabilityNote\WindowsDetail>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWindowsDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\VulnerabilityNote\WindowsDetail::class); + $this->windows_details = $arr; + + return $this; + } + + /** + * The time this information was last changed at the source. This is an + * upstream timestamp from the underlying information source - e.g. Ubuntu + * security tracker. + * + * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSourceUpdateTime() + { + return $this->source_update_time; + } + + public function hasSourceUpdateTime() + { + return isset($this->source_update_time); + } + + public function clearSourceUpdateTime() + { + unset($this->source_update_time); + } + + /** + * The time this information was last changed at the source. This is an + * upstream timestamp from the underlying information source - e.g. Ubuntu + * security tracker. + * + * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSourceUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->source_update_time = $var; + + return $this; + } + + /** + * CVSS version used to populate cvss_score and severity. + * + * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 7; + * @return int + */ + public function getCvssVersion() + { + return $this->cvss_version; + } + + /** + * CVSS version used to populate cvss_score and severity. + * + * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 7; + * @param int $var + * @return $this + */ + public function setCvssVersion($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSSVersion::class); + $this->cvss_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/Detail.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/Detail.php new file mode 100644 index 000000000000..8bd53ea558d3 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/Detail.php @@ -0,0 +1,645 @@ +grafeas.v1.VulnerabilityNote.Detail + */ +class Detail extends \Google\Protobuf\Internal\Message +{ + /** + * The distro assigned severity of this vulnerability. + * + * Generated from protobuf field string severity_name = 1; + */ + protected $severity_name = ''; + /** + * A vendor-specific description of this vulnerability. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * The type of package; whether native or non native (e.g., ruby gems, + * node.js packages, etc.). + * + * Generated from protobuf field string package_type = 3; + */ + protected $package_type = ''; + /** + * Required. The [CPE URI](https://cpe.mitre.org/specification/) this + * vulnerability affects. + * + * Generated from protobuf field string affected_cpe_uri = 4; + */ + protected $affected_cpe_uri = ''; + /** + * Required. The package this vulnerability affects. + * + * Generated from protobuf field string affected_package = 5; + */ + protected $affected_package = ''; + /** + * The version number at the start of an interval in which this + * vulnerability exists. A vulnerability can affect a package between + * version numbers that are disjoint sets of intervals (example: + * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be + * represented in its own Detail. If a specific affected version is provided + * by a vulnerability database, affected_version_start and + * affected_version_end will be the same in that Detail. + * + * Generated from protobuf field .grafeas.v1.Version affected_version_start = 6; + */ + protected $affected_version_start = null; + /** + * The version number at the end of an interval in which this vulnerability + * exists. A vulnerability can affect a package between version numbers + * that are disjoint sets of intervals (example: [1.0.0-1.1.0], + * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its + * own Detail. If a specific affected version is provided by a vulnerability + * database, affected_version_start and affected_version_end will be the + * same in that Detail. + * + * Generated from protobuf field .grafeas.v1.Version affected_version_end = 7; + */ + protected $affected_version_end = null; + /** + * The distro recommended [CPE URI](https://cpe.mitre.org/specification/) + * to update to that contains a fix for this vulnerability. It is possible + * for this to be different from the affected_cpe_uri. + * + * Generated from protobuf field string fixed_cpe_uri = 8; + */ + protected $fixed_cpe_uri = ''; + /** + * The distro recommended package to update to that contains a fix for this + * vulnerability. It is possible for this to be different from the + * affected_package. + * + * Generated from protobuf field string fixed_package = 9; + */ + protected $fixed_package = ''; + /** + * The distro recommended version to update to that contains a + * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no + * such version is yet available. + * + * Generated from protobuf field .grafeas.v1.Version fixed_version = 10; + */ + protected $fixed_version = null; + /** + * Whether this detail is obsolete. Occurrences are expected not to point to + * obsolete details. + * + * Generated from protobuf field bool is_obsolete = 11; + */ + protected $is_obsolete = false; + /** + * The time this information was last changed at the source. This is an + * upstream timestamp from the underlying information source - e.g. Ubuntu + * security tracker. + * + * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 12; + */ + protected $source_update_time = null; + /** + * The source from which the information in this Detail was obtained. + * + * Generated from protobuf field string source = 13; + */ + protected $source = ''; + /** + * The name of the vendor of the product. + * + * Generated from protobuf field string vendor = 14; + */ + protected $vendor = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $severity_name + * The distro assigned severity of this vulnerability. + * @type string $description + * A vendor-specific description of this vulnerability. + * @type string $package_type + * The type of package; whether native or non native (e.g., ruby gems, + * node.js packages, etc.). + * @type string $affected_cpe_uri + * Required. The [CPE URI](https://cpe.mitre.org/specification/) this + * vulnerability affects. + * @type string $affected_package + * Required. The package this vulnerability affects. + * @type \Grafeas\V1\Version $affected_version_start + * The version number at the start of an interval in which this + * vulnerability exists. A vulnerability can affect a package between + * version numbers that are disjoint sets of intervals (example: + * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be + * represented in its own Detail. If a specific affected version is provided + * by a vulnerability database, affected_version_start and + * affected_version_end will be the same in that Detail. + * @type \Grafeas\V1\Version $affected_version_end + * The version number at the end of an interval in which this vulnerability + * exists. A vulnerability can affect a package between version numbers + * that are disjoint sets of intervals (example: [1.0.0-1.1.0], + * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its + * own Detail. If a specific affected version is provided by a vulnerability + * database, affected_version_start and affected_version_end will be the + * same in that Detail. + * @type string $fixed_cpe_uri + * The distro recommended [CPE URI](https://cpe.mitre.org/specification/) + * to update to that contains a fix for this vulnerability. It is possible + * for this to be different from the affected_cpe_uri. + * @type string $fixed_package + * The distro recommended package to update to that contains a fix for this + * vulnerability. It is possible for this to be different from the + * affected_package. + * @type \Grafeas\V1\Version $fixed_version + * The distro recommended version to update to that contains a + * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no + * such version is yet available. + * @type bool $is_obsolete + * Whether this detail is obsolete. Occurrences are expected not to point to + * obsolete details. + * @type \Google\Protobuf\Timestamp $source_update_time + * The time this information was last changed at the source. This is an + * upstream timestamp from the underlying information source - e.g. Ubuntu + * security tracker. + * @type string $source + * The source from which the information in this Detail was obtained. + * @type string $vendor + * The name of the vendor of the product. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * The distro assigned severity of this vulnerability. + * + * Generated from protobuf field string severity_name = 1; + * @return string + */ + public function getSeverityName() + { + return $this->severity_name; + } + + /** + * The distro assigned severity of this vulnerability. + * + * Generated from protobuf field string severity_name = 1; + * @param string $var + * @return $this + */ + public function setSeverityName($var) + { + GPBUtil::checkString($var, True); + $this->severity_name = $var; + + return $this; + } + + /** + * A vendor-specific description of this vulnerability. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A vendor-specific description of this vulnerability. + * + * 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 type of package; whether native or non native (e.g., ruby gems, + * node.js packages, etc.). + * + * Generated from protobuf field string package_type = 3; + * @return string + */ + public function getPackageType() + { + return $this->package_type; + } + + /** + * The type of package; whether native or non native (e.g., ruby gems, + * node.js packages, etc.). + * + * Generated from protobuf field string package_type = 3; + * @param string $var + * @return $this + */ + public function setPackageType($var) + { + GPBUtil::checkString($var, True); + $this->package_type = $var; + + return $this; + } + + /** + * Required. The [CPE URI](https://cpe.mitre.org/specification/) this + * vulnerability affects. + * + * Generated from protobuf field string affected_cpe_uri = 4; + * @return string + */ + public function getAffectedCpeUri() + { + return $this->affected_cpe_uri; + } + + /** + * Required. The [CPE URI](https://cpe.mitre.org/specification/) this + * vulnerability affects. + * + * Generated from protobuf field string affected_cpe_uri = 4; + * @param string $var + * @return $this + */ + public function setAffectedCpeUri($var) + { + GPBUtil::checkString($var, True); + $this->affected_cpe_uri = $var; + + return $this; + } + + /** + * Required. The package this vulnerability affects. + * + * Generated from protobuf field string affected_package = 5; + * @return string + */ + public function getAffectedPackage() + { + return $this->affected_package; + } + + /** + * Required. The package this vulnerability affects. + * + * Generated from protobuf field string affected_package = 5; + * @param string $var + * @return $this + */ + public function setAffectedPackage($var) + { + GPBUtil::checkString($var, True); + $this->affected_package = $var; + + return $this; + } + + /** + * The version number at the start of an interval in which this + * vulnerability exists. A vulnerability can affect a package between + * version numbers that are disjoint sets of intervals (example: + * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be + * represented in its own Detail. If a specific affected version is provided + * by a vulnerability database, affected_version_start and + * affected_version_end will be the same in that Detail. + * + * Generated from protobuf field .grafeas.v1.Version affected_version_start = 6; + * @return \Grafeas\V1\Version|null + */ + public function getAffectedVersionStart() + { + return $this->affected_version_start; + } + + public function hasAffectedVersionStart() + { + return isset($this->affected_version_start); + } + + public function clearAffectedVersionStart() + { + unset($this->affected_version_start); + } + + /** + * The version number at the start of an interval in which this + * vulnerability exists. A vulnerability can affect a package between + * version numbers that are disjoint sets of intervals (example: + * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be + * represented in its own Detail. If a specific affected version is provided + * by a vulnerability database, affected_version_start and + * affected_version_end will be the same in that Detail. + * + * Generated from protobuf field .grafeas.v1.Version affected_version_start = 6; + * @param \Grafeas\V1\Version $var + * @return $this + */ + public function setAffectedVersionStart($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); + $this->affected_version_start = $var; + + return $this; + } + + /** + * The version number at the end of an interval in which this vulnerability + * exists. A vulnerability can affect a package between version numbers + * that are disjoint sets of intervals (example: [1.0.0-1.1.0], + * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its + * own Detail. If a specific affected version is provided by a vulnerability + * database, affected_version_start and affected_version_end will be the + * same in that Detail. + * + * Generated from protobuf field .grafeas.v1.Version affected_version_end = 7; + * @return \Grafeas\V1\Version|null + */ + public function getAffectedVersionEnd() + { + return $this->affected_version_end; + } + + public function hasAffectedVersionEnd() + { + return isset($this->affected_version_end); + } + + public function clearAffectedVersionEnd() + { + unset($this->affected_version_end); + } + + /** + * The version number at the end of an interval in which this vulnerability + * exists. A vulnerability can affect a package between version numbers + * that are disjoint sets of intervals (example: [1.0.0-1.1.0], + * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its + * own Detail. If a specific affected version is provided by a vulnerability + * database, affected_version_start and affected_version_end will be the + * same in that Detail. + * + * Generated from protobuf field .grafeas.v1.Version affected_version_end = 7; + * @param \Grafeas\V1\Version $var + * @return $this + */ + public function setAffectedVersionEnd($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); + $this->affected_version_end = $var; + + return $this; + } + + /** + * The distro recommended [CPE URI](https://cpe.mitre.org/specification/) + * to update to that contains a fix for this vulnerability. It is possible + * for this to be different from the affected_cpe_uri. + * + * Generated from protobuf field string fixed_cpe_uri = 8; + * @return string + */ + public function getFixedCpeUri() + { + return $this->fixed_cpe_uri; + } + + /** + * The distro recommended [CPE URI](https://cpe.mitre.org/specification/) + * to update to that contains a fix for this vulnerability. It is possible + * for this to be different from the affected_cpe_uri. + * + * Generated from protobuf field string fixed_cpe_uri = 8; + * @param string $var + * @return $this + */ + public function setFixedCpeUri($var) + { + GPBUtil::checkString($var, True); + $this->fixed_cpe_uri = $var; + + return $this; + } + + /** + * The distro recommended package to update to that contains a fix for this + * vulnerability. It is possible for this to be different from the + * affected_package. + * + * Generated from protobuf field string fixed_package = 9; + * @return string + */ + public function getFixedPackage() + { + return $this->fixed_package; + } + + /** + * The distro recommended package to update to that contains a fix for this + * vulnerability. It is possible for this to be different from the + * affected_package. + * + * Generated from protobuf field string fixed_package = 9; + * @param string $var + * @return $this + */ + public function setFixedPackage($var) + { + GPBUtil::checkString($var, True); + $this->fixed_package = $var; + + return $this; + } + + /** + * The distro recommended version to update to that contains a + * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no + * such version is yet available. + * + * Generated from protobuf field .grafeas.v1.Version fixed_version = 10; + * @return \Grafeas\V1\Version|null + */ + public function getFixedVersion() + { + return $this->fixed_version; + } + + public function hasFixedVersion() + { + return isset($this->fixed_version); + } + + public function clearFixedVersion() + { + unset($this->fixed_version); + } + + /** + * The distro recommended version to update to that contains a + * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no + * such version is yet available. + * + * Generated from protobuf field .grafeas.v1.Version fixed_version = 10; + * @param \Grafeas\V1\Version $var + * @return $this + */ + public function setFixedVersion($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); + $this->fixed_version = $var; + + return $this; + } + + /** + * Whether this detail is obsolete. Occurrences are expected not to point to + * obsolete details. + * + * Generated from protobuf field bool is_obsolete = 11; + * @return bool + */ + public function getIsObsolete() + { + return $this->is_obsolete; + } + + /** + * Whether this detail is obsolete. Occurrences are expected not to point to + * obsolete details. + * + * Generated from protobuf field bool is_obsolete = 11; + * @param bool $var + * @return $this + */ + public function setIsObsolete($var) + { + GPBUtil::checkBool($var); + $this->is_obsolete = $var; + + return $this; + } + + /** + * The time this information was last changed at the source. This is an + * upstream timestamp from the underlying information source - e.g. Ubuntu + * security tracker. + * + * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 12; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSourceUpdateTime() + { + return $this->source_update_time; + } + + public function hasSourceUpdateTime() + { + return isset($this->source_update_time); + } + + public function clearSourceUpdateTime() + { + unset($this->source_update_time); + } + + /** + * The time this information was last changed at the source. This is an + * upstream timestamp from the underlying information source - e.g. Ubuntu + * security tracker. + * + * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 12; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSourceUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->source_update_time = $var; + + return $this; + } + + /** + * The source from which the information in this Detail was obtained. + * + * Generated from protobuf field string source = 13; + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * The source from which the information in this Detail was obtained. + * + * Generated from protobuf field string source = 13; + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + + /** + * The name of the vendor of the product. + * + * Generated from protobuf field string vendor = 14; + * @return string + */ + public function getVendor() + { + return $this->vendor; + } + + /** + * The name of the vendor of the product. + * + * Generated from protobuf field string vendor = 14; + * @param string $var + * @return $this + */ + public function setVendor($var) + { + GPBUtil::checkString($var, True); + $this->vendor = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Detail::class, \Grafeas\V1\VulnerabilityNote_Detail::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail.php new file mode 100644 index 000000000000..e20cc151c87d --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail.php @@ -0,0 +1,186 @@ +grafeas.v1.VulnerabilityNote.WindowsDetail + */ +class WindowsDetail extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [CPE URI](https://cpe.mitre.org/specification/) this + * vulnerability affects. + * + * Generated from protobuf field string cpe_uri = 1; + */ + protected $cpe_uri = ''; + /** + * Required. The name of this vulnerability. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * The description of this vulnerability. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Required. The names of the KBs which have hotfixes to mitigate this + * vulnerability. Note that there may be multiple hotfixes (and thus + * multiple KBs) that mitigate a given vulnerability. Currently any listed + * KBs presence is considered a fix. + * + * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + */ + private $fixing_kbs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cpe_uri + * Required. The [CPE URI](https://cpe.mitre.org/specification/) this + * vulnerability affects. + * @type string $name + * Required. The name of this vulnerability. + * @type string $description + * The description of this vulnerability. + * @type array<\Grafeas\V1\VulnerabilityNote\WindowsDetail\KnowledgeBase>|\Google\Protobuf\Internal\RepeatedField $fixing_kbs + * Required. The names of the KBs which have hotfixes to mitigate this + * vulnerability. Note that there may be multiple hotfixes (and thus + * multiple KBs) that mitigate a given vulnerability. Currently any listed + * KBs presence is considered a fix. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [CPE URI](https://cpe.mitre.org/specification/) this + * vulnerability affects. + * + * Generated from protobuf field string cpe_uri = 1; + * @return string + */ + public function getCpeUri() + { + return $this->cpe_uri; + } + + /** + * Required. The [CPE URI](https://cpe.mitre.org/specification/) this + * vulnerability affects. + * + * Generated from protobuf field string cpe_uri = 1; + * @param string $var + * @return $this + */ + public function setCpeUri($var) + { + GPBUtil::checkString($var, True); + $this->cpe_uri = $var; + + return $this; + } + + /** + * Required. The name of this vulnerability. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of this vulnerability. + * + * 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; + } + + /** + * The description of this vulnerability. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of this vulnerability. + * + * 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. The names of the KBs which have hotfixes to mitigate this + * vulnerability. Note that there may be multiple hotfixes (and thus + * multiple KBs) that mitigate a given vulnerability. Currently any listed + * KBs presence is considered a fix. + * + * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFixingKbs() + { + return $this->fixing_kbs; + } + + /** + * Required. The names of the KBs which have hotfixes to mitigate this + * vulnerability. Note that there may be multiple hotfixes (and thus + * multiple KBs) that mitigate a given vulnerability. Currently any listed + * KBs presence is considered a fix. + * + * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; + * @param array<\Grafeas\V1\VulnerabilityNote\WindowsDetail\KnowledgeBase>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFixingKbs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\VulnerabilityNote\WindowsDetail\KnowledgeBase::class); + $this->fixing_kbs = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WindowsDetail::class, \Grafeas\V1\VulnerabilityNote_WindowsDetail::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail/KnowledgeBase.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail/KnowledgeBase.php new file mode 100644 index 000000000000..26ec0c58b2f6 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail/KnowledgeBase.php @@ -0,0 +1,106 @@ +grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase + */ +class KnowledgeBase extends \Google\Protobuf\Internal\Message +{ + /** + * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * A link to the KB in the [Windows update catalog] + * (https://www.catalog.update.microsoft.com/). + * + * Generated from protobuf field string url = 2; + */ + protected $url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). + * @type string $url + * A link to the KB in the [Windows update catalog] + * (https://www.catalog.update.microsoft.com/). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). + * + * 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 link to the KB in the [Windows update catalog] + * (https://www.catalog.update.microsoft.com/). + * + * Generated from protobuf field string url = 2; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * A link to the KB in the [Windows update catalog] + * (https://www.catalog.update.microsoft.com/). + * + * 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(KnowledgeBase::class, \Grafeas\V1\VulnerabilityNote_WindowsDetail_KnowledgeBase::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote_Detail.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote_Detail.php new file mode 100644 index 000000000000..3406384a9d4f --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote_Detail.php @@ -0,0 +1,16 @@ +grafeas.v1.VulnerabilityOccurrence + */ +class VulnerabilityOccurrence extends \Google\Protobuf\Internal\Message +{ + /** + * The type of package; whether native or non native (e.g., ruby gems, node.js + * packages, etc.). + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * Output only. The note provider assigned severity of this vulnerability. + * + * Generated from protobuf field .grafeas.v1.Severity severity = 2; + */ + protected $severity = 0; + /** + * Output only. The CVSS score of this vulnerability. CVSS score is on a + * scale of 0 - 10 where 0 indicates low severity and 10 indicates high + * severity. + * + * Generated from protobuf field float cvss_score = 3; + */ + protected $cvss_score = 0.0; + /** + * The cvss v3 score for the vulnerability. + * + * Generated from protobuf field .grafeas.v1.CVSS cvssv3 = 10; + */ + protected $cvssv3 = null; + /** + * Required. The set of affected locations and their fixes (if available) + * within the associated resource. + * + * Generated from protobuf field repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + */ + private $package_issue; + /** + * Output only. A one sentence description of this vulnerability. + * + * Generated from protobuf field string short_description = 5; + */ + protected $short_description = ''; + /** + * Output only. A detailed description of this vulnerability. + * + * Generated from protobuf field string long_description = 6; + */ + protected $long_description = ''; + /** + * Output only. URLs related to this vulnerability. + * + * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_urls = 7; + */ + private $related_urls; + /** + * The distro assigned severity for this vulnerability when it is available, + * otherwise this is the note provider assigned severity. + * When there are multiple PackageIssues for this vulnerability, they can have + * different effective severities because some might be provided by the distro + * while others are provided by the language ecosystem for a language pack. + * For this reason, it is advised to use the effective severity on the + * PackageIssue level. In the case where multiple PackageIssues have differing + * effective severities, this field should be the highest severity for any of + * the PackageIssues. + * + * Generated from protobuf field .grafeas.v1.Severity effective_severity = 8; + */ + protected $effective_severity = 0; + /** + * Output only. Whether at least one of the affected packages has a fix + * available. + * + * Generated from protobuf field bool fix_available = 9; + */ + protected $fix_available = false; + /** + * Output only. CVSS version used to populate cvss_score and severity. + * + * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 11; + */ + protected $cvss_version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * The type of package; whether native or non native (e.g., ruby gems, node.js + * packages, etc.). + * @type int $severity + * Output only. The note provider assigned severity of this vulnerability. + * @type float $cvss_score + * Output only. The CVSS score of this vulnerability. CVSS score is on a + * scale of 0 - 10 where 0 indicates low severity and 10 indicates high + * severity. + * @type \Grafeas\V1\CVSS $cvssv3 + * The cvss v3 score for the vulnerability. + * @type array<\Grafeas\V1\VulnerabilityOccurrence\PackageIssue>|\Google\Protobuf\Internal\RepeatedField $package_issue + * Required. The set of affected locations and their fixes (if available) + * within the associated resource. + * @type string $short_description + * Output only. A one sentence description of this vulnerability. + * @type string $long_description + * Output only. A detailed description of this vulnerability. + * @type array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $related_urls + * Output only. URLs related to this vulnerability. + * @type int $effective_severity + * The distro assigned severity for this vulnerability when it is available, + * otherwise this is the note provider assigned severity. + * When there are multiple PackageIssues for this vulnerability, they can have + * different effective severities because some might be provided by the distro + * while others are provided by the language ecosystem for a language pack. + * For this reason, it is advised to use the effective severity on the + * PackageIssue level. In the case where multiple PackageIssues have differing + * effective severities, this field should be the highest severity for any of + * the PackageIssues. + * @type bool $fix_available + * Output only. Whether at least one of the affected packages has a fix + * available. + * @type int $cvss_version + * Output only. CVSS version used to populate cvss_score and severity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * The type of package; whether native or non native (e.g., ruby gems, node.js + * packages, etc.). + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The type of package; whether native or non native (e.g., ruby gems, node.js + * packages, etc.). + * + * 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; + } + + /** + * Output only. The note provider assigned severity of this vulnerability. + * + * Generated from protobuf field .grafeas.v1.Severity severity = 2; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Output only. The note provider assigned severity of this vulnerability. + * + * Generated from protobuf field .grafeas.v1.Severity severity = 2; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * Output only. The CVSS score of this vulnerability. CVSS score is on a + * scale of 0 - 10 where 0 indicates low severity and 10 indicates high + * severity. + * + * Generated from protobuf field float cvss_score = 3; + * @return float + */ + public function getCvssScore() + { + return $this->cvss_score; + } + + /** + * Output only. The CVSS score of this vulnerability. CVSS score is on a + * scale of 0 - 10 where 0 indicates low severity and 10 indicates high + * severity. + * + * Generated from protobuf field float cvss_score = 3; + * @param float $var + * @return $this + */ + public function setCvssScore($var) + { + GPBUtil::checkFloat($var); + $this->cvss_score = $var; + + return $this; + } + + /** + * The cvss v3 score for the vulnerability. + * + * Generated from protobuf field .grafeas.v1.CVSS cvssv3 = 10; + * @return \Grafeas\V1\CVSS|null + */ + public function getCvssv3() + { + return $this->cvssv3; + } + + public function hasCvssv3() + { + return isset($this->cvssv3); + } + + public function clearCvssv3() + { + unset($this->cvssv3); + } + + /** + * The cvss v3 score for the vulnerability. + * + * Generated from protobuf field .grafeas.v1.CVSS cvssv3 = 10; + * @param \Grafeas\V1\CVSS $var + * @return $this + */ + public function setCvssv3($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\CVSS::class); + $this->cvssv3 = $var; + + return $this; + } + + /** + * Required. The set of affected locations and their fixes (if available) + * within the associated resource. + * + * Generated from protobuf field repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPackageIssue() + { + return $this->package_issue; + } + + /** + * Required. The set of affected locations and their fixes (if available) + * within the associated resource. + * + * Generated from protobuf field repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; + * @param array<\Grafeas\V1\VulnerabilityOccurrence\PackageIssue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPackageIssue($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\VulnerabilityOccurrence\PackageIssue::class); + $this->package_issue = $arr; + + return $this; + } + + /** + * Output only. A one sentence description of this vulnerability. + * + * Generated from protobuf field string short_description = 5; + * @return string + */ + public function getShortDescription() + { + return $this->short_description; + } + + /** + * Output only. A one sentence description of this vulnerability. + * + * Generated from protobuf field string short_description = 5; + * @param string $var + * @return $this + */ + public function setShortDescription($var) + { + GPBUtil::checkString($var, True); + $this->short_description = $var; + + return $this; + } + + /** + * Output only. A detailed description of this vulnerability. + * + * Generated from protobuf field string long_description = 6; + * @return string + */ + public function getLongDescription() + { + return $this->long_description; + } + + /** + * Output only. A detailed description of this vulnerability. + * + * Generated from protobuf field string long_description = 6; + * @param string $var + * @return $this + */ + public function setLongDescription($var) + { + GPBUtil::checkString($var, True); + $this->long_description = $var; + + return $this; + } + + /** + * Output only. URLs related to this vulnerability. + * + * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_urls = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRelatedUrls() + { + return $this->related_urls; + } + + /** + * Output only. URLs related to this vulnerability. + * + * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_urls = 7; + * @param array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRelatedUrls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\RelatedUrl::class); + $this->related_urls = $arr; + + return $this; + } + + /** + * The distro assigned severity for this vulnerability when it is available, + * otherwise this is the note provider assigned severity. + * When there are multiple PackageIssues for this vulnerability, they can have + * different effective severities because some might be provided by the distro + * while others are provided by the language ecosystem for a language pack. + * For this reason, it is advised to use the effective severity on the + * PackageIssue level. In the case where multiple PackageIssues have differing + * effective severities, this field should be the highest severity for any of + * the PackageIssues. + * + * Generated from protobuf field .grafeas.v1.Severity effective_severity = 8; + * @return int + */ + public function getEffectiveSeverity() + { + return $this->effective_severity; + } + + /** + * The distro assigned severity for this vulnerability when it is available, + * otherwise this is the note provider assigned severity. + * When there are multiple PackageIssues for this vulnerability, they can have + * different effective severities because some might be provided by the distro + * while others are provided by the language ecosystem for a language pack. + * For this reason, it is advised to use the effective severity on the + * PackageIssue level. In the case where multiple PackageIssues have differing + * effective severities, this field should be the highest severity for any of + * the PackageIssues. + * + * Generated from protobuf field .grafeas.v1.Severity effective_severity = 8; + * @param int $var + * @return $this + */ + public function setEffectiveSeverity($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class); + $this->effective_severity = $var; + + return $this; + } + + /** + * Output only. Whether at least one of the affected packages has a fix + * available. + * + * Generated from protobuf field bool fix_available = 9; + * @return bool + */ + public function getFixAvailable() + { + return $this->fix_available; + } + + /** + * Output only. Whether at least one of the affected packages has a fix + * available. + * + * Generated from protobuf field bool fix_available = 9; + * @param bool $var + * @return $this + */ + public function setFixAvailable($var) + { + GPBUtil::checkBool($var); + $this->fix_available = $var; + + return $this; + } + + /** + * Output only. CVSS version used to populate cvss_score and severity. + * + * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 11; + * @return int + */ + public function getCvssVersion() + { + return $this->cvss_version; + } + + /** + * Output only. CVSS version used to populate cvss_score and severity. + * + * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 11; + * @param int $var + * @return $this + */ + public function setCvssVersion($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\CVSSVersion::class); + $this->cvss_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence/PackageIssue.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence/PackageIssue.php new file mode 100644 index 000000000000..50eb18f7d2f5 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence/PackageIssue.php @@ -0,0 +1,429 @@ +grafeas.v1.VulnerabilityOccurrence.PackageIssue + */ +class PackageIssue extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [CPE URI](https://cpe.mitre.org/specification/) this + * vulnerability was found in. + * + * Generated from protobuf field string affected_cpe_uri = 1; + */ + protected $affected_cpe_uri = ''; + /** + * Required. The package this vulnerability was found in. + * + * Generated from protobuf field string affected_package = 2; + */ + protected $affected_package = ''; + /** + * Required. The version of the package that is installed on the resource + * affected by this vulnerability. + * + * Generated from protobuf field .grafeas.v1.Version affected_version = 3; + */ + protected $affected_version = null; + /** + * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability + * was fixed in. It is possible for this to be different from the + * affected_cpe_uri. + * + * Generated from protobuf field string fixed_cpe_uri = 4; + */ + protected $fixed_cpe_uri = ''; + /** + * The package this vulnerability was fixed in. It is possible for this to + * be different from the affected_package. + * + * Generated from protobuf field string fixed_package = 5; + */ + protected $fixed_package = ''; + /** + * Required. The version of the package this vulnerability was fixed in. + * Setting this to VersionKind.MAXIMUM means no fix is yet available. + * + * Generated from protobuf field .grafeas.v1.Version fixed_version = 6; + */ + protected $fixed_version = null; + /** + * Output only. Whether a fix is available for this package. + * + * Generated from protobuf field bool fix_available = 7; + */ + protected $fix_available = false; + /** + * The type of package (e.g. OS, MAVEN, GO). + * + * Generated from protobuf field string package_type = 8; + */ + protected $package_type = ''; + /** + * The distro or language system assigned severity for this vulnerability + * when that is available and note provider assigned severity when it is not + * available. + * + * Generated from protobuf field .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $effective_severity = 0; + /** + * The location at which this package was found. + * + * Generated from protobuf field repeated .grafeas.v1.FileLocation file_location = 10; + */ + private $file_location; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $affected_cpe_uri + * Required. The [CPE URI](https://cpe.mitre.org/specification/) this + * vulnerability was found in. + * @type string $affected_package + * Required. The package this vulnerability was found in. + * @type \Grafeas\V1\Version $affected_version + * Required. The version of the package that is installed on the resource + * affected by this vulnerability. + * @type string $fixed_cpe_uri + * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability + * was fixed in. It is possible for this to be different from the + * affected_cpe_uri. + * @type string $fixed_package + * The package this vulnerability was fixed in. It is possible for this to + * be different from the affected_package. + * @type \Grafeas\V1\Version $fixed_version + * Required. The version of the package this vulnerability was fixed in. + * Setting this to VersionKind.MAXIMUM means no fix is yet available. + * @type bool $fix_available + * Output only. Whether a fix is available for this package. + * @type string $package_type + * The type of package (e.g. OS, MAVEN, GO). + * @type int $effective_severity + * The distro or language system assigned severity for this vulnerability + * when that is available and note provider assigned severity when it is not + * available. + * @type array<\Grafeas\V1\FileLocation>|\Google\Protobuf\Internal\RepeatedField $file_location + * The location at which this package was found. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [CPE URI](https://cpe.mitre.org/specification/) this + * vulnerability was found in. + * + * Generated from protobuf field string affected_cpe_uri = 1; + * @return string + */ + public function getAffectedCpeUri() + { + return $this->affected_cpe_uri; + } + + /** + * Required. The [CPE URI](https://cpe.mitre.org/specification/) this + * vulnerability was found in. + * + * Generated from protobuf field string affected_cpe_uri = 1; + * @param string $var + * @return $this + */ + public function setAffectedCpeUri($var) + { + GPBUtil::checkString($var, True); + $this->affected_cpe_uri = $var; + + return $this; + } + + /** + * Required. The package this vulnerability was found in. + * + * Generated from protobuf field string affected_package = 2; + * @return string + */ + public function getAffectedPackage() + { + return $this->affected_package; + } + + /** + * Required. The package this vulnerability was found in. + * + * Generated from protobuf field string affected_package = 2; + * @param string $var + * @return $this + */ + public function setAffectedPackage($var) + { + GPBUtil::checkString($var, True); + $this->affected_package = $var; + + return $this; + } + + /** + * Required. The version of the package that is installed on the resource + * affected by this vulnerability. + * + * Generated from protobuf field .grafeas.v1.Version affected_version = 3; + * @return \Grafeas\V1\Version|null + */ + public function getAffectedVersion() + { + return $this->affected_version; + } + + public function hasAffectedVersion() + { + return isset($this->affected_version); + } + + public function clearAffectedVersion() + { + unset($this->affected_version); + } + + /** + * Required. The version of the package that is installed on the resource + * affected by this vulnerability. + * + * Generated from protobuf field .grafeas.v1.Version affected_version = 3; + * @param \Grafeas\V1\Version $var + * @return $this + */ + public function setAffectedVersion($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); + $this->affected_version = $var; + + return $this; + } + + /** + * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability + * was fixed in. It is possible for this to be different from the + * affected_cpe_uri. + * + * Generated from protobuf field string fixed_cpe_uri = 4; + * @return string + */ + public function getFixedCpeUri() + { + return $this->fixed_cpe_uri; + } + + /** + * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability + * was fixed in. It is possible for this to be different from the + * affected_cpe_uri. + * + * Generated from protobuf field string fixed_cpe_uri = 4; + * @param string $var + * @return $this + */ + public function setFixedCpeUri($var) + { + GPBUtil::checkString($var, True); + $this->fixed_cpe_uri = $var; + + return $this; + } + + /** + * The package this vulnerability was fixed in. It is possible for this to + * be different from the affected_package. + * + * Generated from protobuf field string fixed_package = 5; + * @return string + */ + public function getFixedPackage() + { + return $this->fixed_package; + } + + /** + * The package this vulnerability was fixed in. It is possible for this to + * be different from the affected_package. + * + * Generated from protobuf field string fixed_package = 5; + * @param string $var + * @return $this + */ + public function setFixedPackage($var) + { + GPBUtil::checkString($var, True); + $this->fixed_package = $var; + + return $this; + } + + /** + * Required. The version of the package this vulnerability was fixed in. + * Setting this to VersionKind.MAXIMUM means no fix is yet available. + * + * Generated from protobuf field .grafeas.v1.Version fixed_version = 6; + * @return \Grafeas\V1\Version|null + */ + public function getFixedVersion() + { + return $this->fixed_version; + } + + public function hasFixedVersion() + { + return isset($this->fixed_version); + } + + public function clearFixedVersion() + { + unset($this->fixed_version); + } + + /** + * Required. The version of the package this vulnerability was fixed in. + * Setting this to VersionKind.MAXIMUM means no fix is yet available. + * + * Generated from protobuf field .grafeas.v1.Version fixed_version = 6; + * @param \Grafeas\V1\Version $var + * @return $this + */ + public function setFixedVersion($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); + $this->fixed_version = $var; + + return $this; + } + + /** + * Output only. Whether a fix is available for this package. + * + * Generated from protobuf field bool fix_available = 7; + * @return bool + */ + public function getFixAvailable() + { + return $this->fix_available; + } + + /** + * Output only. Whether a fix is available for this package. + * + * Generated from protobuf field bool fix_available = 7; + * @param bool $var + * @return $this + */ + public function setFixAvailable($var) + { + GPBUtil::checkBool($var); + $this->fix_available = $var; + + return $this; + } + + /** + * The type of package (e.g. OS, MAVEN, GO). + * + * Generated from protobuf field string package_type = 8; + * @return string + */ + public function getPackageType() + { + return $this->package_type; + } + + /** + * The type of package (e.g. OS, MAVEN, GO). + * + * Generated from protobuf field string package_type = 8; + * @param string $var + * @return $this + */ + public function setPackageType($var) + { + GPBUtil::checkString($var, True); + $this->package_type = $var; + + return $this; + } + + /** + * The distro or language system assigned severity for this vulnerability + * when that is available and note provider assigned severity when it is not + * available. + * + * Generated from protobuf field .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEffectiveSeverity() + { + return $this->effective_severity; + } + + /** + * The distro or language system assigned severity for this vulnerability + * when that is available and note provider assigned severity when it is not + * available. + * + * Generated from protobuf field .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEffectiveSeverity($var) + { + GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class); + $this->effective_severity = $var; + + return $this; + } + + /** + * The location at which this package was found. + * + * Generated from protobuf field repeated .grafeas.v1.FileLocation file_location = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFileLocation() + { + return $this->file_location; + } + + /** + * The location at which this package was found. + * + * Generated from protobuf field repeated .grafeas.v1.FileLocation file_location = 10; + * @param array<\Grafeas\V1\FileLocation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFileLocation($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\FileLocation::class); + $this->file_location = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PackageIssue::class, \Grafeas\V1\VulnerabilityOccurrence_PackageIssue::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence_PackageIssue.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence_PackageIssue.php new file mode 100644 index 000000000000..cc29d1796f14 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence_PackageIssue.php @@ -0,0 +1,16 @@ +grafeas.v1.WindowsUpdate + */ +class WindowsUpdate extends \Google\Protobuf\Internal\Message +{ + /** + * Required - The unique identifier for the update. + * + * Generated from protobuf field .grafeas.v1.WindowsUpdate.Identity identity = 1; + */ + protected $identity = null; + /** + * The localized title of the update. + * + * Generated from protobuf field string title = 2; + */ + protected $title = ''; + /** + * The localized description of the update. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * The list of categories to which the update belongs. + * + * Generated from protobuf field repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + */ + private $categories; + /** + * The Microsoft Knowledge Base article IDs that are associated with the + * update. + * + * Generated from protobuf field repeated string kb_article_ids = 5; + */ + private $kb_article_ids; + /** + * The hyperlink to the support information for the update. + * + * Generated from protobuf field string support_url = 6; + */ + protected $support_url = ''; + /** + * The last published timestamp of the update. + * + * Generated from protobuf field .google.protobuf.Timestamp last_published_timestamp = 7; + */ + protected $last_published_timestamp = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Grafeas\V1\WindowsUpdate\Identity $identity + * Required - The unique identifier for the update. + * @type string $title + * The localized title of the update. + * @type string $description + * The localized description of the update. + * @type array<\Grafeas\V1\WindowsUpdate\Category>|\Google\Protobuf\Internal\RepeatedField $categories + * The list of categories to which the update belongs. + * @type array|\Google\Protobuf\Internal\RepeatedField $kb_article_ids + * The Microsoft Knowledge Base article IDs that are associated with the + * update. + * @type string $support_url + * The hyperlink to the support information for the update. + * @type \Google\Protobuf\Timestamp $last_published_timestamp + * The last published timestamp of the update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); + parent::__construct($data); + } + + /** + * Required - The unique identifier for the update. + * + * Generated from protobuf field .grafeas.v1.WindowsUpdate.Identity identity = 1; + * @return \Grafeas\V1\WindowsUpdate\Identity|null + */ + public function getIdentity() + { + return $this->identity; + } + + public function hasIdentity() + { + return isset($this->identity); + } + + public function clearIdentity() + { + unset($this->identity); + } + + /** + * Required - The unique identifier for the update. + * + * Generated from protobuf field .grafeas.v1.WindowsUpdate.Identity identity = 1; + * @param \Grafeas\V1\WindowsUpdate\Identity $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkMessage($var, \Grafeas\V1\WindowsUpdate\Identity::class); + $this->identity = $var; + + return $this; + } + + /** + * The localized title of the update. + * + * Generated from protobuf field string title = 2; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * The localized title of the update. + * + * Generated from protobuf field string title = 2; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * The localized description of the update. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The localized description of the update. + * + * 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 list of categories to which the update belongs. + * + * Generated from protobuf field repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCategories() + { + return $this->categories; + } + + /** + * The list of categories to which the update belongs. + * + * Generated from protobuf field repeated .grafeas.v1.WindowsUpdate.Category categories = 4; + * @param array<\Grafeas\V1\WindowsUpdate\Category>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\WindowsUpdate\Category::class); + $this->categories = $arr; + + return $this; + } + + /** + * The Microsoft Knowledge Base article IDs that are associated with the + * update. + * + * Generated from protobuf field repeated string kb_article_ids = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getKbArticleIds() + { + return $this->kb_article_ids; + } + + /** + * The Microsoft Knowledge Base article IDs that are associated with the + * update. + * + * Generated from protobuf field repeated string kb_article_ids = 5; + * @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; + } + + /** + * The hyperlink to the support information for the update. + * + * Generated from protobuf field string support_url = 6; + * @return string + */ + public function getSupportUrl() + { + return $this->support_url; + } + + /** + * The hyperlink to the support information for the update. + * + * Generated from protobuf field string support_url = 6; + * @param string $var + * @return $this + */ + public function setSupportUrl($var) + { + GPBUtil::checkString($var, True); + $this->support_url = $var; + + return $this; + } + + /** + * The last published timestamp of the update. + * + * Generated from protobuf field .google.protobuf.Timestamp last_published_timestamp = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastPublishedTimestamp() + { + return $this->last_published_timestamp; + } + + public function hasLastPublishedTimestamp() + { + return isset($this->last_published_timestamp); + } + + public function clearLastPublishedTimestamp() + { + unset($this->last_published_timestamp); + } + + /** + * The last published timestamp of the update. + * + * Generated from protobuf field .google.protobuf.Timestamp last_published_timestamp = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastPublishedTimestamp($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_published_timestamp = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Category.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Category.php new file mode 100644 index 000000000000..f3fc03d57a42 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Category.php @@ -0,0 +1,104 @@ +grafeas.v1.WindowsUpdate.Category + */ +class Category extends \Google\Protobuf\Internal\Message +{ + /** + * The identifier of the category. + * + * Generated from protobuf field string category_id = 1; + */ + protected $category_id = ''; + /** + * The localized name of the category. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $category_id + * The identifier of the category. + * @type string $name + * The localized name of the category. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); + parent::__construct($data); + } + + /** + * The identifier of the category. + * + * Generated from protobuf field string category_id = 1; + * @return string + */ + public function getCategoryId() + { + return $this->category_id; + } + + /** + * The identifier of the category. + * + * Generated from protobuf field string category_id = 1; + * @param string $var + * @return $this + */ + public function setCategoryId($var) + { + GPBUtil::checkString($var, True); + $this->category_id = $var; + + return $this; + } + + /** + * The localized name of the category. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The localized name of the 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(Category::class, \Grafeas\V1\WindowsUpdate_Category::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Identity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Identity.php new file mode 100644 index 000000000000..8d4340a93fc8 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Identity.php @@ -0,0 +1,104 @@ +grafeas.v1.WindowsUpdate.Identity + */ +class Identity extends \Google\Protobuf\Internal\Message +{ + /** + * The revision independent identifier of the update. + * + * Generated from protobuf field string update_id = 1; + */ + protected $update_id = ''; + /** + * The revision number of the update. + * + * Generated from protobuf field int32 revision = 2; + */ + protected $revision = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $update_id + * The revision independent identifier of the update. + * @type int $revision + * The revision number of the update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); + parent::__construct($data); + } + + /** + * The revision independent identifier of the update. + * + * Generated from protobuf field string update_id = 1; + * @return string + */ + public function getUpdateId() + { + return $this->update_id; + } + + /** + * The revision independent identifier of the update. + * + * Generated from protobuf field string update_id = 1; + * @param string $var + * @return $this + */ + public function setUpdateId($var) + { + GPBUtil::checkString($var, True); + $this->update_id = $var; + + return $this; + } + + /** + * The revision number of the update. + * + * Generated from protobuf field int32 revision = 2; + * @return int + */ + public function getRevision() + { + return $this->revision; + } + + /** + * The revision number of the update. + * + * Generated from protobuf field int32 revision = 2; + * @param int $var + * @return $this + */ + public function setRevision($var) + { + GPBUtil::checkInt32($var); + $this->revision = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Identity::class, \Grafeas\V1\WindowsUpdate_Identity::class); + diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate_Category.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate_Category.php new file mode 100644 index 000000000000..4acf25cc639c --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate_Category.php @@ -0,0 +1,16 @@ +batchCreateNotes($formattedParent, $notes); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GrafeasClient::projectName('[PROJECT]'); + + batch_create_notes_sample($formattedParent); +} +// [END containeranalysis_v1_generated_Grafeas_BatchCreateNotes_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_occurrences.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_occurrences.php new file mode 100644 index 000000000000..fe167aa897ca --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_occurrences.php @@ -0,0 +1,71 @@ +batchCreateOccurrences($formattedParent, $occurrences); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GrafeasClient::projectName('[PROJECT]'); + + batch_create_occurrences_sample($formattedParent); +} +// [END containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_note.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_note.php new file mode 100644 index 000000000000..23288a642b18 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_note.php @@ -0,0 +1,72 @@ +createNote($formattedParent, $noteId, $note); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GrafeasClient::projectName('[PROJECT]'); + $noteId = '[NOTE_ID]'; + + create_note_sample($formattedParent, $noteId); +} +// [END containeranalysis_v1_generated_Grafeas_CreateNote_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_occurrence.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_occurrence.php new file mode 100644 index 000000000000..3ef0cf3be2f8 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_occurrence.php @@ -0,0 +1,70 @@ +createOccurrence($formattedParent, $occurrence); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GrafeasClient::projectName('[PROJECT]'); + + create_occurrence_sample($formattedParent); +} +// [END containeranalysis_v1_generated_Grafeas_CreateOccurrence_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_note.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_note.php new file mode 100644 index 000000000000..0f28ce4570e3 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_note.php @@ -0,0 +1,65 @@ +deleteNote($formattedName); + 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 = GrafeasClient::noteName('[PROJECT]', '[NOTE]'); + + delete_note_sample($formattedName); +} +// [END containeranalysis_v1_generated_Grafeas_DeleteNote_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_occurrence.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_occurrence.php new file mode 100644 index 000000000000..b5c45a1db5d1 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_occurrence.php @@ -0,0 +1,67 @@ +deleteOccurrence($formattedName); + 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 = GrafeasClient::occurrenceName('[PROJECT]', '[OCCURRENCE]'); + + delete_occurrence_sample($formattedName); +} +// [END containeranalysis_v1_generated_Grafeas_DeleteOccurrence_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_note.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_note.php new file mode 100644 index 000000000000..8e7f6b8a878d --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_note.php @@ -0,0 +1,67 @@ +getNote($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GrafeasClient::noteName('[PROJECT]', '[NOTE]'); + + get_note_sample($formattedName); +} +// [END containeranalysis_v1_generated_Grafeas_GetNote_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence.php new file mode 100644 index 000000000000..e1c746d2eedc --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence.php @@ -0,0 +1,67 @@ +getOccurrence($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GrafeasClient::occurrenceName('[PROJECT]', '[OCCURRENCE]'); + + get_occurrence_sample($formattedName); +} +// [END containeranalysis_v1_generated_Grafeas_GetOccurrence_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence_note.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence_note.php new file mode 100644 index 000000000000..f811ea3f799a --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence_note.php @@ -0,0 +1,68 @@ +getOccurrenceNote($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GrafeasClient::occurrenceName('[PROJECT]', '[OCCURRENCE]'); + + get_occurrence_note_sample($formattedName); +} +// [END containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_note_occurrences.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_note_occurrences.php new file mode 100644 index 000000000000..585f2c67bdd5 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_note_occurrences.php @@ -0,0 +1,74 @@ +listNoteOccurrences($formattedName); + + /** @var Occurrence $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 = GrafeasClient::noteName('[PROJECT]', '[NOTE]'); + + list_note_occurrences_sample($formattedName); +} +// [END containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_notes.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_notes.php new file mode 100644 index 000000000000..e2efbce6d25c --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_notes.php @@ -0,0 +1,72 @@ +listNotes($formattedParent); + + /** @var Note $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 = GrafeasClient::projectName('[PROJECT]'); + + list_notes_sample($formattedParent); +} +// [END containeranalysis_v1_generated_Grafeas_ListNotes_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_occurrences.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_occurrences.php new file mode 100644 index 000000000000..f5fd4a42b076 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_occurrences.php @@ -0,0 +1,72 @@ +listOccurrences($formattedParent); + + /** @var Occurrence $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 = GrafeasClient::projectName('[PROJECT]'); + + list_occurrences_sample($formattedParent); +} +// [END containeranalysis_v1_generated_Grafeas_ListOccurrences_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_note.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_note.php new file mode 100644 index 000000000000..a21bfab7fafd --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_note.php @@ -0,0 +1,70 @@ +updateNote($formattedName, $note); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GrafeasClient::noteName('[PROJECT]', '[NOTE]'); + + update_note_sample($formattedName); +} +// [END containeranalysis_v1_generated_Grafeas_UpdateNote_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_occurrence.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_occurrence.php new file mode 100644 index 000000000000..d6016829c691 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_occurrence.php @@ -0,0 +1,70 @@ +updateOccurrence($formattedName, $occurrence); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GrafeasClient::occurrenceName('[PROJECT]', '[OCCURRENCE]'); + + update_occurrence_sample($formattedName); +} +// [END containeranalysis_v1_generated_Grafeas_UpdateOccurrence_sync] diff --git a/owl-bot-staging/Grafeas/v1/src/V1/Gapic/GrafeasGapicClient.php b/owl-bot-staging/Grafeas/v1/src/V1/Gapic/GrafeasGapicClient.php new file mode 100644 index 000000000000..23d79eb57ed9 --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/src/V1/Gapic/GrafeasGapicClient.php @@ -0,0 +1,1031 @@ +projectName('[PROJECT]'); + * $notes = []; + * $response = $grafeasClient->batchCreateNotes($formattedParent, $notes); + * } finally { + * $grafeasClient->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. + */ +class GrafeasGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'grafeas.v1.Grafeas'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'containeranalysis.googleapis.com'; + + /** 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 = []; + + private static $noteNameTemplate; + + private static $occurrenceNameTemplate; + + private static $projectNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/grafeas_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/grafeas_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/grafeas_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/grafeas_rest_client_config.php', + ], + ], + ]; + } + + private static function getNoteNameTemplate() + { + if (self::$noteNameTemplate == null) { + self::$noteNameTemplate = new PathTemplate('projects/{project}/notes/{note}'); + } + + return self::$noteNameTemplate; + } + + private static function getOccurrenceNameTemplate() + { + if (self::$occurrenceNameTemplate == null) { + self::$occurrenceNameTemplate = new PathTemplate('projects/{project}/occurrences/{occurrence}'); + } + + return self::$occurrenceNameTemplate; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'note' => self::getNoteNameTemplate(), + 'occurrence' => self::getOccurrenceNameTemplate(), + 'project' => self::getProjectNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a note + * resource. + * + * @param string $project + * @param string $note + * + * @return string The formatted note resource. + */ + public static function noteName($project, $note) + { + return self::getNoteNameTemplate()->render([ + 'project' => $project, + 'note' => $note, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a occurrence + * resource. + * + * @param string $project + * @param string $occurrence + * + * @return string The formatted occurrence resource. + */ + public static function occurrenceName($project, $occurrence) + { + return self::getOccurrenceNameTemplate()->render([ + 'project' => $project, + 'occurrence' => $occurrence, + ]); + } + + /** + * 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, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - note: projects/{project}/notes/{note} + * - occurrence: projects/{project}/occurrences/{occurrence} + * - 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($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 'containeranalysis.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 new notes in batch. + * + * Sample code: + * ``` + * $grafeasClient = new GrafeasClient(); + * try { + * $formattedParent = $grafeasClient->projectName('[PROJECT]'); + * $notes = []; + * $response = $grafeasClient->batchCreateNotes($formattedParent, $notes); + * } finally { + * $grafeasClient->close(); + * } + * ``` + * + * @param string $parent The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the notes are to be created. + * @param array $notes The notes to create. Max allowed length is 1000. + * @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 \Grafeas\V1\BatchCreateNotesResponse + * + * @throws ApiException if the remote call fails + */ + public function batchCreateNotes($parent, $notes, array $optionalArgs = []) + { + $request = new BatchCreateNotesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setNotes($notes); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('BatchCreateNotes', BatchCreateNotesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates new occurrences in batch. + * + * Sample code: + * ``` + * $grafeasClient = new GrafeasClient(); + * try { + * $formattedParent = $grafeasClient->projectName('[PROJECT]'); + * $occurrences = []; + * $response = $grafeasClient->batchCreateOccurrences($formattedParent, $occurrences); + * } finally { + * $grafeasClient->close(); + * } + * ``` + * + * @param string $parent The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the occurrences are to be created. + * @param Occurrence[] $occurrences The occurrences to create. Max allowed length is 1000. + * @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 \Grafeas\V1\BatchCreateOccurrencesResponse + * + * @throws ApiException if the remote call fails + */ + public function batchCreateOccurrences($parent, $occurrences, array $optionalArgs = []) + { + $request = new BatchCreateOccurrencesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setOccurrences($occurrences); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('BatchCreateOccurrences', BatchCreateOccurrencesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a new note. + * + * Sample code: + * ``` + * $grafeasClient = new GrafeasClient(); + * try { + * $formattedParent = $grafeasClient->projectName('[PROJECT]'); + * $noteId = 'note_id'; + * $note = new Note(); + * $response = $grafeasClient->createNote($formattedParent, $noteId, $note); + * } finally { + * $grafeasClient->close(); + * } + * ``` + * + * @param string $parent The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the note is to be created. + * @param string $noteId The ID to use for this note. + * @param Note $note The note 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 \Grafeas\V1\Note + * + * @throws ApiException if the remote call fails + */ + public function createNote($parent, $noteId, $note, array $optionalArgs = []) + { + $request = new CreateNoteRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setNoteId($noteId); + $request->setNote($note); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateNote', Note::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a new occurrence. + * + * Sample code: + * ``` + * $grafeasClient = new GrafeasClient(); + * try { + * $formattedParent = $grafeasClient->projectName('[PROJECT]'); + * $occurrence = new Occurrence(); + * $response = $grafeasClient->createOccurrence($formattedParent, $occurrence); + * } finally { + * $grafeasClient->close(); + * } + * ``` + * + * @param string $parent The name of the project in the form of `projects/[PROJECT_ID]`, under which + * the occurrence is to be created. + * @param Occurrence $occurrence The occurrence 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 \Grafeas\V1\Occurrence + * + * @throws ApiException if the remote call fails + */ + public function createOccurrence($parent, $occurrence, array $optionalArgs = []) + { + $request = new CreateOccurrenceRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setOccurrence($occurrence); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateOccurrence', Occurrence::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes the specified note. + * + * Sample code: + * ``` + * $grafeasClient = new GrafeasClient(); + * try { + * $formattedName = $grafeasClient->noteName('[PROJECT]', '[NOTE]'); + * $grafeasClient->deleteNote($formattedName); + * } finally { + * $grafeasClient->close(); + * } + * ``` + * + * @param string $name The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_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 deleteNote($name, array $optionalArgs = []) + { + $request = new DeleteNoteRequest(); + $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('DeleteNote', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes the specified occurrence. For example, use this method to delete an + * occurrence when the occurrence is no longer applicable for the given + * resource. + * + * Sample code: + * ``` + * $grafeasClient = new GrafeasClient(); + * try { + * $formattedName = $grafeasClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); + * $grafeasClient->deleteOccurrence($formattedName); + * } finally { + * $grafeasClient->close(); + * } + * ``` + * + * @param string $name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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 deleteOccurrence($name, array $optionalArgs = []) + { + $request = new DeleteOccurrenceRequest(); + $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('DeleteOccurrence', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the specified note. + * + * Sample code: + * ``` + * $grafeasClient = new GrafeasClient(); + * try { + * $formattedName = $grafeasClient->noteName('[PROJECT]', '[NOTE]'); + * $response = $grafeasClient->getNote($formattedName); + * } finally { + * $grafeasClient->close(); + * } + * ``` + * + * @param string $name The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_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 \Grafeas\V1\Note + * + * @throws ApiException if the remote call fails + */ + public function getNote($name, array $optionalArgs = []) + { + $request = new GetNoteRequest(); + $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('GetNote', Note::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the specified occurrence. + * + * Sample code: + * ``` + * $grafeasClient = new GrafeasClient(); + * try { + * $formattedName = $grafeasClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); + * $response = $grafeasClient->getOccurrence($formattedName); + * } finally { + * $grafeasClient->close(); + * } + * ``` + * + * @param string $name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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 \Grafeas\V1\Occurrence + * + * @throws ApiException if the remote call fails + */ + public function getOccurrence($name, array $optionalArgs = []) + { + $request = new GetOccurrenceRequest(); + $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('GetOccurrence', Occurrence::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the note attached to the specified occurrence. Consumer projects can + * use this method to get a note that belongs to a provider project. + * + * Sample code: + * ``` + * $grafeasClient = new GrafeasClient(); + * try { + * $formattedName = $grafeasClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); + * $response = $grafeasClient->getOccurrenceNote($formattedName); + * } finally { + * $grafeasClient->close(); + * } + * ``` + * + * @param string $name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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 \Grafeas\V1\Note + * + * @throws ApiException if the remote call fails + */ + public function getOccurrenceNote($name, array $optionalArgs = []) + { + $request = new GetOccurrenceNoteRequest(); + $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('GetOccurrenceNote', Note::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists occurrences referencing the specified note. Provider projects can use + * this method to get all occurrences across consumer projects referencing the + * specified note. + * + * Sample code: + * ``` + * $grafeasClient = new GrafeasClient(); + * try { + * $formattedName = $grafeasClient->noteName('[PROJECT]', '[NOTE]'); + * // Iterate over pages of elements + * $pagedResponse = $grafeasClient->listNoteOccurrences($formattedName); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $grafeasClient->listNoteOccurrences($formattedName); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $grafeasClient->close(); + * } + * ``` + * + * @param string $name The name of the note to list occurrences for in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * The filter expression. + * @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 listNoteOccurrences($name, array $optionalArgs = []) + { + $request = new ListNoteOccurrencesRequest(); + $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('ListNoteOccurrences', $optionalArgs, ListNoteOccurrencesResponse::class, $request); + } + + /** + * Lists notes for the specified project. + * + * Sample code: + * ``` + * $grafeasClient = new GrafeasClient(); + * try { + * $formattedParent = $grafeasClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $grafeasClient->listNotes($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $grafeasClient->listNotes($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $grafeasClient->close(); + * } + * ``` + * + * @param string $parent The name of the project to list notes for in the form of + * `projects/[PROJECT_ID]`. + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * The filter expression. + * @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 listNotes($parent, array $optionalArgs = []) + { + $request = new ListNotesRequest(); + $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('ListNotes', $optionalArgs, ListNotesResponse::class, $request); + } + + /** + * Lists occurrences for the specified project. + * + * Sample code: + * ``` + * $grafeasClient = new GrafeasClient(); + * try { + * $formattedParent = $grafeasClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $grafeasClient->listOccurrences($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $grafeasClient->listOccurrences($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $grafeasClient->close(); + * } + * ``` + * + * @param string $parent The name of the project to list occurrences for in the form of + * `projects/[PROJECT_ID]`. + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * The filter expression. + * @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 listOccurrences($parent, array $optionalArgs = []) + { + $request = new ListOccurrencesRequest(); + $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('ListOccurrences', $optionalArgs, ListOccurrencesResponse::class, $request); + } + + /** + * Updates the specified note. + * + * Sample code: + * ``` + * $grafeasClient = new GrafeasClient(); + * try { + * $formattedName = $grafeasClient->noteName('[PROJECT]', '[NOTE]'); + * $note = new Note(); + * $response = $grafeasClient->updateNote($formattedName, $note); + * } finally { + * $grafeasClient->close(); + * } + * ``` + * + * @param string $name The name of the note in the form of + * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * @param Note $note The updated note. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * 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 \Grafeas\V1\Note + * + * @throws ApiException if the remote call fails + */ + public function updateNote($name, $note, array $optionalArgs = []) + { + $request = new UpdateNoteRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setNote($note); + $requestParamHeaders['name'] = $name; + 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('UpdateNote', Note::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates the specified occurrence. + * + * Sample code: + * ``` + * $grafeasClient = new GrafeasClient(); + * try { + * $formattedName = $grafeasClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); + * $occurrence = new Occurrence(); + * $response = $grafeasClient->updateOccurrence($formattedName, $occurrence); + * } finally { + * $grafeasClient->close(); + * } + * ``` + * + * @param string $name The name of the occurrence in the form of + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * @param Occurrence $occurrence The updated occurrence. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * 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 \Grafeas\V1\Occurrence + * + * @throws ApiException if the remote call fails + */ + public function updateOccurrence($name, $occurrence, array $optionalArgs = []) + { + $request = new UpdateOccurrenceRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setOccurrence($occurrence); + $requestParamHeaders['name'] = $name; + 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('UpdateOccurrence', Occurrence::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Grafeas/v1/src/V1/GrafeasClient.php b/owl-bot-staging/Grafeas/v1/src/V1/GrafeasClient.php new file mode 100644 index 000000000000..ec675d7f8cbe --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/src/V1/GrafeasClient.php @@ -0,0 +1,34 @@ + [ + 'grafeas.v1.Grafeas' => [ + 'ListNoteOccurrences' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOccurrences', + ], + ], + 'ListNotes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNotes', + ], + ], + 'ListOccurrences' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOccurrences', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_rest_client_config.php b/owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_rest_client_config.php new file mode 100644 index 000000000000..30b86b499f1a --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_rest_client_config.php @@ -0,0 +1,172 @@ + [ + 'grafeas.v1.Grafeas' => [ + 'BatchCreateNotes' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/notes:batchCreate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchCreateOccurrences' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/occurrences:batchCreate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateNote' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/notes', + 'body' => 'note', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'note_id', + ], + ], + 'CreateOccurrence' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/occurrences', + 'body' => 'occurrence', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteNote' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/notes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOccurrence' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/occurrences/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNote' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/notes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOccurrence' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/occurrences/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOccurrenceNote' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/occurrences/*}/notes', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListNoteOccurrences' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/notes/*}/occurrences', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListNotes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/notes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListOccurrences' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/occurrences', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateNote' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=projects/*/notes/*}', + 'body' => 'note', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateOccurrence' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=projects/*/occurrences/*}', + 'body' => 'occurrence', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Grafeas/v1/tests/Unit/V1/GrafeasClientTest.php b/owl-bot-staging/Grafeas/v1/tests/Unit/V1/GrafeasClientTest.php new file mode 100644 index 000000000000..8b715d081bcb --- /dev/null +++ b/owl-bot-staging/Grafeas/v1/tests/Unit/V1/GrafeasClientTest.php @@ -0,0 +1,990 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return GrafeasClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new GrafeasClient($options); + } + + /** @test */ + public function batchCreateNotesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateNotesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $notesValue = new Note(); + $notes = [ + 'notesKey' => $notesValue, + ]; + $response = $gapicClient->batchCreateNotes($formattedParent, $notes); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/grafeas.v1.Grafeas/BatchCreateNotes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNotes(); + $this->assertProtobufEquals($notes, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreateNotesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $notesValue = new Note(); + $notes = [ + 'notesKey' => $notesValue, + ]; + try { + $gapicClient->batchCreateNotes($formattedParent, $notes); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreateOccurrencesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateOccurrencesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $occurrences = []; + $response = $gapicClient->batchCreateOccurrences($formattedParent, $occurrences); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/grafeas.v1.Grafeas/BatchCreateOccurrences', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getOccurrences(); + $this->assertProtobufEquals($occurrences, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreateOccurrencesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $occurrences = []; + try { + $gapicClient->batchCreateOccurrences($formattedParent, $occurrences); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createNoteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $shortDescription = 'shortDescription-235369287'; + $longDescription = 'longDescription-1747792199'; + $expectedResponse = new Note(); + $expectedResponse->setName($name); + $expectedResponse->setShortDescription($shortDescription); + $expectedResponse->setLongDescription($longDescription); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $noteId = 'noteId2129224840'; + $note = new Note(); + $response = $gapicClient->createNote($formattedParent, $noteId, $note); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/grafeas.v1.Grafeas/CreateNote', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNoteId(); + $this->assertProtobufEquals($noteId, $actualValue); + $actualValue = $actualRequestObject->getNote(); + $this->assertProtobufEquals($note, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createNoteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $noteId = 'noteId2129224840'; + $note = new Note(); + try { + $gapicClient->createNote($formattedParent, $noteId, $note); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createOccurrenceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $resourceUri = 'resourceUri-384040517'; + $noteName = 'noteName1780787896'; + $remediation = 'remediation779381797'; + $expectedResponse = new Occurrence(); + $expectedResponse->setName($name); + $expectedResponse->setResourceUri($resourceUri); + $expectedResponse->setNoteName($noteName); + $expectedResponse->setRemediation($remediation); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $occurrence = new Occurrence(); + $response = $gapicClient->createOccurrence($formattedParent, $occurrence); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/grafeas.v1.Grafeas/CreateOccurrence', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getOccurrence(); + $this->assertProtobufEquals($occurrence, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createOccurrenceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $occurrence = new Occurrence(); + try { + $gapicClient->createOccurrence($formattedParent, $occurrence); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteNoteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); + $gapicClient->deleteNote($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/grafeas.v1.Grafeas/DeleteNote', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteNoteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); + try { + $gapicClient->deleteNote($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 deleteOccurrenceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); + $gapicClient->deleteOccurrence($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/grafeas.v1.Grafeas/DeleteOccurrence', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteOccurrenceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); + try { + $gapicClient->deleteOccurrence($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 getNoteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $shortDescription = 'shortDescription-235369287'; + $longDescription = 'longDescription-1747792199'; + $expectedResponse = new Note(); + $expectedResponse->setName($name2); + $expectedResponse->setShortDescription($shortDescription); + $expectedResponse->setLongDescription($longDescription); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); + $response = $gapicClient->getNote($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/grafeas.v1.Grafeas/GetNote', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNoteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); + try { + $gapicClient->getNote($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 getOccurrenceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $resourceUri = 'resourceUri-384040517'; + $noteName = 'noteName1780787896'; + $remediation = 'remediation779381797'; + $expectedResponse = new Occurrence(); + $expectedResponse->setName($name2); + $expectedResponse->setResourceUri($resourceUri); + $expectedResponse->setNoteName($noteName); + $expectedResponse->setRemediation($remediation); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); + $response = $gapicClient->getOccurrence($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/grafeas.v1.Grafeas/GetOccurrence', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOccurrenceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); + try { + $gapicClient->getOccurrence($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 getOccurrenceNoteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $shortDescription = 'shortDescription-235369287'; + $longDescription = 'longDescription-1747792199'; + $expectedResponse = new Note(); + $expectedResponse->setName($name2); + $expectedResponse->setShortDescription($shortDescription); + $expectedResponse->setLongDescription($longDescription); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); + $response = $gapicClient->getOccurrenceNote($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/grafeas.v1.Grafeas/GetOccurrenceNote', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOccurrenceNoteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); + try { + $gapicClient->getOccurrenceNote($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 listNoteOccurrencesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $occurrencesElement = new Occurrence(); + $occurrences = [ + $occurrencesElement, + ]; + $expectedResponse = new ListNoteOccurrencesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOccurrences($occurrences); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); + $response = $gapicClient->listNoteOccurrences($formattedName); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOccurrences()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/grafeas.v1.Grafeas/ListNoteOccurrences', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNoteOccurrencesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); + try { + $gapicClient->listNoteOccurrences($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 listNotesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $notesElement = new Note(); + $notes = [ + $notesElement, + ]; + $expectedResponse = new ListNotesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNotes($notes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listNotes($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNotes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/grafeas.v1.Grafeas/ListNotes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listNotes($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 listOccurrencesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $occurrencesElement = new Occurrence(); + $occurrences = [ + $occurrencesElement, + ]; + $expectedResponse = new ListOccurrencesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOccurrences($occurrences); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listOccurrences($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOccurrences()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/grafeas.v1.Grafeas/ListOccurrences', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOccurrencesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listOccurrences($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 updateNoteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $shortDescription = 'shortDescription-235369287'; + $longDescription = 'longDescription-1747792199'; + $expectedResponse = new Note(); + $expectedResponse->setName($name2); + $expectedResponse->setShortDescription($shortDescription); + $expectedResponse->setLongDescription($longDescription); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); + $note = new Note(); + $response = $gapicClient->updateNote($formattedName, $note); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/grafeas.v1.Grafeas/UpdateNote', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getNote(); + $this->assertProtobufEquals($note, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateNoteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); + $note = new Note(); + try { + $gapicClient->updateNote($formattedName, $note); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateOccurrenceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $resourceUri = 'resourceUri-384040517'; + $noteName = 'noteName1780787896'; + $remediation = 'remediation779381797'; + $expectedResponse = new Occurrence(); + $expectedResponse->setName($name2); + $expectedResponse->setResourceUri($resourceUri); + $expectedResponse->setNoteName($noteName); + $expectedResponse->setRemediation($remediation); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); + $occurrence = new Occurrence(); + $response = $gapicClient->updateOccurrence($formattedName, $occurrence); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/grafeas.v1.Grafeas/UpdateOccurrence', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getOccurrence(); + $this->assertProtobufEquals($occurrence, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateOccurrenceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); + $occurrence = new Occurrence(); + try { + $gapicClient->updateOccurrence($formattedName, $occurrence); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->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/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Deny.php b/owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Deny.php new file mode 100644 index 000000000000..ae2b4a4fc886 --- /dev/null +++ b/owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Deny.php @@ -0,0 +1,34 @@ +internalAddGeneratedFile( + ' +ä +google/iam/v2/deny.proto google.iam.v2"« +DenyRule +denied_principals (  +exception_principals (  +denied_permissions (  +exception_permissions ( + +denial_condition ( 2.google.type.ExprB‚ +com.google.iam.v2B DenyRuleProtoPZ0google.golang.org/genproto/googleapis/iam/v2;iamªGoogle.Cloud.Iam.V2ÊGoogle\\Cloud\\Iam\\V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Policy.php b/owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Policy.php new file mode 100644 index 0000000000000000000000000000000000000000..16917455af212de230bdb53e0d65a90ab42137e8 GIT binary patch literal 3121 zcmb7G-EQMV6edX<+DTWm&Z1_6P-oqRW}~i+0v9NyptRkVt_m%yvLIwBn#L1%RA+4L zaZ6ZLLhuMY0GCKS0+(D?Tp+mX6&E}R^J6>CUzP1mD$n`(&iTG`Wfz8w9Sjdnc0R)l*@z+QKzdk*sAs)sYyr@5Q5eD#=?Pu} z$p8H4jK_f?LyZ4CB4L|Q!U%H7_Z;gs>>@YB+;!Zx8_^CU9)-f;n09dOF;p>y?IYjg zwQa)$!-*)DmuekSh69RRYY&H=fcVS{PPl2a>0p*NNqnh2j?;>8qzh{bW3xF1avQQB z!rAN)2AD+w-IBOPfa~->YeI)wKCxPqdZG&+4V%qDO@k2A9CuxUDSI`aeS%$k2cM%$ z;svw2DkgdBXn%I6Bab>kL@A+;b?gfjzFLhbb*F@jjG>-CIk%+z$;TunxMkZZpZi?d zwUhzD#|HRw1yrX?TDzyt3@&%$vQb@)O_5K`j%>J+eswK#&=p;6pT%vB4JyM)Y~H*0 zWIaA{2Msd4v_T{B<)Co^n=I*qGSL4hfT9{HZ3WDUL9FCpuC};S__sB$ErUWt>`H#{ zg&SQEYF7%$r-F7LEZHRVUDR(&|2c7_ZGjRRXtFX73$;??T|Bt}r!e)^hL1|>V*Wqhz= z@{5XP{R>b&A|aE(2@ap*ZzDcK+^6WHfUk{#R`Ogvi#~F2JLJ1prk&R`0OTj;U0|vt zqkj$V4~GnWzO%4qZGZ(|>~@}qhZSmha|E@jQCkIXQ2ZThXF^MX>hFN%1FXRI6R2aN z&g%q}ccq--p50YcomVO^oVbybAqnPG1Eg)6kBpoTy#>l&N(~OD8blSdHmy(@Ro?>T zJt@fH5aV@;`ISSHPHRqo23D0@x;c~ERWpZ&N&&fJs2YD2!Ga9N3DSPbfu$^snm)o+ z_Aut6x_+mP(t%$8@t^;G&cCHS5YL2{N@m-BEDW=5)~|0{vHG+gSWF4m)<&YICrSFr z-08KUgkpmYrIQKeV$^=;MQ4>WR&@3-$@+EzE3>DKln&jI+1K^yD;&Olp`3=`S2>pImvzVUVLRbo{Oksc!6U&n95tv8~}(P)>}Nr zZ~5|pd^#JuBAs!_k-li$BwsB{ezxSpn!l{iiZa&w8|e#YQ@uzt57?=XS81spnb+VN Gfd2swaqeLN literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/CreatePolicyRequest.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/CreatePolicyRequest.php new file mode 100644 index 000000000000..bfff2cd1bb65 --- /dev/null +++ b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/CreatePolicyRequest.php @@ -0,0 +1,185 @@ +google.iam.v2.CreatePolicyRequest + */ +class CreatePolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource that the policy is attached to, along with the kind of policy + * to create. Format: `policies/{attachment_point}/denypolicies` + * The attachment point is identified by its URL-encoded full resource name, + * which means that the forward-slash character, `/`, must be written as + * `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric ID. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. The policy to create. + * + * Generated from protobuf field .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $policy = null; + /** + * The ID to use for this policy, which will become the final component of + * the policy's resource name. The ID must contain 3 to 63 characters. It can + * contain lowercase letters and numbers, as well as dashes (`-`) and periods + * (`.`). The first character must be a lowercase letter. + * + * Generated from protobuf field string policy_id = 3; + */ + protected $policy_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource that the policy is attached to, along with the kind of policy + * to create. Format: `policies/{attachment_point}/denypolicies` + * The attachment point is identified by its URL-encoded full resource name, + * which means that the forward-slash character, `/`, must be written as + * `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric ID. + * @type \Google\Cloud\Iam\V2\Policy $policy + * Required. The policy to create. + * @type string $policy_id + * The ID to use for this policy, which will become the final component of + * the policy's resource name. The ID must contain 3 to 63 characters. It can + * contain lowercase letters and numbers, as well as dashes (`-`) and periods + * (`.`). The first character must be a lowercase letter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\V2\Policy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource that the policy is attached to, along with the kind of policy + * to create. Format: `policies/{attachment_point}/denypolicies` + * The attachment point is identified by its URL-encoded full resource name, + * which means that the forward-slash character, `/`, must be written as + * `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric ID. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource that the policy is attached to, along with the kind of policy + * to create. Format: `policies/{attachment_point}/denypolicies` + * The attachment point is identified by its URL-encoded full resource name, + * which means that the forward-slash character, `/`, must be written as + * `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric ID. + * + * 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. The policy to create. + * + * Generated from protobuf field .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Iam\V2\Policy|null + */ + public function getPolicy() + { + return $this->policy; + } + + public function hasPolicy() + { + return isset($this->policy); + } + + public function clearPolicy() + { + unset($this->policy); + } + + /** + * Required. The policy to create. + * + * Generated from protobuf field .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Iam\V2\Policy $var + * @return $this + */ + public function setPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iam\V2\Policy::class); + $this->policy = $var; + + return $this; + } + + /** + * The ID to use for this policy, which will become the final component of + * the policy's resource name. The ID must contain 3 to 63 characters. It can + * contain lowercase letters and numbers, as well as dashes (`-`) and periods + * (`.`). The first character must be a lowercase letter. + * + * Generated from protobuf field string policy_id = 3; + * @return string + */ + public function getPolicyId() + { + return $this->policy_id; + } + + /** + * The ID to use for this policy, which will become the final component of + * the policy's resource name. The ID must contain 3 to 63 characters. It can + * contain lowercase letters and numbers, as well as dashes (`-`) and periods + * (`.`). The first character must be a lowercase letter. + * + * Generated from protobuf field string policy_id = 3; + * @param string $var + * @return $this + */ + public function setPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->policy_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DeletePolicyRequest.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DeletePolicyRequest.php new file mode 100644 index 000000000000..c728fbb1621c --- /dev/null +++ b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DeletePolicyRequest.php @@ -0,0 +1,141 @@ +google.iam.v2.DeletePolicyRequest + */ +class DeletePolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the policy to delete. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + * Use the URL-encoded full resource name, which means that the forward-slash + * character, `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric ID. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. The expected `etag` of the policy to delete. If the value does not match + * the value that is stored in IAM, the request fails with a `409` error code + * and `ABORTED` status. + * If you omit this field, the policy is deleted regardless of its current + * `etag`. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the policy to delete. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + * Use the URL-encoded full resource name, which means that the forward-slash + * character, `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric ID. + * @type string $etag + * Optional. The expected `etag` of the policy to delete. If the value does not match + * the value that is stored in IAM, the request fails with a `409` error code + * and `ABORTED` status. + * If you omit this field, the policy is deleted regardless of its current + * `etag`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\V2\Policy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the policy to delete. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + * Use the URL-encoded full resource name, which means that the forward-slash + * character, `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric ID. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the policy to delete. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + * Use the URL-encoded full resource name, which means that the forward-slash + * character, `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric 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 expected `etag` of the policy to delete. If the value does not match + * the value that is stored in IAM, the request fails with a `409` error code + * and `ABORTED` status. + * If you omit this field, the policy is deleted regardless of its current + * `etag`. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. The expected `etag` of the policy to delete. If the value does not match + * the value that is stored in IAM, the request fails with a `409` error code + * and `ABORTED` status. + * If you omit this field, the policy is deleted regardless of its current + * `etag`. + * + * 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/Iam/v2/proto/src/Google/Cloud/Iam/V2/DenyRule.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DenyRule.php new file mode 100644 index 000000000000..c53d85f881f6 --- /dev/null +++ b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DenyRule.php @@ -0,0 +1,425 @@ +google.iam.v2.DenyRule + */ +class DenyRule extends \Google\Protobuf\Internal\Message +{ + /** + * The identities that are prevented from using one or more permissions on + * Google Cloud resources. This field can contain the following values: + * * `principalSet://goog/public:all`: A special identifier that represents + * any principal that is on the internet, even if they do not have a Google + * Account or are not logged in. + * * `principal://goog/subject/{email_id}`: A specific Google Account. + * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For + * example, `principal://goog/subject/alice@example.com`. + * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific + * Google Account that was deleted recently. For example, + * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If + * the Google Account is recovered, this identifier reverts to the standard + * identifier for a Google Account. + * * `principalSet://goog/group/{group_id}`: A Google group. For example, + * `principalSet://goog/group/admins@example.com`. + * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group + * that was deleted recently. For example, + * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If + * the Google group is restored, this identifier reverts to the standard + * identifier for a Google group. + * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: + * A Google Cloud service account. For example, + * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. + * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: + * A Google Cloud service account that was deleted recently. For example, + * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. + * If the service account is undeleted, this identifier reverts to the + * standard identifier for a service account. + * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the + * principals associated with the specified Google Workspace or Cloud + * Identity customer ID. For example, + * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. + * + * Generated from protobuf field repeated string denied_principals = 1; + */ + private $denied_principals; + /** + * The identities that are excluded from the deny rule, even if they are + * listed in the `denied_principals`. For example, you could add a Google + * group to the `denied_principals`, then exclude specific users who belong to + * that group. + * This field can contain the same values as the `denied_principals` field, + * excluding `principalSet://goog/public:all`, which represents all users on + * the internet. + * + * Generated from protobuf field repeated string exception_principals = 2; + */ + private $exception_principals; + /** + * The permissions that are explicitly denied by this rule. Each permission + * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` + * is the fully qualified domain name for the service. For example, + * `iam.googleapis.com/roles.list`. + * + * Generated from protobuf field repeated string denied_permissions = 3; + */ + private $denied_permissions; + /** + * Specifies the permissions that this rule excludes from the set of denied + * permissions given by `denied_permissions`. If a permission appears in + * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be + * denied. + * The excluded permissions can be specified using the same syntax as + * `denied_permissions`. + * + * Generated from protobuf field repeated string exception_permissions = 4; + */ + private $exception_permissions; + /** + * The condition that determines whether this deny rule applies to a request. + * If the condition expression evaluates to `true`, then the deny rule is + * applied; otherwise, the deny rule is not applied. + * Each deny rule is evaluated independently. If this deny rule does not apply + * to a request, other deny rules might still apply. + * The condition can use CEL functions that evaluate + * [resource + * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other + * functions and operators are not supported. + * + * Generated from protobuf field .google.type.Expr denial_condition = 5; + */ + protected $denial_condition = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $denied_principals + * The identities that are prevented from using one or more permissions on + * Google Cloud resources. This field can contain the following values: + * * `principalSet://goog/public:all`: A special identifier that represents + * any principal that is on the internet, even if they do not have a Google + * Account or are not logged in. + * * `principal://goog/subject/{email_id}`: A specific Google Account. + * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For + * example, `principal://goog/subject/alice@example.com`. + * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific + * Google Account that was deleted recently. For example, + * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If + * the Google Account is recovered, this identifier reverts to the standard + * identifier for a Google Account. + * * `principalSet://goog/group/{group_id}`: A Google group. For example, + * `principalSet://goog/group/admins@example.com`. + * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group + * that was deleted recently. For example, + * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If + * the Google group is restored, this identifier reverts to the standard + * identifier for a Google group. + * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: + * A Google Cloud service account. For example, + * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. + * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: + * A Google Cloud service account that was deleted recently. For example, + * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. + * If the service account is undeleted, this identifier reverts to the + * standard identifier for a service account. + * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the + * principals associated with the specified Google Workspace or Cloud + * Identity customer ID. For example, + * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. + * @type array|\Google\Protobuf\Internal\RepeatedField $exception_principals + * The identities that are excluded from the deny rule, even if they are + * listed in the `denied_principals`. For example, you could add a Google + * group to the `denied_principals`, then exclude specific users who belong to + * that group. + * This field can contain the same values as the `denied_principals` field, + * excluding `principalSet://goog/public:all`, which represents all users on + * the internet. + * @type array|\Google\Protobuf\Internal\RepeatedField $denied_permissions + * The permissions that are explicitly denied by this rule. Each permission + * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` + * is the fully qualified domain name for the service. For example, + * `iam.googleapis.com/roles.list`. + * @type array|\Google\Protobuf\Internal\RepeatedField $exception_permissions + * Specifies the permissions that this rule excludes from the set of denied + * permissions given by `denied_permissions`. If a permission appears in + * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be + * denied. + * The excluded permissions can be specified using the same syntax as + * `denied_permissions`. + * @type \Google\Type\Expr $denial_condition + * The condition that determines whether this deny rule applies to a request. + * If the condition expression evaluates to `true`, then the deny rule is + * applied; otherwise, the deny rule is not applied. + * Each deny rule is evaluated independently. If this deny rule does not apply + * to a request, other deny rules might still apply. + * The condition can use CEL functions that evaluate + * [resource + * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other + * functions and operators are not supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\V2\Deny::initOnce(); + parent::__construct($data); + } + + /** + * The identities that are prevented from using one or more permissions on + * Google Cloud resources. This field can contain the following values: + * * `principalSet://goog/public:all`: A special identifier that represents + * any principal that is on the internet, even if they do not have a Google + * Account or are not logged in. + * * `principal://goog/subject/{email_id}`: A specific Google Account. + * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For + * example, `principal://goog/subject/alice@example.com`. + * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific + * Google Account that was deleted recently. For example, + * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If + * the Google Account is recovered, this identifier reverts to the standard + * identifier for a Google Account. + * * `principalSet://goog/group/{group_id}`: A Google group. For example, + * `principalSet://goog/group/admins@example.com`. + * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group + * that was deleted recently. For example, + * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If + * the Google group is restored, this identifier reverts to the standard + * identifier for a Google group. + * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: + * A Google Cloud service account. For example, + * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. + * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: + * A Google Cloud service account that was deleted recently. For example, + * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. + * If the service account is undeleted, this identifier reverts to the + * standard identifier for a service account. + * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the + * principals associated with the specified Google Workspace or Cloud + * Identity customer ID. For example, + * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. + * + * Generated from protobuf field repeated string denied_principals = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeniedPrincipals() + { + return $this->denied_principals; + } + + /** + * The identities that are prevented from using one or more permissions on + * Google Cloud resources. This field can contain the following values: + * * `principalSet://goog/public:all`: A special identifier that represents + * any principal that is on the internet, even if they do not have a Google + * Account or are not logged in. + * * `principal://goog/subject/{email_id}`: A specific Google Account. + * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For + * example, `principal://goog/subject/alice@example.com`. + * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific + * Google Account that was deleted recently. For example, + * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If + * the Google Account is recovered, this identifier reverts to the standard + * identifier for a Google Account. + * * `principalSet://goog/group/{group_id}`: A Google group. For example, + * `principalSet://goog/group/admins@example.com`. + * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group + * that was deleted recently. For example, + * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If + * the Google group is restored, this identifier reverts to the standard + * identifier for a Google group. + * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: + * A Google Cloud service account. For example, + * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. + * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: + * A Google Cloud service account that was deleted recently. For example, + * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. + * If the service account is undeleted, this identifier reverts to the + * standard identifier for a service account. + * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the + * principals associated with the specified Google Workspace or Cloud + * Identity customer ID. For example, + * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. + * + * Generated from protobuf field repeated string denied_principals = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeniedPrincipals($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->denied_principals = $arr; + + return $this; + } + + /** + * The identities that are excluded from the deny rule, even if they are + * listed in the `denied_principals`. For example, you could add a Google + * group to the `denied_principals`, then exclude specific users who belong to + * that group. + * This field can contain the same values as the `denied_principals` field, + * excluding `principalSet://goog/public:all`, which represents all users on + * the internet. + * + * Generated from protobuf field repeated string exception_principals = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExceptionPrincipals() + { + return $this->exception_principals; + } + + /** + * The identities that are excluded from the deny rule, even if they are + * listed in the `denied_principals`. For example, you could add a Google + * group to the `denied_principals`, then exclude specific users who belong to + * that group. + * This field can contain the same values as the `denied_principals` field, + * excluding `principalSet://goog/public:all`, which represents all users on + * the internet. + * + * Generated from protobuf field repeated string exception_principals = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExceptionPrincipals($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->exception_principals = $arr; + + return $this; + } + + /** + * The permissions that are explicitly denied by this rule. Each permission + * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` + * is the fully qualified domain name for the service. For example, + * `iam.googleapis.com/roles.list`. + * + * Generated from protobuf field repeated string denied_permissions = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeniedPermissions() + { + return $this->denied_permissions; + } + + /** + * The permissions that are explicitly denied by this rule. Each permission + * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` + * is the fully qualified domain name for the service. For example, + * `iam.googleapis.com/roles.list`. + * + * Generated from protobuf field repeated string denied_permissions = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeniedPermissions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->denied_permissions = $arr; + + return $this; + } + + /** + * Specifies the permissions that this rule excludes from the set of denied + * permissions given by `denied_permissions`. If a permission appears in + * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be + * denied. + * The excluded permissions can be specified using the same syntax as + * `denied_permissions`. + * + * Generated from protobuf field repeated string exception_permissions = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExceptionPermissions() + { + return $this->exception_permissions; + } + + /** + * Specifies the permissions that this rule excludes from the set of denied + * permissions given by `denied_permissions`. If a permission appears in + * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be + * denied. + * The excluded permissions can be specified using the same syntax as + * `denied_permissions`. + * + * Generated from protobuf field repeated string exception_permissions = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExceptionPermissions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->exception_permissions = $arr; + + return $this; + } + + /** + * The condition that determines whether this deny rule applies to a request. + * If the condition expression evaluates to `true`, then the deny rule is + * applied; otherwise, the deny rule is not applied. + * Each deny rule is evaluated independently. If this deny rule does not apply + * to a request, other deny rules might still apply. + * The condition can use CEL functions that evaluate + * [resource + * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other + * functions and operators are not supported. + * + * Generated from protobuf field .google.type.Expr denial_condition = 5; + * @return \Google\Type\Expr|null + */ + public function getDenialCondition() + { + return $this->denial_condition; + } + + public function hasDenialCondition() + { + return isset($this->denial_condition); + } + + public function clearDenialCondition() + { + unset($this->denial_condition); + } + + /** + * The condition that determines whether this deny rule applies to a request. + * If the condition expression evaluates to `true`, then the deny rule is + * applied; otherwise, the deny rule is not applied. + * Each deny rule is evaluated independently. If this deny rule does not apply + * to a request, other deny rules might still apply. + * The condition can use CEL functions that evaluate + * [resource + * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other + * functions and operators are not supported. + * + * Generated from protobuf field .google.type.Expr denial_condition = 5; + * @param \Google\Type\Expr $var + * @return $this + */ + public function setDenialCondition($var) + { + GPBUtil::checkMessage($var, \Google\Type\Expr::class); + $this->denial_condition = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/GetPolicyRequest.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/GetPolicyRequest.php new file mode 100644 index 000000000000..4b02f1d7a6ff --- /dev/null +++ b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/GetPolicyRequest.php @@ -0,0 +1,91 @@ +google.iam.v2.GetPolicyRequest + */ +class GetPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the policy to retrieve. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + * Use the URL-encoded full resource name, which means that the forward-slash + * character, `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric 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. The resource name of the policy to retrieve. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + * Use the URL-encoded full resource name, which means that the forward-slash + * character, `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\V2\Policy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the policy to retrieve. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + * Use the URL-encoded full resource name, which means that the forward-slash + * character, `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric ID. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the policy to retrieve. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + * Use the URL-encoded full resource name, which means that the forward-slash + * character, `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric 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/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesRequest.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesRequest.php new file mode 100644 index 000000000000..1573013d9d62 --- /dev/null +++ b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesRequest.php @@ -0,0 +1,175 @@ +google.iam.v2.ListPoliciesRequest + */ +class ListPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource that the policy is attached to, along with the kind of policy + * to list. Format: + * `policies/{attachment_point}/denypolicies` + * The attachment point is identified by its URL-encoded full resource name, + * which means that the forward-slash character, `/`, must be written as + * `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric ID. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * The maximum number of policies to return. IAM ignores this value and uses + * the value 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + * retrieve the next page. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource that the policy is attached to, along with the kind of policy + * to list. Format: + * `policies/{attachment_point}/denypolicies` + * The attachment point is identified by its URL-encoded full resource name, + * which means that the forward-slash character, `/`, must be written as + * `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric ID. + * @type int $page_size + * The maximum number of policies to return. IAM ignores this value and uses + * the value 1000. + * @type string $page_token + * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + * retrieve the next page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\V2\Policy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource that the policy is attached to, along with the kind of policy + * to list. Format: + * `policies/{attachment_point}/denypolicies` + * The attachment point is identified by its URL-encoded full resource name, + * which means that the forward-slash character, `/`, must be written as + * `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric ID. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource that the policy is attached to, along with the kind of policy + * to list. Format: + * `policies/{attachment_point}/denypolicies` + * The attachment point is identified by its URL-encoded full resource name, + * which means that the forward-slash character, `/`, must be written as + * `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric ID. + * + * 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; + } + + /** + * The maximum number of policies to return. IAM ignores this value and uses + * the value 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of policies to return. IAM ignores this value and uses + * the value 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 in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + * retrieve the next page. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + * retrieve the next page. + * + * 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/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesResponse.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesResponse.php new file mode 100644 index 000000000000..c2749f099b28 --- /dev/null +++ b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesResponse.php @@ -0,0 +1,105 @@ +google.iam.v2.ListPoliciesResponse + */ +class ListPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Metadata for the policies that are attached to the resource. + * + * Generated from protobuf field repeated .google.iam.v2.Policy policies = 1; + */ + private $policies; + /** + * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + * next page. If this field is omitted, there are no additional 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\Iam\V2\Policy>|\Google\Protobuf\Internal\RepeatedField $policies + * Metadata for the policies that are attached to the resource. + * @type string $next_page_token + * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + * next page. If this field is omitted, there are no additional pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\V2\Policy::initOnce(); + parent::__construct($data); + } + + /** + * Metadata for the policies that are attached to the resource. + * + * Generated from protobuf field repeated .google.iam.v2.Policy policies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPolicies() + { + return $this->policies; + } + + /** + * Metadata for the policies that are attached to the resource. + * + * Generated from protobuf field repeated .google.iam.v2.Policy policies = 1; + * @param array<\Google\Cloud\Iam\V2\Policy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iam\V2\Policy::class); + $this->policies = $arr; + + return $this; + } + + /** + * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + * next page. If this field is omitted, there are no additional pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + * next page. If this field is omitted, there are no additional 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/Iam/v2/proto/src/Google/Cloud/Iam/V2/PoliciesGrpcClient.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PoliciesGrpcClient.php new file mode 100644 index 000000000000..c4e5d79b4cdb --- /dev/null +++ b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PoliciesGrpcClient.php @@ -0,0 +1,124 @@ +_simpleRequest('/google.iam.v2.Policies/ListPolicies', + $argument, + ['\Google\Cloud\Iam\V2\ListPoliciesResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets a policy. + * @param \Google\Cloud\Iam\V2\GetPolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetPolicy(\Google\Cloud\Iam\V2\GetPolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.iam.v2.Policies/GetPolicy', + $argument, + ['\Google\Cloud\Iam\V2\Policy', 'decode'], + $metadata, $options); + } + + /** + * Creates a policy. + * @param \Google\Cloud\Iam\V2\CreatePolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreatePolicy(\Google\Cloud\Iam\V2\CreatePolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.iam.v2.Policies/CreatePolicy', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates the specified policy. + * + * You can update only the rules and the display name for the policy. + * + * To update a policy, you should use a read-modify-write loop: + * + * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. + * 2. Modify the policy as needed. + * 3. Use `UpdatePolicy` to write the updated policy. + * + * This pattern helps prevent conflicts between concurrent updates. + * @param \Google\Cloud\Iam\V2\UpdatePolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdatePolicy(\Google\Cloud\Iam\V2\UpdatePolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.iam.v2.Policies/UpdatePolicy', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a policy. This action is permanent. + * @param \Google\Cloud\Iam\V2\DeletePolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeletePolicy(\Google\Cloud\Iam\V2\DeletePolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.iam.v2.Policies/DeletePolicy', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/Policy.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/Policy.php new file mode 100644 index 000000000000..79dfa8b27141 --- /dev/null +++ b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/Policy.php @@ -0,0 +1,505 @@ +google.iam.v2.Policy + */ +class Policy extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The resource name of the `Policy`, which must be unique. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + * The attachment point is identified by its URL-encoded full resource name, + * which means that the forward-slash character, `/`, must be written as + * `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, requests can use the alphanumeric or the numeric ID. + * Responses always contain the numeric ID. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + * `Policy` is created. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $uid = ''; + /** + * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. + * + * Generated from protobuf field string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $kind = ''; + /** + * A user-specified description of the `Policy`. This value can be up to 63 + * characters. + * + * Generated from protobuf field string display_name = 4; + */ + protected $display_name = ''; + /** + * A key-value map to store arbitrary metadata for the `Policy`. Keys + * can be up to 63 characters. Values can be up to 255 characters. + * + * Generated from protobuf field map annotations = 5; + */ + private $annotations; + /** + * An opaque tag that identifies the current version of the `Policy`. IAM uses + * this value to help manage concurrent updates, so they do not cause one + * update to be overwritten by another. + * If this field is present in a [CreatePolicy][] request, the value is + * ignored. + * + * Generated from protobuf field string etag = 6; + */ + protected $etag = ''; + /** + * Output only. The time when the `Policy` 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 time when the `Policy` was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * A list of rules that specify the behavior of the `Policy`. All of the rules + * should be of the `kind` specified in the `Policy`. + * + * Generated from protobuf field repeated .google.iam.v2.PolicyRule rules = 10; + */ + private $rules; + /** + * Immutable. Specifies that this policy is managed by an authority and can only be + * modified by that authority. Usage is restricted. + * + * Generated from protobuf field string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $managing_authority = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The resource name of the `Policy`, which must be unique. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + * The attachment point is identified by its URL-encoded full resource name, + * which means that the forward-slash character, `/`, must be written as + * `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, requests can use the alphanumeric or the numeric ID. + * Responses always contain the numeric ID. + * @type string $uid + * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + * `Policy` is created. + * @type string $kind + * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. + * @type string $display_name + * A user-specified description of the `Policy`. This value can be up to 63 + * characters. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * A key-value map to store arbitrary metadata for the `Policy`. Keys + * can be up to 63 characters. Values can be up to 255 characters. + * @type string $etag + * An opaque tag that identifies the current version of the `Policy`. IAM uses + * this value to help manage concurrent updates, so they do not cause one + * update to be overwritten by another. + * If this field is present in a [CreatePolicy][] request, the value is + * ignored. + * @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 last updated. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. + * @type array<\Google\Cloud\Iam\V2\PolicyRule>|\Google\Protobuf\Internal\RepeatedField $rules + * A list of rules that specify the behavior of the `Policy`. All of the rules + * should be of the `kind` specified in the `Policy`. + * @type string $managing_authority + * Immutable. Specifies that this policy is managed by an authority and can only be + * modified by that authority. Usage is restricted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\V2\Policy::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The resource name of the `Policy`, which must be unique. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + * The attachment point is identified by its URL-encoded full resource name, + * which means that the forward-slash character, `/`, must be written as + * `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, requests can use the alphanumeric or the numeric ID. + * Responses always contain the numeric ID. + * + * 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`, which must be unique. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + * The attachment point is identified by its URL-encoded full resource name, + * which means that the forward-slash character, `/`, must be written as + * `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, requests can use the alphanumeric or the numeric ID. + * Responses always contain the numeric 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; + } + + /** + * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + * `Policy` is created. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + * `Policy` is created. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. + * + * Generated from protobuf field string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. + * + * Generated from protobuf field string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * A user-specified description of the `Policy`. This value can be up to 63 + * characters. + * + * Generated from protobuf field string display_name = 4; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A user-specified description of the `Policy`. This value can be up to 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 key-value map to store arbitrary metadata for the `Policy`. Keys + * can be up to 63 characters. Values can be up to 255 characters. + * + * Generated from protobuf field map annotations = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * A key-value map to store arbitrary metadata for the `Policy`. Keys + * can be up to 63 characters. Values can be up to 255 characters. + * + * Generated from protobuf field map annotations = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * An opaque tag that identifies the current version of the `Policy`. IAM uses + * this value to help manage concurrent updates, so they do not cause one + * update to be overwritten by another. + * If this field is present in a [CreatePolicy][] request, the value is + * ignored. + * + * Generated from protobuf field string etag = 6; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * An opaque tag that identifies the current version of the `Policy`. IAM uses + * this value to help manage concurrent updates, so they do not cause one + * update to be overwritten by another. + * If this field is present in a [CreatePolicy][] request, the value is + * ignored. + * + * Generated from protobuf field string etag = 6; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. The time when the `Policy` 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 when the `Policy` 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 time when the `Policy` 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. The time when the `Policy` 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; + } + + /** + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * A list of rules that specify the behavior of the `Policy`. All of the rules + * should be of the `kind` specified in the `Policy`. + * + * Generated from protobuf field repeated .google.iam.v2.PolicyRule rules = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * A list of rules that specify the behavior of the `Policy`. All of the rules + * should be of the `kind` specified in the `Policy`. + * + * Generated from protobuf field repeated .google.iam.v2.PolicyRule rules = 10; + * @param array<\Google\Cloud\Iam\V2\PolicyRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iam\V2\PolicyRule::class); + $this->rules = $arr; + + return $this; + } + + /** + * Immutable. Specifies that this policy is managed by an authority and can only be + * modified by that authority. Usage is restricted. + * + * Generated from protobuf field string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getManagingAuthority() + { + return $this->managing_authority; + } + + /** + * Immutable. Specifies that this policy is managed by an authority and can only be + * modified by that authority. Usage is restricted. + * + * Generated from protobuf field string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setManagingAuthority($var) + { + GPBUtil::checkString($var, True); + $this->managing_authority = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyOperationMetadata.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyOperationMetadata.php new file mode 100644 index 000000000000..bcaa57148115 --- /dev/null +++ b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyOperationMetadata.php @@ -0,0 +1,77 @@ +google.iam.v2.PolicyOperationMetadata + */ +class PolicyOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Timestamp when the `google.longrunning.Operation` was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Timestamp when the `google.longrunning.Operation` was created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\V2\Policy::initOnce(); + parent::__construct($data); + } + + /** + * Timestamp when the `google.longrunning.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); + } + + /** + * Timestamp when the `google.longrunning.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; + } + +} + diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyRule.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyRule.php new file mode 100644 index 000000000000..2691d8de2f72 --- /dev/null +++ b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyRule.php @@ -0,0 +1,113 @@ +google.iam.v2.PolicyRule + */ +class PolicyRule extends \Google\Protobuf\Internal\Message +{ + /** + * A user-specified description of the rule. This value can be up to 256 + * characters. + * + * Generated from protobuf field string description = 1; + */ + protected $description = ''; + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Iam\V2\DenyRule $deny_rule + * A rule for a deny policy. + * @type string $description + * A user-specified description of the rule. This value can be up to 256 + * characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\V2\Policy::initOnce(); + parent::__construct($data); + } + + /** + * A rule for a deny policy. + * + * Generated from protobuf field .google.iam.v2.DenyRule deny_rule = 2; + * @return \Google\Cloud\Iam\V2\DenyRule|null + */ + public function getDenyRule() + { + return $this->readOneof(2); + } + + public function hasDenyRule() + { + return $this->hasOneof(2); + } + + /** + * A rule for a deny policy. + * + * Generated from protobuf field .google.iam.v2.DenyRule deny_rule = 2; + * @param \Google\Cloud\Iam\V2\DenyRule $var + * @return $this + */ + public function setDenyRule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iam\V2\DenyRule::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A user-specified description of the rule. This value can be up to 256 + * characters. + * + * Generated from protobuf field string description = 1; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A user-specified description of the rule. This value can be up to 256 + * characters. + * + * 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; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/UpdatePolicyRequest.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/UpdatePolicyRequest.php new file mode 100644 index 000000000000..da476fab3dce --- /dev/null +++ b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/UpdatePolicyRequest.php @@ -0,0 +1,89 @@ +google.iam.v2.UpdatePolicyRequest + */ +class UpdatePolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The policy to update. + * To prevent conflicting updates, the `etag` value must match the value that + * is stored in IAM. If the `etag` values do not match, the request fails with + * a `409` error code and `ABORTED` status. + * + * Generated from protobuf field .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Iam\V2\Policy $policy + * Required. The policy to update. + * To prevent conflicting updates, the `etag` value must match the value that + * is stored in IAM. If the `etag` values do not match, the request fails with + * a `409` error code and `ABORTED` status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\V2\Policy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The policy to update. + * To prevent conflicting updates, the `etag` value must match the value that + * is stored in IAM. If the `etag` values do not match, the request fails with + * a `409` error code and `ABORTED` status. + * + * Generated from protobuf field .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Iam\V2\Policy|null + */ + public function getPolicy() + { + return $this->policy; + } + + public function hasPolicy() + { + return isset($this->policy); + } + + public function clearPolicy() + { + unset($this->policy); + } + + /** + * Required. The policy to update. + * To prevent conflicting updates, the `etag` value must match the value that + * is stored in IAM. If the `etag` values do not match, the request fails with + * a `409` error code and `ABORTED` status. + * + * Generated from protobuf field .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Iam\V2\Policy $var + * @return $this + */ + public function setPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iam\V2\Policy::class); + $this->policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/create_policy.php b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/create_policy.php new file mode 100644 index 000000000000..446dd916febe --- /dev/null +++ b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/create_policy.php @@ -0,0 +1,90 @@ +createPolicy($parent, $policy); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Policy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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_policy_sample($parent); +} +// [END iam_v2_generated_Policies_CreatePolicy_sync] diff --git a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/delete_policy.php b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/delete_policy.php new file mode 100644 index 000000000000..2e5eebdbf025 --- /dev/null +++ b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/delete_policy.php @@ -0,0 +1,86 @@ +deletePolicy($name); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Policy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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_policy_sample($name); +} +// [END iam_v2_generated_Policies_DeletePolicy_sync] diff --git a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/get_policy.php b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/get_policy.php new file mode 100644 index 000000000000..3a595cfb4eab --- /dev/null +++ b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/get_policy.php @@ -0,0 +1,74 @@ +getPolicy($name); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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_policy_sample($name); +} +// [END iam_v2_generated_Policies_GetPolicy_sync] diff --git a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/list_policies.php b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/list_policies.php new file mode 100644 index 000000000000..3b00a41ff1c4 --- /dev/null +++ b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/list_policies.php @@ -0,0 +1,85 @@ +listPolicies($parent); + + /** @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 +{ + $parent = '[PARENT]'; + + list_policies_sample($parent); +} +// [END iam_v2_generated_Policies_ListPolicies_sync] diff --git a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/update_policy.php b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/update_policy.php new file mode 100644 index 000000000000..e557f00a9091 --- /dev/null +++ b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/update_policy.php @@ -0,0 +1,78 @@ +updatePolicy($policy); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Policy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + 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 iam_v2_generated_Policies_UpdatePolicy_sync] diff --git a/owl-bot-staging/Iam/v2/src/V2/Gapic/PoliciesGapicClient.php b/owl-bot-staging/Iam/v2/src/V2/Gapic/PoliciesGapicClient.php new file mode 100644 index 000000000000..6a3c6aec38d0 --- /dev/null +++ b/owl-bot-staging/Iam/v2/src/V2/Gapic/PoliciesGapicClient.php @@ -0,0 +1,598 @@ +createPolicy($parent, $policy); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $policiesClient->createPolicy($parent, $policy); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $policiesClient->resumeOperation($operationName, 'createPolicy'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $policiesClient->close(); + * } + * ``` + */ +class PoliciesGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.iam.v2.Policies'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'iam.googleapis.com'; + + /** 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 $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/policies_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/policies_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/policies_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/policies_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; + } + + /** + * 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 'iam.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a policy. + * + * Sample code: + * ``` + * $policiesClient = new PoliciesClient(); + * try { + * $parent = 'parent'; + * $policy = new Policy(); + * $operationResponse = $policiesClient->createPolicy($parent, $policy); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $policiesClient->createPolicy($parent, $policy); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $policiesClient->resumeOperation($operationName, 'createPolicy'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $policiesClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource that the policy is attached to, along with the kind of policy + * to create. Format: `policies/{attachment_point}/denypolicies` + * + * + * The attachment point is identified by its URL-encoded full resource name, + * which means that the forward-slash character, `/`, must be written as + * `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + * + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric ID. + * @param Policy $policy Required. The policy to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $policyId + * The ID to use for this policy, which will become the final component of + * the policy's resource name. The ID must contain 3 to 63 characters. It can + * contain lowercase letters and numbers, as well as dashes (`-`) and periods + * (`.`). The first character must be a lowercase letter. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createPolicy($parent, $policy, array $optionalArgs = []) + { + $request = new CreatePolicyRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setPolicy($policy); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['policyId'])) { + $request->setPolicyId($optionalArgs['policyId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreatePolicy', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a policy. This action is permanent. + * + * Sample code: + * ``` + * $policiesClient = new PoliciesClient(); + * try { + * $name = 'name'; + * $operationResponse = $policiesClient->deletePolicy($name); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $policiesClient->deletePolicy($name); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $policiesClient->resumeOperation($operationName, 'deletePolicy'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $policiesClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the policy to delete. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + * + * + * Use the URL-encoded full resource name, which means that the forward-slash + * character, `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + * + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric ID. + * @param array $optionalArgs { + * Optional. + * + * @type string $etag + * Optional. The expected `etag` of the policy to delete. If the value does not match + * the value that is stored in IAM, the request fails with a `409` error code + * and `ABORTED` status. + * + * If you omit this field, the policy is deleted regardless of its current + * `etag`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deletePolicy($name, array $optionalArgs = []) + { + $request = new DeletePolicyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeletePolicy', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets a policy. + * + * Sample code: + * ``` + * $policiesClient = new PoliciesClient(); + * try { + * $name = 'name'; + * $response = $policiesClient->getPolicy($name); + * } finally { + * $policiesClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the policy to retrieve. Format: + * `policies/{attachment_point}/denypolicies/{policy_id}` + * + * + * Use the URL-encoded full resource name, which means that the forward-slash + * character, `/`, must be written as `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. + * + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric 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\Iam\V2\Policy + * + * @throws ApiException if the remote call fails + */ + public function getPolicy($name, array $optionalArgs = []) + { + $request = new GetPolicyRequest(); + $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('GetPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves the policies of the specified kind that are attached to a + * resource. + * + * The response lists only policy metadata. In particular, policy rules are + * omitted. + * + * Sample code: + * ``` + * $policiesClient = new PoliciesClient(); + * try { + * $parent = 'parent'; + * // Iterate over pages of elements + * $pagedResponse = $policiesClient->listPolicies($parent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $policiesClient->listPolicies($parent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $policiesClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource that the policy is attached to, along with the kind of policy + * to list. Format: + * `policies/{attachment_point}/denypolicies` + * + * + * The attachment point is identified by its URL-encoded full resource name, + * which means that the forward-slash character, `/`, must be written as + * `%2F`. For example, + * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. + * + * For organizations and folders, use the numeric ID in the full resource + * name. For projects, you can use the alphanumeric or the numeric 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 RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listPolicies($parent, array $optionalArgs = []) + { + $request = new ListPoliciesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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('ListPolicies', $optionalArgs, ListPoliciesResponse::class, $request); + } + + /** + * Updates the specified policy. + * + * You can update only the rules and the display name for the policy. + * + * To update a policy, you should use a read-modify-write loop: + * + * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. + * 2. Modify the policy as needed. + * 3. Use `UpdatePolicy` to write the updated policy. + * + * This pattern helps prevent conflicts between concurrent updates. + * + * Sample code: + * ``` + * $policiesClient = new PoliciesClient(); + * try { + * $policy = new Policy(); + * $operationResponse = $policiesClient->updatePolicy($policy); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $policiesClient->updatePolicy($policy); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $policiesClient->resumeOperation($operationName, 'updatePolicy'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $policiesClient->close(); + * } + * ``` + * + * @param Policy $policy Required. The policy to update. + * + * To prevent conflicting updates, the `etag` value must match the value that + * is stored in IAM. If the `etag` values do not match, the request fails with + * a `409` error code and `ABORTED` status. + * @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\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updatePolicy($policy, array $optionalArgs = []) + { + $request = new UpdatePolicyRequest(); + $requestParamHeaders = []; + $request->setPolicy($policy); + $requestParamHeaders['policy.name'] = $policy->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdatePolicy', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/Iam/v2/src/V2/PoliciesClient.php b/owl-bot-staging/Iam/v2/src/V2/PoliciesClient.php new file mode 100644 index 000000000000..d0acebc4ea23 --- /dev/null +++ b/owl-bot-staging/Iam/v2/src/V2/PoliciesClient.php @@ -0,0 +1,34 @@ + [ + 'google.iam.v2.Policies' => [ + 'CreatePolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Iam\V2\Policy', + 'metadataReturnType' => '\Google\Cloud\Iam\V2\PolicyOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeletePolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Iam\V2\Policy', + 'metadataReturnType' => '\Google\Cloud\Iam\V2\PolicyOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'UpdatePolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Iam\V2\Policy', + 'metadataReturnType' => '\Google\Cloud\Iam\V2\PolicyOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPolicies', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Iam/v2/src/V2/resources/policies_rest_client_config.php b/owl-bot-staging/Iam/v2/src/V2/resources/policies_rest_client_config.php new file mode 100644 index 000000000000..37374681f440 --- /dev/null +++ b/owl-bot-staging/Iam/v2/src/V2/resources/policies_rest_client_config.php @@ -0,0 +1,80 @@ + [ + 'google.iam.v2.Policies' => [ + 'CreatePolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=policies/*/*}', + 'body' => 'policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeletePolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=policies/*/*/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=policies/*/*/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=policies/*/*}', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdatePolicy' => [ + 'method' => 'put', + 'uriTemplate' => '/v2/{policy.name=policies/*/*/*}', + 'body' => 'policy', + 'placeholders' => [ + 'policy.name' => [ + 'getters' => [ + 'getPolicy', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=policies/*/*/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Iam/v2/tests/Unit/V2/PoliciesClientTest.php b/owl-bot-staging/Iam/v2/tests/Unit/V2/PoliciesClientTest.php new file mode 100644 index 000000000000..9f1626edc41d --- /dev/null +++ b/owl-bot-staging/Iam/v2/tests/Unit/V2/PoliciesClientTest.php @@ -0,0 +1,595 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return PoliciesClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new PoliciesClient($options); + } + + /** @test */ + public function createPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $kind = 'kind3292052'; + $displayName = 'displayName1615086568'; + $etag = 'etag3123477'; + $managingAuthority = 'managingAuthority617792550'; + $expectedResponse = new Policy(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setKind($kind); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEtag($etag); + $expectedResponse->setManagingAuthority($managingAuthority); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $parent = 'parent-995424086'; + $policy = new Policy(); + $response = $gapicClient->createPolicy($parent, $policy); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v2.Policies/CreatePolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualApiRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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'; + $policy = new Policy(); + $response = $gapicClient->createPolicy($parent, $policy); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $kind = 'kind3292052'; + $displayName = 'displayName1615086568'; + $etag2 = 'etag2-1293302904'; + $managingAuthority = 'managingAuthority617792550'; + $expectedResponse = new Policy(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setKind($kind); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEtag($etag2); + $expectedResponse->setManagingAuthority($managingAuthority); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deletePolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->deletePolicy($name); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v2.Policies/DeletePolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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'; + $response = $gapicClient->deletePolicy($name); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $kind = 'kind3292052'; + $displayName = 'displayName1615086568'; + $etag = 'etag3123477'; + $managingAuthority = 'managingAuthority617792550'; + $expectedResponse = new Policy(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setKind($kind); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEtag($etag); + $expectedResponse->setManagingAuthority($managingAuthority); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->getPolicy($name); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v2.Policies/GetPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $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 + $name = 'name3373707'; + try { + $gapicClient->getPolicy($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 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 + $parent = 'parent-995424086'; + $response = $gapicClient->listPolicies($parent); + $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.iam.v2.Policies/ListPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $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 + $parent = 'parent-995424086'; + try { + $gapicClient->listPolicies($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 updatePolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $kind = 'kind3292052'; + $displayName = 'displayName1615086568'; + $etag = 'etag3123477'; + $managingAuthority = 'managingAuthority617792550'; + $expectedResponse = new Policy(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setKind($kind); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEtag($etag); + $expectedResponse->setManagingAuthority($managingAuthority); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updatePolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $policy = new Policy(); + $response = $gapicClient->updatePolicy($policy); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v2.Policies/UpdatePolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updatePolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $policy = new Policy(); + $response = $gapicClient->updatePolicy($policy); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Common.php b/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Common.php new file mode 100644 index 000000000000..fadb9cb46821 --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Common.php @@ -0,0 +1,66 @@ +internalAddGeneratedFile( + ' +ÿ +&google/iam/credentials/v1/common.protogoogle.iam.credentials.v1google/api/resource.protogoogle/protobuf/duration.protogoogle/protobuf/timestamp.proto"© +GenerateAccessTokenRequest7 +name ( B)àAúA# +!iam.googleapis.com/ServiceAccount + delegates (  +scope ( BàA+ +lifetime ( 2.google.protobuf.Duration"d +GenerateAccessTokenResponse + access_token ( / + expire_time ( 2.google.protobuf.Timestamp"s +SignBlobRequest7 +name ( B)àAúA# +!iam.googleapis.com/ServiceAccount + delegates (  +payload ( BàA"7 +SignBlobResponse +key_id (  + signed_blob ( "r +SignJwtRequest7 +name ( B)àAúA# +!iam.googleapis.com/ServiceAccount + delegates (  +payload ( BàA"5 +SignJwtResponse +key_id (  + +signed_jwt ( "’ +GenerateIdTokenRequest7 +name ( B)àAúA# +!iam.googleapis.com/ServiceAccount + delegates (  +audience ( BàA + include_email ("( +GenerateIdTokenResponse +token ( B« +#com.google.cloud.iam.credentials.v1BIAMCredentialsCommonProtoPZDgoogle.golang.org/genproto/googleapis/iam/credentials/v1;credentialsøªGoogle.Cloud.Iam.Credentials.V1ÊGoogle\\Cloud\\Iam\\Credentials\\V1êAY +!iam.googleapis.com/ServiceAccount4projects/{project}/serviceAccounts/{service_account}bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Iamcredentials.php b/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Iamcredentials.php new file mode 100644 index 000000000000..41d6ac08850d --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Iamcredentials.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile( + ' + + +.google/iam/credentials/v1/iamcredentials.protogoogle.iam.credentials.v1google/api/client.proto&google/iam/credentials/v1/common.proto2­ +IAMCredentialsì +GenerateAccessToken5.google.iam.credentials.v1.GenerateAccessTokenRequest6.google.iam.credentials.v1.GenerateAccessTokenResponse"f‚Óä“@";/v1/{name=projects/*/serviceAccounts/*}:generateAccessToken:*ÚAname,delegates,scope,lifetimeä +GenerateIdToken1.google.iam.credentials.v1.GenerateIdTokenRequest2.google.iam.credentials.v1.GenerateIdTokenResponse"j‚Óä“<"7/v1/{name=projects/*/serviceAccounts/*}:generateIdToken:*ÚA%name,delegates,audience,include_email¹ +SignBlob*.google.iam.credentials.v1.SignBlobRequest+.google.iam.credentials.v1.SignBlobResponse"T‚Óä“5"0/v1/{name=projects/*/serviceAccounts/*}:signBlob:*ÚAname,delegates,payloadµ +SignJwt).google.iam.credentials.v1.SignJwtRequest*.google.iam.credentials.v1.SignJwtResponse"S‚Óä“4"//v1/{name=projects/*/serviceAccounts/*}:signJwt:*ÚAname,delegates,payloadQÊAiamcredentials.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÉ +#com.google.cloud.iam.credentials.v1BIAMCredentialsProtoPZDgoogle.golang.org/genproto/googleapis/iam/credentials/v1;credentialsøªGoogle.Cloud.Iam.Credentials.V1ÊGoogle\\Cloud\\Iam\\Credentials\\V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenRequest.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenRequest.php new file mode 100644 index 000000000000..c52fa03abdc2 --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenRequest.php @@ -0,0 +1,245 @@ +google.iam.credentials.v1.GenerateAccessTokenRequest + */ +class GenerateAccessTokenRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field repeated string delegates = 2; + */ + private $delegates; + /** + * Required. Code to identify the scopes to be included in the OAuth 2.0 access token. + * See https://developers.google.com/identity/protocols/googlescopes for more + * information. + * At least one value required. + * + * Generated from protobuf field repeated string scope = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $scope; + /** + * The desired lifetime duration of the access token in seconds. + * Must be set to a value less than or equal to 3600 (1 hour). If a value is + * not specified, the token's lifetime will be set to a default value of one + * hour. + * + * Generated from protobuf field .google.protobuf.Duration lifetime = 7; + */ + protected $lifetime = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @type array|\Google\Protobuf\Internal\RepeatedField $delegates + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @type array|\Google\Protobuf\Internal\RepeatedField $scope + * Required. Code to identify the scopes to be included in the OAuth 2.0 access token. + * See https://developers.google.com/identity/protocols/googlescopes for more + * information. + * At least one value required. + * @type \Google\Protobuf\Duration $lifetime + * The desired lifetime duration of the access token in seconds. + * Must be set to a value less than or equal to 3600 (1 hour). If a value is + * not specified, the token's lifetime will be set to a default value of one + * hour. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated 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 service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field repeated string delegates = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDelegates() + { + return $this->delegates; + } + + /** + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field repeated string delegates = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDelegates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->delegates = $arr; + + return $this; + } + + /** + * Required. Code to identify the scopes to be included in the OAuth 2.0 access token. + * See https://developers.google.com/identity/protocols/googlescopes for more + * information. + * At least one value required. + * + * Generated from protobuf field repeated string scope = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScope() + { + return $this->scope; + } + + /** + * Required. Code to identify the scopes to be included in the OAuth 2.0 access token. + * See https://developers.google.com/identity/protocols/googlescopes for more + * information. + * At least one value required. + * + * Generated from protobuf field repeated string scope = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScope($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->scope = $arr; + + return $this; + } + + /** + * The desired lifetime duration of the access token in seconds. + * Must be set to a value less than or equal to 3600 (1 hour). If a value is + * not specified, the token's lifetime will be set to a default value of one + * hour. + * + * Generated from protobuf field .google.protobuf.Duration lifetime = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getLifetime() + { + return $this->lifetime; + } + + public function hasLifetime() + { + return isset($this->lifetime); + } + + public function clearLifetime() + { + unset($this->lifetime); + } + + /** + * The desired lifetime duration of the access token in seconds. + * Must be set to a value less than or equal to 3600 (1 hour). If a value is + * not specified, the token's lifetime will be set to a default value of one + * hour. + * + * Generated from protobuf field .google.protobuf.Duration lifetime = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setLifetime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->lifetime = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenResponse.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenResponse.php new file mode 100644 index 000000000000..d9cc2fe9f2d5 --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenResponse.php @@ -0,0 +1,113 @@ +google.iam.credentials.v1.GenerateAccessTokenResponse + */ +class GenerateAccessTokenResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The OAuth 2.0 access token. + * + * Generated from protobuf field string access_token = 1; + */ + protected $access_token = ''; + /** + * Token expiration time. + * The expiration time is always set. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; + */ + 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 + * Token expiration time. + * The expiration time is always set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\Credentials\V1\Common::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; + } + + /** + * Token expiration time. + * The expiration time is always set. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; + * @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); + } + + /** + * Token expiration time. + * The expiration time is always set. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; + * @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/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenRequest.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenRequest.php new file mode 100644 index 000000000000..8db3ebfde699 --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenRequest.php @@ -0,0 +1,219 @@ +google.iam.credentials.v1.GenerateIdTokenRequest + */ +class GenerateIdTokenRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field repeated string delegates = 2; + */ + private $delegates; + /** + * Required. The audience for the token, such as the API or account that this token + * grants access to. + * + * Generated from protobuf field string audience = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $audience = ''; + /** + * Include the service account email in the token. If set to `true`, the + * token will contain `email` and `email_verified` claims. + * + * Generated from protobuf field bool include_email = 4; + */ + protected $include_email = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @type array|\Google\Protobuf\Internal\RepeatedField $delegates + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @type string $audience + * Required. The audience for the token, such as the API or account that this token + * grants access to. + * @type bool $include_email + * Include the service account email in the token. If set to `true`, the + * token will contain `email` and `email_verified` claims. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated 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 service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field repeated string delegates = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDelegates() + { + return $this->delegates; + } + + /** + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field repeated string delegates = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDelegates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->delegates = $arr; + + return $this; + } + + /** + * Required. The audience for the token, such as the API or account that this token + * grants access to. + * + * Generated from protobuf field string audience = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAudience() + { + return $this->audience; + } + + /** + * Required. The audience for the token, such as the API or account that this token + * grants access to. + * + * Generated from protobuf field string audience = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAudience($var) + { + GPBUtil::checkString($var, True); + $this->audience = $var; + + return $this; + } + + /** + * Include the service account email in the token. If set to `true`, the + * token will contain `email` and `email_verified` claims. + * + * Generated from protobuf field bool include_email = 4; + * @return bool + */ + public function getIncludeEmail() + { + return $this->include_email; + } + + /** + * Include the service account email in the token. If set to `true`, the + * token will contain `email` and `email_verified` claims. + * + * Generated from protobuf field bool include_email = 4; + * @param bool $var + * @return $this + */ + public function setIncludeEmail($var) + { + GPBUtil::checkBool($var); + $this->include_email = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenResponse.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenResponse.php new file mode 100644 index 000000000000..17171c522436 --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenResponse.php @@ -0,0 +1,65 @@ +google.iam.credentials.v1.GenerateIdTokenResponse + */ +class GenerateIdTokenResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The OpenId Connect ID token. + * + * Generated from protobuf field string token = 1; + */ + protected $token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $token + * The OpenId Connect ID token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The OpenId Connect ID token. + * + * Generated from protobuf field string token = 1; + * @return string + */ + public function getToken() + { + return $this->token; + } + + /** + * The OpenId Connect ID token. + * + * Generated from protobuf field string token = 1; + * @param string $var + * @return $this + */ + public function setToken($var) + { + GPBUtil::checkString($var, True); + $this->token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/IAMCredentialsGrpcClient.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/IAMCredentialsGrpcClient.php new file mode 100644 index 000000000000..8695ed8b6e29 --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/IAMCredentialsGrpcClient.php @@ -0,0 +1,103 @@ +_simpleRequest('/google.iam.credentials.v1.IAMCredentials/GenerateAccessToken', + $argument, + ['\Google\Cloud\Iam\Credentials\V1\GenerateAccessTokenResponse', 'decode'], + $metadata, $options); + } + + /** + * Generates an OpenID Connect ID token for a service account. + * @param \Google\Cloud\Iam\Credentials\V1\GenerateIdTokenRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GenerateIdToken(\Google\Cloud\Iam\Credentials\V1\GenerateIdTokenRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.iam.credentials.v1.IAMCredentials/GenerateIdToken', + $argument, + ['\Google\Cloud\Iam\Credentials\V1\GenerateIdTokenResponse', 'decode'], + $metadata, $options); + } + + /** + * Signs a blob using a service account's system-managed private key. + * @param \Google\Cloud\Iam\Credentials\V1\SignBlobRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SignBlob(\Google\Cloud\Iam\Credentials\V1\SignBlobRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.iam.credentials.v1.IAMCredentials/SignBlob', + $argument, + ['\Google\Cloud\Iam\Credentials\V1\SignBlobResponse', 'decode'], + $metadata, $options); + } + + /** + * Signs a JWT using a service account's system-managed private key. + * @param \Google\Cloud\Iam\Credentials\V1\SignJwtRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SignJwt(\Google\Cloud\Iam\Credentials\V1\SignJwtRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.iam.credentials.v1.IAMCredentials/SignJwt', + $argument, + ['\Google\Cloud\Iam\Credentials\V1\SignJwtResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobRequest.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobRequest.php new file mode 100644 index 000000000000..7142fadbba6b --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobRequest.php @@ -0,0 +1,177 @@ +google.iam.credentials.v1.SignBlobRequest + */ +class SignBlobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field repeated string delegates = 3; + */ + private $delegates; + /** + * Required. The bytes to sign. + * + * Generated from protobuf field bytes payload = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $payload = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @type array|\Google\Protobuf\Internal\RepeatedField $delegates + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @type string $payload + * Required. The bytes to sign. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated 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 service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field repeated string delegates = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDelegates() + { + return $this->delegates; + } + + /** + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field repeated string delegates = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDelegates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->delegates = $arr; + + return $this; + } + + /** + * Required. The bytes to sign. + * + * Generated from protobuf field bytes payload = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPayload() + { + return $this->payload; + } + + /** + * Required. The bytes to sign. + * + * Generated from protobuf field bytes payload = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkString($var, False); + $this->payload = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobResponse.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobResponse.php new file mode 100644 index 000000000000..b416997364ea --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobResponse.php @@ -0,0 +1,99 @@ +google.iam.credentials.v1.SignBlobResponse + */ +class SignBlobResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the key used to sign the blob. + * + * Generated from protobuf field string key_id = 1; + */ + protected $key_id = ''; + /** + * The signed blob. + * + * Generated from protobuf field bytes signed_blob = 4; + */ + protected $signed_blob = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key_id + * The ID of the key used to sign the blob. + * @type string $signed_blob + * The signed blob. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the key used to sign the blob. + * + * Generated from protobuf field string key_id = 1; + * @return string + */ + public function getKeyId() + { + return $this->key_id; + } + + /** + * The ID of the key used to sign the blob. + * + * Generated from protobuf field string key_id = 1; + * @param string $var + * @return $this + */ + public function setKeyId($var) + { + GPBUtil::checkString($var, True); + $this->key_id = $var; + + return $this; + } + + /** + * The signed blob. + * + * Generated from protobuf field bytes signed_blob = 4; + * @return string + */ + public function getSignedBlob() + { + return $this->signed_blob; + } + + /** + * The signed blob. + * + * Generated from protobuf field bytes signed_blob = 4; + * @param string $var + * @return $this + */ + public function setSignedBlob($var) + { + GPBUtil::checkString($var, False); + $this->signed_blob = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtRequest.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtRequest.php new file mode 100644 index 000000000000..c73f5ec68326 --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtRequest.php @@ -0,0 +1,177 @@ +google.iam.credentials.v1.SignJwtRequest + */ +class SignJwtRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field repeated string delegates = 3; + */ + private $delegates; + /** + * Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. + * + * Generated from protobuf field string payload = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $payload = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @type array|\Google\Protobuf\Internal\RepeatedField $delegates + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @type string $payload + * Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated 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 service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field repeated string delegates = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDelegates() + { + return $this->delegates; + } + + /** + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * + * Generated from protobuf field repeated string delegates = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDelegates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->delegates = $arr; + + return $this; + } + + /** + * Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. + * + * Generated from protobuf field string payload = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPayload() + { + return $this->payload; + } + + /** + * Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. + * + * Generated from protobuf field string payload = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkString($var, True); + $this->payload = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtResponse.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtResponse.php new file mode 100644 index 000000000000..637ea731569e --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtResponse.php @@ -0,0 +1,99 @@ +google.iam.credentials.v1.SignJwtResponse + */ +class SignJwtResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the key used to sign the JWT. + * + * Generated from protobuf field string key_id = 1; + */ + protected $key_id = ''; + /** + * The signed JWT. + * + * Generated from protobuf field string signed_jwt = 2; + */ + protected $signed_jwt = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key_id + * The ID of the key used to sign the JWT. + * @type string $signed_jwt + * The signed JWT. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the key used to sign the JWT. + * + * Generated from protobuf field string key_id = 1; + * @return string + */ + public function getKeyId() + { + return $this->key_id; + } + + /** + * The ID of the key used to sign the JWT. + * + * Generated from protobuf field string key_id = 1; + * @param string $var + * @return $this + */ + public function setKeyId($var) + { + GPBUtil::checkString($var, True); + $this->key_id = $var; + + return $this; + } + + /** + * The signed JWT. + * + * Generated from protobuf field string signed_jwt = 2; + * @return string + */ + public function getSignedJwt() + { + return $this->signed_jwt; + } + + /** + * The signed JWT. + * + * Generated from protobuf field string signed_jwt = 2; + * @param string $var + * @return $this + */ + public function setSignedJwt($var) + { + GPBUtil::checkString($var, True); + $this->signed_jwt = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_access_token.php b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_access_token.php new file mode 100644 index 000000000000..9743b203c12b --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_access_token.php @@ -0,0 +1,77 @@ +generateAccessToken($formattedName, $scope); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = IAMCredentialsClient::serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $scopeElement = '[SCOPE]'; + + generate_access_token_sample($formattedName, $scopeElement); +} +// [END iamcredentials_v1_generated_IAMCredentials_GenerateAccessToken_sync] diff --git a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_id_token.php b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_id_token.php new file mode 100644 index 000000000000..b5aba25f3234 --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_id_token.php @@ -0,0 +1,72 @@ +generateIdToken($formattedName, $audience); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = IAMCredentialsClient::serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $audience = '[AUDIENCE]'; + + generate_id_token_sample($formattedName, $audience); +} +// [END iamcredentials_v1_generated_IAMCredentials_GenerateIdToken_sync] diff --git a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_blob.php b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_blob.php new file mode 100644 index 000000000000..18067323e76e --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_blob.php @@ -0,0 +1,71 @@ +signBlob($formattedName, $payload); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = IAMCredentialsClient::serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $payload = '...'; + + sign_blob_sample($formattedName, $payload); +} +// [END iamcredentials_v1_generated_IAMCredentials_SignBlob_sync] diff --git a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_jwt.php b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_jwt.php new file mode 100644 index 000000000000..b60434c64e8d --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_jwt.php @@ -0,0 +1,71 @@ +signJwt($formattedName, $payload); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = IAMCredentialsClient::serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $payload = '[PAYLOAD]'; + + sign_jwt_sample($formattedName, $payload); +} +// [END iamcredentials_v1_generated_IAMCredentials_SignJwt_sync] diff --git a/owl-bot-staging/IamCredentials/v1/src/V1/Gapic/IAMCredentialsGapicClient.php b/owl-bot-staging/IamCredentials/v1/src/V1/Gapic/IAMCredentialsGapicClient.php new file mode 100644 index 000000000000..624b018587c1 --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/src/V1/Gapic/IAMCredentialsGapicClient.php @@ -0,0 +1,517 @@ +serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + * $scope = []; + * $response = $iAMCredentialsClient->generateAccessToken($formattedName, $scope); + * } finally { + * $iAMCredentialsClient->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. + */ +class IAMCredentialsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.iam.credentials.v1.IAMCredentials'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'iamcredentials.googleapis.com'; + + /** 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 $serviceAccountNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/iam_credentials_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/iam_credentials_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/iam_credentials_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/iam_credentials_rest_client_config.php', + ], + ], + ]; + } + + private static function getServiceAccountNameTemplate() + { + if (self::$serviceAccountNameTemplate == null) { + self::$serviceAccountNameTemplate = new PathTemplate('projects/{project}/serviceAccounts/{service_account}'); + } + + return self::$serviceAccountNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'serviceAccount' => self::getServiceAccountNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * service_account resource. + * + * @param string $project + * @param string $serviceAccount + * + * @return string The formatted service_account resource. + */ + public static function serviceAccountName($project, $serviceAccount) + { + return self::getServiceAccountNameTemplate()->render([ + 'project' => $project, + 'service_account' => $serviceAccount, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - serviceAccount: projects/{project}/serviceAccounts/{service_account} + * + * 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 'iamcredentials.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); + } + + /** + * Generates an OAuth 2.0 access token for a service account. + * + * Sample code: + * ``` + * $iAMCredentialsClient = new IAMCredentialsClient(); + * try { + * $formattedName = $iAMCredentialsClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + * $scope = []; + * $response = $iAMCredentialsClient->generateAccessToken($formattedName, $scope); + * } finally { + * $iAMCredentialsClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @param string[] $scope Required. Code to identify the scopes to be included in the OAuth 2.0 access token. + * See https://developers.google.com/identity/protocols/googlescopes for more + * information. + * At least one value required. + * @param array $optionalArgs { + * Optional. + * + * @type string[] $delegates + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @type Duration $lifetime + * The desired lifetime duration of the access token in seconds. + * Must be set to a value less than or equal to 3600 (1 hour). If a value is + * not specified, the token's lifetime will be set to a default value of one + * hour. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\Credentials\V1\GenerateAccessTokenResponse + * + * @throws ApiException if the remote call fails + */ + public function generateAccessToken($name, $scope, array $optionalArgs = []) + { + $request = new GenerateAccessTokenRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setScope($scope); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['delegates'])) { + $request->setDelegates($optionalArgs['delegates']); + } + + if (isset($optionalArgs['lifetime'])) { + $request->setLifetime($optionalArgs['lifetime']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GenerateAccessToken', GenerateAccessTokenResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Generates an OpenID Connect ID token for a service account. + * + * Sample code: + * ``` + * $iAMCredentialsClient = new IAMCredentialsClient(); + * try { + * $formattedName = $iAMCredentialsClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + * $audience = 'audience'; + * $response = $iAMCredentialsClient->generateIdToken($formattedName, $audience); + * } finally { + * $iAMCredentialsClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @param string $audience Required. The audience for the token, such as the API or account that this token + * grants access to. + * @param array $optionalArgs { + * Optional. + * + * @type string[] $delegates + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @type bool $includeEmail + * Include the service account email in the token. If set to `true`, the + * token will contain `email` and `email_verified` claims. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\Credentials\V1\GenerateIdTokenResponse + * + * @throws ApiException if the remote call fails + */ + public function generateIdToken($name, $audience, array $optionalArgs = []) + { + $request = new GenerateIdTokenRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setAudience($audience); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['delegates'])) { + $request->setDelegates($optionalArgs['delegates']); + } + + if (isset($optionalArgs['includeEmail'])) { + $request->setIncludeEmail($optionalArgs['includeEmail']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GenerateIdToken', GenerateIdTokenResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Signs a blob using a service account's system-managed private key. + * + * Sample code: + * ``` + * $iAMCredentialsClient = new IAMCredentialsClient(); + * try { + * $formattedName = $iAMCredentialsClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + * $payload = '...'; + * $response = $iAMCredentialsClient->signBlob($formattedName, $payload); + * } finally { + * $iAMCredentialsClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @param string $payload Required. The bytes to sign. + * @param array $optionalArgs { + * Optional. + * + * @type string[] $delegates + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\Credentials\V1\SignBlobResponse + * + * @throws ApiException if the remote call fails + */ + public function signBlob($name, $payload, array $optionalArgs = []) + { + $request = new SignBlobRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setPayload($payload); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['delegates'])) { + $request->setDelegates($optionalArgs['delegates']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SignBlob', SignBlobResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Signs a JWT using a service account's system-managed private key. + * + * Sample code: + * ``` + * $iAMCredentialsClient = new IAMCredentialsClient(); + * try { + * $formattedName = $iAMCredentialsClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + * $payload = 'payload'; + * $response = $iAMCredentialsClient->signJwt($formattedName, $payload); + * } finally { + * $iAMCredentialsClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the service account for which the credentials + * are requested, in the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @param string $payload Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. + * @param array $optionalArgs { + * Optional. + * + * @type string[] $delegates + * The sequence of service accounts in a delegation chain. Each service + * account must be granted the `roles/iam.serviceAccountTokenCreator` role + * on its next service account in the chain. The last service account in the + * chain must be granted the `roles/iam.serviceAccountTokenCreator` role + * on the service account that is specified in the `name` field of the + * request. + * + * The delegates must have the following format: + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + * character is required; replacing it with a project ID is invalid. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\Credentials\V1\SignJwtResponse + * + * @throws ApiException if the remote call fails + */ + public function signJwt($name, $payload, array $optionalArgs = []) + { + $request = new SignJwtRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setPayload($payload); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['delegates'])) { + $request->setDelegates($optionalArgs['delegates']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SignJwt', SignJwtResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/IamCredentials/v1/src/V1/IAMCredentialsClient.php b/owl-bot-staging/IamCredentials/v1/src/V1/IAMCredentialsClient.php new file mode 100644 index 000000000000..99a36ef5fa09 --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/src/V1/IAMCredentialsClient.php @@ -0,0 +1,34 @@ + [ + 'google.iam.credentials.v1.IAMCredentials' => [], + ], +]; diff --git a/owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_rest_client_config.php b/owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_rest_client_config.php new file mode 100644 index 000000000000..e4c5263da78c --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_rest_client_config.php @@ -0,0 +1,57 @@ + [ + 'google.iam.credentials.v1.IAMCredentials' => [ + 'GenerateAccessToken' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/serviceAccounts/*}:generateAccessToken', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateIdToken' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/serviceAccounts/*}:generateIdToken', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SignBlob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/serviceAccounts/*}:signBlob', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SignJwt' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/serviceAccounts/*}:signJwt', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/IamCredentials/v1/tests/Unit/V1/IAMCredentialsClientTest.php b/owl-bot-staging/IamCredentials/v1/tests/Unit/V1/IAMCredentialsClientTest.php new file mode 100644 index 000000000000..b9961c90b8f6 --- /dev/null +++ b/owl-bot-staging/IamCredentials/v1/tests/Unit/V1/IAMCredentialsClientTest.php @@ -0,0 +1,324 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return IAMCredentialsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new IAMCredentialsClient($options); + } + + /** @test */ + public function generateAccessTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expectedResponse = new GenerateAccessTokenResponse(); + $expectedResponse->setAccessToken($accessToken); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $scope = []; + $response = $gapicClient->generateAccessToken($formattedName, $scope); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.credentials.v1.IAMCredentials/GenerateAccessToken', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAccessTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $scope = []; + try { + $gapicClient->generateAccessToken($formattedName, $scope); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateIdTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $token = 'token110541305'; + $expectedResponse = new GenerateIdTokenResponse(); + $expectedResponse->setToken($token); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $audience = 'audience975628804'; + $response = $gapicClient->generateIdToken($formattedName, $audience); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.credentials.v1.IAMCredentials/GenerateIdToken', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getAudience(); + $this->assertProtobufEquals($audience, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateIdTokenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $audience = 'audience975628804'; + try { + $gapicClient->generateIdToken($formattedName, $audience); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function signBlobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $keyId = 'keyId-1134673157'; + $signedBlob = '-32'; + $expectedResponse = new SignBlobResponse(); + $expectedResponse->setKeyId($keyId); + $expectedResponse->setSignedBlob($signedBlob); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $payload = '-114'; + $response = $gapicClient->signBlob($formattedName, $payload); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.credentials.v1.IAMCredentials/SignBlob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getPayload(); + $this->assertProtobufEquals($payload, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function signBlobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $payload = '-114'; + try { + $gapicClient->signBlob($formattedName, $payload); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function signJwtTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $keyId = 'keyId-1134673157'; + $signedJwt = 'signedJwt-979546844'; + $expectedResponse = new SignJwtResponse(); + $expectedResponse->setKeyId($keyId); + $expectedResponse->setSignedJwt($signedJwt); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $payload = 'payload-786701938'; + $response = $gapicClient->signJwt($formattedName, $payload); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.credentials.v1.IAMCredentials/SignJwt', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getPayload(); + $this->assertProtobufEquals($payload, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function signJwtExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); + $payload = 'payload-786701938'; + try { + $gapicClient->signJwt($formattedName, $payload); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->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/Iap/v1/proto/src/GPBMetadata/Google/Cloud/Iap/V1/Service.php b/owl-bot-staging/Iap/v1/proto/src/GPBMetadata/Google/Cloud/Iap/V1/Service.php new file mode 100644 index 0000000000000000000000000000000000000000..dd62f0cf6feae58f76d1e2c581e2f4a5acd23b71 GIT binary patch literal 9409 zcmb_iOKcoj6`i&xPJG*O?3bTodrZ0FnK;d)d(wk4lS;y*+}(CMi9h%=A;?lu?tZq5 zbXV0>RVOi#g+PF24PwJ`76>6WNGw<)frJ=|1+dF%7A!_1R%{TgxbIWdzp75#gE#K( zckg}Y{_lHLw?AZKmffDRf#r2%PsW>%dr?I^rBp0$&LXStG`tGcls(7UtI=Gg<}|7~%XD*3ujhQ~J+&${%cTL>W}W)3S)t0( z+QKpo%&Hlf+e@5ryTBN?%ci^i;q_Ypm73}M%7zdCFF?URx3N>RDvBSN0sfn_e8aM> zz%pyrcMjt8-LMeX2dJc|~sRTt>K`P6c}qp_}286JIu zESq%<0E~nBnuE?h=zl-Sc~rK@*~JEC09v&F9V1rsQmO6+M*thKa^o(W{*z;D`^Yn0 zmwE{yz@z%w*DV>tdbJvb>>{S}d=z9XGjErlFxK4 z%zqYOBI75&(z3A2qR7~hVI&DIwGenRR^-x*T(ZnMD<$~PaCtwp_L|5N@{+1;p%7lz<>42Fw4v-kfA00EY{qdknzx|@X#dVFzlLp)bO$5 zO$;FS2|@t)Pl5A<+7p9JqIv++@c?`mD+VQZfdm|!QAI$;9*2i$2ItfHISHZ7#n}#B z$VE6~)8~QFvNeMA+Bf_u+Nc$)xure&_?g`c0TF(i%;)&G9Aw49&jfVn0nX zd#veL{2j@3IY>A7E(S{nY5K`9V#0jLMnz5iV+zi61OhqNX1^hH$!9u?;}aFD>iH;i z5R(EuHN<|~{itgD=$i01&HqAo`!P1Tk8r+2D}kSTAwM0mxx^5@&(&m3;d1!#FvrqC zBx~+PGc^v?44lV!D4XsE4Fb#Fi*k9qO&1nk>c=UV5Uz-!zXc-vZhTCw)tW>D)H!+>yQE@pIlg?>FE09Gvhb;*EG%rt0 z5kp+We7uMzLnuf6%K(gah<+bV?^UcWQ_aT8TtdoF7(vd8d!jd;$=6`C=ImLvsNoIIlIc7hZWN{SM&M!0 ze`wYkR9%FTHj~`|!hsw6LEsvW%V$y<*4>3+0cT|)M~Bnx_In3Fz}d%%r7tLd#h~dh zBQ}>h4fdTXM=+Ytgu1jPRy$J`Pa?=cGH|kPJ~yzv%H1!8%#k6&5s?%iEd~xFIB+TN z9HaScNZ)HSF`jNBm%0o?a_b8~mP?!WR*S~g%Enr$P+lyTies;lVL0({b*a2EmLg+t zYE9qRc(l4+92=M%IF%x!02`&k)_Tc!PNMzIW>0Yagdlc0j9)GBcKMx2IA-_f3Ne5y&jJxWL;}=hIrJw zkZx7^I;6b{AM6aXA!7O!;MAWCz(k_Dx8XvJ30dk3C-m0)E==#qdjccCkr89T-*+6= z4~=H|=#lhf8Rk4%r&UYXOK2u#;>k-!j+n&K`5uyZ^et>(fj5nQ1gf75z_i}O@Ho!` zeeU8B#77+58p9&O4IoYrkty0y8swP_UAOU2U4W?6r@(UI8zL-$I0v9ykfeG&%mKf+U4QZpP>OxDx&cir6H7t0hU5y4DO#8OO3LkOs{Lo4%PZb#$+TpxtKX#Ic{MS|w zxp-8Nh*JXp8cx=6n~^M>;9_M}?jcpo?sISkXSFuD-E)t+19MD;GWSDppg+SC8D`}3 z193yrQ~!RCVK|h(`HD@X={8{6l1L1bL1A^}`GFx$)1qUi^YO(kNrmJy8p9>5pTyhK zA&+3H2UzK*qhS@Edk<7LWhb~K#1!Mq4sLfEnd;<;Bii1|Gmhs+RB8%mafTWckkd-;csfw`jduw`_S0O9B|dRu$dN zk!UW)+ZntF%C;^_YfqjJi=?CxGm3ik2Y>&^PX{imGwgEbMR@mfCzCnUm?NX>zf^|p z$`4=iMzCww*2UxRy4SJm&r?7)@i@q!P_J(B&ft^iOe59lCJ7;2?NB_9Ql!6{5ky8e;e=16Yj-{MFRKr}gK<6voR=WFt(6r5uvxZ@7OC+~#bX=_e#q#@M! zaW0-i`t?4?ev91X*hL?`gOy!eOJw4&BQmYm5HEGve#yU6a9$Mc4qZq*uvpqqm%c9f z)E}le{uTB3__gi}yO;VkVTrfJO-#!jWcM$4UM0W9OvE_uR6G8-)lGObo$s}|j7Qij z9oBknlsSB<^Gg=;YjjxbZC`@JVrfJ07s7BwF#Oq6mOpS%CESeg(3gSxAA~E?wA0Y> z@fAxO!tF1MlgSXrcv!^`)-=~;HE z;cL0vvuDpb7IW;XM?CGkhMhFnb-a51mm_g4RNiy&N1^0LDF9Y8_{iXsw?e;ml_5b8 z8g%>0D+y)Id5Z_ILPTTjsyTNURm_7&OJ6SvpI zOpm?&6lSbI5Fa$*azDGb>)x3SLh)SYko+?RGeWWMfk({$M2od|Z>A7pd=E_8N;SC6 z9;;eHmxyrZtc20n*LqFlf{M&656tp`V_*b%+hu1iwvCA*Nt<>x85+{ZzNd=RTsADqY3?Hk-r57b2-p~uoq z!x5hb;vmK**xz9a_C9hYq+oBRP{E{rDZP{t5qB(2{$Jf<;a@4Zh|hTAe7TnT)(!C_ z7*}hiy_dy9VGeJ~c>B*a9}>5{Z*vQK*sli8F7X#?vIX`+4SR@`{qXvy;ji2BJsbX_ z4Zdjc#lQtYu4$ZJ(~v>aa6y06&jaav)Sdf&$hI@Ym3a3`^a8@$;+>e5S7;JnpW&3^ KHJ3v;1o$6@vxA2K literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessDeniedPageSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessDeniedPageSettings.php new file mode 100644 index 000000000000..867e592fa1cd --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessDeniedPageSettings.php @@ -0,0 +1,261 @@ +google.cloud.iap.v1.AccessDeniedPageSettings + */ +class AccessDeniedPageSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The URI to be redirected to when access is denied. + * + * Generated from protobuf field .google.protobuf.StringValue access_denied_page_uri = 1; + */ + protected $access_denied_page_uri = null; + /** + * Whether to generate a troubleshooting URL on access denied events to this + * application. + * + * Generated from protobuf field .google.protobuf.BoolValue generate_troubleshooting_uri = 2; + */ + protected $generate_troubleshooting_uri = null; + /** + * Whether to generate remediation token on access denied events to this + * application. + * + * Generated from protobuf field optional .google.protobuf.BoolValue remediation_token_generation_enabled = 3; + */ + protected $remediation_token_generation_enabled = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\StringValue $access_denied_page_uri + * The URI to be redirected to when access is denied. + * @type \Google\Protobuf\BoolValue $generate_troubleshooting_uri + * Whether to generate a troubleshooting URL on access denied events to this + * application. + * @type \Google\Protobuf\BoolValue $remediation_token_generation_enabled + * Whether to generate remediation token on access denied events to this + * application. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The URI to be redirected to when access is denied. + * + * Generated from protobuf field .google.protobuf.StringValue access_denied_page_uri = 1; + * @return \Google\Protobuf\StringValue|null + */ + public function getAccessDeniedPageUri() + { + return $this->access_denied_page_uri; + } + + public function hasAccessDeniedPageUri() + { + return isset($this->access_denied_page_uri); + } + + public function clearAccessDeniedPageUri() + { + unset($this->access_denied_page_uri); + } + + /** + * Returns the unboxed value from getAccessDeniedPageUri() + + * The URI to be redirected to when access is denied. + * + * Generated from protobuf field .google.protobuf.StringValue access_denied_page_uri = 1; + * @return string|null + */ + public function getAccessDeniedPageUriUnwrapped() + { + return $this->readWrapperValue("access_denied_page_uri"); + } + + /** + * The URI to be redirected to when access is denied. + * + * Generated from protobuf field .google.protobuf.StringValue access_denied_page_uri = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setAccessDeniedPageUri($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->access_denied_page_uri = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. + + * The URI to be redirected to when access is denied. + * + * Generated from protobuf field .google.protobuf.StringValue access_denied_page_uri = 1; + * @param string|null $var + * @return $this + */ + public function setAccessDeniedPageUriUnwrapped($var) + { + $this->writeWrapperValue("access_denied_page_uri", $var); + return $this;} + + /** + * Whether to generate a troubleshooting URL on access denied events to this + * application. + * + * Generated from protobuf field .google.protobuf.BoolValue generate_troubleshooting_uri = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getGenerateTroubleshootingUri() + { + return $this->generate_troubleshooting_uri; + } + + public function hasGenerateTroubleshootingUri() + { + return isset($this->generate_troubleshooting_uri); + } + + public function clearGenerateTroubleshootingUri() + { + unset($this->generate_troubleshooting_uri); + } + + /** + * Returns the unboxed value from getGenerateTroubleshootingUri() + + * Whether to generate a troubleshooting URL on access denied events to this + * application. + * + * Generated from protobuf field .google.protobuf.BoolValue generate_troubleshooting_uri = 2; + * @return bool|null + */ + public function getGenerateTroubleshootingUriUnwrapped() + { + return $this->readWrapperValue("generate_troubleshooting_uri"); + } + + /** + * Whether to generate a troubleshooting URL on access denied events to this + * application. + * + * Generated from protobuf field .google.protobuf.BoolValue generate_troubleshooting_uri = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setGenerateTroubleshootingUri($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->generate_troubleshooting_uri = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether to generate a troubleshooting URL on access denied events to this + * application. + * + * Generated from protobuf field .google.protobuf.BoolValue generate_troubleshooting_uri = 2; + * @param bool|null $var + * @return $this + */ + public function setGenerateTroubleshootingUriUnwrapped($var) + { + $this->writeWrapperValue("generate_troubleshooting_uri", $var); + return $this;} + + /** + * Whether to generate remediation token on access denied events to this + * application. + * + * Generated from protobuf field optional .google.protobuf.BoolValue remediation_token_generation_enabled = 3; + * @return \Google\Protobuf\BoolValue|null + */ + public function getRemediationTokenGenerationEnabled() + { + return $this->remediation_token_generation_enabled; + } + + public function hasRemediationTokenGenerationEnabled() + { + return isset($this->remediation_token_generation_enabled); + } + + public function clearRemediationTokenGenerationEnabled() + { + unset($this->remediation_token_generation_enabled); + } + + /** + * Returns the unboxed value from getRemediationTokenGenerationEnabled() + + * Whether to generate remediation token on access denied events to this + * application. + * + * Generated from protobuf field optional .google.protobuf.BoolValue remediation_token_generation_enabled = 3; + * @return bool|null + */ + public function getRemediationTokenGenerationEnabledUnwrapped() + { + return $this->readWrapperValue("remediation_token_generation_enabled"); + } + + /** + * Whether to generate remediation token on access denied events to this + * application. + * + * Generated from protobuf field optional .google.protobuf.BoolValue remediation_token_generation_enabled = 3; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setRemediationTokenGenerationEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->remediation_token_generation_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether to generate remediation token on access denied events to this + * application. + * + * Generated from protobuf field optional .google.protobuf.BoolValue remediation_token_generation_enabled = 3; + * @param bool|null $var + * @return $this + */ + public function setRemediationTokenGenerationEnabledUnwrapped($var) + { + $this->writeWrapperValue("remediation_token_generation_enabled", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessSettings.php new file mode 100644 index 000000000000..36658c877255 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessSettings.php @@ -0,0 +1,253 @@ +google.cloud.iap.v1.AccessSettings + */ +class AccessSettings extends \Google\Protobuf\Internal\Message +{ + /** + * GCIP claims and endpoint configurations for 3p identity providers. + * + * Generated from protobuf field .google.cloud.iap.v1.GcipSettings gcip_settings = 1; + */ + protected $gcip_settings = null; + /** + * Configuration to allow cross-origin requests via IAP. + * + * Generated from protobuf field .google.cloud.iap.v1.CorsSettings cors_settings = 2; + */ + protected $cors_settings = null; + /** + * Settings to configure IAP's OAuth behavior. + * + * Generated from protobuf field .google.cloud.iap.v1.OAuthSettings oauth_settings = 3; + */ + protected $oauth_settings = null; + /** + * Settings to configure reauthentication policies in IAP. + * + * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings reauth_settings = 6; + */ + protected $reauth_settings = null; + /** + * Settings to configure and enable allowed domains. + * + * Generated from protobuf field .google.cloud.iap.v1.AllowedDomainsSettings allowed_domains_settings = 7; + */ + protected $allowed_domains_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Iap\V1\GcipSettings $gcip_settings + * GCIP claims and endpoint configurations for 3p identity providers. + * @type \Google\Cloud\Iap\V1\CorsSettings $cors_settings + * Configuration to allow cross-origin requests via IAP. + * @type \Google\Cloud\Iap\V1\OAuthSettings $oauth_settings + * Settings to configure IAP's OAuth behavior. + * @type \Google\Cloud\Iap\V1\ReauthSettings $reauth_settings + * Settings to configure reauthentication policies in IAP. + * @type \Google\Cloud\Iap\V1\AllowedDomainsSettings $allowed_domains_settings + * Settings to configure and enable allowed domains. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * GCIP claims and endpoint configurations for 3p identity providers. + * + * Generated from protobuf field .google.cloud.iap.v1.GcipSettings gcip_settings = 1; + * @return \Google\Cloud\Iap\V1\GcipSettings|null + */ + public function getGcipSettings() + { + return $this->gcip_settings; + } + + public function hasGcipSettings() + { + return isset($this->gcip_settings); + } + + public function clearGcipSettings() + { + unset($this->gcip_settings); + } + + /** + * GCIP claims and endpoint configurations for 3p identity providers. + * + * Generated from protobuf field .google.cloud.iap.v1.GcipSettings gcip_settings = 1; + * @param \Google\Cloud\Iap\V1\GcipSettings $var + * @return $this + */ + public function setGcipSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\GcipSettings::class); + $this->gcip_settings = $var; + + return $this; + } + + /** + * Configuration to allow cross-origin requests via IAP. + * + * Generated from protobuf field .google.cloud.iap.v1.CorsSettings cors_settings = 2; + * @return \Google\Cloud\Iap\V1\CorsSettings|null + */ + public function getCorsSettings() + { + return $this->cors_settings; + } + + public function hasCorsSettings() + { + return isset($this->cors_settings); + } + + public function clearCorsSettings() + { + unset($this->cors_settings); + } + + /** + * Configuration to allow cross-origin requests via IAP. + * + * Generated from protobuf field .google.cloud.iap.v1.CorsSettings cors_settings = 2; + * @param \Google\Cloud\Iap\V1\CorsSettings $var + * @return $this + */ + public function setCorsSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\CorsSettings::class); + $this->cors_settings = $var; + + return $this; + } + + /** + * Settings to configure IAP's OAuth behavior. + * + * Generated from protobuf field .google.cloud.iap.v1.OAuthSettings oauth_settings = 3; + * @return \Google\Cloud\Iap\V1\OAuthSettings|null + */ + public function getOauthSettings() + { + return $this->oauth_settings; + } + + public function hasOauthSettings() + { + return isset($this->oauth_settings); + } + + public function clearOauthSettings() + { + unset($this->oauth_settings); + } + + /** + * Settings to configure IAP's OAuth behavior. + * + * Generated from protobuf field .google.cloud.iap.v1.OAuthSettings oauth_settings = 3; + * @param \Google\Cloud\Iap\V1\OAuthSettings $var + * @return $this + */ + public function setOauthSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\OAuthSettings::class); + $this->oauth_settings = $var; + + return $this; + } + + /** + * Settings to configure reauthentication policies in IAP. + * + * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings reauth_settings = 6; + * @return \Google\Cloud\Iap\V1\ReauthSettings|null + */ + public function getReauthSettings() + { + return $this->reauth_settings; + } + + public function hasReauthSettings() + { + return isset($this->reauth_settings); + } + + public function clearReauthSettings() + { + unset($this->reauth_settings); + } + + /** + * Settings to configure reauthentication policies in IAP. + * + * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings reauth_settings = 6; + * @param \Google\Cloud\Iap\V1\ReauthSettings $var + * @return $this + */ + public function setReauthSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\ReauthSettings::class); + $this->reauth_settings = $var; + + return $this; + } + + /** + * Settings to configure and enable allowed domains. + * + * Generated from protobuf field .google.cloud.iap.v1.AllowedDomainsSettings allowed_domains_settings = 7; + * @return \Google\Cloud\Iap\V1\AllowedDomainsSettings|null + */ + public function getAllowedDomainsSettings() + { + return $this->allowed_domains_settings; + } + + public function hasAllowedDomainsSettings() + { + return isset($this->allowed_domains_settings); + } + + public function clearAllowedDomainsSettings() + { + unset($this->allowed_domains_settings); + } + + /** + * Settings to configure and enable allowed domains. + * + * Generated from protobuf field .google.cloud.iap.v1.AllowedDomainsSettings allowed_domains_settings = 7; + * @param \Google\Cloud\Iap\V1\AllowedDomainsSettings $var + * @return $this + */ + public function setAllowedDomainsSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\AllowedDomainsSettings::class); + $this->allowed_domains_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AllowedDomainsSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AllowedDomainsSettings.php new file mode 100644 index 000000000000..982a8e503ad5 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AllowedDomainsSettings.php @@ -0,0 +1,112 @@ +google.cloud.iap.v1.AllowedDomainsSettings + */ +class AllowedDomainsSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Configuration for customers to opt in for the feature. + * + * Generated from protobuf field optional bool enable = 1; + */ + protected $enable = null; + /** + * List of trusted domains. + * + * Generated from protobuf field repeated string domains = 2; + */ + private $domains; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable + * Configuration for customers to opt in for the feature. + * @type array|\Google\Protobuf\Internal\RepeatedField $domains + * List of trusted domains. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Configuration for customers to opt in for the feature. + * + * Generated from protobuf field optional bool enable = 1; + * @return bool + */ + public function getEnable() + { + return isset($this->enable) ? $this->enable : false; + } + + public function hasEnable() + { + return isset($this->enable); + } + + public function clearEnable() + { + unset($this->enable); + } + + /** + * Configuration for customers to opt in for the feature. + * + * Generated from protobuf field optional bool enable = 1; + * @param bool $var + * @return $this + */ + public function setEnable($var) + { + GPBUtil::checkBool($var); + $this->enable = $var; + + return $this; + } + + /** + * List of trusted domains. + * + * Generated from protobuf field repeated string domains = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDomains() + { + return $this->domains; + } + + /** + * List of trusted domains. + * + * Generated from protobuf field repeated string domains = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDomains($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->domains = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ApplicationSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ApplicationSettings.php new file mode 100644 index 000000000000..cc9b3ad24e6a --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ApplicationSettings.php @@ -0,0 +1,242 @@ +google.cloud.iap.v1.ApplicationSettings + */ +class ApplicationSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Settings to configure IAP's behavior for a service mesh. + * + * Generated from protobuf field .google.cloud.iap.v1.CsmSettings csm_settings = 1; + */ + protected $csm_settings = null; + /** + * Customization for Access Denied page. + * + * Generated from protobuf field .google.cloud.iap.v1.AccessDeniedPageSettings access_denied_page_settings = 2; + */ + protected $access_denied_page_settings = null; + /** + * The Domain value to set for cookies generated by IAP. This value is not + * validated by the API, but will be ignored at runtime if invalid. + * + * Generated from protobuf field .google.protobuf.StringValue cookie_domain = 3; + */ + protected $cookie_domain = null; + /** + * Settings to configure attribute propagation. + * + * Generated from protobuf field .google.cloud.iap.v1.AttributePropagationSettings attribute_propagation_settings = 4; + */ + protected $attribute_propagation_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Iap\V1\CsmSettings $csm_settings + * Settings to configure IAP's behavior for a service mesh. + * @type \Google\Cloud\Iap\V1\AccessDeniedPageSettings $access_denied_page_settings + * Customization for Access Denied page. + * @type \Google\Protobuf\StringValue $cookie_domain + * The Domain value to set for cookies generated by IAP. This value is not + * validated by the API, but will be ignored at runtime if invalid. + * @type \Google\Cloud\Iap\V1\AttributePropagationSettings $attribute_propagation_settings + * Settings to configure attribute propagation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Settings to configure IAP's behavior for a service mesh. + * + * Generated from protobuf field .google.cloud.iap.v1.CsmSettings csm_settings = 1; + * @return \Google\Cloud\Iap\V1\CsmSettings|null + */ + public function getCsmSettings() + { + return $this->csm_settings; + } + + public function hasCsmSettings() + { + return isset($this->csm_settings); + } + + public function clearCsmSettings() + { + unset($this->csm_settings); + } + + /** + * Settings to configure IAP's behavior for a service mesh. + * + * Generated from protobuf field .google.cloud.iap.v1.CsmSettings csm_settings = 1; + * @param \Google\Cloud\Iap\V1\CsmSettings $var + * @return $this + */ + public function setCsmSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\CsmSettings::class); + $this->csm_settings = $var; + + return $this; + } + + /** + * Customization for Access Denied page. + * + * Generated from protobuf field .google.cloud.iap.v1.AccessDeniedPageSettings access_denied_page_settings = 2; + * @return \Google\Cloud\Iap\V1\AccessDeniedPageSettings|null + */ + public function getAccessDeniedPageSettings() + { + return $this->access_denied_page_settings; + } + + public function hasAccessDeniedPageSettings() + { + return isset($this->access_denied_page_settings); + } + + public function clearAccessDeniedPageSettings() + { + unset($this->access_denied_page_settings); + } + + /** + * Customization for Access Denied page. + * + * Generated from protobuf field .google.cloud.iap.v1.AccessDeniedPageSettings access_denied_page_settings = 2; + * @param \Google\Cloud\Iap\V1\AccessDeniedPageSettings $var + * @return $this + */ + public function setAccessDeniedPageSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\AccessDeniedPageSettings::class); + $this->access_denied_page_settings = $var; + + return $this; + } + + /** + * The Domain value to set for cookies generated by IAP. This value is not + * validated by the API, but will be ignored at runtime if invalid. + * + * Generated from protobuf field .google.protobuf.StringValue cookie_domain = 3; + * @return \Google\Protobuf\StringValue|null + */ + public function getCookieDomain() + { + return $this->cookie_domain; + } + + public function hasCookieDomain() + { + return isset($this->cookie_domain); + } + + public function clearCookieDomain() + { + unset($this->cookie_domain); + } + + /** + * Returns the unboxed value from getCookieDomain() + + * The Domain value to set for cookies generated by IAP. This value is not + * validated by the API, but will be ignored at runtime if invalid. + * + * Generated from protobuf field .google.protobuf.StringValue cookie_domain = 3; + * @return string|null + */ + public function getCookieDomainUnwrapped() + { + return $this->readWrapperValue("cookie_domain"); + } + + /** + * The Domain value to set for cookies generated by IAP. This value is not + * validated by the API, but will be ignored at runtime if invalid. + * + * Generated from protobuf field .google.protobuf.StringValue cookie_domain = 3; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setCookieDomain($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->cookie_domain = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. + + * The Domain value to set for cookies generated by IAP. This value is not + * validated by the API, but will be ignored at runtime if invalid. + * + * Generated from protobuf field .google.protobuf.StringValue cookie_domain = 3; + * @param string|null $var + * @return $this + */ + public function setCookieDomainUnwrapped($var) + { + $this->writeWrapperValue("cookie_domain", $var); + return $this;} + + /** + * Settings to configure attribute propagation. + * + * Generated from protobuf field .google.cloud.iap.v1.AttributePropagationSettings attribute_propagation_settings = 4; + * @return \Google\Cloud\Iap\V1\AttributePropagationSettings|null + */ + public function getAttributePropagationSettings() + { + return $this->attribute_propagation_settings; + } + + public function hasAttributePropagationSettings() + { + return isset($this->attribute_propagation_settings); + } + + public function clearAttributePropagationSettings() + { + unset($this->attribute_propagation_settings); + } + + /** + * Settings to configure attribute propagation. + * + * Generated from protobuf field .google.cloud.iap.v1.AttributePropagationSettings attribute_propagation_settings = 4; + * @param \Google\Cloud\Iap\V1\AttributePropagationSettings $var + * @return $this + */ + public function setAttributePropagationSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\AttributePropagationSettings::class); + $this->attribute_propagation_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings.php new file mode 100644 index 000000000000..64f58a2417a6 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings.php @@ -0,0 +1,252 @@ +google.cloud.iap.v1.AttributePropagationSettings + */ +class AttributePropagationSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Raw string CEL expression. Must return a list of attributes. Maximum of 45 + * attributes can be selected. Expressions can select different attribute + * types from `attributes`: `attributes.saml_attributes`, + * `attributes.iap_attributes`. Limited functions are supported: + * - `filter: .filter(, )` -> returns a subset of + * `` where `` is true for every item. + * - `in: in ` -> returns true if `` contains `` + * - `selectByName: .selectByName()` -> returns the attribute + * in + * `` with the given `` name, otherwise returns empty. + * - `emitAs: .emitAs()` -> sets the `` name + * field to the given `` for propagation in selected output + * credentials. + * - `strict: .strict()` -> ignore the `x-goog-iap-attr-` prefix + * for the provided `` when propagating via the `HEADER` output + * credential, i.e. request headers. + * - `append: .append()` OR + * `.append()` -> append the provided `` or + * `` onto the end of ``. + * Example expression: `attributes.saml_attributes.filter(x, x.name in + * ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())` + * + * Generated from protobuf field optional string expression = 1; + */ + protected $expression = null; + /** + * Which output credentials attributes selected by the CEL expression should + * be propagated in. All attributes will be fully duplicated in each selected + * output credential. + * + * Generated from protobuf field repeated .google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials output_credentials = 2; + */ + private $output_credentials; + /** + * Whether the provided attribute propagation settings should be evaluated on + * user requests. If set to true, attributes returned from the expression will + * be propagated in the set output credentials. + * + * Generated from protobuf field optional bool enable = 3; + */ + protected $enable = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $expression + * Raw string CEL expression. Must return a list of attributes. Maximum of 45 + * attributes can be selected. Expressions can select different attribute + * types from `attributes`: `attributes.saml_attributes`, + * `attributes.iap_attributes`. Limited functions are supported: + * - `filter: .filter(, )` -> returns a subset of + * `` where `` is true for every item. + * - `in: in ` -> returns true if `` contains `` + * - `selectByName: .selectByName()` -> returns the attribute + * in + * `` with the given `` name, otherwise returns empty. + * - `emitAs: .emitAs()` -> sets the `` name + * field to the given `` for propagation in selected output + * credentials. + * - `strict: .strict()` -> ignore the `x-goog-iap-attr-` prefix + * for the provided `` when propagating via the `HEADER` output + * credential, i.e. request headers. + * - `append: .append()` OR + * `.append()` -> append the provided `` or + * `` onto the end of ``. + * Example expression: `attributes.saml_attributes.filter(x, x.name in + * ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())` + * @type array|\Google\Protobuf\Internal\RepeatedField $output_credentials + * Which output credentials attributes selected by the CEL expression should + * be propagated in. All attributes will be fully duplicated in each selected + * output credential. + * @type bool $enable + * Whether the provided attribute propagation settings should be evaluated on + * user requests. If set to true, attributes returned from the expression will + * be propagated in the set output credentials. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Raw string CEL expression. Must return a list of attributes. Maximum of 45 + * attributes can be selected. Expressions can select different attribute + * types from `attributes`: `attributes.saml_attributes`, + * `attributes.iap_attributes`. Limited functions are supported: + * - `filter: .filter(, )` -> returns a subset of + * `` where `` is true for every item. + * - `in: in ` -> returns true if `` contains `` + * - `selectByName: .selectByName()` -> returns the attribute + * in + * `` with the given `` name, otherwise returns empty. + * - `emitAs: .emitAs()` -> sets the `` name + * field to the given `` for propagation in selected output + * credentials. + * - `strict: .strict()` -> ignore the `x-goog-iap-attr-` prefix + * for the provided `` when propagating via the `HEADER` output + * credential, i.e. request headers. + * - `append: .append()` OR + * `.append()` -> append the provided `` or + * `` onto the end of ``. + * Example expression: `attributes.saml_attributes.filter(x, x.name in + * ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())` + * + * Generated from protobuf field optional string expression = 1; + * @return string + */ + public function getExpression() + { + return isset($this->expression) ? $this->expression : ''; + } + + public function hasExpression() + { + return isset($this->expression); + } + + public function clearExpression() + { + unset($this->expression); + } + + /** + * Raw string CEL expression. Must return a list of attributes. Maximum of 45 + * attributes can be selected. Expressions can select different attribute + * types from `attributes`: `attributes.saml_attributes`, + * `attributes.iap_attributes`. Limited functions are supported: + * - `filter: .filter(, )` -> returns a subset of + * `` where `` is true for every item. + * - `in: in ` -> returns true if `` contains `` + * - `selectByName: .selectByName()` -> returns the attribute + * in + * `` with the given `` name, otherwise returns empty. + * - `emitAs: .emitAs()` -> sets the `` name + * field to the given `` for propagation in selected output + * credentials. + * - `strict: .strict()` -> ignore the `x-goog-iap-attr-` prefix + * for the provided `` when propagating via the `HEADER` output + * credential, i.e. request headers. + * - `append: .append()` OR + * `.append()` -> append the provided `` or + * `` onto the end of ``. + * Example expression: `attributes.saml_attributes.filter(x, x.name in + * ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())` + * + * Generated from protobuf field optional string expression = 1; + * @param string $var + * @return $this + */ + public function setExpression($var) + { + GPBUtil::checkString($var, True); + $this->expression = $var; + + return $this; + } + + /** + * Which output credentials attributes selected by the CEL expression should + * be propagated in. All attributes will be fully duplicated in each selected + * output credential. + * + * Generated from protobuf field repeated .google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials output_credentials = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOutputCredentials() + { + return $this->output_credentials; + } + + /** + * Which output credentials attributes selected by the CEL expression should + * be propagated in. All attributes will be fully duplicated in each selected + * output credential. + * + * Generated from protobuf field repeated .google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials output_credentials = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOutputCredentials($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Iap\V1\AttributePropagationSettings\OutputCredentials::class); + $this->output_credentials = $arr; + + return $this; + } + + /** + * Whether the provided attribute propagation settings should be evaluated on + * user requests. If set to true, attributes returned from the expression will + * be propagated in the set output credentials. + * + * Generated from protobuf field optional bool enable = 3; + * @return bool + */ + public function getEnable() + { + return isset($this->enable) ? $this->enable : false; + } + + public function hasEnable() + { + return isset($this->enable); + } + + public function clearEnable() + { + unset($this->enable); + } + + /** + * Whether the provided attribute propagation settings should be evaluated on + * user requests. If set to true, attributes returned from the expression will + * be propagated in the set output credentials. + * + * Generated from protobuf field optional bool enable = 3; + * @param bool $var + * @return $this + */ + public function setEnable($var) + { + GPBUtil::checkBool($var); + $this->enable = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings/OutputCredentials.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings/OutputCredentials.php new file mode 100644 index 000000000000..8cf9e0e51a76 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings/OutputCredentials.php @@ -0,0 +1,75 @@ +google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials + */ +class OutputCredentials +{ + /** + * No output credential. This is an unsupported default. + * + * Generated from protobuf enum OUTPUT_CREDENTIALS_UNSPECIFIED = 0; + */ + const OUTPUT_CREDENTIALS_UNSPECIFIED = 0; + /** + * Propagate attributes in the headers with "x-goog-iap-attr-" prefix. + * + * Generated from protobuf enum HEADER = 1; + */ + const HEADER = 1; + /** + * Propagate attributes in the JWT of the form: `"additional_claims": { + * "my_attribute": ["value1", "value2"] }` + * + * Generated from protobuf enum JWT = 2; + */ + const JWT = 2; + /** + * Propagate attributes in the RCToken of the form: `"additional_claims": { + * "my_attribute": ["value1", "value2"] }` + * + * Generated from protobuf enum RCTOKEN = 3; + */ + const RCTOKEN = 3; + + private static $valueToName = [ + self::OUTPUT_CREDENTIALS_UNSPECIFIED => 'OUTPUT_CREDENTIALS_UNSPECIFIED', + self::HEADER => 'HEADER', + self::JWT => 'JWT', + self::RCTOKEN => 'RCTOKEN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OutputCredentials::class, \Google\Cloud\Iap\V1\AttributePropagationSettings_OutputCredentials::class); + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings_OutputCredentials.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings_OutputCredentials.php new file mode 100644 index 000000000000..780bafa92bf8 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings_OutputCredentials.php @@ -0,0 +1,16 @@ +google.cloud.iap.v1.Brand + */ +class Brand extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier of the brand. + * NOTE: GCP project number achieves the same brand identification purpose as + * only one brand per project can be created. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Support email displayed on the OAuth consent screen. + * + * Generated from protobuf field string support_email = 2; + */ + protected $support_email = ''; + /** + * Application name displayed on OAuth consent screen. + * + * Generated from protobuf field string application_title = 3; + */ + protected $application_title = ''; + /** + * Output only. Whether the brand is only intended for usage inside the + * G Suite organization only. + * + * Generated from protobuf field bool org_internal_only = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $org_internal_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier of the brand. + * NOTE: GCP project number achieves the same brand identification purpose as + * only one brand per project can be created. + * @type string $support_email + * Support email displayed on the OAuth consent screen. + * @type string $application_title + * Application name displayed on OAuth consent screen. + * @type bool $org_internal_only + * Output only. Whether the brand is only intended for usage inside the + * G Suite organization only. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier of the brand. + * NOTE: GCP project number achieves the same brand identification purpose as + * only one brand per project can be created. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Identifier of the brand. + * NOTE: GCP project number achieves the same brand identification purpose as + * only one brand per project can be created. + * + * 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; + } + + /** + * Support email displayed on the OAuth consent screen. + * + * Generated from protobuf field string support_email = 2; + * @return string + */ + public function getSupportEmail() + { + return $this->support_email; + } + + /** + * Support email displayed on the OAuth consent screen. + * + * Generated from protobuf field string support_email = 2; + * @param string $var + * @return $this + */ + public function setSupportEmail($var) + { + GPBUtil::checkString($var, True); + $this->support_email = $var; + + return $this; + } + + /** + * Application name displayed on OAuth consent screen. + * + * Generated from protobuf field string application_title = 3; + * @return string + */ + public function getApplicationTitle() + { + return $this->application_title; + } + + /** + * Application name displayed on OAuth consent screen. + * + * Generated from protobuf field string application_title = 3; + * @param string $var + * @return $this + */ + public function setApplicationTitle($var) + { + GPBUtil::checkString($var, True); + $this->application_title = $var; + + return $this; + } + + /** + * Output only. Whether the brand is only intended for usage inside the + * G Suite organization only. + * + * Generated from protobuf field bool org_internal_only = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getOrgInternalOnly() + { + return $this->org_internal_only; + } + + /** + * Output only. Whether the brand is only intended for usage inside the + * G Suite organization only. + * + * Generated from protobuf field bool org_internal_only = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setOrgInternalOnly($var) + { + GPBUtil::checkBool($var); + $this->org_internal_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CorsSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CorsSettings.php new file mode 100644 index 000000000000..945b88df8573 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CorsSettings.php @@ -0,0 +1,111 @@ +google.cloud.iap.v1.CorsSettings + */ +class CorsSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Configuration to allow HTTP OPTIONS calls to skip authorization. If + * undefined, IAP will not apply any special logic to OPTIONS requests. + * + * Generated from protobuf field .google.protobuf.BoolValue allow_http_options = 1; + */ + protected $allow_http_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\BoolValue $allow_http_options + * Configuration to allow HTTP OPTIONS calls to skip authorization. If + * undefined, IAP will not apply any special logic to OPTIONS requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Configuration to allow HTTP OPTIONS calls to skip authorization. If + * undefined, IAP will not apply any special logic to OPTIONS requests. + * + * Generated from protobuf field .google.protobuf.BoolValue allow_http_options = 1; + * @return \Google\Protobuf\BoolValue|null + */ + public function getAllowHttpOptions() + { + return $this->allow_http_options; + } + + public function hasAllowHttpOptions() + { + return isset($this->allow_http_options); + } + + public function clearAllowHttpOptions() + { + unset($this->allow_http_options); + } + + /** + * Returns the unboxed value from getAllowHttpOptions() + + * Configuration to allow HTTP OPTIONS calls to skip authorization. If + * undefined, IAP will not apply any special logic to OPTIONS requests. + * + * Generated from protobuf field .google.protobuf.BoolValue allow_http_options = 1; + * @return bool|null + */ + public function getAllowHttpOptionsUnwrapped() + { + return $this->readWrapperValue("allow_http_options"); + } + + /** + * Configuration to allow HTTP OPTIONS calls to skip authorization. If + * undefined, IAP will not apply any special logic to OPTIONS requests. + * + * Generated from protobuf field .google.protobuf.BoolValue allow_http_options = 1; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setAllowHttpOptions($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->allow_http_options = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Configuration to allow HTTP OPTIONS calls to skip authorization. If + * undefined, IAP will not apply any special logic to OPTIONS requests. + * + * Generated from protobuf field .google.protobuf.BoolValue allow_http_options = 1; + * @param bool|null $var + * @return $this + */ + public function setAllowHttpOptionsUnwrapped($var) + { + $this->writeWrapperValue("allow_http_options", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateBrandRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateBrandRequest.php new file mode 100644 index 000000000000..acd649fe0e5c --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateBrandRequest.php @@ -0,0 +1,115 @@ +google.cloud.iap.v1.CreateBrandRequest + */ +class CreateBrandRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. GCP Project number/id under which the brand is to be created. + * In the following format: projects/{project_number/id}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. The brand to be created. + * + * Generated from protobuf field .google.cloud.iap.v1.Brand brand = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $brand = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. GCP Project number/id under which the brand is to be created. + * In the following format: projects/{project_number/id}. + * @type \Google\Cloud\Iap\V1\Brand $brand + * Required. The brand to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. GCP Project number/id under which the brand is to be created. + * In the following format: projects/{project_number/id}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. GCP Project number/id under which the brand is to be created. + * In the following format: projects/{project_number/id}. + * + * 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. The brand to be created. + * + * Generated from protobuf field .google.cloud.iap.v1.Brand brand = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Iap\V1\Brand|null + */ + public function getBrand() + { + return $this->brand; + } + + public function hasBrand() + { + return isset($this->brand); + } + + public function clearBrand() + { + unset($this->brand); + } + + /** + * Required. The brand to be created. + * + * Generated from protobuf field .google.cloud.iap.v1.Brand brand = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Iap\V1\Brand $var + * @return $this + */ + public function setBrand($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\Brand::class); + $this->brand = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateIdentityAwareProxyClientRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateIdentityAwareProxyClientRequest.php new file mode 100644 index 000000000000..0e938fed6c17 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateIdentityAwareProxyClientRequest.php @@ -0,0 +1,123 @@ +google.cloud.iap.v1.CreateIdentityAwareProxyClientRequest + */ +class CreateIdentityAwareProxyClientRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Path to create the client in. + * In the following format: + * projects/{project_number/id}/brands/{brand}. + * The project must belong to a G Suite account. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. Identity Aware Proxy Client to be created. + * + * Generated from protobuf field .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_client = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $identity_aware_proxy_client = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Path to create the client in. + * In the following format: + * projects/{project_number/id}/brands/{brand}. + * The project must belong to a G Suite account. + * @type \Google\Cloud\Iap\V1\IdentityAwareProxyClient $identity_aware_proxy_client + * Required. Identity Aware Proxy Client to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Path to create the client in. + * In the following format: + * projects/{project_number/id}/brands/{brand}. + * The project must belong to a G Suite account. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Path to create the client in. + * In the following format: + * projects/{project_number/id}/brands/{brand}. + * The project must belong to a G Suite account. + * + * 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. Identity Aware Proxy Client to be created. + * + * Generated from protobuf field .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Iap\V1\IdentityAwareProxyClient|null + */ + public function getIdentityAwareProxyClient() + { + return $this->identity_aware_proxy_client; + } + + public function hasIdentityAwareProxyClient() + { + return isset($this->identity_aware_proxy_client); + } + + public function clearIdentityAwareProxyClient() + { + unset($this->identity_aware_proxy_client); + } + + /** + * Required. Identity Aware Proxy Client to be created. + * + * Generated from protobuf field .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_client = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Iap\V1\IdentityAwareProxyClient $var + * @return $this + */ + public function setIdentityAwareProxyClient($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\IdentityAwareProxyClient::class); + $this->identity_aware_proxy_client = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateTunnelDestGroupRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateTunnelDestGroupRequest.php new file mode 100644 index 000000000000..944fb56a724c --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateTunnelDestGroupRequest.php @@ -0,0 +1,165 @@ +google.cloud.iap.v1.CreateTunnelDestGroupRequest + */ +class CreateTunnelDestGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Google Cloud Project ID and location. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The TunnelDestGroup to create. + * + * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tunnel_dest_group = null; + /** + * Required. The ID to use for the TunnelDestGroup, which becomes the final + * component of the resource name. + * This value must be 4-63 characters, and valid characters + * are `[a-z]-`. + * + * Generated from protobuf field string tunnel_dest_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tunnel_dest_group_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Google Cloud Project ID and location. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}`. + * @type \Google\Cloud\Iap\V1\TunnelDestGroup $tunnel_dest_group + * Required. The TunnelDestGroup to create. + * @type string $tunnel_dest_group_id + * Required. The ID to use for the TunnelDestGroup, which becomes the final + * component of the resource name. + * This value must be 4-63 characters, and valid characters + * are `[a-z]-`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Google Cloud Project ID and location. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/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. Google Cloud Project ID and location. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/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 TunnelDestGroup to create. + * + * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Iap\V1\TunnelDestGroup|null + */ + public function getTunnelDestGroup() + { + return $this->tunnel_dest_group; + } + + public function hasTunnelDestGroup() + { + return isset($this->tunnel_dest_group); + } + + public function clearTunnelDestGroup() + { + unset($this->tunnel_dest_group); + } + + /** + * Required. The TunnelDestGroup to create. + * + * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Iap\V1\TunnelDestGroup $var + * @return $this + */ + public function setTunnelDestGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\TunnelDestGroup::class); + $this->tunnel_dest_group = $var; + + return $this; + } + + /** + * Required. The ID to use for the TunnelDestGroup, which becomes the final + * component of the resource name. + * This value must be 4-63 characters, and valid characters + * are `[a-z]-`. + * + * Generated from protobuf field string tunnel_dest_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTunnelDestGroupId() + { + return $this->tunnel_dest_group_id; + } + + /** + * Required. The ID to use for the TunnelDestGroup, which becomes the final + * component of the resource name. + * This value must be 4-63 characters, and valid characters + * are `[a-z]-`. + * + * Generated from protobuf field string tunnel_dest_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTunnelDestGroupId($var) + { + GPBUtil::checkString($var, True); + $this->tunnel_dest_group_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CsmSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CsmSettings.php new file mode 100644 index 000000000000..c35125b3b5f0 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CsmSettings.php @@ -0,0 +1,113 @@ +google.cloud.iap.v1.CsmSettings + */ +class CsmSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Audience claim set in the generated RCToken. This value is not validated by + * IAP. + * + * Generated from protobuf field .google.protobuf.StringValue rctoken_aud = 1; + */ + protected $rctoken_aud = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\StringValue $rctoken_aud + * Audience claim set in the generated RCToken. This value is not validated by + * IAP. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Audience claim set in the generated RCToken. This value is not validated by + * IAP. + * + * Generated from protobuf field .google.protobuf.StringValue rctoken_aud = 1; + * @return \Google\Protobuf\StringValue|null + */ + public function getRctokenAud() + { + return $this->rctoken_aud; + } + + public function hasRctokenAud() + { + return isset($this->rctoken_aud); + } + + public function clearRctokenAud() + { + unset($this->rctoken_aud); + } + + /** + * Returns the unboxed value from getRctokenAud() + + * Audience claim set in the generated RCToken. This value is not validated by + * IAP. + * + * Generated from protobuf field .google.protobuf.StringValue rctoken_aud = 1; + * @return string|null + */ + public function getRctokenAudUnwrapped() + { + return $this->readWrapperValue("rctoken_aud"); + } + + /** + * Audience claim set in the generated RCToken. This value is not validated by + * IAP. + * + * Generated from protobuf field .google.protobuf.StringValue rctoken_aud = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setRctokenAud($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->rctoken_aud = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. + + * Audience claim set in the generated RCToken. This value is not validated by + * IAP. + * + * Generated from protobuf field .google.protobuf.StringValue rctoken_aud = 1; + * @param string|null $var + * @return $this + */ + public function setRctokenAudUnwrapped($var) + { + $this->writeWrapperValue("rctoken_aud", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteIdentityAwareProxyClientRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteIdentityAwareProxyClientRequest.php new file mode 100644 index 000000000000..f17a3fe37e65 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteIdentityAwareProxyClientRequest.php @@ -0,0 +1,75 @@ +google.cloud.iap.v1.DeleteIdentityAwareProxyClientRequest + */ +class DeleteIdentityAwareProxyClientRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the Identity Aware Proxy client to be deleted. + * In the following format: + * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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. Name of the Identity Aware Proxy client to be deleted. + * In the following format: + * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the Identity Aware Proxy client to be deleted. + * In the following format: + * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the Identity Aware Proxy client to be deleted. + * In the following format: + * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteTunnelDestGroupRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteTunnelDestGroupRequest.php new file mode 100644 index 000000000000..dacfe95791d8 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteTunnelDestGroupRequest.php @@ -0,0 +1,75 @@ +google.cloud.iap.v1.DeleteTunnelDestGroupRequest + */ +class DeleteTunnelDestGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the TunnelDestGroup to delete. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. + * + * 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 TunnelDestGroup to delete. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the TunnelDestGroup to delete. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. + * + * Generated 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 TunnelDestGroup to delete. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Iap/v1/proto/src/Google/Cloud/Iap/V1/GcipSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GcipSettings.php new file mode 100644 index 000000000000..972c15b86f85 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GcipSettings.php @@ -0,0 +1,170 @@ +google.cloud.iap.v1.GcipSettings + */ +class GcipSettings extends \Google\Protobuf\Internal\Message +{ + /** + * GCIP tenant ids that are linked to the IAP resource. + * tenant_ids could be a string beginning with a number character to indicate + * authenticating with GCIP tenant flow, or in the format of _ + * to indicate authenticating with GCIP agent flow. + * If agent flow is used, tenant_ids should only contain one single element, + * while for tenant flow, tenant_ids can contain multiple elements. + * + * Generated from protobuf field repeated string tenant_ids = 1; + */ + private $tenant_ids; + /** + * Login page URI associated with the GCIP tenants. + * Typically, all resources within the same project share the same login page, + * though it could be overridden at the sub resource level. + * + * Generated from protobuf field .google.protobuf.StringValue login_page_uri = 2; + */ + protected $login_page_uri = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $tenant_ids + * GCIP tenant ids that are linked to the IAP resource. + * tenant_ids could be a string beginning with a number character to indicate + * authenticating with GCIP tenant flow, or in the format of _ + * to indicate authenticating with GCIP agent flow. + * If agent flow is used, tenant_ids should only contain one single element, + * while for tenant flow, tenant_ids can contain multiple elements. + * @type \Google\Protobuf\StringValue $login_page_uri + * Login page URI associated with the GCIP tenants. + * Typically, all resources within the same project share the same login page, + * though it could be overridden at the sub resource level. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * GCIP tenant ids that are linked to the IAP resource. + * tenant_ids could be a string beginning with a number character to indicate + * authenticating with GCIP tenant flow, or in the format of _ + * to indicate authenticating with GCIP agent flow. + * If agent flow is used, tenant_ids should only contain one single element, + * while for tenant flow, tenant_ids can contain multiple elements. + * + * Generated from protobuf field repeated string tenant_ids = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTenantIds() + { + return $this->tenant_ids; + } + + /** + * GCIP tenant ids that are linked to the IAP resource. + * tenant_ids could be a string beginning with a number character to indicate + * authenticating with GCIP tenant flow, or in the format of _ + * to indicate authenticating with GCIP agent flow. + * If agent flow is used, tenant_ids should only contain one single element, + * while for tenant flow, tenant_ids can contain multiple elements. + * + * Generated from protobuf field repeated string tenant_ids = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTenantIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tenant_ids = $arr; + + return $this; + } + + /** + * Login page URI associated with the GCIP tenants. + * Typically, all resources within the same project share the same login page, + * though it could be overridden at the sub resource level. + * + * Generated from protobuf field .google.protobuf.StringValue login_page_uri = 2; + * @return \Google\Protobuf\StringValue|null + */ + public function getLoginPageUri() + { + return $this->login_page_uri; + } + + public function hasLoginPageUri() + { + return isset($this->login_page_uri); + } + + public function clearLoginPageUri() + { + unset($this->login_page_uri); + } + + /** + * Returns the unboxed value from getLoginPageUri() + + * Login page URI associated with the GCIP tenants. + * Typically, all resources within the same project share the same login page, + * though it could be overridden at the sub resource level. + * + * Generated from protobuf field .google.protobuf.StringValue login_page_uri = 2; + * @return string|null + */ + public function getLoginPageUriUnwrapped() + { + return $this->readWrapperValue("login_page_uri"); + } + + /** + * Login page URI associated with the GCIP tenants. + * Typically, all resources within the same project share the same login page, + * though it could be overridden at the sub resource level. + * + * Generated from protobuf field .google.protobuf.StringValue login_page_uri = 2; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setLoginPageUri($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->login_page_uri = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. + + * Login page URI associated with the GCIP tenants. + * Typically, all resources within the same project share the same login page, + * though it could be overridden at the sub resource level. + * + * Generated from protobuf field .google.protobuf.StringValue login_page_uri = 2; + * @param string|null $var + * @return $this + */ + public function setLoginPageUriUnwrapped($var) + { + $this->writeWrapperValue("login_page_uri", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetBrandRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetBrandRequest.php new file mode 100644 index 000000000000..9ffb6ac252dc --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetBrandRequest.php @@ -0,0 +1,71 @@ +google.cloud.iap.v1.GetBrandRequest + */ +class GetBrandRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the brand to be fetched. + * In the following format: projects/{project_number/id}/brands/{brand}. + * + * 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. Name of the brand to be fetched. + * In the following format: projects/{project_number/id}/brands/{brand}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the brand to be fetched. + * In the following format: projects/{project_number/id}/brands/{brand}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the brand to be fetched. + * In the following format: projects/{project_number/id}/brands/{brand}. + * + * 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/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIapSettingsRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIapSettingsRequest.php new file mode 100644 index 000000000000..8cc90694746a --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIapSettingsRequest.php @@ -0,0 +1,75 @@ +google.cloud.iap.v1.GetIapSettingsRequest + */ +class GetIapSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name for which to retrieve the settings. + * Authorization: Requires the `getSettings` permission for the associated + * resource. + * + * 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. The resource name for which to retrieve the settings. + * Authorization: Requires the `getSettings` permission for the associated + * resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name for which to retrieve the settings. + * Authorization: Requires the `getSettings` permission for the associated + * resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name for which to retrieve the settings. + * Authorization: Requires the `getSettings` permission for the associated + * resource. + * + * 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/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIdentityAwareProxyClientRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIdentityAwareProxyClientRequest.php new file mode 100644 index 000000000000..01dc5db82cf4 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIdentityAwareProxyClientRequest.php @@ -0,0 +1,75 @@ +google.cloud.iap.v1.GetIdentityAwareProxyClientRequest + */ +class GetIdentityAwareProxyClientRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the Identity Aware Proxy client to be fetched. + * In the following format: + * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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. Name of the Identity Aware Proxy client to be fetched. + * In the following format: + * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the Identity Aware Proxy client to be fetched. + * In the following format: + * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the Identity Aware Proxy client to be fetched. + * In the following format: + * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetTunnelDestGroupRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetTunnelDestGroupRequest.php new file mode 100644 index 000000000000..b9e56c841894 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetTunnelDestGroupRequest.php @@ -0,0 +1,75 @@ +google.cloud.iap.v1.GetTunnelDestGroupRequest + */ +class GetTunnelDestGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the TunnelDestGroup to be fetched. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. + * + * 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 TunnelDestGroup to be fetched. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the TunnelDestGroup to be fetched. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. + * + * Generated 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 TunnelDestGroup to be fetched. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Iap/v1/proto/src/Google/Cloud/Iap/V1/IapSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IapSettings.php new file mode 100644 index 000000000000..faaa3d8ca1b3 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IapSettings.php @@ -0,0 +1,155 @@ +google.cloud.iap.v1.IapSettings + */ +class IapSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the IAP protected resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Top level wrapper for all access related setting in IAP + * + * Generated from protobuf field .google.cloud.iap.v1.AccessSettings access_settings = 5; + */ + protected $access_settings = null; + /** + * Top level wrapper for all application related settings in IAP + * + * Generated from protobuf field .google.cloud.iap.v1.ApplicationSettings application_settings = 6; + */ + protected $application_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the IAP protected resource. + * @type \Google\Cloud\Iap\V1\AccessSettings $access_settings + * Top level wrapper for all access related setting in IAP + * @type \Google\Cloud\Iap\V1\ApplicationSettings $application_settings + * Top level wrapper for all application related settings in IAP + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the IAP protected resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the IAP protected resource. + * + * 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; + } + + /** + * Top level wrapper for all access related setting in IAP + * + * Generated from protobuf field .google.cloud.iap.v1.AccessSettings access_settings = 5; + * @return \Google\Cloud\Iap\V1\AccessSettings|null + */ + public function getAccessSettings() + { + return $this->access_settings; + } + + public function hasAccessSettings() + { + return isset($this->access_settings); + } + + public function clearAccessSettings() + { + unset($this->access_settings); + } + + /** + * Top level wrapper for all access related setting in IAP + * + * Generated from protobuf field .google.cloud.iap.v1.AccessSettings access_settings = 5; + * @param \Google\Cloud\Iap\V1\AccessSettings $var + * @return $this + */ + public function setAccessSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\AccessSettings::class); + $this->access_settings = $var; + + return $this; + } + + /** + * Top level wrapper for all application related settings in IAP + * + * Generated from protobuf field .google.cloud.iap.v1.ApplicationSettings application_settings = 6; + * @return \Google\Cloud\Iap\V1\ApplicationSettings|null + */ + public function getApplicationSettings() + { + return $this->application_settings; + } + + public function hasApplicationSettings() + { + return isset($this->application_settings); + } + + public function clearApplicationSettings() + { + unset($this->application_settings); + } + + /** + * Top level wrapper for all application related settings in IAP + * + * Generated from protobuf field .google.cloud.iap.v1.ApplicationSettings application_settings = 6; + * @param \Google\Cloud\Iap\V1\ApplicationSettings $var + * @return $this + */ + public function setApplicationSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\ApplicationSettings::class); + $this->application_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyAdminServiceGrpcClient.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyAdminServiceGrpcClient.php new file mode 100644 index 000000000000..aac6ae683046 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyAdminServiceGrpcClient.php @@ -0,0 +1,199 @@ +_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/SetIamPolicy', + $argument, + ['\Google\Cloud\Iam\V1\Policy', 'decode'], + $metadata, $options); + } + + /** + * Gets the access control policy for an Identity-Aware Proxy protected + * resource. + * More information about managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @param \Google\Cloud\Iam\V1\GetIamPolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetIamPolicy(\Google\Cloud\Iam\V1\GetIamPolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/GetIamPolicy', + $argument, + ['\Google\Cloud\Iam\V1\Policy', 'decode'], + $metadata, $options); + } + + /** + * Returns permissions that a caller has on the Identity-Aware Proxy protected + * resource. + * More information about managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * @param \Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function TestIamPermissions(\Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/TestIamPermissions', + $argument, + ['\Google\Cloud\Iam\V1\TestIamPermissionsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets the IAP settings on a particular IAP protected resource. + * @param \Google\Cloud\Iap\V1\GetIapSettingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetIapSettings(\Google\Cloud\Iap\V1\GetIapSettingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/GetIapSettings', + $argument, + ['\Google\Cloud\Iap\V1\IapSettings', 'decode'], + $metadata, $options); + } + + /** + * Updates the IAP settings on a particular IAP protected resource. It + * replaces all fields unless the `update_mask` is set. + * @param \Google\Cloud\Iap\V1\UpdateIapSettingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateIapSettings(\Google\Cloud\Iap\V1\UpdateIapSettingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/UpdateIapSettings', + $argument, + ['\Google\Cloud\Iap\V1\IapSettings', 'decode'], + $metadata, $options); + } + + /** + * Lists the existing TunnelDestGroups. To group across all locations, use a + * `-` as the location ID. For example: + * `/v1/projects/123/iap_tunnel/locations/-/destGroups` + * @param \Google\Cloud\Iap\V1\ListTunnelDestGroupsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListTunnelDestGroups(\Google\Cloud\Iap\V1\ListTunnelDestGroupsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/ListTunnelDestGroups', + $argument, + ['\Google\Cloud\Iap\V1\ListTunnelDestGroupsResponse', 'decode'], + $metadata, $options); + } + + /** + * Creates a new TunnelDestGroup. + * @param \Google\Cloud\Iap\V1\CreateTunnelDestGroupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateTunnelDestGroup(\Google\Cloud\Iap\V1\CreateTunnelDestGroupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/CreateTunnelDestGroup', + $argument, + ['\Google\Cloud\Iap\V1\TunnelDestGroup', 'decode'], + $metadata, $options); + } + + /** + * Retrieves an existing TunnelDestGroup. + * @param \Google\Cloud\Iap\V1\GetTunnelDestGroupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetTunnelDestGroup(\Google\Cloud\Iap\V1\GetTunnelDestGroupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/GetTunnelDestGroup', + $argument, + ['\Google\Cloud\Iap\V1\TunnelDestGroup', 'decode'], + $metadata, $options); + } + + /** + * Deletes a TunnelDestGroup. + * @param \Google\Cloud\Iap\V1\DeleteTunnelDestGroupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteTunnelDestGroup(\Google\Cloud\Iap\V1\DeleteTunnelDestGroupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/DeleteTunnelDestGroup', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Updates a TunnelDestGroup. + * @param \Google\Cloud\Iap\V1\UpdateTunnelDestGroupRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateTunnelDestGroup(\Google\Cloud\Iap\V1\UpdateTunnelDestGroupRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/UpdateTunnelDestGroup', + $argument, + ['\Google\Cloud\Iap\V1\TunnelDestGroup', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyClient.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyClient.php new file mode 100644 index 000000000000..e8d02a564039 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyClient.php @@ -0,0 +1,135 @@ +google.cloud.iap.v1.IdentityAwareProxyClient + */ +class IdentityAwareProxyClient extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Unique identifier of the OAuth client. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Client secret of the OAuth client. + * + * Generated from protobuf field string secret = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $secret = ''; + /** + * Human-friendly name given to the OAuth client. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Unique identifier of the OAuth client. + * @type string $secret + * Output only. Client secret of the OAuth client. + * @type string $display_name + * Human-friendly name given to the OAuth client. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Unique identifier of the OAuth client. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Unique identifier of the OAuth client. + * + * 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. Client secret of the OAuth client. + * + * Generated from protobuf field string secret = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSecret() + { + return $this->secret; + } + + /** + * Output only. Client secret of the OAuth client. + * + * Generated from protobuf field string secret = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSecret($var) + { + GPBUtil::checkString($var, True); + $this->secret = $var; + + return $this; + } + + /** + * Human-friendly name given to the OAuth client. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Human-friendly name given to the OAuth client. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyOAuthServiceGrpcClient.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyOAuthServiceGrpcClient.php new file mode 100644 index 000000000000..c2bd554fdb41 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyOAuthServiceGrpcClient.php @@ -0,0 +1,170 @@ +_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ListBrands', + $argument, + ['\Google\Cloud\Iap\V1\ListBrandsResponse', 'decode'], + $metadata, $options); + } + + /** + * Constructs a new OAuth brand for the project if one does not exist. + * The created brand is "internal only", meaning that OAuth clients created + * under it only accept requests from users who belong to the same Google + * Workspace organization as the project. The brand is created in an + * un-reviewed status. NOTE: The "internal only" status can be manually + * changed in the Google Cloud Console. Requires that a brand does not already + * exist for the project, and that the specified support email is owned by the + * caller. + * @param \Google\Cloud\Iap\V1\CreateBrandRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateBrand(\Google\Cloud\Iap\V1\CreateBrandRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/CreateBrand', + $argument, + ['\Google\Cloud\Iap\V1\Brand', 'decode'], + $metadata, $options); + } + + /** + * Retrieves the OAuth brand of the project. + * @param \Google\Cloud\Iap\V1\GetBrandRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetBrand(\Google\Cloud\Iap\V1\GetBrandRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/GetBrand', + $argument, + ['\Google\Cloud\Iap\V1\Brand', 'decode'], + $metadata, $options); + } + + /** + * Creates an Identity Aware Proxy (IAP) OAuth client. The client is owned + * by IAP. Requires that the brand for the project exists and that it is + * set for internal-only use. + * @param \Google\Cloud\Iap\V1\CreateIdentityAwareProxyClientRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateIdentityAwareProxyClient(\Google\Cloud\Iap\V1\CreateIdentityAwareProxyClientRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/CreateIdentityAwareProxyClient', + $argument, + ['\Google\Cloud\Iap\V1\IdentityAwareProxyClient', 'decode'], + $metadata, $options); + } + + /** + * Lists the existing clients for the brand. + * @param \Google\Cloud\Iap\V1\ListIdentityAwareProxyClientsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListIdentityAwareProxyClients(\Google\Cloud\Iap\V1\ListIdentityAwareProxyClientsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ListIdentityAwareProxyClients', + $argument, + ['\Google\Cloud\Iap\V1\ListIdentityAwareProxyClientsResponse', 'decode'], + $metadata, $options); + } + + /** + * Retrieves an Identity Aware Proxy (IAP) OAuth client. + * Requires that the client is owned by IAP. + * @param \Google\Cloud\Iap\V1\GetIdentityAwareProxyClientRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetIdentityAwareProxyClient(\Google\Cloud\Iap\V1\GetIdentityAwareProxyClientRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/GetIdentityAwareProxyClient', + $argument, + ['\Google\Cloud\Iap\V1\IdentityAwareProxyClient', 'decode'], + $metadata, $options); + } + + /** + * Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the + * secret was compromised. Requires that the client is owned by IAP. + * @param \Google\Cloud\Iap\V1\ResetIdentityAwareProxyClientSecretRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ResetIdentityAwareProxyClientSecret(\Google\Cloud\Iap\V1\ResetIdentityAwareProxyClientSecretRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ResetIdentityAwareProxyClientSecret', + $argument, + ['\Google\Cloud\Iap\V1\IdentityAwareProxyClient', 'decode'], + $metadata, $options); + } + + /** + * Deletes an Identity Aware Proxy (IAP) OAuth client. Useful for removing + * obsolete clients, managing the number of clients in a given project, and + * cleaning up after tests. Requires that the client is owned by IAP. + * @param \Google\Cloud\Iap\V1\DeleteIdentityAwareProxyClientRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteIdentityAwareProxyClient(\Google\Cloud\Iap\V1\DeleteIdentityAwareProxyClientRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/DeleteIdentityAwareProxyClient', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsRequest.php new file mode 100644 index 000000000000..72be9dbce426 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsRequest.php @@ -0,0 +1,71 @@ +google.cloud.iap.v1.ListBrandsRequest + */ +class ListBrandsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. GCP Project number/id. + * In the following format: projects/{project_number/id}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. GCP Project number/id. + * In the following format: projects/{project_number/id}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. GCP Project number/id. + * In the following format: projects/{project_number/id}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. GCP Project number/id. + * In the following format: projects/{project_number/id}. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsResponse.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsResponse.php new file mode 100644 index 000000000000..87d7babf7797 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsResponse.php @@ -0,0 +1,67 @@ +google.cloud.iap.v1.ListBrandsResponse + */ +class ListBrandsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Brands existing in the project. + * + * Generated from protobuf field repeated .google.cloud.iap.v1.Brand brands = 1; + */ + private $brands; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Iap\V1\Brand>|\Google\Protobuf\Internal\RepeatedField $brands + * Brands existing in the project. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Brands existing in the project. + * + * Generated from protobuf field repeated .google.cloud.iap.v1.Brand brands = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBrands() + { + return $this->brands; + } + + /** + * Brands existing in the project. + * + * Generated from protobuf field repeated .google.cloud.iap.v1.Brand brands = 1; + * @param array<\Google\Cloud\Iap\V1\Brand>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBrands($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iap\V1\Brand::class); + $this->brands = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsRequest.php new file mode 100644 index 000000000000..0f175a124de3 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsRequest.php @@ -0,0 +1,167 @@ +google.cloud.iap.v1.ListIdentityAwareProxyClientsRequest + */ +class ListIdentityAwareProxyClientsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full brand path. + * In the following format: projects/{project_number/id}/brands/{brand}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * The maximum number of clients to return. The service may return fewer than + * this value. + * If unspecified, at most 100 clients 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 `ListIdentityAwareProxyClients` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListIdentityAwareProxyClients` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Full brand path. + * In the following format: projects/{project_number/id}/brands/{brand}. + * @type int $page_size + * The maximum number of clients to return. The service may return fewer than + * this value. + * If unspecified, at most 100 clients 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 `ListIdentityAwareProxyClients` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListIdentityAwareProxyClients` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full brand path. + * In the following format: projects/{project_number/id}/brands/{brand}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Full brand path. + * In the following format: projects/{project_number/id}/brands/{brand}. + * + * 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; + } + + /** + * The maximum number of clients to return. The service may return fewer than + * this value. + * If unspecified, at most 100 clients 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 clients to return. The service may return fewer than + * this value. + * If unspecified, at most 100 clients 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 `ListIdentityAwareProxyClients` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListIdentityAwareProxyClients` 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 `ListIdentityAwareProxyClients` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListIdentityAwareProxyClients` 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; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsResponse.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsResponse.php new file mode 100644 index 000000000000..61d2737fce29 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsResponse.php @@ -0,0 +1,105 @@ +google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse + */ +class ListIdentityAwareProxyClientsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Clients existing in the brand. + * + * Generated from protobuf field repeated .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_clients = 1; + */ + private $identity_aware_proxy_clients; + /** + * A token, which can be send 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 = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Iap\V1\IdentityAwareProxyClient>|\Google\Protobuf\Internal\RepeatedField $identity_aware_proxy_clients + * Clients existing in the brand. + * @type string $next_page_token + * A token, which can be send as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Clients existing in the brand. + * + * Generated from protobuf field repeated .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_clients = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIdentityAwareProxyClients() + { + return $this->identity_aware_proxy_clients; + } + + /** + * Clients existing in the brand. + * + * Generated from protobuf field repeated .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_clients = 1; + * @param array<\Google\Cloud\Iap\V1\IdentityAwareProxyClient>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIdentityAwareProxyClients($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iap\V1\IdentityAwareProxyClient::class); + $this->identity_aware_proxy_clients = $arr; + + return $this; + } + + /** + * A token, which can be send 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, which can be send 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; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsRequest.php new file mode 100644 index 000000000000..1e7162ea07a2 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsRequest.php @@ -0,0 +1,175 @@ +google.cloud.iap.v1.ListTunnelDestGroupsRequest + */ +class ListTunnelDestGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Google Cloud Project ID and location. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}`. + * A `-` can be used for the location to group across all locations. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of groups to return. The service might return fewer than + * this value. + * If unspecified, at most 100 groups are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListTunnelDestGroups` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListTunnelDestGroups` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Google Cloud Project ID and location. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}`. + * A `-` can be used for the location to group across all locations. + * @type int $page_size + * The maximum number of groups to return. The service might return fewer than + * this value. + * If unspecified, at most 100 groups are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * @type string $page_token + * A page token, received from a previous `ListTunnelDestGroups` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListTunnelDestGroups` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Google Cloud Project ID and location. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}`. + * A `-` can be used for the location to group across all 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. Google Cloud Project ID and location. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}`. + * A `-` can be used for the location to group across all 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; + } + + /** + * The maximum number of groups to return. The service might return fewer than + * this value. + * If unspecified, at most 100 groups are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of groups to return. The service might return fewer than + * this value. + * If unspecified, at most 100 groups are returned. + * The maximum value is 1000; values above 1000 are 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 `ListTunnelDestGroups` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListTunnelDestGroups` 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 `ListTunnelDestGroups` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListTunnelDestGroups` 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; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsResponse.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsResponse.php new file mode 100644 index 000000000000..9c7a174c1b8b --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsResponse.php @@ -0,0 +1,105 @@ +google.cloud.iap.v1.ListTunnelDestGroupsResponse + */ +class ListTunnelDestGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * TunnelDestGroup existing in the project. + * + * Generated from protobuf field repeated .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_groups = 1; + */ + private $tunnel_dest_groups; + /** + * A token that you can send 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 = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Iap\V1\TunnelDestGroup>|\Google\Protobuf\Internal\RepeatedField $tunnel_dest_groups + * TunnelDestGroup existing in the project. + * @type string $next_page_token + * A token that you can send as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * TunnelDestGroup existing in the project. + * + * Generated from protobuf field repeated .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_groups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTunnelDestGroups() + { + return $this->tunnel_dest_groups; + } + + /** + * TunnelDestGroup existing in the project. + * + * Generated from protobuf field repeated .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_groups = 1; + * @param array<\Google\Cloud\Iap\V1\TunnelDestGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTunnelDestGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iap\V1\TunnelDestGroup::class); + $this->tunnel_dest_groups = $arr; + + return $this; + } + + /** + * A token that you can send 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 you can send 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; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/OAuthSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/OAuthSettings.php new file mode 100644 index 000000000000..bc4042cf7d3b --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/OAuthSettings.php @@ -0,0 +1,129 @@ +google.cloud.iap.v1.OAuthSettings + */ +class OAuthSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Domain hint to send as hd=? parameter in OAuth request flow. Enables + * redirect to primary IDP by skipping Google's login screen. + * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param + * Note: IAP does not verify that the id token's hd claim matches this value + * since access behavior is managed by IAM policies. + * + * Generated from protobuf field .google.protobuf.StringValue login_hint = 2; + */ + protected $login_hint = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\StringValue $login_hint + * Domain hint to send as hd=? parameter in OAuth request flow. Enables + * redirect to primary IDP by skipping Google's login screen. + * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param + * Note: IAP does not verify that the id token's hd claim matches this value + * since access behavior is managed by IAM policies. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Domain hint to send as hd=? parameter in OAuth request flow. Enables + * redirect to primary IDP by skipping Google's login screen. + * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param + * Note: IAP does not verify that the id token's hd claim matches this value + * since access behavior is managed by IAM policies. + * + * Generated from protobuf field .google.protobuf.StringValue login_hint = 2; + * @return \Google\Protobuf\StringValue|null + */ + public function getLoginHint() + { + return $this->login_hint; + } + + public function hasLoginHint() + { + return isset($this->login_hint); + } + + public function clearLoginHint() + { + unset($this->login_hint); + } + + /** + * Returns the unboxed value from getLoginHint() + + * Domain hint to send as hd=? parameter in OAuth request flow. Enables + * redirect to primary IDP by skipping Google's login screen. + * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param + * Note: IAP does not verify that the id token's hd claim matches this value + * since access behavior is managed by IAM policies. + * + * Generated from protobuf field .google.protobuf.StringValue login_hint = 2; + * @return string|null + */ + public function getLoginHintUnwrapped() + { + return $this->readWrapperValue("login_hint"); + } + + /** + * Domain hint to send as hd=? parameter in OAuth request flow. Enables + * redirect to primary IDP by skipping Google's login screen. + * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param + * Note: IAP does not verify that the id token's hd claim matches this value + * since access behavior is managed by IAM policies. + * + * Generated from protobuf field .google.protobuf.StringValue login_hint = 2; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setLoginHint($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->login_hint = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. + + * Domain hint to send as hd=? parameter in OAuth request flow. Enables + * redirect to primary IDP by skipping Google's login screen. + * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param + * Note: IAP does not verify that the id token's hd claim matches this value + * since access behavior is managed by IAM policies. + * + * Generated from protobuf field .google.protobuf.StringValue login_hint = 2; + * @param string|null $var + * @return $this + */ + public function setLoginHintUnwrapped($var) + { + $this->writeWrapperValue("login_hint", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings.php new file mode 100644 index 000000000000..7c4baa762797 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings.php @@ -0,0 +1,153 @@ +google.cloud.iap.v1.ReauthSettings + */ +class ReauthSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Reauth method requested. + * + * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.Method method = 1; + */ + protected $method = 0; + /** + * Reauth session lifetime, how long before a user has to reauthenticate + * again. + * + * Generated from protobuf field .google.protobuf.Duration max_age = 2; + */ + protected $max_age = null; + /** + * How IAP determines the effective policy in cases of hierarchial policies. + * Policies are merged from higher in the hierarchy to lower in the hierarchy. + * + * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.PolicyType policy_type = 3; + */ + protected $policy_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $method + * Reauth method requested. + * @type \Google\Protobuf\Duration $max_age + * Reauth session lifetime, how long before a user has to reauthenticate + * again. + * @type int $policy_type + * How IAP determines the effective policy in cases of hierarchial policies. + * Policies are merged from higher in the hierarchy to lower in the hierarchy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Reauth method requested. + * + * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.Method method = 1; + * @return int + */ + public function getMethod() + { + return $this->method; + } + + /** + * Reauth method requested. + * + * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.Method method = 1; + * @param int $var + * @return $this + */ + public function setMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Iap\V1\ReauthSettings\Method::class); + $this->method = $var; + + return $this; + } + + /** + * Reauth session lifetime, how long before a user has to reauthenticate + * again. + * + * Generated from protobuf field .google.protobuf.Duration max_age = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxAge() + { + return $this->max_age; + } + + public function hasMaxAge() + { + return isset($this->max_age); + } + + public function clearMaxAge() + { + unset($this->max_age); + } + + /** + * Reauth session lifetime, how long before a user has to reauthenticate + * again. + * + * Generated from protobuf field .google.protobuf.Duration max_age = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxAge($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_age = $var; + + return $this; + } + + /** + * How IAP determines the effective policy in cases of hierarchial policies. + * Policies are merged from higher in the hierarchy to lower in the hierarchy. + * + * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.PolicyType policy_type = 3; + * @return int + */ + public function getPolicyType() + { + return $this->policy_type; + } + + /** + * How IAP determines the effective policy in cases of hierarchial policies. + * Policies are merged from higher in the hierarchy to lower in the hierarchy. + * + * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.PolicyType policy_type = 3; + * @param int $var + * @return $this + */ + public function setPolicyType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Iap\V1\ReauthSettings\PolicyType::class); + $this->policy_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/Method.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/Method.php new file mode 100644 index 000000000000..93b09ac5867d --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/Method.php @@ -0,0 +1,71 @@ +google.cloud.iap.v1.ReauthSettings.Method + */ +class Method +{ + /** + * Reauthentication disabled. + * + * Generated from protobuf enum METHOD_UNSPECIFIED = 0; + */ + const METHOD_UNSPECIFIED = 0; + /** + * Prompts the user to log in again. + * + * Generated from protobuf enum LOGIN = 1; + */ + const LOGIN = 1; + /** + * Deprecated, no longer accepted by IAP APIs. + * + * Generated from protobuf enum PASSWORD = 2 [deprecated = true]; + */ + const PASSWORD = 2; + /** + * User must use their secure key 2nd factor device. + * + * Generated from protobuf enum SECURE_KEY = 3; + */ + const SECURE_KEY = 3; + + private static $valueToName = [ + self::METHOD_UNSPECIFIED => 'METHOD_UNSPECIFIED', + self::LOGIN => 'LOGIN', + self::PASSWORD => 'PASSWORD', + self::SECURE_KEY => 'SECURE_KEY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Method::class, \Google\Cloud\Iap\V1\ReauthSettings_Method::class); + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/PolicyType.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/PolicyType.php new file mode 100644 index 000000000000..f2f2779c5aac --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/PolicyType.php @@ -0,0 +1,69 @@ +google.cloud.iap.v1.ReauthSettings.PolicyType + */ +class PolicyType +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum POLICY_TYPE_UNSPECIFIED = 0; + */ + const POLICY_TYPE_UNSPECIFIED = 0; + /** + * This policy acts as a minimum to other policies, lower in the hierarchy. + * Effective policy may only be the same or stricter. + * + * Generated from protobuf enum MINIMUM = 1; + */ + const MINIMUM = 1; + /** + * This policy acts as a default if no other reauth policy is set. + * + * Generated from protobuf enum DEFAULT = 2; + */ + const PBDEFAULT = 2; + + private static $valueToName = [ + self::POLICY_TYPE_UNSPECIFIED => 'POLICY_TYPE_UNSPECIFIED', + self::MINIMUM => 'MINIMUM', + self::PBDEFAULT => 'DEFAULT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has 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(PolicyType::class, \Google\Cloud\Iap\V1\ReauthSettings_PolicyType::class); + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings_Method.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings_Method.php new file mode 100644 index 000000000000..7d5223e450f2 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings_Method.php @@ -0,0 +1,16 @@ +google.cloud.iap.v1.ResetIdentityAwareProxyClientSecretRequest + */ +class ResetIdentityAwareProxyClientSecretRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the Identity Aware Proxy client to that will have its + * secret reset. In the following format: + * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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. Name of the Identity Aware Proxy client to that will have its + * secret reset. In the following format: + * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the Identity Aware Proxy client to that will have its + * secret reset. In the following format: + * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the Identity Aware Proxy client to that will have its + * secret reset. In the following format: + * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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/Iap/v1/proto/src/Google/Cloud/Iap/V1/TunnelDestGroup.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/TunnelDestGroup.php new file mode 100644 index 000000000000..d552a68d741c --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/TunnelDestGroup.php @@ -0,0 +1,143 @@ +google.cloud.iap.v1.TunnelDestGroup + */ +class TunnelDestGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Immutable. Identifier for the TunnelDestGroup. Must be unique + * within the project and contain only lower case letters (a-z) and dashes + * (-). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Unordered list. List of CIDRs that this group applies to. + * + * Generated from protobuf field repeated string cidrs = 2 [(.google.api.field_behavior) = UNORDERED_LIST]; + */ + private $cidrs; + /** + * Unordered list. List of FQDNs that this group applies to. + * + * Generated from protobuf field repeated string fqdns = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + */ + private $fqdns; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Immutable. Identifier for the TunnelDestGroup. Must be unique + * within the project and contain only lower case letters (a-z) and dashes + * (-). + * @type array|\Google\Protobuf\Internal\RepeatedField $cidrs + * Unordered list. List of CIDRs that this group applies to. + * @type array|\Google\Protobuf\Internal\RepeatedField $fqdns + * Unordered list. List of FQDNs that this group applies to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Immutable. Identifier for the TunnelDestGroup. Must be unique + * within the project and contain only lower case letters (a-z) and dashes + * (-). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Immutable. Identifier for the TunnelDestGroup. Must be unique + * within the project and contain only lower case letters (a-z) and dashes + * (-). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Unordered list. List of CIDRs that this group applies to. + * + * Generated from protobuf field repeated string cidrs = 2 [(.google.api.field_behavior) = UNORDERED_LIST]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCidrs() + { + return $this->cidrs; + } + + /** + * Unordered list. List of CIDRs that this group applies to. + * + * Generated from protobuf field repeated string cidrs = 2 [(.google.api.field_behavior) = UNORDERED_LIST]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCidrs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->cidrs = $arr; + + return $this; + } + + /** + * Unordered list. List of FQDNs that this group applies to. + * + * Generated from protobuf field repeated string fqdns = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFqdns() + { + return $this->fqdns; + } + + /** + * Unordered list. List of FQDNs that this group applies to. + * + * Generated from protobuf field repeated string fqdns = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFqdns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->fqdns = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateIapSettingsRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateIapSettingsRequest.php new file mode 100644 index 000000000000..672d6c7cd1e1 --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateIapSettingsRequest.php @@ -0,0 +1,137 @@ +google.cloud.iap.v1.UpdateIapSettingsRequest + */ +class UpdateIapSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The new values for the IAP settings to be updated. + * Authorization: Requires the `updateSettings` permission for the associated + * resource. + * + * Generated from protobuf field .google.cloud.iap.v1.IapSettings iap_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $iap_settings = null; + /** + * The field mask specifying which IAP settings should be updated. + * If omitted, the all of the settings are updated. See + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Iap\V1\IapSettings $iap_settings + * Required. The new values for the IAP settings to be updated. + * Authorization: Requires the `updateSettings` permission for the associated + * resource. + * @type \Google\Protobuf\FieldMask $update_mask + * The field mask specifying which IAP settings should be updated. + * If omitted, the all of the settings are updated. See + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The new values for the IAP settings to be updated. + * Authorization: Requires the `updateSettings` permission for the associated + * resource. + * + * Generated from protobuf field .google.cloud.iap.v1.IapSettings iap_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Iap\V1\IapSettings|null + */ + public function getIapSettings() + { + return $this->iap_settings; + } + + public function hasIapSettings() + { + return isset($this->iap_settings); + } + + public function clearIapSettings() + { + unset($this->iap_settings); + } + + /** + * Required. The new values for the IAP settings to be updated. + * Authorization: Requires the `updateSettings` permission for the associated + * resource. + * + * Generated from protobuf field .google.cloud.iap.v1.IapSettings iap_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Iap\V1\IapSettings $var + * @return $this + */ + public function setIapSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\IapSettings::class); + $this->iap_settings = $var; + + return $this; + } + + /** + * The field mask specifying which IAP settings should be updated. + * If omitted, the all of the settings are updated. See + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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); + } + + /** + * The field mask specifying which IAP settings should be updated. + * If omitted, the all of the settings are updated. See + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateTunnelDestGroupRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateTunnelDestGroupRequest.php new file mode 100644 index 000000000000..715d4dfbd7aa --- /dev/null +++ b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateTunnelDestGroupRequest.php @@ -0,0 +1,129 @@ +google.cloud.iap.v1.UpdateTunnelDestGroupRequest + */ +class UpdateTunnelDestGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The new values for the TunnelDestGroup. + * + * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tunnel_dest_group = null; + /** + * A field mask that specifies which IAP settings to update. + * If omitted, then all of the settings are updated. See + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Iap\V1\TunnelDestGroup $tunnel_dest_group + * Required. The new values for the TunnelDestGroup. + * @type \Google\Protobuf\FieldMask $update_mask + * A field mask that specifies which IAP settings to update. + * If omitted, then all of the settings are updated. See + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The new values for the TunnelDestGroup. + * + * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Iap\V1\TunnelDestGroup|null + */ + public function getTunnelDestGroup() + { + return $this->tunnel_dest_group; + } + + public function hasTunnelDestGroup() + { + return isset($this->tunnel_dest_group); + } + + public function clearTunnelDestGroup() + { + unset($this->tunnel_dest_group); + } + + /** + * Required. The new values for the TunnelDestGroup. + * + * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Iap\V1\TunnelDestGroup $var + * @return $this + */ + public function setTunnelDestGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\TunnelDestGroup::class); + $this->tunnel_dest_group = $var; + + return $this; + } + + /** + * A field mask that specifies which IAP settings to update. + * If omitted, then all of the settings are updated. See + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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 field mask that specifies which IAP settings to update. + * If omitted, then all of the settings are updated. See + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/create_tunnel_dest_group.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/create_tunnel_dest_group.php new file mode 100644 index 000000000000..3cf0ce79be17 --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/create_tunnel_dest_group.php @@ -0,0 +1,92 @@ +setName($tunnelDestGroupName); + + // Call the API and handle any network failures. + try { + /** @var TunnelDestGroup $response */ + $response = $identityAwareProxyAdminServiceClient->createTunnelDestGroup( + $formattedParent, + $tunnelDestGroup, + $tunnelDestGroupId + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = IdentityAwareProxyAdminServiceClient::tunnelLocationName( + '[PROJECT]', + '[LOCATION]' + ); + $tunnelDestGroupName = '[NAME]'; + $tunnelDestGroupId = '[TUNNEL_DEST_GROUP_ID]'; + + create_tunnel_dest_group_sample($formattedParent, $tunnelDestGroupName, $tunnelDestGroupId); +} +// [END iap_v1_generated_IdentityAwareProxyAdminService_CreateTunnelDestGroup_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/delete_tunnel_dest_group.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/delete_tunnel_dest_group.php new file mode 100644 index 000000000000..837f12a971a3 --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/delete_tunnel_dest_group.php @@ -0,0 +1,70 @@ +deleteTunnelDestGroup($formattedName); + 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 = IdentityAwareProxyAdminServiceClient::tunnelDestGroupName( + '[PROJECT]', + '[LOCATION]', + '[DEST_GROUP]' + ); + + delete_tunnel_dest_group_sample($formattedName); +} +// [END iap_v1_generated_IdentityAwareProxyAdminService_DeleteTunnelDestGroup_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iam_policy.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..df094f89b806 --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iam_policy.php @@ -0,0 +1,69 @@ +getIamPolicy($resource); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 iap_v1_generated_IdentityAwareProxyAdminService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iap_settings.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iap_settings.php new file mode 100644 index 000000000000..1248c6c1a558 --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iap_settings.php @@ -0,0 +1,67 @@ +getIapSettings($name); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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_iap_settings_sample($name); +} +// [END iap_v1_generated_IdentityAwareProxyAdminService_GetIapSettings_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_tunnel_dest_group.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_tunnel_dest_group.php new file mode 100644 index 000000000000..8f6fe042039c --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_tunnel_dest_group.php @@ -0,0 +1,72 @@ +getTunnelDestGroup($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = IdentityAwareProxyAdminServiceClient::tunnelDestGroupName( + '[PROJECT]', + '[LOCATION]', + '[DEST_GROUP]' + ); + + get_tunnel_dest_group_sample($formattedName); +} +// [END iap_v1_generated_IdentityAwareProxyAdminService_GetTunnelDestGroup_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/list_tunnel_dest_groups.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/list_tunnel_dest_groups.php new file mode 100644 index 000000000000..0e2d0981ba2c --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/list_tunnel_dest_groups.php @@ -0,0 +1,79 @@ +listTunnelDestGroups($formattedParent); + + /** @var TunnelDestGroup $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 = IdentityAwareProxyAdminServiceClient::tunnelLocationName( + '[PROJECT]', + '[LOCATION]' + ); + + list_tunnel_dest_groups_sample($formattedParent); +} +// [END iap_v1_generated_IdentityAwareProxyAdminService_ListTunnelDestGroups_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/set_iam_policy.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..0015005fcca1 --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/set_iam_policy.php @@ -0,0 +1,72 @@ +setIamPolicy($resource, $policy); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 iap_v1_generated_IdentityAwareProxyAdminService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/test_iam_permissions.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..9768775d4058 --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/test_iam_permissions.php @@ -0,0 +1,77 @@ +testIamPermissions($resource, $permissions); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 iap_v1_generated_IdentityAwareProxyAdminService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_iap_settings.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_iap_settings.php new file mode 100644 index 000000000000..20c346e8bd5e --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_iap_settings.php @@ -0,0 +1,70 @@ +setName($iapSettingsName); + + // Call the API and handle any network failures. + try { + /** @var IapSettings $response */ + $response = $identityAwareProxyAdminServiceClient->updateIapSettings($iapSettings); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $iapSettingsName = '[NAME]'; + + update_iap_settings_sample($iapSettingsName); +} +// [END iap_v1_generated_IdentityAwareProxyAdminService_UpdateIapSettings_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_tunnel_dest_group.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_tunnel_dest_group.php new file mode 100644 index 000000000000..ee3eb84f59d2 --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_tunnel_dest_group.php @@ -0,0 +1,71 @@ +setName($tunnelDestGroupName); + + // Call the API and handle any network failures. + try { + /** @var TunnelDestGroup $response */ + $response = $identityAwareProxyAdminServiceClient->updateTunnelDestGroup($tunnelDestGroup); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $tunnelDestGroupName = '[NAME]'; + + update_tunnel_dest_group_sample($tunnelDestGroupName); +} +// [END iap_v1_generated_IdentityAwareProxyAdminService_UpdateTunnelDestGroup_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_brand.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_brand.php new file mode 100644 index 000000000000..530bc4083f91 --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_brand.php @@ -0,0 +1,76 @@ +createBrand($parent, $brand); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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_brand_sample($parent); +} +// [END iap_v1_generated_IdentityAwareProxyOAuthService_CreateBrand_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_identity_aware_proxy_client.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_identity_aware_proxy_client.php new file mode 100644 index 000000000000..efc69ae78788 --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_identity_aware_proxy_client.php @@ -0,0 +1,76 @@ +createIdentityAwareProxyClient( + $parent, + $identityAwareProxyClient + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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_identity_aware_proxy_client_sample($parent); +} +// [END iap_v1_generated_IdentityAwareProxyOAuthService_CreateIdentityAwareProxyClient_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/delete_identity_aware_proxy_client.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/delete_identity_aware_proxy_client.php new file mode 100644 index 000000000000..4aabc43e1b57 --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/delete_identity_aware_proxy_client.php @@ -0,0 +1,67 @@ +deleteIdentityAwareProxyClient($name); + 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 +{ + $name = '[NAME]'; + + delete_identity_aware_proxy_client_sample($name); +} +// [END iap_v1_generated_IdentityAwareProxyOAuthService_DeleteIdentityAwareProxyClient_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_brand.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_brand.php new file mode 100644 index 000000000000..e10c2745c15d --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_brand.php @@ -0,0 +1,66 @@ +getBrand($name); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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_brand_sample($name); +} +// [END iap_v1_generated_IdentityAwareProxyOAuthService_GetBrand_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_identity_aware_proxy_client.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_identity_aware_proxy_client.php new file mode 100644 index 000000000000..af61a6b6153f --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_identity_aware_proxy_client.php @@ -0,0 +1,68 @@ +getIdentityAwareProxyClient($name); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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_identity_aware_proxy_client_sample($name); +} +// [END iap_v1_generated_IdentityAwareProxyOAuthService_GetIdentityAwareProxyClient_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_brands.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_brands.php new file mode 100644 index 000000000000..821facb0216a --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_brands.php @@ -0,0 +1,66 @@ +listBrands($parent); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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_brands_sample($parent); +} +// [END iap_v1_generated_IdentityAwareProxyOAuthService_ListBrands_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_identity_aware_proxy_clients.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_identity_aware_proxy_clients.php new file mode 100644 index 000000000000..9453f08e7712 --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_identity_aware_proxy_clients.php @@ -0,0 +1,71 @@ +listIdentityAwareProxyClients($parent); + + /** @var IdentityAwareProxyClient $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_identity_aware_proxy_clients_sample($parent); +} +// [END iap_v1_generated_IdentityAwareProxyOAuthService_ListIdentityAwareProxyClients_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/reset_identity_aware_proxy_client_secret.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/reset_identity_aware_proxy_client_secret.php new file mode 100644 index 000000000000..19a0297da962 --- /dev/null +++ b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/reset_identity_aware_proxy_client_secret.php @@ -0,0 +1,68 @@ +resetIdentityAwareProxyClientSecret($name); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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_identity_aware_proxy_client_secret_sample($name); +} +// [END iap_v1_generated_IdentityAwareProxyOAuthService_ResetIdentityAwareProxyClientSecret_sync] diff --git a/owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyAdminServiceGapicClient.php b/owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyAdminServiceGapicClient.php new file mode 100644 index 000000000000..6feed0f1af94 --- /dev/null +++ b/owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyAdminServiceGapicClient.php @@ -0,0 +1,791 @@ +tunnelLocationName('[PROJECT]', '[LOCATION]'); + * $tunnelDestGroup = new TunnelDestGroup(); + * $tunnelDestGroupId = 'tunnel_dest_group_id'; + * $response = $identityAwareProxyAdminServiceClient->createTunnelDestGroup($formattedParent, $tunnelDestGroup, $tunnelDestGroupId); + * } finally { + * $identityAwareProxyAdminServiceClient->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. + */ +class IdentityAwareProxyAdminServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.iap.v1.IdentityAwareProxyAdminService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'iap.googleapis.com'; + + /** 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 $tunnelDestGroupNameTemplate; + + private static $tunnelLocationNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/identity_aware_proxy_admin_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_admin_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_admin_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_admin_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getTunnelDestGroupNameTemplate() + { + if (self::$tunnelDestGroupNameTemplate == null) { + self::$tunnelDestGroupNameTemplate = new PathTemplate('projects/{project}/iap_tunnel/locations/{location}/destGroups/{dest_group}'); + } + + return self::$tunnelDestGroupNameTemplate; + } + + private static function getTunnelLocationNameTemplate() + { + if (self::$tunnelLocationNameTemplate == null) { + self::$tunnelLocationNameTemplate = new PathTemplate('projects/{project}/iap_tunnel/locations/{location}'); + } + + return self::$tunnelLocationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'tunnelDestGroup' => self::getTunnelDestGroupNameTemplate(), + 'tunnelLocation' => self::getTunnelLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * tunnel_dest_group resource. + * + * @param string $project + * @param string $location + * @param string $destGroup + * + * @return string The formatted tunnel_dest_group resource. + */ + public static function tunnelDestGroupName($project, $location, $destGroup) + { + return self::getTunnelDestGroupNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'dest_group' => $destGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * tunnel_location resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted tunnel_location resource. + */ + public static function tunnelLocationName($project, $location) + { + return self::getTunnelLocationNameTemplate()->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 + * - tunnelDestGroup: projects/{project}/iap_tunnel/locations/{location}/destGroups/{dest_group} + * - tunnelLocation: projects/{project}/iap_tunnel/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($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 'iap.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 TunnelDestGroup. + * + * Sample code: + * ``` + * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); + * try { + * $formattedParent = $identityAwareProxyAdminServiceClient->tunnelLocationName('[PROJECT]', '[LOCATION]'); + * $tunnelDestGroup = new TunnelDestGroup(); + * $tunnelDestGroupId = 'tunnel_dest_group_id'; + * $response = $identityAwareProxyAdminServiceClient->createTunnelDestGroup($formattedParent, $tunnelDestGroup, $tunnelDestGroupId); + * } finally { + * $identityAwareProxyAdminServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Google Cloud Project ID and location. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}`. + * @param TunnelDestGroup $tunnelDestGroup Required. The TunnelDestGroup to create. + * @param string $tunnelDestGroupId Required. The ID to use for the TunnelDestGroup, which becomes the final + * component of the resource name. + * + * This value must be 4-63 characters, and valid characters + * are `[a-z]-`. + * @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\Iap\V1\TunnelDestGroup + * + * @throws ApiException if the remote call fails + */ + public function createTunnelDestGroup($parent, $tunnelDestGroup, $tunnelDestGroupId, array $optionalArgs = []) + { + $request = new CreateTunnelDestGroupRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setTunnelDestGroup($tunnelDestGroup); + $request->setTunnelDestGroupId($tunnelDestGroupId); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateTunnelDestGroup', TunnelDestGroup::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a TunnelDestGroup. + * + * Sample code: + * ``` + * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); + * try { + * $formattedName = $identityAwareProxyAdminServiceClient->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); + * $identityAwareProxyAdminServiceClient->deleteTunnelDestGroup($formattedName); + * } finally { + * $identityAwareProxyAdminServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the TunnelDestGroup to delete. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. + * @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 deleteTunnelDestGroup($name, array $optionalArgs = []) + { + $request = new DeleteTunnelDestGroupRequest(); + $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('DeleteTunnelDestGroup', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the access control policy for an Identity-Aware Proxy protected + * resource. + * More information about managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * + * Sample code: + * ``` + * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); + * try { + * $resource = 'resource'; + * $response = $identityAwareProxyAdminServiceClient->getIamPolicy($resource); + * } finally { + * $identityAwareProxyAdminServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the IAP settings on a particular IAP protected resource. + * + * Sample code: + * ``` + * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); + * try { + * $name = 'name'; + * $response = $identityAwareProxyAdminServiceClient->getIapSettings($name); + * } finally { + * $identityAwareProxyAdminServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name for which to retrieve the settings. + * Authorization: Requires the `getSettings` permission for the associated + * resource. + * @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\Iap\V1\IapSettings + * + * @throws ApiException if the remote call fails + */ + public function getIapSettings($name, array $optionalArgs = []) + { + $request = new GetIapSettingsRequest(); + $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('GetIapSettings', IapSettings::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves an existing TunnelDestGroup. + * + * Sample code: + * ``` + * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); + * try { + * $formattedName = $identityAwareProxyAdminServiceClient->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); + * $response = $identityAwareProxyAdminServiceClient->getTunnelDestGroup($formattedName); + * } finally { + * $identityAwareProxyAdminServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the TunnelDestGroup to be fetched. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. + * @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\Iap\V1\TunnelDestGroup + * + * @throws ApiException if the remote call fails + */ + public function getTunnelDestGroup($name, array $optionalArgs = []) + { + $request = new GetTunnelDestGroupRequest(); + $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('GetTunnelDestGroup', TunnelDestGroup::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the existing TunnelDestGroups. To group across all locations, use a + * `-` as the location ID. For example: + * `/v1/projects/123/iap_tunnel/locations/-/destGroups` + * + * Sample code: + * ``` + * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); + * try { + * $formattedParent = $identityAwareProxyAdminServiceClient->tunnelLocationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $identityAwareProxyAdminServiceClient->listTunnelDestGroups($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $identityAwareProxyAdminServiceClient->listTunnelDestGroups($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $identityAwareProxyAdminServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Google Cloud Project ID and location. + * In the following format: + * `projects/{project_number/id}/iap_tunnel/locations/{location}`. + * A `-` can be used for the location to group across all locations. + * @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 listTunnelDestGroups($parent, array $optionalArgs = []) + { + $request = new ListTunnelDestGroupsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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('ListTunnelDestGroups', $optionalArgs, ListTunnelDestGroupsResponse::class, $request); + } + + /** + * Sets the access control policy for an Identity-Aware Proxy protected + * resource. Replaces any existing policy. + * More information about managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * + * Sample code: + * ``` + * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $identityAwareProxyAdminServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $identityAwareProxyAdminServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + 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('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns permissions that a caller has on the Identity-Aware Proxy protected + * resource. + * More information about managing access via IAP can be found at: + * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api + * + * Sample code: + * ``` + * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $identityAwareProxyAdminServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $identityAwareProxyAdminServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @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\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates the IAP settings on a particular IAP protected resource. It + * replaces all fields unless the `update_mask` is set. + * + * Sample code: + * ``` + * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); + * try { + * $iapSettings = new IapSettings(); + * $response = $identityAwareProxyAdminServiceClient->updateIapSettings($iapSettings); + * } finally { + * $identityAwareProxyAdminServiceClient->close(); + * } + * ``` + * + * @param IapSettings $iapSettings Required. The new values for the IAP settings to be updated. + * Authorization: Requires the `updateSettings` permission for the associated + * resource. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The field mask specifying which IAP settings should be updated. + * If omitted, the all of the settings are updated. See + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iap\V1\IapSettings + * + * @throws ApiException if the remote call fails + */ + public function updateIapSettings($iapSettings, array $optionalArgs = []) + { + $request = new UpdateIapSettingsRequest(); + $requestParamHeaders = []; + $request->setIapSettings($iapSettings); + $requestParamHeaders['iap_settings.name'] = $iapSettings->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('UpdateIapSettings', IapSettings::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a TunnelDestGroup. + * + * Sample code: + * ``` + * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); + * try { + * $tunnelDestGroup = new TunnelDestGroup(); + * $response = $identityAwareProxyAdminServiceClient->updateTunnelDestGroup($tunnelDestGroup); + * } finally { + * $identityAwareProxyAdminServiceClient->close(); + * } + * ``` + * + * @param TunnelDestGroup $tunnelDestGroup Required. The new values for the TunnelDestGroup. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * A field mask that specifies which IAP settings to update. + * If omitted, then all of the settings are updated. See + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iap\V1\TunnelDestGroup + * + * @throws ApiException if the remote call fails + */ + public function updateTunnelDestGroup($tunnelDestGroup, array $optionalArgs = []) + { + $request = new UpdateTunnelDestGroupRequest(); + $requestParamHeaders = []; + $request->setTunnelDestGroup($tunnelDestGroup); + $requestParamHeaders['tunnel_dest_group.name'] = $tunnelDestGroup->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('UpdateTunnelDestGroup', TunnelDestGroup::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyOAuthServiceGapicClient.php b/owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyOAuthServiceGapicClient.php new file mode 100644 index 000000000000..884b901dd0f9 --- /dev/null +++ b/owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyOAuthServiceGapicClient.php @@ -0,0 +1,538 @@ +createBrand($parent, $brand); + * } finally { + * $identityAwareProxyOAuthServiceClient->close(); + * } + * ``` + */ +class IdentityAwareProxyOAuthServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.iap.v1.IdentityAwareProxyOAuthService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'iap.googleapis.com'; + + /** 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/identity_aware_proxy_o_auth_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_o_auth_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_o_auth_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_o_auth_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 'iap.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); + } + + /** + * Constructs a new OAuth brand for the project if one does not exist. + * The created brand is "internal only", meaning that OAuth clients created + * under it only accept requests from users who belong to the same Google + * Workspace organization as the project. The brand is created in an + * un-reviewed status. NOTE: The "internal only" status can be manually + * changed in the Google Cloud Console. Requires that a brand does not already + * exist for the project, and that the specified support email is owned by the + * caller. + * + * Sample code: + * ``` + * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); + * try { + * $parent = 'parent'; + * $brand = new Brand(); + * $response = $identityAwareProxyOAuthServiceClient->createBrand($parent, $brand); + * } finally { + * $identityAwareProxyOAuthServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. GCP Project number/id under which the brand is to be created. + * In the following format: projects/{project_number/id}. + * @param Brand $brand Required. The brand to be created. + * @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\Iap\V1\Brand + * + * @throws ApiException if the remote call fails + */ + public function createBrand($parent, $brand, array $optionalArgs = []) + { + $request = new CreateBrandRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setBrand($brand); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateBrand', Brand::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates an Identity Aware Proxy (IAP) OAuth client. The client is owned + * by IAP. Requires that the brand for the project exists and that it is + * set for internal-only use. + * + * Sample code: + * ``` + * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); + * try { + * $parent = 'parent'; + * $identityAwareProxyClient = new IdentityAwareProxyClient(); + * $response = $identityAwareProxyOAuthServiceClient->createIdentityAwareProxyClient($parent, $identityAwareProxyClient); + * } finally { + * $identityAwareProxyOAuthServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Path to create the client in. + * In the following format: + * projects/{project_number/id}/brands/{brand}. + * The project must belong to a G Suite account. + * @param IdentityAwareProxyClient $identityAwareProxyClient Required. Identity Aware Proxy Client to be created. + * @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\Iap\V1\IdentityAwareProxyClient + * + * @throws ApiException if the remote call fails + */ + public function createIdentityAwareProxyClient($parent, $identityAwareProxyClient, array $optionalArgs = []) + { + $request = new CreateIdentityAwareProxyClientRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setIdentityAwareProxyClient($identityAwareProxyClient); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateIdentityAwareProxyClient', IdentityAwareProxyClient::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes an Identity Aware Proxy (IAP) OAuth client. Useful for removing + * obsolete clients, managing the number of clients in a given project, and + * cleaning up after tests. Requires that the client is owned by IAP. + * + * Sample code: + * ``` + * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); + * try { + * $name = 'name'; + * $identityAwareProxyOAuthServiceClient->deleteIdentityAwareProxyClient($name); + * } finally { + * $identityAwareProxyOAuthServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the Identity Aware Proxy client to be deleted. + * In the following format: + * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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 deleteIdentityAwareProxyClient($name, array $optionalArgs = []) + { + $request = new DeleteIdentityAwareProxyClientRequest(); + $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('DeleteIdentityAwareProxyClient', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves the OAuth brand of the project. + * + * Sample code: + * ``` + * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); + * try { + * $name = 'name'; + * $response = $identityAwareProxyOAuthServiceClient->getBrand($name); + * } finally { + * $identityAwareProxyOAuthServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the brand to be fetched. + * In the following format: projects/{project_number/id}/brands/{brand}. + * @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\Iap\V1\Brand + * + * @throws ApiException if the remote call fails + */ + public function getBrand($name, array $optionalArgs = []) + { + $request = new GetBrandRequest(); + $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('GetBrand', Brand::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves an Identity Aware Proxy (IAP) OAuth client. + * Requires that the client is owned by IAP. + * + * Sample code: + * ``` + * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); + * try { + * $name = 'name'; + * $response = $identityAwareProxyOAuthServiceClient->getIdentityAwareProxyClient($name); + * } finally { + * $identityAwareProxyOAuthServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the Identity Aware Proxy client to be fetched. + * In the following format: + * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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\Iap\V1\IdentityAwareProxyClient + * + * @throws ApiException if the remote call fails + */ + public function getIdentityAwareProxyClient($name, array $optionalArgs = []) + { + $request = new GetIdentityAwareProxyClientRequest(); + $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('GetIdentityAwareProxyClient', IdentityAwareProxyClient::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the existing brands for the project. + * + * Sample code: + * ``` + * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); + * try { + * $parent = 'parent'; + * $response = $identityAwareProxyOAuthServiceClient->listBrands($parent); + * } finally { + * $identityAwareProxyOAuthServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. GCP Project number/id. + * In the following format: projects/{project_number/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\Iap\V1\ListBrandsResponse + * + * @throws ApiException if the remote call fails + */ + public function listBrands($parent, array $optionalArgs = []) + { + $request = new ListBrandsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ListBrands', ListBrandsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the existing clients for the brand. + * + * Sample code: + * ``` + * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); + * try { + * $parent = 'parent'; + * // Iterate over pages of elements + * $pagedResponse = $identityAwareProxyOAuthServiceClient->listIdentityAwareProxyClients($parent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $identityAwareProxyOAuthServiceClient->listIdentityAwareProxyClients($parent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $identityAwareProxyOAuthServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Full brand path. + * In the following format: projects/{project_number/id}/brands/{brand}. + * @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 listIdentityAwareProxyClients($parent, array $optionalArgs = []) + { + $request = new ListIdentityAwareProxyClientsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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('ListIdentityAwareProxyClients', $optionalArgs, ListIdentityAwareProxyClientsResponse::class, $request); + } + + /** + * Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the + * secret was compromised. Requires that the client is owned by IAP. + * + * Sample code: + * ``` + * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); + * try { + * $name = 'name'; + * $response = $identityAwareProxyOAuthServiceClient->resetIdentityAwareProxyClientSecret($name); + * } finally { + * $identityAwareProxyOAuthServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the Identity Aware Proxy client to that will have its + * secret reset. In the following format: + * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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\Iap\V1\IdentityAwareProxyClient + * + * @throws ApiException if the remote call fails + */ + public function resetIdentityAwareProxyClientSecret($name, array $optionalArgs = []) + { + $request = new ResetIdentityAwareProxyClientSecretRequest(); + $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('ResetIdentityAwareProxyClientSecret', IdentityAwareProxyClient::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Iap/v1/src/V1/IdentityAwareProxyAdminServiceClient.php b/owl-bot-staging/Iap/v1/src/V1/IdentityAwareProxyAdminServiceClient.php new file mode 100644 index 000000000000..2c2e79e96b7e --- /dev/null +++ b/owl-bot-staging/Iap/v1/src/V1/IdentityAwareProxyAdminServiceClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.iap.v1.IdentityAwareProxyAdminService' => [ + 'ListTunnelDestGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTunnelDestGroups', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php new file mode 100644 index 000000000000..c49e6cb53acc --- /dev/null +++ b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php @@ -0,0 +1,130 @@ + [ + 'google.cloud.iap.v1.IdentityAwareProxyAdminService' => [ + 'CreateTunnelDestGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/iap_tunnel/locations/*}/destGroups', + 'body' => 'tunnel_dest_group', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'tunnel_dest_group_id', + ], + ], + 'DeleteTunnelDestGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/iap_tunnel/locations/*/destGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=**}:getIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetIapSettings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=**}:iapSettings', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTunnelDestGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/iap_tunnel/locations/*/destGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListTunnelDestGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/iap_tunnel/locations/*}/destGroups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=**}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=**}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateIapSettings' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{iap_settings.name=**}:iapSettings', + 'body' => 'iap_settings', + 'placeholders' => [ + 'iap_settings.name' => [ + 'getters' => [ + 'getIapSettings', + 'getName', + ], + ], + ], + ], + 'UpdateTunnelDestGroup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{tunnel_dest_group.name=projects/*/iap_tunnel/locations/*/destGroups/*}', + 'body' => 'tunnel_dest_group', + 'placeholders' => [ + 'tunnel_dest_group.name' => [ + 'getters' => [ + 'getTunnelDestGroup', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_client_config.json b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_client_config.json new file mode 100644 index 000000000000..71494a74db15 --- /dev/null +++ b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_client_config.json @@ -0,0 +1,72 @@ +{ + "interfaces": { + "google.cloud.iap.v1.IdentityAwareProxyOAuthService": { + "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": { + "CreateBrand": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateIdentityAwareProxyClient": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteIdentityAwareProxyClient": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetBrand": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetIdentityAwareProxyClient": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListBrands": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListIdentityAwareProxyClients": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResetIdentityAwareProxyClientSecret": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_descriptor_config.php b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_descriptor_config.php new file mode 100644 index 000000000000..7953ceef8d11 --- /dev/null +++ b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_descriptor_config.php @@ -0,0 +1,18 @@ + [ + 'google.cloud.iap.v1.IdentityAwareProxyOAuthService' => [ + 'ListIdentityAwareProxyClients' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getIdentityAwareProxyClients', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php new file mode 100644 index 000000000000..0e5faa00e399 --- /dev/null +++ b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php @@ -0,0 +1,100 @@ + [ + 'google.cloud.iap.v1.IdentityAwareProxyOAuthService' => [ + 'CreateBrand' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/brands', + 'body' => 'brand', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateIdentityAwareProxyClient' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/brands/*}/identityAwareProxyClients', + 'body' => 'identity_aware_proxy_client', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteIdentityAwareProxyClient' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBrand' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/brands/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIdentityAwareProxyClient' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBrands' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/brands', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListIdentityAwareProxyClients' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/brands/*}/identityAwareProxyClients', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ResetIdentityAwareProxyClientSecret' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}:resetSecret', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Iap/v1/tests/Unit/V1/IdentityAwareProxyAdminServiceClientTest.php b/owl-bot-staging/Iap/v1/tests/Unit/V1/IdentityAwareProxyAdminServiceClientTest.php new file mode 100644 index 000000000000..db53d466bdb9 --- /dev/null +++ b/owl-bot-staging/Iap/v1/tests/Unit/V1/IdentityAwareProxyAdminServiceClientTest.php @@ -0,0 +1,701 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return IdentityAwareProxyAdminServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new IdentityAwareProxyAdminServiceClient($options); + } + + /** @test */ + public function createTunnelDestGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new TunnelDestGroup(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tunnelLocationName('[PROJECT]', '[LOCATION]'); + $tunnelDestGroup = new TunnelDestGroup(); + $tunnelDestGroupName = 'tunnelDestGroupName1906281888'; + $tunnelDestGroup->setName($tunnelDestGroupName); + $tunnelDestGroupId = 'tunnelDestGroupId-1205367743'; + $response = $gapicClient->createTunnelDestGroup($formattedParent, $tunnelDestGroup, $tunnelDestGroupId); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/CreateTunnelDestGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTunnelDestGroup(); + $this->assertProtobufEquals($tunnelDestGroup, $actualValue); + $actualValue = $actualRequestObject->getTunnelDestGroupId(); + $this->assertProtobufEquals($tunnelDestGroupId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTunnelDestGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tunnelLocationName('[PROJECT]', '[LOCATION]'); + $tunnelDestGroup = new TunnelDestGroup(); + $tunnelDestGroupName = 'tunnelDestGroupName1906281888'; + $tunnelDestGroup->setName($tunnelDestGroupName); + $tunnelDestGroupId = 'tunnelDestGroupId-1205367743'; + try { + $gapicClient->createTunnelDestGroup($formattedParent, $tunnelDestGroup, $tunnelDestGroupId); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTunnelDestGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); + $gapicClient->deleteTunnelDestGroup($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/DeleteTunnelDestGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTunnelDestGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); + try { + $gapicClient->deleteTunnelDestGroup($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 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'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/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'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIapSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new IapSettings(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->getIapSettings($name); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/GetIapSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIapSettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->getIapSettings($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 getTunnelDestGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new TunnelDestGroup(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); + $response = $gapicClient->getTunnelDestGroup($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/GetTunnelDestGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTunnelDestGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); + try { + $gapicClient->getTunnelDestGroup($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 listTunnelDestGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tunnelDestGroupsElement = new TunnelDestGroup(); + $tunnelDestGroups = [ + $tunnelDestGroupsElement, + ]; + $expectedResponse = new ListTunnelDestGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTunnelDestGroups($tunnelDestGroups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tunnelLocationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listTunnelDestGroups($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTunnelDestGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/ListTunnelDestGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTunnelDestGroupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tunnelLocationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listTunnelDestGroups($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 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(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/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(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/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 = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateIapSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new IapSettings(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $iapSettings = new IapSettings(); + $iapSettingsName = 'iapSettingsName-218298426'; + $iapSettings->setName($iapSettingsName); + $response = $gapicClient->updateIapSettings($iapSettings); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/UpdateIapSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getIapSettings(); + $this->assertProtobufEquals($iapSettings, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateIapSettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $iapSettings = new IapSettings(); + $iapSettingsName = 'iapSettingsName-218298426'; + $iapSettings->setName($iapSettingsName); + try { + $gapicClient->updateIapSettings($iapSettings); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTunnelDestGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new TunnelDestGroup(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $tunnelDestGroup = new TunnelDestGroup(); + $tunnelDestGroupName = 'tunnelDestGroupName1906281888'; + $tunnelDestGroup->setName($tunnelDestGroupName); + $response = $gapicClient->updateTunnelDestGroup($tunnelDestGroup); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/UpdateTunnelDestGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getTunnelDestGroup(); + $this->assertProtobufEquals($tunnelDestGroup, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTunnelDestGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $tunnelDestGroup = new TunnelDestGroup(); + $tunnelDestGroupName = 'tunnelDestGroupName1906281888'; + $tunnelDestGroup->setName($tunnelDestGroupName); + try { + $gapicClient->updateTunnelDestGroup($tunnelDestGroup); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->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/Iap/v1/tests/Unit/V1/IdentityAwareProxyOAuthServiceClientTest.php b/owl-bot-staging/Iap/v1/tests/Unit/V1/IdentityAwareProxyOAuthServiceClientTest.php new file mode 100644 index 000000000000..d23cb4b1577e --- /dev/null +++ b/owl-bot-staging/Iap/v1/tests/Unit/V1/IdentityAwareProxyOAuthServiceClientTest.php @@ -0,0 +1,580 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return IdentityAwareProxyOAuthServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new IdentityAwareProxyOAuthServiceClient($options); + } + + /** @test */ + public function createBrandTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $supportEmail = 'supportEmail-648030420'; + $applicationTitle = 'applicationTitle24071849'; + $orgInternalOnly = false; + $expectedResponse = new Brand(); + $expectedResponse->setName($name); + $expectedResponse->setSupportEmail($supportEmail); + $expectedResponse->setApplicationTitle($applicationTitle); + $expectedResponse->setOrgInternalOnly($orgInternalOnly); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $brand = new Brand(); + $response = $gapicClient->createBrand($parent, $brand); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/CreateBrand', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getBrand(); + $this->assertProtobufEquals($brand, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createBrandExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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'; + $brand = new Brand(); + try { + $gapicClient->createBrand($parent, $brand); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createIdentityAwareProxyClientTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $secret = 'secret-906277200'; + $displayName = 'displayName1615086568'; + $expectedResponse = new IdentityAwareProxyClient(); + $expectedResponse->setName($name); + $expectedResponse->setSecret($secret); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $identityAwareProxyClient = new IdentityAwareProxyClient(); + $response = $gapicClient->createIdentityAwareProxyClient($parent, $identityAwareProxyClient); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/CreateIdentityAwareProxyClient', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getIdentityAwareProxyClient(); + $this->assertProtobufEquals($identityAwareProxyClient, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createIdentityAwareProxyClientExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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'; + $identityAwareProxyClient = new IdentityAwareProxyClient(); + try { + $gapicClient->createIdentityAwareProxyClient($parent, $identityAwareProxyClient); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteIdentityAwareProxyClientTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $gapicClient->deleteIdentityAwareProxyClient($name); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/DeleteIdentityAwareProxyClient', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteIdentityAwareProxyClientExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->deleteIdentityAwareProxyClient($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 getBrandTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $supportEmail = 'supportEmail-648030420'; + $applicationTitle = 'applicationTitle24071849'; + $orgInternalOnly = false; + $expectedResponse = new Brand(); + $expectedResponse->setName($name2); + $expectedResponse->setSupportEmail($supportEmail); + $expectedResponse->setApplicationTitle($applicationTitle); + $expectedResponse->setOrgInternalOnly($orgInternalOnly); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->getBrand($name); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/GetBrand', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBrandExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->getBrand($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 getIdentityAwareProxyClientTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $secret = 'secret-906277200'; + $displayName = 'displayName1615086568'; + $expectedResponse = new IdentityAwareProxyClient(); + $expectedResponse->setName($name2); + $expectedResponse->setSecret($secret); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->getIdentityAwareProxyClient($name); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/GetIdentityAwareProxyClient', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIdentityAwareProxyClientExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->getIdentityAwareProxyClient($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 listBrandsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListBrandsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $response = $gapicClient->listBrands($parent); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ListBrands', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBrandsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->listBrands($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 listIdentityAwareProxyClientsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $identityAwareProxyClientsElement = new IdentityAwareProxyClient(); + $identityAwareProxyClients = [ + $identityAwareProxyClientsElement, + ]; + $expectedResponse = new ListIdentityAwareProxyClientsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setIdentityAwareProxyClients($identityAwareProxyClients); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $response = $gapicClient->listIdentityAwareProxyClients($parent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getIdentityAwareProxyClients()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ListIdentityAwareProxyClients', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIdentityAwareProxyClientsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->listIdentityAwareProxyClients($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 resetIdentityAwareProxyClientSecretTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $secret = 'secret-906277200'; + $displayName = 'displayName1615086568'; + $expectedResponse = new IdentityAwareProxyClient(); + $expectedResponse->setName($name2); + $expectedResponse->setSecret($secret); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->resetIdentityAwareProxyClientSecret($name); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ResetIdentityAwareProxyClientSecret', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetIdentityAwareProxyClientSecretExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->resetIdentityAwareProxyClientSecret($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()); + } +} diff --git a/owl-bot-staging/Ids/v1/proto/src/GPBMetadata/Google/Cloud/Ids/V1/Ids.php b/owl-bot-staging/Ids/v1/proto/src/GPBMetadata/Google/Cloud/Ids/V1/Ids.php new file mode 100644 index 0000000000000000000000000000000000000000..95e3d56d00b169997a61de73077d22b16e155e61 GIT binary patch literal 3693 zcmbVP%~IP|6s~Pd?BkG<8z3$jrm9IB!UU@%owiXzIszNVGk_T&>7@0?YoTGET^L^*u`|vA!--dai zLQU!@jA}yjSYZ29upNt8s$~dGuhpWCpjrpEZcwKv2&I~^RofHFrRv^C=;~UYqf$v| zTUOhkqH0*4ChD3i9xn5rq8|ysR1TglOt(ydJJd{- zF5DJ^nB4ZJZDEBgLX^ffFB%K3S4~D8Q!(l#>Z*=zGt1dVQ%P!57DL6~EZh!1%fsm{ zVIjy-lFlT#A~46Jy5vn_;xT!k?% z%zQ#fEM!+x|Hvuw8RS%l;w)%z&wLVBa(8Eo!MB4L7`7P09D8{-N;>pPUCiq~j2lXm z8g70}Na1I0N1y2hvlwMt-0*G7CUcI-6kIYXJF=V?`E-TG<9rt1T)F$n`HAj^)*PE8 z`2x~>EYSRA-*^5UzT7kbbqX#sM`^WmwP9FoH$Q>?nb{@C^#YND)C+nXbdXFy`cN^v zplw+x`DLP@K_*HE>z>*zKP~T6_ntMLZ0&BB*Q)E)a%u8CB*H{>YrVF!DeqNlTk^(a zf?R^sM(yj#Bmo%T#A*Lzb23FTF!s1wc|18rE<+9s0e8bpZc8vtCd$&$ZxdD?zTocuO~MZ$ZAtFQ*}6IU02u z&EqbW6NMv~9>~)wH!o zfh>{NPSE{^t_2M#JcsELH7KKl8IN8*>5uONUic{qSL59+It2}mTt191Fmjjusz;jA z$Umkyc!=qeGR5}*oNdi6B~#=ET;UVTa~rsqx=8UZF;iq7WIYcf#KNV;oY|(k}Tm0TX=$C&QuThi*8 zWs99t+269sX#%eFtBVXrrQhgGZat@oVoc3K$ItD4VKmUBScj+bjR5I8kuu{4RNE_g zuJ;fUe>PUcpIBVK5Z_W@`25c$ysU7uD_DW+3oBv zxwy}m?Mk9}baXVh*C`&`5AIP*HYy9xF$b%Ma2>b7VZ>X_R5f>--(0p6-+Ue>*0v1A zY!@x3Ew-tNWM`Jx-BJ54X%8^H*U6cRe-o1=|0*U)s8C6Iy4)Q1eed0hkHvR_drZ%@ UhffM!9dhOIErY8`2RZ=%0f9K79{>OV literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/CreateEndpointRequest.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/CreateEndpointRequest.php new file mode 100644 index 000000000000..aac7e1055b1a --- /dev/null +++ b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/CreateEndpointRequest.php @@ -0,0 +1,237 @@ +google.cloud.ids.v1.CreateEndpointRequest + */ +class CreateEndpointRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The endpoint's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The endpoint identifier. This will be part of the endpoint's + * resource name. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * Values that do not match this pattern will trigger an INVALID_ARGUMENT + * error. + * + * Generated from protobuf field string endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $endpoint_id = ''; + /** + * Required. The endpoint to create. + * + * Generated from protobuf field .google.cloud.ids.v1.Endpoint endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $endpoint = null; + /** + * 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 t + * he request times out. If you make the 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; + */ + protected $request_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The endpoint's parent. + * @type string $endpoint_id + * Required. The endpoint identifier. This will be part of the endpoint's + * resource name. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * Values that do not match this pattern will trigger an INVALID_ARGUMENT + * error. + * @type \Google\Cloud\Ids\V1\Endpoint $endpoint + * Required. The endpoint to create. + * @type string $request_id + * 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 t + * he request times out. If you make the 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\Ids\V1\Ids::initOnce(); + parent::__construct($data); + } + + /** + * Required. The endpoint's 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. The endpoint's 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. The endpoint identifier. This will be part of the endpoint's + * resource name. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * Values that do not match this pattern will trigger an INVALID_ARGUMENT + * error. + * + * Generated from protobuf field string endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEndpointId() + { + return $this->endpoint_id; + } + + /** + * Required. The endpoint identifier. This will be part of the endpoint's + * resource name. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * Values that do not match this pattern will trigger an INVALID_ARGUMENT + * error. + * + * Generated from protobuf field string endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEndpointId($var) + { + GPBUtil::checkString($var, True); + $this->endpoint_id = $var; + + return $this; + } + + /** + * Required. The endpoint to create. + * + * Generated from protobuf field .google.cloud.ids.v1.Endpoint endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Ids\V1\Endpoint|null + */ + public function getEndpoint() + { + return $this->endpoint; + } + + public function hasEndpoint() + { + return isset($this->endpoint); + } + + public function clearEndpoint() + { + unset($this->endpoint); + } + + /** + * Required. The endpoint to create. + * + * Generated from protobuf field .google.cloud.ids.v1.Endpoint endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Ids\V1\Endpoint $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Ids\V1\Endpoint::class); + $this->endpoint = $var; + + return $this; + } + + /** + * 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 t + * he request times out. If you make the 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * 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 t + * he request times out. If you make the 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; + * @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/Ids/v1/proto/src/Google/Cloud/Ids/V1/DeleteEndpointRequest.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/DeleteEndpointRequest.php new file mode 100644 index 000000000000..14c030c96e07 --- /dev/null +++ b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/DeleteEndpointRequest.php @@ -0,0 +1,139 @@ +google.cloud.ids.v1.DeleteEndpointRequest + */ +class DeleteEndpointRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the endpoint to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * 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 t + * he request times out. If you make the 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; + */ + protected $request_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the endpoint to delete. + * @type string $request_id + * 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 t + * he request times out. If you make the 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\Ids\V1\Ids::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the endpoint 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 endpoint 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; + } + + /** + * 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 t + * he request times out. If you make the 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * 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 t + * he request times out. If you make the 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; + * @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/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint.php new file mode 100644 index 000000000000..f6410808a084 --- /dev/null +++ b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint.php @@ -0,0 +1,432 @@ +google.cloud.ids.v1.Endpoint + */ +class Endpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the endpoint. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The create time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The labels of the endpoint. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Required. The fully qualified URL of the network to which the IDS Endpoint is + * attached. + * + * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network = ''; + /** + * Output only. The fully qualified URL of the endpoint's ILB Forwarding Rule. + * + * Generated from protobuf field string endpoint_forwarding_rule = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $endpoint_forwarding_rule = ''; + /** + * Output only. The IP address of the IDS Endpoint's ILB. + * + * Generated from protobuf field string endpoint_ip = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $endpoint_ip = ''; + /** + * User-provided description of the endpoint + * + * Generated from protobuf field string description = 8; + */ + protected $description = ''; + /** + * Required. Lowest threat severity that this endpoint will alert on. + * + * Generated from protobuf field .google.cloud.ids.v1.Endpoint.Severity severity = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $severity = 0; + /** + * Output only. Current state of the endpoint. + * + * Generated from protobuf field .google.cloud.ids.v1.Endpoint.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Whether the endpoint should report traffic logs in addition to threat logs. + * + * Generated from protobuf field bool traffic_logs = 13; + */ + protected $traffic_logs = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the endpoint. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create time timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time timestamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels of the endpoint. + * @type string $network + * Required. The fully qualified URL of the network to which the IDS Endpoint is + * attached. + * @type string $endpoint_forwarding_rule + * Output only. The fully qualified URL of the endpoint's ILB Forwarding Rule. + * @type string $endpoint_ip + * Output only. The IP address of the IDS Endpoint's ILB. + * @type string $description + * User-provided description of the endpoint + * @type int $severity + * Required. Lowest threat severity that this endpoint will alert on. + * @type int $state + * Output only. Current state of the endpoint. + * @type bool $traffic_logs + * Whether the endpoint should report traffic logs in addition to threat logs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Ids\V1\Ids::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the endpoint. + * + * 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 endpoint. + * + * 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 create time 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. The create time 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. The update time 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. The update time 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; + } + + /** + * The labels of the endpoint. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels of the endpoint. + * + * 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; + } + + /** + * Required. The fully qualified URL of the network to which the IDS Endpoint is + * attached. + * + * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Required. The fully qualified URL of the network to which the IDS Endpoint is + * attached. + * + * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Output only. The fully qualified URL of the endpoint's ILB Forwarding Rule. + * + * Generated from protobuf field string endpoint_forwarding_rule = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEndpointForwardingRule() + { + return $this->endpoint_forwarding_rule; + } + + /** + * Output only. The fully qualified URL of the endpoint's ILB Forwarding Rule. + * + * Generated from protobuf field string endpoint_forwarding_rule = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEndpointForwardingRule($var) + { + GPBUtil::checkString($var, True); + $this->endpoint_forwarding_rule = $var; + + return $this; + } + + /** + * Output only. The IP address of the IDS Endpoint's ILB. + * + * Generated from protobuf field string endpoint_ip = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEndpointIp() + { + return $this->endpoint_ip; + } + + /** + * Output only. The IP address of the IDS Endpoint's ILB. + * + * Generated from protobuf field string endpoint_ip = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEndpointIp($var) + { + GPBUtil::checkString($var, True); + $this->endpoint_ip = $var; + + return $this; + } + + /** + * User-provided description of the endpoint + * + * Generated from protobuf field string description = 8; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description of the endpoint + * + * Generated from protobuf field string description = 8; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. Lowest threat severity that this endpoint will alert on. + * + * Generated from protobuf field .google.cloud.ids.v1.Endpoint.Severity severity = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Required. Lowest threat severity that this endpoint will alert on. + * + * Generated from protobuf field .google.cloud.ids.v1.Endpoint.Severity severity = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Ids\V1\Endpoint\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * Output only. Current state of the endpoint. + * + * Generated from protobuf field .google.cloud.ids.v1.Endpoint.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the endpoint. + * + * Generated from protobuf field .google.cloud.ids.v1.Endpoint.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Ids\V1\Endpoint\State::class); + $this->state = $var; + + return $this; + } + + /** + * Whether the endpoint should report traffic logs in addition to threat logs. + * + * Generated from protobuf field bool traffic_logs = 13; + * @return bool + */ + public function getTrafficLogs() + { + return $this->traffic_logs; + } + + /** + * Whether the endpoint should report traffic logs in addition to threat logs. + * + * Generated from protobuf field bool traffic_logs = 13; + * @param bool $var + * @return $this + */ + public function setTrafficLogs($var) + { + GPBUtil::checkBool($var); + $this->traffic_logs = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/Severity.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/Severity.php new file mode 100644 index 000000000000..77b6813c9be8 --- /dev/null +++ b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/Severity.php @@ -0,0 +1,85 @@ +google.cloud.ids.v1.Endpoint.Severity + */ +class Severity +{ + /** + * Not set. + * + * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; + */ + const SEVERITY_UNSPECIFIED = 0; + /** + * Informational alerts. + * + * Generated from protobuf enum INFORMATIONAL = 1; + */ + const INFORMATIONAL = 1; + /** + * Low severity alerts. + * + * Generated from protobuf enum LOW = 2; + */ + const LOW = 2; + /** + * Medium severity alerts. + * + * Generated from protobuf enum MEDIUM = 3; + */ + const MEDIUM = 3; + /** + * High severity alerts. + * + * Generated from protobuf enum HIGH = 4; + */ + const HIGH = 4; + /** + * Critical severity alerts. + * + * Generated from protobuf enum CRITICAL = 5; + */ + const CRITICAL = 5; + + private static $valueToName = [ + self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', + self::INFORMATIONAL => 'INFORMATIONAL', + self::LOW => 'LOW', + self::MEDIUM => 'MEDIUM', + self::HIGH => 'HIGH', + self::CRITICAL => 'CRITICAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Ids\V1\Endpoint_Severity::class); + diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/State.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/State.php new file mode 100644 index 000000000000..35c39ce9be00 --- /dev/null +++ b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/State.php @@ -0,0 +1,71 @@ +google.cloud.ids.v1.Endpoint.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Active and ready for traffic. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * Being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + 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\Ids\V1\Endpoint_State::class); + diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint_Severity.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint_Severity.php new file mode 100644 index 000000000000..a1b5a3b821ed --- /dev/null +++ b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint_Severity.php @@ -0,0 +1,16 @@ +google.cloud.ids.v1.GetEndpointRequest + */ +class GetEndpointRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the endpoint to retrieve. + * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` + * + * 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 name of the endpoint to retrieve. + * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Ids\V1\Ids::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the endpoint to retrieve. + * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` + * + * Generated 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 endpoint to retrieve. + * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Ids/v1/proto/src/Google/Cloud/Ids/V1/IDSGrpcClient.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/IDSGrpcClient.php new file mode 100644 index 000000000000..0a13a2ac72a0 --- /dev/null +++ b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/IDSGrpcClient.php @@ -0,0 +1,95 @@ +_simpleRequest('/google.cloud.ids.v1.IDS/ListEndpoints', + $argument, + ['\Google\Cloud\Ids\V1\ListEndpointsResponse', 'decode'], + $metadata, $options); + } + + /** + * Gets details of a single Endpoint. + * @param \Google\Cloud\Ids\V1\GetEndpointRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetEndpoint(\Google\Cloud\Ids\V1\GetEndpointRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.ids.v1.IDS/GetEndpoint', + $argument, + ['\Google\Cloud\Ids\V1\Endpoint', 'decode'], + $metadata, $options); + } + + /** + * Creates a new Endpoint in a given project and location. + * @param \Google\Cloud\Ids\V1\CreateEndpointRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateEndpoint(\Google\Cloud\Ids\V1\CreateEndpointRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.ids.v1.IDS/CreateEndpoint', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Deletes a single Endpoint. + * @param \Google\Cloud\Ids\V1\DeleteEndpointRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteEndpoint(\Google\Cloud\Ids\V1\DeleteEndpointRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.ids.v1.IDS/DeleteEndpoint', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsRequest.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsRequest.php new file mode 100644 index 000000000000..82a147e9cb23 --- /dev/null +++ b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsRequest.php @@ -0,0 +1,225 @@ +google.cloud.ids.v1.ListEndpointsRequest + */ +class ListEndpointsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of endpoints. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of endpoints to return. The service may return fewer + * than this value. + * + * 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 `ListEndpoints` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListEndpoints` 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. The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of endpoints. + * @type int $page_size + * Optional. The maximum number of endpoints to return. The service may return fewer + * than this value. + * @type string $page_token + * Optional. A page token, received from a previous `ListEndpoints` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListEndpoints` must + * match the call that provided the page token. + * @type string $filter + * Optional. The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * @type string $order_by + * Optional. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Ids\V1\Ids::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of endpoints. + * + * Generated 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, which owns this collection of endpoints. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 endpoints to return. The service may return fewer + * than this value. + * + * 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 endpoints to return. The service may return fewer + * than this value. + * + * 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 `ListEndpoints` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListEndpoints` 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 `ListEndpoints` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListEndpoints` 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. The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * + * 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. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * 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/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsResponse.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsResponse.php new file mode 100644 index 000000000000..c24d54eeef07 --- /dev/null +++ b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsResponse.php @@ -0,0 +1,137 @@ +google.cloud.ids.v1.ListEndpointsResponse + */ +class ListEndpointsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of endpoints response. + * + * Generated from protobuf field repeated .google.cloud.ids.v1.Endpoint endpoints = 1; + */ + private $endpoints; + /** + * A token, which 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\Ids\V1\Endpoint>|\Google\Protobuf\Internal\RepeatedField $endpoints + * The list of endpoints response. + * @type string $next_page_token + * A token, which 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\Ids\V1\Ids::initOnce(); + parent::__construct($data); + } + + /** + * The list of endpoints response. + * + * Generated from protobuf field repeated .google.cloud.ids.v1.Endpoint endpoints = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEndpoints() + { + return $this->endpoints; + } + + /** + * The list of endpoints response. + * + * Generated from protobuf field repeated .google.cloud.ids.v1.Endpoint endpoints = 1; + * @param array<\Google\Cloud\Ids\V1\Endpoint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEndpoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Ids\V1\Endpoint::class); + $this->endpoints = $arr; + + return $this; + } + + /** + * A token, which 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, which 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/Ids/v1/proto/src/Google/Cloud/Ids/V1/OperationMetadata.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/OperationMetadata.php new file mode 100644 index 000000000000..50e0d626665f --- /dev/null +++ b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/OperationMetadata.php @@ -0,0 +1,303 @@ +google.cloud.ids.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\Ids\V1\Ids::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/Ids/v1/samples/V1/IDSClient/create_endpoint.php b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/create_endpoint.php new file mode 100644 index 000000000000..762c6eb745f8 --- /dev/null +++ b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/create_endpoint.php @@ -0,0 +1,100 @@ +setNetwork($endpointNetwork) + ->setSeverity($endpointSeverity); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $iDSClient->createEndpoint($formattedParent, $endpointId, $endpoint); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Endpoint $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = IDSClient::locationName('[PROJECT]', '[LOCATION]'); + $endpointId = '[ENDPOINT_ID]'; + $endpointNetwork = '[NETWORK]'; + $endpointSeverity = Severity::SEVERITY_UNSPECIFIED; + + create_endpoint_sample($formattedParent, $endpointId, $endpointNetwork, $endpointSeverity); +} +// [END ids_v1_generated_IDS_CreateEndpoint_sync] diff --git a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/delete_endpoint.php b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/delete_endpoint.php new file mode 100644 index 000000000000..4df7b65dad12 --- /dev/null +++ b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/delete_endpoint.php @@ -0,0 +1,75 @@ +deleteEndpoint($formattedName); + $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 = IDSClient::endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); + + delete_endpoint_sample($formattedName); +} +// [END ids_v1_generated_IDS_DeleteEndpoint_sync] diff --git a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/get_endpoint.php b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/get_endpoint.php new file mode 100644 index 000000000000..8e2686450085 --- /dev/null +++ b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/get_endpoint.php @@ -0,0 +1,67 @@ +getEndpoint($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = IDSClient::endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); + + get_endpoint_sample($formattedName); +} +// [END ids_v1_generated_IDS_GetEndpoint_sync] diff --git a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/list_endpoints.php b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/list_endpoints.php new file mode 100644 index 000000000000..270413720689 --- /dev/null +++ b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/list_endpoints.php @@ -0,0 +1,71 @@ +listEndpoints($formattedParent); + + /** @var Endpoint $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 = IDSClient::locationName('[PROJECT]', '[LOCATION]'); + + list_endpoints_sample($formattedParent); +} +// [END ids_v1_generated_IDS_ListEndpoints_sync] diff --git a/owl-bot-staging/Ids/v1/src/V1/Gapic/IDSGapicClient.php b/owl-bot-staging/Ids/v1/src/V1/Gapic/IDSGapicClient.php new file mode 100644 index 000000000000..02c3a79f92bb --- /dev/null +++ b/owl-bot-staging/Ids/v1/src/V1/Gapic/IDSGapicClient.php @@ -0,0 +1,634 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $endpointId = 'endpoint_id'; + * $endpoint = new Endpoint(); + * $operationResponse = $iDSClient->createEndpoint($formattedParent, $endpointId, $endpoint); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $iDSClient->createEndpoint($formattedParent, $endpointId, $endpoint); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $iDSClient->resumeOperation($operationName, 'createEndpoint'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $iDSClient->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. + */ +class IDSGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.ids.v1.IDS'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'ids.googleapis.com'; + + /** 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 $endpointNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/ids_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/ids_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/ids_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/ids_rest_client_config.php', + ], + ], + ]; + } + + private static function getEndpointNameTemplate() + { + if (self::$endpointNameTemplate == null) { + self::$endpointNameTemplate = new PathTemplate('projects/{project}/locations/{location}/endpoints/{endpoint}'); + } + + return self::$endpointNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'endpoint' => self::getEndpointNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a endpoint + * resource. + * + * @param string $project + * @param string $location + * @param string $endpoint + * + * @return string The formatted endpoint resource. + */ + public static function endpointName($project, $location, $endpoint) + { + return self::getEndpointNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'endpoint' => $endpoint, + ]); + } + + /** + * 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($project, $location) + { + return self::getLocationNameTemplate()->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 + * - endpoint: projects/{project}/locations/{location}/endpoints/{endpoint} + * - 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($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"); + } + + /** + * 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; + } + + /** + * 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 'ids.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a new Endpoint in a given project and location. + * + * Sample code: + * ``` + * $iDSClient = new IDSClient(); + * try { + * $formattedParent = $iDSClient->locationName('[PROJECT]', '[LOCATION]'); + * $endpointId = 'endpoint_id'; + * $endpoint = new Endpoint(); + * $operationResponse = $iDSClient->createEndpoint($formattedParent, $endpointId, $endpoint); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $iDSClient->createEndpoint($formattedParent, $endpointId, $endpoint); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $iDSClient->resumeOperation($operationName, 'createEndpoint'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $iDSClient->close(); + * } + * ``` + * + * @param string $parent Required. The endpoint's parent. + * @param string $endpointId Required. The endpoint identifier. This will be part of the endpoint's + * resource name. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * Values that do not match this pattern will trigger an INVALID_ARGUMENT + * error. + * @param Endpoint $endpoint Required. The endpoint to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * 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 t + * he request times out. If you make the 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 RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createEndpoint($parent, $endpointId, $endpoint, array $optionalArgs = []) + { + $request = new CreateEndpointRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setEndpointId($endpointId); + $request->setEndpoint($endpoint); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateEndpoint', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a single Endpoint. + * + * Sample code: + * ``` + * $iDSClient = new IDSClient(); + * try { + * $formattedName = $iDSClient->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); + * $operationResponse = $iDSClient->deleteEndpoint($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $iDSClient->deleteEndpoint($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $iDSClient->resumeOperation($operationName, 'deleteEndpoint'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $iDSClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the endpoint to delete. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * 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 t + * he request times out. If you make the 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 RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteEndpoint($name, array $optionalArgs = []) + { + $request = new DeleteEndpointRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteEndpoint', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets details of a single Endpoint. + * + * Sample code: + * ``` + * $iDSClient = new IDSClient(); + * try { + * $formattedName = $iDSClient->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); + * $response = $iDSClient->getEndpoint($formattedName); + * } finally { + * $iDSClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the endpoint to retrieve. + * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` + * @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\Ids\V1\Endpoint + * + * @throws ApiException if the remote call fails + */ + public function getEndpoint($name, array $optionalArgs = []) + { + $request = new GetEndpointRequest(); + $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('GetEndpoint', Endpoint::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists Endpoints in a given project and location. + * + * Sample code: + * ``` + * $iDSClient = new IDSClient(); + * try { + * $formattedParent = $iDSClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $iDSClient->listEndpoints($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $iDSClient->listEndpoints($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $iDSClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent, which owns this collection of endpoints. + * @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 + * Optional. The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * @type string $orderBy + * Optional. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listEndpoints($parent, array $optionalArgs = []) + { + $request = new ListEndpointsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListEndpoints', $optionalArgs, ListEndpointsResponse::class, $request); + } +} diff --git a/owl-bot-staging/Ids/v1/src/V1/IDSClient.php b/owl-bot-staging/Ids/v1/src/V1/IDSClient.php new file mode 100644 index 000000000000..62686deb8190 --- /dev/null +++ b/owl-bot-staging/Ids/v1/src/V1/IDSClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.ids.v1.IDS' => [ + 'CreateEndpoint' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Ids\V1\Endpoint', + 'metadataReturnType' => '\Google\Cloud\Ids\V1\OperationMetadata', + 'initialPollDelayMillis' => '5000', + 'pollDelayMultiplier' => '2.0', + 'maxPollDelayMillis' => '45000', + 'totalPollTimeoutMillis' => '3600000', + ], + ], + 'DeleteEndpoint' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Ids\V1\OperationMetadata', + 'initialPollDelayMillis' => '5000', + 'pollDelayMultiplier' => '2.0', + 'maxPollDelayMillis' => '45000', + 'totalPollTimeoutMillis' => '3600000', + ], + ], + 'ListEndpoints' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEndpoints', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Ids/v1/src/V1/resources/ids_rest_client_config.php b/owl-bot-staging/Ids/v1/src/V1/resources/ids_rest_client_config.php new file mode 100644 index 000000000000..e81293b497d7 --- /dev/null +++ b/owl-bot-staging/Ids/v1/src/V1/resources/ids_rest_client_config.php @@ -0,0 +1,165 @@ + [ + 'google.cloud.ids.v1.IDS' => [ + 'CreateEndpoint' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/endpoints', + 'body' => 'endpoint', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'endpoint_id', + ], + ], + 'DeleteEndpoint' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEndpoint' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListEndpoints' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/endpoints', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + '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.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpoints/*}: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/Ids/v1/tests/Unit/V1/IDSClientTest.php b/owl-bot-staging/Ids/v1/tests/Unit/V1/IDSClientTest.php new file mode 100644 index 000000000000..f80141f86c8a --- /dev/null +++ b/owl-bot-staging/Ids/v1/tests/Unit/V1/IDSClientTest.php @@ -0,0 +1,468 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return IDSClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new IDSClient($options); + } + + /** @test */ + public function createEndpointTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createEndpointTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $network = 'network1843485230'; + $endpointForwardingRule = 'endpointForwardingRule-1878786988'; + $endpointIp = 'endpointIp-1135808495'; + $description = 'description-1724546052'; + $trafficLogs = false; + $expectedResponse = new Endpoint(); + $expectedResponse->setName($name); + $expectedResponse->setNetwork($network); + $expectedResponse->setEndpointForwardingRule($endpointForwardingRule); + $expectedResponse->setEndpointIp($endpointIp); + $expectedResponse->setDescription($description); + $expectedResponse->setTrafficLogs($trafficLogs); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createEndpointTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $endpointId = 'endpointId-1135808507'; + $endpoint = new Endpoint(); + $endpointNetwork = 'endpointNetwork1670861529'; + $endpoint->setNetwork($endpointNetwork); + $endpointSeverity = Severity::SEVERITY_UNSPECIFIED; + $endpoint->setSeverity($endpointSeverity); + $response = $gapicClient->createEndpoint($formattedParent, $endpointId, $endpoint); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.ids.v1.IDS/CreateEndpoint', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getEndpointId(); + $this->assertProtobufEquals($endpointId, $actualValue); + $actualValue = $actualApiRequestObject->getEndpoint(); + $this->assertProtobufEquals($endpoint, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEndpointTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createEndpointExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createEndpointTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $endpointId = 'endpointId-1135808507'; + $endpoint = new Endpoint(); + $endpointNetwork = 'endpointNetwork1670861529'; + $endpoint->setNetwork($endpointNetwork); + $endpointSeverity = Severity::SEVERITY_UNSPECIFIED; + $endpoint->setSeverity($endpointSeverity); + $response = $gapicClient->createEndpoint($formattedParent, $endpointId, $endpoint); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEndpointTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteEndpointTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteEndpointTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteEndpointTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); + $response = $gapicClient->deleteEndpoint($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.ids.v1.IDS/DeleteEndpoint', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEndpointTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteEndpointExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteEndpointTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); + $response = $gapicClient->deleteEndpoint($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEndpointTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getEndpointTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $network = 'network1843485230'; + $endpointForwardingRule = 'endpointForwardingRule-1878786988'; + $endpointIp = 'endpointIp-1135808495'; + $description = 'description-1724546052'; + $trafficLogs = false; + $expectedResponse = new Endpoint(); + $expectedResponse->setName($name2); + $expectedResponse->setNetwork($network); + $expectedResponse->setEndpointForwardingRule($endpointForwardingRule); + $expectedResponse->setEndpointIp($endpointIp); + $expectedResponse->setDescription($description); + $expectedResponse->setTrafficLogs($trafficLogs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); + $response = $gapicClient->getEndpoint($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.ids.v1.IDS/GetEndpoint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEndpointExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); + try { + $gapicClient->getEndpoint($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 listEndpointsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $endpointsElement = new Endpoint(); + $endpoints = [ + $endpointsElement, + ]; + $expectedResponse = new ListEndpointsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEndpoints($endpoints); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listEndpoints($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEndpoints()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.ids.v1.IDS/ListEndpoints', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEndpointsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listEndpoints($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()); + } +} diff --git a/owl-bot-staging/Iot/v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/DeviceManager.php b/owl-bot-staging/Iot/v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/DeviceManager.php new file mode 100644 index 0000000000000000000000000000000000000000..f2365a62713902b45b9c3047a8737baaeb97a46d GIT binary patch literal 9166 zcmc&)-)|gO74F!<)YndvTnF2+AsJ6f<51})HyuM5v;#(o9=v#YwxJ`7=cSE=A*7dDswMu-w>^3~R zPW+s%FWuMQxWA#_TDrS21*(DD^vk56*Ic(&C;4*SZC3KO8|HVecR>Mt%?;|#bu^nT%`KNyKY!~c;z}m<+>FF`VzCV!p)#}kq-a7 z=2qP<>p^IR@aJVaDA|r3+E(5E0faHHSFL(Lz`{YNB|1OyG}@a$Ep{XNKp1|FLeD?5G@pHB#iK*zf4~g%TjZ8RiEZQ777QP zoYzCYN#d*Px=+HU?_6hoQv>_a|B4E@OwTTwj^k1kTqh_L+A+0Fq$w`eZQ_L8>D;zS zy|O^ItsUF-yHi~wf-9MwjFX`#)w>AtuGIh<72(gS3uM{L?yu17RxKh6r0Q0~3%gh` zQe_CQSivK;w~U{cZrFm2W~CC5?>1EEbVL_Qo(t&LH_>#~(!?WNGRKNI2SuFQxiT>( z)Gg13>ZXk0g*QQ8u`5CUgn0=`JTcywMoO0)|p69}QRLddonw41=6lE?BW zo=+s7C!S4;XRPNy`Q`~thftKwDtgG>Zvg0A!uXYjCKr7IEs^)0HBz&K(BE4l-*1v2 z#IK_P&+-9_aZT5z2Ny2>%k2A)c^*yG-7+u59CrXv3v$ps^Y_F9Y@!pQFZ#mhcpump znmaF467c7e>o4@fLdF^zUnXJliS+C>bc{Aw;ny_t%Ro84K>*cu+apM1eg;NOqt_cR976s$7u2%q%;AdO#%ty zb0qi_8uVblD+RCk(rF+%L8(0xRl@qS7fV;6l{?Lgo`Cnxv@I+f%Jcn4YS&xj2k zLnj>aPFRX9OnEkF{7^$9Np5paU+ds>X71q2Xn?yaz@L=h#~X=YGDrU%bTYUk~7O(g9dq@%i~0ORY1A3ya@a@Xgt*rR%l;C!_tdz&*N?Kr8)hu#Wz6i z&I@=7jlnGHmTlhOOVW&8VXPYj5gm;tL?X<1$=`Wl;YBo1wd*iQ8pR?SN#stH{Ve(- zSChqlSTUs+`4bK4D{jTE?k&=Zdc$2}GxVbCRPCBFLV}q+gH7 zUS_CBz^9aCh~sCJ(OBF3It<_Kjia|HpulJp^rQe?p2x6`#t$wceE&K+F32TR_{N~- zF?XH0X*@;~>%^%nx(zs$MYMQ6LUd%Ede5^?Yc*(YRo!}p_+s1p3Yt_pzymXWtf7eo z+o^D$H(XJ|(!t(a+ZaNf70Z~3N70~w5-OQ(&785|sL~PP=ub3s_JIRz7p~s+-NygV z*(r1`)fw*a+()mV;~Z6Skj8)2(COqLz=vFXSy=%pQIVI4EVHZe){j1W_I{sf;`wS47Jcr%(I`4GqWZ5>G3gh>J*f51T8D?=Z&}jB7`iYLei2PKTf% zP6RFUc%oMEKQuHLl^*`8(%tBJCSQN5F=roR?rc^vOHZLHHy5$V0?n*j^WCOLdzJ_{ zR@y)7L&NcUO-V^yBvY6l^Dv)kb2no}oVj*mp32;8uFc))$&?~`X|rWw4oRX9{1Rvy zFYXjf;vy20w7OqrNiWRwoOIcW|E-~+c98}+lC{JkVa4=r?cJw+7F zuA7%>+LyU+_l>{wp);w+1N=2*Ri?^IJTeTTnJ>!F@o(VzZUf#X(4dLmumgIh614Y5k@SNiGX9GlsaHt~;(x+1 z`9L#nv1*o1WTOLIN_2Qhky$t1=-O6{6iTBl^R#qr){BAi&ptGwxHrIg2|;4$R!Buu?%F{AZ5vQ_WanaAcox_6x8NcU~4zWY>(9E=|RlskYfNC&f{weUT(@ zAnXeMTOS%rxr4#4Dp{H$Epb#24yj54%TGC$A8MjwcY|e9eV;|~d}zGcJD%xw565&O z{L~y{g?;eN<=@S3Z-=256!Q7q-Ccoi^tRP%hTHsGluKUS3ahT)n9U>(3oX2j#^8;u zDrF0JDgG(SD*ZNORoi@xzf=W{y5-bzu3yX7h{G-_^6mGniEm@B!$O~H+SUM*di6r| d+J2UQ6B7G`gw6%GkB?ioPx2)Qb{(a?Rq)8~BWr_an+U%N*x+*S6e zO+B5_p3)sD?1(C^=P<``ETuc__o=5C&arD+)XOSLxvtdeZAC3t+IJA@J44T)1!dqk z1B>Pi%Nh1^ro(b4k8&QByM9*a1F-dD>btr@mHo!w>o9&8=mPh$7`Typ)jCqOdDU>eh?hX z)tP-|TiRGCykq2Zg?U3deY&D}lnp)mnXsEHI2}KABB(05W+!B(P?$J0!AGISKDA8@ z1JjS)_s2F}qtimthki6h@b~bA8L(CC^~U7vVd89$-QmvNhu?0&-S@~CvMzk{t(zd=9GuNKf!w30it@5cio%(8i^pFJMEQWH@%;9B8`n zRw9#^BEN*|(@3A%Jqab3LRaBh*K&-vw3l8-;iZYcp67T{3tXz@A*@M~1V~0Y9TzYX za*H{Tm5ECp!J>3By&`1pgfi3F6~<7oL2__akeN;igfauc5255UShk#jW?|f{^mPO! z^B+cns?MOwg~&5lIu1HvdQIfkgGhkPt!&seRhxMu%+2HgkNr^}X@P5LVQ3~&#l93R z3E#GIuyR&e9OmEBQBV^raP>sDhCxvj=Dvs({6C5=+!AE*N|XhlyQZJT>me7^RSlE* z2Wl`s_jB-cn!`wAyLN0`3m;GMau}FC^Gu4X!Sm=e*Avx=OY-3~^S>CZoUxlcg+%Bx z8@W{2o6JXtCP21Pj+9_M#OXtJq#^4^PEQnlGXL=`!ip%4RG~CcAT3f(Hw^0gw5NqC zgLbh@UcgqggsA)l5uO>9pZV7UBqf(k$=3rY%)TjU4pPBSgGi@OBVAK@ zW2sG{WLA(m+!PtFMQ9BAR1XDLAj_TLI8RGmx>~D05C;O0f-=! z+IrW*43rIu-(<=Btw_T;ScHdbnxYFe36kGm69-F8b=bTpg>J%{KkW7$t4BTUSZBr& z^@F<=w{U{PU5z=eX=viw6_;@4F>GFxLNibfkdWm`SjbDbAqPbb8=7WNFDMS#EaLg- z4%-m33&l$gJ>|_X z@IDKG!SaIpoKF|ChkzW!=})fdjpT)RY40E(z`Ab^Y@B#Js_E9i@l1AfoW6=DEt5@H zogziF&PBeF`6UJ$QNEL}VX^Oc7{Q>&<|4Bz3c4p?WF4z(!ezih5fVQkfm%<}CZ?=- z{*y@E(M)Il6N8lOkyAl`0Wk4ToE6V+M{1o|JdW$Z6+VIpw#8K?8Rz`W4AHsd_zu=1 zbd$&Dc)T~;s(`%UIu=7|=D#sW1Rl%D1e5E8dOqH&A~^Hp39N}eqzzqss|vN(4nV4+s8sVN}Ka8+$K>&?^#!Np2# zub#Ta7t8AItNqmWP6guA1Iynay^oH5TYRIn-!#rU9EWScF8aC(aXdo{7v^^U9fP$% z*VOcK7jB0di?7-T+M(J$sF%;#y8)?Ut5q*mitP&OtkF80HcW`d+=^~a8zmUCc~F?zrnvNG-BUB4PGAyj-}g!tm6%G18U=#z?|G< wus-uSgoogle.cloud.iot.v1.BindDeviceToGatewayRequest + */ +class BindDeviceToGatewayRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * + * Generated from protobuf field string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $gateway_id = ''; + /** + * Required. The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * + * Generated from protobuf field string device_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $device_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @type string $gateway_id + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * @type string $device_id + * Required. The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated 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 registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * + * Generated from protobuf field string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGatewayId() + { + return $this->gateway_id; + } + + /** + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * + * 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. The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * + * Generated from protobuf field string device_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDeviceId() + { + return $this->device_id; + } + + /** + * Required. The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * + * Generated from protobuf field string device_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDeviceId($var) + { + GPBUtil::checkString($var, True); + $this->device_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/BindDeviceToGatewayResponse.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/BindDeviceToGatewayResponse.php new file mode 100644 index 000000000000..7a15086995cc --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/BindDeviceToGatewayResponse.php @@ -0,0 +1,33 @@ +google.cloud.iot.v1.BindDeviceToGatewayResponse + */ +class BindDeviceToGatewayResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRegistryRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRegistryRequest.php new file mode 100644 index 000000000000..c8cfb29ffeed --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRegistryRequest.php @@ -0,0 +1,123 @@ +google.cloud.iot.v1.CreateDeviceRegistryRequest + */ +class CreateDeviceRegistryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and cloud region where this device registry must be created. + * For example, `projects/example-project/locations/us-central1`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The device registry. The field `name` must be empty. The server will + * generate that field from the device registry `id` provided and the + * `parent` field. + * + * Generated from protobuf field .google.cloud.iot.v1.DeviceRegistry device_registry = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $device_registry = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and cloud region where this device registry must be created. + * For example, `projects/example-project/locations/us-central1`. + * @type \Google\Cloud\Iot\V1\DeviceRegistry $device_registry + * Required. The device registry. The field `name` must be empty. The server will + * generate that field from the device registry `id` provided and the + * `parent` field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and cloud region where this device registry must be created. + * For example, `projects/example-project/locations/us-central1`. + * + * Generated 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 cloud region where this device registry must be created. + * For example, `projects/example-project/locations/us-central1`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 device registry. The field `name` must be empty. The server will + * generate that field from the device registry `id` provided and the + * `parent` field. + * + * Generated from protobuf field .google.cloud.iot.v1.DeviceRegistry device_registry = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Iot\V1\DeviceRegistry|null + */ + public function getDeviceRegistry() + { + return $this->device_registry; + } + + public function hasDeviceRegistry() + { + return isset($this->device_registry); + } + + public function clearDeviceRegistry() + { + unset($this->device_registry); + } + + /** + * Required. The device registry. The field `name` must be empty. The server will + * generate that field from the device registry `id` provided and the + * `parent` field. + * + * Generated from protobuf field .google.cloud.iot.v1.DeviceRegistry device_registry = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Iot\V1\DeviceRegistry $var + * @return $this + */ + public function setDeviceRegistry($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\DeviceRegistry::class); + $this->device_registry = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRequest.php new file mode 100644 index 000000000000..d3453055311e --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRequest.php @@ -0,0 +1,127 @@ +google.cloud.iot.v1.CreateDeviceRequest + */ +class CreateDeviceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the device registry where this device should be created. + * For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The device registration details. The field `name` must be empty. The server + * generates `name` from the device registry `id` and the + * `parent` field. + * + * Generated from protobuf field .google.cloud.iot.v1.Device device = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $device = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the device registry where this device should be created. + * For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @type \Google\Cloud\Iot\V1\Device $device + * Required. The device registration details. The field `name` must be empty. The server + * generates `name` from the device registry `id` and the + * `parent` field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the device registry where this device should be created. + * For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated 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 device registry where this device should be created. + * For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 device registration details. The field `name` must be empty. The server + * generates `name` from the device registry `id` and the + * `parent` field. + * + * Generated from protobuf field .google.cloud.iot.v1.Device device = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Iot\V1\Device|null + */ + public function getDevice() + { + return $this->device; + } + + public function hasDevice() + { + return isset($this->device); + } + + public function clearDevice() + { + unset($this->device); + } + + /** + * Required. The device registration details. The field `name` must be empty. The server + * generates `name` from the device registry `id` and the + * `parent` field. + * + * Generated from protobuf field .google.cloud.iot.v1.Device device = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Iot\V1\Device $var + * @return $this + */ + public function setDevice($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\Device::class); + $this->device = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRegistryRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRegistryRequest.php new file mode 100644 index 000000000000..1320cdd106cc --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRegistryRequest.php @@ -0,0 +1,71 @@ +google.cloud.iot.v1.DeleteDeviceRegistryRequest + */ +class DeleteDeviceRegistryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * 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 name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated 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 device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRequest.php new file mode 100644 index 000000000000..469fde59413a --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRequest.php @@ -0,0 +1,75 @@ +google.cloud.iot.v1.DeleteDeviceRequest + */ +class DeleteDeviceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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/Iot/v1/proto/src/Google/Cloud/Iot/V1/Device.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/Device.php new file mode 100644 index 000000000000..c00d28ef0a92 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/Device.php @@ -0,0 +1,891 @@ +google.cloud.iot.v1.Device + */ +class Device extends \Google\Protobuf\Internal\Message +{ + /** + * The user-defined device identifier. The device ID must be unique + * within a device registry. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The resource path name. For example, + * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or + * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. + * When `name` is populated as a response from the service, it always ends + * in the device numeric ID. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * [Output only] A server-defined unique numeric ID for the device. This is a + * more compact way to identify devices, and it is globally unique. + * + * Generated from protobuf field uint64 num_id = 3; + */ + protected $num_id = 0; + /** + * The credentials used to authenticate this device. To allow credential + * rotation without interruption, multiple device credentials can be bound to + * this device. No more than 3 credentials can be bound to a single device at + * a time. When new credentials are added to a device, they are verified + * against the registry credentials. For details, see the description of the + * `DeviceRegistry.credentials` field. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceCredential credentials = 12; + */ + private $credentials; + /** + * [Output only] The last time an MQTT `PINGREQ` was received. This field + * applies only to devices connecting through MQTT. MQTT clients usually only + * send `PINGREQ` messages if the connection is idle, and no other messages + * have been sent. Timestamps are periodically collected and written to + * storage; they may be stale by a few minutes. + * + * Generated from protobuf field .google.protobuf.Timestamp last_heartbeat_time = 7; + */ + protected $last_heartbeat_time = null; + /** + * [Output only] The last time a telemetry event was received. Timestamps are + * periodically collected and written to storage; they may be stale by a few + * minutes. + * + * Generated from protobuf field .google.protobuf.Timestamp last_event_time = 8; + */ + protected $last_event_time = null; + /** + * [Output only] The last time a state event was received. Timestamps are + * periodically collected and written to storage; they may be stale by a few + * minutes. + * + * Generated from protobuf field .google.protobuf.Timestamp last_state_time = 20; + */ + protected $last_state_time = null; + /** + * [Output only] The last time a cloud-to-device config version acknowledgment + * was received from the device. This field is only for configurations + * sent through MQTT. + * + * Generated from protobuf field .google.protobuf.Timestamp last_config_ack_time = 14; + */ + protected $last_config_ack_time = null; + /** + * [Output only] The last time a cloud-to-device config version was sent to + * the device. + * + * Generated from protobuf field .google.protobuf.Timestamp last_config_send_time = 18; + */ + protected $last_config_send_time = null; + /** + * If a device is blocked, connections or requests from this device will fail. + * Can be used to temporarily prevent the device from connecting if, for + * example, the sensor is generating bad data and needs maintenance. + * + * Generated from protobuf field bool blocked = 19; + */ + protected $blocked = false; + /** + * [Output only] The time the most recent error occurred, such as a failure to + * publish to Cloud Pub/Sub. This field is the timestamp of + * 'last_error_status'. + * + * Generated from protobuf field .google.protobuf.Timestamp last_error_time = 10; + */ + protected $last_error_time = null; + /** + * [Output only] The error message of the most recent error, such as a failure + * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this + * field. If no errors have occurred, this field has an empty message + * and the status code 0 == OK. Otherwise, this field is expected to have a + * status code other than OK. + * + * Generated from protobuf field .google.rpc.Status last_error_status = 11; + */ + protected $last_error_status = null; + /** + * The most recent device configuration, which is eventually sent from + * Cloud IoT Core to the device. If not present on creation, the + * configuration will be initialized with an empty payload and version value + * of `1`. To update this field after creation, use the + * `DeviceManager.ModifyCloudToDeviceConfig` method. + * + * Generated from protobuf field .google.cloud.iot.v1.DeviceConfig config = 13; + */ + protected $config = null; + /** + * [Output only] The state most recently received from the device. If no state + * has been reported, this field is not present. + * + * Generated from protobuf field .google.cloud.iot.v1.DeviceState state = 16; + */ + protected $state = null; + /** + * **Beta Feature** + * The logging verbosity for device activity. If unspecified, + * DeviceRegistry.log_level will be used. + * + * Generated from protobuf field .google.cloud.iot.v1.LogLevel log_level = 21; + */ + protected $log_level = 0; + /** + * The metadata key-value pairs assigned to the device. This metadata is not + * interpreted or indexed by Cloud IoT Core. It can be used to add contextual + * information for the device. + * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and + * be less than 128 bytes in length. + * Values are free-form strings. Each value must be less than or equal to 32 + * KB in size. + * The total size of all keys and values must be less than 256 KB, and the + * maximum number of key-value pairs is 500. + * + * Generated from protobuf field map metadata = 17; + */ + private $metadata; + /** + * Gateway-related configuration and state. + * + * Generated from protobuf field .google.cloud.iot.v1.GatewayConfig gateway_config = 24; + */ + protected $gateway_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The user-defined device identifier. The device ID must be unique + * within a device registry. + * @type string $name + * The resource path name. For example, + * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or + * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. + * When `name` is populated as a response from the service, it always ends + * in the device numeric ID. + * @type int|string $num_id + * [Output only] A server-defined unique numeric ID for the device. This is a + * more compact way to identify devices, and it is globally unique. + * @type array<\Google\Cloud\Iot\V1\DeviceCredential>|\Google\Protobuf\Internal\RepeatedField $credentials + * The credentials used to authenticate this device. To allow credential + * rotation without interruption, multiple device credentials can be bound to + * this device. No more than 3 credentials can be bound to a single device at + * a time. When new credentials are added to a device, they are verified + * against the registry credentials. For details, see the description of the + * `DeviceRegistry.credentials` field. + * @type \Google\Protobuf\Timestamp $last_heartbeat_time + * [Output only] The last time an MQTT `PINGREQ` was received. This field + * applies only to devices connecting through MQTT. MQTT clients usually only + * send `PINGREQ` messages if the connection is idle, and no other messages + * have been sent. Timestamps are periodically collected and written to + * storage; they may be stale by a few minutes. + * @type \Google\Protobuf\Timestamp $last_event_time + * [Output only] The last time a telemetry event was received. Timestamps are + * periodically collected and written to storage; they may be stale by a few + * minutes. + * @type \Google\Protobuf\Timestamp $last_state_time + * [Output only] The last time a state event was received. Timestamps are + * periodically collected and written to storage; they may be stale by a few + * minutes. + * @type \Google\Protobuf\Timestamp $last_config_ack_time + * [Output only] The last time a cloud-to-device config version acknowledgment + * was received from the device. This field is only for configurations + * sent through MQTT. + * @type \Google\Protobuf\Timestamp $last_config_send_time + * [Output only] The last time a cloud-to-device config version was sent to + * the device. + * @type bool $blocked + * If a device is blocked, connections or requests from this device will fail. + * Can be used to temporarily prevent the device from connecting if, for + * example, the sensor is generating bad data and needs maintenance. + * @type \Google\Protobuf\Timestamp $last_error_time + * [Output only] The time the most recent error occurred, such as a failure to + * publish to Cloud Pub/Sub. This field is the timestamp of + * 'last_error_status'. + * @type \Google\Rpc\Status $last_error_status + * [Output only] The error message of the most recent error, such as a failure + * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this + * field. If no errors have occurred, this field has an empty message + * and the status code 0 == OK. Otherwise, this field is expected to have a + * status code other than OK. + * @type \Google\Cloud\Iot\V1\DeviceConfig $config + * The most recent device configuration, which is eventually sent from + * Cloud IoT Core to the device. If not present on creation, the + * configuration will be initialized with an empty payload and version value + * of `1`. To update this field after creation, use the + * `DeviceManager.ModifyCloudToDeviceConfig` method. + * @type \Google\Cloud\Iot\V1\DeviceState $state + * [Output only] The state most recently received from the device. If no state + * has been reported, this field is not present. + * @type int $log_level + * **Beta Feature** + * The logging verbosity for device activity. If unspecified, + * DeviceRegistry.log_level will be used. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * The metadata key-value pairs assigned to the device. This metadata is not + * interpreted or indexed by Cloud IoT Core. It can be used to add contextual + * information for the device. + * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and + * be less than 128 bytes in length. + * Values are free-form strings. Each value must be less than or equal to 32 + * KB in size. + * The total size of all keys and values must be less than 256 KB, and the + * maximum number of key-value pairs is 500. + * @type \Google\Cloud\Iot\V1\GatewayConfig $gateway_config + * Gateway-related configuration and state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The user-defined device identifier. The device ID must be unique + * within a device registry. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The user-defined device identifier. The device ID must be unique + * within a device registry. + * + * 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 resource path name. For example, + * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or + * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. + * When `name` is populated as a response from the service, it always ends + * in the device numeric ID. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource path name. For example, + * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or + * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. + * When `name` is populated as a response from the service, it always ends + * in the device numeric ID. + * + * 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; + } + + /** + * [Output only] A server-defined unique numeric ID for the device. This is a + * more compact way to identify devices, and it is globally unique. + * + * Generated from protobuf field uint64 num_id = 3; + * @return int|string + */ + public function getNumId() + { + return $this->num_id; + } + + /** + * [Output only] A server-defined unique numeric ID for the device. This is a + * more compact way to identify devices, and it is globally unique. + * + * Generated from protobuf field uint64 num_id = 3; + * @param int|string $var + * @return $this + */ + public function setNumId($var) + { + GPBUtil::checkUint64($var); + $this->num_id = $var; + + return $this; + } + + /** + * The credentials used to authenticate this device. To allow credential + * rotation without interruption, multiple device credentials can be bound to + * this device. No more than 3 credentials can be bound to a single device at + * a time. When new credentials are added to a device, they are verified + * against the registry credentials. For details, see the description of the + * `DeviceRegistry.credentials` field. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceCredential credentials = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCredentials() + { + return $this->credentials; + } + + /** + * The credentials used to authenticate this device. To allow credential + * rotation without interruption, multiple device credentials can be bound to + * this device. No more than 3 credentials can be bound to a single device at + * a time. When new credentials are added to a device, they are verified + * against the registry credentials. For details, see the description of the + * `DeviceRegistry.credentials` field. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceCredential credentials = 12; + * @param array<\Google\Cloud\Iot\V1\DeviceCredential>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCredentials($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\DeviceCredential::class); + $this->credentials = $arr; + + return $this; + } + + /** + * [Output only] The last time an MQTT `PINGREQ` was received. This field + * applies only to devices connecting through MQTT. MQTT clients usually only + * send `PINGREQ` messages if the connection is idle, and no other messages + * have been sent. Timestamps are periodically collected and written to + * storage; they may be stale by a few minutes. + * + * Generated from protobuf field .google.protobuf.Timestamp last_heartbeat_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastHeartbeatTime() + { + return $this->last_heartbeat_time; + } + + public function hasLastHeartbeatTime() + { + return isset($this->last_heartbeat_time); + } + + public function clearLastHeartbeatTime() + { + unset($this->last_heartbeat_time); + } + + /** + * [Output only] The last time an MQTT `PINGREQ` was received. This field + * applies only to devices connecting through MQTT. MQTT clients usually only + * send `PINGREQ` messages if the connection is idle, and no other messages + * have been sent. Timestamps are periodically collected and written to + * storage; they may be stale by a few minutes. + * + * Generated from protobuf field .google.protobuf.Timestamp last_heartbeat_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastHeartbeatTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_heartbeat_time = $var; + + return $this; + } + + /** + * [Output only] The last time a telemetry event was received. Timestamps are + * periodically collected and written to storage; they may be stale by a few + * minutes. + * + * Generated from protobuf field .google.protobuf.Timestamp last_event_time = 8; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastEventTime() + { + return $this->last_event_time; + } + + public function hasLastEventTime() + { + return isset($this->last_event_time); + } + + public function clearLastEventTime() + { + unset($this->last_event_time); + } + + /** + * [Output only] The last time a telemetry event was received. Timestamps are + * periodically collected and written to storage; they may be stale by a few + * minutes. + * + * Generated from protobuf field .google.protobuf.Timestamp last_event_time = 8; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_event_time = $var; + + return $this; + } + + /** + * [Output only] The last time a state event was received. Timestamps are + * periodically collected and written to storage; they may be stale by a few + * minutes. + * + * Generated from protobuf field .google.protobuf.Timestamp last_state_time = 20; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastStateTime() + { + return $this->last_state_time; + } + + public function hasLastStateTime() + { + return isset($this->last_state_time); + } + + public function clearLastStateTime() + { + unset($this->last_state_time); + } + + /** + * [Output only] The last time a state event was received. Timestamps are + * periodically collected and written to storage; they may be stale by a few + * minutes. + * + * Generated from protobuf field .google.protobuf.Timestamp last_state_time = 20; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastStateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_state_time = $var; + + return $this; + } + + /** + * [Output only] The last time a cloud-to-device config version acknowledgment + * was received from the device. This field is only for configurations + * sent through MQTT. + * + * Generated from protobuf field .google.protobuf.Timestamp last_config_ack_time = 14; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastConfigAckTime() + { + return $this->last_config_ack_time; + } + + public function hasLastConfigAckTime() + { + return isset($this->last_config_ack_time); + } + + public function clearLastConfigAckTime() + { + unset($this->last_config_ack_time); + } + + /** + * [Output only] The last time a cloud-to-device config version acknowledgment + * was received from the device. This field is only for configurations + * sent through MQTT. + * + * Generated from protobuf field .google.protobuf.Timestamp last_config_ack_time = 14; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastConfigAckTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_config_ack_time = $var; + + return $this; + } + + /** + * [Output only] The last time a cloud-to-device config version was sent to + * the device. + * + * Generated from protobuf field .google.protobuf.Timestamp last_config_send_time = 18; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastConfigSendTime() + { + return $this->last_config_send_time; + } + + public function hasLastConfigSendTime() + { + return isset($this->last_config_send_time); + } + + public function clearLastConfigSendTime() + { + unset($this->last_config_send_time); + } + + /** + * [Output only] The last time a cloud-to-device config version was sent to + * the device. + * + * Generated from protobuf field .google.protobuf.Timestamp last_config_send_time = 18; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastConfigSendTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_config_send_time = $var; + + return $this; + } + + /** + * If a device is blocked, connections or requests from this device will fail. + * Can be used to temporarily prevent the device from connecting if, for + * example, the sensor is generating bad data and needs maintenance. + * + * Generated from protobuf field bool blocked = 19; + * @return bool + */ + public function getBlocked() + { + return $this->blocked; + } + + /** + * If a device is blocked, connections or requests from this device will fail. + * Can be used to temporarily prevent the device from connecting if, for + * example, the sensor is generating bad data and needs maintenance. + * + * Generated from protobuf field bool blocked = 19; + * @param bool $var + * @return $this + */ + public function setBlocked($var) + { + GPBUtil::checkBool($var); + $this->blocked = $var; + + return $this; + } + + /** + * [Output only] The time the most recent error occurred, such as a failure to + * publish to Cloud Pub/Sub. This field is the timestamp of + * 'last_error_status'. + * + * Generated from protobuf field .google.protobuf.Timestamp last_error_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastErrorTime() + { + return $this->last_error_time; + } + + public function hasLastErrorTime() + { + return isset($this->last_error_time); + } + + public function clearLastErrorTime() + { + unset($this->last_error_time); + } + + /** + * [Output only] The time the most recent error occurred, such as a failure to + * publish to Cloud Pub/Sub. This field is the timestamp of + * 'last_error_status'. + * + * Generated from protobuf field .google.protobuf.Timestamp last_error_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastErrorTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_error_time = $var; + + return $this; + } + + /** + * [Output only] The error message of the most recent error, such as a failure + * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this + * field. If no errors have occurred, this field has an empty message + * and the status code 0 == OK. Otherwise, this field is expected to have a + * status code other than OK. + * + * Generated from protobuf field .google.rpc.Status last_error_status = 11; + * @return \Google\Rpc\Status|null + */ + public function getLastErrorStatus() + { + return $this->last_error_status; + } + + public function hasLastErrorStatus() + { + return isset($this->last_error_status); + } + + public function clearLastErrorStatus() + { + unset($this->last_error_status); + } + + /** + * [Output only] The error message of the most recent error, such as a failure + * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this + * field. If no errors have occurred, this field has an empty message + * and the status code 0 == OK. Otherwise, this field is expected to have a + * status code other than OK. + * + * Generated from protobuf field .google.rpc.Status last_error_status = 11; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setLastErrorStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->last_error_status = $var; + + return $this; + } + + /** + * The most recent device configuration, which is eventually sent from + * Cloud IoT Core to the device. If not present on creation, the + * configuration will be initialized with an empty payload and version value + * of `1`. To update this field after creation, use the + * `DeviceManager.ModifyCloudToDeviceConfig` method. + * + * Generated from protobuf field .google.cloud.iot.v1.DeviceConfig config = 13; + * @return \Google\Cloud\Iot\V1\DeviceConfig|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * The most recent device configuration, which is eventually sent from + * Cloud IoT Core to the device. If not present on creation, the + * configuration will be initialized with an empty payload and version value + * of `1`. To update this field after creation, use the + * `DeviceManager.ModifyCloudToDeviceConfig` method. + * + * Generated from protobuf field .google.cloud.iot.v1.DeviceConfig config = 13; + * @param \Google\Cloud\Iot\V1\DeviceConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\DeviceConfig::class); + $this->config = $var; + + return $this; + } + + /** + * [Output only] The state most recently received from the device. If no state + * has been reported, this field is not present. + * + * Generated from protobuf field .google.cloud.iot.v1.DeviceState state = 16; + * @return \Google\Cloud\Iot\V1\DeviceState|null + */ + public function getState() + { + return $this->state; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * [Output only] The state most recently received from the device. If no state + * has been reported, this field is not present. + * + * Generated from protobuf field .google.cloud.iot.v1.DeviceState state = 16; + * @param \Google\Cloud\Iot\V1\DeviceState $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\DeviceState::class); + $this->state = $var; + + return $this; + } + + /** + * **Beta Feature** + * The logging verbosity for device activity. If unspecified, + * DeviceRegistry.log_level will be used. + * + * Generated from protobuf field .google.cloud.iot.v1.LogLevel log_level = 21; + * @return int + */ + public function getLogLevel() + { + return $this->log_level; + } + + /** + * **Beta Feature** + * The logging verbosity for device activity. If unspecified, + * DeviceRegistry.log_level will be used. + * + * Generated from protobuf field .google.cloud.iot.v1.LogLevel log_level = 21; + * @param int $var + * @return $this + */ + public function setLogLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\LogLevel::class); + $this->log_level = $var; + + return $this; + } + + /** + * The metadata key-value pairs assigned to the device. This metadata is not + * interpreted or indexed by Cloud IoT Core. It can be used to add contextual + * information for the device. + * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and + * be less than 128 bytes in length. + * Values are free-form strings. Each value must be less than or equal to 32 + * KB in size. + * The total size of all keys and values must be less than 256 KB, and the + * maximum number of key-value pairs is 500. + * + * Generated from protobuf field map metadata = 17; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * The metadata key-value pairs assigned to the device. This metadata is not + * interpreted or indexed by Cloud IoT Core. It can be used to add contextual + * information for the device. + * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and + * be less than 128 bytes in length. + * Values are free-form strings. Each value must be less than or equal to 32 + * KB in size. + * The total size of all keys and values must be less than 256 KB, and the + * maximum number of key-value pairs is 500. + * + * Generated from protobuf field map metadata = 17; + * @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; + } + + /** + * Gateway-related configuration and state. + * + * Generated from protobuf field .google.cloud.iot.v1.GatewayConfig gateway_config = 24; + * @return \Google\Cloud\Iot\V1\GatewayConfig|null + */ + public function getGatewayConfig() + { + return $this->gateway_config; + } + + public function hasGatewayConfig() + { + return isset($this->gateway_config); + } + + public function clearGatewayConfig() + { + unset($this->gateway_config); + } + + /** + * Gateway-related configuration and state. + * + * Generated from protobuf field .google.cloud.iot.v1.GatewayConfig gateway_config = 24; + * @param \Google\Cloud\Iot\V1\GatewayConfig $var + * @return $this + */ + public function setGatewayConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\GatewayConfig::class); + $this->gateway_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceConfig.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceConfig.php new file mode 100644 index 000000000000..0c1ebe6f38ee --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceConfig.php @@ -0,0 +1,237 @@ +google.cloud.iot.v1.DeviceConfig + */ +class DeviceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * [Output only] The version of this update. The version number is assigned by + * the server, and is always greater than 0 after device creation. The + * version must be 0 on the `CreateDevice` request if a `config` is + * specified; the response of `CreateDevice` will always have a value of 1. + * + * Generated from protobuf field int64 version = 1; + */ + protected $version = 0; + /** + * [Output only] The time at which this configuration version was updated in + * Cloud IoT Core. This timestamp is set by the server. + * + * Generated from protobuf field .google.protobuf.Timestamp cloud_update_time = 2; + */ + protected $cloud_update_time = null; + /** + * [Output only] The time at which Cloud IoT Core received the + * acknowledgment from the device, indicating that the device has received + * this configuration version. If this field is not present, the device has + * not yet acknowledged that it received this version. Note that when + * the config was sent to the device, many config versions may have been + * available in Cloud IoT Core while the device was disconnected, and on + * connection, only the latest version is sent to the device. Some + * versions may never be sent to the device, and therefore are never + * acknowledged. This timestamp is set by Cloud IoT Core. + * + * Generated from protobuf field .google.protobuf.Timestamp device_ack_time = 3; + */ + protected $device_ack_time = null; + /** + * The device configuration data. + * + * Generated from protobuf field bytes binary_data = 4; + */ + protected $binary_data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $version + * [Output only] The version of this update. The version number is assigned by + * the server, and is always greater than 0 after device creation. The + * version must be 0 on the `CreateDevice` request if a `config` is + * specified; the response of `CreateDevice` will always have a value of 1. + * @type \Google\Protobuf\Timestamp $cloud_update_time + * [Output only] The time at which this configuration version was updated in + * Cloud IoT Core. This timestamp is set by the server. + * @type \Google\Protobuf\Timestamp $device_ack_time + * [Output only] The time at which Cloud IoT Core received the + * acknowledgment from the device, indicating that the device has received + * this configuration version. If this field is not present, the device has + * not yet acknowledged that it received this version. Note that when + * the config was sent to the device, many config versions may have been + * available in Cloud IoT Core while the device was disconnected, and on + * connection, only the latest version is sent to the device. Some + * versions may never be sent to the device, and therefore are never + * acknowledged. This timestamp is set by Cloud IoT Core. + * @type string $binary_data + * The device configuration data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * [Output only] The version of this update. The version number is assigned by + * the server, and is always greater than 0 after device creation. The + * version must be 0 on the `CreateDevice` request if a `config` is + * specified; the response of `CreateDevice` will always have a value of 1. + * + * Generated from protobuf field int64 version = 1; + * @return int|string + */ + public function getVersion() + { + return $this->version; + } + + /** + * [Output only] The version of this update. The version number is assigned by + * the server, and is always greater than 0 after device creation. The + * version must be 0 on the `CreateDevice` request if a `config` is + * specified; the response of `CreateDevice` will always have a value of 1. + * + * Generated from protobuf field int64 version = 1; + * @param int|string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt64($var); + $this->version = $var; + + return $this; + } + + /** + * [Output only] The time at which this configuration version was updated in + * Cloud IoT Core. This timestamp is set by the server. + * + * Generated from protobuf field .google.protobuf.Timestamp cloud_update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCloudUpdateTime() + { + return $this->cloud_update_time; + } + + public function hasCloudUpdateTime() + { + return isset($this->cloud_update_time); + } + + public function clearCloudUpdateTime() + { + unset($this->cloud_update_time); + } + + /** + * [Output only] The time at which this configuration version was updated in + * Cloud IoT Core. This timestamp is set by the server. + * + * Generated from protobuf field .google.protobuf.Timestamp cloud_update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCloudUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->cloud_update_time = $var; + + return $this; + } + + /** + * [Output only] The time at which Cloud IoT Core received the + * acknowledgment from the device, indicating that the device has received + * this configuration version. If this field is not present, the device has + * not yet acknowledged that it received this version. Note that when + * the config was sent to the device, many config versions may have been + * available in Cloud IoT Core while the device was disconnected, and on + * connection, only the latest version is sent to the device. Some + * versions may never be sent to the device, and therefore are never + * acknowledged. This timestamp is set by Cloud IoT Core. + * + * Generated from protobuf field .google.protobuf.Timestamp device_ack_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeviceAckTime() + { + return $this->device_ack_time; + } + + public function hasDeviceAckTime() + { + return isset($this->device_ack_time); + } + + public function clearDeviceAckTime() + { + unset($this->device_ack_time); + } + + /** + * [Output only] The time at which Cloud IoT Core received the + * acknowledgment from the device, indicating that the device has received + * this configuration version. If this field is not present, the device has + * not yet acknowledged that it received this version. Note that when + * the config was sent to the device, many config versions may have been + * available in Cloud IoT Core while the device was disconnected, and on + * connection, only the latest version is sent to the device. Some + * versions may never be sent to the device, and therefore are never + * acknowledged. This timestamp is set by Cloud IoT Core. + * + * Generated from protobuf field .google.protobuf.Timestamp device_ack_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeviceAckTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->device_ack_time = $var; + + return $this; + } + + /** + * The device configuration data. + * + * Generated from protobuf field bytes binary_data = 4; + * @return string + */ + public function getBinaryData() + { + return $this->binary_data; + } + + /** + * The device configuration data. + * + * Generated from protobuf field bytes binary_data = 4; + * @param string $var + * @return $this + */ + public function setBinaryData($var) + { + GPBUtil::checkString($var, False); + $this->binary_data = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceCredential.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceCredential.php new file mode 100644 index 000000000000..36b02b997a45 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceCredential.php @@ -0,0 +1,157 @@ +google.cloud.iot.v1.DeviceCredential + */ +class DeviceCredential extends \Google\Protobuf\Internal\Message +{ + /** + * [Optional] The time at which this credential becomes invalid. This + * credential will be ignored for new client authentication requests after + * this timestamp; however, it will not be automatically deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; + */ + protected $expiration_time = null; + protected $credential; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Iot\V1\PublicKeyCredential $public_key + * A public key used to verify the signature of JSON Web Tokens (JWTs). + * When adding a new device credential, either via device creation or via + * modifications, this public key credential may be required to be signed by + * one of the registry level certificates. More specifically, if the + * registry contains at least one certificate, any new device credential + * must be signed by one of the registry certificates. As a result, + * when the registry contains certificates, only X.509 certificates are + * accepted as device credentials. However, if the registry does + * not contain a certificate, self-signed certificates and public keys will + * be accepted. New device credentials must be different from every + * registry-level certificate. + * @type \Google\Protobuf\Timestamp $expiration_time + * [Optional] The time at which this credential becomes invalid. This + * credential will be ignored for new client authentication requests after + * this timestamp; however, it will not be automatically deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A public key used to verify the signature of JSON Web Tokens (JWTs). + * When adding a new device credential, either via device creation or via + * modifications, this public key credential may be required to be signed by + * one of the registry level certificates. More specifically, if the + * registry contains at least one certificate, any new device credential + * must be signed by one of the registry certificates. As a result, + * when the registry contains certificates, only X.509 certificates are + * accepted as device credentials. However, if the registry does + * not contain a certificate, self-signed certificates and public keys will + * be accepted. New device credentials must be different from every + * registry-level certificate. + * + * Generated from protobuf field .google.cloud.iot.v1.PublicKeyCredential public_key = 2; + * @return \Google\Cloud\Iot\V1\PublicKeyCredential|null + */ + public function getPublicKey() + { + return $this->readOneof(2); + } + + public function hasPublicKey() + { + return $this->hasOneof(2); + } + + /** + * A public key used to verify the signature of JSON Web Tokens (JWTs). + * When adding a new device credential, either via device creation or via + * modifications, this public key credential may be required to be signed by + * one of the registry level certificates. More specifically, if the + * registry contains at least one certificate, any new device credential + * must be signed by one of the registry certificates. As a result, + * when the registry contains certificates, only X.509 certificates are + * accepted as device credentials. However, if the registry does + * not contain a certificate, self-signed certificates and public keys will + * be accepted. New device credentials must be different from every + * registry-level certificate. + * + * Generated from protobuf field .google.cloud.iot.v1.PublicKeyCredential public_key = 2; + * @param \Google\Cloud\Iot\V1\PublicKeyCredential $var + * @return $this + */ + public function setPublicKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\PublicKeyCredential::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * [Optional] The time at which this credential becomes invalid. This + * credential will be ignored for new client authentication requests after + * this timestamp; however, it will not be automatically deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpirationTime() + { + return $this->expiration_time; + } + + public function hasExpirationTime() + { + return isset($this->expiration_time); + } + + public function clearExpirationTime() + { + unset($this->expiration_time); + } + + /** + * [Optional] The time at which this credential becomes invalid. This + * credential will be ignored for new client authentication requests after + * this timestamp; however, it will not be automatically deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expiration_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getCredential() + { + return $this->whichOneof("credential"); + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceManagerGrpcClient.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceManagerGrpcClient.php new file mode 100644 index 000000000000..e129ea18c2d8 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceManagerGrpcClient.php @@ -0,0 +1,341 @@ +_simpleRequest('/google.cloud.iot.v1.DeviceManager/CreateDeviceRegistry', + $argument, + ['\Google\Cloud\Iot\V1\DeviceRegistry', 'decode'], + $metadata, $options); + } + + /** + * Gets a device registry configuration. + * @param \Google\Cloud\Iot\V1\GetDeviceRegistryRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetDeviceRegistry(\Google\Cloud\Iot\V1\GetDeviceRegistryRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/GetDeviceRegistry', + $argument, + ['\Google\Cloud\Iot\V1\DeviceRegistry', 'decode'], + $metadata, $options); + } + + /** + * Updates a device registry configuration. + * @param \Google\Cloud\Iot\V1\UpdateDeviceRegistryRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateDeviceRegistry(\Google\Cloud\Iot\V1\UpdateDeviceRegistryRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/UpdateDeviceRegistry', + $argument, + ['\Google\Cloud\Iot\V1\DeviceRegistry', 'decode'], + $metadata, $options); + } + + /** + * Deletes a device registry configuration. + * @param \Google\Cloud\Iot\V1\DeleteDeviceRegistryRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteDeviceRegistry(\Google\Cloud\Iot\V1\DeleteDeviceRegistryRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/DeleteDeviceRegistry', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Lists device registries. + * @param \Google\Cloud\Iot\V1\ListDeviceRegistriesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListDeviceRegistries(\Google\Cloud\Iot\V1\ListDeviceRegistriesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/ListDeviceRegistries', + $argument, + ['\Google\Cloud\Iot\V1\ListDeviceRegistriesResponse', 'decode'], + $metadata, $options); + } + + /** + * Creates a device in a device registry. + * @param \Google\Cloud\Iot\V1\CreateDeviceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateDevice(\Google\Cloud\Iot\V1\CreateDeviceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/CreateDevice', + $argument, + ['\Google\Cloud\Iot\V1\Device', 'decode'], + $metadata, $options); + } + + /** + * Gets details about a device. + * @param \Google\Cloud\Iot\V1\GetDeviceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetDevice(\Google\Cloud\Iot\V1\GetDeviceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/GetDevice', + $argument, + ['\Google\Cloud\Iot\V1\Device', 'decode'], + $metadata, $options); + } + + /** + * Updates a device. + * @param \Google\Cloud\Iot\V1\UpdateDeviceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateDevice(\Google\Cloud\Iot\V1\UpdateDeviceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/UpdateDevice', + $argument, + ['\Google\Cloud\Iot\V1\Device', 'decode'], + $metadata, $options); + } + + /** + * Deletes a device. + * @param \Google\Cloud\Iot\V1\DeleteDeviceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteDevice(\Google\Cloud\Iot\V1\DeleteDeviceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/DeleteDevice', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * List devices in a device registry. + * @param \Google\Cloud\Iot\V1\ListDevicesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListDevices(\Google\Cloud\Iot\V1\ListDevicesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/ListDevices', + $argument, + ['\Google\Cloud\Iot\V1\ListDevicesResponse', 'decode'], + $metadata, $options); + } + + /** + * Modifies the configuration for the device, which is eventually sent from + * the Cloud IoT Core servers. Returns the modified configuration version and + * its metadata. + * @param \Google\Cloud\Iot\V1\ModifyCloudToDeviceConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ModifyCloudToDeviceConfig(\Google\Cloud\Iot\V1\ModifyCloudToDeviceConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/ModifyCloudToDeviceConfig', + $argument, + ['\Google\Cloud\Iot\V1\DeviceConfig', 'decode'], + $metadata, $options); + } + + /** + * Lists the last few versions of the device configuration in descending + * order (i.e.: newest first). + * @param \Google\Cloud\Iot\V1\ListDeviceConfigVersionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListDeviceConfigVersions(\Google\Cloud\Iot\V1\ListDeviceConfigVersionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/ListDeviceConfigVersions', + $argument, + ['\Google\Cloud\Iot\V1\ListDeviceConfigVersionsResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists the last few versions of the device state in descending order (i.e.: + * newest first). + * @param \Google\Cloud\Iot\V1\ListDeviceStatesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListDeviceStates(\Google\Cloud\Iot\V1\ListDeviceStatesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/ListDeviceStates', + $argument, + ['\Google\Cloud\Iot\V1\ListDeviceStatesResponse', 'decode'], + $metadata, $options); + } + + /** + * Sets the access control policy on the specified resource. Replaces any + * existing policy. + * @param \Google\Cloud\Iam\V1\SetIamPolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SetIamPolicy(\Google\Cloud\Iam\V1\SetIamPolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/SetIamPolicy', + $argument, + ['\Google\Cloud\Iam\V1\Policy', 'decode'], + $metadata, $options); + } + + /** + * Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set. + * @param \Google\Cloud\Iam\V1\GetIamPolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetIamPolicy(\Google\Cloud\Iam\V1\GetIamPolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/GetIamPolicy', + $argument, + ['\Google\Cloud\Iam\V1\Policy', 'decode'], + $metadata, $options); + } + + /** + * 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. + * @param \Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function TestIamPermissions(\Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/TestIamPermissions', + $argument, + ['\Google\Cloud\Iam\V1\TestIamPermissionsResponse', 'decode'], + $metadata, $options); + } + + /** + * Sends a command to the specified device. In order for a device to be able + * to receive commands, it must: + * 1) be connected to Cloud IoT Core using the MQTT protocol, and + * 2) be subscribed to the group of MQTT topics specified by + * /devices/{device-id}/commands/#. This subscription will receive commands + * at the top-level topic /devices/{device-id}/commands as well as commands + * for subfolders, like /devices/{device-id}/commands/subfolder. + * Note that subscribing to specific subfolders is not supported. + * If the command could not be delivered to the device, this method will + * return an error; in particular, if the device is not subscribed, this + * method will return FAILED_PRECONDITION. Otherwise, this method will + * return OK. If the subscription is QoS 1, at least once delivery will be + * guaranteed; for QoS 0, no acknowledgment will be expected from the device. + * @param \Google\Cloud\Iot\V1\SendCommandToDeviceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SendCommandToDevice(\Google\Cloud\Iot\V1\SendCommandToDeviceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/SendCommandToDevice', + $argument, + ['\Google\Cloud\Iot\V1\SendCommandToDeviceResponse', 'decode'], + $metadata, $options); + } + + /** + * Associates the device with the gateway. + * @param \Google\Cloud\Iot\V1\BindDeviceToGatewayRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function BindDeviceToGateway(\Google\Cloud\Iot\V1\BindDeviceToGatewayRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/BindDeviceToGateway', + $argument, + ['\Google\Cloud\Iot\V1\BindDeviceToGatewayResponse', 'decode'], + $metadata, $options); + } + + /** + * Deletes the association between the device and the gateway. + * @param \Google\Cloud\Iot\V1\UnbindDeviceFromGatewayRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UnbindDeviceFromGateway(\Google\Cloud\Iot\V1\UnbindDeviceFromGatewayRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/UnbindDeviceFromGateway', + $argument, + ['\Google\Cloud\Iot\V1\UnbindDeviceFromGatewayResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceRegistry.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceRegistry.php new file mode 100644 index 000000000000..0e038fc1e748 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceRegistry.php @@ -0,0 +1,435 @@ +google.cloud.iot.v1.DeviceRegistry + */ +class DeviceRegistry extends \Google\Protobuf\Internal\Message +{ + /** + * The identifier of this device registry. For example, `myRegistry`. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The resource path name. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * The configuration for notification of telemetry events received from the + * device. All telemetry events that were successfully published by the + * device and acknowledged by Cloud IoT Core are guaranteed to be + * delivered to Cloud Pub/Sub. If multiple configurations match a message, + * only the first matching configuration is used. If you try to publish a + * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic + * for the device's registry, the connection closes automatically. If you try + * to do so using an HTTP connection, an error is returned. Up to 10 + * configurations may be provided. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; + */ + private $event_notification_configs; + /** + * The configuration for notification of new states received from the device. + * State updates are guaranteed to be stored in the state history, but + * notifications to Cloud Pub/Sub are not guaranteed. For example, if + * permissions are misconfigured or the specified topic doesn't exist, no + * notification will be published but the state will still be stored in Cloud + * IoT Core. + * + * Generated from protobuf field .google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7; + */ + protected $state_notification_config = null; + /** + * The MQTT configuration for this device registry. + * + * Generated from protobuf field .google.cloud.iot.v1.MqttConfig mqtt_config = 4; + */ + protected $mqtt_config = null; + /** + * The DeviceService (HTTP) configuration for this device registry. + * + * Generated from protobuf field .google.cloud.iot.v1.HttpConfig http_config = 9; + */ + protected $http_config = null; + /** + * **Beta Feature** + * The default logging verbosity for activity from devices in this registry. + * The verbosity level can be overridden by Device.log_level. + * + * Generated from protobuf field .google.cloud.iot.v1.LogLevel log_level = 11; + */ + protected $log_level = 0; + /** + * The credentials used to verify the device credentials. No more than 10 + * credentials can be bound to a single registry at a time. The verification + * process occurs at the time of device creation or update. If this field is + * empty, no verification is performed. Otherwise, the credentials of a newly + * created device or added credentials of an updated device should be signed + * with one of these registry credentials. + * Note, however, that existing devices will never be affected by + * modifications to this list of credentials: after a device has been + * successfully created in a registry, it should be able to connect even if + * its registry credentials are revoked, deleted, or modified. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.RegistryCredential credentials = 8; + */ + private $credentials; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The identifier of this device registry. For example, `myRegistry`. + * @type string $name + * The resource path name. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @type array<\Google\Cloud\Iot\V1\EventNotificationConfig>|\Google\Protobuf\Internal\RepeatedField $event_notification_configs + * The configuration for notification of telemetry events received from the + * device. All telemetry events that were successfully published by the + * device and acknowledged by Cloud IoT Core are guaranteed to be + * delivered to Cloud Pub/Sub. If multiple configurations match a message, + * only the first matching configuration is used. If you try to publish a + * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic + * for the device's registry, the connection closes automatically. If you try + * to do so using an HTTP connection, an error is returned. Up to 10 + * configurations may be provided. + * @type \Google\Cloud\Iot\V1\StateNotificationConfig $state_notification_config + * The configuration for notification of new states received from the device. + * State updates are guaranteed to be stored in the state history, but + * notifications to Cloud Pub/Sub are not guaranteed. For example, if + * permissions are misconfigured or the specified topic doesn't exist, no + * notification will be published but the state will still be stored in Cloud + * IoT Core. + * @type \Google\Cloud\Iot\V1\MqttConfig $mqtt_config + * The MQTT configuration for this device registry. + * @type \Google\Cloud\Iot\V1\HttpConfig $http_config + * The DeviceService (HTTP) configuration for this device registry. + * @type int $log_level + * **Beta Feature** + * The default logging verbosity for activity from devices in this registry. + * The verbosity level can be overridden by Device.log_level. + * @type array<\Google\Cloud\Iot\V1\RegistryCredential>|\Google\Protobuf\Internal\RepeatedField $credentials + * The credentials used to verify the device credentials. No more than 10 + * credentials can be bound to a single registry at a time. The verification + * process occurs at the time of device creation or update. If this field is + * empty, no verification is performed. Otherwise, the credentials of a newly + * created device or added credentials of an updated device should be signed + * with one of these registry credentials. + * Note, however, that existing devices will never be affected by + * modifications to this list of credentials: after a device has been + * successfully created in a registry, it should be able to connect even if + * its registry credentials are revoked, deleted, or modified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The identifier of this device registry. For example, `myRegistry`. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The identifier of this device registry. For example, `myRegistry`. + * + * 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 resource path name. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource path name. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * 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; + } + + /** + * The configuration for notification of telemetry events received from the + * device. All telemetry events that were successfully published by the + * device and acknowledged by Cloud IoT Core are guaranteed to be + * delivered to Cloud Pub/Sub. If multiple configurations match a message, + * only the first matching configuration is used. If you try to publish a + * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic + * for the device's registry, the connection closes automatically. If you try + * to do so using an HTTP connection, an error is returned. Up to 10 + * configurations may be provided. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEventNotificationConfigs() + { + return $this->event_notification_configs; + } + + /** + * The configuration for notification of telemetry events received from the + * device. All telemetry events that were successfully published by the + * device and acknowledged by Cloud IoT Core are guaranteed to be + * delivered to Cloud Pub/Sub. If multiple configurations match a message, + * only the first matching configuration is used. If you try to publish a + * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic + * for the device's registry, the connection closes automatically. If you try + * to do so using an HTTP connection, an error is returned. Up to 10 + * configurations may be provided. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; + * @param array<\Google\Cloud\Iot\V1\EventNotificationConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEventNotificationConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\EventNotificationConfig::class); + $this->event_notification_configs = $arr; + + return $this; + } + + /** + * The configuration for notification of new states received from the device. + * State updates are guaranteed to be stored in the state history, but + * notifications to Cloud Pub/Sub are not guaranteed. For example, if + * permissions are misconfigured or the specified topic doesn't exist, no + * notification will be published but the state will still be stored in Cloud + * IoT Core. + * + * Generated from protobuf field .google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7; + * @return \Google\Cloud\Iot\V1\StateNotificationConfig|null + */ + public function getStateNotificationConfig() + { + return $this->state_notification_config; + } + + public function hasStateNotificationConfig() + { + return isset($this->state_notification_config); + } + + public function clearStateNotificationConfig() + { + unset($this->state_notification_config); + } + + /** + * The configuration for notification of new states received from the device. + * State updates are guaranteed to be stored in the state history, but + * notifications to Cloud Pub/Sub are not guaranteed. For example, if + * permissions are misconfigured or the specified topic doesn't exist, no + * notification will be published but the state will still be stored in Cloud + * IoT Core. + * + * Generated from protobuf field .google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7; + * @param \Google\Cloud\Iot\V1\StateNotificationConfig $var + * @return $this + */ + public function setStateNotificationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\StateNotificationConfig::class); + $this->state_notification_config = $var; + + return $this; + } + + /** + * The MQTT configuration for this device registry. + * + * Generated from protobuf field .google.cloud.iot.v1.MqttConfig mqtt_config = 4; + * @return \Google\Cloud\Iot\V1\MqttConfig|null + */ + public function getMqttConfig() + { + return $this->mqtt_config; + } + + public function hasMqttConfig() + { + return isset($this->mqtt_config); + } + + public function clearMqttConfig() + { + unset($this->mqtt_config); + } + + /** + * The MQTT configuration for this device registry. + * + * Generated from protobuf field .google.cloud.iot.v1.MqttConfig mqtt_config = 4; + * @param \Google\Cloud\Iot\V1\MqttConfig $var + * @return $this + */ + public function setMqttConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\MqttConfig::class); + $this->mqtt_config = $var; + + return $this; + } + + /** + * The DeviceService (HTTP) configuration for this device registry. + * + * Generated from protobuf field .google.cloud.iot.v1.HttpConfig http_config = 9; + * @return \Google\Cloud\Iot\V1\HttpConfig|null + */ + public function getHttpConfig() + { + return $this->http_config; + } + + public function hasHttpConfig() + { + return isset($this->http_config); + } + + public function clearHttpConfig() + { + unset($this->http_config); + } + + /** + * The DeviceService (HTTP) configuration for this device registry. + * + * Generated from protobuf field .google.cloud.iot.v1.HttpConfig http_config = 9; + * @param \Google\Cloud\Iot\V1\HttpConfig $var + * @return $this + */ + public function setHttpConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\HttpConfig::class); + $this->http_config = $var; + + return $this; + } + + /** + * **Beta Feature** + * The default logging verbosity for activity from devices in this registry. + * The verbosity level can be overridden by Device.log_level. + * + * Generated from protobuf field .google.cloud.iot.v1.LogLevel log_level = 11; + * @return int + */ + public function getLogLevel() + { + return $this->log_level; + } + + /** + * **Beta Feature** + * The default logging verbosity for activity from devices in this registry. + * The verbosity level can be overridden by Device.log_level. + * + * Generated from protobuf field .google.cloud.iot.v1.LogLevel log_level = 11; + * @param int $var + * @return $this + */ + public function setLogLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\LogLevel::class); + $this->log_level = $var; + + return $this; + } + + /** + * The credentials used to verify the device credentials. No more than 10 + * credentials can be bound to a single registry at a time. The verification + * process occurs at the time of device creation or update. If this field is + * empty, no verification is performed. Otherwise, the credentials of a newly + * created device or added credentials of an updated device should be signed + * with one of these registry credentials. + * Note, however, that existing devices will never be affected by + * modifications to this list of credentials: after a device has been + * successfully created in a registry, it should be able to connect even if + * its registry credentials are revoked, deleted, or modified. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.RegistryCredential credentials = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCredentials() + { + return $this->credentials; + } + + /** + * The credentials used to verify the device credentials. No more than 10 + * credentials can be bound to a single registry at a time. The verification + * process occurs at the time of device creation or update. If this field is + * empty, no verification is performed. Otherwise, the credentials of a newly + * created device or added credentials of an updated device should be signed + * with one of these registry credentials. + * Note, however, that existing devices will never be affected by + * modifications to this list of credentials: after a device has been + * successfully created in a registry, it should be able to connect even if + * its registry credentials are revoked, deleted, or modified. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.RegistryCredential credentials = 8; + * @param array<\Google\Cloud\Iot\V1\RegistryCredential>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCredentials($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\RegistryCredential::class); + $this->credentials = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceState.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceState.php new file mode 100644 index 000000000000..0cb78870589e --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceState.php @@ -0,0 +1,115 @@ +google.cloud.iot.v1.DeviceState + */ +class DeviceState extends \Google\Protobuf\Internal\Message +{ + /** + * [Output only] The time at which this state version was updated in Cloud + * IoT Core. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + */ + protected $update_time = null; + /** + * The device state data. + * + * Generated from protobuf field bytes binary_data = 2; + */ + protected $binary_data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $update_time + * [Output only] The time at which this state version was updated in Cloud + * IoT Core. + * @type string $binary_data + * The device state data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * [Output only] The time at which this state version was updated in Cloud + * IoT Core. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + * @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 state version was updated in Cloud + * IoT Core. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + * @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 device state data. + * + * Generated from protobuf field bytes binary_data = 2; + * @return string + */ + public function getBinaryData() + { + return $this->binary_data; + } + + /** + * The device state data. + * + * Generated from protobuf field bytes binary_data = 2; + * @param string $var + * @return $this + */ + public function setBinaryData($var) + { + GPBUtil::checkString($var, False); + $this->binary_data = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/EventNotificationConfig.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/EventNotificationConfig.php new file mode 100644 index 000000000000..b34728a02e7f --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/EventNotificationConfig.php @@ -0,0 +1,117 @@ +google.cloud.iot.v1.EventNotificationConfig + */ +class EventNotificationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * If the subfolder name matches this string exactly, this configuration will + * be used. The string must not include the leading '/' character. If empty, + * all strings are matched. This field is used only for telemetry events; + * subfolders are not supported for state changes. + * + * Generated from protobuf field string subfolder_matches = 2; + */ + protected $subfolder_matches = ''; + /** + * A Cloud Pub/Sub topic name. For example, + * `projects/myProject/topics/deviceEvents`. + * + * Generated from protobuf field string pubsub_topic_name = 1; + */ + protected $pubsub_topic_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $subfolder_matches + * If the subfolder name matches this string exactly, this configuration will + * be used. The string must not include the leading '/' character. If empty, + * all strings are matched. This field is used only for telemetry events; + * subfolders are not supported for state changes. + * @type string $pubsub_topic_name + * A Cloud Pub/Sub topic name. For example, + * `projects/myProject/topics/deviceEvents`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * If the subfolder name matches this string exactly, this configuration will + * be used. The string must not include the leading '/' character. If empty, + * all strings are matched. This field is used only for telemetry events; + * subfolders are not supported for state changes. + * + * Generated from protobuf field string subfolder_matches = 2; + * @return string + */ + public function getSubfolderMatches() + { + return $this->subfolder_matches; + } + + /** + * If the subfolder name matches this string exactly, this configuration will + * be used. The string must not include the leading '/' character. If empty, + * all strings are matched. This field is used only for telemetry events; + * subfolders are not supported for state changes. + * + * Generated from protobuf field string subfolder_matches = 2; + * @param string $var + * @return $this + */ + public function setSubfolderMatches($var) + { + GPBUtil::checkString($var, True); + $this->subfolder_matches = $var; + + return $this; + } + + /** + * A Cloud Pub/Sub topic name. For example, + * `projects/myProject/topics/deviceEvents`. + * + * Generated from protobuf field string pubsub_topic_name = 1; + * @return string + */ + public function getPubsubTopicName() + { + return $this->pubsub_topic_name; + } + + /** + * A Cloud Pub/Sub topic name. For example, + * `projects/myProject/topics/deviceEvents`. + * + * Generated from protobuf field string pubsub_topic_name = 1; + * @param string $var + * @return $this + */ + public function setPubsubTopicName($var) + { + GPBUtil::checkString($var, True); + $this->pubsub_topic_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayAuthMethod.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayAuthMethod.php new file mode 100644 index 000000000000..9d8691becaf9 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayAuthMethod.php @@ -0,0 +1,74 @@ +google.cloud.iot.v1.GatewayAuthMethod + */ +class GatewayAuthMethod +{ + /** + * No authentication/authorization method specified. No devices are allowed to + * access the gateway. + * + * Generated from protobuf enum GATEWAY_AUTH_METHOD_UNSPECIFIED = 0; + */ + const GATEWAY_AUTH_METHOD_UNSPECIFIED = 0; + /** + * The device is authenticated through the gateway association only. Device + * credentials are ignored even if provided. + * + * Generated from protobuf enum ASSOCIATION_ONLY = 1; + */ + const ASSOCIATION_ONLY = 1; + /** + * The device is authenticated through its own credentials. Gateway + * association is not checked. + * + * Generated from protobuf enum DEVICE_AUTH_TOKEN_ONLY = 2; + */ + const DEVICE_AUTH_TOKEN_ONLY = 2; + /** + * The device is authenticated through both device credentials and gateway + * association. The device must be bound to the gateway and must provide its + * own credentials. + * + * Generated from protobuf enum ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3; + */ + const ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3; + + private static $valueToName = [ + self::GATEWAY_AUTH_METHOD_UNSPECIFIED => 'GATEWAY_AUTH_METHOD_UNSPECIFIED', + self::ASSOCIATION_ONLY => 'ASSOCIATION_ONLY', + self::DEVICE_AUTH_TOKEN_ONLY => 'DEVICE_AUTH_TOKEN_ONLY', + self::ASSOCIATION_AND_DEVICE_AUTH_TOKEN => 'ASSOCIATION_AND_DEVICE_AUTH_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); + } +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayConfig.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayConfig.php new file mode 100644 index 000000000000..3f8a0310d4f9 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayConfig.php @@ -0,0 +1,187 @@ +google.cloud.iot.v1.GatewayConfig + */ +class GatewayConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates whether the device is a gateway. + * + * Generated from protobuf field .google.cloud.iot.v1.GatewayType gateway_type = 1; + */ + protected $gateway_type = 0; + /** + * Indicates how to authorize and/or authenticate devices to access the + * gateway. + * + * Generated from protobuf field .google.cloud.iot.v1.GatewayAuthMethod gateway_auth_method = 2; + */ + protected $gateway_auth_method = 0; + /** + * [Output only] The ID of the gateway the device accessed most recently. + * + * Generated from protobuf field string last_accessed_gateway_id = 3; + */ + protected $last_accessed_gateway_id = ''; + /** + * [Output only] The most recent time at which the device accessed the gateway + * specified in `last_accessed_gateway`. + * + * Generated from protobuf field .google.protobuf.Timestamp last_accessed_gateway_time = 4; + */ + protected $last_accessed_gateway_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $gateway_type + * Indicates whether the device is a gateway. + * @type int $gateway_auth_method + * Indicates how to authorize and/or authenticate devices to access the + * gateway. + * @type string $last_accessed_gateway_id + * [Output only] The ID of the gateway the device accessed most recently. + * @type \Google\Protobuf\Timestamp $last_accessed_gateway_time + * [Output only] The most recent time at which the device accessed the gateway + * specified in `last_accessed_gateway`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Indicates whether the device is a gateway. + * + * Generated from protobuf field .google.cloud.iot.v1.GatewayType gateway_type = 1; + * @return int + */ + public function getGatewayType() + { + return $this->gateway_type; + } + + /** + * Indicates whether the device is a gateway. + * + * Generated from protobuf field .google.cloud.iot.v1.GatewayType gateway_type = 1; + * @param int $var + * @return $this + */ + public function setGatewayType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\GatewayType::class); + $this->gateway_type = $var; + + return $this; + } + + /** + * Indicates how to authorize and/or authenticate devices to access the + * gateway. + * + * Generated from protobuf field .google.cloud.iot.v1.GatewayAuthMethod gateway_auth_method = 2; + * @return int + */ + public function getGatewayAuthMethod() + { + return $this->gateway_auth_method; + } + + /** + * Indicates how to authorize and/or authenticate devices to access the + * gateway. + * + * Generated from protobuf field .google.cloud.iot.v1.GatewayAuthMethod gateway_auth_method = 2; + * @param int $var + * @return $this + */ + public function setGatewayAuthMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\GatewayAuthMethod::class); + $this->gateway_auth_method = $var; + + return $this; + } + + /** + * [Output only] The ID of the gateway the device accessed most recently. + * + * Generated from protobuf field string last_accessed_gateway_id = 3; + * @return string + */ + public function getLastAccessedGatewayId() + { + return $this->last_accessed_gateway_id; + } + + /** + * [Output only] The ID of the gateway the device accessed most recently. + * + * Generated from protobuf field string last_accessed_gateway_id = 3; + * @param string $var + * @return $this + */ + public function setLastAccessedGatewayId($var) + { + GPBUtil::checkString($var, True); + $this->last_accessed_gateway_id = $var; + + return $this; + } + + /** + * [Output only] The most recent time at which the device accessed the gateway + * specified in `last_accessed_gateway`. + * + * Generated from protobuf field .google.protobuf.Timestamp last_accessed_gateway_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastAccessedGatewayTime() + { + return $this->last_accessed_gateway_time; + } + + public function hasLastAccessedGatewayTime() + { + return isset($this->last_accessed_gateway_time); + } + + public function clearLastAccessedGatewayTime() + { + unset($this->last_accessed_gateway_time); + } + + /** + * [Output only] The most recent time at which the device accessed the gateway + * specified in `last_accessed_gateway`. + * + * Generated from protobuf field .google.protobuf.Timestamp last_accessed_gateway_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastAccessedGatewayTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_accessed_gateway_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayListOptions.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayListOptions.php new file mode 100644 index 000000000000..d4ff45e9de56 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayListOptions.php @@ -0,0 +1,165 @@ +google.cloud.iot.v1.GatewayListOptions + */ +class GatewayListOptions extends \Google\Protobuf\Internal\Message +{ + protected $filter; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $gateway_type + * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY` + * is specified, only non-gateway devices are returned. If + * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned. + * @type string $associations_gateway_id + * If set, only devices associated with the specified gateway are returned. + * The gateway ID can be numeric (`num_id`) or the user-defined string + * (`id`). For example, if `123` is specified, only devices bound to the + * gateway with `num_id` 123 are returned. + * @type string $associations_device_id + * If set, returns only the gateways with which the specified device is + * associated. The device ID can be numeric (`num_id`) or the user-defined + * string (`id`). For example, if `456` is specified, returns only the + * gateways to which the device with `num_id` 456 is bound. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY` + * is specified, only non-gateway devices are returned. If + * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned. + * + * Generated from protobuf field .google.cloud.iot.v1.GatewayType gateway_type = 1; + * @return int + */ + public function getGatewayType() + { + return $this->readOneof(1); + } + + public function hasGatewayType() + { + return $this->hasOneof(1); + } + + /** + * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY` + * is specified, only non-gateway devices are returned. If + * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned. + * + * Generated from protobuf field .google.cloud.iot.v1.GatewayType gateway_type = 1; + * @param int $var + * @return $this + */ + public function setGatewayType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\GatewayType::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * If set, only devices associated with the specified gateway are returned. + * The gateway ID can be numeric (`num_id`) or the user-defined string + * (`id`). For example, if `123` is specified, only devices bound to the + * gateway with `num_id` 123 are returned. + * + * Generated from protobuf field string associations_gateway_id = 2; + * @return string + */ + public function getAssociationsGatewayId() + { + return $this->readOneof(2); + } + + public function hasAssociationsGatewayId() + { + return $this->hasOneof(2); + } + + /** + * If set, only devices associated with the specified gateway are returned. + * The gateway ID can be numeric (`num_id`) or the user-defined string + * (`id`). For example, if `123` is specified, only devices bound to the + * gateway with `num_id` 123 are returned. + * + * Generated from protobuf field string associations_gateway_id = 2; + * @param string $var + * @return $this + */ + public function setAssociationsGatewayId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * If set, returns only the gateways with which the specified device is + * associated. The device ID can be numeric (`num_id`) or the user-defined + * string (`id`). For example, if `456` is specified, returns only the + * gateways to which the device with `num_id` 456 is bound. + * + * Generated from protobuf field string associations_device_id = 3; + * @return string + */ + public function getAssociationsDeviceId() + { + return $this->readOneof(3); + } + + public function hasAssociationsDeviceId() + { + return $this->hasOneof(3); + } + + /** + * If set, returns only the gateways with which the specified device is + * associated. The device ID can be numeric (`num_id`) or the user-defined + * string (`id`). For example, if `456` is specified, returns only the + * gateways to which the device with `num_id` 456 is bound. + * + * Generated from protobuf field string associations_device_id = 3; + * @param string $var + * @return $this + */ + public function setAssociationsDeviceId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getFilter() + { + return $this->whichOneof("filter"); + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayType.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayType.php new file mode 100644 index 000000000000..cd6ecd8055bc --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayType.php @@ -0,0 +1,61 @@ +google.cloud.iot.v1.GatewayType + */ +class GatewayType +{ + /** + * If unspecified, the device is considered a non-gateway device. + * + * Generated from protobuf enum GATEWAY_TYPE_UNSPECIFIED = 0; + */ + const GATEWAY_TYPE_UNSPECIFIED = 0; + /** + * The device is a gateway. + * + * Generated from protobuf enum GATEWAY = 1; + */ + const GATEWAY = 1; + /** + * The device is not a gateway. + * + * Generated from protobuf enum NON_GATEWAY = 2; + */ + const NON_GATEWAY = 2; + + private static $valueToName = [ + self::GATEWAY_TYPE_UNSPECIFIED => 'GATEWAY_TYPE_UNSPECIFIED', + self::GATEWAY => 'GATEWAY', + self::NON_GATEWAY => 'NON_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); + } +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRegistryRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRegistryRequest.php new file mode 100644 index 000000000000..f951e10ce054 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRegistryRequest.php @@ -0,0 +1,71 @@ +google.cloud.iot.v1.GetDeviceRegistryRequest + */ +class GetDeviceRegistryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * 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 name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated 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 device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRequest.php new file mode 100644 index 000000000000..ac34ea9f0c92 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRequest.php @@ -0,0 +1,127 @@ +google.cloud.iot.v1.GetDeviceRequest + */ +class GetDeviceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The fields of the `Device` resource to be returned in the response. If the + * field mask is unset or empty, all fields are returned. Fields have to be + * provided in snake_case format, for example: `last_heartbeat_time`. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 2; + */ + protected $field_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @type \Google\Protobuf\FieldMask $field_mask + * The fields of the `Device` resource to be returned in the response. If the + * field mask is unset or empty, all fields are returned. Fields have to be + * provided in snake_case format, for example: `last_heartbeat_time`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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; + } + + /** + * The fields of the `Device` resource to be returned in the response. If the + * field mask is unset or empty, all fields are returned. Fields have to be + * provided in snake_case format, for example: `last_heartbeat_time`. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getFieldMask() + { + return $this->field_mask; + } + + public function hasFieldMask() + { + return isset($this->field_mask); + } + + public function clearFieldMask() + { + unset($this->field_mask); + } + + /** + * The fields of the `Device` resource to be returned in the response. If the + * field mask is unset or empty, all fields are returned. Fields have to be + * provided in snake_case format, for example: `last_heartbeat_time`. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setFieldMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->field_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpConfig.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpConfig.php new file mode 100644 index 000000000000..dd5bab2c0ced --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpConfig.php @@ -0,0 +1,71 @@ +google.cloud.iot.v1.HttpConfig + */ +class HttpConfig extends \Google\Protobuf\Internal\Message +{ + /** + * If enabled, allows devices to use DeviceService via the HTTP protocol. + * Otherwise, any requests to DeviceService will fail for this registry. + * + * Generated from protobuf field .google.cloud.iot.v1.HttpState http_enabled_state = 1; + */ + protected $http_enabled_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $http_enabled_state + * If enabled, allows devices to use DeviceService via the HTTP protocol. + * Otherwise, any requests to DeviceService will fail for this registry. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * If enabled, allows devices to use DeviceService via the HTTP protocol. + * Otherwise, any requests to DeviceService will fail for this registry. + * + * Generated from protobuf field .google.cloud.iot.v1.HttpState http_enabled_state = 1; + * @return int + */ + public function getHttpEnabledState() + { + return $this->http_enabled_state; + } + + /** + * If enabled, allows devices to use DeviceService via the HTTP protocol. + * Otherwise, any requests to DeviceService will fail for this registry. + * + * Generated from protobuf field .google.cloud.iot.v1.HttpState http_enabled_state = 1; + * @param int $var + * @return $this + */ + public function setHttpEnabledState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\HttpState::class); + $this->http_enabled_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpState.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpState.php new file mode 100644 index 000000000000..1f9675a230cd --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpState.php @@ -0,0 +1,63 @@ +google.cloud.iot.v1.HttpState + */ +class HttpState +{ + /** + * No HTTP state specified. If not specified, DeviceService will be + * enabled by default. + * + * Generated from protobuf enum HTTP_STATE_UNSPECIFIED = 0; + */ + const HTTP_STATE_UNSPECIFIED = 0; + /** + * Enables DeviceService (HTTP) service for the registry. + * + * Generated from protobuf enum HTTP_ENABLED = 1; + */ + const HTTP_ENABLED = 1; + /** + * Disables DeviceService (HTTP) service for the registry. + * + * Generated from protobuf enum HTTP_DISABLED = 2; + */ + const HTTP_DISABLED = 2; + + private static $valueToName = [ + self::HTTP_STATE_UNSPECIFIED => 'HTTP_STATE_UNSPECIFIED', + self::HTTP_ENABLED => 'HTTP_ENABLED', + self::HTTP_DISABLED => 'HTTP_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); + } +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsRequest.php new file mode 100644 index 000000000000..4d839db838ea --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsRequest.php @@ -0,0 +1,117 @@ +google.cloud.iot.v1.ListDeviceConfigVersionsRequest + */ +class ListDeviceConfigVersionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The number of versions to list. Versions are listed in decreasing order of + * the version number. The maximum number of versions retained is 10. If this + * value is zero, it will return all the versions available. + * + * Generated from protobuf field int32 num_versions = 2; + */ + protected $num_versions = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @type int $num_versions + * The number of versions to list. Versions are listed in decreasing order of + * the version number. The maximum number of versions retained is 10. If this + * value is zero, it will return all the versions available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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; + } + + /** + * The number of versions to list. Versions are listed in decreasing order of + * the version number. The maximum number of versions retained is 10. If this + * value is zero, it will return all the versions available. + * + * Generated from protobuf field int32 num_versions = 2; + * @return int + */ + public function getNumVersions() + { + return $this->num_versions; + } + + /** + * The number of versions to list. Versions are listed in decreasing order of + * the version number. The maximum number of versions retained is 10. If this + * value is zero, it will return all the versions available. + * + * Generated from protobuf field int32 num_versions = 2; + * @param int $var + * @return $this + */ + public function setNumVersions($var) + { + GPBUtil::checkInt32($var); + $this->num_versions = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsResponse.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsResponse.php new file mode 100644 index 000000000000..0b5af15a8ba9 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsResponse.php @@ -0,0 +1,71 @@ +google.cloud.iot.v1.ListDeviceConfigVersionsResponse + */ +class ListDeviceConfigVersionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The device configuration for the last few versions. Versions are listed + * in decreasing order, starting from the most recent one. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceConfig device_configs = 1; + */ + private $device_configs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Iot\V1\DeviceConfig>|\Google\Protobuf\Internal\RepeatedField $device_configs + * The device configuration for the last few versions. Versions are listed + * in decreasing order, starting from the most recent one. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * The device configuration for the last few versions. Versions are listed + * in decreasing order, starting from the most recent one. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceConfig device_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeviceConfigs() + { + return $this->device_configs; + } + + /** + * The device configuration for the last few versions. Versions are listed + * in decreasing order, starting from the most recent one. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceConfig device_configs = 1; + * @param array<\Google\Cloud\Iot\V1\DeviceConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeviceConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\DeviceConfig::class); + $this->device_configs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesRequest.php new file mode 100644 index 000000000000..b5df1c07d235 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesRequest.php @@ -0,0 +1,159 @@ +google.cloud.iot.v1.ListDeviceRegistriesRequest + */ +class ListDeviceRegistriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * @type int $page_size + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @type string $page_token + * The value returned by the last `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * + * Generated 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 cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of registries to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * + * 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 `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * 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 `ListDeviceRegistriesResponse`; indicates + * that this is a continuation of a prior `ListDeviceRegistries` call and + * 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/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesResponse.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesResponse.php new file mode 100644 index 000000000000..ffe6315fe9e3 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesResponse.php @@ -0,0 +1,109 @@ +google.cloud.iot.v1.ListDeviceRegistriesResponse + */ +class ListDeviceRegistriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The registries that matched the query. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1; + */ + private $device_registries; + /** + * If not empty, indicates that there may be more registries that match the + * request; this value should be passed in a new + * `ListDeviceRegistriesRequest`. + * + * 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\Iot\V1\DeviceRegistry>|\Google\Protobuf\Internal\RepeatedField $device_registries + * The registries that matched the query. + * @type string $next_page_token + * If not empty, indicates that there may be more registries that match the + * request; this value should be passed in a new + * `ListDeviceRegistriesRequest`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * The registries that matched the query. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeviceRegistries() + { + return $this->device_registries; + } + + /** + * The registries that matched the query. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1; + * @param array<\Google\Cloud\Iot\V1\DeviceRegistry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeviceRegistries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\DeviceRegistry::class); + $this->device_registries = $arr; + + return $this; + } + + /** + * If not empty, indicates that there may be more registries that match the + * request; this value should be passed in a new + * `ListDeviceRegistriesRequest`. + * + * 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 registries that match the + * request; this value should be passed in a new + * `ListDeviceRegistriesRequest`. + * + * 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/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesRequest.php new file mode 100644 index 000000000000..e0287af6f36d --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesRequest.php @@ -0,0 +1,117 @@ +google.cloud.iot.v1.ListDeviceStatesRequest + */ +class ListDeviceStatesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The number of states to list. States are listed in descending order of + * update time. The maximum number of states retained is 10. If this + * value is zero, it will return all the states available. + * + * Generated from protobuf field int32 num_states = 2; + */ + protected $num_states = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @type int $num_states + * The number of states to list. States are listed in descending order of + * update time. The maximum number of states retained is 10. If this + * value is zero, it will return all the states available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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; + } + + /** + * The number of states to list. States are listed in descending order of + * update time. The maximum number of states retained is 10. If this + * value is zero, it will return all the states available. + * + * Generated from protobuf field int32 num_states = 2; + * @return int + */ + public function getNumStates() + { + return $this->num_states; + } + + /** + * The number of states to list. States are listed in descending order of + * update time. The maximum number of states retained is 10. If this + * value is zero, it will return all the states available. + * + * Generated from protobuf field int32 num_states = 2; + * @param int $var + * @return $this + */ + public function setNumStates($var) + { + GPBUtil::checkInt32($var); + $this->num_states = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesResponse.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesResponse.php new file mode 100644 index 000000000000..8960e230f8a1 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesResponse.php @@ -0,0 +1,71 @@ +google.cloud.iot.v1.ListDeviceStatesResponse + */ +class ListDeviceStatesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The last few device states. States are listed in descending order of server + * update time, starting from the most recent one. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceState device_states = 1; + */ + private $device_states; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Iot\V1\DeviceState>|\Google\Protobuf\Internal\RepeatedField $device_states + * The last few device states. States are listed in descending order of server + * update time, starting from the most recent one. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * The last few device states. States are listed in descending order of server + * update time, starting from the most recent one. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceState device_states = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeviceStates() + { + return $this->device_states; + } + + /** + * The last few device states. States are listed in descending order of server + * update time, starting from the most recent one. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceState device_states = 1; + * @param array<\Google\Cloud\Iot\V1\DeviceState>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeviceStates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\DeviceState::class); + $this->device_states = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesRequest.php new file mode 100644 index 000000000000..74714d826d08 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesRequest.php @@ -0,0 +1,335 @@ +google.cloud.iot.v1.ListDevicesRequest + */ +class ListDevicesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. + * + * Generated from protobuf field repeated uint64 device_num_ids = 2; + */ + private $device_num_ids; + /** + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 + * + * Generated from protobuf field repeated string device_ids = 3; + */ + private $device_ids; + /** + * The fields of the `Device` resource to be returned in the response. The + * fields `id` and `num_id` are always returned, along with any + * other fields specified in snake_case format, for example: + * `last_heartbeat_time`. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 4; + */ + protected $field_mask = null; + /** + * Options related to gateways. + * + * Generated from protobuf field .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6; + */ + protected $gateway_list_options = null; + /** + * The maximum number of devices to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * + * Generated from protobuf field int32 page_size = 100; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListDevicesResponse`; indicates + * that this is a continuation of a prior `ListDevices` call and + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 101; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * @type array|array|\Google\Protobuf\Internal\RepeatedField $device_num_ids + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. + * @type array|\Google\Protobuf\Internal\RepeatedField $device_ids + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 + * @type \Google\Protobuf\FieldMask $field_mask + * The fields of the `Device` resource to be returned in the response. The + * fields `id` and `num_id` are always returned, along with any + * other fields specified in snake_case format, for example: + * `last_heartbeat_time`. + * @type \Google\Cloud\Iot\V1\GatewayListOptions $gateway_list_options + * Options related to gateways. + * @type int $page_size + * The maximum number of devices to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @type string $page_token + * The value returned by the last `ListDevicesResponse`; indicates + * that this is a continuation of a prior `ListDevices` call and + * the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * + * Generated 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 device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. + * + * Generated from protobuf field repeated uint64 device_num_ids = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeviceNumIds() + { + return $this->device_num_ids; + } + + /** + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. + * + * Generated from protobuf field repeated uint64 device_num_ids = 2; + * @param array|array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeviceNumIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT64); + $this->device_num_ids = $arr; + + return $this; + } + + /** + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 + * + * Generated from protobuf field repeated string device_ids = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeviceIds() + { + return $this->device_ids; + } + + /** + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 + * + * Generated from protobuf field repeated string device_ids = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeviceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->device_ids = $arr; + + return $this; + } + + /** + * The fields of the `Device` resource to be returned in the response. The + * fields `id` and `num_id` are always returned, along with any + * other fields specified in snake_case format, for example: + * `last_heartbeat_time`. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 4; + * @return \Google\Protobuf\FieldMask|null + */ + public function getFieldMask() + { + return $this->field_mask; + } + + public function hasFieldMask() + { + return isset($this->field_mask); + } + + public function clearFieldMask() + { + unset($this->field_mask); + } + + /** + * The fields of the `Device` resource to be returned in the response. The + * fields `id` and `num_id` are always returned, along with any + * other fields specified in snake_case format, for example: + * `last_heartbeat_time`. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 4; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setFieldMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->field_mask = $var; + + return $this; + } + + /** + * Options related to gateways. + * + * Generated from protobuf field .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6; + * @return \Google\Cloud\Iot\V1\GatewayListOptions|null + */ + public function getGatewayListOptions() + { + return $this->gateway_list_options; + } + + public function hasGatewayListOptions() + { + return isset($this->gateway_list_options); + } + + public function clearGatewayListOptions() + { + unset($this->gateway_list_options); + } + + /** + * Options related to gateways. + * + * Generated from protobuf field .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6; + * @param \Google\Cloud\Iot\V1\GatewayListOptions $var + * @return $this + */ + public function setGatewayListOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\GatewayListOptions::class); + $this->gateway_list_options = $var; + + return $this; + } + + /** + * The maximum number of devices to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * + * Generated from protobuf field int32 page_size = 100; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of devices to return in the response. If this value + * is zero, the service will select a default size. A call may return fewer + * objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * + * Generated from protobuf field int32 page_size = 100; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListDevicesResponse`; indicates + * that this is a continuation of a prior `ListDevices` call and + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 101; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListDevicesResponse`; indicates + * that this is a continuation of a prior `ListDevices` call and + * the system should return the next page of data. + * + * Generated from protobuf field string page_token = 101; + * @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/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesResponse.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesResponse.php new file mode 100644 index 000000000000..18919ee82b01 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesResponse.php @@ -0,0 +1,105 @@ +google.cloud.iot.v1.ListDevicesResponse + */ +class ListDevicesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The devices that match the request. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.Device devices = 1; + */ + private $devices; + /** + * If not empty, indicates that there may be more devices that match the + * request; this value should be passed in a new `ListDevicesRequest`. + * + * 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\Iot\V1\Device>|\Google\Protobuf\Internal\RepeatedField $devices + * The devices that match the request. + * @type string $next_page_token + * If not empty, indicates that there may be more devices that match the + * request; this value should be passed in a new `ListDevicesRequest`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * The devices that match the request. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.Device devices = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDevices() + { + return $this->devices; + } + + /** + * The devices that match the request. + * + * Generated from protobuf field repeated .google.cloud.iot.v1.Device devices = 1; + * @param array<\Google\Cloud\Iot\V1\Device>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDevices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\Device::class); + $this->devices = $arr; + + return $this; + } + + /** + * If not empty, indicates that there may be more devices that match the + * request; this value should be passed in a new `ListDevicesRequest`. + * + * 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 devices that match the + * request; this value should be passed in a new `ListDevicesRequest`. + * + * 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/Iot/v1/proto/src/Google/Cloud/Iot/V1/LogLevel.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/LogLevel.php new file mode 100644 index 000000000000..ba660f850b50 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/LogLevel.php @@ -0,0 +1,80 @@ +google.cloud.iot.v1.LogLevel + */ +class LogLevel +{ + /** + * No logging specified. If not specified, logging will be disabled. + * + * Generated from protobuf enum LOG_LEVEL_UNSPECIFIED = 0; + */ + const LOG_LEVEL_UNSPECIFIED = 0; + /** + * Disables logging. + * + * Generated from protobuf enum NONE = 10; + */ + const NONE = 10; + /** + * Error events will be logged. + * + * Generated from protobuf enum ERROR = 20; + */ + const ERROR = 20; + /** + * Informational events will be logged, such as connections and + * disconnections. + * + * Generated from protobuf enum INFO = 30; + */ + const INFO = 30; + /** + * All events will be logged. + * + * Generated from protobuf enum DEBUG = 40; + */ + const DEBUG = 40; + + private static $valueToName = [ + self::LOG_LEVEL_UNSPECIFIED => 'LOG_LEVEL_UNSPECIFIED', + self::NONE => 'NONE', + self::ERROR => 'ERROR', + self::INFO => 'INFO', + self::DEBUG => 'DEBUG', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Iot/v1/proto/src/Google/Cloud/Iot/V1/ModifyCloudToDeviceConfigRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ModifyCloudToDeviceConfigRequest.php new file mode 100644 index 000000000000..f9b87692e059 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ModifyCloudToDeviceConfigRequest.php @@ -0,0 +1,159 @@ +google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest + */ +class ModifyCloudToDeviceConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The version number to update. If this value is zero, it will not check the + * version number of the server and will always update the current version; + * otherwise, this update will fail if the version number found on the server + * does not match this version number. This is used to support multiple + * simultaneous updates without losing data. + * + * Generated from protobuf field int64 version_to_update = 2; + */ + protected $version_to_update = 0; + /** + * Required. The configuration data for the device. + * + * Generated from protobuf field bytes binary_data = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $binary_data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @type int|string $version_to_update + * The version number to update. If this value is zero, it will not check the + * version number of the server and will always update the current version; + * otherwise, this update will fail if the version number found on the server + * does not match this version number. This is used to support multiple + * simultaneous updates without losing data. + * @type string $binary_data + * Required. The configuration data for the device. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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; + } + + /** + * The version number to update. If this value is zero, it will not check the + * version number of the server and will always update the current version; + * otherwise, this update will fail if the version number found on the server + * does not match this version number. This is used to support multiple + * simultaneous updates without losing data. + * + * Generated from protobuf field int64 version_to_update = 2; + * @return int|string + */ + public function getVersionToUpdate() + { + return $this->version_to_update; + } + + /** + * The version number to update. If this value is zero, it will not check the + * version number of the server and will always update the current version; + * otherwise, this update will fail if the version number found on the server + * does not match this version number. This is used to support multiple + * simultaneous updates without losing data. + * + * Generated from protobuf field int64 version_to_update = 2; + * @param int|string $var + * @return $this + */ + public function setVersionToUpdate($var) + { + GPBUtil::checkInt64($var); + $this->version_to_update = $var; + + return $this; + } + + /** + * Required. The configuration data for the device. + * + * Generated from protobuf field bytes binary_data = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBinaryData() + { + return $this->binary_data; + } + + /** + * Required. The configuration data for the device. + * + * Generated from protobuf field bytes binary_data = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBinaryData($var) + { + GPBUtil::checkString($var, False); + $this->binary_data = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttConfig.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttConfig.php new file mode 100644 index 000000000000..77e319da0575 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttConfig.php @@ -0,0 +1,71 @@ +google.cloud.iot.v1.MqttConfig + */ +class MqttConfig extends \Google\Protobuf\Internal\Message +{ + /** + * If enabled, allows connections using the MQTT protocol. Otherwise, MQTT + * connections to this registry will fail. + * + * Generated from protobuf field .google.cloud.iot.v1.MqttState mqtt_enabled_state = 1; + */ + protected $mqtt_enabled_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $mqtt_enabled_state + * If enabled, allows connections using the MQTT protocol. Otherwise, MQTT + * connections to this registry will fail. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * If enabled, allows connections using the MQTT protocol. Otherwise, MQTT + * connections to this registry will fail. + * + * Generated from protobuf field .google.cloud.iot.v1.MqttState mqtt_enabled_state = 1; + * @return int + */ + public function getMqttEnabledState() + { + return $this->mqtt_enabled_state; + } + + /** + * If enabled, allows connections using the MQTT protocol. Otherwise, MQTT + * connections to this registry will fail. + * + * Generated from protobuf field .google.cloud.iot.v1.MqttState mqtt_enabled_state = 1; + * @param int $var + * @return $this + */ + public function setMqttEnabledState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\MqttState::class); + $this->mqtt_enabled_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttState.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttState.php new file mode 100644 index 000000000000..d0e96136e694 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttState.php @@ -0,0 +1,62 @@ +google.cloud.iot.v1.MqttState + */ +class MqttState +{ + /** + * No MQTT state specified. If not specified, MQTT will be enabled by default. + * + * Generated from protobuf enum MQTT_STATE_UNSPECIFIED = 0; + */ + const MQTT_STATE_UNSPECIFIED = 0; + /** + * Enables a MQTT connection. + * + * Generated from protobuf enum MQTT_ENABLED = 1; + */ + const MQTT_ENABLED = 1; + /** + * Disables a MQTT connection. + * + * Generated from protobuf enum MQTT_DISABLED = 2; + */ + const MQTT_DISABLED = 2; + + private static $valueToName = [ + self::MQTT_STATE_UNSPECIFIED => 'MQTT_STATE_UNSPECIFIED', + self::MQTT_ENABLED => 'MQTT_ENABLED', + self::MQTT_DISABLED => 'MQTT_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); + } +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificate.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificate.php new file mode 100644 index 000000000000..076df9f09890 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificate.php @@ -0,0 +1,145 @@ +google.cloud.iot.v1.PublicKeyCertificate + */ +class PublicKeyCertificate extends \Google\Protobuf\Internal\Message +{ + /** + * The certificate format. + * + * Generated from protobuf field .google.cloud.iot.v1.PublicKeyCertificateFormat format = 1; + */ + protected $format = 0; + /** + * The certificate data. + * + * Generated from protobuf field string certificate = 2; + */ + protected $certificate = ''; + /** + * [Output only] The certificate details. Used only for X.509 certificates. + * + * Generated from protobuf field .google.cloud.iot.v1.X509CertificateDetails x509_details = 3; + */ + protected $x509_details = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $format + * The certificate format. + * @type string $certificate + * The certificate data. + * @type \Google\Cloud\Iot\V1\X509CertificateDetails $x509_details + * [Output only] The certificate details. Used only for X.509 certificates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The certificate format. + * + * Generated from protobuf field .google.cloud.iot.v1.PublicKeyCertificateFormat format = 1; + * @return int + */ + public function getFormat() + { + return $this->format; + } + + /** + * The certificate format. + * + * Generated from protobuf field .google.cloud.iot.v1.PublicKeyCertificateFormat format = 1; + * @param int $var + * @return $this + */ + public function setFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\PublicKeyCertificateFormat::class); + $this->format = $var; + + return $this; + } + + /** + * The certificate data. + * + * Generated from protobuf field string certificate = 2; + * @return string + */ + public function getCertificate() + { + return $this->certificate; + } + + /** + * The certificate data. + * + * Generated from protobuf field string certificate = 2; + * @param string $var + * @return $this + */ + public function setCertificate($var) + { + GPBUtil::checkString($var, True); + $this->certificate = $var; + + return $this; + } + + /** + * [Output only] The certificate details. Used only for X.509 certificates. + * + * Generated from protobuf field .google.cloud.iot.v1.X509CertificateDetails x509_details = 3; + * @return \Google\Cloud\Iot\V1\X509CertificateDetails|null + */ + public function getX509Details() + { + return $this->x509_details; + } + + public function hasX509Details() + { + return isset($this->x509_details); + } + + public function clearX509Details() + { + unset($this->x509_details); + } + + /** + * [Output only] The certificate details. Used only for X.509 certificates. + * + * Generated from protobuf field .google.cloud.iot.v1.X509CertificateDetails x509_details = 3; + * @param \Google\Cloud\Iot\V1\X509CertificateDetails $var + * @return $this + */ + public function setX509Details($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\X509CertificateDetails::class); + $this->x509_details = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificateFormat.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificateFormat.php new file mode 100644 index 000000000000..6b0997a00116 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificateFormat.php @@ -0,0 +1,57 @@ +google.cloud.iot.v1.PublicKeyCertificateFormat + */ +class PublicKeyCertificateFormat +{ + /** + * The format has not been specified. This is an invalid default value and + * must not be used. + * + * Generated from protobuf enum UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0; + */ + const UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0; + /** + * An X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)), + * encoded in base64, and wrapped by `-----BEGIN CERTIFICATE-----` and + * `-----END CERTIFICATE-----`. + * + * Generated from protobuf enum X509_CERTIFICATE_PEM = 1; + */ + const X509_CERTIFICATE_PEM = 1; + + private static $valueToName = [ + self::UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT => 'UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT', + self::X509_CERTIFICATE_PEM => 'X509_CERTIFICATE_PEM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCredential.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCredential.php new file mode 100644 index 000000000000..b0f2278b40bf --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCredential.php @@ -0,0 +1,101 @@ +google.cloud.iot.v1.PublicKeyCredential + */ +class PublicKeyCredential extends \Google\Protobuf\Internal\Message +{ + /** + * The format of the key. + * + * Generated from protobuf field .google.cloud.iot.v1.PublicKeyFormat format = 1; + */ + protected $format = 0; + /** + * The key data. + * + * Generated from protobuf field string key = 2; + */ + protected $key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $format + * The format of the key. + * @type string $key + * The key data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The format of the key. + * + * Generated from protobuf field .google.cloud.iot.v1.PublicKeyFormat format = 1; + * @return int + */ + public function getFormat() + { + return $this->format; + } + + /** + * The format of the key. + * + * Generated from protobuf field .google.cloud.iot.v1.PublicKeyFormat format = 1; + * @param int $var + * @return $this + */ + public function setFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\PublicKeyFormat::class); + $this->format = $var; + + return $this; + } + + /** + * The key data. + * + * Generated from protobuf field string key = 2; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The key data. + * + * Generated from protobuf field string key = 2; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyFormat.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyFormat.php new file mode 100644 index 000000000000..9efc28aae15e --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyFormat.php @@ -0,0 +1,87 @@ +google.cloud.iot.v1.PublicKeyFormat + */ +class PublicKeyFormat +{ + /** + * The format has not been specified. This is an invalid default value and + * must not be used. + * + * Generated from protobuf enum UNSPECIFIED_PUBLIC_KEY_FORMAT = 0; + */ + const UNSPECIFIED_PUBLIC_KEY_FORMAT = 0; + /** + * An RSA public key encoded in base64, and wrapped by + * `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`. This can be + * used to verify `RS256` signatures in JWT tokens ([RFC7518]( + * https://www.ietf.org/rfc/rfc7518.txt)). + * + * Generated from protobuf enum RSA_PEM = 3; + */ + const RSA_PEM = 3; + /** + * As RSA_PEM, but wrapped in an X.509v3 certificate ([RFC5280]( + * https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by + * `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. + * + * Generated from protobuf enum RSA_X509_PEM = 1; + */ + const RSA_X509_PEM = 1; + /** + * Public key for the ECDSA algorithm using P-256 and SHA-256, encoded in + * base64, and wrapped by `-----BEGIN PUBLIC KEY-----` and `-----END + * PUBLIC KEY-----`. This can be used to verify JWT tokens with the `ES256` + * algorithm ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)). This curve is + * defined in [OpenSSL](https://www.openssl.org/) as the `prime256v1` curve. + * + * Generated from protobuf enum ES256_PEM = 2; + */ + const ES256_PEM = 2; + /** + * As ES256_PEM, but wrapped in an X.509v3 certificate ([RFC5280]( + * https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by + * `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. + * + * Generated from protobuf enum ES256_X509_PEM = 4; + */ + const ES256_X509_PEM = 4; + + private static $valueToName = [ + self::UNSPECIFIED_PUBLIC_KEY_FORMAT => 'UNSPECIFIED_PUBLIC_KEY_FORMAT', + self::RSA_PEM => 'RSA_PEM', + self::RSA_X509_PEM => 'RSA_X509_PEM', + self::ES256_PEM => 'ES256_PEM', + self::ES256_X509_PEM => 'ES256_X509_PEM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Iot/v1/proto/src/Google/Cloud/Iot/V1/RegistryCredential.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/RegistryCredential.php new file mode 100644 index 000000000000..e39561765d0d --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/RegistryCredential.php @@ -0,0 +1,75 @@ +google.cloud.iot.v1.RegistryCredential + */ +class RegistryCredential extends \Google\Protobuf\Internal\Message +{ + protected $credential; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Iot\V1\PublicKeyCertificate $public_key_certificate + * A public key certificate used to verify the device credentials. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A public key certificate used to verify the device credentials. + * + * Generated from protobuf field .google.cloud.iot.v1.PublicKeyCertificate public_key_certificate = 1; + * @return \Google\Cloud\Iot\V1\PublicKeyCertificate|null + */ + public function getPublicKeyCertificate() + { + return $this->readOneof(1); + } + + public function hasPublicKeyCertificate() + { + return $this->hasOneof(1); + } + + /** + * A public key certificate used to verify the device credentials. + * + * Generated from protobuf field .google.cloud.iot.v1.PublicKeyCertificate public_key_certificate = 1; + * @param \Google\Cloud\Iot\V1\PublicKeyCertificate $var + * @return $this + */ + public function setPublicKeyCertificate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\PublicKeyCertificate::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getCredential() + { + return $this->whichOneof("credential"); + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceRequest.php new file mode 100644 index 000000000000..f00ff670f653 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceRequest.php @@ -0,0 +1,159 @@ +google.cloud.iot.v1.SendCommandToDeviceRequest + */ +class SendCommandToDeviceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The command data to send to the device. + * + * Generated from protobuf field bytes binary_data = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $binary_data = ''; + /** + * Optional subfolder for the command. If empty, the command will be delivered + * to the /devices/{device-id}/commands topic, otherwise it will be delivered + * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level + * subfolders are allowed. This field must not have more than 256 characters, + * and must not contain any MQTT wildcards ("+" or "#") or null characters. + * + * Generated from protobuf field string subfolder = 3; + */ + protected $subfolder = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @type string $binary_data + * Required. The command data to send to the device. + * @type string $subfolder + * Optional subfolder for the command. If empty, the command will be delivered + * to the /devices/{device-id}/commands topic, otherwise it will be delivered + * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level + * subfolders are allowed. This field must not have more than 256 characters, + * and must not contain any MQTT wildcards ("+" or "#") or null characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 command data to send to the device. + * + * Generated from protobuf field bytes binary_data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBinaryData() + { + return $this->binary_data; + } + + /** + * Required. The command data to send to the device. + * + * Generated from protobuf field bytes binary_data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBinaryData($var) + { + GPBUtil::checkString($var, False); + $this->binary_data = $var; + + return $this; + } + + /** + * Optional subfolder for the command. If empty, the command will be delivered + * to the /devices/{device-id}/commands topic, otherwise it will be delivered + * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level + * subfolders are allowed. This field must not have more than 256 characters, + * and must not contain any MQTT wildcards ("+" or "#") or null characters. + * + * Generated from protobuf field string subfolder = 3; + * @return string + */ + public function getSubfolder() + { + return $this->subfolder; + } + + /** + * Optional subfolder for the command. If empty, the command will be delivered + * to the /devices/{device-id}/commands topic, otherwise it will be delivered + * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level + * subfolders are allowed. This field must not have more than 256 characters, + * and must not contain any MQTT wildcards ("+" or "#") or null characters. + * + * Generated from protobuf field string subfolder = 3; + * @param string $var + * @return $this + */ + public function setSubfolder($var) + { + GPBUtil::checkString($var, True); + $this->subfolder = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceResponse.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceResponse.php new file mode 100644 index 000000000000..b1fb3cdc77d2 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceResponse.php @@ -0,0 +1,33 @@ +google.cloud.iot.v1.SendCommandToDeviceResponse + */ +class SendCommandToDeviceResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/StateNotificationConfig.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/StateNotificationConfig.php new file mode 100644 index 000000000000..11d23dc3089d --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/StateNotificationConfig.php @@ -0,0 +1,71 @@ +google.cloud.iot.v1.StateNotificationConfig + */ +class StateNotificationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * A Cloud Pub/Sub topic name. For example, + * `projects/myProject/topics/deviceEvents`. + * + * Generated from protobuf field string pubsub_topic_name = 1; + */ + protected $pubsub_topic_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pubsub_topic_name + * A Cloud Pub/Sub topic name. For example, + * `projects/myProject/topics/deviceEvents`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A Cloud Pub/Sub topic name. For example, + * `projects/myProject/topics/deviceEvents`. + * + * Generated from protobuf field string pubsub_topic_name = 1; + * @return string + */ + public function getPubsubTopicName() + { + return $this->pubsub_topic_name; + } + + /** + * A Cloud Pub/Sub topic name. For example, + * `projects/myProject/topics/deviceEvents`. + * + * Generated from protobuf field string pubsub_topic_name = 1; + * @param string $var + * @return $this + */ + public function setPubsubTopicName($var) + { + GPBUtil::checkString($var, True); + $this->pubsub_topic_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayRequest.php new file mode 100644 index 000000000000..a06e4442b852 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayRequest.php @@ -0,0 +1,151 @@ +google.cloud.iot.v1.UnbindDeviceFromGatewayRequest + */ +class UnbindDeviceFromGatewayRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * + * Generated from protobuf field string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $gateway_id = ''; + /** + * Required. The device to disassociate from the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * + * Generated from protobuf field string device_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $device_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @type string $gateway_id + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * @type string $device_id + * Required. The device to disassociate from the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated 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 registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * + * Generated from protobuf field string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGatewayId() + { + return $this->gateway_id; + } + + /** + * Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * + * 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. The device to disassociate from the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * + * Generated from protobuf field string device_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDeviceId() + { + return $this->device_id; + } + + /** + * Required. The device to disassociate from the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * + * Generated from protobuf field string device_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDeviceId($var) + { + GPBUtil::checkString($var, True); + $this->device_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayResponse.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayResponse.php new file mode 100644 index 000000000000..9e4c75085e7c --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayResponse.php @@ -0,0 +1,33 @@ +google.cloud.iot.v1.UnbindDeviceFromGatewayResponse + */ +class UnbindDeviceFromGatewayResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRegistryRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRegistryRequest.php new file mode 100644 index 000000000000..31c338e3ea52 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRegistryRequest.php @@ -0,0 +1,145 @@ +google.cloud.iot.v1.UpdateDeviceRegistryRequest + */ +class UpdateDeviceRegistryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The new values for the device registry. The `id` field must be empty, and + * the `name` field must indicate the path of the resource. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated from protobuf field .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $device_registry = null; + /** + * Required. Only updates the `device_registry` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `event_notification_config`, `http_config`, + * `mqtt_config`, and `state_notification_config`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Iot\V1\DeviceRegistry $device_registry + * Required. The new values for the device registry. The `id` field must be empty, and + * the `name` field must indicate the path of the resource. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Only updates the `device_registry` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `event_notification_config`, `http_config`, + * `mqtt_config`, and `state_notification_config`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The new values for the device registry. The `id` field must be empty, and + * the `name` field must indicate the path of the resource. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated from protobuf field .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Iot\V1\DeviceRegistry|null + */ + public function getDeviceRegistry() + { + return $this->device_registry; + } + + public function hasDeviceRegistry() + { + return isset($this->device_registry); + } + + public function clearDeviceRegistry() + { + unset($this->device_registry); + } + + /** + * Required. The new values for the device registry. The `id` field must be empty, and + * the `name` field must indicate the path of the resource. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * + * Generated from protobuf field .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Iot\V1\DeviceRegistry $var + * @return $this + */ + public function setDeviceRegistry($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\DeviceRegistry::class); + $this->device_registry = $var; + + return $this; + } + + /** + * Required. Only updates the `device_registry` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `event_notification_config`, `http_config`, + * `mqtt_config`, and `state_notification_config`. + * + * 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. Only updates the `device_registry` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `event_notification_config`, `http_config`, + * `mqtt_config`, and `state_notification_config`. + * + * 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/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRequest.php new file mode 100644 index 000000000000..4fe45b6f2f94 --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRequest.php @@ -0,0 +1,145 @@ +google.cloud.iot.v1.UpdateDeviceRequest + */ +class UpdateDeviceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The new values for the device. The `id` and `num_id` fields must + * be empty, and the field `name` must specify the name path. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * Generated from protobuf field .google.cloud.iot.v1.Device device = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $device = null; + /** + * Required. Only updates the `device` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `credentials`, `blocked`, and `metadata` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Iot\V1\Device $device + * Required. The new values for the device. The `id` and `num_id` fields must + * be empty, and the field `name` must specify the name path. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Only updates the `device` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `credentials`, `blocked`, and `metadata` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The new values for the device. The `id` and `num_id` fields must + * be empty, and the field `name` must specify the name path. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * Generated from protobuf field .google.cloud.iot.v1.Device device = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Iot\V1\Device|null + */ + public function getDevice() + { + return $this->device; + } + + public function hasDevice() + { + return isset($this->device); + } + + public function clearDevice() + { + unset($this->device); + } + + /** + * Required. The new values for the device. The `id` and `num_id` fields must + * be empty, and the field `name` must specify the name path. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * + * Generated from protobuf field .google.cloud.iot.v1.Device device = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Iot\V1\Device $var + * @return $this + */ + public function setDevice($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\Device::class); + $this->device = $var; + + return $this; + } + + /** + * Required. Only updates the `device` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `credentials`, `blocked`, and `metadata` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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. Only updates the `device` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `credentials`, `blocked`, and `metadata` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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/Iot/v1/proto/src/Google/Cloud/Iot/V1/X509CertificateDetails.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/X509CertificateDetails.php new file mode 100644 index 000000000000..0e90598af0bc --- /dev/null +++ b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/X509CertificateDetails.php @@ -0,0 +1,257 @@ +google.cloud.iot.v1.X509CertificateDetails + */ +class X509CertificateDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The entity that signed the certificate. + * + * Generated from protobuf field string issuer = 1; + */ + protected $issuer = ''; + /** + * The entity the certificate and public key belong to. + * + * Generated from protobuf field string subject = 2; + */ + protected $subject = ''; + /** + * The time the certificate becomes valid. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + */ + protected $start_time = null; + /** + * The time the certificate becomes invalid. + * + * Generated from protobuf field .google.protobuf.Timestamp expiry_time = 4; + */ + protected $expiry_time = null; + /** + * The algorithm used to sign the certificate. + * + * Generated from protobuf field string signature_algorithm = 5; + */ + protected $signature_algorithm = ''; + /** + * The type of public key in the certificate. + * + * Generated from protobuf field string public_key_type = 6; + */ + protected $public_key_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $issuer + * The entity that signed the certificate. + * @type string $subject + * The entity the certificate and public key belong to. + * @type \Google\Protobuf\Timestamp $start_time + * The time the certificate becomes valid. + * @type \Google\Protobuf\Timestamp $expiry_time + * The time the certificate becomes invalid. + * @type string $signature_algorithm + * The algorithm used to sign the certificate. + * @type string $public_key_type + * The type of public key in the certificate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The entity that signed the certificate. + * + * Generated from protobuf field string issuer = 1; + * @return string + */ + public function getIssuer() + { + return $this->issuer; + } + + /** + * The entity that signed the certificate. + * + * Generated from protobuf field string issuer = 1; + * @param string $var + * @return $this + */ + public function setIssuer($var) + { + GPBUtil::checkString($var, True); + $this->issuer = $var; + + return $this; + } + + /** + * The entity the certificate and public key belong to. + * + * Generated from protobuf field string subject = 2; + * @return string + */ + public function getSubject() + { + return $this->subject; + } + + /** + * The entity the certificate and public key belong to. + * + * Generated from protobuf field string subject = 2; + * @param string $var + * @return $this + */ + public function setSubject($var) + { + GPBUtil::checkString($var, True); + $this->subject = $var; + + return $this; + } + + /** + * The time the certificate becomes valid. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @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 time the certificate becomes valid. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @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 time the certificate becomes invalid. + * + * Generated from protobuf field .google.protobuf.Timestamp expiry_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpiryTime() + { + return $this->expiry_time; + } + + public function hasExpiryTime() + { + return isset($this->expiry_time); + } + + public function clearExpiryTime() + { + unset($this->expiry_time); + } + + /** + * The time the certificate becomes invalid. + * + * Generated from protobuf field .google.protobuf.Timestamp expiry_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpiryTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expiry_time = $var; + + return $this; + } + + /** + * The algorithm used to sign the certificate. + * + * Generated from protobuf field string signature_algorithm = 5; + * @return string + */ + public function getSignatureAlgorithm() + { + return $this->signature_algorithm; + } + + /** + * The algorithm used to sign the certificate. + * + * Generated from protobuf field string signature_algorithm = 5; + * @param string $var + * @return $this + */ + public function setSignatureAlgorithm($var) + { + GPBUtil::checkString($var, True); + $this->signature_algorithm = $var; + + return $this; + } + + /** + * The type of public key in the certificate. + * + * Generated from protobuf field string public_key_type = 6; + * @return string + */ + public function getPublicKeyType() + { + return $this->public_key_type; + } + + /** + * The type of public key in the certificate. + * + * Generated from protobuf field string public_key_type = 6; + * @param string $var + * @return $this + */ + public function setPublicKeyType($var) + { + GPBUtil::checkString($var, True); + $this->public_key_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/bind_device_to_gateway.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/bind_device_to_gateway.php new file mode 100644 index 000000000000..6d4095e3ae72 --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/bind_device_to_gateway.php @@ -0,0 +1,77 @@ +bindDeviceToGateway($formattedParent, $gatewayId, $deviceId); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DeviceManagerClient::registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + $gatewayId = '[GATEWAY_ID]'; + $deviceId = '[DEVICE_ID]'; + + bind_device_to_gateway_sample($formattedParent, $gatewayId, $deviceId); +} +// [END cloudiot_v1_generated_DeviceManager_BindDeviceToGateway_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device.php new file mode 100644 index 000000000000..6ac3170fc068 --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device.php @@ -0,0 +1,71 @@ +createDevice($formattedParent, $device); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DeviceManagerClient::registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + + create_device_sample($formattedParent); +} +// [END cloudiot_v1_generated_DeviceManager_CreateDevice_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device_registry.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device_registry.php new file mode 100644 index 000000000000..c70e74bb3570 --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device_registry.php @@ -0,0 +1,70 @@ +createDeviceRegistry($formattedParent, $deviceRegistry); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DeviceManagerClient::locationName('[PROJECT]', '[LOCATION]'); + + create_device_registry_sample($formattedParent); +} +// [END cloudiot_v1_generated_DeviceManager_CreateDeviceRegistry_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device.php new file mode 100644 index 000000000000..e3539d39de2b --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device.php @@ -0,0 +1,71 @@ +deleteDevice($formattedName); + 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 = DeviceManagerClient::deviceName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); + + delete_device_sample($formattedName); +} +// [END cloudiot_v1_generated_DeviceManager_DeleteDevice_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device_registry.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device_registry.php new file mode 100644 index 000000000000..a5e9ad2212db --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device_registry.php @@ -0,0 +1,65 @@ +deleteDeviceRegistry($formattedName); + 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 = DeviceManagerClient::registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + + delete_device_registry_sample($formattedName); +} +// [END cloudiot_v1_generated_DeviceManager_DeleteDeviceRegistry_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device.php new file mode 100644 index 000000000000..4074a7f01dbc --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device.php @@ -0,0 +1,73 @@ +getDevice($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DeviceManagerClient::deviceName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); + + get_device_sample($formattedName); +} +// [END cloudiot_v1_generated_DeviceManager_GetDevice_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device_registry.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device_registry.php new file mode 100644 index 000000000000..7a7bd09e39ee --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device_registry.php @@ -0,0 +1,67 @@ +getDeviceRegistry($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DeviceManagerClient::registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + + get_device_registry_sample($formattedName); +} +// [END cloudiot_v1_generated_DeviceManager_GetDeviceRegistry_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_iam_policy.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_iam_policy.php new file mode 100644 index 000000000000..7b2b46ed9546 --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_iam_policy.php @@ -0,0 +1,68 @@ +getIamPolicy($resource); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 cloudiot_v1_generated_DeviceManager_GetIamPolicy_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_config_versions.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_config_versions.php new file mode 100644 index 000000000000..994d474bd8bb --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_config_versions.php @@ -0,0 +1,74 @@ +listDeviceConfigVersions($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DeviceManagerClient::deviceName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); + + list_device_config_versions_sample($formattedName); +} +// [END cloudiot_v1_generated_DeviceManager_ListDeviceConfigVersions_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_registries.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_registries.php new file mode 100644 index 000000000000..a4f3f0fe1bac --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_registries.php @@ -0,0 +1,72 @@ +listDeviceRegistries($formattedParent); + + /** @var DeviceRegistry $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 = DeviceManagerClient::locationName('[PROJECT]', '[LOCATION]'); + + list_device_registries_sample($formattedParent); +} +// [END cloudiot_v1_generated_DeviceManager_ListDeviceRegistries_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_states.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_states.php new file mode 100644 index 000000000000..132b447c80bd --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_states.php @@ -0,0 +1,74 @@ +listDeviceStates($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DeviceManagerClient::deviceName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); + + list_device_states_sample($formattedName); +} +// [END cloudiot_v1_generated_DeviceManager_ListDeviceStates_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_devices.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_devices.php new file mode 100644 index 000000000000..67a272357277 --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_devices.php @@ -0,0 +1,72 @@ +listDevices($formattedParent); + + /** @var Device $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 = DeviceManagerClient::registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + + list_devices_sample($formattedParent); +} +// [END cloudiot_v1_generated_DeviceManager_ListDevices_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/modify_cloud_to_device_config.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/modify_cloud_to_device_config.php new file mode 100644 index 000000000000..df21a9a7cfbe --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/modify_cloud_to_device_config.php @@ -0,0 +1,77 @@ +modifyCloudToDeviceConfig($formattedName, $binaryData); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DeviceManagerClient::deviceName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); + $binaryData = '...'; + + modify_cloud_to_device_config_sample($formattedName, $binaryData); +} +// [END cloudiot_v1_generated_DeviceManager_ModifyCloudToDeviceConfig_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/send_command_to_device.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/send_command_to_device.php new file mode 100644 index 000000000000..e57e5dfa9e89 --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/send_command_to_device.php @@ -0,0 +1,87 @@ +sendCommandToDevice($formattedName, $binaryData); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DeviceManagerClient::deviceName( + '[PROJECT]', + '[LOCATION]', + '[REGISTRY]', + '[DEVICE]' + ); + $binaryData = '...'; + + send_command_to_device_sample($formattedName, $binaryData); +} +// [END cloudiot_v1_generated_DeviceManager_SendCommandToDevice_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/set_iam_policy.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/set_iam_policy.php new file mode 100644 index 000000000000..42a0bf60dacd --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/set_iam_policy.php @@ -0,0 +1,70 @@ +setIamPolicy($resource, $policy); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 cloudiot_v1_generated_DeviceManager_SetIamPolicy_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/test_iam_permissions.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/test_iam_permissions.php new file mode 100644 index 000000000000..5b3654ebe1c5 --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/test_iam_permissions.php @@ -0,0 +1,76 @@ +testIamPermissions($resource, $permissions); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 cloudiot_v1_generated_DeviceManager_TestIamPermissions_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/unbind_device_from_gateway.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/unbind_device_from_gateway.php new file mode 100644 index 000000000000..f15be0f4177a --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/unbind_device_from_gateway.php @@ -0,0 +1,77 @@ +unbindDeviceFromGateway($formattedParent, $gatewayId, $deviceId); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DeviceManagerClient::registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + $gatewayId = '[GATEWAY_ID]'; + $deviceId = '[DEVICE_ID]'; + + unbind_device_from_gateway_sample($formattedParent, $gatewayId, $deviceId); +} +// [END cloudiot_v1_generated_DeviceManager_UnbindDeviceFromGateway_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device.php new file mode 100644 index 000000000000..a18c527d4de0 --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device.php @@ -0,0 +1,58 @@ +updateDevice($device, $updateMask); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudiot_v1_generated_DeviceManager_UpdateDevice_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device_registry.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device_registry.php new file mode 100644 index 000000000000..25e217956dfd --- /dev/null +++ b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device_registry.php @@ -0,0 +1,58 @@ +updateDeviceRegistry($deviceRegistry, $updateMask); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudiot_v1_generated_DeviceManager_UpdateDeviceRegistry_sync] diff --git a/owl-bot-staging/Iot/v1/src/V1/DeviceManagerClient.php b/owl-bot-staging/Iot/v1/src/V1/DeviceManagerClient.php new file mode 100644 index 000000000000..f545ce696ad9 --- /dev/null +++ b/owl-bot-staging/Iot/v1/src/V1/DeviceManagerClient.php @@ -0,0 +1,34 @@ +registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * $gatewayId = 'gateway_id'; + * $deviceId = 'device_id'; + * $response = $deviceManagerClient->bindDeviceToGateway($formattedParent, $gatewayId, $deviceId); + * } finally { + * $deviceManagerClient->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. + */ +class DeviceManagerGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.iot.v1.DeviceManager'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'cloudiot.googleapis.com'; + + /** 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/cloudiot', + ]; + + private static $deviceNameTemplate; + + private static $locationNameTemplate; + + private static $registryNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/device_manager_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/device_manager_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/device_manager_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/device_manager_rest_client_config.php', + ], + ], + ]; + } + + private static function getDeviceNameTemplate() + { + if (self::$deviceNameTemplate == null) { + self::$deviceNameTemplate = new PathTemplate('projects/{project}/locations/{location}/registries/{registry}/devices/{device}'); + } + + return self::$deviceNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getRegistryNameTemplate() + { + if (self::$registryNameTemplate == null) { + self::$registryNameTemplate = new PathTemplate('projects/{project}/locations/{location}/registries/{registry}'); + } + + return self::$registryNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'device' => self::getDeviceNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'registry' => self::getRegistryNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a device + * resource. + * + * @param string $project + * @param string $location + * @param string $registry + * @param string $device + * + * @return string The formatted device resource. + */ + public static function deviceName($project, $location, $registry, $device) + { + return self::getDeviceNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'registry' => $registry, + 'device' => $device, + ]); + } + + /** + * 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($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a registry + * resource. + * + * @param string $project + * @param string $location + * @param string $registry + * + * @return string The formatted registry resource. + */ + public static function registryName($project, $location, $registry) + { + return self::getRegistryNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'registry' => $registry, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - device: projects/{project}/locations/{location}/registries/{registry}/devices/{device} + * - location: projects/{project}/locations/{location} + * - registry: projects/{project}/locations/{location}/registries/{registry} + * + * 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 'cloudiot.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); + } + + /** + * Associates the device with the gateway. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $formattedParent = $deviceManagerClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * $gatewayId = 'gateway_id'; + * $deviceId = 'device_id'; + * $response = $deviceManagerClient->bindDeviceToGateway($formattedParent, $gatewayId, $deviceId); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param string $gatewayId Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * @param string $deviceId Required. The device to associate with the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * @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\Iot\V1\BindDeviceToGatewayResponse + * + * @throws ApiException if the remote call fails + */ + public function bindDeviceToGateway($parent, $gatewayId, $deviceId, array $optionalArgs = []) + { + $request = new BindDeviceToGatewayRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setGatewayId($gatewayId); + $request->setDeviceId($deviceId); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('BindDeviceToGateway', BindDeviceToGatewayResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a device in a device registry. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $formattedParent = $deviceManagerClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * $device = new Device(); + * $response = $deviceManagerClient->createDevice($formattedParent, $device); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the device registry where this device should be created. + * For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param Device $device Required. The device registration details. The field `name` must be empty. The server + * generates `name` from the device registry `id` and the + * `parent` field. + * @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\Iot\V1\Device + * + * @throws ApiException if the remote call fails + */ + public function createDevice($parent, $device, array $optionalArgs = []) + { + $request = new CreateDeviceRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setDevice($device); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateDevice', Device::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a device registry that contains devices. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $formattedParent = $deviceManagerClient->locationName('[PROJECT]', '[LOCATION]'); + * $deviceRegistry = new DeviceRegistry(); + * $response = $deviceManagerClient->createDeviceRegistry($formattedParent, $deviceRegistry); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and cloud region where this device registry must be created. + * For example, `projects/example-project/locations/us-central1`. + * @param DeviceRegistry $deviceRegistry Required. The device registry. The field `name` must be empty. The server will + * generate that field from the device registry `id` provided and the + * `parent` field. + * @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\Iot\V1\DeviceRegistry + * + * @throws ApiException if the remote call fails + */ + public function createDeviceRegistry($parent, $deviceRegistry, array $optionalArgs = []) + { + $request = new CreateDeviceRegistryRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setDeviceRegistry($deviceRegistry); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateDeviceRegistry', DeviceRegistry::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a device. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $formattedName = $deviceManagerClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * $deviceManagerClient->deleteDevice($formattedName); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 deleteDevice($name, array $optionalArgs = []) + { + $request = new DeleteDeviceRequest(); + $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('DeleteDevice', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a device registry configuration. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $formattedName = $deviceManagerClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * $deviceManagerClient->deleteDeviceRegistry($formattedName); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @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 deleteDeviceRegistry($name, array $optionalArgs = []) + { + $request = new DeleteDeviceRegistryRequest(); + $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('DeleteDeviceRegistry', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets details about a device. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $formattedName = $deviceManagerClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * $response = $deviceManagerClient->getDevice($formattedName); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $fieldMask + * The fields of the `Device` resource to be returned in the response. If the + * field mask is unset or empty, all fields are returned. Fields have to be + * provided in snake_case format, for example: `last_heartbeat_time`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iot\V1\Device + * + * @throws ApiException if the remote call fails + */ + public function getDevice($name, array $optionalArgs = []) + { + $request = new GetDeviceRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['fieldMask'])) { + $request->setFieldMask($optionalArgs['fieldMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetDevice', Device::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a device registry configuration. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $formattedName = $deviceManagerClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * $response = $deviceManagerClient->getDeviceRegistry($formattedName); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the device registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @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\Iot\V1\DeviceRegistry + * + * @throws ApiException if the remote call fails + */ + public function getDeviceRegistry($name, array $optionalArgs = []) + { + $request = new GetDeviceRegistryRequest(); + $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('GetDeviceRegistry', DeviceRegistry::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the access control policy for a resource. + * Returns an empty policy if the resource exists and does not have a policy + * set. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $resource = 'resource'; + * $response = $deviceManagerClient->getIamPolicy($resource); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the last few versions of the device configuration in descending + * order (i.e.: newest first). + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $formattedName = $deviceManagerClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * $response = $deviceManagerClient->listDeviceConfigVersions($formattedName); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $numVersions + * The number of versions to list. Versions are listed in decreasing order of + * the version number. The maximum number of versions retained is 10. If this + * value is zero, it will return all the versions available. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iot\V1\ListDeviceConfigVersionsResponse + * + * @throws ApiException if the remote call fails + */ + public function listDeviceConfigVersions($name, array $optionalArgs = []) + { + $request = new ListDeviceConfigVersionsRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['numVersions'])) { + $request->setNumVersions($optionalArgs['numVersions']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ListDeviceConfigVersions', ListDeviceConfigVersionsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists device registries. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $formattedParent = $deviceManagerClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $deviceManagerClient->listDeviceRegistries($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $deviceManagerClient->listDeviceRegistries($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and cloud region path. For example, + * `projects/example-project/locations/us-central1`. + * @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 listDeviceRegistries($parent, array $optionalArgs = []) + { + $request = new ListDeviceRegistriesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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('ListDeviceRegistries', $optionalArgs, ListDeviceRegistriesResponse::class, $request); + } + + /** + * Lists the last few versions of the device state in descending order (i.e.: + * newest first). + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $formattedName = $deviceManagerClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * $response = $deviceManagerClient->listDeviceStates($formattedName); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $numStates + * The number of states to list. States are listed in descending order of + * update time. The maximum number of states retained is 10. If this + * value is zero, it will return all the states available. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iot\V1\ListDeviceStatesResponse + * + * @throws ApiException if the remote call fails + */ + public function listDeviceStates($name, array $optionalArgs = []) + { + $request = new ListDeviceStatesRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['numStates'])) { + $request->setNumStates($optionalArgs['numStates']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ListDeviceStates', ListDeviceStatesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * List devices in a device registry. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $formattedParent = $deviceManagerClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * // Iterate over pages of elements + * $pagedResponse = $deviceManagerClient->listDevices($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $deviceManagerClient->listDevices($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $parent Required. The device registry path. Required. For example, + * `projects/my-project/locations/us-central1/registries/my-registry`. + * @param array $optionalArgs { + * Optional. + * + * @type int[] $deviceNumIds + * A list of device numeric IDs. If empty, this field is ignored. Maximum + * IDs: 10,000. + * @type string[] $deviceIds + * A list of device string IDs. For example, `['device0', 'device12']`. + * If empty, this field is ignored. Maximum IDs: 10,000 + * @type FieldMask $fieldMask + * The fields of the `Device` resource to be returned in the response. The + * fields `id` and `num_id` are always returned, along with any + * other fields specified in snake_case format, for example: + * `last_heartbeat_time`. + * @type GatewayListOptions $gatewayListOptions + * Options related to gateways. + * @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 listDevices($parent, array $optionalArgs = []) + { + $request = new ListDevicesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['deviceNumIds'])) { + $request->setDeviceNumIds($optionalArgs['deviceNumIds']); + } + + if (isset($optionalArgs['deviceIds'])) { + $request->setDeviceIds($optionalArgs['deviceIds']); + } + + if (isset($optionalArgs['fieldMask'])) { + $request->setFieldMask($optionalArgs['fieldMask']); + } + + if (isset($optionalArgs['gatewayListOptions'])) { + $request->setGatewayListOptions($optionalArgs['gatewayListOptions']); + } + + 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('ListDevices', $optionalArgs, ListDevicesResponse::class, $request); + } + + /** + * Modifies the configuration for the device, which is eventually sent from + * the Cloud IoT Core servers. Returns the modified configuration version and + * its metadata. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $formattedName = $deviceManagerClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * $binaryData = '...'; + * $response = $deviceManagerClient->modifyCloudToDeviceConfig($formattedName, $binaryData); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param string $binaryData Required. The configuration data for the device. + * @param array $optionalArgs { + * Optional. + * + * @type int $versionToUpdate + * The version number to update. If this value is zero, it will not check the + * version number of the server and will always update the current version; + * otherwise, this update will fail if the version number found on the server + * does not match this version number. This is used to support multiple + * simultaneous updates without losing data. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iot\V1\DeviceConfig + * + * @throws ApiException if the remote call fails + */ + public function modifyCloudToDeviceConfig($name, $binaryData, array $optionalArgs = []) + { + $request = new ModifyCloudToDeviceConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setBinaryData($binaryData); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['versionToUpdate'])) { + $request->setVersionToUpdate($optionalArgs['versionToUpdate']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ModifyCloudToDeviceConfig', DeviceConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Sends a command to the specified device. In order for a device to be able + * to receive commands, it must: + * 1) be connected to Cloud IoT Core using the MQTT protocol, and + * 2) be subscribed to the group of MQTT topics specified by + * /devices/{device-id}/commands/#. This subscription will receive commands + * at the top-level topic /devices/{device-id}/commands as well as commands + * for subfolders, like /devices/{device-id}/commands/subfolder. + * Note that subscribing to specific subfolders is not supported. + * If the command could not be delivered to the device, this method will + * return an error; in particular, if the device is not subscribed, this + * method will return FAILED_PRECONDITION. Otherwise, this method will + * return OK. If the subscription is QoS 1, at least once delivery will be + * guaranteed; for QoS 0, no acknowledgment will be expected from the device. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $formattedName = $deviceManagerClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + * $binaryData = '...'; + * $response = $deviceManagerClient->sendCommandToDevice($formattedName, $binaryData); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param string $binaryData Required. The command data to send to the device. + * @param array $optionalArgs { + * Optional. + * + * @type string $subfolder + * Optional subfolder for the command. If empty, the command will be delivered + * to the /devices/{device-id}/commands topic, otherwise it will be delivered + * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level + * subfolders are allowed. This field must not have more than 256 characters, + * and must not contain any MQTT wildcards ("+" or "#") or null characters. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iot\V1\SendCommandToDeviceResponse + * + * @throws ApiException if the remote call fails + */ + public function sendCommandToDevice($name, $binaryData, array $optionalArgs = []) + { + $request = new SendCommandToDeviceRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setBinaryData($binaryData); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['subfolder'])) { + $request->setSubfolder($optionalArgs['subfolder']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SendCommandToDevice', SendCommandToDeviceResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces any + * existing policy. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $deviceManagerClient->setIamPolicy($resource, $policy); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + 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('SetIamPolicy', Policy::class, $optionalArgs, $request)->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. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $deviceManagerClient->testIamPermissions($resource, $permissions); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @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\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes the association between the device and the gateway. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $formattedParent = $deviceManagerClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + * $gatewayId = 'gateway_id'; + * $deviceId = 'device_id'; + * $response = $deviceManagerClient->unbindDeviceFromGateway($formattedParent, $gatewayId, $deviceId); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the registry. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param string $gatewayId Required. The value of `gateway_id` can be either the device numeric ID or the + * user-defined device identifier. + * @param string $deviceId Required. The device to disassociate from the specified gateway. The value of + * `device_id` can be either the device numeric ID or the user-defined device + * identifier. + * @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\Iot\V1\UnbindDeviceFromGatewayResponse + * + * @throws ApiException if the remote call fails + */ + public function unbindDeviceFromGateway($parent, $gatewayId, $deviceId, array $optionalArgs = []) + { + $request = new UnbindDeviceFromGatewayRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setGatewayId($gatewayId); + $request->setDeviceId($deviceId); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UnbindDeviceFromGateway', UnbindDeviceFromGatewayResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a device. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $device = new Device(); + * $updateMask = new FieldMask(); + * $response = $deviceManagerClient->updateDevice($device, $updateMask); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param Device $device Required. The new values for the device. The `id` and `num_id` fields must + * be empty, and the field `name` must specify the name path. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param FieldMask $updateMask Required. Only updates the `device` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `credentials`, `blocked`, and `metadata` + * @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\Iot\V1\Device + * + * @throws ApiException if the remote call fails + */ + public function updateDevice($device, $updateMask, array $optionalArgs = []) + { + $request = new UpdateDeviceRequest(); + $requestParamHeaders = []; + $request->setDevice($device); + $request->setUpdateMask($updateMask); + $requestParamHeaders['device.name'] = $device->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateDevice', Device::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a device registry configuration. + * + * Sample code: + * ``` + * $deviceManagerClient = new DeviceManagerClient(); + * try { + * $deviceRegistry = new DeviceRegistry(); + * $updateMask = new FieldMask(); + * $response = $deviceManagerClient->updateDeviceRegistry($deviceRegistry, $updateMask); + * } finally { + * $deviceManagerClient->close(); + * } + * ``` + * + * @param DeviceRegistry $deviceRegistry Required. The new values for the device registry. The `id` field must be empty, and + * the `name` field must indicate the path of the resource. For example, + * `projects/example-project/locations/us-central1/registries/my-registry`. + * @param FieldMask $updateMask Required. Only updates the `device_registry` fields indicated by this mask. + * The field mask must not be empty, and it must not contain fields that + * are immutable or only set by the server. + * Mutable top-level fields: `event_notification_config`, `http_config`, + * `mqtt_config`, and `state_notification_config`. + * @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\Iot\V1\DeviceRegistry + * + * @throws ApiException if the remote call fails + */ + public function updateDeviceRegistry($deviceRegistry, $updateMask, array $optionalArgs = []) + { + $request = new UpdateDeviceRegistryRequest(); + $requestParamHeaders = []; + $request->setDeviceRegistry($deviceRegistry); + $request->setUpdateMask($updateMask); + $requestParamHeaders['device_registry.name'] = $deviceRegistry->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateDeviceRegistry', DeviceRegistry::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Iot/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Iot/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..44cbd64530db --- /dev/null +++ b/owl-bot-staging/Iot/v1/src/V1/gapic_metadata.json @@ -0,0 +1,113 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.iot.v1", + "libraryPackage": "Google\\Cloud\\Iot\\V1", + "services": { + "DeviceManager": { + "clients": { + "grpc": { + "libraryClient": "DeviceManagerGapicClient", + "rpcs": { + "BindDeviceToGateway": { + "methods": [ + "bindDeviceToGateway" + ] + }, + "CreateDevice": { + "methods": [ + "createDevice" + ] + }, + "CreateDeviceRegistry": { + "methods": [ + "createDeviceRegistry" + ] + }, + "DeleteDevice": { + "methods": [ + "deleteDevice" + ] + }, + "DeleteDeviceRegistry": { + "methods": [ + "deleteDeviceRegistry" + ] + }, + "GetDevice": { + "methods": [ + "getDevice" + ] + }, + "GetDeviceRegistry": { + "methods": [ + "getDeviceRegistry" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "ListDeviceConfigVersions": { + "methods": [ + "listDeviceConfigVersions" + ] + }, + "ListDeviceRegistries": { + "methods": [ + "listDeviceRegistries" + ] + }, + "ListDeviceStates": { + "methods": [ + "listDeviceStates" + ] + }, + "ListDevices": { + "methods": [ + "listDevices" + ] + }, + "ModifyCloudToDeviceConfig": { + "methods": [ + "modifyCloudToDeviceConfig" + ] + }, + "SendCommandToDevice": { + "methods": [ + "sendCommandToDevice" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UnbindDeviceFromGateway": { + "methods": [ + "unbindDeviceFromGateway" + ] + }, + "UpdateDevice": { + "methods": [ + "updateDevice" + ] + }, + "UpdateDeviceRegistry": { + "methods": [ + "updateDeviceRegistry" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_client_config.json b/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_client_config.json new file mode 100644 index 000000000000..9221a9430dee --- /dev/null +++ b/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_client_config.json @@ -0,0 +1,154 @@ +{ + "interfaces": { + "google.cloud.iot.v1.DeviceManager": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ], + "retry_policy_2_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED", + "RESOURCE_EXHAUSTED" + ] + }, + "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": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000 + } + }, + "methods": { + "BindDeviceToGateway": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateDevice": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateDeviceRegistry": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteDevice": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteDeviceRegistry": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetDevice": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetDeviceRegistry": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListDeviceConfigVersions": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDeviceRegistries": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDeviceStates": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDevices": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ModifyCloudToDeviceConfig": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "SendCommandToDevice": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "SetIamPolicy": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UnbindDeviceFromGateway": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateDevice": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateDeviceRegistry": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_descriptor_config.php b/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_descriptor_config.php new file mode 100644 index 000000000000..af9ad00a9bc3 --- /dev/null +++ b/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_descriptor_config.php @@ -0,0 +1,28 @@ + [ + 'google.cloud.iot.v1.DeviceManager' => [ + 'ListDeviceRegistries' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDeviceRegistries', + ], + ], + 'ListDevices' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDevices', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_rest_client_config.php b/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_rest_client_config.php new file mode 100644 index 000000000000..dbf0bf784afc --- /dev/null +++ b/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_rest_client_config.php @@ -0,0 +1,320 @@ + [ + 'google.cloud.iot.v1.DeviceManager' => [ + 'BindDeviceToGateway' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDevice' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/registries/*}/devices', + 'body' => 'device', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDeviceRegistry' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/registries', + 'body' => 'device_registry', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDevice' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDeviceRegistry' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDevice' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDeviceRegistry' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'ListDeviceConfigVersions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDeviceRegistries' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/registries', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDeviceStates' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}/states', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDevices' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/registries/*}/devices', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ModifyCloudToDeviceConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SendCommandToDevice' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UnbindDeviceFromGateway' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDevice' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{device.name=projects/*/locations/*/registries/*/devices/*}', + 'body' => 'device', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}', + 'body' => 'device', + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'placeholders' => [ + 'device.name' => [ + 'getters' => [ + 'getDevice', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateDeviceRegistry' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{device_registry.name=projects/*/locations/*/registries/*}', + 'body' => 'device_registry', + 'placeholders' => [ + 'device_registry.name' => [ + 'getters' => [ + 'getDeviceRegistry', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Iot/v1/tests/Unit/V1/DeviceManagerClientTest.php b/owl-bot-staging/Iot/v1/tests/Unit/V1/DeviceManagerClientTest.php new file mode 100644 index 000000000000..08098eaad51d --- /dev/null +++ b/owl-bot-staging/Iot/v1/tests/Unit/V1/DeviceManagerClientTest.php @@ -0,0 +1,1290 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DeviceManagerClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DeviceManagerClient($options); + } + + /** @test */ + public function bindDeviceToGatewayTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BindDeviceToGatewayResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + $gatewayId = 'gatewayId955798774'; + $deviceId = 'deviceId25209764'; + $response = $gapicClient->bindDeviceToGateway($formattedParent, $gatewayId, $deviceId); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/BindDeviceToGateway', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getGatewayId(); + $this->assertProtobufEquals($gatewayId, $actualValue); + $actualValue = $actualRequestObject->getDeviceId(); + $this->assertProtobufEquals($deviceId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function bindDeviceToGatewayExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + $gatewayId = 'gatewayId955798774'; + $deviceId = 'deviceId25209764'; + try { + $gapicClient->bindDeviceToGateway($formattedParent, $gatewayId, $deviceId); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDeviceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $name = 'name3373707'; + $numId = 1034366860; + $blocked = true; + $expectedResponse = new Device(); + $expectedResponse->setId($id); + $expectedResponse->setName($name); + $expectedResponse->setNumId($numId); + $expectedResponse->setBlocked($blocked); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + $device = new Device(); + $response = $gapicClient->createDevice($formattedParent, $device); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/CreateDevice', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDevice(); + $this->assertProtobufEquals($device, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDeviceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + $device = new Device(); + try { + $gapicClient->createDevice($formattedParent, $device); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDeviceRegistryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $name = 'name3373707'; + $expectedResponse = new DeviceRegistry(); + $expectedResponse->setId($id); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $deviceRegistry = new DeviceRegistry(); + $response = $gapicClient->createDeviceRegistry($formattedParent, $deviceRegistry); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/CreateDeviceRegistry', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDeviceRegistry(); + $this->assertProtobufEquals($deviceRegistry, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDeviceRegistryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $deviceRegistry = new DeviceRegistry(); + try { + $gapicClient->createDeviceRegistry($formattedParent, $deviceRegistry); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDeviceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + $gapicClient->deleteDevice($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/DeleteDevice', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDeviceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + try { + $gapicClient->deleteDevice($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 deleteDeviceRegistryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + $gapicClient->deleteDeviceRegistry($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/DeleteDeviceRegistry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDeviceRegistryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + try { + $gapicClient->deleteDeviceRegistry($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 getDeviceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $name2 = 'name2-1052831874'; + $numId = 1034366860; + $blocked = true; + $expectedResponse = new Device(); + $expectedResponse->setId($id); + $expectedResponse->setName($name2); + $expectedResponse->setNumId($numId); + $expectedResponse->setBlocked($blocked); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + $response = $gapicClient->getDevice($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/GetDevice', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDeviceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + try { + $gapicClient->getDevice($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 getDeviceRegistryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $name2 = 'name2-1052831874'; + $expectedResponse = new DeviceRegistry(); + $expectedResponse->setId($id); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + $response = $gapicClient->getDeviceRegistry($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/GetDeviceRegistry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDeviceRegistryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + try { + $gapicClient->getDeviceRegistry($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 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'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/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'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeviceConfigVersionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListDeviceConfigVersionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + $response = $gapicClient->listDeviceConfigVersions($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/ListDeviceConfigVersions', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeviceConfigVersionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + try { + $gapicClient->listDeviceConfigVersions($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 listDeviceRegistriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $deviceRegistriesElement = new DeviceRegistry(); + $deviceRegistries = [ + $deviceRegistriesElement, + ]; + $expectedResponse = new ListDeviceRegistriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDeviceRegistries($deviceRegistries); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listDeviceRegistries($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDeviceRegistries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/ListDeviceRegistries', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeviceRegistriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listDeviceRegistries($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 listDeviceStatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListDeviceStatesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + $response = $gapicClient->listDeviceStates($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/ListDeviceStates', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeviceStatesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + try { + $gapicClient->listDeviceStates($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 listDevicesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $devicesElement = new Device(); + $devices = [ + $devicesElement, + ]; + $expectedResponse = new ListDevicesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDevices($devices); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + $response = $gapicClient->listDevices($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDevices()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/ListDevices', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDevicesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + try { + $gapicClient->listDevices($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 modifyCloudToDeviceConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $binaryData2 = '-37'; + $expectedResponse = new DeviceConfig(); + $expectedResponse->setVersion($version); + $expectedResponse->setBinaryData($binaryData2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + $binaryData = '40'; + $response = $gapicClient->modifyCloudToDeviceConfig($formattedName, $binaryData); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/ModifyCloudToDeviceConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getBinaryData(); + $this->assertProtobufEquals($binaryData, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function modifyCloudToDeviceConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + $binaryData = '40'; + try { + $gapicClient->modifyCloudToDeviceConfig($formattedName, $binaryData); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function sendCommandToDeviceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SendCommandToDeviceResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + $binaryData = '40'; + $response = $gapicClient->sendCommandToDevice($formattedName, $binaryData); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/SendCommandToDevice', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getBinaryData(); + $this->assertProtobufEquals($binaryData, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function sendCommandToDeviceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); + $binaryData = '40'; + try { + $gapicClient->sendCommandToDevice($formattedName, $binaryData); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/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(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/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 = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function unbindDeviceFromGatewayTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new UnbindDeviceFromGatewayResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + $gatewayId = 'gatewayId955798774'; + $deviceId = 'deviceId25209764'; + $response = $gapicClient->unbindDeviceFromGateway($formattedParent, $gatewayId, $deviceId); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/UnbindDeviceFromGateway', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getGatewayId(); + $this->assertProtobufEquals($gatewayId, $actualValue); + $actualValue = $actualRequestObject->getDeviceId(); + $this->assertProtobufEquals($deviceId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function unbindDeviceFromGatewayExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); + $gatewayId = 'gatewayId955798774'; + $deviceId = 'deviceId25209764'; + try { + $gapicClient->unbindDeviceFromGateway($formattedParent, $gatewayId, $deviceId); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDeviceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $name = 'name3373707'; + $numId = 1034366860; + $blocked = true; + $expectedResponse = new Device(); + $expectedResponse->setId($id); + $expectedResponse->setName($name); + $expectedResponse->setNumId($numId); + $expectedResponse->setBlocked($blocked); + $transport->addResponse($expectedResponse); + // Mock request + $device = new Device(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateDevice($device, $updateMask); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/UpdateDevice', $actualFuncCall); + $actualValue = $actualRequestObject->getDevice(); + $this->assertProtobufEquals($device, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDeviceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $device = new Device(); + $updateMask = new FieldMask(); + try { + $gapicClient->updateDevice($device, $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()); + } + + /** @test */ + public function updateDeviceRegistryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $name = 'name3373707'; + $expectedResponse = new DeviceRegistry(); + $expectedResponse->setId($id); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $deviceRegistry = new DeviceRegistry(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateDeviceRegistry($deviceRegistry, $updateMask); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.iot.v1.DeviceManager/UpdateDeviceRegistry', $actualFuncCall); + $actualValue = $actualRequestObject->getDeviceRegistry(); + $this->assertProtobufEquals($deviceRegistry, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDeviceRegistryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $deviceRegistry = new DeviceRegistry(); + $updateMask = new FieldMask(); + try { + $gapicClient->updateDeviceRegistry($deviceRegistry, $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/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/EkmService.php b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/EkmService.php new file mode 100644 index 000000000000..10703d96b004 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/EkmService.php @@ -0,0 +1,86 @@ +internalAddGeneratedFile( + ' +â +%google/cloud/kms/v1/ekm_service.protogoogle.cloud.kms.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"³ +ListEkmConnectionsRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA"† +ListEkmConnectionsResponse; +ekm_connections ( 2".google.cloud.kms.v1.EkmConnection +next_page_token (  + +total_size ("V +GetEkmConnectionRequest; +name ( B-àAúA\' +%cloudkms.googleapis.com/EkmConnection"¸ +CreateEkmConnectionRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location +ekm_connection_id ( BàA? +ekm_connection ( 2".google.cloud.kms.v1.EkmConnectionBàA"“ +UpdateEkmConnectionRequest? +ekm_connection ( 2".google.cloud.kms.v1.EkmConnectionBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"¿ + Certificate +raw_der ( BàA +parsed (BàA +issuer ( BàA +subject ( BàA* +subject_alternative_dns_names ( BàA8 +not_before_time ( 2.google.protobuf.TimestampBàA7 +not_after_time ( 2.google.protobuf.TimestampBàA + serial_number ( BàA +sha256_fingerprint ( BàA" + EkmConnection +name ( BàA4 + create_time ( 2.google.protobuf.TimestampBàAM +service_resolvers ( 22.google.cloud.kms.v1.EkmConnection.ServiceResolver +etag ( BàAÞ +ServiceResolverR +service_directory_service ( B/àAúA) +\'servicedirectory.googleapis.com/Service +endpoint_filter ( BàA +hostname ( BàAB +server_certificates ( 2 .google.cloud.kms.v1.CertificateBàA:sêAp +%cloudkms.googleapis.com/EkmConnectionGprojects/{project}/locations/{location}/ekmConnections/{ekm_connection}2± + +EkmServiceº +ListEkmConnections..google.cloud.kms.v1.ListEkmConnectionsRequest/.google.cloud.kms.v1.ListEkmConnectionsResponse"C‚Óä“42/v1/{parent=projects/*/locations/*}/ekmConnectionsÚAparent§ +GetEkmConnection,.google.cloud.kms.v1.GetEkmConnectionRequest".google.cloud.kms.v1.EkmConnection"A‚Óä“42/v1/{name=projects/*/locations/*/ekmConnections/*}ÚAnameà +CreateEkmConnection/.google.cloud.kms.v1.CreateEkmConnectionRequest".google.cloud.kms.v1.EkmConnection"t‚Óä“D"2/v1/{parent=projects/*/locations/*}/ekmConnections:ekm_connectionÚA\'parent,ekm_connection_id,ekm_connectionâ +UpdateEkmConnection/.google.cloud.kms.v1.UpdateEkmConnectionRequest".google.cloud.kms.v1.EkmConnection"v‚Óä“S2A/v1/{ekm_connection.name=projects/*/locations/*/ekmConnections/*}:ekm_connectionÚAekm_connection,update_masktÊAcloudkms.googleapis.comÒAWhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloudkmsB’ +com.google.cloud.kms.v1BEkmServiceProtoPZ6google.golang.org/genproto/googleapis/cloud/kms/v1;kmsøªGoogle.Cloud.Kms.V1ÊGoogle\\Cloud\\Kms\\V1êA| +\'servicedirectory.googleapis.com/ServiceQprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Resources.php b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Resources.php new file mode 100644 index 0000000000000000000000000000000000000000..6389765c617ffed73c9b409f6fc25a1f9f390f72 GIT binary patch literal 6758 zcmc&(OK;oQ6&_iB>G(x4ld<9?4x=QECrzYCane+7GN2?{R$^O%q$o)%3_(-ZHWNw| zNXipW;6;J{h1qpkbdkjXMbRJ7ZI{LTfY}rU@(YTtdhX>zv`ojEWPo~OiszokJ+JTF z%iny}+wZ|Op+vgGRBX}~b`Ax5p9nqEunpDFg`NKHE-?kw==3z5m?=RhR)pnYSu356y)oe}CwQte-N5Zb6 zTLigJuHEf-Ra-N<0%fRlRkHG>;K-zFulEex?IXc6rb-=vn{So7HZi-3-YODHHMO2? zm{nYw%k2@{cN=}P@};Ymiqm$5701S0?u3z#1l#PBpmsqpiQPB5Ys_vc;K+Y!g}6%W zX{~jQ=#CF?{%sOW6itkJ6*_-gE6kHo2UHNm)q7=*N6y|j5AhUGA9*@EmwsiKZhIa%O~5zqwjFx%ZxNV!N)BsUcaM+5IIX5cM2M`!^3fl~ zD8C9bs!6bnWhyu^hLoA?Qp(+hXI09N1LMjm@5Qg-3fm*yqO%%zXQi;{)1JCDWPe3e z+e*K6pN`VHp|V`Sci!Vs`n6*pzQZTkL{pEF-%UZRU>;)aptvy0*I=q=Y8}NqbgjPO zSsnC!%9qi^RKO&3wk;uZ-|QI{NknnW^V#%=nFnI34jUCSG3>pGk-W!00KQA!*fO>Y z<_pL5Q)e-wwgsOB6I(OdiD|}k!86{EmsfHdpYbK&4xFvaHtF=i*`{*3)OGHw8`vQ&|2{_H5~Ytn5e7LYfVk71ntD@Gx5Yv~Tm1Z|pu zC@y!3fuDnk14ZvU6%fmfJ&YuO9|6wK9yjcK5|#_Km(@l^ek#3`tIulHN?nqlZP%+( zp}by}iri=XIarXk*($jxvHx6zz7*>(x3;84tz3}n<z`0+X~%b1W>|m&KOW`JLEO(bFE+`)Mj+wqb!*B`k;lN%6vUdx zN|SYRKy>Ec`Rw)3WU2a#H|bjbIm8rw&oDK6zvC9>SD}o<77XgsHA(cu&Z#2R0FZ4YbR(| zn04O1z-~*h2-JN=>spCPmfb&1Ujg~GT@AY^DKIHa@=_b(Cn#vdtcpO;t6G!lbu5-Bb_So44N}IF|KtMo=Y};52%f+M4W-w~*FwX0 zX2R5|2)+=Kz_c-sn7~eyk7Y41?w=!zqx?F|D1*dxoB!?5{hpGpj)6mr)195xd`Cm%`0Pvp~zs~aS6;8 ziV-7hJqhPsu3bgb`zDcbX0nWKfakf_x~24ixyUYE0XS0Bpt4KaKF0XKGndhhP9vK}>h zg1UP5*AG1E_^H(UnJl+}PFNb~eOjnzj%l6*mUTM;MQWHD}tMY53Zowi+kG-wIjpb z2&H>gWVm01(mfk8TZz{;6(s)yp=VuSqHli_LO>fpVr z<=8YUA2?^AqvRi>5Ua8qA;d^@ceF=3?jfKS96#w%cs~27z|E%tP=TzP>bt5RAEVNT;YAJJH+0{Gq4k=UwS@0c9``grJN_cKSY-NB%TTA`F%ZP z+>4FwU0=@7Kt-<1jBH{FHer2XU7xFiz3wbOcL9Z^WkK*L*ho z;$Ya<7(dn&otd+Yb-=2Qp3xJ|Wyjq!V#aRp@HWU#Qb*L!GzKpT5I>>eSVKtuD+05@ z#NjW)1-FsnL4KoB9BPT~c*5}8$3S*=#xrb9v#3UJiw$_Xq1~04uTZSUR299 zidSdcW%&9(?Jh&}S_gK2=UK)Rz)|vduzbdRodC|C-!VnyzNxvea0M30Yi!|0x9i?) zPtdgHlRlQ1*z#%H6xg)YO_ z-uQv1V-9A$Uvjfr;KuXcMPLyxS;HzPAIA?N-aWlVEi$T+-#&2fa`y~f>F%Wrb1#j@ zIEFmw!Nu*dk1%U^sr#Qu{89weDcYi+l@~=80lF)KuG)0b-uImua)umI za@%Yo&)j))&b{Z}_uhS+FTC7XZlI&7IZ`LK;gWJ{aV_O8lT^dDT&rYNQ;W@|C1R&a zR;^)HiJeZRuH8%Bz4tKn%C(yhkHDjj)wD|_m#SD+rAjiTs?{uKR%%XW^>oG|_NrMT zX*L={b)!a{hEXD^x%t^U#5Kx>YZT_#gN3W~!NRLGr?7DP5<;b_;W()Wd;s(gO2L1P z=3><>r5x9A;eW?Wr)btq*EFi;+kpIXYRRZN1fFfTU24`#u4&a%^nrWz5}7)Y;$u?V zV+{+KUQS6U^OQUgFWjuV#I76F!ZqTQY_s87_B@#8auwn#m(eRzC&X*%aOP5Kiet>> z+CW}TxptHI-=0d@#BJL3OAI$1U|s!H2ys-tVHWcBx<$QU)ty|<rn~ zQ-~v9E-Niuha8zw(W9|Ejy^Kbk*>*sN4ZIwOqDi{Fp}xaG8a-I!{1T^e+r93Vi;xdL^zG#*MFp; z(c7luzDm~aoAruwpS;;5j*Bm%freoNl?g4SO%2YT_#~hBJbx4&sahqj=rkW0NIPk$ zJDJsZVTS!?GKrXkf{#LJm)C^)Bu~ zNy{!1ySTVEu}xjp|E-}t6z^4g4e}gNE5sLC5EqU!$Vbp&=0X~)7Q}*c?||pg@G9sI z^18Tck|zxI&TLMM9}q`c0bSrvv|U($5wPb1k1O`OV8C<1*AnPJzy)Gt<%!7HML9xY z?A;YN(ANKf3qZ9@1vhIA%XV*Bi;DYyQ3YPiy35u@W5FzQ8ZapkoI!&tWUXk^)Pqdh zGBuPv5Go_7)p0aZCvUk$UnbEM8^jnP7bcr3Pdl1j+w`~5-hfcROX9s}&`^nGP!V1) z-+UV&`O9U(iL)m!sg?s(81UkrNqDXEY$lIYH`E(DdrhT68A=U6>G-y;SmTkJrHO6#j z_T^ZWv~5|Em&5RQ!s5+T71CR$B`_$QFDc7(Dw#;a#4}7E(Xft2ZO14Y#3}kM=mLjZ z+<0zwFBH?r~^IM-aMqucOcvATEw?0n$ee*dh}p z4iBk6dFVQNC>twz&Z40v8xkDitO&(U$~elUd|K_DIFb(`ms*gt$TU15IItcP0{4gS z8yY&+f^Xh7Ylgkn0<*^ouKW&)+tZ%#!9eS;qeIXpaBXW%J=gO3jm}H(23Ti76T(x( zCcojI8ru0vol%uq8xPFUgKUo8g0yM2qOTfs7yOpXl*Do`fv3?yqg;l*j0K&OqS1tQ zQXTp=w7XQK4Ih>RB9n7yS3`~g6})sNTbkI;hC7dh${19r#kGf^K{ei)gE5m@%gZN)Lnh}2->$w<7&bL&{plK z=aTpwI;l)z6?K}y$xuJg436uEpJ-@A<*x9S?EKZN$Gcmzu=P3R<+VxhnX z@c}gES^J79k8PM(Y53w2{ ztA<%M7OOnzlk_rK@n5EDN@m}C5sg6u>W)!|LzEgU%Ejp_hF;0Azln^eLT3@biCFwi zo`_+|U8!IG`ky}iAd$v1^kn!QegXYVOd|3K%D|}hMW?`cMv_u=VEncl42-Fcb3EMN))4YK z=lF$C*LnsLZ^u&<{Zc^WvI@;;=gLG92=}=% z)0Y_VFX6{5@iq&1rXi0zBn4W&fr3hxXbQ@tGX-VVpKQEj^ZEJb8rl&!1Hs`_N5DqH z?3{B#Aus7Y%`7=}O7b+npU*}!^4tVEd+KledswrzoFw4zqSaz0(TD3qrG;)Woy_U| z&o((eRC(GT*y(()BL`6 zAFT3u7ylX9bA`ubA8st88?%fRc`?u*Zt5(Y2u}RHoj)Fl;wQTH5*%j9RQZGg494-()elpS{Ln;w4DBk6OJR z%)!0hXfsXk#07tlXgk#DoO&(P`b)hJdFriZUvFV5&o29696GIrXX7Ey8}f|-ul&9J zfGK!@gD-}zE?S%ud?v06R+$PO=y&^_rq^>k!ok-=PCm^~QYHCHuVfEO$FMONk2o;G zXF};lSWBWYD^Z2OMm-*Qjqs^DIlwibpRRqBZ>;DgeHa~jv5&Wr!wu?3@ zJ{lS^)nsMAeVh#M&MKq8hHXxt?KeQv>p8*?@fg^hOoXbbi79N+MvH*0nrxk5E29AH z>w3Ol*z376KYnAVM|kR}Q#AYuGyuFlAZ?*VGysA|Qas^HwpLrgrO9%{fXzq0WWtlg z2%MlXo zws$i^FUTin{3mELtp{h5?#KD@h@X7@G5>hkbsJ7DlX>#wi6EkWmrj4$z`u7n3B}c2 zvh3PSEOYq9`0V>IIl__1ev>fcJM!k}@>`Dd*QxaCj`_*~i zvztpW{y#MBhl$ZS_GwM}D*d!34TGi^PJb+~7Q`1f?2{Y#=4Nq#4SMFd`g~!Af2!j9 SvL*7X7G}x6K3PZW2>l0p_PA;Q literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php new file mode 100644 index 000000000000..fd3af09b47d0 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php @@ -0,0 +1,297 @@ +google.cloud.kms.v1.AsymmetricDecryptRequest + */ +class AsymmetricDecryptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decryption. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The data encrypted with the named + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using + * OAEP. + * + * Generated from protobuf field bytes ciphertext = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ciphertext = ''; + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) + * is equal to + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ciphertext_crc32c = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decryption. + * @type string $ciphertext + * Required. The data encrypted with the named + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using + * OAEP. + * @type \Google\Protobuf\Int64Value $ciphertext_crc32c + * Optional. An optional CRC32C checksum of the + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) + * is equal to + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decryption. + * + * Generated 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 + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decryption. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 data encrypted with the named + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using + * OAEP. + * + * Generated from protobuf field bytes ciphertext = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCiphertext() + { + return $this->ciphertext; + } + + /** + * Required. The data encrypted with the named + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using + * OAEP. + * + * Generated from protobuf field bytes ciphertext = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCiphertext($var) + { + GPBUtil::checkString($var, False); + $this->ciphertext = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) + * is equal to + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getCiphertextCrc32C() + { + return $this->ciphertext_crc32c; + } + + public function hasCiphertextCrc32C() + { + return isset($this->ciphertext_crc32c); + } + + public function clearCiphertextCrc32C() + { + unset($this->ciphertext_crc32c); + } + + /** + * Returns the unboxed value from getCiphertextCrc32C() + + * Optional. An optional CRC32C checksum of the + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) + * is equal to + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getCiphertextCrc32CUnwrapped() + { + return $this->readWrapperValue("ciphertext_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) + * is equal to + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCiphertextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->ciphertext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) + * is equal to + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setCiphertextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("ciphertext_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php new file mode 100644 index 000000000000..a50201e6aac9 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php @@ -0,0 +1,339 @@ +google.cloud.kms.v1.AsymmetricDecryptResponse + */ +class AsymmetricDecryptResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The decrypted data originally encrypted with the matching public key. + * + * Generated from protobuf field bytes plaintext = 1; + */ + protected $plaintext = ''; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. + * An integrity check of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + protected $plaintext_crc32c = null; + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A + * false value of this field indicates either that + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_ciphertext_crc32c = 3; + */ + protected $verified_ciphertext_crc32c = false; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $plaintext + * The decrypted data originally encrypted with the matching public key. + * @type \Google\Protobuf\Int64Value $plaintext_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. + * An integrity check of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * @type bool $verified_ciphertext_crc32c + * Integrity verification field. A flag indicating whether + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A + * false value of this field indicates either that + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The decrypted data originally encrypted with the matching public key. + * + * Generated from protobuf field bytes plaintext = 1; + * @return string + */ + public function getPlaintext() + { + return $this->plaintext; + } + + /** + * The decrypted data originally encrypted with the matching public key. + * + * Generated from protobuf field bytes plaintext = 1; + * @param string $var + * @return $this + */ + public function setPlaintext($var) + { + GPBUtil::checkString($var, False); + $this->plaintext = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. + * An integrity check of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @return \Google\Protobuf\Int64Value|null + */ + public function getPlaintextCrc32C() + { + return $this->plaintext_crc32c; + } + + public function hasPlaintextCrc32C() + { + return isset($this->plaintext_crc32c); + } + + public function clearPlaintextCrc32C() + { + unset($this->plaintext_crc32c); + } + + /** + * Returns the unboxed value from getPlaintextCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. + * An integrity check of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @return int|string|null + */ + public function getPlaintextCrc32CUnwrapped() + { + return $this->readWrapperValue("plaintext_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. + * An integrity check of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setPlaintextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->plaintext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. + * An integrity check of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @param int|string|null $var + * @return $this + */ + public function setPlaintextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("plaintext_crc32c", $var); + return $this;} + + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A + * false value of this field indicates either that + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_ciphertext_crc32c = 3; + * @return bool + */ + public function getVerifiedCiphertextCrc32C() + { + return $this->verified_ciphertext_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A + * false value of this field indicates either that + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_ciphertext_crc32c = 3; + * @param bool $var + * @return $this + */ + public function setVerifiedCiphertextCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_ciphertext_crc32c = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php new file mode 100644 index 000000000000..a9e4bdc34ec4 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php @@ -0,0 +1,544 @@ +google.cloud.kms.v1.AsymmetricSignRequest + */ +class AsymmetricSignRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The digest of the data to sign. The digest must be produced with + * the same digest algorithm as specified by the key version's + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. + * This field may not be supplied if + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * is supplied. + * + * Generated from protobuf field .google.cloud.kms.v1.Digest digest = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $digest = null; + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) + * is equal to + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $digest_crc32c = null; + /** + * Optional. The data to sign. + * It can't be supplied if + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * is supplied. + * + * Generated from protobuf field bytes data = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data = ''; + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) + * is equal to + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_crc32c = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * @type \Google\Cloud\Kms\V1\Digest $digest + * Optional. The digest of the data to sign. The digest must be produced with + * the same digest algorithm as specified by the key version's + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. + * This field may not be supplied if + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * is supplied. + * @type \Google\Protobuf\Int64Value $digest_crc32c + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) + * is equal to + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * @type string $data + * Optional. The data to sign. + * It can't be supplied if + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * is supplied. + * @type \Google\Protobuf\Int64Value $data_crc32c + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) + * is equal to + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * + * Generated 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 + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 digest of the data to sign. The digest must be produced with + * the same digest algorithm as specified by the key version's + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. + * This field may not be supplied if + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * is supplied. + * + * Generated from protobuf field .google.cloud.kms.v1.Digest digest = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Kms\V1\Digest|null + */ + public function getDigest() + { + return $this->digest; + } + + public function hasDigest() + { + return isset($this->digest); + } + + public function clearDigest() + { + unset($this->digest); + } + + /** + * Optional. The digest of the data to sign. The digest must be produced with + * the same digest algorithm as specified by the key version's + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. + * This field may not be supplied if + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * is supplied. + * + * Generated from protobuf field .google.cloud.kms.v1.Digest digest = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Kms\V1\Digest $var + * @return $this + */ + public function setDigest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\Digest::class); + $this->digest = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) + * is equal to + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getDigestCrc32C() + { + return $this->digest_crc32c; + } + + public function hasDigestCrc32C() + { + return isset($this->digest_crc32c); + } + + public function clearDigestCrc32C() + { + unset($this->digest_crc32c); + } + + /** + * Returns the unboxed value from getDigestCrc32C() + + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) + * is equal to + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getDigestCrc32CUnwrapped() + { + return $this->readWrapperValue("digest_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) + * is equal to + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setDigestCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->digest_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) + * is equal to + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setDigestCrc32CUnwrapped($var) + { + $this->writeWrapperValue("digest_crc32c", $var); + return $this;} + + /** + * Optional. The data to sign. + * It can't be supplied if + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * is supplied. + * + * Generated from protobuf field bytes data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Optional. The data to sign. + * It can't be supplied if + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * is supplied. + * + * Generated from protobuf field bytes data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) + * is equal to + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getDataCrc32C() + { + return $this->data_crc32c; + } + + public function hasDataCrc32C() + { + return isset($this->data_crc32c); + } + + public function clearDataCrc32C() + { + unset($this->data_crc32c); + } + + /** + * Returns the unboxed value from getDataCrc32C() + + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) + * is equal to + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getDataCrc32CUnwrapped() + { + return $this->readWrapperValue("data_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) + * is equal to + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setDataCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->data_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) + * is equal to + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setDataCrc32CUnwrapped($var) + { + $this->writeWrapperValue("data_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php new file mode 100644 index 000000000000..efec99a14768 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php @@ -0,0 +1,463 @@ +google.cloud.kms.v1.AsymmetricSignResponse + */ +class AsymmetricSignResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The created signature. + * + * Generated from protobuf field bytes signature = 1; + */ + protected $signature = ''; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. + * An integrity check of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * can be performed by computing the CRC32C checksum of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; + */ + protected $signature_crc32c = null; + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value + * of this field indicates either that + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_digest_crc32c = 3; + */ + protected $verified_digest_crc32c = false; + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * + * Generated from protobuf field string name = 4; + */ + protected $name = ''; + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of + * this field indicates either that + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 5; + */ + protected $verified_data_crc32c = false; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $signature + * The created signature. + * @type \Google\Protobuf\Int64Value $signature_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. + * An integrity check of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * can be performed by computing the CRC32C checksum of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * @type bool $verified_digest_crc32c + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value + * of this field indicates either that + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type string $name + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * @type bool $verified_data_crc32c + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of + * this field indicates either that + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The created signature. + * + * Generated from protobuf field bytes signature = 1; + * @return string + */ + public function getSignature() + { + return $this->signature; + } + + /** + * The created signature. + * + * Generated from protobuf field bytes signature = 1; + * @param string $var + * @return $this + */ + public function setSignature($var) + { + GPBUtil::checkString($var, False); + $this->signature = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. + * An integrity check of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * can be performed by computing the CRC32C checksum of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; + * @return \Google\Protobuf\Int64Value|null + */ + public function getSignatureCrc32C() + { + return $this->signature_crc32c; + } + + public function hasSignatureCrc32C() + { + return isset($this->signature_crc32c); + } + + public function clearSignatureCrc32C() + { + unset($this->signature_crc32c); + } + + /** + * Returns the unboxed value from getSignatureCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. + * An integrity check of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * can be performed by computing the CRC32C checksum of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; + * @return int|string|null + */ + public function getSignatureCrc32CUnwrapped() + { + return $this->readWrapperValue("signature_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. + * An integrity check of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * can be performed by computing the CRC32C checksum of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setSignatureCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->signature_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. + * An integrity check of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * can be performed by computing the CRC32C checksum of + * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; + * @param int|string|null $var + * @return $this + */ + public function setSignatureCrc32CUnwrapped($var) + { + $this->writeWrapperValue("signature_crc32c", $var); + return $this;} + + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value + * of this field indicates either that + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_digest_crc32c = 3; + * @return bool + */ + public function getVerifiedDigestCrc32C() + { + return $this->verified_digest_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value + * of this field indicates either that + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_digest_crc32c = 3; + * @param bool $var + * @return $this + */ + public function setVerifiedDigestCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_digest_crc32c = $var; + + return $this; + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * + * Generated from protobuf field string name = 4; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * + * Generated from protobuf field string name = 4; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of + * this field indicates either that + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 5; + * @return bool + */ + public function getVerifiedDataCrc32C() + { + return $this->verified_data_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of + * this field indicates either that + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 5; + * @param bool $var + * @return $this + */ + public function setVerifiedDataCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_data_crc32c = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php new file mode 100644 index 000000000000..db653c93c4a9 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php @@ -0,0 +1,388 @@ +google.cloud.kms.v1.Certificate + */ +class Certificate extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The raw certificate bytes in DER format. + * + * Generated from protobuf field bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $raw_der = ''; + /** + * Output only. True if the certificate was parsed successfully. + * + * Generated from protobuf field bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $parsed = false; + /** + * Output only. The issuer distinguished name in RFC 2253 format. Only present + * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $issuer = ''; + /** + * Output only. The subject distinguished name in RFC 2253 format. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $subject = ''; + /** + * Output only. The subject Alternative DNS names. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $subject_alternative_dns_names; + /** + * Output only. The certificate is not valid before this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field .google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $not_before_time = null; + /** + * Output only. The certificate is not valid after this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field .google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $not_after_time = null; + /** + * Output only. The certificate serial number as a hex string. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $serial_number = ''; + /** + * Output only. The SHA-256 certificate fingerprint as a hex string. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $sha256_fingerprint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $raw_der + * Required. The raw certificate bytes in DER format. + * @type bool $parsed + * Output only. True if the certificate was parsed successfully. + * @type string $issuer + * Output only. The issuer distinguished name in RFC 2253 format. Only present + * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * @type string $subject + * Output only. The subject distinguished name in RFC 2253 format. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * @type array|\Google\Protobuf\Internal\RepeatedField $subject_alternative_dns_names + * Output only. The subject Alternative DNS names. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * @type \Google\Protobuf\Timestamp $not_before_time + * Output only. The certificate is not valid before this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * @type \Google\Protobuf\Timestamp $not_after_time + * Output only. The certificate is not valid after this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * @type string $serial_number + * Output only. The certificate serial number as a hex string. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * @type string $sha256_fingerprint + * Output only. The SHA-256 certificate fingerprint as a hex string. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The raw certificate bytes in DER format. + * + * Generated from protobuf field bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRawDer() + { + return $this->raw_der; + } + + /** + * Required. The raw certificate bytes in DER format. + * + * Generated from protobuf field bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRawDer($var) + { + GPBUtil::checkString($var, False); + $this->raw_der = $var; + + return $this; + } + + /** + * Output only. True if the certificate was parsed successfully. + * + * Generated from protobuf field bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getParsed() + { + return $this->parsed; + } + + /** + * Output only. True if the certificate was parsed successfully. + * + * Generated from protobuf field bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setParsed($var) + { + GPBUtil::checkBool($var); + $this->parsed = $var; + + return $this; + } + + /** + * Output only. The issuer distinguished name in RFC 2253 format. Only present + * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getIssuer() + { + return $this->issuer; + } + + /** + * Output only. The issuer distinguished name in RFC 2253 format. Only present + * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setIssuer($var) + { + GPBUtil::checkString($var, True); + $this->issuer = $var; + + return $this; + } + + /** + * Output only. The subject distinguished name in RFC 2253 format. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSubject() + { + return $this->subject; + } + + /** + * Output only. The subject distinguished name in RFC 2253 format. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSubject($var) + { + GPBUtil::checkString($var, True); + $this->subject = $var; + + return $this; + } + + /** + * Output only. The subject Alternative DNS names. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSubjectAlternativeDnsNames() + { + return $this->subject_alternative_dns_names; + } + + /** + * Output only. The subject Alternative DNS names. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSubjectAlternativeDnsNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->subject_alternative_dns_names = $arr; + + return $this; + } + + /** + * Output only. The certificate is not valid before this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field .google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNotBeforeTime() + { + return $this->not_before_time; + } + + public function hasNotBeforeTime() + { + return isset($this->not_before_time); + } + + public function clearNotBeforeTime() + { + unset($this->not_before_time); + } + + /** + * Output only. The certificate is not valid before this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field .google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNotBeforeTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->not_before_time = $var; + + return $this; + } + + /** + * Output only. The certificate is not valid after this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field .google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNotAfterTime() + { + return $this->not_after_time; + } + + public function hasNotAfterTime() + { + return isset($this->not_after_time); + } + + public function clearNotAfterTime() + { + unset($this->not_after_time); + } + + /** + * Output only. The certificate is not valid after this time. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field .google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNotAfterTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->not_after_time = $var; + + return $this; + } + + /** + * Output only. The certificate serial number as a hex string. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSerialNumber() + { + return $this->serial_number; + } + + /** + * Output only. The certificate serial number as a hex string. Only present if + * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSerialNumber($var) + { + GPBUtil::checkString($var, True); + $this->serial_number = $var; + + return $this; + } + + /** + * Output only. The SHA-256 certificate fingerprint as a hex string. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSha256Fingerprint() + { + return $this->sha256_fingerprint; + } + + /** + * Output only. The SHA-256 certificate fingerprint as a hex string. Only + * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. + * + * Generated from protobuf field string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSha256Fingerprint($var) + { + GPBUtil::checkString($var, True); + $this->sha256_fingerprint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php new file mode 100644 index 000000000000..2871e7dd57a7 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php @@ -0,0 +1,220 @@ +google.cloud.kms.v1.CreateCryptoKeyRequest + */ +class CreateCryptoKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing + * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $crypto_key_id = ''; + /** + * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $crypto_key = null; + /** + * If set to true, the request will create a + * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must + * manually call + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or + * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] + * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field bool skip_initial_version_creation = 5; + */ + protected $skip_initial_version_creation = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing + * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * @type string $crypto_key_id + * Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * @type \Google\Cloud\Kms\V1\CryptoKey $crypto_key + * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field + * values. + * @type bool $skip_initial_version_creation + * If set to true, the request will create a + * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must + * manually call + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or + * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] + * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing + * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * + * Generated 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][google.cloud.kms.v1.KeyRing.name] of the KeyRing + * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCryptoKeyId() + { + return $this->crypto_key_id; + } + + /** + * Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCryptoKeyId($var) + { + GPBUtil::checkString($var, True); + $this->crypto_key_id = $var; + + return $this; + } + + /** + * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\CryptoKey|null + */ + public function getCryptoKey() + { + return $this->crypto_key; + } + + public function hasCryptoKey() + { + return isset($this->crypto_key); + } + + public function clearCryptoKey() + { + unset($this->crypto_key); + } + + /** + * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\CryptoKey $var + * @return $this + */ + public function setCryptoKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKey::class); + $this->crypto_key = $var; + + return $this; + } + + /** + * If set to true, the request will create a + * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must + * manually call + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or + * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] + * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field bool skip_initial_version_creation = 5; + * @return bool + */ + public function getSkipInitialVersionCreation() + { + return $this->skip_initial_version_creation; + } + + /** + * If set to true, the request will create a + * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must + * manually call + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or + * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] + * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field bool skip_initial_version_creation = 5; + * @param bool $var + * @return $this + */ + public function setSkipInitialVersionCreation($var) + { + GPBUtil::checkBool($var); + $this->skip_initial_version_creation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php new file mode 100644 index 000000000000..0a77daeaca5d --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php @@ -0,0 +1,124 @@ +google.cloud.kms.v1.CreateCryptoKeyVersionRequest + */ +class CreateCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * initial field values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $crypto_key_version = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * @type \Google\Cloud\Kms\V1\CryptoKeyVersion $crypto_key_version + * Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * initial field values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated 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][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * initial field values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\CryptoKeyVersion|null + */ + public function getCryptoKeyVersion() + { + return $this->crypto_key_version; + } + + public function hasCryptoKeyVersion() + { + return isset($this->crypto_key_version); + } + + public function clearCryptoKeyVersion() + { + unset($this->crypto_key_version); + } + + /** + * Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * initial field values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $var + * @return $this + */ + public function setCryptoKeyVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); + $this->crypto_key_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php new file mode 100644 index 000000000000..f3a7bcc9bcdb --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php @@ -0,0 +1,162 @@ +google.cloud.kms.v1.CreateEkmConnectionRequest + */ +class CreateEkmConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location associated with the + * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * + * Generated from protobuf field string ekm_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ekm_connection_id = ''; + /** + * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with + * initial field values. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ekm_connection = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location associated with the + * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format + * `projects/*/locations/*`. + * @type string $ekm_connection_id + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * @type \Google\Cloud\Kms\V1\EkmConnection $ekm_connection + * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with + * initial field values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location associated with the + * [EkmConnection][google.cloud.kms.v1.EkmConnection], 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 resource name of the location associated with the + * [EkmConnection][google.cloud.kms.v1.EkmConnection], 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. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * + * Generated from protobuf field string ekm_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEkmConnectionId() + { + return $this->ekm_connection_id; + } + + /** + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * + * Generated from protobuf field string ekm_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEkmConnectionId($var) + { + GPBUtil::checkString($var, True); + $this->ekm_connection_id = $var; + + return $this; + } + + /** + * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with + * initial field values. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\EkmConnection|null + */ + public function getEkmConnection() + { + return $this->ekm_connection; + } + + public function hasEkmConnection() + { + return isset($this->ekm_connection); + } + + public function clearEkmConnection() + { + unset($this->ekm_connection); + } + + /** + * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with + * initial field values. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\EkmConnection $var + * @return $this + */ + public function setEkmConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\EkmConnection::class); + $this->ekm_connection = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php new file mode 100644 index 000000000000..352e0efd34f9 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php @@ -0,0 +1,162 @@ +google.cloud.kms.v1.CreateImportJobRequest + */ +class CreateImportJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the + * [ImportJobs][google.cloud.kms.v1.ImportJob]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $import_job_id = ''; + /** + * Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $import_job = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the + * [ImportJobs][google.cloud.kms.v1.ImportJob]. + * @type string $import_job_id + * Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * @type \Google\Cloud\Kms\V1\ImportJob $import_job + * Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field + * values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the + * [ImportJobs][google.cloud.kms.v1.ImportJob]. + * + * Generated 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][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the + * [ImportJobs][google.cloud.kms.v1.ImportJob]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * 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. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * 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. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\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. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\ImportJob $var + * @return $this + */ + public function setImportJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ImportJob::class); + $this->import_job = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php new file mode 100644 index 000000000000..7a4f6e623ca2 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php @@ -0,0 +1,162 @@ +google.cloud.kms.v1.CreateKeyRingRequest + */ +class CreateKeyRingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key_ring_id = ''; + /** + * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key_ring = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. + * @type string $key_ring_id + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * @type \Google\Cloud\Kms\V1\KeyRing $key_ring + * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field + * values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], 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 resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], 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. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKeyRingId() + { + return $this->key_ring_id; + } + + /** + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * + * Generated from protobuf field string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKeyRingId($var) + { + GPBUtil::checkString($var, True); + $this->key_ring_id = $var; + + return $this; + } + + /** + * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\KeyRing|null + */ + public function getKeyRing() + { + return $this->key_ring; + } + + public function hasKeyRing() + { + return isset($this->key_ring); + } + + public function clearKeyRing() + { + unset($this->key_ring); + } + + /** + * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\KeyRing $var + * @return $this + */ + public function setKeyRing($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyRing::class); + $this->key_ring = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php new file mode 100644 index 000000000000..9af72cbcf36d --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php @@ -0,0 +1,676 @@ +google.cloud.kms.v1.CryptoKey + */ +class CryptoKey extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name for this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. A copy of the "primary" + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used + * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in + * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. + * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be + * updated via + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * may have a primary. For other keys, this field will be omitted. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $primary = null; + /** + * Immutable. The immutable purpose of this + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $purpose = 0; + /** + * Output only. The time at which this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], + * the Key Management Service will automatically: + * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * 2. Mark the new version as primary. + * Key rotations performed manually via + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * and + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] + * do not affect + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * support automatic rotation. For other keys, this field must be omitted. + * + * Generated from protobuf field .google.protobuf.Timestamp next_rotation_time = 7; + */ + protected $next_rotation_time = null; + /** + * A template describing settings for new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The + * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * instances created by either + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or auto-rotation are controlled by this template. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11; + */ + protected $version_template = null; + /** + * Labels with user-defined metadata. For more information, see + * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). + * + * Generated from protobuf field map labels = 10; + */ + private $labels; + /** + * Immutable. Whether this key may contain imported versions only. + * + * Generated from protobuf field bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $import_only = false; + /** + * Immutable. The period of time that versions of this key spend in the + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + * state before transitioning to + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * If not specified at creation time, the default duration is 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $destroy_scheduled_duration = null; + /** + * Immutable. The resource name of the backend environment where the key + * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and + * where all related cryptographic operations are performed. Only applicable + * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of + * [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the + * resource name in the format `projects/*/locations/*/ekmConnections/*`. + * Note, this list is non-exhaustive and may apply to additional + * [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future. + * + * Generated from protobuf field string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $crypto_key_backend = ''; + protected $rotation_schedule; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name for this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * @type \Google\Cloud\Kms\V1\CryptoKeyVersion $primary + * Output only. A copy of the "primary" + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used + * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in + * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. + * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be + * updated via + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * may have a primary. For other keys, this field will be omitted. + * @type int $purpose + * Immutable. The immutable purpose of this + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. + * @type \Google\Protobuf\Timestamp $next_rotation_time + * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], + * the Key Management Service will automatically: + * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * 2. Mark the new version as primary. + * Key rotations performed manually via + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * and + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] + * do not affect + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * support automatic rotation. For other keys, this field must be omitted. + * @type \Google\Protobuf\Duration $rotation_period + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] + * will be advanced by this period when the service automatically rotates a + * key. Must be at least 24 hours and at most 876,000 hours. + * If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is + * set, + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] + * must also be set. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * support automatic rotation. For other keys, this field must be omitted. + * @type \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate $version_template + * A template describing settings for new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The + * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * instances created by either + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or auto-rotation are controlled by this template. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels with user-defined metadata. For more information, see + * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). + * @type bool $import_only + * Immutable. Whether this key may contain imported versions only. + * @type \Google\Protobuf\Duration $destroy_scheduled_duration + * Immutable. The period of time that versions of this key spend in the + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + * state before transitioning to + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * If not specified at creation time, the default duration is 24 hours. + * @type string $crypto_key_backend + * Immutable. The resource name of the backend environment where the key + * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and + * where all related cryptographic operations are performed. Only applicable + * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of + * [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the + * resource name in the format `projects/*/locations/*/ekmConnections/*`. + * Note, this list is non-exhaustive and may apply to additional + * [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name for this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * 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 for this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * 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. A copy of the "primary" + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used + * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in + * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. + * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be + * updated via + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * may have a primary. For other keys, this field will be omitted. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Kms\V1\CryptoKeyVersion|null + */ + public function getPrimary() + { + return $this->primary; + } + + public function hasPrimary() + { + return isset($this->primary); + } + + public function clearPrimary() + { + unset($this->primary); + } + + /** + * Output only. A copy of the "primary" + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used + * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in + * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. + * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be + * updated via + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * may have a primary. For other keys, this field will be omitted. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $var + * @return $this + */ + public function setPrimary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); + $this->primary = $var; + + return $this; + } + + /** + * Immutable. The immutable purpose of this + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getPurpose() + { + return $this->purpose; + } + + /** + * Immutable. The immutable purpose of this + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setPurpose($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKey\CryptoKeyPurpose::class); + $this->purpose = $var; + + return $this; + } + + /** + * Output only. The time at which this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. + * + * 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. The time at which this + * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. + * + * 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; + } + + /** + * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], + * the Key Management Service will automatically: + * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * 2. Mark the new version as primary. + * Key rotations performed manually via + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * and + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] + * do not affect + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * support automatic rotation. For other keys, this field must be omitted. + * + * Generated from protobuf field .google.protobuf.Timestamp next_rotation_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNextRotationTime() + { + return $this->next_rotation_time; + } + + public function hasNextRotationTime() + { + return isset($this->next_rotation_time); + } + + public function clearNextRotationTime() + { + unset($this->next_rotation_time); + } + + /** + * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], + * the Key Management Service will automatically: + * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * 2. Mark the new version as primary. + * Key rotations performed manually via + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * and + * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] + * do not affect + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * support automatic rotation. For other keys, this field must be omitted. + * + * Generated from protobuf field .google.protobuf.Timestamp next_rotation_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNextRotationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->next_rotation_time = $var; + + return $this; + } + + /** + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] + * will be advanced by this period when the service automatically rotates a + * key. Must be at least 24 hours and at most 876,000 hours. + * If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is + * set, + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] + * must also be set. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * support automatic rotation. For other keys, this field must be omitted. + * + * Generated from protobuf field .google.protobuf.Duration rotation_period = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getRotationPeriod() + { + return $this->readOneof(8); + } + + public function hasRotationPeriod() + { + return $this->hasOneof(8); + } + + /** + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] + * will be advanced by this period when the service automatically rotates a + * key. Must be at least 24 hours and at most 876,000 hours. + * If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is + * set, + * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] + * must also be set. + * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] + * support automatic rotation. For other keys, this field must be omitted. + * + * Generated from protobuf field .google.protobuf.Duration rotation_period = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRotationPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * A template describing settings for new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The + * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * instances created by either + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or auto-rotation are controlled by this template. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11; + * @return \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate|null + */ + public function getVersionTemplate() + { + return $this->version_template; + } + + public function hasVersionTemplate() + { + return isset($this->version_template); + } + + public function clearVersionTemplate() + { + unset($this->version_template); + } + + /** + * A template describing settings for new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The + * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * instances created by either + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or auto-rotation are controlled by this template. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11; + * @param \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate $var + * @return $this + */ + public function setVersionTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate::class); + $this->version_template = $var; + + return $this; + } + + /** + * Labels with user-defined metadata. For more information, see + * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). + * + * Generated from protobuf field map labels = 10; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels with user-defined metadata. For more information, see + * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). + * + * Generated from protobuf field map labels = 10; + * @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; + } + + /** + * Immutable. Whether this key may contain imported versions only. + * + * Generated from protobuf field bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * @return bool + */ + public function getImportOnly() + { + return $this->import_only; + } + + /** + * Immutable. Whether this key may contain imported versions only. + * + * Generated from protobuf field bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE]; + * @param bool $var + * @return $this + */ + public function setImportOnly($var) + { + GPBUtil::checkBool($var); + $this->import_only = $var; + + return $this; + } + + /** + * Immutable. The period of time that versions of this key spend in the + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + * state before transitioning to + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * If not specified at creation time, the default duration is 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Protobuf\Duration|null + */ + public function getDestroyScheduledDuration() + { + return $this->destroy_scheduled_duration; + } + + public function hasDestroyScheduledDuration() + { + return isset($this->destroy_scheduled_duration); + } + + public function clearDestroyScheduledDuration() + { + unset($this->destroy_scheduled_duration); + } + + /** + * Immutable. The period of time that versions of this key spend in the + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + * state before transitioning to + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * If not specified at creation time, the default duration is 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDestroyScheduledDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->destroy_scheduled_duration = $var; + + return $this; + } + + /** + * Immutable. The resource name of the backend environment where the key + * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and + * where all related cryptographic operations are performed. Only applicable + * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of + * [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the + * resource name in the format `projects/*/locations/*/ekmConnections/*`. + * Note, this list is non-exhaustive and may apply to additional + * [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future. + * + * Generated from protobuf field string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getCryptoKeyBackend() + { + return $this->crypto_key_backend; + } + + /** + * Immutable. The resource name of the backend environment where the key + * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and + * where all related cryptographic operations are performed. Only applicable + * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of + * [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the + * resource name in the format `projects/*/locations/*/ekmConnections/*`. + * Note, this list is non-exhaustive and may apply to additional + * [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future. + * + * Generated from protobuf field string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCryptoKeyBackend($var) + { + GPBUtil::checkString($var, True); + $this->crypto_key_backend = $var; + + return $this; + } + + /** + * @return string + */ + public function getRotationSchedule() + { + return $this->whichOneof("rotation_schedule"); + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php new file mode 100644 index 000000000000..91a23e63e4e2 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php @@ -0,0 +1,93 @@ +google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose + */ +class CryptoKeyPurpose +{ + /** + * Not specified. + * + * Generated from protobuf enum CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0; + */ + const CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0; + /** + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used + * with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and + * [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. + * + * Generated from protobuf enum ENCRYPT_DECRYPT = 1; + */ + const ENCRYPT_DECRYPT = 1; + /** + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used + * with + * [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign] + * and + * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + * + * Generated from protobuf enum ASYMMETRIC_SIGN = 5; + */ + const ASYMMETRIC_SIGN = 5; + /** + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used + * with + * [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt] + * and + * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + * + * Generated from protobuf enum ASYMMETRIC_DECRYPT = 6; + */ + const ASYMMETRIC_DECRYPT = 6; + /** + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used + * with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign]. + * + * Generated from protobuf enum MAC = 9; + */ + const MAC = 9; + + private static $valueToName = [ + self::CRYPTO_KEY_PURPOSE_UNSPECIFIED => 'CRYPTO_KEY_PURPOSE_UNSPECIFIED', + self::ENCRYPT_DECRYPT => 'ENCRYPT_DECRYPT', + self::ASYMMETRIC_SIGN => 'ASYMMETRIC_SIGN', + self::ASYMMETRIC_DECRYPT => 'ASYMMETRIC_DECRYPT', + self::MAC => 'MAC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CryptoKeyPurpose::class, \Google\Cloud\Kms\V1\CryptoKey_CryptoKeyPurpose::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php new file mode 100644 index 000000000000..c1c5f455f600 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php @@ -0,0 +1,731 @@ +google.cloud.kms.v1.CryptoKeyVersion + */ +class CryptoKeyVersion extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name for this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The current state of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3; + */ + protected $state = 0; + /** + * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] + * describing how crypto operations are performed with this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $protection_level = 0; + /** + * Output only. The + * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * supports. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $algorithm = 0; + /** + * Output only. Statement that was generated and signed by the HSM at key + * creation time. Use this statement to verify attributes of the key as stored + * on the HSM, independently of Google. Only provided for key versions with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $attestation = null; + /** + * Output only. The time at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] 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 this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * generated. + * + * Generated from protobuf field .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $generate_time = null; + /** + * Output only. The time this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is + * scheduled for destruction. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. + * + * Generated from protobuf field .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $destroy_time = null; + /** + * Output only. The time this CryptoKeyVersion's key material was + * destroyed. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * + * Generated from protobuf field .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $destroy_event_time = null; + /** + * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] + * used in the most recent import of this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if + * the underlying key material was imported. + * + * Generated from protobuf field string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $import_job = ''; + /** + * Output only. The time at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * most recently imported. + * + * Generated from protobuf field .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $import_time = null; + /** + * Output only. The root cause of the most recent import failure. Only present + * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. + * + * Generated from protobuf field string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $import_failure_reason = ''; + /** + * ExternalProtectionLevelOptions stores a group of additional fields for + * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that + * are specific to the + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level + * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] + * protection levels. + * + * Generated from protobuf field .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + */ + protected $external_protection_level_options = null; + /** + * Output only. Whether or not this key version is eligible for reimport, by + * being specified as a target in + * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. + * + * Generated from protobuf field bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reimport_eligible = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name for this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + * @type int $state + * The current state of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * @type int $protection_level + * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] + * describing how crypto operations are performed with this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * @type int $algorithm + * Output only. The + * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * supports. + * @type \Google\Cloud\Kms\V1\KeyOperationAttestation $attestation + * Output only. Statement that was generated and signed by the HSM at key + * creation time. Use this statement to verify attributes of the key as stored + * on the HSM, independently of Google. Only provided for key versions with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created. + * @type \Google\Protobuf\Timestamp $generate_time + * Output only. The time this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * generated. + * @type \Google\Protobuf\Timestamp $destroy_time + * Output only. The time this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is + * scheduled for destruction. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. + * @type \Google\Protobuf\Timestamp $destroy_event_time + * Output only. The time this CryptoKeyVersion's key material was + * destroyed. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * @type string $import_job + * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] + * used in the most recent import of this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if + * the underlying key material was imported. + * @type \Google\Protobuf\Timestamp $import_time + * Output only. The time at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * most recently imported. + * @type string $import_failure_reason + * Output only. The root cause of the most recent import failure. Only present + * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. + * @type \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions $external_protection_level_options + * ExternalProtectionLevelOptions stores a group of additional fields for + * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that + * are specific to the + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level + * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] + * protection levels. + * @type bool $reimport_eligible + * Output only. Whether or not this key version is eligible for reimport, by + * being specified as a target in + * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name for this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + * + * 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 for this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + * + * 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 current state of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionState::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] + * describing how crypto operations are performed with this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] + * describing how crypto operations are performed with this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + + /** + * Output only. The + * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * supports. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getAlgorithm() + { + return $this->algorithm; + } + + /** + * Output only. The + * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * supports. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setAlgorithm($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); + $this->algorithm = $var; + + return $this; + } + + /** + * Output only. Statement that was generated and signed by the HSM at key + * creation time. Use this statement to verify attributes of the key as stored + * on the HSM, independently of Google. Only provided for key versions with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Kms\V1\KeyOperationAttestation|null + */ + public function getAttestation() + { + return $this->attestation; + } + + public function hasAttestation() + { + return isset($this->attestation); + } + + public function clearAttestation() + { + unset($this->attestation); + } + + /** + * Output only. Statement that was generated and signed by the HSM at key + * creation time. Use this statement to verify attributes of the key as stored + * on the HSM, independently of Google. Only provided for key versions with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Kms\V1\KeyOperationAttestation $var + * @return $this + */ + public function setAttestation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyOperationAttestation::class); + $this->attestation = $var; + + return $this; + } + + /** + * Output only. The time at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] 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 at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] 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 this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * generated. + * + * Generated from protobuf field .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getGenerateTime() + { + return $this->generate_time; + } + + public function hasGenerateTime() + { + return isset($this->generate_time); + } + + public function clearGenerateTime() + { + unset($this->generate_time); + } + + /** + * Output only. The time this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * generated. + * + * Generated from protobuf field .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setGenerateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->generate_time = $var; + + return $this; + } + + /** + * Output only. The time this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is + * scheduled for destruction. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. + * + * Generated from protobuf field .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDestroyTime() + { + return $this->destroy_time; + } + + public function hasDestroyTime() + { + return isset($this->destroy_time); + } + + public function clearDestroyTime() + { + unset($this->destroy_time); + } + + /** + * Output only. The time this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is + * scheduled for destruction. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. + * + * Generated from protobuf field .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDestroyTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->destroy_time = $var; + + return $this; + } + + /** + * Output only. The time this CryptoKeyVersion's key material was + * destroyed. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * + * Generated from protobuf field .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDestroyEventTime() + { + return $this->destroy_event_time; + } + + public function hasDestroyEventTime() + { + return isset($this->destroy_event_time); + } + + public function clearDestroyEventTime() + { + unset($this->destroy_event_time); + } + + /** + * Output only. The time this CryptoKeyVersion's key material was + * destroyed. Only present if + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. + * + * Generated from protobuf field .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDestroyEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->destroy_event_time = $var; + + return $this; + } + + /** + * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] + * used in the most recent import of this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if + * the underlying key material was imported. + * + * Generated from protobuf field string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getImportJob() + { + return $this->import_job; + } + + /** + * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] + * used in the most recent import of this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if + * the underlying key material was imported. + * + * Generated from protobuf field string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setImportJob($var) + { + GPBUtil::checkString($var, True); + $this->import_job = $var; + + return $this; + } + + /** + * Output only. The time at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * most recently imported. + * + * Generated from protobuf field .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getImportTime() + { + return $this->import_time; + } + + public function hasImportTime() + { + return isset($this->import_time); + } + + public function clearImportTime() + { + unset($this->import_time); + } + + /** + * Output only. The time at which this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was + * most recently imported. + * + * Generated from protobuf field .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setImportTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->import_time = $var; + + return $this; + } + + /** + * Output only. The root cause of the most recent import failure. Only present + * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. + * + * Generated from protobuf field string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getImportFailureReason() + { + return $this->import_failure_reason; + } + + /** + * Output only. The root cause of the most recent import failure. Only present + * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. + * + * Generated from protobuf field string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setImportFailureReason($var) + { + GPBUtil::checkString($var, True); + $this->import_failure_reason = $var; + + return $this; + } + + /** + * ExternalProtectionLevelOptions stores a group of additional fields for + * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that + * are specific to the + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level + * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] + * protection levels. + * + * Generated from protobuf field .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * @return \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions|null + */ + public function getExternalProtectionLevelOptions() + { + return $this->external_protection_level_options; + } + + public function hasExternalProtectionLevelOptions() + { + return isset($this->external_protection_level_options); + } + + public function clearExternalProtectionLevelOptions() + { + unset($this->external_protection_level_options); + } + + /** + * ExternalProtectionLevelOptions stores a group of additional fields for + * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that + * are specific to the + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level + * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] + * protection levels. + * + * Generated from protobuf field .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; + * @param \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions $var + * @return $this + */ + public function setExternalProtectionLevelOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions::class); + $this->external_protection_level_options = $var; + + return $this; + } + + /** + * Output only. Whether or not this key version is eligible for reimport, by + * being specified as a target in + * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. + * + * Generated from protobuf field bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReimportEligible() + { + return $this->reimport_eligible; + } + + /** + * Output only. Whether or not this key version is eligible for reimport, by + * being specified as a target in + * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. + * + * Generated from protobuf field bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReimportEligible($var) + { + GPBUtil::checkBool($var); + $this->reimport_eligible = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php new file mode 100644 index 000000000000..aff5f795a9b2 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php @@ -0,0 +1,280 @@ +google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm + */ +class CryptoKeyVersionAlgorithm +{ + /** + * Not specified. + * + * Generated from protobuf enum CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0; + */ + const CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0; + /** + * Creates symmetric encryption keys. + * + * Generated from protobuf enum GOOGLE_SYMMETRIC_ENCRYPTION = 1; + */ + const GOOGLE_SYMMETRIC_ENCRYPTION = 1; + /** + * RSASSA-PSS 2048 bit key with a SHA256 digest. + * + * Generated from protobuf enum RSA_SIGN_PSS_2048_SHA256 = 2; + */ + const RSA_SIGN_PSS_2048_SHA256 = 2; + /** + * RSASSA-PSS 3072 bit key with a SHA256 digest. + * + * Generated from protobuf enum RSA_SIGN_PSS_3072_SHA256 = 3; + */ + const RSA_SIGN_PSS_3072_SHA256 = 3; + /** + * RSASSA-PSS 4096 bit key with a SHA256 digest. + * + * Generated from protobuf enum RSA_SIGN_PSS_4096_SHA256 = 4; + */ + const RSA_SIGN_PSS_4096_SHA256 = 4; + /** + * RSASSA-PSS 4096 bit key with a SHA512 digest. + * + * Generated from protobuf enum RSA_SIGN_PSS_4096_SHA512 = 15; + */ + const RSA_SIGN_PSS_4096_SHA512 = 15; + /** + * RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. + * + * Generated from protobuf enum RSA_SIGN_PKCS1_2048_SHA256 = 5; + */ + const RSA_SIGN_PKCS1_2048_SHA256 = 5; + /** + * RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. + * + * Generated from protobuf enum RSA_SIGN_PKCS1_3072_SHA256 = 6; + */ + const RSA_SIGN_PKCS1_3072_SHA256 = 6; + /** + * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. + * + * Generated from protobuf enum RSA_SIGN_PKCS1_4096_SHA256 = 7; + */ + const RSA_SIGN_PKCS1_4096_SHA256 = 7; + /** + * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. + * + * Generated from protobuf enum RSA_SIGN_PKCS1_4096_SHA512 = 16; + */ + const RSA_SIGN_PKCS1_4096_SHA512 = 16; + /** + * RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key. + * + * Generated from protobuf enum RSA_SIGN_RAW_PKCS1_2048 = 28; + */ + const RSA_SIGN_RAW_PKCS1_2048 = 28; + /** + * RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key. + * + * Generated from protobuf enum RSA_SIGN_RAW_PKCS1_3072 = 29; + */ + const RSA_SIGN_RAW_PKCS1_3072 = 29; + /** + * RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key. + * + * Generated from protobuf enum RSA_SIGN_RAW_PKCS1_4096 = 30; + */ + const RSA_SIGN_RAW_PKCS1_4096 = 30; + /** + * RSAES-OAEP 2048 bit key with a SHA256 digest. + * + * Generated from protobuf enum RSA_DECRYPT_OAEP_2048_SHA256 = 8; + */ + const RSA_DECRYPT_OAEP_2048_SHA256 = 8; + /** + * RSAES-OAEP 3072 bit key with a SHA256 digest. + * + * Generated from protobuf enum RSA_DECRYPT_OAEP_3072_SHA256 = 9; + */ + const RSA_DECRYPT_OAEP_3072_SHA256 = 9; + /** + * RSAES-OAEP 4096 bit key with a SHA256 digest. + * + * Generated from protobuf enum RSA_DECRYPT_OAEP_4096_SHA256 = 10; + */ + const RSA_DECRYPT_OAEP_4096_SHA256 = 10; + /** + * RSAES-OAEP 4096 bit key with a SHA512 digest. + * + * Generated from protobuf enum RSA_DECRYPT_OAEP_4096_SHA512 = 17; + */ + const RSA_DECRYPT_OAEP_4096_SHA512 = 17; + /** + * RSAES-OAEP 2048 bit key with a SHA1 digest. + * + * Generated from protobuf enum RSA_DECRYPT_OAEP_2048_SHA1 = 37; + */ + const RSA_DECRYPT_OAEP_2048_SHA1 = 37; + /** + * RSAES-OAEP 3072 bit key with a SHA1 digest. + * + * Generated from protobuf enum RSA_DECRYPT_OAEP_3072_SHA1 = 38; + */ + const RSA_DECRYPT_OAEP_3072_SHA1 = 38; + /** + * RSAES-OAEP 4096 bit key with a SHA1 digest. + * + * Generated from protobuf enum RSA_DECRYPT_OAEP_4096_SHA1 = 39; + */ + const RSA_DECRYPT_OAEP_4096_SHA1 = 39; + /** + * ECDSA on the NIST P-256 curve with a SHA256 digest. + * + * Generated from protobuf enum EC_SIGN_P256_SHA256 = 12; + */ + const EC_SIGN_P256_SHA256 = 12; + /** + * ECDSA on the NIST P-384 curve with a SHA384 digest. + * + * Generated from protobuf enum EC_SIGN_P384_SHA384 = 13; + */ + const EC_SIGN_P384_SHA384 = 13; + /** + * ECDSA on the non-NIST secp256k1 curve. This curve is only supported for + * HSM protection level. + * + * Generated from protobuf enum EC_SIGN_SECP256K1_SHA256 = 31; + */ + const EC_SIGN_SECP256K1_SHA256 = 31; + /** + * HMAC-SHA256 signing with a 256 bit key. + * + * Generated from protobuf enum HMAC_SHA256 = 32; + */ + const HMAC_SHA256 = 32; + /** + * HMAC-SHA1 signing with a 160 bit key. + * + * Generated from protobuf enum HMAC_SHA1 = 33; + */ + const HMAC_SHA1 = 33; + /** + * HMAC-SHA384 signing with a 384 bit key. + * + * Generated from protobuf enum HMAC_SHA384 = 34; + */ + const HMAC_SHA384 = 34; + /** + * HMAC-SHA512 signing with a 512 bit key. + * + * Generated from protobuf enum HMAC_SHA512 = 35; + */ + const HMAC_SHA512 = 35; + /** + * HMAC-SHA224 signing with a 224 bit key. + * + * Generated from protobuf enum HMAC_SHA224 = 36; + */ + const HMAC_SHA224 = 36; + /** + * Algorithm representing symmetric encryption by an external key manager. + * + * Generated from protobuf enum EXTERNAL_SYMMETRIC_ENCRYPTION = 18; + */ + const EXTERNAL_SYMMETRIC_ENCRYPTION = 18; + + private static $valueToName = [ + self::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED => 'CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED', + self::GOOGLE_SYMMETRIC_ENCRYPTION => 'GOOGLE_SYMMETRIC_ENCRYPTION', + self::RSA_SIGN_PSS_2048_SHA256 => 'RSA_SIGN_PSS_2048_SHA256', + self::RSA_SIGN_PSS_3072_SHA256 => 'RSA_SIGN_PSS_3072_SHA256', + self::RSA_SIGN_PSS_4096_SHA256 => 'RSA_SIGN_PSS_4096_SHA256', + self::RSA_SIGN_PSS_4096_SHA512 => 'RSA_SIGN_PSS_4096_SHA512', + self::RSA_SIGN_PKCS1_2048_SHA256 => 'RSA_SIGN_PKCS1_2048_SHA256', + self::RSA_SIGN_PKCS1_3072_SHA256 => 'RSA_SIGN_PKCS1_3072_SHA256', + self::RSA_SIGN_PKCS1_4096_SHA256 => 'RSA_SIGN_PKCS1_4096_SHA256', + self::RSA_SIGN_PKCS1_4096_SHA512 => 'RSA_SIGN_PKCS1_4096_SHA512', + self::RSA_SIGN_RAW_PKCS1_2048 => 'RSA_SIGN_RAW_PKCS1_2048', + self::RSA_SIGN_RAW_PKCS1_3072 => 'RSA_SIGN_RAW_PKCS1_3072', + self::RSA_SIGN_RAW_PKCS1_4096 => 'RSA_SIGN_RAW_PKCS1_4096', + self::RSA_DECRYPT_OAEP_2048_SHA256 => 'RSA_DECRYPT_OAEP_2048_SHA256', + self::RSA_DECRYPT_OAEP_3072_SHA256 => 'RSA_DECRYPT_OAEP_3072_SHA256', + self::RSA_DECRYPT_OAEP_4096_SHA256 => 'RSA_DECRYPT_OAEP_4096_SHA256', + self::RSA_DECRYPT_OAEP_4096_SHA512 => 'RSA_DECRYPT_OAEP_4096_SHA512', + self::RSA_DECRYPT_OAEP_2048_SHA1 => 'RSA_DECRYPT_OAEP_2048_SHA1', + self::RSA_DECRYPT_OAEP_3072_SHA1 => 'RSA_DECRYPT_OAEP_3072_SHA1', + self::RSA_DECRYPT_OAEP_4096_SHA1 => 'RSA_DECRYPT_OAEP_4096_SHA1', + self::EC_SIGN_P256_SHA256 => 'EC_SIGN_P256_SHA256', + self::EC_SIGN_P384_SHA384 => 'EC_SIGN_P384_SHA384', + self::EC_SIGN_SECP256K1_SHA256 => 'EC_SIGN_SECP256K1_SHA256', + self::HMAC_SHA256 => 'HMAC_SHA256', + self::HMAC_SHA1 => 'HMAC_SHA1', + self::HMAC_SHA384 => 'HMAC_SHA384', + self::HMAC_SHA512 => 'HMAC_SHA512', + self::HMAC_SHA224 => 'HMAC_SHA224', + self::EXTERNAL_SYMMETRIC_ENCRYPTION => 'EXTERNAL_SYMMETRIC_ENCRYPTION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CryptoKeyVersionAlgorithm::class, \Google\Cloud\Kms\V1\CryptoKeyVersion_CryptoKeyVersionAlgorithm::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php new file mode 100644 index 000000000000..a7baabed0346 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php @@ -0,0 +1,125 @@ +google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState + */ +class CryptoKeyVersionState +{ + /** + * Not specified. + * + * Generated from protobuf enum CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0; + */ + const CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0; + /** + * This version is still being generated. It may not be used, enabled, + * disabled, or destroyed yet. Cloud KMS will automatically mark this + * version + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + * as soon as the version is ready. + * + * Generated from protobuf enum PENDING_GENERATION = 5; + */ + const PENDING_GENERATION = 5; + /** + * This version may be used for cryptographic operations. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * This version may not be used, but the key material is still available, + * and the version can be placed back into the + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + * state. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + /** + * This version is destroyed, and the key material is no longer stored. + * This version may only become + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + * again if this version is + * [reimport_eligible][google.cloud.kms.v1.CryptoKeyVersion.reimport_eligible] + * and the original key material is reimported with a call to + * [KeyManagementService.ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion]. + * + * Generated from protobuf enum DESTROYED = 3; + */ + const DESTROYED = 3; + /** + * This version is scheduled for destruction, and will be destroyed soon. + * Call + * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + * to put it back into the + * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] + * state. + * + * Generated from protobuf enum DESTROY_SCHEDULED = 4; + */ + const DESTROY_SCHEDULED = 4; + /** + * This version is still being imported. It may not be used, enabled, + * disabled, or destroyed yet. Cloud KMS will automatically mark this + * version + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + * as soon as the version is ready. + * + * Generated from protobuf enum PENDING_IMPORT = 6; + */ + const PENDING_IMPORT = 6; + /** + * This version was not imported successfully. It may not be used, enabled, + * disabled, or destroyed. The submitted key material has been discarded. + * Additional details can be found in + * [CryptoKeyVersion.import_failure_reason][google.cloud.kms.v1.CryptoKeyVersion.import_failure_reason]. + * + * Generated from protobuf enum IMPORT_FAILED = 7; + */ + const IMPORT_FAILED = 7; + + private static $valueToName = [ + self::CRYPTO_KEY_VERSION_STATE_UNSPECIFIED => 'CRYPTO_KEY_VERSION_STATE_UNSPECIFIED', + self::PENDING_GENERATION => 'PENDING_GENERATION', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + self::DESTROYED => 'DESTROYED', + self::DESTROY_SCHEDULED => 'DESTROY_SCHEDULED', + self::PENDING_IMPORT => 'PENDING_IMPORT', + self::IMPORT_FAILED => 'IMPORT_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(CryptoKeyVersionState::class, \Google\Cloud\Kms\V1\CryptoKeyVersion_CryptoKeyVersionState::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php new file mode 100644 index 000000000000..33a471de9ad7 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php @@ -0,0 +1,67 @@ +google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView + */ +class CryptoKeyVersionView +{ + /** + * Default view for each + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not + * include the + * [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field. + * + * Generated from protobuf enum CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0; + */ + const CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0; + /** + * Provides all fields in each + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the + * [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation]. + * + * Generated from protobuf enum FULL = 1; + */ + const FULL = 1; + + private static $valueToName = [ + self::CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED => 'CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CryptoKeyVersionView::class, \Google\Cloud\Kms\V1\CryptoKeyVersion_CryptoKeyVersionView::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php new file mode 100644 index 000000000000..6f88091103eb --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php @@ -0,0 +1,150 @@ +google.cloud.kms.v1.CryptoKeyVersionTemplate + */ +class CryptoKeyVersionTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating + * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. Immutable. Defaults to + * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 1; + */ + protected $protection_level = 0; + /** + * Required. + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * to use when creating a + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. + * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both + * this field is omitted and + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $algorithm = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $protection_level + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating + * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. Immutable. Defaults to + * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. + * @type int $algorithm + * Required. + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * to use when creating a + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. + * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both + * this field is omitted and + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating + * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. Immutable. Defaults to + * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 1; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating + * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. Immutable. Defaults to + * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 1; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + + /** + * Required. + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * to use when creating a + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. + * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both + * this field is omitted and + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAlgorithm() + { + return $this->algorithm; + } + + /** + * Required. + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * to use when creating a + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this + * template. + * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both + * this field is omitted and + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAlgorithm($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); + $this->algorithm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion_CryptoKeyVersionAlgorithm.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion_CryptoKeyVersionAlgorithm.php new file mode 100644 index 000000000000..e86c255e1880 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion_CryptoKeyVersionAlgorithm.php @@ -0,0 +1,16 @@ +google.cloud.kms.v1.DecryptRequest + */ +class DecryptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The + * server will choose the appropriate version. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The encrypted data originally returned in + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * + * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ciphertext = ''; + /** + * Optional. Optional data that must match the data originally supplied in + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $additional_authenticated_data = ''; + /** + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) + * is equal to + * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ciphertext_crc32c = null; + /** + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) + * is equal to + * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $additional_authenticated_data_crc32c = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The + * server will choose the appropriate version. + * @type string $ciphertext + * Required. The encrypted data originally returned in + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * @type string $additional_authenticated_data + * Optional. Optional data that must match the data originally supplied in + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * @type \Google\Protobuf\Int64Value $ciphertext_crc32c + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) + * is equal to + * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * @type \Google\Protobuf\Int64Value $additional_authenticated_data_crc32c + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) + * is equal to + * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The + * server will choose the appropriate version. + * + * Generated 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 + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The + * server will choose the appropriate version. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 encrypted data originally returned in + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * + * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCiphertext() + { + return $this->ciphertext; + } + + /** + * Required. The encrypted data originally returned in + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * + * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCiphertext($var) + { + GPBUtil::checkString($var, False); + $this->ciphertext = $var; + + return $this; + } + + /** + * Optional. Optional data that must match the data originally supplied in + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAdditionalAuthenticatedData() + { + return $this->additional_authenticated_data; + } + + /** + * Optional. Optional data that must match the data originally supplied in + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAdditionalAuthenticatedData($var) + { + GPBUtil::checkString($var, False); + $this->additional_authenticated_data = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) + * is equal to + * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getCiphertextCrc32C() + { + return $this->ciphertext_crc32c; + } + + public function hasCiphertextCrc32C() + { + return isset($this->ciphertext_crc32c); + } + + public function clearCiphertextCrc32C() + { + unset($this->ciphertext_crc32c); + } + + /** + * Returns the unboxed value from getCiphertextCrc32C() + + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) + * is equal to + * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getCiphertextCrc32CUnwrapped() + { + return $this->readWrapperValue("ciphertext_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) + * is equal to + * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCiphertextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->ciphertext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) + * is equal to + * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setCiphertextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("ciphertext_crc32c", $var); + return $this;} + + /** + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) + * is equal to + * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getAdditionalAuthenticatedDataCrc32C() + { + return $this->additional_authenticated_data_crc32c; + } + + public function hasAdditionalAuthenticatedDataCrc32C() + { + return isset($this->additional_authenticated_data_crc32c); + } + + public function clearAdditionalAuthenticatedDataCrc32C() + { + unset($this->additional_authenticated_data_crc32c); + } + + /** + * Returns the unboxed value from getAdditionalAuthenticatedDataCrc32C() + + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) + * is equal to + * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getAdditionalAuthenticatedDataCrc32CUnwrapped() + { + return $this->readWrapperValue("additional_authenticated_data_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) + * is equal to + * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setAdditionalAuthenticatedDataCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->additional_authenticated_data_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) + * is equal to + * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setAdditionalAuthenticatedDataCrc32CUnwrapped($var) + { + $this->writeWrapperValue("additional_authenticated_data_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php new file mode 100644 index 000000000000..3910ec3ae0eb --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php @@ -0,0 +1,315 @@ +google.cloud.kms.v1.DecryptResponse + */ +class DecryptResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The decrypted data originally supplied in + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * + * Generated from protobuf field bytes plaintext = 1; + */ + protected $plaintext = ''; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. + * An integrity check of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: receiving this response message indicates that + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + */ + protected $plaintext_crc32c = null; + /** + * Whether the Decryption was performed using the primary key version. + * + * Generated from protobuf field bool used_primary = 3; + */ + protected $used_primary = false; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $plaintext + * The decrypted data originally supplied in + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * @type \Google\Protobuf\Int64Value $plaintext_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. + * An integrity check of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: receiving this response message indicates that + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * @type bool $used_primary + * Whether the Decryption was performed using the primary key version. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The decrypted data originally supplied in + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * + * Generated from protobuf field bytes plaintext = 1; + * @return string + */ + public function getPlaintext() + { + return $this->plaintext; + } + + /** + * The decrypted data originally supplied in + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * + * Generated from protobuf field bytes plaintext = 1; + * @param string $var + * @return $this + */ + public function setPlaintext($var) + { + GPBUtil::checkString($var, False); + $this->plaintext = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. + * An integrity check of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: receiving this response message indicates that + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @return \Google\Protobuf\Int64Value|null + */ + public function getPlaintextCrc32C() + { + return $this->plaintext_crc32c; + } + + public function hasPlaintextCrc32C() + { + return isset($this->plaintext_crc32c); + } + + public function clearPlaintextCrc32C() + { + unset($this->plaintext_crc32c); + } + + /** + * Returns the unboxed value from getPlaintextCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. + * An integrity check of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: receiving this response message indicates that + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @return int|string|null + */ + public function getPlaintextCrc32CUnwrapped() + { + return $this->readWrapperValue("plaintext_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. + * An integrity check of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: receiving this response message indicates that + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setPlaintextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->plaintext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. + * An integrity check of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * can be performed by computing the CRC32C checksum of + * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: receiving this response message indicates that + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to + * successfully decrypt the + * [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; + * @param int|string|null $var + * @return $this + */ + public function setPlaintextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("plaintext_crc32c", $var); + return $this;} + + /** + * Whether the Decryption was performed using the primary key version. + * + * Generated from protobuf field bool used_primary = 3; + * @return bool + */ + public function getUsedPrimary() + { + return $this->used_primary; + } + + /** + * Whether the Decryption was performed using the primary key version. + * + * Generated from protobuf field bool used_primary = 3; + * @param bool $var + * @return $this + */ + public function setUsedPrimary($var) + { + GPBUtil::checkBool($var); + $this->used_primary = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * decryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php new file mode 100644 index 000000000000..c9ade4150c68 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php @@ -0,0 +1,72 @@ +google.cloud.kms.v1.DestroyCryptoKeyVersionRequest + */ +class DestroyCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. + * + * 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 + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. + * + * Generated 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 + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php new file mode 100644 index 000000000000..90201ffc30de --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php @@ -0,0 +1,141 @@ +google.cloud.kms.v1.Digest + */ +class Digest extends \Google\Protobuf\Internal\Message +{ + protected $digest; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sha256 + * A message digest produced with the SHA-256 algorithm. + * @type string $sha384 + * A message digest produced with the SHA-384 algorithm. + * @type string $sha512 + * A message digest produced with the SHA-512 algorithm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * A message digest produced with the SHA-256 algorithm. + * + * Generated from protobuf field bytes sha256 = 1; + * @return string + */ + public function getSha256() + { + return $this->readOneof(1); + } + + public function hasSha256() + { + return $this->hasOneof(1); + } + + /** + * A message digest produced with the SHA-256 algorithm. + * + * Generated from protobuf field bytes sha256 = 1; + * @param string $var + * @return $this + */ + public function setSha256($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A message digest produced with the SHA-384 algorithm. + * + * Generated from protobuf field bytes sha384 = 2; + * @return string + */ + public function getSha384() + { + return $this->readOneof(2); + } + + public function hasSha384() + { + return $this->hasOneof(2); + } + + /** + * A message digest produced with the SHA-384 algorithm. + * + * Generated from protobuf field bytes sha384 = 2; + * @param string $var + * @return $this + */ + public function setSha384($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A message digest produced with the SHA-512 algorithm. + * + * Generated from protobuf field bytes sha512 = 3; + * @return string + */ + public function getSha512() + { + return $this->readOneof(3); + } + + public function hasSha512() + { + return $this->hasOneof(3); + } + + /** + * A message digest produced with the SHA-512 algorithm. + * + * Generated from protobuf field bytes sha512 = 3; + * @param string $var + * @return $this + */ + public function setSha512($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getDigest() + { + return $this->whichOneof("digest"); + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php new file mode 100644 index 000000000000..ea533eb191f4 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php @@ -0,0 +1,222 @@ +google.cloud.kms.v1.EkmConnection + */ +class EkmConnection extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name for the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format + * `projects/*/locations/*/ekmConnections/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The time at which the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * A list of + * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where + * the EKM can be reached. There should be one ServiceResolver per EKM + * replica. Currently, only a single + * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is + * supported. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection.ServiceResolver service_resolvers = 3; + */ + private $service_resolvers; + /** + * Optional. Etag of the currently stored + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * + * 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 + * Output only. The resource name for the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format + * `projects/*/locations/*/ekmConnections/*`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] was created. + * @type array<\Google\Cloud\Kms\V1\EkmConnection\ServiceResolver>|\Google\Protobuf\Internal\RepeatedField $service_resolvers + * A list of + * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where + * the EKM can be reached. There should be one ServiceResolver per EKM + * replica. Currently, only a single + * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is + * supported. + * @type string $etag + * Optional. Etag of the currently stored + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name for the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format + * `projects/*/locations/*/ekmConnections/*`. + * + * 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 for the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format + * `projects/*/locations/*/ekmConnections/*`. + * + * 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 time at which the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] 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 at which the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] 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; + } + + /** + * A list of + * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where + * the EKM can be reached. There should be one ServiceResolver per EKM + * replica. Currently, only a single + * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is + * supported. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection.ServiceResolver service_resolvers = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServiceResolvers() + { + return $this->service_resolvers; + } + + /** + * A list of + * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where + * the EKM can be reached. There should be one ServiceResolver per EKM + * replica. Currently, only a single + * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is + * supported. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection.ServiceResolver service_resolvers = 3; + * @param array<\Google\Cloud\Kms\V1\EkmConnection\ServiceResolver>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServiceResolvers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\EkmConnection\ServiceResolver::class); + $this->service_resolvers = $arr; + + return $this; + } + + /** + * Optional. Etag of the currently stored + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. Etag of the currently stored + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * + * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php new file mode 100644 index 000000000000..37e72fe4b1a8 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php @@ -0,0 +1,206 @@ +google.cloud.kms.v1.EkmConnection.ServiceResolver + */ +class ServiceResolver extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Service Directory service pointing to + * an EKM replica, in the format + * `projects/*/locations/*/namespaces/*/services/*`. + * + * Generated from protobuf field string service_directory_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $service_directory_service = ''; + /** + * Optional. The filter applied to the endpoints of the resolved service. If + * no filter is specified, all endpoints will be considered. An endpoint + * will be chosen arbitrarily from the filtered list for each request. + * For endpoint filter syntax and examples, see + * https://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest. + * + * Generated from protobuf field string endpoint_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $endpoint_filter = ''; + /** + * Required. The hostname of the EKM replica used at TLS and HTTP layers. + * + * Generated from protobuf field string hostname = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hostname = ''; + /** + * Required. A list of leaf server certificates used to authenticate HTTPS + * connections to the EKM replica. Currently, a maximum of 10 + * [Certificate][google.cloud.kms.v1.Certificate] is supported. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.Certificate server_certificates = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $server_certificates; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_directory_service + * Required. The resource name of the Service Directory service pointing to + * an EKM replica, in the format + * `projects/*/locations/*/namespaces/*/services/*`. + * @type string $endpoint_filter + * Optional. The filter applied to the endpoints of the resolved service. If + * no filter is specified, all endpoints will be considered. An endpoint + * will be chosen arbitrarily from the filtered list for each request. + * For endpoint filter syntax and examples, see + * https://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest. + * @type string $hostname + * Required. The hostname of the EKM replica used at TLS and HTTP layers. + * @type array<\Google\Cloud\Kms\V1\Certificate>|\Google\Protobuf\Internal\RepeatedField $server_certificates + * Required. A list of leaf server certificates used to authenticate HTTPS + * connections to the EKM replica. Currently, a maximum of 10 + * [Certificate][google.cloud.kms.v1.Certificate] is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Service Directory service pointing to + * an EKM replica, in the format + * `projects/*/locations/*/namespaces/*/services/*`. + * + * Generated from protobuf field string service_directory_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getServiceDirectoryService() + { + return $this->service_directory_service; + } + + /** + * Required. The resource name of the Service Directory service pointing to + * an EKM replica, in the format + * `projects/*/locations/*/namespaces/*/services/*`. + * + * Generated from protobuf field string service_directory_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServiceDirectoryService($var) + { + GPBUtil::checkString($var, True); + $this->service_directory_service = $var; + + return $this; + } + + /** + * Optional. The filter applied to the endpoints of the resolved service. If + * no filter is specified, all endpoints will be considered. An endpoint + * will be chosen arbitrarily from the filtered list for each request. + * For endpoint filter syntax and examples, see + * https://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest. + * + * Generated from protobuf field string endpoint_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEndpointFilter() + { + return $this->endpoint_filter; + } + + /** + * Optional. The filter applied to the endpoints of the resolved service. If + * no filter is specified, all endpoints will be considered. An endpoint + * will be chosen arbitrarily from the filtered list for each request. + * For endpoint filter syntax and examples, see + * https://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest. + * + * Generated from protobuf field string endpoint_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEndpointFilter($var) + { + GPBUtil::checkString($var, True); + $this->endpoint_filter = $var; + + return $this; + } + + /** + * Required. The hostname of the EKM replica used at TLS and HTTP layers. + * + * Generated from protobuf field string hostname = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * Required. The hostname of the EKM replica used at TLS and HTTP layers. + * + * Generated from protobuf field string hostname = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * Required. A list of leaf server certificates used to authenticate HTTPS + * connections to the EKM replica. Currently, a maximum of 10 + * [Certificate][google.cloud.kms.v1.Certificate] is supported. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.Certificate server_certificates = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServerCertificates() + { + return $this->server_certificates; + } + + /** + * Required. A list of leaf server certificates used to authenticate HTTPS + * connections to the EKM replica. Currently, a maximum of 10 + * [Certificate][google.cloud.kms.v1.Certificate] is supported. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.Certificate server_certificates = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Kms\V1\Certificate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServerCertificates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\Certificate::class); + $this->server_certificates = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ServiceResolver::class, \Google\Cloud\Kms\V1\EkmConnection_ServiceResolver::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection_ServiceResolver.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection_ServiceResolver.php new file mode 100644 index 000000000000..a69117ae72f2 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection_ServiceResolver.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.kms.v1.EkmService/ListEkmConnections', + $argument, + ['\Google\Cloud\Kms\V1\ListEkmConnectionsResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns metadata for a given + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * @param \Google\Cloud\Kms\V1\GetEkmConnectionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetEkmConnection(\Google\Cloud\Kms\V1\GetEkmConnectionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.EkmService/GetEkmConnection', + $argument, + ['\Google\Cloud\Kms\V1\EkmConnection', 'decode'], + $metadata, $options); + } + + /** + * Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given + * Project and Location. + * @param \Google\Cloud\Kms\V1\CreateEkmConnectionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateEkmConnection(\Google\Cloud\Kms\V1\CreateEkmConnectionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.EkmService/CreateEkmConnection', + $argument, + ['\Google\Cloud\Kms\V1\EkmConnection', 'decode'], + $metadata, $options); + } + + /** + * Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata. + * @param \Google\Cloud\Kms\V1\UpdateEkmConnectionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateEkmConnection(\Google\Cloud\Kms\V1\UpdateEkmConnectionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.EkmService/UpdateEkmConnection', + $argument, + ['\Google\Cloud\Kms\V1\EkmConnection', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php new file mode 100644 index 000000000000..0a6f7cf1ee97 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php @@ -0,0 +1,594 @@ +google.cloud.kms.v1.EncryptRequest + */ +class EncryptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] or + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * encryption. + * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server + * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The data to encrypt. Must be no larger than 64KiB. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $plaintext = ''; + /** + * Optional. Optional data that, if specified, must also be provided during + * decryption through + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the + * AAD must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $additional_authenticated_data = ''; + /** + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) + * is equal to + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $plaintext_crc32c = null; + /** + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) + * is equal to + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $additional_authenticated_data_crc32c = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] or + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * encryption. + * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server + * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. + * @type string $plaintext + * Required. The data to encrypt. Must be no larger than 64KiB. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * @type string $additional_authenticated_data + * Optional. Optional data that, if specified, must also be provided during + * decryption through + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the + * AAD must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * @type \Google\Protobuf\Int64Value $plaintext_crc32c + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) + * is equal to + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * @type \Google\Protobuf\Int64Value $additional_authenticated_data_crc32c + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) + * is equal to + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] or + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * encryption. + * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server + * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. + * + * Generated 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 + * [CryptoKey][google.cloud.kms.v1.CryptoKey] or + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * encryption. + * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server + * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 data to encrypt. Must be no larger than 64KiB. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPlaintext() + { + return $this->plaintext; + } + + /** + * Required. The data to encrypt. Must be no larger than 64KiB. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPlaintext($var) + { + GPBUtil::checkString($var, False); + $this->plaintext = $var; + + return $this; + } + + /** + * Optional. Optional data that, if specified, must also be provided during + * decryption through + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the + * AAD must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAdditionalAuthenticatedData() + { + return $this->additional_authenticated_data; + } + + /** + * Optional. Optional data that, if specified, must also be provided during + * decryption through + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the + * AAD must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * + * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAdditionalAuthenticatedData($var) + { + GPBUtil::checkString($var, False); + $this->additional_authenticated_data = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) + * is equal to + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getPlaintextCrc32C() + { + return $this->plaintext_crc32c; + } + + public function hasPlaintextCrc32C() + { + return isset($this->plaintext_crc32c); + } + + public function clearPlaintextCrc32C() + { + unset($this->plaintext_crc32c); + } + + /** + * Returns the unboxed value from getPlaintextCrc32C() + + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) + * is equal to + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getPlaintextCrc32CUnwrapped() + { + return $this->readWrapperValue("plaintext_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) + * is equal to + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setPlaintextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->plaintext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) + * is equal to + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setPlaintextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("plaintext_crc32c", $var); + return $this;} + + /** + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) + * is equal to + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getAdditionalAuthenticatedDataCrc32C() + { + return $this->additional_authenticated_data_crc32c; + } + + public function hasAdditionalAuthenticatedDataCrc32C() + { + return isset($this->additional_authenticated_data_crc32c); + } + + public function clearAdditionalAuthenticatedDataCrc32C() + { + unset($this->additional_authenticated_data_crc32c); + } + + /** + * Returns the unboxed value from getAdditionalAuthenticatedDataCrc32C() + + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) + * is equal to + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getAdditionalAuthenticatedDataCrc32CUnwrapped() + { + return $this->readWrapperValue("additional_authenticated_data_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) + * is equal to + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setAdditionalAuthenticatedDataCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->additional_authenticated_data_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) + * is equal to + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setAdditionalAuthenticatedDataCrc32CUnwrapped($var) + { + $this->writeWrapperValue("additional_authenticated_data_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php new file mode 100644 index 000000000000..7a18418344b6 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php @@ -0,0 +1,471 @@ +google.cloud.kms.v1.EncryptResponse + */ +class EncryptResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. Check this field to verify that the intended resource was used + * for encryption. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The encrypted data. + * + * Generated from protobuf field bytes ciphertext = 2; + */ + protected $ciphertext = ''; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * An integrity check of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * can be performed by computing the CRC32C checksum of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; + */ + protected $ciphertext_crc32c = null; + /** + * Integrity verification field. A flag indicating whether + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of + * this field indicates either that + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_plaintext_crc32c = 5; + */ + protected $verified_plaintext_crc32c = false; + /** + * Integrity verification field. A flag indicating whether + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A + * false value of this field indicates either that + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 6; + */ + protected $verified_additional_authenticated_data_crc32c = false; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. Check this field to verify that the intended resource was used + * for encryption. + * @type string $ciphertext + * The encrypted data. + * @type \Google\Protobuf\Int64Value $ciphertext_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * An integrity check of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * can be performed by computing the CRC32C checksum of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * @type bool $verified_plaintext_crc32c + * Integrity verification field. A flag indicating whether + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of + * this field indicates either that + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type bool $verified_additional_authenticated_data_crc32c + * Integrity verification field. A flag indicating whether + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A + * false value of this field indicates either that + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. Check this field to verify that the intended resource was used + * for encryption. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. Check this field to verify that the intended resource was used + * for encryption. + * + * 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 encrypted data. + * + * Generated from protobuf field bytes ciphertext = 2; + * @return string + */ + public function getCiphertext() + { + return $this->ciphertext; + } + + /** + * The encrypted data. + * + * Generated from protobuf field bytes ciphertext = 2; + * @param string $var + * @return $this + */ + public function setCiphertext($var) + { + GPBUtil::checkString($var, False); + $this->ciphertext = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * An integrity check of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * can be performed by computing the CRC32C checksum of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; + * @return \Google\Protobuf\Int64Value|null + */ + public function getCiphertextCrc32C() + { + return $this->ciphertext_crc32c; + } + + public function hasCiphertextCrc32C() + { + return isset($this->ciphertext_crc32c); + } + + public function clearCiphertextCrc32C() + { + unset($this->ciphertext_crc32c); + } + + /** + * Returns the unboxed value from getCiphertextCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * An integrity check of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * can be performed by computing the CRC32C checksum of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; + * @return int|string|null + */ + public function getCiphertextCrc32CUnwrapped() + { + return $this->readWrapperValue("ciphertext_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * An integrity check of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * can be performed by computing the CRC32C checksum of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCiphertextCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->ciphertext_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * An integrity check of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * can be performed by computing the CRC32C checksum of + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; + * @param int|string|null $var + * @return $this + */ + public function setCiphertextCrc32CUnwrapped($var) + { + $this->writeWrapperValue("ciphertext_crc32c", $var); + return $this;} + + /** + * Integrity verification field. A flag indicating whether + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of + * this field indicates either that + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_plaintext_crc32c = 5; + * @return bool + */ + public function getVerifiedPlaintextCrc32C() + { + return $this->verified_plaintext_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of + * this field indicates either that + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_plaintext_crc32c = 5; + * @param bool $var + * @return $this + */ + public function setVerifiedPlaintextCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_plaintext_crc32c = $var; + + return $this; + } + + /** + * Integrity verification field. A flag indicating whether + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A + * false value of this field indicates either that + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 6; + * @return bool + */ + public function getVerifiedAdditionalAuthenticatedDataCrc32C() + { + return $this->verified_additional_authenticated_data_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A + * false value of this field indicates either that + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 6; + * @param bool $var + * @return $this + */ + public function setVerifiedAdditionalAuthenticatedDataCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_additional_authenticated_data_crc32c = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in + * encryption. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php new file mode 100644 index 000000000000..9a8fb7d4fabb --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php @@ -0,0 +1,122 @@ +google.cloud.kms.v1.ExternalProtectionLevelOptions + */ +class ExternalProtectionLevelOptions extends \Google\Protobuf\Internal\Message +{ + /** + * The URI for an external resource that this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. + * + * Generated from protobuf field string external_key_uri = 1; + */ + protected $external_key_uri = ''; + /** + * The path to the external key material on the EKM when using + * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set + * this field instead of external_key_uri when using an + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field string ekm_connection_key_path = 2; + */ + protected $ekm_connection_key_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $external_key_uri + * The URI for an external resource that this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. + * @type string $ekm_connection_key_path + * The path to the external key material on the EKM when using + * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set + * this field instead of external_key_uri when using an + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The URI for an external resource that this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. + * + * Generated from protobuf field string external_key_uri = 1; + * @return string + */ + public function getExternalKeyUri() + { + return $this->external_key_uri; + } + + /** + * The URI for an external resource that this + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. + * + * Generated from protobuf field string external_key_uri = 1; + * @param string $var + * @return $this + */ + public function setExternalKeyUri($var) + { + GPBUtil::checkString($var, True); + $this->external_key_uri = $var; + + return $this; + } + + /** + * The path to the external key material on the EKM when using + * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set + * this field instead of external_key_uri when using an + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field string ekm_connection_key_path = 2; + * @return string + */ + public function getEkmConnectionKeyPath() + { + return $this->ekm_connection_key_path; + } + + /** + * The path to the external key material on the EKM when using + * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set + * this field instead of external_key_uri when using an + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field string ekm_connection_key_path = 2; + * @param string $var + * @return $this + */ + public function setEkmConnectionKeyPath($var) + { + GPBUtil::checkString($var, True); + $this->ekm_connection_key_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php new file mode 100644 index 000000000000..6d13898c4f0e --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php @@ -0,0 +1,156 @@ +google.cloud.kms.v1.GenerateRandomBytesRequest + */ +class GenerateRandomBytesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The project-specific location in which to generate random bytes. + * For example, "projects/my-project/locations/us-central1". + * + * Generated from protobuf field string location = 1; + */ + protected $location = ''; + /** + * The length in bytes of the amount of randomness to retrieve. Minimum 8 + * bytes, maximum 1024 bytes. + * + * Generated from protobuf field int32 length_bytes = 2; + */ + protected $length_bytes = 0; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when + * generating the random data. Currently, only + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is + * supported. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location + * The project-specific location in which to generate random bytes. + * For example, "projects/my-project/locations/us-central1". + * @type int $length_bytes + * The length in bytes of the amount of randomness to retrieve. Minimum 8 + * bytes, maximum 1024 bytes. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when + * generating the random data. Currently, only + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is + * supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The project-specific location in which to generate random bytes. + * For example, "projects/my-project/locations/us-central1". + * + * Generated from protobuf field string location = 1; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The project-specific location in which to generate random bytes. + * For example, "projects/my-project/locations/us-central1". + * + * 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 length in bytes of the amount of randomness to retrieve. Minimum 8 + * bytes, maximum 1024 bytes. + * + * Generated from protobuf field int32 length_bytes = 2; + * @return int + */ + public function getLengthBytes() + { + return $this->length_bytes; + } + + /** + * The length in bytes of the amount of randomness to retrieve. Minimum 8 + * bytes, maximum 1024 bytes. + * + * Generated from protobuf field int32 length_bytes = 2; + * @param int $var + * @return $this + */ + public function setLengthBytes($var) + { + GPBUtil::checkInt32($var); + $this->length_bytes = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when + * generating the random data. Currently, only + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is + * supported. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when + * generating the random data. Currently, only + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is + * supported. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php new file mode 100644 index 000000000000..4cf4401fde68 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php @@ -0,0 +1,211 @@ +google.cloud.kms.v1.GenerateRandomBytesResponse + */ +class GenerateRandomBytesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The generated data. + * + * Generated from protobuf field bytes data = 1; + */ + protected $data = ''; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. + * An integrity check of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * can be performed by computing the CRC32C checksum of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; + */ + protected $data_crc32c = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $data + * The generated data. + * @type \Google\Protobuf\Int64Value $data_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. + * An integrity check of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * can be performed by computing the CRC32C checksum of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The generated data. + * + * Generated from protobuf field bytes data = 1; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * The generated data. + * + * Generated from protobuf field bytes data = 1; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. + * An integrity check of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * can be performed by computing the CRC32C checksum of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; + * @return \Google\Protobuf\Int64Value|null + */ + public function getDataCrc32C() + { + return $this->data_crc32c; + } + + public function hasDataCrc32C() + { + return isset($this->data_crc32c); + } + + public function clearDataCrc32C() + { + unset($this->data_crc32c); + } + + /** + * Returns the unboxed value from getDataCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. + * An integrity check of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * can be performed by computing the CRC32C checksum of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; + * @return int|string|null + */ + public function getDataCrc32CUnwrapped() + { + return $this->readWrapperValue("data_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. + * An integrity check of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * can be performed by computing the CRC32C checksum of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setDataCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->data_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. + * An integrity check of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * can be performed by computing the CRC32C checksum of + * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] + * and comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; + * @param int|string|null $var + * @return $this + */ + public function setDataCrc32CUnwrapped($var) + { + $this->writeWrapperValue("data_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php new file mode 100644 index 000000000000..37ebfa8f1a2d --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php @@ -0,0 +1,72 @@ +google.cloud.kms.v1.GetCryptoKeyRequest + */ +class GetCryptoKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. + * + * 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 [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] 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][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php new file mode 100644 index 000000000000..87c283f3d087 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php @@ -0,0 +1,72 @@ +google.cloud.kms.v1.GetCryptoKeyVersionRequest + */ +class GetCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. + * + * 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 [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] 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][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php new file mode 100644 index 000000000000..fdc11636b7b3 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php @@ -0,0 +1,72 @@ +google.cloud.kms.v1.GetEkmConnectionRequest + */ +class GetEkmConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. + * + * 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 [name][google.cloud.kms.v1.EkmConnection.name] of the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] 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][google.cloud.kms.v1.EkmConnection.name] of the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php new file mode 100644 index 000000000000..cfba50de0ec1 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php @@ -0,0 +1,72 @@ +google.cloud.kms.v1.GetImportJobRequest + */ +class GetImportJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] to get. + * + * 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 [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] 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][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php new file mode 100644 index 000000000000..ecad944c5ea4 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php @@ -0,0 +1,72 @@ +google.cloud.kms.v1.GetKeyRingRequest + */ +class GetKeyRingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] to get. + * + * 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 [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] 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][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php new file mode 100644 index 000000000000..d778ff4e3c3c --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php @@ -0,0 +1,72 @@ +google.cloud.kms.v1.GetPublicKeyRequest + */ +class GetPublicKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. + * + * 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 [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key 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][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php new file mode 100644 index 000000000000..9018eb71ff7e --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php @@ -0,0 +1,491 @@ +google.cloud.kms.v1.ImportCryptoKeyVersionRequest + */ +class ImportCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. + * The create permission is only required on this key when creating a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of + * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to + * target for an import operation. If this field is not present, a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the + * supplied key material is created. + * If this field is present, the supplied key material is imported into + * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To + * import into an existing + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of + * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], + * have been previously created via [ImportCryptoKeyVersion][], and be in + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] + * or + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] + * state. The key material and algorithm must match the previous + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained + * key material. + * + * Generated from protobuf field string crypto_key_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $crypto_key_version = ''; + /** + * Required. The + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * of the key being imported. This does not need to match the + * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $algorithm = 0; + /** + * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key + * material. + * + * Generated from protobuf field string import_job = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $import_job = ''; + /** + * Optional. The wrapped key material to import. + * Before wrapping, key material must be formatted. If importing symmetric key + * material, the expected key material format is plain bytes. If importing + * asymmetric key material, the expected key material format is PKCS#8-encoded + * DER (the PrivateKeyInfo structure from RFC 5208). + * When wrapping with import methods + * ([RSA_OAEP_3072_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] + * or + * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] + * or + * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] + * or + * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256_AES_256]), + * this field must contain the concatenation of: + *

    + *
  1. An ephemeral AES-256 wrapping key wrapped with the + * [public_key][google.cloud.kms.v1.ImportJob.public_key] using + * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty + * label. + *
  2. + *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 + * key using AES-KWP (RFC 5649). + *
  4. + *
+ * This format is the same as the format produced by PKCS#11 mechanism + * CKM_RSA_AES_KEY_WRAP. + * When wrapping with import methods + * ([RSA_OAEP_3072_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] + * or + * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), + * this field must contain the formatted key to be imported, wrapped with the + * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP + * with SHA-256, MGF1 with SHA-256, and an empty label. + * + * Generated from protobuf field bytes wrapped_key = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $wrapped_key = ''; + protected $wrapped_key_material; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. + * The create permission is only required on this key when creating a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * @type string $crypto_key_version + * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of + * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to + * target for an import operation. If this field is not present, a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the + * supplied key material is created. + * If this field is present, the supplied key material is imported into + * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To + * import into an existing + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of + * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], + * have been previously created via [ImportCryptoKeyVersion][], and be in + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] + * or + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] + * state. The key material and algorithm must match the previous + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained + * key material. + * @type int $algorithm + * Required. The + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * of the key being imported. This does not need to match the + * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. + * @type string $import_job + * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key + * material. + * @type string $wrapped_key + * Optional. The wrapped key material to import. + * Before wrapping, key material must be formatted. If importing symmetric key + * material, the expected key material format is plain bytes. If importing + * asymmetric key material, the expected key material format is PKCS#8-encoded + * DER (the PrivateKeyInfo structure from RFC 5208). + * When wrapping with import methods + * ([RSA_OAEP_3072_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] + * or + * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] + * or + * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] + * or + * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256_AES_256]), + * this field must contain the concatenation of: + *
    + *
  1. An ephemeral AES-256 wrapping key wrapped with the + * [public_key][google.cloud.kms.v1.ImportJob.public_key] using + * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty + * label. + *
  2. + *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 + * key using AES-KWP (RFC 5649). + *
  4. + *
+ * This format is the same as the format produced by PKCS#11 mechanism + * CKM_RSA_AES_KEY_WRAP. + * When wrapping with import methods + * ([RSA_OAEP_3072_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] + * or + * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), + * this field must contain the formatted key to be imported, wrapped with the + * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP + * with SHA-256, MGF1 with SHA-256, and an empty label. + * @type string $rsa_aes_wrapped_key + * Optional. This field has the same meaning as + * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. + * Prefer to use that field in new work. Either that field or this field + * (but not both) must be specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. + * The create permission is only required on this key when creating a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated 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][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. + * The create permission is only required on this key when creating a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of + * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to + * target for an import operation. If this field is not present, a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the + * supplied key material is created. + * If this field is present, the supplied key material is imported into + * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To + * import into an existing + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of + * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], + * have been previously created via [ImportCryptoKeyVersion][], and be in + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] + * or + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] + * state. The key material and algorithm must match the previous + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained + * key material. + * + * Generated from protobuf field string crypto_key_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getCryptoKeyVersion() + { + return $this->crypto_key_version; + } + + /** + * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of + * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to + * target for an import operation. If this field is not present, a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the + * supplied key material is created. + * If this field is present, the supplied key material is imported into + * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To + * import into an existing + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of + * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], + * have been previously created via [ImportCryptoKeyVersion][], and be in + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] + * or + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] + * state. The key material and algorithm must match the previous + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained + * key material. + * + * Generated from protobuf field string crypto_key_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCryptoKeyVersion($var) + { + GPBUtil::checkString($var, True); + $this->crypto_key_version = $var; + + return $this; + } + + /** + * Required. The + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * of the key being imported. This does not need to match the + * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAlgorithm() + { + return $this->algorithm; + } + + /** + * Required. The + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * of the key being imported. This does not need to match the + * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAlgorithm($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); + $this->algorithm = $var; + + return $this; + } + + /** + * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key + * material. + * + * Generated from protobuf field string import_job = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getImportJob() + { + return $this->import_job; + } + + /** + * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key + * material. + * + * Generated from protobuf field string import_job = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setImportJob($var) + { + GPBUtil::checkString($var, True); + $this->import_job = $var; + + return $this; + } + + /** + * Optional. The wrapped key material to import. + * Before wrapping, key material must be formatted. If importing symmetric key + * material, the expected key material format is plain bytes. If importing + * asymmetric key material, the expected key material format is PKCS#8-encoded + * DER (the PrivateKeyInfo structure from RFC 5208). + * When wrapping with import methods + * ([RSA_OAEP_3072_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] + * or + * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] + * or + * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] + * or + * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256_AES_256]), + * this field must contain the concatenation of: + *
    + *
  1. An ephemeral AES-256 wrapping key wrapped with the + * [public_key][google.cloud.kms.v1.ImportJob.public_key] using + * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty + * label. + *
  2. + *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 + * key using AES-KWP (RFC 5649). + *
  4. + *
+ * This format is the same as the format produced by PKCS#11 mechanism + * CKM_RSA_AES_KEY_WRAP. + * When wrapping with import methods + * ([RSA_OAEP_3072_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] + * or + * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), + * this field must contain the formatted key to be imported, wrapped with the + * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP + * with SHA-256, MGF1 with SHA-256, and an empty label. + * + * Generated from protobuf field bytes wrapped_key = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getWrappedKey() + { + return $this->wrapped_key; + } + + /** + * Optional. The wrapped key material to import. + * Before wrapping, key material must be formatted. If importing symmetric key + * material, the expected key material format is plain bytes. If importing + * asymmetric key material, the expected key material format is PKCS#8-encoded + * DER (the PrivateKeyInfo structure from RFC 5208). + * When wrapping with import methods + * ([RSA_OAEP_3072_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] + * or + * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] + * or + * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] + * or + * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256_AES_256]), + * this field must contain the concatenation of: + *
    + *
  1. An ephemeral AES-256 wrapping key wrapped with the + * [public_key][google.cloud.kms.v1.ImportJob.public_key] using + * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty + * label. + *
  2. + *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 + * key using AES-KWP (RFC 5649). + *
  4. + *
+ * This format is the same as the format produced by PKCS#11 mechanism + * CKM_RSA_AES_KEY_WRAP. + * When wrapping with import methods + * ([RSA_OAEP_3072_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] + * or + * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), + * this field must contain the formatted key to be imported, wrapped with the + * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP + * with SHA-256, MGF1 with SHA-256, and an empty label. + * + * Generated from protobuf field bytes wrapped_key = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setWrappedKey($var) + { + GPBUtil::checkString($var, False); + $this->wrapped_key = $var; + + return $this; + } + + /** + * Optional. This field has the same meaning as + * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. + * Prefer to use that field in new work. Either that field or this field + * (but not both) must be specified. + * + * Generated from protobuf field bytes rsa_aes_wrapped_key = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRsaAesWrappedKey() + { + return $this->readOneof(5); + } + + public function hasRsaAesWrappedKey() + { + return $this->hasOneof(5); + } + + /** + * Optional. This field has the same meaning as + * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. + * Prefer to use that field in new work. Either that field or this field + * (but not both) must be specified. + * + * Generated from protobuf field bytes rsa_aes_wrapped_key = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRsaAesWrappedKey($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getWrappedKeyMaterial() + { + return $this->whichOneof("wrapped_key_material"); + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php new file mode 100644 index 000000000000..6eae364be08c --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php @@ -0,0 +1,549 @@ +google.cloud.kms.v1.ImportJob + */ +class ImportJob extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name for this + * [ImportJob][google.cloud.kms.v1.ImportJob] in the format + * `projects/*/locations/*/keyRings/*/importJobs/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. Immutable. The wrapping method to be used for incoming key + * material. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $import_method = 0; + /** + * Required. Immutable. The protection level of the + * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] + * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import + * into. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $protection_level = 0; + /** + * Output only. The time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] 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 time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key + * material was generated. + * + * Generated from protobuf field .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $generate_time = null; + /** + * Output only. The time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and + * can no longer be used to import key material. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] + * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is + * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_event_time = null; + /** + * Output only. The current state of the + * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The public key with which to wrap key material prior to + * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is + * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $public_key = null; + /** + * Output only. Statement that was generated and signed by the key creator + * (for example, an HSM) at key creation time. Use this statement to verify + * attributes of the key as stored on the HSM, independently of Google. + * Only present if the chosen + * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a + * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $attestation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name for this + * [ImportJob][google.cloud.kms.v1.ImportJob] in the format + * `projects/*/locations/*/keyRings/*/importJobs/*`. + * @type int $import_method + * Required. Immutable. The wrapping method to be used for incoming key + * material. + * @type int $protection_level + * Required. Immutable. The protection level of the + * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] + * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import + * into. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] was created. + * @type \Google\Protobuf\Timestamp $generate_time + * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key + * material was generated. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. The time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and + * can no longer be used to import key material. + * @type \Google\Protobuf\Timestamp $expire_event_time + * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] + * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is + * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. + * @type int $state + * Output only. The current state of the + * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. + * @type \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey $public_key + * Output only. The public key with which to wrap key material prior to + * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is + * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. + * @type \Google\Cloud\Kms\V1\KeyOperationAttestation $attestation + * Output only. Statement that was generated and signed by the key creator + * (for example, an HSM) at key creation time. Use this statement to verify + * attributes of the key as stored on the HSM, independently of Google. + * Only present if the chosen + * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a + * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name for this + * [ImportJob][google.cloud.kms.v1.ImportJob] in the format + * `projects/*/locations/*/keyRings/*/importJobs/*`. + * + * 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 for this + * [ImportJob][google.cloud.kms.v1.ImportJob] in the format + * `projects/*/locations/*/keyRings/*/importJobs/*`. + * + * 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; + } + + /** + * Required. Immutable. The wrapping method to be used for incoming key + * material. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getImportMethod() + { + return $this->import_method; + } + + /** + * Required. Immutable. The wrapping method to be used for incoming key + * material. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setImportMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ImportJob\ImportMethod::class); + $this->import_method = $var; + + return $this; + } + + /** + * Required. Immutable. The protection level of the + * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] + * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import + * into. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * Required. Immutable. The protection level of the + * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] + * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import + * into. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + + /** + * Output only. The time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] 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 time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] 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 time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key + * material was generated. + * + * Generated from protobuf field .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getGenerateTime() + { + return $this->generate_time; + } + + public function hasGenerateTime() + { + return isset($this->generate_time); + } + + public function clearGenerateTime() + { + unset($this->generate_time); + } + + /** + * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key + * material was generated. + * + * Generated from protobuf field .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setGenerateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->generate_time = $var; + + return $this; + } + + /** + * Output only. The time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and + * can no longer be used to import key material. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.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. The time at which this + * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and + * can no longer be used to import key material. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.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; + } + + /** + * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] + * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is + * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireEventTime() + { + return $this->expire_event_time; + } + + public function hasExpireEventTime() + { + return isset($this->expire_event_time); + } + + public function clearExpireEventTime() + { + unset($this->expire_event_time); + } + + /** + * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] + * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is + * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_event_time = $var; + + return $this; + } + + /** + * Output only. The current state of the + * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the + * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. + * + * Generated from protobuf field .google.cloud.kms.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\Kms\V1\ImportJob\ImportJobState::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The public key with which to wrap key material prior to + * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is + * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey|null + */ + public function getPublicKey() + { + return $this->public_key; + } + + public function hasPublicKey() + { + return isset($this->public_key); + } + + public function clearPublicKey() + { + unset($this->public_key); + } + + /** + * Output only. The public key with which to wrap key material prior to + * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is + * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. + * + * Generated from protobuf field .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey $var + * @return $this + */ + public function setPublicKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey::class); + $this->public_key = $var; + + return $this; + } + + /** + * Output only. Statement that was generated and signed by the key creator + * (for example, an HSM) at key creation time. Use this statement to verify + * attributes of the key as stored on the HSM, independently of Google. + * Only present if the chosen + * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a + * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Kms\V1\KeyOperationAttestation|null + */ + public function getAttestation() + { + return $this->attestation; + } + + public function hasAttestation() + { + return isset($this->attestation); + } + + public function clearAttestation() + { + unset($this->attestation); + } + + /** + * Output only. Statement that was generated and signed by the key creator + * (for example, an HSM) at key creation time. Use this statement to verify + * attributes of the key as stored on the HSM, independently of Google. + * Only present if the chosen + * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a + * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Kms\V1\KeyOperationAttestation $var + * @return $this + */ + public function setAttestation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyOperationAttestation::class); + $this->attestation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php new file mode 100644 index 000000000000..b6e7a3e918ae --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php @@ -0,0 +1,79 @@ +google.cloud.kms.v1.ImportJob.ImportJobState + */ +class ImportJobState +{ + /** + * Not specified. + * + * Generated from protobuf enum IMPORT_JOB_STATE_UNSPECIFIED = 0; + */ + const IMPORT_JOB_STATE_UNSPECIFIED = 0; + /** + * The wrapping key for this job is still being generated. It may not be + * used. Cloud KMS will automatically mark this job as + * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] as soon as + * the wrapping key is generated. + * + * Generated from protobuf enum PENDING_GENERATION = 1; + */ + const PENDING_GENERATION = 1; + /** + * This job may be used in + * [CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey] + * and + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * requests. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * This job can no longer be used and may not leave this state once entered. + * + * Generated from protobuf enum EXPIRED = 3; + */ + const EXPIRED = 3; + + private static $valueToName = [ + self::IMPORT_JOB_STATE_UNSPECIFIED => 'IMPORT_JOB_STATE_UNSPECIFIED', + self::PENDING_GENERATION => 'PENDING_GENERATION', + self::ACTIVE => 'ACTIVE', + self::EXPIRED => 'EXPIRED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Kms\V1\ImportJob_ImportJobState::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php new file mode 100644 index 000000000000..f9a854116277 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php @@ -0,0 +1,120 @@ +google.cloud.kms.v1.ImportJob.ImportMethod + */ +class ImportMethod +{ + /** + * Not specified. + * + * Generated from protobuf enum IMPORT_METHOD_UNSPECIFIED = 0; + */ + const IMPORT_METHOD_UNSPECIFIED = 0; + /** + * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping + * scheme defined in the PKCS #11 standard. In summary, this involves + * wrapping the raw key with an ephemeral AES key, and wrapping the + * ephemeral AES key with a 3072 bit RSA key. For more details, see + * [RSA AES key wrap + * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908). + * + * Generated from protobuf enum RSA_OAEP_3072_SHA1_AES_256 = 1; + */ + const RSA_OAEP_3072_SHA1_AES_256 = 1; + /** + * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping + * scheme defined in the PKCS #11 standard. In summary, this involves + * wrapping the raw key with an ephemeral AES key, and wrapping the + * ephemeral AES key with a 4096 bit RSA key. For more details, see + * [RSA AES key wrap + * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908). + * + * Generated from protobuf enum RSA_OAEP_4096_SHA1_AES_256 = 2; + */ + const RSA_OAEP_4096_SHA1_AES_256 = 2; + /** + * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping + * scheme defined in the PKCS #11 standard. In summary, this involves + * wrapping the raw key with an ephemeral AES key, and wrapping the + * ephemeral AES key with a 3072 bit RSA key. For more details, see + * [RSA AES key wrap + * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908). + * + * Generated from protobuf enum RSA_OAEP_3072_SHA256_AES_256 = 3; + */ + const RSA_OAEP_3072_SHA256_AES_256 = 3; + /** + * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping + * scheme defined in the PKCS #11 standard. In summary, this involves + * wrapping the raw key with an ephemeral AES key, and wrapping the + * ephemeral AES key with a 4096 bit RSA key. For more details, see + * [RSA AES key wrap + * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908). + * + * Generated from protobuf enum RSA_OAEP_4096_SHA256_AES_256 = 4; + */ + const RSA_OAEP_4096_SHA256_AES_256 = 4; + /** + * This ImportMethod represents RSAES-OAEP with a 3072 bit RSA key. The + * key material to be imported is wrapped directly with the RSA key. Due + * to technical limitations of RSA wrapping, this method cannot be used to + * wrap RSA keys for import. + * + * Generated from protobuf enum RSA_OAEP_3072_SHA256 = 5; + */ + const RSA_OAEP_3072_SHA256 = 5; + /** + * This ImportMethod represents RSAES-OAEP with a 4096 bit RSA key. The + * key material to be imported is wrapped directly with the RSA key. Due + * to technical limitations of RSA wrapping, this method cannot be used to + * wrap RSA keys for import. + * + * Generated from protobuf enum RSA_OAEP_4096_SHA256 = 6; + */ + const RSA_OAEP_4096_SHA256 = 6; + + private static $valueToName = [ + self::IMPORT_METHOD_UNSPECIFIED => 'IMPORT_METHOD_UNSPECIFIED', + self::RSA_OAEP_3072_SHA1_AES_256 => 'RSA_OAEP_3072_SHA1_AES_256', + self::RSA_OAEP_4096_SHA1_AES_256 => 'RSA_OAEP_4096_SHA1_AES_256', + self::RSA_OAEP_3072_SHA256_AES_256 => 'RSA_OAEP_3072_SHA256_AES_256', + self::RSA_OAEP_4096_SHA256_AES_256 => 'RSA_OAEP_4096_SHA256_AES_256', + self::RSA_OAEP_3072_SHA256 => 'RSA_OAEP_3072_SHA256', + self::RSA_OAEP_4096_SHA256 => 'RSA_OAEP_4096_SHA256', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ImportMethod::class, \Google\Cloud\Kms\V1\ImportJob_ImportMethod::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php new file mode 100644 index 000000000000..63be4f5d952d --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php @@ -0,0 +1,88 @@ +google.cloud.kms.v1.ImportJob.WrappingPublicKey + */ +class WrappingPublicKey extends \Google\Protobuf\Internal\Message +{ + /** + * The public key, encoded in PEM format. For more information, see the [RFC + * 7468](https://tools.ietf.org/html/rfc7468) sections for [General + * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] + * (https://tools.ietf.org/html/rfc7468#section-13). + * + * Generated from protobuf field string pem = 1; + */ + protected $pem = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pem + * The public key, encoded in PEM format. For more information, see the [RFC + * 7468](https://tools.ietf.org/html/rfc7468) sections for [General + * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] + * (https://tools.ietf.org/html/rfc7468#section-13). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The public key, encoded in PEM format. For more information, see the [RFC + * 7468](https://tools.ietf.org/html/rfc7468) sections for [General + * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] + * (https://tools.ietf.org/html/rfc7468#section-13). + * + * Generated from protobuf field string pem = 1; + * @return string + */ + public function getPem() + { + return $this->pem; + } + + /** + * The public key, encoded in PEM format. For more information, see the [RFC + * 7468](https://tools.ietf.org/html/rfc7468) sections for [General + * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] + * (https://tools.ietf.org/html/rfc7468#section-13). + * + * Generated from protobuf field string pem = 1; + * @param string $var + * @return $this + */ + public function setPem($var) + { + GPBUtil::checkString($var, True); + $this->pem = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WrappingPublicKey::class, \Google\Cloud\Kms\V1\ImportJob_WrappingPublicKey::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob_ImportJobState.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob_ImportJobState.php new file mode 100644 index 000000000000..fa4e791d1237 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob_ImportJobState.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.kms.v1.KeyManagementService/ListKeyRings', + $argument, + ['\Google\Cloud\Kms\V1\ListKeyRingsResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * @param \Google\Cloud\Kms\V1\ListCryptoKeysRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListCryptoKeys(\Google\Cloud\Kms\V1\ListCryptoKeysRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/ListCryptoKeys', + $argument, + ['\Google\Cloud\Kms\V1\ListCryptoKeysResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * @param \Google\Cloud\Kms\V1\ListCryptoKeyVersionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListCryptoKeyVersions(\Google\Cloud\Kms\V1\ListCryptoKeyVersionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/ListCryptoKeyVersions', + $argument, + ['\Google\Cloud\Kms\V1\ListCryptoKeyVersionsResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists [ImportJobs][google.cloud.kms.v1.ImportJob]. + * @param \Google\Cloud\Kms\V1\ListImportJobsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListImportJobs(\Google\Cloud\Kms\V1\ListImportJobsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/ListImportJobs', + $argument, + ['\Google\Cloud\Kms\V1\ListImportJobsResponse', 'decode'], + $metadata, $options); + } + + /** + * Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing]. + * @param \Google\Cloud\Kms\V1\GetKeyRingRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetKeyRing(\Google\Cloud\Kms\V1\GetKeyRingRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/GetKeyRing', + $argument, + ['\Google\Cloud\Kms\V1\KeyRing', 'decode'], + $metadata, $options); + } + + /** + * Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as + * well as its [primary][google.cloud.kms.v1.CryptoKey.primary] + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * @param \Google\Cloud\Kms\V1\GetCryptoKeyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetCryptoKey(\Google\Cloud\Kms\V1\GetCryptoKeyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/GetCryptoKey', + $argument, + ['\Google\Cloud\Kms\V1\CryptoKey', 'decode'], + $metadata, $options); + } + + /** + * Returns metadata for a given + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * @param \Google\Cloud\Kms\V1\GetCryptoKeyVersionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetCryptoKeyVersion(\Google\Cloud\Kms\V1\GetCryptoKeyVersionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/GetCryptoKeyVersion', + $argument, + ['\Google\Cloud\Kms\V1\CryptoKeyVersion', 'decode'], + $metadata, $options); + } + + /** + * Returns the public key for the given + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + * [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] + * or + * [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT]. + * @param \Google\Cloud\Kms\V1\GetPublicKeyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetPublicKey(\Google\Cloud\Kms\V1\GetPublicKeyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/GetPublicKey', + $argument, + ['\Google\Cloud\Kms\V1\PublicKey', 'decode'], + $metadata, $options); + } + + /** + * Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob]. + * @param \Google\Cloud\Kms\V1\GetImportJobRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetImportJob(\Google\Cloud\Kms\V1\GetImportJobRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/GetImportJob', + $argument, + ['\Google\Cloud\Kms\V1\ImportJob', 'decode'], + $metadata, $options); + } + + /** + * Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and + * Location. + * @param \Google\Cloud\Kms\V1\CreateKeyRingRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateKeyRing(\Google\Cloud\Kms\V1\CreateKeyRingRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/CreateKeyRing', + $argument, + ['\Google\Cloud\Kms\V1\KeyRing', 'decode'], + $metadata, $options); + } + + /** + * Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a + * [KeyRing][google.cloud.kms.v1.KeyRing]. + * + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and + * [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm] + * are required. + * @param \Google\Cloud\Kms\V1\CreateCryptoKeyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateCryptoKey(\Google\Cloud\Kms\V1\CreateCryptoKeyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/CreateCryptoKey', + $argument, + ['\Google\Cloud\Kms\V1\CryptoKey', 'decode'], + $metadata, $options); + } + + /** + * Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * The server will assign the next sequential id. If unset, + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]. + * @param \Google\Cloud\Kms\V1\CreateCryptoKeyVersionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateCryptoKeyVersion(\Google\Cloud\Kms\V1\CreateCryptoKeyVersionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/CreateCryptoKeyVersion', + $argument, + ['\Google\Cloud\Kms\V1\CryptoKeyVersion', 'decode'], + $metadata, $options); + } + + /** + * Import wrapped key material into a + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * All requests must specify a [CryptoKey][google.cloud.kms.v1.CryptoKey]. If + * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] is additionally + * specified in the request, key material will be reimported into that + * version. Otherwise, a new version will be created, and will be assigned the + * next sequential id within the [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * @param \Google\Cloud\Kms\V1\ImportCryptoKeyVersionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ImportCryptoKeyVersion(\Google\Cloud\Kms\V1\ImportCryptoKeyVersionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/ImportCryptoKeyVersion', + $argument, + ['\Google\Cloud\Kms\V1\CryptoKeyVersion', 'decode'], + $metadata, $options); + } + + /** + * Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a + * [KeyRing][google.cloud.kms.v1.KeyRing]. + * + * [ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is + * required. + * @param \Google\Cloud\Kms\V1\CreateImportJobRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateImportJob(\Google\Cloud\Kms\V1\CreateImportJobRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/CreateImportJob', + $argument, + ['\Google\Cloud\Kms\V1\ImportJob', 'decode'], + $metadata, $options); + } + + /** + * Update a [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * @param \Google\Cloud\Kms\V1\UpdateCryptoKeyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateCryptoKey(\Google\Cloud\Kms\V1\UpdateCryptoKeyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKey', + $argument, + ['\Google\Cloud\Kms\V1\CryptoKey', 'decode'], + $metadata, $options); + } + + /** + * Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s + * metadata. + * + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + * and + * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] + * using this method. See + * [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion] + * and + * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + * to move between other states. + * @param \Google\Cloud\Kms\V1\UpdateCryptoKeyVersionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateCryptoKeyVersion(\Google\Cloud\Kms\V1\UpdateCryptoKeyVersionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyVersion', + $argument, + ['\Google\Cloud\Kms\V1\CryptoKeyVersion', 'decode'], + $metadata, $options); + } + + /** + * Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that + * will be used in + * [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. + * + * Returns an error if called on a key whose purpose is not + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * @param \Google\Cloud\Kms\V1\UpdateCryptoKeyPrimaryVersionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateCryptoKeyPrimaryVersion(\Google\Cloud\Kms\V1\UpdateCryptoKeyPrimaryVersionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyPrimaryVersion', + $argument, + ['\Google\Cloud\Kms\V1\CryptoKey', 'decode'], + $metadata, $options); + } + + /** + * Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for + * destruction. + * + * Upon calling this method, + * [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will + * be set to + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED], + * and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will + * be set to the time + * [destroy_scheduled_duration][google.cloud.kms.v1.CryptoKey.destroy_scheduled_duration] + * in the future. At that time, the + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will automatically + * change to + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED], + * and the key material will be irrevocably destroyed. + * + * Before the + * [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is + * reached, + * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + * may be called to reverse the process. + * @param \Google\Cloud\Kms\V1\DestroyCryptoKeyVersionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DestroyCryptoKeyVersion(\Google\Cloud\Kms\V1\DestroyCryptoKeyVersionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/DestroyCryptoKeyVersion', + $argument, + ['\Google\Cloud\Kms\V1\CryptoKeyVersion', 'decode'], + $metadata, $options); + } + + /** + * Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + * state. + * + * Upon restoration of the CryptoKeyVersion, + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to + * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED], + * and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will + * be cleared. + * @param \Google\Cloud\Kms\V1\RestoreCryptoKeyVersionRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RestoreCryptoKeyVersion(\Google\Cloud\Kms\V1\RestoreCryptoKeyVersionRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/RestoreCryptoKeyVersion', + $argument, + ['\Google\Cloud\Kms\V1\CryptoKeyVersion', 'decode'], + $metadata, $options); + } + + /** + * Encrypts data, so that it can only be recovered by a call to + * [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * @param \Google\Cloud\Kms\V1\EncryptRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function Encrypt(\Google\Cloud\Kms\V1\EncryptRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/Encrypt', + $argument, + ['\Google\Cloud\Kms\V1\EncryptResponse', 'decode'], + $metadata, $options); + } + + /** + * Decrypts data that was protected by + * [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * @param \Google\Cloud\Kms\V1\DecryptRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function Decrypt(\Google\Cloud\Kms\V1\DecryptRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/Decrypt', + $argument, + ['\Google\Cloud\Kms\V1\DecryptResponse', 'decode'], + $metadata, $options); + } + + /** + * Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + * ASYMMETRIC_SIGN, producing a signature that can be verified with the public + * key retrieved from + * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + * @param \Google\Cloud\Kms\V1\AsymmetricSignRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AsymmetricSign(\Google\Cloud\Kms\V1\AsymmetricSignRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/AsymmetricSign', + $argument, + ['\Google\Cloud\Kms\V1\AsymmetricSignResponse', 'decode'], + $metadata, $options); + } + + /** + * Decrypts data that was encrypted with a public key retrieved from + * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] + * corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + * ASYMMETRIC_DECRYPT. + * @param \Google\Cloud\Kms\V1\AsymmetricDecryptRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AsymmetricDecrypt(\Google\Cloud\Kms\V1\AsymmetricDecryptRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/AsymmetricDecrypt', + $argument, + ['\Google\Cloud\Kms\V1\AsymmetricDecryptResponse', 'decode'], + $metadata, $options); + } + + /** + * Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, + * producing a tag that can be verified by another source with the same key. + * @param \Google\Cloud\Kms\V1\MacSignRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function MacSign(\Google\Cloud\Kms\V1\MacSignRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/MacSign', + $argument, + ['\Google\Cloud\Kms\V1\MacSignResponse', 'decode'], + $metadata, $options); + } + + /** + * Verifies MAC tag using a + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, and returns + * a response that indicates whether or not the verification was successful. + * @param \Google\Cloud\Kms\V1\MacVerifyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function MacVerify(\Google\Cloud\Kms\V1\MacVerifyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/MacVerify', + $argument, + ['\Google\Cloud\Kms\V1\MacVerifyResponse', 'decode'], + $metadata, $options); + } + + /** + * Generate random bytes using the Cloud KMS randomness source in the provided + * location. + * @param \Google\Cloud\Kms\V1\GenerateRandomBytesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GenerateRandomBytes(\Google\Cloud\Kms\V1\GenerateRandomBytesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/GenerateRandomBytes', + $argument, + ['\Google\Cloud\Kms\V1\GenerateRandomBytesResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php new file mode 100644 index 000000000000..faed7bffa9e1 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php @@ -0,0 +1,151 @@ +google.cloud.kms.v1.KeyOperationAttestation + */ +class KeyOperationAttestation extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The format of the attestation data. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $format = 0; + /** + * Output only. The attestation data provided by the HSM when the key + * operation was performed. + * + * Generated from protobuf field bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $content = ''; + /** + * Output only. The certificate chains needed to validate the attestation + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cert_chains = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $format + * Output only. The format of the attestation data. + * @type string $content + * Output only. The attestation data provided by the HSM when the key + * operation was performed. + * @type \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains $cert_chains + * Output only. The certificate chains needed to validate the attestation + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The format of the attestation data. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFormat() + { + return $this->format; + } + + /** + * Output only. The format of the attestation data. + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\KeyOperationAttestation\AttestationFormat::class); + $this->format = $var; + + return $this; + } + + /** + * Output only. The attestation data provided by the HSM when the key + * operation was performed. + * + * Generated from protobuf field bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Output only. The attestation data provided by the HSM when the key + * operation was performed. + * + * Generated from protobuf field bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->content = $var; + + return $this; + } + + /** + * Output only. The certificate chains needed to validate the attestation + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains|null + */ + public function getCertChains() + { + return $this->cert_chains; + } + + public function hasCertChains() + { + return isset($this->cert_chains); + } + + public function clearCertChains() + { + unset($this->cert_chains); + } + + /** + * Output only. The certificate chains needed to validate the attestation + * + * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains $var + * @return $this + */ + public function setCertChains($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains::class); + $this->cert_chains = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php new file mode 100644 index 000000000000..43880fade2c1 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php @@ -0,0 +1,68 @@ +google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat + */ +class AttestationFormat +{ + /** + * Not specified. + * + * Generated from protobuf enum ATTESTATION_FORMAT_UNSPECIFIED = 0; + */ + const ATTESTATION_FORMAT_UNSPECIFIED = 0; + /** + * Cavium HSM attestation compressed with gzip. Note that this format is + * defined by Cavium and subject to change at any time. + * See + * https://www.marvell.com/products/security-solutions/nitrox-hs-adapters/software-key-attestation.html. + * + * Generated from protobuf enum CAVIUM_V1_COMPRESSED = 3; + */ + const CAVIUM_V1_COMPRESSED = 3; + /** + * Cavium HSM attestation V2 compressed with gzip. This is a new format + * introduced in Cavium's version 3.2-08. + * + * Generated from protobuf enum CAVIUM_V2_COMPRESSED = 4; + */ + const CAVIUM_V2_COMPRESSED = 4; + + private static $valueToName = [ + self::ATTESTATION_FORMAT_UNSPECIFIED => 'ATTESTATION_FORMAT_UNSPECIFIED', + self::CAVIUM_V1_COMPRESSED => 'CAVIUM_V1_COMPRESSED', + self::CAVIUM_V2_COMPRESSED => 'CAVIUM_V2_COMPRESSED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AttestationFormat::class, \Google\Cloud\Kms\V1\KeyOperationAttestation_AttestationFormat::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php new file mode 100644 index 000000000000..b1eef375ad42 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php @@ -0,0 +1,140 @@ +google.cloud.kms.v1.KeyOperationAttestation.CertificateChains + */ +class CertificateChains extends \Google\Protobuf\Internal\Message +{ + /** + * Cavium certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string cavium_certs = 1; + */ + private $cavium_certs; + /** + * Google card certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string google_card_certs = 2; + */ + private $google_card_certs; + /** + * Google partition certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string google_partition_certs = 3; + */ + private $google_partition_certs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $cavium_certs + * Cavium certificate chain corresponding to the attestation. + * @type array|\Google\Protobuf\Internal\RepeatedField $google_card_certs + * Google card certificate chain corresponding to the attestation. + * @type array|\Google\Protobuf\Internal\RepeatedField $google_partition_certs + * Google partition certificate chain corresponding to the attestation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Cavium certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string cavium_certs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCaviumCerts() + { + return $this->cavium_certs; + } + + /** + * Cavium certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string cavium_certs = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCaviumCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->cavium_certs = $arr; + + return $this; + } + + /** + * Google card certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string google_card_certs = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGoogleCardCerts() + { + return $this->google_card_certs; + } + + /** + * Google card certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string google_card_certs = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGoogleCardCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->google_card_certs = $arr; + + return $this; + } + + /** + * Google partition certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string google_partition_certs = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGooglePartitionCerts() + { + return $this->google_partition_certs; + } + + /** + * Google partition certificate chain corresponding to the attestation. + * + * Generated from protobuf field repeated string google_partition_certs = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGooglePartitionCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->google_partition_certs = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CertificateChains::class, \Google\Cloud\Kms\V1\KeyOperationAttestation_CertificateChains::class); + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation_AttestationFormat.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation_AttestationFormat.php new file mode 100644 index 000000000000..fe81af01dca8 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation_AttestationFormat.php @@ -0,0 +1,16 @@ +google.cloud.kms.v1.KeyRing + */ +class KeyRing extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name for the + * [KeyRing][google.cloud.kms.v1.KeyRing] in the format + * `projects/*/locations/*/keyRings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] + * was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name for the + * [KeyRing][google.cloud.kms.v1.KeyRing] in the format + * `projects/*/locations/*/keyRings/*`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] + * was created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name for the + * [KeyRing][google.cloud.kms.v1.KeyRing] in the format + * `projects/*/locations/*/keyRings/*`. + * + * 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 for the + * [KeyRing][google.cloud.kms.v1.KeyRing] in the format + * `projects/*/locations/*/keyRings/*`. + * + * 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 time at which this [KeyRing][google.cloud.kms.v1.KeyRing] + * 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 at which this [KeyRing][google.cloud.kms.v1.KeyRing] + * 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; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php new file mode 100644 index 000000000000..21058e58aeea --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php @@ -0,0 +1,298 @@ +google.cloud.kms.v1.ListCryptoKeyVersionsRequest + */ +class ListCryptoKeyVersionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Optional limit on the number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the + * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * can subsequently be obtained by including the + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Optional pagination token, returned earlier via + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * The fields to include in the response. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView view = 4; + */ + protected $view = 0; + /** + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * @type int $page_size + * Optional. Optional limit on the number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the + * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * can subsequently be obtained by including the + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @type string $page_token + * Optional. Optional pagination token, returned earlier via + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token]. + * @type int $view + * The fields to include in the response. + * @type string $filter + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * @type string $order_by + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated 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 + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 limit on the number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the + * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * can subsequently be obtained by including the + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] + * in a subsequent request. If unspecified, the 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. Optional limit on the number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the + * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] + * can subsequently be obtained by including the + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] + * in a subsequent request. If unspecified, the 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. Optional pagination token, returned earlier via + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_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. Optional pagination token, returned earlier via + * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_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; + } + + /** + * The fields to include in the response. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView view = 4; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * The fields to include in the response. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView view = 4; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionView::class); + $this->view = $var; + + return $this; + } + + /** + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/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. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/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. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/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; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php new file mode 100644 index 000000000000..bbbe9ccb0775 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php @@ -0,0 +1,152 @@ +google.cloud.kms.v1.ListCryptoKeyVersionsResponse + */ +class ListCryptoKeyVersionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKeyVersion crypto_key_versions = 1; + */ + private $crypto_key_versions; + /** + * A token to retrieve next page of results. Pass this value in + * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the + * query. + * + * 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\Kms\V1\CryptoKeyVersion>|\Google\Protobuf\Internal\RepeatedField $crypto_key_versions + * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * @type string $next_page_token + * A token to retrieve next page of results. Pass this value in + * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] + * to retrieve the next page of results. + * @type int $total_size + * The total number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the + * query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKeyVersion crypto_key_versions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCryptoKeyVersions() + { + return $this->crypto_key_versions; + } + + /** + * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKeyVersion crypto_key_versions = 1; + * @param array<\Google\Cloud\Kms\V1\CryptoKeyVersion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCryptoKeyVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); + $this->crypto_key_versions = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] + * to retrieve 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 retrieve next page of results. Pass this value in + * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] + * to retrieve 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; + } + + /** + * The total number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the + * query. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the + * query. + * + * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php new file mode 100644 index 000000000000..f721f1bfcbe0 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php @@ -0,0 +1,294 @@ +google.cloud.kms.v1.ListCryptoKeysRequest + */ +class ListCryptoKeysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Optional limit on the number of + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. + * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be + * obtained by including the + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Optional pagination token, returned earlier via + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * The fields of the primary version to include in the response. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView version_view = 4; + */ + protected $version_view = 0; + /** + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * @type int $page_size + * Optional. Optional limit on the number of + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. + * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be + * obtained by including the + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @type string $page_token + * Optional. Optional pagination token, returned earlier via + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token]. + * @type int $version_view + * The fields of the primary version to include in the response. + * @type string $filter + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * @type string $order_by + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * + * Generated 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 [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 limit on the number of + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. + * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be + * obtained by including the + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] + * in a subsequent request. If unspecified, the 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. Optional limit on the number of + * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. + * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be + * obtained by including the + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] + * in a subsequent request. If unspecified, the 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. Optional pagination token, returned earlier via + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_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. Optional pagination token, returned earlier via + * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_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; + } + + /** + * The fields of the primary version to include in the response. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView version_view = 4; + * @return int + */ + public function getVersionView() + { + return $this->version_view; + } + + /** + * The fields of the primary version to include in the response. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView version_view = 4; + * @param int $var + * @return $this + */ + public function setVersionView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionView::class); + $this->version_view = $var; + + return $this; + } + + /** + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/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. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/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. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/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; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php new file mode 100644 index 000000000000..256c1b36b885 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php @@ -0,0 +1,148 @@ +google.cloud.kms.v1.ListCryptoKeysResponse + */ +class ListCryptoKeysResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKey crypto_keys = 1; + */ + private $crypto_keys; + /** + * A token to retrieve next page of results. Pass this value in + * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that + * matched the query. + * + * 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\Kms\V1\CryptoKey>|\Google\Protobuf\Internal\RepeatedField $crypto_keys + * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * @type string $next_page_token + * A token to retrieve next page of results. Pass this value in + * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] + * to retrieve the next page of results. + * @type int $total_size + * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that + * matched the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKey crypto_keys = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCryptoKeys() + { + return $this->crypto_keys; + } + + /** + * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKey crypto_keys = 1; + * @param array<\Google\Cloud\Kms\V1\CryptoKey>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCryptoKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\CryptoKey::class); + $this->crypto_keys = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] + * to retrieve 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 retrieve next page of results. Pass this value in + * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] + * to retrieve 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; + } + + /** + * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that + * matched the query. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that + * matched the query. + * + * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php new file mode 100644 index 000000000000..1b4874c79e55 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php @@ -0,0 +1,264 @@ +google.cloud.kms.v1.ListEkmConnectionsRequest + */ +class ListEkmConnectionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location associated with the + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Optional limit on the number of + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the + * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can + * subsequently be obtained by including the + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Optional pagination token, returned earlier via + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location associated with the + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format + * `projects/*/locations/*`. + * @type int $page_size + * Optional. Optional limit on the number of + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the + * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can + * subsequently be obtained by including the + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @type string $page_token + * Optional. Optional pagination token, returned earlier via + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token]. + * @type string $filter + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * @type string $order_by + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location associated with the + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, 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 resource name of the location associated with the + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, 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; + } + + /** + * Optional. Optional limit on the number of + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the + * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can + * subsequently be obtained by including the + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] + * in a subsequent request. If unspecified, the 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. Optional limit on the number of + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the + * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can + * subsequently be obtained by including the + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] + * in a subsequent request. If unspecified, the 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. Optional pagination token, returned earlier via + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_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. Optional pagination token, returned earlier via + * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_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. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * 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. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php new file mode 100644 index 000000000000..cf84a145df5e --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php @@ -0,0 +1,148 @@ +google.cloud.kms.v1.ListEkmConnectionsResponse + */ +class ListEkmConnectionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection ekm_connections = 1; + */ + private $ekm_connections; + /** + * A token to retrieve next page of results. Pass this value in + * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] + * that matched the query. + * + * 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\Kms\V1\EkmConnection>|\Google\Protobuf\Internal\RepeatedField $ekm_connections + * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. + * @type string $next_page_token + * A token to retrieve next page of results. Pass this value in + * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] + * to retrieve the next page of results. + * @type int $total_size + * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] + * that matched the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection ekm_connections = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEkmConnections() + { + return $this->ekm_connections; + } + + /** + * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection ekm_connections = 1; + * @param array<\Google\Cloud\Kms\V1\EkmConnection>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEkmConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\EkmConnection::class); + $this->ekm_connections = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] + * to retrieve 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 retrieve next page of results. Pass this value in + * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] + * to retrieve 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; + } + + /** + * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] + * that matched the query. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] + * that matched the query. + * + * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php new file mode 100644 index 000000000000..cd971a12e065 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php @@ -0,0 +1,260 @@ +google.cloud.kms.v1.ListImportJobsRequest + */ +class ListImportJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Optional limit on the number of + * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. + * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be + * obtained by including the + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Optional pagination token, returned earlier via + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * @type int $page_size + * Optional. Optional limit on the number of + * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. + * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be + * obtained by including the + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @type string $page_token + * Optional. Optional pagination token, returned earlier via + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token]. + * @type string $filter + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * @type string $order_by + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * + * Generated 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 [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 limit on the number of + * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. + * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be + * obtained by including the + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] + * in a subsequent request. If unspecified, the 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. Optional limit on the number of + * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. + * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be + * obtained by including the + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] + * in a subsequent request. If unspecified, the 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. Optional pagination token, returned earlier via + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_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. Optional pagination token, returned earlier via + * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_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. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * 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. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php new file mode 100644 index 000000000000..04f11ca76dd2 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php @@ -0,0 +1,148 @@ +google.cloud.kms.v1.ListImportJobsResponse + */ +class ListImportJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.ImportJob import_jobs = 1; + */ + private $import_jobs; + /** + * A token to retrieve next page of results. Pass this value in + * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that + * matched the query. + * + * 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\Kms\V1\ImportJob>|\Google\Protobuf\Internal\RepeatedField $import_jobs + * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. + * @type string $next_page_token + * A token to retrieve next page of results. Pass this value in + * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] + * to retrieve the next page of results. + * @type int $total_size + * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that + * matched the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.ImportJob import_jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getImportJobs() + { + return $this->import_jobs; + } + + /** + * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.ImportJob import_jobs = 1; + * @param array<\Google\Cloud\Kms\V1\ImportJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setImportJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\ImportJob::class); + $this->import_jobs = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] + * to retrieve 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 retrieve next page of results. Pass this value in + * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] + * to retrieve 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; + } + + /** + * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that + * matched the query. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that + * matched the query. + * + * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php new file mode 100644 index 000000000000..0c0fc203c23f --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php @@ -0,0 +1,264 @@ +google.cloud.kms.v1.ListKeyRingsRequest + */ +class ListKeyRingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Optional limit on the number of + * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further + * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by + * including the + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Optional pagination token, returned earlier via + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token]. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. + * @type int $page_size + * Optional. Optional limit on the number of + * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further + * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by + * including the + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @type string $page_token + * Optional. Optional pagination token, returned earlier via + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token]. + * @type string $filter + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * @type string $order_by + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], 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 resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], 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; + } + + /** + * Optional. Optional limit on the number of + * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further + * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by + * including the + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] + * in a subsequent request. If unspecified, the 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. Optional limit on the number of + * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further + * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by + * including the + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] + * in a subsequent request. If unspecified, the 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. Optional pagination token, returned earlier via + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_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. Optional pagination token, returned earlier via + * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_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. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * 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. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * + * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php new file mode 100644 index 000000000000..3deac0ea2e0f --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php @@ -0,0 +1,148 @@ +google.cloud.kms.v1.ListKeyRingsResponse + */ +class ListKeyRingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.KeyRing key_rings = 1; + */ + private $key_rings; + /** + * A token to retrieve next page of results. Pass this value in + * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] + * to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched + * the query. + * + * 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\Kms\V1\KeyRing>|\Google\Protobuf\Internal\RepeatedField $key_rings + * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. + * @type string $next_page_token + * A token to retrieve next page of results. Pass this value in + * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] + * to retrieve the next page of results. + * @type int $total_size + * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched + * the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.KeyRing key_rings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getKeyRings() + { + return $this->key_rings; + } + + /** + * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. + * + * Generated from protobuf field repeated .google.cloud.kms.v1.KeyRing key_rings = 1; + * @param array<\Google\Cloud\Kms\V1\KeyRing>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setKeyRings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\KeyRing::class); + $this->key_rings = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. Pass this value in + * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] + * to retrieve 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 retrieve next page of results. Pass this value in + * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] + * to retrieve 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; + } + + /** + * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched + * the query. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched + * the query. + * + * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php new file mode 100644 index 000000000000..656adb13aac7 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php @@ -0,0 +1,126 @@ +google.cloud.kms.v1.LocationMetadata + */ +class LocationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this + * location. + * + * Generated from protobuf field bool hsm_available = 1; + */ + protected $hsm_available = false; + /** + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in + * this location. + * + * Generated from protobuf field bool ekm_available = 2; + */ + protected $ekm_available = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $hsm_available + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this + * location. + * @type bool $ekm_available + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in + * this location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this + * location. + * + * Generated from protobuf field bool hsm_available = 1; + * @return bool + */ + public function getHsmAvailable() + { + return $this->hsm_available; + } + + /** + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this + * location. + * + * Generated from protobuf field bool hsm_available = 1; + * @param bool $var + * @return $this + */ + public function setHsmAvailable($var) + { + GPBUtil::checkBool($var); + $this->hsm_available = $var; + + return $this; + } + + /** + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in + * this location. + * + * Generated from protobuf field bool ekm_available = 2; + * @return bool + */ + public function getEkmAvailable() + { + return $this->ekm_available; + } + + /** + * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in + * this location. + * + * Generated from protobuf field bool ekm_available = 2; + * @param bool $var + * @return $this + */ + public function setEkmAvailable($var) + { + GPBUtil::checkBool($var); + $this->ekm_available = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php new file mode 100644 index 000000000000..0ec1cc5f73b5 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php @@ -0,0 +1,281 @@ +google.cloud.kms.v1.MacSignRequest + */ +class MacSignRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The data to sign. The MAC tag is computed over this data field + * based on the specific algorithm. + * + * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data = ''; + /** + * Optional. An optional CRC32C checksum of the + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is + * equal to + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_crc32c = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * @type string $data + * Required. The data to sign. The MAC tag is computed over this data field + * based on the specific algorithm. + * @type \Google\Protobuf\Int64Value $data_crc32c + * Optional. An optional CRC32C checksum of the + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is + * equal to + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * + * Generated 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 + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 data to sign. The MAC tag is computed over this data field + * based on the specific algorithm. + * + * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Required. The data to sign. The MAC tag is computed over this data field + * based on the specific algorithm. + * + * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is + * equal to + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getDataCrc32C() + { + return $this->data_crc32c; + } + + public function hasDataCrc32C() + { + return isset($this->data_crc32c); + } + + public function clearDataCrc32C() + { + unset($this->data_crc32c); + } + + /** + * Returns the unboxed value from getDataCrc32C() + + * Optional. An optional CRC32C checksum of the + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is + * equal to + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getDataCrc32CUnwrapped() + { + return $this->readWrapperValue("data_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is + * equal to + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setDataCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->data_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is + * equal to + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setDataCrc32CUnwrapped($var) + { + $this->writeWrapperValue("data_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php new file mode 100644 index 000000000000..632a972782b3 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php @@ -0,0 +1,377 @@ +google.cloud.kms.v1.MacSignResponse + */ +class MacSignResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The created signature. + * + * Generated from protobuf field bytes mac = 2; + */ + protected $mac = ''; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An + * integrity check of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be + * performed by computing the CRC32C checksum of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] and + * comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; + */ + protected $mac_crc32c = null; + /** + * Integrity verification field. A flag indicating whether + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this + * field indicates either that + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 4; + */ + protected $verified_data_crc32c = false; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * @type string $mac + * The created signature. + * @type \Google\Protobuf\Int64Value $mac_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An + * integrity check of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be + * performed by computing the CRC32C checksum of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] and + * comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * @type bool $verified_data_crc32c + * Integrity verification field. A flag indicating whether + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this + * field indicates either that + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * Check this field to verify that the intended resource was used for signing. + * + * 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 created signature. + * + * Generated from protobuf field bytes mac = 2; + * @return string + */ + public function getMac() + { + return $this->mac; + } + + /** + * The created signature. + * + * Generated from protobuf field bytes mac = 2; + * @param string $var + * @return $this + */ + public function setMac($var) + { + GPBUtil::checkString($var, False); + $this->mac = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An + * integrity check of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be + * performed by computing the CRC32C checksum of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] and + * comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; + * @return \Google\Protobuf\Int64Value|null + */ + public function getMacCrc32C() + { + return $this->mac_crc32c; + } + + public function hasMacCrc32C() + { + return isset($this->mac_crc32c); + } + + public function clearMacCrc32C() + { + unset($this->mac_crc32c); + } + + /** + * Returns the unboxed value from getMacCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An + * integrity check of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be + * performed by computing the CRC32C checksum of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] and + * comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; + * @return int|string|null + */ + public function getMacCrc32CUnwrapped() + { + return $this->readWrapperValue("mac_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An + * integrity check of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be + * performed by computing the CRC32C checksum of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] and + * comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMacCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->mac_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An + * integrity check of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be + * performed by computing the CRC32C checksum of + * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] and + * comparing your results to this field. Discard the response in case of + * non-matching checksum values, and perform a limited number of retries. A + * persistent mismatch may indicate an issue in your computation of the CRC32C + * checksum. Note: This field is defined as int64 for reasons of compatibility + * across different languages. However, it is a non-negative integer, which + * will never exceed 2^32-1, and can be safely downconverted to uint32 in + * languages that support this type. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; + * @param int|string|null $var + * @return $this + */ + public function setMacCrc32CUnwrapped($var) + { + $this->writeWrapperValue("mac_crc32c", $var); + return $this;} + + /** + * Integrity verification field. A flag indicating whether + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this + * field indicates either that + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 4; + * @return bool + */ + public function getVerifiedDataCrc32C() + { + return $this->verified_data_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this + * field indicates either that + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 4; + * @param bool $var + * @return $this + */ + public function setVerifiedDataCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_data_crc32c = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php new file mode 100644 index 000000000000..b25755c32d6d --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php @@ -0,0 +1,486 @@ +google.cloud.kms.v1.MacVerifyRequest + */ +class MacVerifyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * verification. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The data used previously as a + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate + * the MAC tag. + * + * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data = ''; + /** + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) + * is equal to + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_crc32c = null; + /** + * Required. The signature to verify. + * + * Generated from protobuf field bytes mac = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mac = ''; + /** + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.tag][]) is equal to + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mac_crc32c = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * verification. + * @type string $data + * Required. The data used previously as a + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate + * the MAC tag. + * @type \Google\Protobuf\Int64Value $data_crc32c + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) + * is equal to + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * @type string $mac + * Required. The signature to verify. + * @type \Google\Protobuf\Int64Value $mac_crc32c + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.tag][]) is equal to + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * verification. + * + * Generated 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 + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * verification. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 data used previously as a + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate + * the MAC tag. + * + * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Required. The data used previously as a + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate + * the MAC tag. + * + * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) + * is equal to + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getDataCrc32C() + { + return $this->data_crc32c; + } + + public function hasDataCrc32C() + { + return isset($this->data_crc32c); + } + + public function clearDataCrc32C() + { + unset($this->data_crc32c); + } + + /** + * Returns the unboxed value from getDataCrc32C() + + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) + * is equal to + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getDataCrc32CUnwrapped() + { + return $this->readWrapperValue("data_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) + * is equal to + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setDataCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->data_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) + * is equal to + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setDataCrc32CUnwrapped($var) + { + $this->writeWrapperValue("data_crc32c", $var); + return $this;} + + /** + * Required. The signature to verify. + * + * Generated from protobuf field bytes mac = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMac() + { + return $this->mac; + } + + /** + * Required. The signature to verify. + * + * Generated from protobuf field bytes mac = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMac($var) + { + GPBUtil::checkString($var, False); + $this->mac = $var; + + return $this; + } + + /** + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.tag][]) is equal to + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getMacCrc32C() + { + return $this->mac_crc32c; + } + + public function hasMacCrc32C() + { + return isset($this->mac_crc32c); + } + + public function clearMacCrc32C() + { + unset($this->mac_crc32c); + } + + /** + * Returns the unboxed value from getMacCrc32C() + + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.tag][]) is equal to + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getMacCrc32CUnwrapped() + { + return $this->readWrapperValue("mac_crc32c"); + } + + /** + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.tag][]) is equal to + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMacCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->mac_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.tag][]) is equal to + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * + * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setMacCrc32CUnwrapped($var) + { + $this->writeWrapperValue("mac_crc32c", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php new file mode 100644 index 000000000000..457f9f454810 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php @@ -0,0 +1,386 @@ +google.cloud.kms.v1.MacVerifyResponse + */ +class MacVerifyResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. Check this field to verify that the intended resource was + * used for verification. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * This field indicates whether or not the verification operation for + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was + * successful. + * + * Generated from protobuf field bool success = 2; + */ + protected $success = false; + /** + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this + * field indicates either that + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 3; + */ + protected $verified_data_crc32c = false; + /** + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this + * field indicates either that + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_mac_crc32c = 4; + */ + protected $verified_mac_crc32c = false; + /** + * Integrity verification field. This value is used for the integrity + * verification of [MacVerifyResponse.success]. If the value of this field + * contradicts the value of [MacVerifyResponse.success], discard the response + * and perform a limited number of retries. + * + * Generated from protobuf field bool verified_success_integrity = 5; + */ + protected $verified_success_integrity = false; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. Check this field to verify that the intended resource was + * used for verification. + * @type bool $success + * This field indicates whether or not the verification operation for + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was + * successful. + * @type bool $verified_data_crc32c + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this + * field indicates either that + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type bool $verified_mac_crc32c + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this + * field indicates either that + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * @type bool $verified_success_integrity + * Integrity verification field. This value is used for the integrity + * verification of [MacVerifyResponse.success]. If the value of this field + * contradicts the value of [MacVerifyResponse.success], discard the response + * and perform a limited number of retries. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. Check this field to verify that the intended resource was + * used for verification. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. Check this field to verify that the intended resource was + * used for verification. + * + * 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; + } + + /** + * This field indicates whether or not the verification operation for + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was + * successful. + * + * Generated from protobuf field bool success = 2; + * @return bool + */ + public function getSuccess() + { + return $this->success; + } + + /** + * This field indicates whether or not the verification operation for + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was + * successful. + * + * Generated from protobuf field bool success = 2; + * @param bool $var + * @return $this + */ + public function setSuccess($var) + { + GPBUtil::checkBool($var); + $this->success = $var; + + return $this; + } + + /** + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this + * field indicates either that + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 3; + * @return bool + */ + public function getVerifiedDataCrc32C() + { + return $this->verified_data_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this + * field indicates either that + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_data_crc32c = 3; + * @param bool $var + * @return $this + */ + public function setVerifiedDataCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_data_crc32c = $var; + + return $this; + } + + /** + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this + * field indicates either that + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_mac_crc32c = 4; + * @return bool + */ + public function getVerifiedMacCrc32C() + { + return $this->verified_mac_crc32c; + } + + /** + * Integrity verification field. A flag indicating whether + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was received by + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used + * for the integrity verification of the + * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this + * field indicates either that + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * was left unset or that it was not delivered to + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've + * set + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] + * but this field is still false, discard the response and perform a limited + * number of retries. + * + * Generated from protobuf field bool verified_mac_crc32c = 4; + * @param bool $var + * @return $this + */ + public function setVerifiedMacCrc32C($var) + { + GPBUtil::checkBool($var); + $this->verified_mac_crc32c = $var; + + return $this; + } + + /** + * Integrity verification field. This value is used for the integrity + * verification of [MacVerifyResponse.success]. If the value of this field + * contradicts the value of [MacVerifyResponse.success], discard the response + * and perform a limited number of retries. + * + * Generated from protobuf field bool verified_success_integrity = 5; + * @return bool + */ + public function getVerifiedSuccessIntegrity() + { + return $this->verified_success_integrity; + } + + /** + * Integrity verification field. This value is used for the integrity + * verification of [MacVerifyResponse.success]. If the value of this field + * contradicts the value of [MacVerifyResponse.success], discard the response + * and perform a limited number of retries. + * + * Generated from protobuf field bool verified_success_integrity = 5; + * @param bool $var + * @return $this + */ + public function setVerifiedSuccessIntegrity($var) + { + GPBUtil::checkBool($var); + $this->verified_success_integrity = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for + * verification. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php new file mode 100644 index 000000000000..e6f74d6c62b8 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php @@ -0,0 +1,77 @@ +google.cloud.kms.v1.ProtectionLevel + */ +class ProtectionLevel +{ + /** + * Not specified. + * + * Generated from protobuf enum PROTECTION_LEVEL_UNSPECIFIED = 0; + */ + const PROTECTION_LEVEL_UNSPECIFIED = 0; + /** + * Crypto operations are performed in software. + * + * Generated from protobuf enum SOFTWARE = 1; + */ + const SOFTWARE = 1; + /** + * Crypto operations are performed in a Hardware Security Module. + * + * Generated from protobuf enum HSM = 2; + */ + const HSM = 2; + /** + * Crypto operations are performed by an external key manager. + * + * Generated from protobuf enum EXTERNAL = 3; + */ + const EXTERNAL = 3; + /** + * Crypto operations are performed in an EKM-over-VPC backend. + * + * Generated from protobuf enum EXTERNAL_VPC = 4; + */ + const EXTERNAL_VPC = 4; + + private static $valueToName = [ + self::PROTECTION_LEVEL_UNSPECIFIED => 'PROTECTION_LEVEL_UNSPECIFIED', + self::SOFTWARE => 'SOFTWARE', + self::HSM => 'HSM', + self::EXTERNAL => 'EXTERNAL', + self::EXTERNAL_VPC => 'EXTERNAL_VPC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php new file mode 100644 index 000000000000..b5156af3b2c9 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php @@ -0,0 +1,354 @@ +google.cloud.kms.v1.PublicKey + */ +class PublicKey extends \Google\Protobuf\Internal\Message +{ + /** + * The public key, encoded in PEM format. For more information, see the + * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for + * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] + * (https://tools.ietf.org/html/rfc7468#section-13). + * + * Generated from protobuf field string pem = 1; + */ + protected $pem = ''; + /** + * The + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * associated with this key. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2; + */ + protected $algorithm = 0; + /** + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by + * computing the CRC32C checksum of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your + * results to this field. Discard the response in case of non-matching + * checksum values, and perform a limited number of retries. A persistent + * mismatch may indicate an issue in your computation of the CRC32C checksum. + * Note: This field is defined as int64 for reasons of compatibility across + * different languages. However, it is a non-negative integer, which will + * never exceed 2^32-1, and can be safely downconverted to uint32 in languages + * that support this type. + * NOTE: This field is in Beta. + * + * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; + */ + protected $pem_crc32c = null; + /** + * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * Provided here for verification. + * NOTE: This field is in Beta. + * + * Generated from protobuf field string name = 4; + */ + protected $name = ''; + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; + */ + protected $protection_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pem + * The public key, encoded in PEM format. For more information, see the + * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for + * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] + * (https://tools.ietf.org/html/rfc7468#section-13). + * @type int $algorithm + * The + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * associated with this key. + * @type \Google\Protobuf\Int64Value $pem_crc32c + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by + * computing the CRC32C checksum of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your + * results to this field. Discard the response in case of non-matching + * checksum values, and perform a limited number of retries. A persistent + * mismatch may indicate an issue in your computation of the CRC32C checksum. + * Note: This field is defined as int64 for reasons of compatibility across + * different languages. However, it is a non-negative integer, which will + * never exceed 2^32-1, and can be safely downconverted to uint32 in languages + * that support this type. + * NOTE: This field is in Beta. + * @type string $name + * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * Provided here for verification. + * NOTE: This field is in Beta. + * @type int $protection_level + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The public key, encoded in PEM format. For more information, see the + * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for + * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] + * (https://tools.ietf.org/html/rfc7468#section-13). + * + * Generated from protobuf field string pem = 1; + * @return string + */ + public function getPem() + { + return $this->pem; + } + + /** + * The public key, encoded in PEM format. For more information, see the + * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for + * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] + * (https://tools.ietf.org/html/rfc7468#section-13). + * + * Generated from protobuf field string pem = 1; + * @param string $var + * @return $this + */ + public function setPem($var) + { + GPBUtil::checkString($var, True); + $this->pem = $var; + + return $this; + } + + /** + * The + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * associated with this key. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2; + * @return int + */ + public function getAlgorithm() + { + return $this->algorithm; + } + + /** + * The + * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * associated with this key. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2; + * @param int $var + * @return $this + */ + public function setAlgorithm($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); + $this->algorithm = $var; + + return $this; + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by + * computing the CRC32C checksum of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your + * results to this field. Discard the response in case of non-matching + * checksum values, and perform a limited number of retries. A persistent + * mismatch may indicate an issue in your computation of the CRC32C checksum. + * Note: This field is defined as int64 for reasons of compatibility across + * different languages. However, it is a non-negative integer, which will + * never exceed 2^32-1, and can be safely downconverted to uint32 in languages + * that support this type. + * NOTE: This field is in Beta. + * + * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; + * @return \Google\Protobuf\Int64Value|null + */ + public function getPemCrc32C() + { + return $this->pem_crc32c; + } + + public function hasPemCrc32C() + { + return isset($this->pem_crc32c); + } + + public function clearPemCrc32C() + { + unset($this->pem_crc32c); + } + + /** + * Returns the unboxed value from getPemCrc32C() + + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by + * computing the CRC32C checksum of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your + * results to this field. Discard the response in case of non-matching + * checksum values, and perform a limited number of retries. A persistent + * mismatch may indicate an issue in your computation of the CRC32C checksum. + * Note: This field is defined as int64 for reasons of compatibility across + * different languages. However, it is a non-negative integer, which will + * never exceed 2^32-1, and can be safely downconverted to uint32 in languages + * that support this type. + * NOTE: This field is in Beta. + * + * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; + * @return int|string|null + */ + public function getPemCrc32CUnwrapped() + { + return $this->readWrapperValue("pem_crc32c"); + } + + /** + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by + * computing the CRC32C checksum of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your + * results to this field. Discard the response in case of non-matching + * checksum values, and perform a limited number of retries. A persistent + * mismatch may indicate an issue in your computation of the CRC32C checksum. + * Note: This field is defined as int64 for reasons of compatibility across + * different languages. However, it is a non-negative integer, which will + * never exceed 2^32-1, and can be safely downconverted to uint32 in languages + * that support this type. + * NOTE: This field is in Beta. + * + * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setPemCrc32C($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->pem_crc32c = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by + * computing the CRC32C checksum of + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your + * results to this field. Discard the response in case of non-matching + * checksum values, and perform a limited number of retries. A persistent + * mismatch may indicate an issue in your computation of the CRC32C checksum. + * Note: This field is defined as int64 for reasons of compatibility across + * different languages. However, it is a non-negative integer, which will + * never exceed 2^32-1, and can be safely downconverted to uint32 in languages + * that support this type. + * NOTE: This field is in Beta. + * + * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; + * @param int|string|null $var + * @return $this + */ + public function setPemCrc32CUnwrapped($var) + { + $this->writeWrapperValue("pem_crc32c", $var); + return $this;} + + /** + * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * Provided here for verification. + * NOTE: This field is in Beta. + * + * Generated from protobuf field string name = 4; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * Provided here for verification. + * NOTE: This field is in Beta. + * + * Generated from protobuf field string name = 4; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; + * @return int + */ + public function getProtectionLevel() + { + return $this->protection_level; + } + + /** + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. + * + * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; + * @param int $var + * @return $this + */ + public function setProtectionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); + $this->protection_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php new file mode 100644 index 000000000000..7d76c4daccbf --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php @@ -0,0 +1,72 @@ +google.cloud.kms.v1.RestoreCryptoKeyVersionRequest + */ +class RestoreCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. + * + * 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 + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. + * + * Generated 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 + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php new file mode 100644 index 000000000000..96af3720a987 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php @@ -0,0 +1,110 @@ +google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest + */ +class UpdateCryptoKeyPrimaryVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The id of the child + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. + * + * Generated from protobuf field string crypto_key_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $crypto_key_version_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. + * @type string $crypto_key_version_id + * Required. The id of the child + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. + * + * Generated 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 + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. + * + * Generated from protobuf field string name = 1 [(.google.api.field_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 id of the child + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. + * + * Generated from protobuf field string crypto_key_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCryptoKeyVersionId() + { + return $this->crypto_key_version_id; + } + + /** + * Required. The id of the child + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. + * + * Generated from protobuf field string crypto_key_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCryptoKeyVersionId($var) + { + GPBUtil::checkString($var, True); + $this->crypto_key_version_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php new file mode 100644 index 000000000000..3e5038629d7c --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php @@ -0,0 +1,122 @@ +google.cloud.kms.v1.UpdateCryptoKeyRequest + */ +class UpdateCryptoKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $crypto_key = null; + /** + * Required. List of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Kms\V1\CryptoKey $crypto_key + * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. List of fields to be updated in this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\CryptoKey|null + */ + public function getCryptoKey() + { + return $this->crypto_key; + } + + public function hasCryptoKey() + { + return isset($this->crypto_key); + } + + public function clearCryptoKey() + { + unset($this->crypto_key); + } + + /** + * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\CryptoKey $var + * @return $this + */ + public function setCryptoKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKey::class); + $this->crypto_key = $var; + + return $this; + } + + /** + * Required. List of fields to be updated in this request. + * + * 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. List of fields to be updated in this request. + * + * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php new file mode 100644 index 000000000000..e82e397c2ce3 --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php @@ -0,0 +1,126 @@ +google.cloud.kms.v1.UpdateCryptoKeyVersionRequest + */ +class UpdateCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * updated values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $crypto_key_version = null; + /** + * Required. List of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Kms\V1\CryptoKeyVersion $crypto_key_version + * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * updated values. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. List of fields to be updated in this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * updated values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\CryptoKeyVersion|null + */ + public function getCryptoKeyVersion() + { + return $this->crypto_key_version; + } + + public function hasCryptoKeyVersion() + { + return isset($this->crypto_key_version); + } + + public function clearCryptoKeyVersion() + { + unset($this->crypto_key_version); + } + + /** + * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * updated values. + * + * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $var + * @return $this + */ + public function setCryptoKeyVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); + $this->crypto_key_version = $var; + + return $this; + } + + /** + * Required. List of fields to be updated in this request. + * + * 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. List of fields to be updated in this request. + * + * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php new file mode 100644 index 000000000000..461951b34b0b --- /dev/null +++ b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php @@ -0,0 +1,126 @@ +google.cloud.kms.v1.UpdateEkmConnectionRequest + */ +class UpdateEkmConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ekm_connection = null; + /** + * Required. List of fields to be updated in this request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Kms\V1\EkmConnection $ekm_connection + * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated + * values. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. List of fields to be updated in this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); + parent::__construct($data); + } + + /** + * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Kms\V1\EkmConnection|null + */ + public function getEkmConnection() + { + return $this->ekm_connection; + } + + public function hasEkmConnection() + { + return isset($this->ekm_connection); + } + + public function clearEkmConnection() + { + unset($this->ekm_connection); + } + + /** + * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated + * values. + * + * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Kms\V1\EkmConnection $var + * @return $this + */ + public function setEkmConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\EkmConnection::class); + $this->ekm_connection = $var; + + return $this; + } + + /** + * Required. List of fields to be updated in this request. + * + * 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. List of fields to be updated in this request. + * + * 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/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php new file mode 100644 index 000000000000..41daf778c2cb --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php @@ -0,0 +1,79 @@ +createEkmConnection( + $formattedParent, + $ekmConnectionId, + $ekmConnection + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = EkmServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $ekmConnectionId = '[EKM_CONNECTION_ID]'; + + create_ekm_connection_sample($formattedParent, $ekmConnectionId); +} +// [END cloudkms_v1_generated_EkmService_CreateEkmConnection_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php new file mode 100644 index 000000000000..8ef924e084e1 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php @@ -0,0 +1,68 @@ +getEkmConnection($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EkmServiceClient::ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); + + get_ekm_connection_sample($formattedName); +} +// [END cloudkms_v1_generated_EkmService_GetEkmConnection_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..df451d4e6c1c --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php @@ -0,0 +1,67 @@ +getIamPolicy($resource); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 cloudkms_v1_generated_EkmService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php new file mode 100644 index 000000000000..8ff3d3762392 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_EkmService_GetLocation_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php new file mode 100644 index 000000000000..8f4cc0d326d7 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php @@ -0,0 +1,73 @@ +listEkmConnections($formattedParent); + + /** @var EkmConnection $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 = EkmServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_ekm_connections_sample($formattedParent); +} +// [END cloudkms_v1_generated_EkmService_ListEkmConnections_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php new file mode 100644 index 000000000000..4d1eacf913bb --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @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 cloudkms_v1_generated_EkmService_ListLocations_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..a54d132d6f67 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php @@ -0,0 +1,73 @@ +setIamPolicy($resource, $policy); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 cloudkms_v1_generated_EkmService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..269486136270 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php @@ -0,0 +1,80 @@ +testIamPermissions($resource, $permissions); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 cloudkms_v1_generated_EkmService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php new file mode 100644 index 000000000000..cb41b55faee0 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php @@ -0,0 +1,58 @@ +updateEkmConnection($ekmConnection, $updateMask); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_EkmService_UpdateEkmConnection_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php new file mode 100644 index 000000000000..bc0df8e98216 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php @@ -0,0 +1,82 @@ +asymmetricDecrypt($formattedName, $ciphertext); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + $ciphertext = '...'; + + asymmetric_decrypt_sample($formattedName, $ciphertext); +} +// [END cloudkms_v1_generated_KeyManagementService_AsymmetricDecrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php new file mode 100644 index 000000000000..7d8bd3b3229f --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php @@ -0,0 +1,82 @@ +asymmetricSign($formattedName, $digest); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + + asymmetric_sign_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_AsymmetricSign_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php new file mode 100644 index 000000000000..5413c2779688 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php @@ -0,0 +1,82 @@ +createCryptoKey( + $formattedParent, + $cryptoKeyId, + $cryptoKey + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $cryptoKeyId = '[CRYPTO_KEY_ID]'; + + create_crypto_key_sample($formattedParent, $cryptoKeyId); +} +// [END cloudkms_v1_generated_KeyManagementService_CreateCryptoKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php new file mode 100644 index 000000000000..10b917ae8f85 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php @@ -0,0 +1,84 @@ +createCryptoKeyVersion( + $formattedParent, + $cryptoKeyVersion + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = KeyManagementServiceClient::cryptoKeyName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]' + ); + + create_crypto_key_version_sample($formattedParent); +} +// [END cloudkms_v1_generated_KeyManagementService_CreateCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php new file mode 100644 index 000000000000..b6d5fd8f30a7 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php @@ -0,0 +1,105 @@ +setImportMethod($importJobImportMethod) + ->setProtectionLevel($importJobProtectionLevel); + + // Call the API and handle any network failures. + try { + /** @var ImportJob $response */ + $response = $keyManagementServiceClient->createImportJob( + $formattedParent, + $importJobId, + $importJob + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $importJobId = '[IMPORT_JOB_ID]'; + $importJobImportMethod = ImportMethod::IMPORT_METHOD_UNSPECIFIED; + $importJobProtectionLevel = ProtectionLevel::PROTECTION_LEVEL_UNSPECIFIED; + + create_import_job_sample( + $formattedParent, + $importJobId, + $importJobImportMethod, + $importJobProtectionLevel + ); +} +// [END cloudkms_v1_generated_KeyManagementService_CreateImportJob_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php new file mode 100644 index 000000000000..dd19be964f9c --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php @@ -0,0 +1,75 @@ +createKeyRing($formattedParent, $keyRingId, $keyRing); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = KeyManagementServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $keyRingId = '[KEY_RING_ID]'; + + create_key_ring_sample($formattedParent, $keyRingId); +} +// [END cloudkms_v1_generated_KeyManagementService_CreateKeyRing_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php new file mode 100644 index 000000000000..4d4237adf426 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php @@ -0,0 +1,79 @@ +decrypt($formattedName, $ciphertext); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]' + ); + $ciphertext = '...'; + + decrypt_sample($formattedName, $ciphertext); +} +// [END cloudkms_v1_generated_KeyManagementService_Decrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php new file mode 100644 index 000000000000..e542500711e0 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php @@ -0,0 +1,93 @@ +destroyCryptoKeyVersion($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + + destroy_crypto_key_version_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_DestroyCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php new file mode 100644 index 000000000000..4665ac9a9366 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php @@ -0,0 +1,86 @@ +encrypt($name, $plaintext); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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]'; + $plaintext = '...'; + + encrypt_sample($name, $plaintext); +} +// [END cloudkms_v1_generated_KeyManagementService_Encrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php new file mode 100644 index 000000000000..5f2bb6834299 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php @@ -0,0 +1,54 @@ +generateRandomBytes(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_KeyManagementService_GenerateRandomBytes_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php new file mode 100644 index 000000000000..5611b26355be --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php @@ -0,0 +1,74 @@ +getCryptoKey($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]' + ); + + get_crypto_key_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_GetCryptoKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php new file mode 100644 index 000000000000..e3ce994b31af --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php @@ -0,0 +1,74 @@ +getCryptoKeyVersion($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + + get_crypto_key_version_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_GetCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..70024e13d0d6 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php @@ -0,0 +1,67 @@ +getIamPolicy($resource); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 cloudkms_v1_generated_KeyManagementService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php new file mode 100644 index 000000000000..5c6a49c4e3b1 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php @@ -0,0 +1,72 @@ +getImportJob($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::importJobName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[IMPORT_JOB]' + ); + + get_import_job_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_GetImportJob_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php new file mode 100644 index 000000000000..b170c3bb545b --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php @@ -0,0 +1,67 @@ +getKeyRing($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + + get_key_ring_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_GetKeyRing_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php new file mode 100644 index 000000000000..b31ebb628162 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_KeyManagementService_GetLocation_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php new file mode 100644 index 000000000000..402bc1d54bbe --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php @@ -0,0 +1,78 @@ +getPublicKey($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + + get_public_key_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_GetPublicKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php new file mode 100644 index 000000000000..837811c48ef8 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php @@ -0,0 +1,100 @@ +importCryptoKeyVersion( + $formattedParent, + $algorithm, + $importJob + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = KeyManagementServiceClient::cryptoKeyName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]' + ); + $algorithm = CryptoKeyVersionAlgorithm::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED; + $importJob = '[IMPORT_JOB]'; + + import_crypto_key_version_sample($formattedParent, $algorithm, $importJob); +} +// [END cloudkms_v1_generated_KeyManagementService_ImportCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php new file mode 100644 index 000000000000..6ceacea981fa --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php @@ -0,0 +1,78 @@ +listCryptoKeyVersions($formattedParent); + + /** @var CryptoKeyVersion $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 = KeyManagementServiceClient::cryptoKeyName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]' + ); + + list_crypto_key_versions_sample($formattedParent); +} +// [END cloudkms_v1_generated_KeyManagementService_ListCryptoKeyVersions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php new file mode 100644 index 000000000000..c9dafc94eb44 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php @@ -0,0 +1,72 @@ +listCryptoKeys($formattedParent); + + /** @var CryptoKey $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 = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + + list_crypto_keys_sample($formattedParent); +} +// [END cloudkms_v1_generated_KeyManagementService_ListCryptoKeys_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php new file mode 100644 index 000000000000..0ae84f3da77a --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php @@ -0,0 +1,72 @@ +listImportJobs($formattedParent); + + /** @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 = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + + list_import_jobs_sample($formattedParent); +} +// [END cloudkms_v1_generated_KeyManagementService_ListImportJobs_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php new file mode 100644 index 000000000000..016f7308d4e7 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php @@ -0,0 +1,73 @@ +listKeyRings($formattedParent); + + /** @var KeyRing $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 = KeyManagementServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_key_rings_sample($formattedParent); +} +// [END cloudkms_v1_generated_KeyManagementService_ListKeyRings_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php new file mode 100644 index 000000000000..61f5d7a95592 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @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 cloudkms_v1_generated_KeyManagementService_ListLocations_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php new file mode 100644 index 000000000000..5429c04f5d23 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php @@ -0,0 +1,79 @@ +macSign($formattedName, $data); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + $data = '...'; + + mac_sign_sample($formattedName, $data); +} +// [END cloudkms_v1_generated_KeyManagementService_MacSign_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php new file mode 100644 index 000000000000..baa2307364f6 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php @@ -0,0 +1,83 @@ +macVerify($formattedName, $data, $mac); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + $data = '...'; + $mac = '...'; + + mac_verify_sample($formattedName, $data, $mac); +} +// [END cloudkms_v1_generated_KeyManagementService_MacVerify_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php new file mode 100644 index 000000000000..a4748c963822 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php @@ -0,0 +1,81 @@ +restoreCryptoKeyVersion($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]', + '[CRYPTO_KEY_VERSION]' + ); + + restore_crypto_key_version_sample($formattedName); +} +// [END cloudkms_v1_generated_KeyManagementService_RestoreCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..fdd4056f159c --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php @@ -0,0 +1,73 @@ +setIamPolicy($resource, $policy); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 cloudkms_v1_generated_KeyManagementService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..f46024162d49 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php @@ -0,0 +1,80 @@ +testIamPermissions($resource, $permissions); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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 cloudkms_v1_generated_KeyManagementService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php new file mode 100644 index 000000000000..9f11e241b2f7 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php @@ -0,0 +1,58 @@ +updateCryptoKey($cryptoKey, $updateMask); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_KeyManagementService_UpdateCryptoKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php new file mode 100644 index 000000000000..7b47b2334e85 --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php @@ -0,0 +1,85 @@ +updateCryptoKeyPrimaryVersion( + $formattedName, + $cryptoKeyVersionId + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = KeyManagementServiceClient::cryptoKeyName( + '[PROJECT]', + '[LOCATION]', + '[KEY_RING]', + '[CRYPTO_KEY]' + ); + $cryptoKeyVersionId = '[CRYPTO_KEY_VERSION_ID]'; + + update_crypto_key_primary_version_sample($formattedName, $cryptoKeyVersionId); +} +// [END cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyPrimaryVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php new file mode 100644 index 000000000000..5931ac0aaecc --- /dev/null +++ b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php @@ -0,0 +1,69 @@ +updateCryptoKeyVersion($cryptoKeyVersion, $updateMask); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/src/V1/EkmServiceClient.php b/owl-bot-staging/Kms/v1/src/V1/EkmServiceClient.php new file mode 100644 index 000000000000..3fe03e339fc7 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/EkmServiceClient.php @@ -0,0 +1,34 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $ekmConnectionId = 'ekm_connection_id'; + * $ekmConnection = new EkmConnection(); + * $response = $ekmServiceClient->createEkmConnection($formattedParent, $ekmConnectionId, $ekmConnection); + * } finally { + * $ekmServiceClient->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. + */ +class EkmServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.kms.v1.EkmService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'cloudkms.googleapis.com'; + + /** 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/cloudkms', + ]; + + private static $ekmConnectionNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/ekm_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/ekm_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/ekm_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/ekm_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getEkmConnectionNameTemplate() + { + if (self::$ekmConnectionNameTemplate == null) { + self::$ekmConnectionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/ekmConnections/{ekm_connection}'); + } + + return self::$ekmConnectionNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'ekmConnection' => self::getEkmConnectionNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * ekm_connection resource. + * + * @param string $project + * @param string $location + * @param string $ekmConnection + * + * @return string The formatted ekm_connection resource. + */ + public static function ekmConnectionName($project, $location, $ekmConnection) + { + return self::getEkmConnectionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'ekm_connection' => $ekmConnection, + ]); + } + + /** + * 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($project, $location) + { + return self::getLocationNameTemplate()->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 + * - ekmConnection: projects/{project}/locations/{location}/ekmConnections/{ekm_connection} + * - 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($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 'cloudkms.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 [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given + * Project and Location. + * + * Sample code: + * ``` + * $ekmServiceClient = new EkmServiceClient(); + * try { + * $formattedParent = $ekmServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $ekmConnectionId = 'ekm_connection_id'; + * $ekmConnection = new EkmConnection(); + * $response = $ekmServiceClient->createEkmConnection($formattedParent, $ekmConnectionId, $ekmConnection); + * } finally { + * $ekmServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the location associated with the + * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format + * `projects/*/locations/*`. + * @param string $ekmConnectionId Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. + * @param EkmConnection $ekmConnection Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with + * initial field values. + * @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\Kms\V1\EkmConnection + * + * @throws ApiException if the remote call fails + */ + public function createEkmConnection($parent, $ekmConnectionId, $ekmConnection, array $optionalArgs = []) + { + $request = new CreateEkmConnectionRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setEkmConnectionId($ekmConnectionId); + $request->setEkmConnection($ekmConnection); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateEkmConnection', EkmConnection::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns metadata for a given + * [EkmConnection][google.cloud.kms.v1.EkmConnection]. + * + * Sample code: + * ``` + * $ekmServiceClient = new EkmServiceClient(); + * try { + * $formattedName = $ekmServiceClient->ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); + * $response = $ekmServiceClient->getEkmConnection($formattedName); + * } finally { + * $ekmServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the + * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. + * @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\Kms\V1\EkmConnection + * + * @throws ApiException if the remote call fails + */ + public function getEkmConnection($name, array $optionalArgs = []) + { + $request = new GetEkmConnectionRequest(); + $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('GetEkmConnection', EkmConnection::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists [EkmConnections][google.cloud.kms.v1.EkmConnection]. + * + * Sample code: + * ``` + * $ekmServiceClient = new EkmServiceClient(); + * try { + * $formattedParent = $ekmServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $ekmServiceClient->listEkmConnections($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $ekmServiceClient->listEkmConnections($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $ekmServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the location associated with the + * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format + * `projects/*/locations/*`. + * @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 + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * @type string $orderBy + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listEkmConnections($parent, array $optionalArgs = []) + { + $request = new ListEkmConnectionsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListEkmConnections', $optionalArgs, ListEkmConnectionsResponse::class, $request); + } + + /** + * Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata. + * + * Sample code: + * ``` + * $ekmServiceClient = new EkmServiceClient(); + * try { + * $ekmConnection = new EkmConnection(); + * $updateMask = new FieldMask(); + * $response = $ekmServiceClient->updateEkmConnection($ekmConnection, $updateMask); + * } finally { + * $ekmServiceClient->close(); + * } + * ``` + * + * @param EkmConnection $ekmConnection Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated + * values. + * @param FieldMask $updateMask Required. List of fields to be updated in this request. + * @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\Kms\V1\EkmConnection + * + * @throws ApiException if the remote call fails + */ + public function updateEkmConnection($ekmConnection, $updateMask, array $optionalArgs = []) + { + $request = new UpdateEkmConnectionRequest(); + $requestParamHeaders = []; + $request->setEkmConnection($ekmConnection); + $request->setUpdateMask($updateMask); + $requestParamHeaders['ekm_connection.name'] = $ekmConnection->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateEkmConnection', EkmConnection::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $ekmServiceClient = new EkmServiceClient(); + * try { + * $response = $ekmServiceClient->getLocation(); + * } finally { + * $ekmServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $ekmServiceClient = new EkmServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $ekmServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $ekmServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $ekmServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * Sample code: + * ``` + * $ekmServiceClient = new EkmServiceClient(); + * try { + * $resource = 'resource'; + * $response = $ekmServiceClient->getIamPolicy($resource); + * } finally { + * $ekmServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * Sample code: + * ``` + * $ekmServiceClient = new EkmServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $ekmServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $ekmServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + 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('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->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. + * + * Sample code: + * ``` + * $ekmServiceClient = new EkmServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $ekmServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $ekmServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @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\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } +} diff --git a/owl-bot-staging/Kms/v1/src/V1/Gapic/KeyManagementServiceGapicClient.php b/owl-bot-staging/Kms/v1/src/V1/Gapic/KeyManagementServiceGapicClient.php new file mode 100644 index 000000000000..7032ff169f78 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/Gapic/KeyManagementServiceGapicClient.php @@ -0,0 +1,2551 @@ +cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + * $ciphertext = '...'; + * $response = $keyManagementServiceClient->asymmetricDecrypt($formattedName, $ciphertext); + * } finally { + * $keyManagementServiceClient->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. + */ +class KeyManagementServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.kms.v1.KeyManagementService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'cloudkms.googleapis.com'; + + /** 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/cloudkms', + ]; + + private static $cryptoKeyNameTemplate; + + private static $cryptoKeyVersionNameTemplate; + + private static $importJobNameTemplate; + + private static $keyRingNameTemplate; + + private static $locationNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/key_management_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/key_management_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/key_management_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/key_management_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getCryptoKeyNameTemplate() + { + if (self::$cryptoKeyNameTemplate == null) { + self::$cryptoKeyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}'); + } + + return self::$cryptoKeyNameTemplate; + } + + private static function getCryptoKeyVersionNameTemplate() + { + if (self::$cryptoKeyVersionNameTemplate == null) { + self::$cryptoKeyVersionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}'); + } + + return self::$cryptoKeyVersionNameTemplate; + } + + private static function getImportJobNameTemplate() + { + if (self::$importJobNameTemplate == null) { + self::$importJobNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}'); + } + + return self::$importJobNameTemplate; + } + + private static function getKeyRingNameTemplate() + { + if (self::$keyRingNameTemplate == null) { + self::$keyRingNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}'); + } + + return self::$keyRingNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'cryptoKey' => self::getCryptoKeyNameTemplate(), + 'cryptoKeyVersion' => self::getCryptoKeyVersionNameTemplate(), + 'importJob' => self::getImportJobNameTemplate(), + 'keyRing' => self::getKeyRingNameTemplate(), + 'location' => self::getLocationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * 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($project, $location, $keyRing, $cryptoKey) + { + return self::getCryptoKeyNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * crypto_key_version resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * @param string $cryptoKeyVersion + * + * @return string The formatted crypto_key_version resource. + */ + public static function cryptoKeyVersionName($project, $location, $keyRing, $cryptoKey, $cryptoKeyVersion) + { + return self::getCryptoKeyVersionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + 'crypto_key_version' => $cryptoKeyVersion, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a import_job + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $importJob + * + * @return string The formatted import_job resource. + */ + public static function importJobName($project, $location, $keyRing, $importJob) + { + return self::getImportJobNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'import_job' => $importJob, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a key_ring + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * + * @return string The formatted key_ring resource. + */ + public static function keyRingName($project, $location, $keyRing) + { + return self::getKeyRingNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + ]); + } + + /** + * 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($project, $location) + { + return self::getLocationNameTemplate()->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 + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version} + * - importJob: projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job} + * - keyRing: projects/{project}/locations/{location}/keyRings/{key_ring} + * - 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($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 'cloudkms.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); + } + + /** + * Decrypts data that was encrypted with a public key retrieved from + * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] + * corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + * ASYMMETRIC_DECRYPT. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + * $ciphertext = '...'; + * $response = $keyManagementServiceClient->asymmetricDecrypt($formattedName, $ciphertext); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * decryption. + * @param string $ciphertext Required. The data encrypted with the named + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using + * OAEP. + * @param array $optionalArgs { + * Optional. + * + * @type Int64Value $ciphertextCrc32c + * Optional. An optional CRC32C checksum of the + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) + * is equal to + * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Kms\V1\AsymmetricDecryptResponse + * + * @throws ApiException if the remote call fails + */ + public function asymmetricDecrypt($name, $ciphertext, array $optionalArgs = []) + { + $request = new AsymmetricDecryptRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setCiphertext($ciphertext); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['ciphertextCrc32c'])) { + $request->setCiphertextCrc32c($optionalArgs['ciphertextCrc32c']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('AsymmetricDecrypt', AsymmetricDecryptResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] + * ASYMMETRIC_SIGN, producing a signature that can be verified with the public + * key retrieved from + * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + * $digest = new Digest(); + * $response = $keyManagementServiceClient->asymmetricSign($formattedName, $digest); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * @param Digest $digest Optional. The digest of the data to sign. The digest must be produced with + * the same digest algorithm as specified by the key version's + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. + * + * This field may not be supplied if + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * is supplied. + * @param array $optionalArgs { + * Optional. + * + * @type Int64Value $digestCrc32c + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) + * is equal to + * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * @type string $data + * Optional. The data to sign. + * It can't be supplied if + * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] + * is supplied. + * @type Int64Value $dataCrc32c + * Optional. An optional CRC32C checksum of the + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) + * is equal to + * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Kms\V1\AsymmetricSignResponse + * + * @throws ApiException if the remote call fails + */ + public function asymmetricSign($name, $digest, array $optionalArgs = []) + { + $request = new AsymmetricSignRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setDigest($digest); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['digestCrc32c'])) { + $request->setDigestCrc32c($optionalArgs['digestCrc32c']); + } + + if (isset($optionalArgs['data'])) { + $request->setData($optionalArgs['data']); + } + + if (isset($optionalArgs['dataCrc32c'])) { + $request->setDataCrc32c($optionalArgs['dataCrc32c']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('AsymmetricSign', AsymmetricSignResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a + * [KeyRing][google.cloud.kms.v1.KeyRing]. + * + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and + * [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm] + * are required. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedParent = $keyManagementServiceClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + * $cryptoKeyId = 'crypto_key_id'; + * $cryptoKey = new CryptoKey(); + * $response = $keyManagementServiceClient->createCryptoKey($formattedParent, $cryptoKeyId, $cryptoKey); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing + * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * @param string $cryptoKeyId Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * @param CryptoKey $cryptoKey Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field + * values. + * @param array $optionalArgs { + * Optional. + * + * @type bool $skipInitialVersionCreation + * If set to true, the request will create a + * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must + * manually call + * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] + * or + * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] + * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Kms\V1\CryptoKey + * + * @throws ApiException if the remote call fails + */ + public function createCryptoKey($parent, $cryptoKeyId, $cryptoKey, array $optionalArgs = []) + { + $request = new CreateCryptoKeyRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setCryptoKeyId($cryptoKeyId); + $request->setCryptoKey($cryptoKey); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['skipInitialVersionCreation'])) { + $request->setSkipInitialVersionCreation($optionalArgs['skipInitialVersionCreation']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateCryptoKey', CryptoKey::class, $optionalArgs, $request)->wait(); + } + + /** + * Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a + * [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * The server will assign the next sequential id. If unset, + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedParent = $keyManagementServiceClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + * $cryptoKeyVersion = new CryptoKeyVersion(); + * $response = $keyManagementServiceClient->createCryptoKeyVersion($formattedParent, $cryptoKeyVersion); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the + * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * @param CryptoKeyVersion $cryptoKeyVersion Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * initial field values. + * @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\Kms\V1\CryptoKeyVersion + * + * @throws ApiException if the remote call fails + */ + public function createCryptoKeyVersion($parent, $cryptoKeyVersion, array $optionalArgs = []) + { + $request = new CreateCryptoKeyVersionRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setCryptoKeyVersion($cryptoKeyVersion); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateCryptoKeyVersion', CryptoKeyVersion::class, $optionalArgs, $request)->wait(); + } + + /** + * Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a + * [KeyRing][google.cloud.kms.v1.KeyRing]. + * + * [ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is + * required. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedParent = $keyManagementServiceClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + * $importJobId = 'import_job_id'; + * $importJob = new ImportJob(); + * $response = $keyManagementServiceClient->createImportJob($formattedParent, $importJobId, $importJob); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the + * [ImportJobs][google.cloud.kms.v1.ImportJob]. + * @param string $importJobId Required. It must be unique within a KeyRing and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * @param ImportJob $importJob Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field + * values. + * @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\Kms\V1\ImportJob + * + * @throws ApiException if the remote call fails + */ + public function createImportJob($parent, $importJobId, $importJob, array $optionalArgs = []) + { + $request = new CreateImportJobRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setImportJobId($importJobId); + $request->setImportJob($importJob); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateImportJob', ImportJob::class, $optionalArgs, $request)->wait(); + } + + /** + * Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and + * Location. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedParent = $keyManagementServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $keyRingId = 'key_ring_id'; + * $keyRing = new KeyRing(); + * $response = $keyManagementServiceClient->createKeyRing($formattedParent, $keyRingId, $keyRing); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. + * @param string $keyRingId Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * @param KeyRing $keyRing Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field + * values. + * @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\Kms\V1\KeyRing + * + * @throws ApiException if the remote call fails + */ + public function createKeyRing($parent, $keyRingId, $keyRing, array $optionalArgs = []) + { + $request = new CreateKeyRingRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setKeyRingId($keyRingId); + $request->setKeyRing($keyRing); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateKeyRing', KeyRing::class, $optionalArgs, $request)->wait(); + } + + /** + * Decrypts data that was protected by + * [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedName = $keyManagementServiceClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + * $ciphertext = '...'; + * $response = $keyManagementServiceClient->decrypt($formattedName, $ciphertext); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The + * server will choose the appropriate version. + * @param string $ciphertext Required. The encrypted data originally returned in + * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. + * @param array $optionalArgs { + * Optional. + * + * @type string $additionalAuthenticatedData + * Optional. Optional data that must match the data originally supplied in + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * @type Int64Value $ciphertextCrc32c + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) + * is equal to + * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * @type Int64Value $additionalAuthenticatedDataCrc32c + * Optional. An optional CRC32C checksum of the + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) + * is equal to + * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Kms\V1\DecryptResponse + * + * @throws ApiException if the remote call fails + */ + public function decrypt($name, $ciphertext, array $optionalArgs = []) + { + $request = new DecryptRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setCiphertext($ciphertext); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['additionalAuthenticatedData'])) { + $request->setAdditionalAuthenticatedData($optionalArgs['additionalAuthenticatedData']); + } + + if (isset($optionalArgs['ciphertextCrc32c'])) { + $request->setCiphertextCrc32c($optionalArgs['ciphertextCrc32c']); + } + + if (isset($optionalArgs['additionalAuthenticatedDataCrc32c'])) { + $request->setAdditionalAuthenticatedDataCrc32c($optionalArgs['additionalAuthenticatedDataCrc32c']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Decrypt', DecryptResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for + * destruction. + * + * Upon calling this method, + * [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will + * be set to + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED], + * and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will + * be set to the time + * [destroy_scheduled_duration][google.cloud.kms.v1.CryptoKey.destroy_scheduled_duration] + * in the future. At that time, the + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will automatically + * change to + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED], + * and the key material will be irrevocably destroyed. + * + * Before the + * [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is + * reached, + * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + * may be called to reverse the process. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + * $response = $keyManagementServiceClient->destroyCryptoKeyVersion($formattedName); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. + * @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\Kms\V1\CryptoKeyVersion + * + * @throws ApiException if the remote call fails + */ + public function destroyCryptoKeyVersion($name, array $optionalArgs = []) + { + $request = new DestroyCryptoKeyVersionRequest(); + $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('DestroyCryptoKeyVersion', CryptoKeyVersion::class, $optionalArgs, $request)->wait(); + } + + /** + * Encrypts data, so that it can only be recovered by a call to + * [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $name = 'name'; + * $plaintext = '...'; + * $response = $keyManagementServiceClient->encrypt($name, $plaintext); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] or + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * encryption. + * + * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server + * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. + * @param string $plaintext Required. The data to encrypt. Must be no larger than 64KiB. + * + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the + * plaintext must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * @param array $optionalArgs { + * Optional. + * + * @type string $additionalAuthenticatedData + * Optional. Optional data that, if specified, must also be provided during + * decryption through + * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. + * + * The maximum size depends on the key version's + * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. + * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], + * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and + * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the + * AAD must be no larger than 64KiB. For + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of + * the plaintext and additional_authenticated_data fields must be no larger + * than 8KiB. + * @type Int64Value $plaintextCrc32c + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) + * is equal to + * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * @type Int64Value $additionalAuthenticatedDataCrc32c + * Optional. An optional CRC32C checksum of the + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. + * If specified, + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * verify the integrity of the received + * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] + * using this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) + * is equal to + * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Kms\V1\EncryptResponse + * + * @throws ApiException if the remote call fails + */ + public function encrypt($name, $plaintext, array $optionalArgs = []) + { + $request = new EncryptRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setPlaintext($plaintext); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['additionalAuthenticatedData'])) { + $request->setAdditionalAuthenticatedData($optionalArgs['additionalAuthenticatedData']); + } + + if (isset($optionalArgs['plaintextCrc32c'])) { + $request->setPlaintextCrc32c($optionalArgs['plaintextCrc32c']); + } + + if (isset($optionalArgs['additionalAuthenticatedDataCrc32c'])) { + $request->setAdditionalAuthenticatedDataCrc32c($optionalArgs['additionalAuthenticatedDataCrc32c']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Encrypt', EncryptResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Generate random bytes using the Cloud KMS randomness source in the provided + * location. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $response = $keyManagementServiceClient->generateRandomBytes(); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $location + * The project-specific location in which to generate random bytes. + * For example, "projects/my-project/locations/us-central1". + * @type int $lengthBytes + * The length in bytes of the amount of randomness to retrieve. Minimum 8 + * bytes, maximum 1024 bytes. + * @type int $protectionLevel + * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when + * generating the random data. Currently, only + * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is + * supported. + * For allowed values, use constants defined on {@see \Google\Cloud\Kms\V1\ProtectionLevel} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Kms\V1\GenerateRandomBytesResponse + * + * @throws ApiException if the remote call fails + */ + public function generateRandomBytes(array $optionalArgs = []) + { + $request = new GenerateRandomBytesRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['location'])) { + $request->setLocation($optionalArgs['location']); + $requestParamHeaders['location'] = $optionalArgs['location']; + } + + if (isset($optionalArgs['lengthBytes'])) { + $request->setLengthBytes($optionalArgs['lengthBytes']); + } + + if (isset($optionalArgs['protectionLevel'])) { + $request->setProtectionLevel($optionalArgs['protectionLevel']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GenerateRandomBytes', GenerateRandomBytesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as + * well as its [primary][google.cloud.kms.v1.CryptoKey.primary] + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedName = $keyManagementServiceClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + * $response = $keyManagementServiceClient->getCryptoKey($formattedName); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. + * @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\Kms\V1\CryptoKey + * + * @throws ApiException if the remote call fails + */ + public function getCryptoKey($name, array $optionalArgs = []) + { + $request = new GetCryptoKeyRequest(); + $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('GetCryptoKey', CryptoKey::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns metadata for a given + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + * $response = $keyManagementServiceClient->getCryptoKeyVersion($formattedName); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. + * @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\Kms\V1\CryptoKeyVersion + * + * @throws ApiException if the remote call fails + */ + public function getCryptoKeyVersion($name, array $optionalArgs = []) + { + $request = new GetCryptoKeyVersionRequest(); + $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('GetCryptoKeyVersion', CryptoKeyVersion::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedName = $keyManagementServiceClient->importJobName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[IMPORT_JOB]'); + * $response = $keyManagementServiceClient->getImportJob($formattedName); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] to get. + * @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\Kms\V1\ImportJob + * + * @throws ApiException if the remote call fails + */ + public function getImportJob($name, array $optionalArgs = []) + { + $request = new GetImportJobRequest(); + $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('GetImportJob', ImportJob::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedName = $keyManagementServiceClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + * $response = $keyManagementServiceClient->getKeyRing($formattedName); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The [name][google.cloud.kms.v1.KeyRing.name] of the + * [KeyRing][google.cloud.kms.v1.KeyRing] to get. + * @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\Kms\V1\KeyRing + * + * @throws ApiException if the remote call fails + */ + public function getKeyRing($name, array $optionalArgs = []) + { + $request = new GetKeyRingRequest(); + $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('GetKeyRing', KeyRing::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the public key for the given + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be + * [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] + * or + * [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + * $response = $keyManagementServiceClient->getPublicKey($formattedName); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. + * @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\Kms\V1\PublicKey + * + * @throws ApiException if the remote call fails + */ + public function getPublicKey($name, array $optionalArgs = []) + { + $request = new GetPublicKeyRequest(); + $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('GetPublicKey', PublicKey::class, $optionalArgs, $request)->wait(); + } + + /** + * Import wrapped key material into a + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * + * All requests must specify a [CryptoKey][google.cloud.kms.v1.CryptoKey]. If + * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] is additionally + * specified in the request, key material will be reimported into that + * version. Otherwise, a new version will be created, and will be assigned the + * next sequential id within the [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedParent = $keyManagementServiceClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + * $algorithm = CryptoKeyVersionAlgorithm::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED; + * $importJob = 'import_job'; + * $response = $keyManagementServiceClient->importCryptoKeyVersion($formattedParent, $algorithm, $importJob); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. + * + * The create permission is only required on this key when creating a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. + * @param int $algorithm Required. The + * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + * of the key being imported. This does not need to match the + * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. + * For allowed values, use constants defined on {@see \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm} + * @param string $importJob Required. The [name][google.cloud.kms.v1.ImportJob.name] of the + * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key + * material. + * @param array $optionalArgs { + * Optional. + * + * @type string $cryptoKeyVersion + * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of + * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to + * target for an import operation. If this field is not present, a new + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the + * supplied key material is created. + * + * If this field is present, the supplied key material is imported into + * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To + * import into an existing + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of + * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], + * have been previously created via [ImportCryptoKeyVersion][], and be in + * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] + * or + * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] + * state. The key material and algorithm must match the previous + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained + * key material. + * @type string $wrappedKey + * Optional. The wrapped key material to import. + * + * Before wrapping, key material must be formatted. If importing symmetric key + * material, the expected key material format is plain bytes. If importing + * asymmetric key material, the expected key material format is PKCS#8-encoded + * DER (the PrivateKeyInfo structure from RFC 5208). + * + * When wrapping with import methods + * ([RSA_OAEP_3072_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] + * or + * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] + * or + * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] + * or + * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256_AES_256]), + * + * this field must contain the concatenation of: + *
    + *
  1. An ephemeral AES-256 wrapping key wrapped with the + * [public_key][google.cloud.kms.v1.ImportJob.public_key] using + * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty + * label. + *
  2. + *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 + * key using AES-KWP (RFC 5649). + *
  4. + *
+ * + * This format is the same as the format produced by PKCS#11 mechanism + * CKM_RSA_AES_KEY_WRAP. + * + * When wrapping with import methods + * ([RSA_OAEP_3072_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] + * or + * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), + * + * this field must contain the formatted key to be imported, wrapped with the + * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP + * with SHA-256, MGF1 with SHA-256, and an empty label. + * @type string $rsaAesWrappedKey + * Optional. This field has the same meaning as + * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. + * Prefer to use that field in new work. Either that field or this field + * (but not both) must be specified. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Kms\V1\CryptoKeyVersion + * + * @throws ApiException if the remote call fails + */ + public function importCryptoKeyVersion($parent, $algorithm, $importJob, array $optionalArgs = []) + { + $request = new ImportCryptoKeyVersionRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAlgorithm($algorithm); + $request->setImportJob($importJob); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['cryptoKeyVersion'])) { + $request->setCryptoKeyVersion($optionalArgs['cryptoKeyVersion']); + } + + if (isset($optionalArgs['wrappedKey'])) { + $request->setWrappedKey($optionalArgs['wrappedKey']); + } + + if (isset($optionalArgs['rsaAesWrappedKey'])) { + $request->setRsaAesWrappedKey($optionalArgs['rsaAesWrappedKey']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ImportCryptoKeyVersion', CryptoKeyVersion::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedParent = $keyManagementServiceClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + * // Iterate over pages of elements + * $pagedResponse = $keyManagementServiceClient->listCryptoKeyVersions($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $keyManagementServiceClient->listCryptoKeyVersions($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format + * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + * @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 int $view + * The fields to include in the response. + * For allowed values, use constants defined on {@see \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionView} + * @type string $filter + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * @type string $orderBy + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listCryptoKeyVersions($parent, array $optionalArgs = []) + { + $request = new ListCryptoKeyVersionsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListCryptoKeyVersions', $optionalArgs, ListCryptoKeyVersionsResponse::class, $request); + } + + /** + * Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedParent = $keyManagementServiceClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + * // Iterate over pages of elements + * $pagedResponse = $keyManagementServiceClient->listCryptoKeys($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $keyManagementServiceClient->listCryptoKeys($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * @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 int $versionView + * The fields of the primary version to include in the response. + * For allowed values, use constants defined on {@see \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionView} + * @type string $filter + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * @type string $orderBy + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listCryptoKeys($parent, array $optionalArgs = []) + { + $request = new ListCryptoKeysRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['versionView'])) { + $request->setVersionView($optionalArgs['versionView']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListCryptoKeys', $optionalArgs, ListCryptoKeysResponse::class, $request); + } + + /** + * Lists [ImportJobs][google.cloud.kms.v1.ImportJob]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedParent = $keyManagementServiceClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + * // Iterate over pages of elements + * $pagedResponse = $keyManagementServiceClient->listImportJobs($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $keyManagementServiceClient->listImportJobs($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] + * to list, in the format `projects/*/locations/*/keyRings/*`. + * @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 + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * @type string $orderBy + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listImportJobs($parent, array $optionalArgs = []) + { + $request = new ListImportJobsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListImportJobs', $optionalArgs, ListImportJobsResponse::class, $request); + } + + /** + * Lists [KeyRings][google.cloud.kms.v1.KeyRing]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedParent = $keyManagementServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $keyManagementServiceClient->listKeyRings($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $keyManagementServiceClient->listKeyRings($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the location associated with the + * [KeyRings][google.cloud.kms.v1.KeyRing], in the format + * `projects/*/locations/*`. + * @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 + * Optional. Only include resources that match the filter in the response. For + * more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * @type string $orderBy + * Optional. Specify how the results should be sorted. If not specified, the + * results will be sorted in the default order. For more information, see + * [Sorting and filtering list + * results](https://cloud.google.com/kms/docs/sorting-and-filtering). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listKeyRings($parent, array $optionalArgs = []) + { + $request = new ListKeyRingsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + 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['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListKeyRings', $optionalArgs, ListKeyRingsResponse::class, $request); + } + + /** + * Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] + * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, + * producing a tag that can be verified by another source with the same key. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + * $data = '...'; + * $response = $keyManagementServiceClient->macSign($formattedName, $data); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * signing. + * @param string $data Required. The data to sign. The MAC tag is computed over this data field + * based on the specific algorithm. + * @param array $optionalArgs { + * Optional. + * + * @type Int64Value $dataCrc32c + * Optional. An optional CRC32C checksum of the + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is + * equal to + * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Kms\V1\MacSignResponse + * + * @throws ApiException if the remote call fails + */ + public function macSign($name, $data, array $optionalArgs = []) + { + $request = new MacSignRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setData($data); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['dataCrc32c'])) { + $request->setDataCrc32c($optionalArgs['dataCrc32c']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('MacSign', MacSignResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Verifies MAC tag using a + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, and returns + * a response that indicates whether or not the verification was successful. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + * $data = '...'; + * $mac = '...'; + * $response = $keyManagementServiceClient->macVerify($formattedName, $data, $mac); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for + * verification. + * @param string $data Required. The data used previously as a + * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate + * the MAC tag. + * @param string $mac Required. The signature to verify. + * @param array $optionalArgs { + * Optional. + * + * @type Int64Value $dataCrc32c + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using + * this checksum. + * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will + * report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) + * is equal to + * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * @type Int64Value $macCrc32c + * Optional. An optional CRC32C checksum of the + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If + * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will verify the integrity of the received + * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this + * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] + * will report an error if the checksum verification fails. If you receive a + * checksum error, your client should verify that + * CRC32C([MacVerifyRequest.tag][]) is equal to + * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c], + * and if so, perform a limited number of retries. A persistent mismatch may + * indicate an issue in your computation of the CRC32C checksum. Note: This + * field is defined as int64 for reasons of compatibility across different + * languages. However, it is a non-negative integer, which will never exceed + * 2^32-1, and can be safely downconverted to uint32 in languages that support + * this type. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Kms\V1\MacVerifyResponse + * + * @throws ApiException if the remote call fails + */ + public function macVerify($name, $data, $mac, array $optionalArgs = []) + { + $request = new MacVerifyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setData($data); + $request->setMac($mac); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['dataCrc32c'])) { + $request->setDataCrc32c($optionalArgs['dataCrc32c']); + } + + if (isset($optionalArgs['macCrc32c'])) { + $request->setMacCrc32c($optionalArgs['macCrc32c']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('MacVerify', MacVerifyResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the + * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] + * state. + * + * Upon restoration of the CryptoKeyVersion, + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to + * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED], + * and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will + * be cleared. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + * $response = $keyManagementServiceClient->restoreCryptoKeyVersion($formattedName); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. + * @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\Kms\V1\CryptoKeyVersion + * + * @throws ApiException if the remote call fails + */ + public function restoreCryptoKeyVersion($name, array $optionalArgs = []) + { + $request = new RestoreCryptoKeyVersionRequest(); + $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('RestoreCryptoKeyVersion', CryptoKeyVersion::class, $optionalArgs, $request)->wait(); + } + + /** + * Update a [CryptoKey][google.cloud.kms.v1.CryptoKey]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $cryptoKey = new CryptoKey(); + * $updateMask = new FieldMask(); + * $response = $keyManagementServiceClient->updateCryptoKey($cryptoKey, $updateMask); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param CryptoKey $cryptoKey Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. + * @param FieldMask $updateMask Required. List of fields to be updated in this request. + * @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\Kms\V1\CryptoKey + * + * @throws ApiException if the remote call fails + */ + public function updateCryptoKey($cryptoKey, $updateMask, array $optionalArgs = []) + { + $request = new UpdateCryptoKeyRequest(); + $requestParamHeaders = []; + $request->setCryptoKey($cryptoKey); + $request->setUpdateMask($updateMask); + $requestParamHeaders['crypto_key.name'] = $cryptoKey->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateCryptoKey', CryptoKey::class, $optionalArgs, $request)->wait(); + } + + /** + * Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that + * will be used in + * [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. + * + * Returns an error if called on a key whose purpose is not + * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $formattedName = $keyManagementServiceClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + * $cryptoKeyVersionId = 'crypto_key_version_id'; + * $response = $keyManagementServiceClient->updateCryptoKeyPrimaryVersion($formattedName, $cryptoKeyVersionId); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the + * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. + * @param string $cryptoKeyVersionId Required. The id of the child + * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. + * @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\Kms\V1\CryptoKey + * + * @throws ApiException if the remote call fails + */ + public function updateCryptoKeyPrimaryVersion($name, $cryptoKeyVersionId, array $optionalArgs = []) + { + $request = new UpdateCryptoKeyPrimaryVersionRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setCryptoKeyVersionId($cryptoKeyVersionId); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateCryptoKeyPrimaryVersion', CryptoKey::class, $optionalArgs, $request)->wait(); + } + + /** + * Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s + * metadata. + * + * [state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between + * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] + * and + * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] + * using this method. See + * [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion] + * and + * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] + * to move between other states. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $cryptoKeyVersion = new CryptoKeyVersion(); + * $updateMask = new FieldMask(); + * $response = $keyManagementServiceClient->updateCryptoKeyVersion($cryptoKeyVersion, $updateMask); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param CryptoKeyVersion $cryptoKeyVersion Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with + * updated values. + * @param FieldMask $updateMask Required. List of fields to be updated in this request. + * @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\Kms\V1\CryptoKeyVersion + * + * @throws ApiException if the remote call fails + */ + public function updateCryptoKeyVersion($cryptoKeyVersion, $updateMask, array $optionalArgs = []) + { + $request = new UpdateCryptoKeyVersionRequest(); + $requestParamHeaders = []; + $request->setCryptoKeyVersion($cryptoKeyVersion); + $request->setUpdateMask($updateMask); + $requestParamHeaders['crypto_key_version.name'] = $cryptoKeyVersion->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateCryptoKeyVersion', CryptoKeyVersion::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $response = $keyManagementServiceClient->getLocation(); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $keyManagementServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $keyManagementServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @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 listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $resource = 'resource'; + * $response = $keyManagementServiceClient->getIamPolicy($resource); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $keyManagementServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + 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('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->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. + * + * Sample code: + * ``` + * $keyManagementServiceClient = new KeyManagementServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $keyManagementServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $keyManagementServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @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\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); + } +} diff --git a/owl-bot-staging/Kms/v1/src/V1/KeyManagementServiceClient.php b/owl-bot-staging/Kms/v1/src/V1/KeyManagementServiceClient.php new file mode 100644 index 000000000000..04b86cf14288 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/KeyManagementServiceClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.kms.v1.EkmService' => [ + 'ListEkmConnections' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEkmConnections', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php new file mode 100644 index 000000000000..55ca57743070 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php @@ -0,0 +1,185 @@ + [ + 'google.cloud.kms.v1.EkmService' => [ + 'CreateEkmConnection' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/ekmConnections', + 'body' => 'ekm_connection', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'ekm_connection_id', + ], + ], + 'GetEkmConnection' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ekmConnections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListEkmConnections' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/ekmConnections', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateEkmConnection' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{ekm_connection.name=projects/*/locations/*/ekmConnections/*}', + 'body' => 'ekm_connection', + 'placeholders' => [ + 'ekm_connection.name' => [ + 'getters' => [ + 'getEkmConnection', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + '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.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json new file mode 100644 index 000000000000..cce2754f278a --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json @@ -0,0 +1,181 @@ +{ + "interfaces": { + "google.cloud.kms.v1.KeyManagementService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "AsymmetricDecrypt": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "AsymmetricSign": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateCryptoKey": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateCryptoKeyVersion": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateImportJob": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateKeyRing": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "Decrypt": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DestroyCryptoKeyVersion": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "Encrypt": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GenerateRandomBytes": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetCryptoKey": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetCryptoKeyVersion": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetImportJob": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetKeyRing": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetPublicKey": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ImportCryptoKeyVersion": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListCryptoKeyVersions": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListCryptoKeys": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListImportJobs": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListKeyRings": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "MacSign": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "MacVerify": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RestoreCryptoKeyVersion": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateCryptoKey": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateCryptoKeyPrimaryVersion": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateCryptoKeyVersion": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php new file mode 100644 index 000000000000..ad83c60d4f24 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php @@ -0,0 +1,58 @@ + [ + 'google.cloud.kms.v1.KeyManagementService' => [ + 'ListCryptoKeyVersions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCryptoKeyVersions', + ], + ], + 'ListCryptoKeys' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCryptoKeys', + ], + ], + 'ListImportJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getImportJobs', + ], + ], + 'ListKeyRings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getKeyRings', + ], + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php new file mode 100644 index 000000000000..4aba8af3de42 --- /dev/null +++ b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php @@ -0,0 +1,452 @@ + [ + 'google.cloud.kms.v1.KeyManagementService' => [ + 'AsymmetricDecrypt' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricDecrypt', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'AsymmetricSign' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricSign', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateCryptoKey' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys', + 'body' => 'crypto_key', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'crypto_key_id', + ], + ], + 'CreateCryptoKeyVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions', + 'body' => 'crypto_key_version', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateImportJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/importJobs', + 'body' => 'import_job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'import_job_id', + ], + ], + 'CreateKeyRing' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/keyRings', + 'body' => 'key_ring', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'key_ring_id', + ], + ], + 'Decrypt' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:decrypt', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DestroyCryptoKeyVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:destroy', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'Encrypt' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/**}:encrypt', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateRandomBytes' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{location=projects/*/locations/*}:generateRandomBytes', + 'body' => '*', + 'placeholders' => [ + 'location' => [ + 'getters' => [ + 'getLocation', + ], + ], + ], + ], + 'GetCryptoKey' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCryptoKeyVersion' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetImportJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/importJobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetKeyRing' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPublicKey' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}/publicKey', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportCryptoKeyVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions:import', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListCryptoKeyVersions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListCryptoKeys' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListImportJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/importJobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListKeyRings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/keyRings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'MacSign' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:macSign', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'MacVerify' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:macVerify', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RestoreCryptoKeyVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:restore', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCryptoKey' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{crypto_key.name=projects/*/locations/*/keyRings/*/cryptoKeys/*}', + 'body' => 'crypto_key', + 'placeholders' => [ + 'crypto_key.name' => [ + 'getters' => [ + 'getCryptoKey', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateCryptoKeyPrimaryVersion' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:updatePrimaryVersion', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCryptoKeyVersion' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{crypto_key_version.name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}', + 'body' => 'crypto_key_version', + 'placeholders' => [ + 'crypto_key_version.name' => [ + 'getters' => [ + 'getCryptoKeyVersion', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + '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.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Kms/v1/tests/Unit/V1/EkmServiceClientTest.php b/owl-bot-staging/Kms/v1/tests/Unit/V1/EkmServiceClientTest.php new file mode 100644 index 000000000000..50195ea398ff --- /dev/null +++ b/owl-bot-staging/Kms/v1/tests/Unit/V1/EkmServiceClientTest.php @@ -0,0 +1,645 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return EkmServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new EkmServiceClient($options); + } + + /** @test */ + public function createEkmConnectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $etag = 'etag3123477'; + $expectedResponse = new EkmConnection(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $ekmConnectionId = 'ekmConnectionId270499940'; + $ekmConnection = new EkmConnection(); + $response = $gapicClient->createEkmConnection($formattedParent, $ekmConnectionId, $ekmConnection); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.EkmService/CreateEkmConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEkmConnectionId(); + $this->assertProtobufEquals($ekmConnectionId, $actualValue); + $actualValue = $actualRequestObject->getEkmConnection(); + $this->assertProtobufEquals($ekmConnection, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEkmConnectionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $ekmConnectionId = 'ekmConnectionId270499940'; + $ekmConnection = new EkmConnection(); + try { + $gapicClient->createEkmConnection($formattedParent, $ekmConnectionId, $ekmConnection); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEkmConnectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $etag = 'etag3123477'; + $expectedResponse = new EkmConnection(); + $expectedResponse->setName($name2); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); + $response = $gapicClient->getEkmConnection($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.EkmService/GetEkmConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEkmConnectionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); + try { + $gapicClient->getEkmConnection($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 listEkmConnectionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $ekmConnectionsElement = new EkmConnection(); + $ekmConnections = [ + $ekmConnectionsElement, + ]; + $expectedResponse = new ListEkmConnectionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setEkmConnections($ekmConnections); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listEkmConnections($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEkmConnections()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.EkmService/ListEkmConnections', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEkmConnectionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listEkmConnections($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 updateEkmConnectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $etag = 'etag3123477'; + $expectedResponse = new EkmConnection(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $ekmConnection = new EkmConnection(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateEkmConnection($ekmConnection, $updateMask); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.EkmService/UpdateEkmConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getEkmConnection(); + $this->assertProtobufEquals($ekmConnection, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEkmConnectionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $ekmConnection = new EkmConnection(); + $updateMask = new FieldMask(); + try { + $gapicClient->updateEkmConnection($ekmConnection, $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()); + } + + /** @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); + $response = $gapicClient->getLocation(); + $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); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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); + $response = $gapicClient->listLocations(); + $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); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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'; + $response = $gapicClient->getIamPolicy($resource); + $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'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $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(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $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 = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->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/Kms/v1/tests/Unit/V1/KeyManagementServiceClientTest.php b/owl-bot-staging/Kms/v1/tests/Unit/V1/KeyManagementServiceClientTest.php new file mode 100644 index 000000000000..74c4907f3b3f --- /dev/null +++ b/owl-bot-staging/Kms/v1/tests/Unit/V1/KeyManagementServiceClientTest.php @@ -0,0 +1,2155 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return KeyManagementServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new KeyManagementServiceClient($options); + } + + /** @test */ + public function asymmetricDecryptTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $plaintext = '-9'; + $verifiedCiphertextCrc32c = true; + $expectedResponse = new AsymmetricDecryptResponse(); + $expectedResponse->setPlaintext($plaintext); + $expectedResponse->setVerifiedCiphertextCrc32c($verifiedCiphertextCrc32c); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $ciphertext = '-72'; + $response = $gapicClient->asymmetricDecrypt($formattedName, $ciphertext); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/AsymmetricDecrypt', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getCiphertext(); + $this->assertProtobufEquals($ciphertext, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function asymmetricDecryptExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $ciphertext = '-72'; + try { + $gapicClient->asymmetricDecrypt($formattedName, $ciphertext); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function asymmetricSignTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $signature = '-72'; + $verifiedDigestCrc32c = true; + $name2 = 'name2-1052831874'; + $verifiedDataCrc32c = true; + $expectedResponse = new AsymmetricSignResponse(); + $expectedResponse->setSignature($signature); + $expectedResponse->setVerifiedDigestCrc32c($verifiedDigestCrc32c); + $expectedResponse->setName($name2); + $expectedResponse->setVerifiedDataCrc32c($verifiedDataCrc32c); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $digest = new Digest(); + $response = $gapicClient->asymmetricSign($formattedName, $digest); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/AsymmetricSign', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getDigest(); + $this->assertProtobufEquals($digest, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function asymmetricSignExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $digest = new Digest(); + try { + $gapicClient->asymmetricSign($formattedName, $digest); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCryptoKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $importOnly = true; + $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; + $expectedResponse = new CryptoKey(); + $expectedResponse->setName($name); + $expectedResponse->setImportOnly($importOnly); + $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $cryptoKeyId = 'cryptoKeyId-2123094983'; + $cryptoKey = new CryptoKey(); + $response = $gapicClient->createCryptoKey($formattedParent, $cryptoKeyId, $cryptoKey); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateCryptoKey', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCryptoKeyId(); + $this->assertProtobufEquals($cryptoKeyId, $actualValue); + $actualValue = $actualRequestObject->getCryptoKey(); + $this->assertProtobufEquals($cryptoKey, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCryptoKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $cryptoKeyId = 'cryptoKeyId-2123094983'; + $cryptoKey = new CryptoKey(); + try { + $gapicClient->createCryptoKey($formattedParent, $cryptoKeyId, $cryptoKey); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCryptoKeyVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $importJob = 'importJob2125587491'; + $importFailureReason = 'importFailureReason-494073229'; + $reimportEligible = true; + $expectedResponse = new CryptoKeyVersion(); + $expectedResponse->setName($name); + $expectedResponse->setImportJob($importJob); + $expectedResponse->setImportFailureReason($importFailureReason); + $expectedResponse->setReimportEligible($reimportEligible); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $cryptoKeyVersion = new CryptoKeyVersion(); + $response = $gapicClient->createCryptoKeyVersion($formattedParent, $cryptoKeyVersion); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateCryptoKeyVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCryptoKeyVersion(); + $this->assertProtobufEquals($cryptoKeyVersion, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCryptoKeyVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $cryptoKeyVersion = new CryptoKeyVersion(); + try { + $gapicClient->createCryptoKeyVersion($formattedParent, $cryptoKeyVersion); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createImportJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new ImportJob(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $importJobId = 'importJobId-1620773193'; + $importJob = new ImportJob(); + $importJobImportMethod = ImportMethod::IMPORT_METHOD_UNSPECIFIED; + $importJob->setImportMethod($importJobImportMethod); + $importJobProtectionLevel = ProtectionLevel::PROTECTION_LEVEL_UNSPECIFIED; + $importJob->setProtectionLevel($importJobProtectionLevel); + $response = $gapicClient->createImportJob($formattedParent, $importJobId, $importJob); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateImportJob', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getImportJobId(); + $this->assertProtobufEquals($importJobId, $actualValue); + $actualValue = $actualRequestObject->getImportJob(); + $this->assertProtobufEquals($importJob, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createImportJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $importJobId = 'importJobId-1620773193'; + $importJob = new ImportJob(); + $importJobImportMethod = ImportMethod::IMPORT_METHOD_UNSPECIFIED; + $importJob->setImportMethod($importJobImportMethod); + $importJobProtectionLevel = ProtectionLevel::PROTECTION_LEVEL_UNSPECIFIED; + $importJob->setProtectionLevel($importJobProtectionLevel); + try { + $gapicClient->createImportJob($formattedParent, $importJobId, $importJob); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createKeyRingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new KeyRing(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $keyRingId = 'keyRingId-2056646742'; + $keyRing = new KeyRing(); + $response = $gapicClient->createKeyRing($formattedParent, $keyRingId, $keyRing); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateKeyRing', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getKeyRingId(); + $this->assertProtobufEquals($keyRingId, $actualValue); + $actualValue = $actualRequestObject->getKeyRing(); + $this->assertProtobufEquals($keyRing, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createKeyRingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $keyRingId = 'keyRingId-2056646742'; + $keyRing = new KeyRing(); + try { + $gapicClient->createKeyRing($formattedParent, $keyRingId, $keyRing); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function decryptTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $plaintext = '-9'; + $usedPrimary = true; + $expectedResponse = new DecryptResponse(); + $expectedResponse->setPlaintext($plaintext); + $expectedResponse->setUsedPrimary($usedPrimary); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $ciphertext = '-72'; + $response = $gapicClient->decrypt($formattedName, $ciphertext); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/Decrypt', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getCiphertext(); + $this->assertProtobufEquals($ciphertext, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function decryptExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $ciphertext = '-72'; + try { + $gapicClient->decrypt($formattedName, $ciphertext); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function destroyCryptoKeyVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $importJob = 'importJob2125587491'; + $importFailureReason = 'importFailureReason-494073229'; + $reimportEligible = true; + $expectedResponse = new CryptoKeyVersion(); + $expectedResponse->setName($name2); + $expectedResponse->setImportJob($importJob); + $expectedResponse->setImportFailureReason($importFailureReason); + $expectedResponse->setReimportEligible($reimportEligible); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $response = $gapicClient->destroyCryptoKeyVersion($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/DestroyCryptoKeyVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function destroyCryptoKeyVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + try { + $gapicClient->destroyCryptoKeyVersion($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 encryptTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $ciphertext = '-72'; + $verifiedPlaintextCrc32c = false; + $verifiedAdditionalAuthenticatedDataCrc32c = true; + $expectedResponse = new EncryptResponse(); + $expectedResponse->setName($name2); + $expectedResponse->setCiphertext($ciphertext); + $expectedResponse->setVerifiedPlaintextCrc32c($verifiedPlaintextCrc32c); + $expectedResponse->setVerifiedAdditionalAuthenticatedDataCrc32c($verifiedAdditionalAuthenticatedDataCrc32c); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $plaintext = '-9'; + $response = $gapicClient->encrypt($name, $plaintext); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/Encrypt', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getPlaintext(); + $this->assertProtobufEquals($plaintext, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function encryptExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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'; + $plaintext = '-9'; + try { + $gapicClient->encrypt($name, $plaintext); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateRandomBytesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $data = '-86'; + $expectedResponse = new GenerateRandomBytesResponse(); + $expectedResponse->setData($data); + $transport->addResponse($expectedResponse); + $response = $gapicClient->generateRandomBytes(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GenerateRandomBytes', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateRandomBytesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->generateRandomBytes(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCryptoKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $importOnly = true; + $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; + $expectedResponse = new CryptoKey(); + $expectedResponse->setName($name2); + $expectedResponse->setImportOnly($importOnly); + $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $response = $gapicClient->getCryptoKey($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetCryptoKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCryptoKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + try { + $gapicClient->getCryptoKey($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 getCryptoKeyVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $importJob = 'importJob2125587491'; + $importFailureReason = 'importFailureReason-494073229'; + $reimportEligible = true; + $expectedResponse = new CryptoKeyVersion(); + $expectedResponse->setName($name2); + $expectedResponse->setImportJob($importJob); + $expectedResponse->setImportFailureReason($importFailureReason); + $expectedResponse->setReimportEligible($reimportEligible); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $response = $gapicClient->getCryptoKeyVersion($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetCryptoKeyVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCryptoKeyVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + try { + $gapicClient->getCryptoKeyVersion($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 getImportJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new ImportJob(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[IMPORT_JOB]'); + $response = $gapicClient->getImportJob($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/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]', '[KEY_RING]', '[IMPORT_JOB]'); + try { + $gapicClient->getImportJob($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 getKeyRingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new KeyRing(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $response = $gapicClient->getKeyRing($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetKeyRing', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getKeyRingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + try { + $gapicClient->getKeyRing($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 getPublicKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $pem = 'pem110872'; + $name2 = 'name2-1052831874'; + $expectedResponse = new PublicKey(); + $expectedResponse->setPem($pem); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $response = $gapicClient->getPublicKey($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetPublicKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPublicKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + try { + $gapicClient->getPublicKey($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 importCryptoKeyVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $importJob2 = 'importJob2-1714851050'; + $importFailureReason = 'importFailureReason-494073229'; + $reimportEligible = true; + $expectedResponse = new CryptoKeyVersion(); + $expectedResponse->setName($name); + $expectedResponse->setImportJob($importJob2); + $expectedResponse->setImportFailureReason($importFailureReason); + $expectedResponse->setReimportEligible($reimportEligible); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $algorithm = CryptoKeyVersionAlgorithm::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED; + $importJob = 'importJob2125587491'; + $response = $gapicClient->importCryptoKeyVersion($formattedParent, $algorithm, $importJob); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ImportCryptoKeyVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAlgorithm(); + $this->assertProtobufEquals($algorithm, $actualValue); + $actualValue = $actualRequestObject->getImportJob(); + $this->assertProtobufEquals($importJob, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importCryptoKeyVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $algorithm = CryptoKeyVersionAlgorithm::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED; + $importJob = 'importJob2125587491'; + try { + $gapicClient->importCryptoKeyVersion($formattedParent, $algorithm, $importJob); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCryptoKeyVersionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $cryptoKeyVersionsElement = new CryptoKeyVersion(); + $cryptoKeyVersions = [ + $cryptoKeyVersionsElement, + ]; + $expectedResponse = new ListCryptoKeyVersionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setCryptoKeyVersions($cryptoKeyVersions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $response = $gapicClient->listCryptoKeyVersions($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCryptoKeyVersions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListCryptoKeyVersions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCryptoKeyVersionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + try { + $gapicClient->listCryptoKeyVersions($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 listCryptoKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $cryptoKeysElement = new CryptoKey(); + $cryptoKeys = [ + $cryptoKeysElement, + ]; + $expectedResponse = new ListCryptoKeysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setCryptoKeys($cryptoKeys); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $response = $gapicClient->listCryptoKeys($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCryptoKeys()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListCryptoKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCryptoKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + try { + $gapicClient->listCryptoKeys($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 listImportJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $importJobsElement = new ImportJob(); + $importJobs = [ + $importJobsElement, + ]; + $expectedResponse = new ListImportJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setImportJobs($importJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + $response = $gapicClient->listImportJobs($formattedParent); + $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.kms.v1.KeyManagementService/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->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); + try { + $gapicClient->listImportJobs($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 listKeyRingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $keyRingsElement = new KeyRing(); + $keyRings = [ + $keyRingsElement, + ]; + $expectedResponse = new ListKeyRingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setKeyRings($keyRings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listKeyRings($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getKeyRings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListKeyRings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listKeyRingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listKeyRings($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 macSignTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $mac = '79'; + $verifiedDataCrc32c = true; + $expectedResponse = new MacSignResponse(); + $expectedResponse->setName($name2); + $expectedResponse->setMac($mac); + $expectedResponse->setVerifiedDataCrc32c($verifiedDataCrc32c); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $data = '-86'; + $response = $gapicClient->macSign($formattedName, $data); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/MacSign', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getData(); + $this->assertProtobufEquals($data, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function macSignExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $data = '-86'; + try { + $gapicClient->macSign($formattedName, $data); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function macVerifyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $success = false; + $verifiedDataCrc32c = true; + $verifiedMacCrc32c = false; + $verifiedSuccessIntegrity = true; + $expectedResponse = new MacVerifyResponse(); + $expectedResponse->setName($name2); + $expectedResponse->setSuccess($success); + $expectedResponse->setVerifiedDataCrc32c($verifiedDataCrc32c); + $expectedResponse->setVerifiedMacCrc32c($verifiedMacCrc32c); + $expectedResponse->setVerifiedSuccessIntegrity($verifiedSuccessIntegrity); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $data = '-86'; + $mac = '79'; + $response = $gapicClient->macVerify($formattedName, $data, $mac); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/MacVerify', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getData(); + $this->assertProtobufEquals($data, $actualValue); + $actualValue = $actualRequestObject->getMac(); + $this->assertProtobufEquals($mac, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function macVerifyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $data = '-86'; + $mac = '79'; + try { + $gapicClient->macVerify($formattedName, $data, $mac); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restoreCryptoKeyVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $importJob = 'importJob2125587491'; + $importFailureReason = 'importFailureReason-494073229'; + $reimportEligible = true; + $expectedResponse = new CryptoKeyVersion(); + $expectedResponse->setName($name2); + $expectedResponse->setImportJob($importJob); + $expectedResponse->setImportFailureReason($importFailureReason); + $expectedResponse->setReimportEligible($reimportEligible); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + $response = $gapicClient->restoreCryptoKeyVersion($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/RestoreCryptoKeyVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restoreCryptoKeyVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); + try { + $gapicClient->restoreCryptoKeyVersion($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 updateCryptoKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $importOnly = true; + $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; + $expectedResponse = new CryptoKey(); + $expectedResponse->setName($name); + $expectedResponse->setImportOnly($importOnly); + $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); + $transport->addResponse($expectedResponse); + // Mock request + $cryptoKey = new CryptoKey(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateCryptoKey($cryptoKey, $updateMask); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKey', $actualFuncCall); + $actualValue = $actualRequestObject->getCryptoKey(); + $this->assertProtobufEquals($cryptoKey, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCryptoKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $cryptoKey = new CryptoKey(); + $updateMask = new FieldMask(); + try { + $gapicClient->updateCryptoKey($cryptoKey, $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()); + } + + /** @test */ + public function updateCryptoKeyPrimaryVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $importOnly = true; + $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; + $expectedResponse = new CryptoKey(); + $expectedResponse->setName($name2); + $expectedResponse->setImportOnly($importOnly); + $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $cryptoKeyVersionId = 'cryptoKeyVersionId729489152'; + $response = $gapicClient->updateCryptoKeyPrimaryVersion($formattedName, $cryptoKeyVersionId); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyPrimaryVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getCryptoKeyVersionId(); + $this->assertProtobufEquals($cryptoKeyVersionId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCryptoKeyPrimaryVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); + $cryptoKeyVersionId = 'cryptoKeyVersionId729489152'; + try { + $gapicClient->updateCryptoKeyPrimaryVersion($formattedName, $cryptoKeyVersionId); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCryptoKeyVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $importJob = 'importJob2125587491'; + $importFailureReason = 'importFailureReason-494073229'; + $reimportEligible = true; + $expectedResponse = new CryptoKeyVersion(); + $expectedResponse->setName($name); + $expectedResponse->setImportJob($importJob); + $expectedResponse->setImportFailureReason($importFailureReason); + $expectedResponse->setReimportEligible($reimportEligible); + $transport->addResponse($expectedResponse); + // Mock request + $cryptoKeyVersion = new CryptoKeyVersion(); + $updateMask = new FieldMask(); + $response = $gapicClient->updateCryptoKeyVersion($cryptoKeyVersion, $updateMask); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getCryptoKeyVersion(); + $this->assertProtobufEquals($cryptoKeyVersion, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCryptoKeyVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $cryptoKeyVersion = new CryptoKeyVersion(); + $updateMask = new FieldMask(); + try { + $gapicClient->updateCryptoKeyVersion($cryptoKeyVersion, $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()); + } + + /** @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); + $response = $gapicClient->getLocation(); + $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); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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); + $response = $gapicClient->listLocations(); + $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); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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'; + $response = $gapicClient->getIamPolicy($resource); + $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'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $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(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $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 = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->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/Language/v1/proto/src/GPBMetadata/Google/Cloud/Language/V1/LanguageService.php b/owl-bot-staging/Language/v1/proto/src/GPBMetadata/Google/Cloud/Language/V1/LanguageService.php new file mode 100644 index 0000000000000000000000000000000000000000..35a8aa915bc23fbffa64302469965aea000ca635 GIT binary patch literal 9584 zcmd5?&2Jmm5f4dyP){FTufG(fiJ7$%%Z^Q1bmBO2oOneprM1c3&2mXAt_osBtz;q; zmnBz@l_Dt6dx5q=4?XqJUJ4Xwk1fz!dnl4y3-l25kVAp~1qFI*fAiihMarT~89`HB z^!RpW-pst2-@G@w@4nx9)M6J>D_+xUyMecv+Sp44kGxc??FW9%Z=^PMx3;`?s^;&s z>J6`*PNi~Y$}pXjmeZYA!P@b6+cj?~we9=c4R4{=@OL*C8g6rY*WLCO9xrys)sEMG zT(5a)E}OBYyW@3QZp}-rSj$B(a5vq+U0>m1*0UsLy%367uPokXtk!Tlom4be64KcB zSPFlw-Hk@Qmg)pV?F0}YVCR}@Y@zhmzK7@pzBSVnZFz^OXBKV zsd=H}($Z5(-bn@RU9WfbRI2R-yY1#}t~Uwzv^!cq#A|A+zOFW#K6$}!c9xd*ZQ2(x zh%wu!d(Gf@Jo&oU*j)A=xsU69`*2q7!E5i;Lw~88n_c(h5mED9gUGx~>@$rm95a;U zS;3Izv6qfwFa3CN?p!F!ZPgK(WS@w>x$`{_w#bO;Mref~Q2rQW$(&!?-2spM78?on zTHb6d6`P;QtY1nGS}+~4q#e-9C)s$-hvCg&HV)Q_)feO!*@^91ry5RIciZ*ZMEFQz z$w>Fv5t>tOvJo!lG?SbUEv;HMN|u(@^SYLkUXW)PvkIziR2^;2kz#U^jjTGwf)rm) zvN4gCO2CpOEbk$%G7SA{l3!O-uOF<3I3SLPPjbiZ1YEb)=I7rJJejXri8 zyPk-YrTDFw^7~l0|C4OIY}_}@2L`sCu`x@tOQwM>pJK^^nN=Mfzv3`+%CuKhLw_h{ z67mEa)he3dNF(wIHu=D`?^n%yRka;y6u~*2HH}iasM*yO)67X@L~c5(nk|i!ENj&? zw5m}qE@Ngwh7xKnXKSUB#3o z?V##!RXZ)ut33*1@AbjkZh_w1DsgIAWhXYhme<_GhVNCq&25k8*kopYuz*~bK?A*v z-Dr3_J8qbW*Vsfiy5YEq9d{emVs}&QR-DK?HNP#^i7US#@AYc*HcJHVc8DKW25ZsF zly=;0`3@U%;e(n;znRRnA$e8KgfJhexgDX_Oy-RtnX_Oa)-Aui!yPa@YaT45^fr0F zjntw%A697;1~AdeJHEd;OQ|*d%0;ly%FW%K4XiwVtd$MUMC>iE-SL~V$z!owoQboy zeMp#{I37D^l2_Pd+pE=aJgNaXXBn4~8FJ6;eNOo{8wKKH+b6k*t3!%#h=-UT`#7e} zP92N6LOjY3V=O^o+XqDJ0#NZmMM@Bi0E6xUo-mcu2$nEqm}LWKgef2k zun1F@4TMY5lm+mb;7C(8vW|eFie@hZibh#%P2wn|=JWa*P{?FsVJ66IMy2BEpom6D zN(EH2^O)2t8uUZf>cyU!IDsZsULnvUl7#YaKr&Ac&}P*VmE<02YBpOg0eiW$X*Qwe zNHbkUO%`xlvHOe(HN{$V1HXN{z?IS&?$EoxiW>Gf; zcar>VE*JC<${Kuwg)Kn5ki}?W%hoKjgbCAtut^!tu(fz%YMXe_Bb7AabHXLKGgiajapfMH>;hZfmy8r7b;xYB`|9J%0EM>G0z@(erKyFvW1urgnE$~NsZ zfr|>;6SN6Pl#)0uAs)I|fRH4pD3n8Nz?LktQI2@DnH3X9o*t!PxEetU#AMY76XJXc zHNujgCfUq^W5+C$9(nF&HK3CduCSZl6MkqIMQs^vxEo%BABAR)Isx~KOc#ht`PDcZ zJp3NdPAwJ8+PZA49eGb)Gigjt45|9r$+l;6OmUKc497!UAoLPl7!?;aLP2&)~tebii4=Bl^*EMs&ty>b)q;!qoQixm(G&3;sZ@OCk7R1mIj8l zBE3k88iq7SLJTXk`6W^tXJknE7Ae4oT*H?+Bg)e&94o{j`8<^%OG*(bAXs(OHGtTw zV%u$pe5a5^i#y^1>1C0I7sUwvdX3YXC5Lo+o&P|v)2^&v>i$B(oac#dYg98Yb8h6P zbR`^F(i?mk6wQKkl{BTQd5ui8N>Z9k{GhBFT%iS`w6mn!b$Y;us07j?e~?28OBoVD z3)~&CK;p~d78C|u&9-!4@gmi8*D58jIrtdE9ddA z?n_LxEW}Owh$CR%LgK>RckQR{#Bdi}1zPfU1w0nEE26UzEbi6sY_6ZV=x=%rv&9<$vc-~*7ppro#Zh-M^X}lI^I$pY$|4twZVyS!gc4~d zo?BujlsGrR#zXOQe~)1-9>{xaE@~;kE98&5*Qq{6%}0wPymywL&ls^nIx8Akp|>Hu zB7`dyHaqB8AgnZ4~SWMpL#b%_3F(8QWzjBiCX zKr2o8EXK~M=(p~D;&pH0w)fp#uM!PJHdG@!Y%g7Ak{)YW>}KE7a-=az106p4US}C-_x#BeiCD6 zdl!PVZ$5si-Js@rbDh3ctA7+@r=tMfYXYe8ocz7eXG`2r$ia3`l8r`9mzKb>pHl= zDC_I&bicZx2XiQTUHA`^<@&HoM1@rOTY{YmUn6;6lQ)Vix#hWdmxUY_h4AKJwGLT3 zoe#MOz&35;OlC;fp8FSG?nDCRvup-C-gaw2wZl_{*N~))yI3^eg&$HqDJyI)dU6QB zlPXC$#bzTK&b`-D0_f#VQa;0`!vNW<2B78r&ZPXTxS_V-Wajze=8HI?0e?RjZtVX! z^Ln9NyvlhtlpkJ3$%oHTMyVk^A@`@r7)Om`r^%IDY^wJ#ATAK-9=$-LvXj3hF4Y(< z-V~Q=3~ywlMCP}QojC9wTmEy5Nf9hk#L(+0dGV+uIrK0zcSOVZpm-ba-|3{H6o2s7 ze|#3dpu9rw>!XnFEV&2HTT8JkU#e%L=T~vG*grUZsdmp`@}FYtM7Wj~7H;_n_Z}b( zv3Ks-wnxIdb`-cBit_TIc0}aEn(@_v6T@Ej)Fi+C%zfdD?Q=v%-8w#FxJM;!+hyhA zVB7YW8`i`>;HDWx1;;-5h*zt9gpolD&ornMo;yN2?r}R(%1ejZA&7@n|K~Au;YE?< zWm`VtO;ayjr2G-a_LGOYU+21?SLXV4k6@f?C0Bhv6+VZCy@-31hP`w{XxL94YWVHL zHFSGGpKEx&o5fLCKA6rYpQ4!ipjDSu~Ruq~fHfT#RJ9V_CLC?Q^x)ac2@qH literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesRequest.php new file mode 100644 index 000000000000..9896cc452301 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesRequest.php @@ -0,0 +1,111 @@ +google.cloud.language.v1.AnalyzeEntitiesRequest + */ +class AnalyzeEntitiesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; + */ + protected $encoding_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1\Document $document + * Required. Input document. + * @type int $encoding_type + * The encoding type used by the API to calculate offsets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Language\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Language\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; + * @return int + */ + public function getEncodingType() + { + return $this->encoding_type; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; + * @param int $var + * @return $this + */ + public function setEncodingType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class); + $this->encoding_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesResponse.php new file mode 100644 index 000000000000..963741329c42 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesResponse.php @@ -0,0 +1,109 @@ +google.cloud.language.v1.AnalyzeEntitiesResponse + */ +class AnalyzeEntitiesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The recognized entities in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; + */ + private $entities; + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + */ + protected $language = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $entities + * The recognized entities in the input document. + * @type string $language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The recognized entities in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntities() + { + return $this->entities; + } + + /** + * The recognized entities in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; + * @param array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Entity::class); + $this->entities = $arr; + + return $this; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + * @return string + */ + public function getLanguage() + { + return $this->language; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + * @param string $var + * @return $this + */ + public function setLanguage($var) + { + GPBUtil::checkString($var, True); + $this->language = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentRequest.php new file mode 100644 index 000000000000..01c5d0978b01 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentRequest.php @@ -0,0 +1,111 @@ +google.cloud.language.v1.AnalyzeEntitySentimentRequest + */ +class AnalyzeEntitySentimentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; + */ + protected $encoding_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1\Document $document + * Required. Input document. + * @type int $encoding_type + * The encoding type used by the API to calculate offsets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Language\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Language\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; + * @return int + */ + public function getEncodingType() + { + return $this->encoding_type; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; + * @param int $var + * @return $this + */ + public function setEncodingType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class); + $this->encoding_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentResponse.php new file mode 100644 index 000000000000..574aed78b8c7 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentResponse.php @@ -0,0 +1,109 @@ +google.cloud.language.v1.AnalyzeEntitySentimentResponse + */ +class AnalyzeEntitySentimentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The recognized entities in the input document with associated sentiments. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; + */ + private $entities; + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + */ + protected $language = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $entities + * The recognized entities in the input document with associated sentiments. + * @type string $language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The recognized entities in the input document with associated sentiments. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntities() + { + return $this->entities; + } + + /** + * The recognized entities in the input document with associated sentiments. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; + * @param array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Entity::class); + $this->entities = $arr; + + return $this; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + * @return string + */ + public function getLanguage() + { + return $this->language; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + * @param string $var + * @return $this + */ + public function setLanguage($var) + { + GPBUtil::checkString($var, True); + $this->language = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentRequest.php new file mode 100644 index 000000000000..314a41ef2423 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentRequest.php @@ -0,0 +1,111 @@ +google.cloud.language.v1.AnalyzeSentimentRequest + */ +class AnalyzeSentimentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * The encoding type used by the API to calculate sentence offsets. + * + * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; + */ + protected $encoding_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1\Document $document + * Required. Input document. + * @type int $encoding_type + * The encoding type used by the API to calculate sentence offsets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Language\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Language\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The encoding type used by the API to calculate sentence offsets. + * + * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; + * @return int + */ + public function getEncodingType() + { + return $this->encoding_type; + } + + /** + * The encoding type used by the API to calculate sentence offsets. + * + * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; + * @param int $var + * @return $this + */ + public function setEncodingType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class); + $this->encoding_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentResponse.php new file mode 100644 index 000000000000..b901a7a3a44e --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentResponse.php @@ -0,0 +1,153 @@ +google.cloud.language.v1.AnalyzeSentimentResponse + */ +class AnalyzeSentimentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The overall sentiment of the input document. + * + * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 1; + */ + protected $document_sentiment = null; + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + */ + protected $language = ''; + /** + * The sentiment for all the sentences in the document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 3; + */ + private $sentences; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1\Sentiment $document_sentiment + * The overall sentiment of the input document. + * @type string $language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * @type array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences + * The sentiment for all the sentences in the document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The overall sentiment of the input document. + * + * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 1; + * @return \Google\Cloud\Language\V1\Sentiment|null + */ + public function getDocumentSentiment() + { + return $this->document_sentiment; + } + + public function hasDocumentSentiment() + { + return isset($this->document_sentiment); + } + + public function clearDocumentSentiment() + { + unset($this->document_sentiment); + } + + /** + * The overall sentiment of the input document. + * + * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 1; + * @param \Google\Cloud\Language\V1\Sentiment $var + * @return $this + */ + public function setDocumentSentiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Sentiment::class); + $this->document_sentiment = $var; + + return $this; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + * @return string + */ + public function getLanguage() + { + return $this->language; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + * @param string $var + * @return $this + */ + public function setLanguage($var) + { + GPBUtil::checkString($var, True); + $this->language = $var; + + return $this; + } + + /** + * The sentiment for all the sentences in the document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSentences() + { + return $this->sentences; + } + + /** + * The sentiment for all the sentences in the document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 3; + * @param array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSentences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Sentence::class); + $this->sentences = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxRequest.php new file mode 100644 index 000000000000..905be9e6b840 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxRequest.php @@ -0,0 +1,111 @@ +google.cloud.language.v1.AnalyzeSyntaxRequest + */ +class AnalyzeSyntaxRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; + */ + protected $encoding_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1\Document $document + * Required. Input document. + * @type int $encoding_type + * The encoding type used by the API to calculate offsets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Language\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Language\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; + * @return int + */ + public function getEncodingType() + { + return $this->encoding_type; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; + * @param int $var + * @return $this + */ + public function setEncodingType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class); + $this->encoding_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxResponse.php new file mode 100644 index 000000000000..e9c06d2073d5 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxResponse.php @@ -0,0 +1,143 @@ +google.cloud.language.v1.AnalyzeSyntaxResponse + */ +class AnalyzeSyntaxResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Sentences in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; + */ + private $sentences; + /** + * Tokens, along with their syntactic information, in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; + */ + private $tokens; + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * + * Generated from protobuf field string language = 3; + */ + protected $language = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences + * Sentences in the input document. + * @type array<\Google\Cloud\Language\V1\Token>|\Google\Protobuf\Internal\RepeatedField $tokens + * Tokens, along with their syntactic information, in the input document. + * @type string $language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Sentences in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSentences() + { + return $this->sentences; + } + + /** + * Sentences in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; + * @param array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSentences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Sentence::class); + $this->sentences = $arr; + + return $this; + } + + /** + * Tokens, along with their syntactic information, in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTokens() + { + return $this->tokens; + } + + /** + * Tokens, along with their syntactic information, in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; + * @param array<\Google\Cloud\Language\V1\Token>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTokens($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Token::class); + $this->tokens = $arr; + + return $this; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * + * Generated from protobuf field string language = 3; + * @return string + */ + public function getLanguage() + { + return $this->language; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * + * Generated from protobuf field string language = 3; + * @param string $var + * @return $this + */ + public function setLanguage($var) + { + GPBUtil::checkString($var, True); + $this->language = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest.php new file mode 100644 index 000000000000..090940444ecd --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest.php @@ -0,0 +1,156 @@ +google.cloud.language.v1.AnnotateTextRequest + */ +class AnnotateTextRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * Required. The enabled features. + * + * Generated from protobuf field .google.cloud.language.v1.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $features = null; + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 3; + */ + protected $encoding_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1\Document $document + * Required. Input document. + * @type \Google\Cloud\Language\V1\AnnotateTextRequest\Features $features + * Required. The enabled features. + * @type int $encoding_type + * The encoding type used by the API to calculate offsets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Language\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Language\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * Required. The enabled features. + * + * Generated from protobuf field .google.cloud.language.v1.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Language\V1\AnnotateTextRequest\Features|null + */ + public function getFeatures() + { + return $this->features; + } + + public function hasFeatures() + { + return isset($this->features); + } + + public function clearFeatures() + { + unset($this->features); + } + + /** + * Required. The enabled features. + * + * Generated from protobuf field .google.cloud.language.v1.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Language\V1\AnnotateTextRequest\Features $var + * @return $this + */ + public function setFeatures($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\AnnotateTextRequest\Features::class); + $this->features = $var; + + return $this; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 3; + * @return int + */ + public function getEncodingType() + { + return $this->encoding_type; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 3; + * @param int $var + * @return $this + */ + public function setEncodingType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class); + $this->encoding_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest/Features.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest/Features.php new file mode 100644 index 000000000000..a22187d595ae --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest/Features.php @@ -0,0 +1,255 @@ +google.cloud.language.v1.AnnotateTextRequest.Features + */ +class Features extends \Google\Protobuf\Internal\Message +{ + /** + * Extract syntax information. + * + * Generated from protobuf field bool extract_syntax = 1; + */ + protected $extract_syntax = false; + /** + * Extract entities. + * + * Generated from protobuf field bool extract_entities = 2; + */ + protected $extract_entities = false; + /** + * Extract document-level sentiment. + * + * Generated from protobuf field bool extract_document_sentiment = 3; + */ + protected $extract_document_sentiment = false; + /** + * Extract entities and their associated sentiment. + * + * Generated from protobuf field bool extract_entity_sentiment = 4; + */ + protected $extract_entity_sentiment = false; + /** + * Classify the full document into categories. + * + * Generated from protobuf field bool classify_text = 6; + */ + protected $classify_text = false; + /** + * The model options to use for classification. Defaults to v1 options + * if not specified. Only used if `classify_text` is set to true. + * + * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10; + */ + protected $classification_model_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $extract_syntax + * Extract syntax information. + * @type bool $extract_entities + * Extract entities. + * @type bool $extract_document_sentiment + * Extract document-level sentiment. + * @type bool $extract_entity_sentiment + * Extract entities and their associated sentiment. + * @type bool $classify_text + * Classify the full document into categories. + * @type \Google\Cloud\Language\V1\ClassificationModelOptions $classification_model_options + * The model options to use for classification. Defaults to v1 options + * if not specified. Only used if `classify_text` is set to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Extract syntax information. + * + * Generated from protobuf field bool extract_syntax = 1; + * @return bool + */ + public function getExtractSyntax() + { + return $this->extract_syntax; + } + + /** + * Extract syntax information. + * + * Generated from protobuf field bool extract_syntax = 1; + * @param bool $var + * @return $this + */ + public function setExtractSyntax($var) + { + GPBUtil::checkBool($var); + $this->extract_syntax = $var; + + return $this; + } + + /** + * Extract entities. + * + * Generated from protobuf field bool extract_entities = 2; + * @return bool + */ + public function getExtractEntities() + { + return $this->extract_entities; + } + + /** + * Extract entities. + * + * Generated from protobuf field bool extract_entities = 2; + * @param bool $var + * @return $this + */ + public function setExtractEntities($var) + { + GPBUtil::checkBool($var); + $this->extract_entities = $var; + + return $this; + } + + /** + * Extract document-level sentiment. + * + * Generated from protobuf field bool extract_document_sentiment = 3; + * @return bool + */ + public function getExtractDocumentSentiment() + { + return $this->extract_document_sentiment; + } + + /** + * Extract document-level sentiment. + * + * Generated from protobuf field bool extract_document_sentiment = 3; + * @param bool $var + * @return $this + */ + public function setExtractDocumentSentiment($var) + { + GPBUtil::checkBool($var); + $this->extract_document_sentiment = $var; + + return $this; + } + + /** + * Extract entities and their associated sentiment. + * + * Generated from protobuf field bool extract_entity_sentiment = 4; + * @return bool + */ + public function getExtractEntitySentiment() + { + return $this->extract_entity_sentiment; + } + + /** + * Extract entities and their associated sentiment. + * + * Generated from protobuf field bool extract_entity_sentiment = 4; + * @param bool $var + * @return $this + */ + public function setExtractEntitySentiment($var) + { + GPBUtil::checkBool($var); + $this->extract_entity_sentiment = $var; + + return $this; + } + + /** + * Classify the full document into categories. + * + * Generated from protobuf field bool classify_text = 6; + * @return bool + */ + public function getClassifyText() + { + return $this->classify_text; + } + + /** + * Classify the full document into categories. + * + * Generated from protobuf field bool classify_text = 6; + * @param bool $var + * @return $this + */ + public function setClassifyText($var) + { + GPBUtil::checkBool($var); + $this->classify_text = $var; + + return $this; + } + + /** + * The model options to use for classification. Defaults to v1 options + * if not specified. Only used if `classify_text` is set to true. + * + * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10; + * @return \Google\Cloud\Language\V1\ClassificationModelOptions|null + */ + public function getClassificationModelOptions() + { + return $this->classification_model_options; + } + + public function hasClassificationModelOptions() + { + return isset($this->classification_model_options); + } + + public function clearClassificationModelOptions() + { + unset($this->classification_model_options); + } + + /** + * The model options to use for classification. Defaults to v1 options + * if not specified. Only used if `classify_text` is set to true. + * + * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10; + * @param \Google\Cloud\Language\V1\ClassificationModelOptions $var + * @return $this + */ + public function setClassificationModelOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\ClassificationModelOptions::class); + $this->classification_model_options = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Features::class, \Google\Cloud\Language\V1\AnnotateTextRequest_Features::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest_Features.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest_Features.php new file mode 100644 index 000000000000..e02aca7493ec --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest_Features.php @@ -0,0 +1,16 @@ +google.cloud.language.v1.AnnotateTextResponse + */ +class AnnotateTextResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Sentences in the input document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; + */ + private $sentences; + /** + * Tokens, along with their syntactic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; + */ + private $tokens; + /** + * Entities, along with their semantic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities]. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 3; + */ + private $entities; + /** + * The overall sentiment for the document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]. + * + * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 4; + */ + protected $document_sentiment = null; + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * + * Generated from protobuf field string language = 5; + */ + protected $language = ''; + /** + * Categories identified in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 6; + */ + private $categories; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences + * Sentences in the input document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. + * @type array<\Google\Cloud\Language\V1\Token>|\Google\Protobuf\Internal\RepeatedField $tokens + * Tokens, along with their syntactic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. + * @type array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $entities + * Entities, along with their semantic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities]. + * @type \Google\Cloud\Language\V1\Sentiment $document_sentiment + * The overall sentiment for the document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]. + * @type string $language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * @type array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $categories + * Categories identified in the input document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Sentences in the input document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSentences() + { + return $this->sentences; + } + + /** + * Sentences in the input document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; + * @param array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSentences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Sentence::class); + $this->sentences = $arr; + + return $this; + } + + /** + * Tokens, along with their syntactic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTokens() + { + return $this->tokens; + } + + /** + * Tokens, along with their syntactic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; + * @param array<\Google\Cloud\Language\V1\Token>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTokens($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Token::class); + $this->tokens = $arr; + + return $this; + } + + /** + * Entities, along with their semantic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities]. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntities() + { + return $this->entities; + } + + /** + * Entities, along with their semantic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities]. + * + * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 3; + * @param array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Entity::class); + $this->entities = $arr; + + return $this; + } + + /** + * The overall sentiment for the document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]. + * + * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 4; + * @return \Google\Cloud\Language\V1\Sentiment|null + */ + public function getDocumentSentiment() + { + return $this->document_sentiment; + } + + public function hasDocumentSentiment() + { + return isset($this->document_sentiment); + } + + public function clearDocumentSentiment() + { + unset($this->document_sentiment); + } + + /** + * The overall sentiment for the document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]. + * + * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 4; + * @param \Google\Cloud\Language\V1\Sentiment $var + * @return $this + */ + public function setDocumentSentiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Sentiment::class); + $this->document_sentiment = $var; + + return $this; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * + * Generated from protobuf field string language = 5; + * @return string + */ + public function getLanguage() + { + return $this->language; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1.Document.language] field for more details. + * + * Generated from protobuf field string language = 5; + * @param string $var + * @return $this + */ + public function setLanguage($var) + { + GPBUtil::checkString($var, True); + $this->language = $var; + + return $this; + } + + /** + * Categories identified in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCategories() + { + return $this->categories; + } + + /** + * Categories identified in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 6; + * @param array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\ClassificationCategory::class); + $this->categories = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationCategory.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationCategory.php new file mode 100644 index 000000000000..48536b20188e --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationCategory.php @@ -0,0 +1,109 @@ +google.cloud.language.v1.ClassificationCategory + */ +class ClassificationCategory extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the category representing the document, from the [predefined + * taxonomy](https://cloud.google.com/natural-language/docs/categories). + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The classifier's confidence of the category. Number represents how certain + * the classifier is that this category represents the given text. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the category representing the document, from the [predefined + * taxonomy](https://cloud.google.com/natural-language/docs/categories). + * @type float $confidence + * The classifier's confidence of the category. Number represents how certain + * the classifier is that this category represents the given text. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The name of the category representing the document, from the [predefined + * taxonomy](https://cloud.google.com/natural-language/docs/categories). + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the category representing the document, from the [predefined + * taxonomy](https://cloud.google.com/natural-language/docs/categories). + * + * 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 classifier's confidence of the category. Number represents how certain + * the classifier is that this category represents the given text. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * The classifier's confidence of the category. Number represents how certain + * the classifier is that this category represents the given text. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions.php new file mode 100644 index 000000000000..dc546f8a8822 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions.php @@ -0,0 +1,117 @@ +google.cloud.language.v1.ClassificationModelOptions + */ +class ClassificationModelOptions extends \Google\Protobuf\Internal\Message +{ + protected $model_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1\ClassificationModelOptions\V1Model $v1_model + * Setting this field will use the V1 model and V1 content categories + * version. The V1 model is a legacy model; support for this will be + * discontinued in the future. + * @type \Google\Cloud\Language\V1\ClassificationModelOptions\V2Model $v2_model + * Setting this field will use the V2 model with the appropriate content + * categories version. The V2 model is a better performing model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Setting this field will use the V1 model and V1 content categories + * version. The V1 model is a legacy model; support for this will be + * discontinued in the future. + * + * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V1Model v1_model = 1; + * @return \Google\Cloud\Language\V1\ClassificationModelOptions\V1Model|null + */ + public function getV1Model() + { + return $this->readOneof(1); + } + + public function hasV1Model() + { + return $this->hasOneof(1); + } + + /** + * Setting this field will use the V1 model and V1 content categories + * version. The V1 model is a legacy model; support for this will be + * discontinued in the future. + * + * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V1Model v1_model = 1; + * @param \Google\Cloud\Language\V1\ClassificationModelOptions\V1Model $var + * @return $this + */ + public function setV1Model($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\ClassificationModelOptions\V1Model::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Setting this field will use the V2 model with the appropriate content + * categories version. The V2 model is a better performing model. + * + * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V2Model v2_model = 2; + * @return \Google\Cloud\Language\V1\ClassificationModelOptions\V2Model|null + */ + public function getV2Model() + { + return $this->readOneof(2); + } + + public function hasV2Model() + { + return $this->hasOneof(2); + } + + /** + * Setting this field will use the V2 model with the appropriate content + * categories version. The V2 model is a better performing model. + * + * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V2Model v2_model = 2; + * @param \Google\Cloud\Language\V1\ClassificationModelOptions\V2Model $var + * @return $this + */ + public function setV2Model($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\ClassificationModelOptions\V2Model::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getModelType() + { + return $this->whichOneof("model_type"); + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V1Model.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V1Model.php new file mode 100644 index 000000000000..e6ac49f77646 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V1Model.php @@ -0,0 +1,36 @@ +google.cloud.language.v1.ClassificationModelOptions.V1Model + */ +class V1Model extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(V1Model::class, \Google\Cloud\Language\V1\ClassificationModelOptions_V1Model::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model.php new file mode 100644 index 000000000000..d4bbc1b08794 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model.php @@ -0,0 +1,70 @@ +google.cloud.language.v1.ClassificationModelOptions.V2Model + */ +class V2Model extends \Google\Protobuf\Internal\Message +{ + /** + * The content categories used for classification. + * + * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; + */ + protected $content_categories_version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $content_categories_version + * The content categories used for classification. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The content categories used for classification. + * + * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; + * @return int + */ + public function getContentCategoriesVersion() + { + return $this->content_categories_version; + } + + /** + * The content categories used for classification. + * + * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; + * @param int $var + * @return $this + */ + public function setContentCategoriesVersion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\ClassificationModelOptions\V2Model\ContentCategoriesVersion::class); + $this->content_categories_version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(V2Model::class, \Google\Cloud\Language\V1\ClassificationModelOptions_V2Model::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php new file mode 100644 index 000000000000..5c9434822a5b --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php @@ -0,0 +1,65 @@ +google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion + */ +class ContentCategoriesVersion +{ + /** + * If `ContentCategoriesVersion` is not specified, this option will + * default to `V1`. + * + * Generated from protobuf enum CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0; + */ + const CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0; + /** + * Legacy content categories of our initial launch in 2017. + * + * Generated from protobuf enum V1 = 1; + */ + const V1 = 1; + /** + * Updated content categories in 2022. + * + * Generated from protobuf enum V2 = 2; + */ + const V2 = 2; + + private static $valueToName = [ + self::CONTENT_CATEGORIES_VERSION_UNSPECIFIED => 'CONTENT_CATEGORIES_VERSION_UNSPECIFIED', + self::V1 => 'V1', + self::V2 => '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(ContentCategoriesVersion::class, \Google\Cloud\Language\V1\ClassificationModelOptions_V2Model_ContentCategoriesVersion::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions_V1Model.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions_V1Model.php new file mode 100644 index 000000000000..b1b22eddc453 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions_V1Model.php @@ -0,0 +1,16 @@ +google.cloud.language.v1.ClassifyTextRequest + */ +class ClassifyTextRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * Model options to use for classification. Defaults to v1 options if not + * specified. + * + * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 3; + */ + protected $classification_model_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1\Document $document + * Required. Input document. + * @type \Google\Cloud\Language\V1\ClassificationModelOptions $classification_model_options + * Model options to use for classification. Defaults to v1 options if not + * specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Language\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Language\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * Model options to use for classification. Defaults to v1 options if not + * specified. + * + * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 3; + * @return \Google\Cloud\Language\V1\ClassificationModelOptions|null + */ + public function getClassificationModelOptions() + { + return $this->classification_model_options; + } + + public function hasClassificationModelOptions() + { + return isset($this->classification_model_options); + } + + public function clearClassificationModelOptions() + { + unset($this->classification_model_options); + } + + /** + * Model options to use for classification. Defaults to v1 options if not + * specified. + * + * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 3; + * @param \Google\Cloud\Language\V1\ClassificationModelOptions $var + * @return $this + */ + public function setClassificationModelOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\ClassificationModelOptions::class); + $this->classification_model_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextResponse.php new file mode 100644 index 000000000000..3ace816bfb6e --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextResponse.php @@ -0,0 +1,67 @@ +google.cloud.language.v1.ClassifyTextResponse + */ +class ClassifyTextResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Categories representing the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 1; + */ + private $categories; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $categories + * Categories representing the input document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Categories representing the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCategories() + { + return $this->categories; + } + + /** + * Categories representing the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 1; + * @param array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\ClassificationCategory::class); + $this->categories = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge.php new file mode 100644 index 000000000000..87559c773111 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge.php @@ -0,0 +1,119 @@ +google.cloud.language.v1.DependencyEdge + */ +class DependencyEdge extends \Google\Protobuf\Internal\Message +{ + /** + * Represents the head of this token in the dependency tree. + * This is the index of the token which has an arc going to this token. + * The index is the position of the token in the array of tokens returned + * by the API method. If this token is a root token, then the + * `head_token_index` is its own index. + * + * Generated from protobuf field int32 head_token_index = 1; + */ + protected $head_token_index = 0; + /** + * The parse label for the token. + * + * Generated from protobuf field .google.cloud.language.v1.DependencyEdge.Label label = 2; + */ + protected $label = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $head_token_index + * Represents the head of this token in the dependency tree. + * This is the index of the token which has an arc going to this token. + * The index is the position of the token in the array of tokens returned + * by the API method. If this token is a root token, then the + * `head_token_index` is its own index. + * @type int $label + * The parse label for the token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Represents the head of this token in the dependency tree. + * This is the index of the token which has an arc going to this token. + * The index is the position of the token in the array of tokens returned + * by the API method. If this token is a root token, then the + * `head_token_index` is its own index. + * + * Generated from protobuf field int32 head_token_index = 1; + * @return int + */ + public function getHeadTokenIndex() + { + return $this->head_token_index; + } + + /** + * Represents the head of this token in the dependency tree. + * This is the index of the token which has an arc going to this token. + * The index is the position of the token in the array of tokens returned + * by the API method. If this token is a root token, then the + * `head_token_index` is its own index. + * + * Generated from protobuf field int32 head_token_index = 1; + * @param int $var + * @return $this + */ + public function setHeadTokenIndex($var) + { + GPBUtil::checkInt32($var); + $this->head_token_index = $var; + + return $this; + } + + /** + * The parse label for the token. + * + * Generated from protobuf field .google.cloud.language.v1.DependencyEdge.Label label = 2; + * @return int + */ + public function getLabel() + { + return $this->label; + } + + /** + * The parse label for the token. + * + * Generated from protobuf field .google.cloud.language.v1.DependencyEdge.Label label = 2; + * @param int $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\DependencyEdge\Label::class); + $this->label = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge/Label.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge/Label.php new file mode 100644 index 000000000000..cd6d7039830c --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge/Label.php @@ -0,0 +1,628 @@ +google.cloud.language.v1.DependencyEdge.Label + */ +class Label +{ + /** + * Unknown + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * Abbreviation modifier + * + * Generated from protobuf enum ABBREV = 1; + */ + const ABBREV = 1; + /** + * Adjectival complement + * + * Generated from protobuf enum ACOMP = 2; + */ + const ACOMP = 2; + /** + * Adverbial clause modifier + * + * Generated from protobuf enum ADVCL = 3; + */ + const ADVCL = 3; + /** + * Adverbial modifier + * + * Generated from protobuf enum ADVMOD = 4; + */ + const ADVMOD = 4; + /** + * Adjectival modifier of an NP + * + * Generated from protobuf enum AMOD = 5; + */ + const AMOD = 5; + /** + * Appositional modifier of an NP + * + * Generated from protobuf enum APPOS = 6; + */ + const APPOS = 6; + /** + * Attribute dependent of a copular verb + * + * Generated from protobuf enum ATTR = 7; + */ + const ATTR = 7; + /** + * Auxiliary (non-main) verb + * + * Generated from protobuf enum AUX = 8; + */ + const AUX = 8; + /** + * Passive auxiliary + * + * Generated from protobuf enum AUXPASS = 9; + */ + const AUXPASS = 9; + /** + * Coordinating conjunction + * + * Generated from protobuf enum CC = 10; + */ + const CC = 10; + /** + * Clausal complement of a verb or adjective + * + * Generated from protobuf enum CCOMP = 11; + */ + const CCOMP = 11; + /** + * Conjunct + * + * Generated from protobuf enum CONJ = 12; + */ + const CONJ = 12; + /** + * Clausal subject + * + * Generated from protobuf enum CSUBJ = 13; + */ + const CSUBJ = 13; + /** + * Clausal passive subject + * + * Generated from protobuf enum CSUBJPASS = 14; + */ + const CSUBJPASS = 14; + /** + * Dependency (unable to determine) + * + * Generated from protobuf enum DEP = 15; + */ + const DEP = 15; + /** + * Determiner + * + * Generated from protobuf enum DET = 16; + */ + const DET = 16; + /** + * Discourse + * + * Generated from protobuf enum DISCOURSE = 17; + */ + const DISCOURSE = 17; + /** + * Direct object + * + * Generated from protobuf enum DOBJ = 18; + */ + const DOBJ = 18; + /** + * Expletive + * + * Generated from protobuf enum EXPL = 19; + */ + const EXPL = 19; + /** + * Goes with (part of a word in a text not well edited) + * + * Generated from protobuf enum GOESWITH = 20; + */ + const GOESWITH = 20; + /** + * Indirect object + * + * Generated from protobuf enum IOBJ = 21; + */ + const IOBJ = 21; + /** + * Marker (word introducing a subordinate clause) + * + * Generated from protobuf enum MARK = 22; + */ + const MARK = 22; + /** + * Multi-word expression + * + * Generated from protobuf enum MWE = 23; + */ + const MWE = 23; + /** + * Multi-word verbal expression + * + * Generated from protobuf enum MWV = 24; + */ + const MWV = 24; + /** + * Negation modifier + * + * Generated from protobuf enum NEG = 25; + */ + const NEG = 25; + /** + * Noun compound modifier + * + * Generated from protobuf enum NN = 26; + */ + const NN = 26; + /** + * Noun phrase used as an adverbial modifier + * + * Generated from protobuf enum NPADVMOD = 27; + */ + const NPADVMOD = 27; + /** + * Nominal subject + * + * Generated from protobuf enum NSUBJ = 28; + */ + const NSUBJ = 28; + /** + * Passive nominal subject + * + * Generated from protobuf enum NSUBJPASS = 29; + */ + const NSUBJPASS = 29; + /** + * Numeric modifier of a noun + * + * Generated from protobuf enum NUM = 30; + */ + const NUM = 30; + /** + * Element of compound number + * + * Generated from protobuf enum NUMBER = 31; + */ + const NUMBER = 31; + /** + * Punctuation mark + * + * Generated from protobuf enum P = 32; + */ + const P = 32; + /** + * Parataxis relation + * + * Generated from protobuf enum PARATAXIS = 33; + */ + const PARATAXIS = 33; + /** + * Participial modifier + * + * Generated from protobuf enum PARTMOD = 34; + */ + const PARTMOD = 34; + /** + * The complement of a preposition is a clause + * + * Generated from protobuf enum PCOMP = 35; + */ + const PCOMP = 35; + /** + * Object of a preposition + * + * Generated from protobuf enum POBJ = 36; + */ + const POBJ = 36; + /** + * Possession modifier + * + * Generated from protobuf enum POSS = 37; + */ + const POSS = 37; + /** + * Postverbal negative particle + * + * Generated from protobuf enum POSTNEG = 38; + */ + const POSTNEG = 38; + /** + * Predicate complement + * + * Generated from protobuf enum PRECOMP = 39; + */ + const PRECOMP = 39; + /** + * Preconjunt + * + * Generated from protobuf enum PRECONJ = 40; + */ + const PRECONJ = 40; + /** + * Predeterminer + * + * Generated from protobuf enum PREDET = 41; + */ + const PREDET = 41; + /** + * Prefix + * + * Generated from protobuf enum PREF = 42; + */ + const PREF = 42; + /** + * Prepositional modifier + * + * Generated from protobuf enum PREP = 43; + */ + const PREP = 43; + /** + * The relationship between a verb and verbal morpheme + * + * Generated from protobuf enum PRONL = 44; + */ + const PRONL = 44; + /** + * Particle + * + * Generated from protobuf enum PRT = 45; + */ + const PRT = 45; + /** + * Associative or possessive marker + * + * Generated from protobuf enum PS = 46; + */ + const PS = 46; + /** + * Quantifier phrase modifier + * + * Generated from protobuf enum QUANTMOD = 47; + */ + const QUANTMOD = 47; + /** + * Relative clause modifier + * + * Generated from protobuf enum RCMOD = 48; + */ + const RCMOD = 48; + /** + * Complementizer in relative clause + * + * Generated from protobuf enum RCMODREL = 49; + */ + const RCMODREL = 49; + /** + * Ellipsis without a preceding predicate + * + * Generated from protobuf enum RDROP = 50; + */ + const RDROP = 50; + /** + * Referent + * + * Generated from protobuf enum REF = 51; + */ + const REF = 51; + /** + * Remnant + * + * Generated from protobuf enum REMNANT = 52; + */ + const REMNANT = 52; + /** + * Reparandum + * + * Generated from protobuf enum REPARANDUM = 53; + */ + const REPARANDUM = 53; + /** + * Root + * + * Generated from protobuf enum ROOT = 54; + */ + const ROOT = 54; + /** + * Suffix specifying a unit of number + * + * Generated from protobuf enum SNUM = 55; + */ + const SNUM = 55; + /** + * Suffix + * + * Generated from protobuf enum SUFF = 56; + */ + const SUFF = 56; + /** + * Temporal modifier + * + * Generated from protobuf enum TMOD = 57; + */ + const TMOD = 57; + /** + * Topic marker + * + * Generated from protobuf enum TOPIC = 58; + */ + const TOPIC = 58; + /** + * Clause headed by an infinite form of the verb that modifies a noun + * + * Generated from protobuf enum VMOD = 59; + */ + const VMOD = 59; + /** + * Vocative + * + * Generated from protobuf enum VOCATIVE = 60; + */ + const VOCATIVE = 60; + /** + * Open clausal complement + * + * Generated from protobuf enum XCOMP = 61; + */ + const XCOMP = 61; + /** + * Name suffix + * + * Generated from protobuf enum SUFFIX = 62; + */ + const SUFFIX = 62; + /** + * Name title + * + * Generated from protobuf enum TITLE = 63; + */ + const TITLE = 63; + /** + * Adverbial phrase modifier + * + * Generated from protobuf enum ADVPHMOD = 64; + */ + const ADVPHMOD = 64; + /** + * Causative auxiliary + * + * Generated from protobuf enum AUXCAUS = 65; + */ + const AUXCAUS = 65; + /** + * Helper auxiliary + * + * Generated from protobuf enum AUXVV = 66; + */ + const AUXVV = 66; + /** + * Rentaishi (Prenominal modifier) + * + * Generated from protobuf enum DTMOD = 67; + */ + const DTMOD = 67; + /** + * Foreign words + * + * Generated from protobuf enum FOREIGN = 68; + */ + const FOREIGN = 68; + /** + * Keyword + * + * Generated from protobuf enum KW = 69; + */ + const KW = 69; + /** + * List for chains of comparable items + * + * Generated from protobuf enum LIST = 70; + */ + const PBLIST = 70; + /** + * Nominalized clause + * + * Generated from protobuf enum NOMC = 71; + */ + const NOMC = 71; + /** + * Nominalized clausal subject + * + * Generated from protobuf enum NOMCSUBJ = 72; + */ + const NOMCSUBJ = 72; + /** + * Nominalized clausal passive + * + * Generated from protobuf enum NOMCSUBJPASS = 73; + */ + const NOMCSUBJPASS = 73; + /** + * Compound of numeric modifier + * + * Generated from protobuf enum NUMC = 74; + */ + const NUMC = 74; + /** + * Copula + * + * Generated from protobuf enum COP = 75; + */ + const COP = 75; + /** + * Dislocated relation (for fronted/topicalized elements) + * + * Generated from protobuf enum DISLOCATED = 76; + */ + const DISLOCATED = 76; + /** + * Aspect marker + * + * Generated from protobuf enum ASP = 77; + */ + const ASP = 77; + /** + * Genitive modifier + * + * Generated from protobuf enum GMOD = 78; + */ + const GMOD = 78; + /** + * Genitive object + * + * Generated from protobuf enum GOBJ = 79; + */ + const GOBJ = 79; + /** + * Infinitival modifier + * + * Generated from protobuf enum INFMOD = 80; + */ + const INFMOD = 80; + /** + * Measure + * + * Generated from protobuf enum MES = 81; + */ + const MES = 81; + /** + * Nominal complement of a noun + * + * Generated from protobuf enum NCOMP = 82; + */ + const NCOMP = 82; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::ABBREV => 'ABBREV', + self::ACOMP => 'ACOMP', + self::ADVCL => 'ADVCL', + self::ADVMOD => 'ADVMOD', + self::AMOD => 'AMOD', + self::APPOS => 'APPOS', + self::ATTR => 'ATTR', + self::AUX => 'AUX', + self::AUXPASS => 'AUXPASS', + self::CC => 'CC', + self::CCOMP => 'CCOMP', + self::CONJ => 'CONJ', + self::CSUBJ => 'CSUBJ', + self::CSUBJPASS => 'CSUBJPASS', + self::DEP => 'DEP', + self::DET => 'DET', + self::DISCOURSE => 'DISCOURSE', + self::DOBJ => 'DOBJ', + self::EXPL => 'EXPL', + self::GOESWITH => 'GOESWITH', + self::IOBJ => 'IOBJ', + self::MARK => 'MARK', + self::MWE => 'MWE', + self::MWV => 'MWV', + self::NEG => 'NEG', + self::NN => 'NN', + self::NPADVMOD => 'NPADVMOD', + self::NSUBJ => 'NSUBJ', + self::NSUBJPASS => 'NSUBJPASS', + self::NUM => 'NUM', + self::NUMBER => 'NUMBER', + self::P => 'P', + self::PARATAXIS => 'PARATAXIS', + self::PARTMOD => 'PARTMOD', + self::PCOMP => 'PCOMP', + self::POBJ => 'POBJ', + self::POSS => 'POSS', + self::POSTNEG => 'POSTNEG', + self::PRECOMP => 'PRECOMP', + self::PRECONJ => 'PRECONJ', + self::PREDET => 'PREDET', + self::PREF => 'PREF', + self::PREP => 'PREP', + self::PRONL => 'PRONL', + self::PRT => 'PRT', + self::PS => 'PS', + self::QUANTMOD => 'QUANTMOD', + self::RCMOD => 'RCMOD', + self::RCMODREL => 'RCMODREL', + self::RDROP => 'RDROP', + self::REF => 'REF', + self::REMNANT => 'REMNANT', + self::REPARANDUM => 'REPARANDUM', + self::ROOT => 'ROOT', + self::SNUM => 'SNUM', + self::SUFF => 'SUFF', + self::TMOD => 'TMOD', + self::TOPIC => 'TOPIC', + self::VMOD => 'VMOD', + self::VOCATIVE => 'VOCATIVE', + self::XCOMP => 'XCOMP', + self::SUFFIX => 'SUFFIX', + self::TITLE => 'TITLE', + self::ADVPHMOD => 'ADVPHMOD', + self::AUXCAUS => 'AUXCAUS', + self::AUXVV => 'AUXVV', + self::DTMOD => 'DTMOD', + self::FOREIGN => 'FOREIGN', + self::KW => 'KW', + self::PBLIST => 'LIST', + self::NOMC => 'NOMC', + self::NOMCSUBJ => 'NOMCSUBJ', + self::NOMCSUBJPASS => 'NOMCSUBJPASS', + self::NUMC => 'NUMC', + self::COP => 'COP', + self::DISLOCATED => 'DISLOCATED', + self::ASP => 'ASP', + self::GMOD => 'GMOD', + self::GOBJ => 'GOBJ', + self::INFMOD => 'INFMOD', + self::MES => 'MES', + self::NCOMP => 'NCOMP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has 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(Label::class, \Google\Cloud\Language\V1\DependencyEdge_Label::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge_Label.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge_Label.php new file mode 100644 index 000000000000..4d8f234314ba --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge_Label.php @@ -0,0 +1,16 @@ +google.cloud.language.v1.Document + */ +class Document extends \Google\Protobuf\Internal\Message +{ + /** + * Required. If the type is not set or is `TYPE_UNSPECIFIED`, + * returns an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field .google.cloud.language.v1.Document.Type type = 1; + */ + protected $type = 0; + /** + * The language of the document (if not specified, the language is + * automatically detected). Both ISO and BCP-47 language codes are + * accepted.
+ * [Language + * Support](https://cloud.google.com/natural-language/docs/languages) lists + * currently supported languages for each API method. If the language (either + * specified by the caller or automatically detected) is not supported by the + * called API method, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string language = 4; + */ + protected $language = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Required. If the type is not set or is `TYPE_UNSPECIFIED`, + * returns an `INVALID_ARGUMENT` error. + * @type string $content + * The content of the input in string format. + * Cloud audit logging exempt since it is based on user data. + * @type string $gcs_content_uri + * The Google Cloud Storage URI where the file content is located. + * This URI must be of the form: gs://bucket_name/object_name. For more + * details, see https://cloud.google.com/storage/docs/reference-uris. + * NOTE: Cloud Storage object versioning is not supported. + * @type string $language + * The language of the document (if not specified, the language is + * automatically detected). Both ISO and BCP-47 language codes are + * accepted.
+ * [Language + * Support](https://cloud.google.com/natural-language/docs/languages) lists + * currently supported languages for each API method. If the language (either + * specified by the caller or automatically detected) is not supported by the + * called API method, an `INVALID_ARGUMENT` error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. If the type is not set or is `TYPE_UNSPECIFIED`, + * returns an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field .google.cloud.language.v1.Document.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. If the type is not set or is `TYPE_UNSPECIFIED`, + * returns an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field .google.cloud.language.v1.Document.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\Document\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The content of the input in string format. + * Cloud audit logging exempt since it is based on user data. + * + * Generated from protobuf field string content = 2; + * @return string + */ + public function getContent() + { + return $this->readOneof(2); + } + + public function hasContent() + { + return $this->hasOneof(2); + } + + /** + * The content of the input in string format. + * Cloud audit logging exempt since it is based on user data. + * + * 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; + } + + /** + * The Google Cloud Storage URI where the file content is located. + * This URI must be of the form: gs://bucket_name/object_name. For more + * details, see https://cloud.google.com/storage/docs/reference-uris. + * NOTE: Cloud Storage object versioning is not supported. + * + * Generated from protobuf field string gcs_content_uri = 3; + * @return string + */ + public function getGcsContentUri() + { + return $this->readOneof(3); + } + + public function hasGcsContentUri() + { + return $this->hasOneof(3); + } + + /** + * The Google Cloud Storage URI where the file content is located. + * This URI must be of the form: gs://bucket_name/object_name. For more + * details, see https://cloud.google.com/storage/docs/reference-uris. + * NOTE: Cloud Storage object versioning is not supported. + * + * Generated from protobuf field string gcs_content_uri = 3; + * @param string $var + * @return $this + */ + public function setGcsContentUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The language of the document (if not specified, the language is + * automatically detected). Both ISO and BCP-47 language codes are + * accepted.
+ * [Language + * Support](https://cloud.google.com/natural-language/docs/languages) lists + * currently supported languages for each API method. If the language (either + * specified by the caller or automatically detected) is not supported by the + * called API method, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string language = 4; + * @return string + */ + public function getLanguage() + { + return $this->language; + } + + /** + * The language of the document (if not specified, the language is + * automatically detected). Both ISO and BCP-47 language codes are + * accepted.
+ * [Language + * Support](https://cloud.google.com/natural-language/docs/languages) lists + * currently supported languages for each API method. If the language (either + * specified by the caller or automatically detected) is not supported by the + * called API method, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string language = 4; + * @param string $var + * @return $this + */ + public function setLanguage($var) + { + GPBUtil::checkString($var, True); + $this->language = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document/Type.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document/Type.php new file mode 100644 index 000000000000..00069f59a85c --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document/Type.php @@ -0,0 +1,64 @@ +google.cloud.language.v1.Document.Type + */ +class Type +{ + /** + * The content type is not specified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Plain text + * + * Generated from protobuf enum PLAIN_TEXT = 1; + */ + const PLAIN_TEXT = 1; + /** + * HTML + * + * Generated from protobuf enum HTML = 2; + */ + const HTML = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::PLAIN_TEXT => 'PLAIN_TEXT', + self::HTML => 'HTML', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Language\V1\Document_Type::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document_Type.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document_Type.php new file mode 100644 index 000000000000..a28599b289b6 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document_Type.php @@ -0,0 +1,16 @@ +google.cloud.language.v1.EncodingType + */ +class EncodingType +{ + /** + * If `EncodingType` is not specified, encoding-dependent information (such as + * `begin_offset`) will be set at `-1`. + * + * Generated from protobuf enum NONE = 0; + */ + const NONE = 0; + /** + * Encoding-dependent information (such as `begin_offset`) is calculated based + * on the UTF-8 encoding of the input. C++ and Go are examples of languages + * that use this encoding natively. + * + * Generated from protobuf enum UTF8 = 1; + */ + const UTF8 = 1; + /** + * Encoding-dependent information (such as `begin_offset`) is calculated based + * on the UTF-16 encoding of the input. Java and JavaScript are examples of + * languages that use this encoding natively. + * + * Generated from protobuf enum UTF16 = 2; + */ + const UTF16 = 2; + /** + * Encoding-dependent information (such as `begin_offset`) is calculated based + * on the UTF-32 encoding of the input. Python is an example of a language + * that uses this encoding natively. + * + * Generated from protobuf enum UTF32 = 3; + */ + const UTF32 = 3; + + private static $valueToName = [ + self::NONE => 'NONE', + self::UTF8 => 'UTF8', + self::UTF16 => 'UTF16', + self::UTF32 => 'UTF32', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Language/v1/proto/src/Google/Cloud/Language/V1/Entity.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity.php new file mode 100644 index 000000000000..648f8346f2b3 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity.php @@ -0,0 +1,293 @@ +google.cloud.language.v1.Entity + */ +class Entity extends \Google\Protobuf\Internal\Message +{ + /** + * The representative name for the entity. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The entity type. + * + * Generated from protobuf field .google.cloud.language.v1.Entity.Type type = 2; + */ + protected $type = 0; + /** + * Metadata associated with the entity. + * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + * and Knowledge Graph MID (`mid`), if they are available. For the metadata + * associated with other entity types, see the Type table below. + * + * Generated from protobuf field map metadata = 3; + */ + private $metadata; + /** + * The salience score associated with the entity in the [0, 1.0] range. + * The salience score for an entity provides information about the + * importance or centrality of that entity to the entire document text. + * Scores closer to 0 are less salient, while scores closer to 1.0 are highly + * salient. + * + * Generated from protobuf field float salience = 4; + */ + protected $salience = 0.0; + /** + * The mentions of this entity in the input document. The API currently + * supports proper noun mentions. + * + * Generated from protobuf field repeated .google.cloud.language.v1.EntityMention mentions = 5; + */ + private $mentions; + /** + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the aggregate sentiment expressed for this + * entity in the provided document. + * + * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 6; + */ + protected $sentiment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The representative name for the entity. + * @type int $type + * The entity type. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Metadata associated with the entity. + * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + * and Knowledge Graph MID (`mid`), if they are available. For the metadata + * associated with other entity types, see the Type table below. + * @type float $salience + * The salience score associated with the entity in the [0, 1.0] range. + * The salience score for an entity provides information about the + * importance or centrality of that entity to the entire document text. + * Scores closer to 0 are less salient, while scores closer to 1.0 are highly + * salient. + * @type array<\Google\Cloud\Language\V1\EntityMention>|\Google\Protobuf\Internal\RepeatedField $mentions + * The mentions of this entity in the input document. The API currently + * supports proper noun mentions. + * @type \Google\Cloud\Language\V1\Sentiment $sentiment + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the aggregate sentiment expressed for this + * entity in the provided document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The representative name for the entity. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The representative name for the entity. + * + * 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 entity type. + * + * Generated from protobuf field .google.cloud.language.v1.Entity.Type type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The entity type. + * + * Generated from protobuf field .google.cloud.language.v1.Entity.Type type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\Entity\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Metadata associated with the entity. + * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + * and Knowledge Graph MID (`mid`), if they are available. For the metadata + * associated with other entity types, see the Type table below. + * + * Generated from protobuf field map metadata = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Metadata associated with the entity. + * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + * and Knowledge Graph MID (`mid`), if they are available. For the metadata + * associated with other entity types, see the Type table below. + * + * 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; + } + + /** + * The salience score associated with the entity in the [0, 1.0] range. + * The salience score for an entity provides information about the + * importance or centrality of that entity to the entire document text. + * Scores closer to 0 are less salient, while scores closer to 1.0 are highly + * salient. + * + * Generated from protobuf field float salience = 4; + * @return float + */ + public function getSalience() + { + return $this->salience; + } + + /** + * The salience score associated with the entity in the [0, 1.0] range. + * The salience score for an entity provides information about the + * importance or centrality of that entity to the entire document text. + * Scores closer to 0 are less salient, while scores closer to 1.0 are highly + * salient. + * + * Generated from protobuf field float salience = 4; + * @param float $var + * @return $this + */ + public function setSalience($var) + { + GPBUtil::checkFloat($var); + $this->salience = $var; + + return $this; + } + + /** + * The mentions of this entity in the input document. The API currently + * supports proper noun mentions. + * + * Generated from protobuf field repeated .google.cloud.language.v1.EntityMention mentions = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMentions() + { + return $this->mentions; + } + + /** + * The mentions of this entity in the input document. The API currently + * supports proper noun mentions. + * + * Generated from protobuf field repeated .google.cloud.language.v1.EntityMention mentions = 5; + * @param array<\Google\Cloud\Language\V1\EntityMention>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMentions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\EntityMention::class); + $this->mentions = $arr; + + return $this; + } + + /** + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the aggregate sentiment expressed for this + * entity in the provided document. + * + * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 6; + * @return \Google\Cloud\Language\V1\Sentiment|null + */ + public function getSentiment() + { + return $this->sentiment; + } + + public function hasSentiment() + { + return isset($this->sentiment); + } + + public function clearSentiment() + { + unset($this->sentiment); + } + + /** + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the aggregate sentiment expressed for this + * entity in the provided document. + * + * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 6; + * @param \Google\Cloud\Language\V1\Sentiment $var + * @return $this + */ + public function setSentiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Sentiment::class); + $this->sentiment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity/Type.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity/Type.php new file mode 100644 index 000000000000..a54bb0c4b4fb --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity/Type.php @@ -0,0 +1,163 @@ +google.cloud.language.v1.Entity.Type + */ +class Type +{ + /** + * Unknown + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * Person + * + * Generated from protobuf enum PERSON = 1; + */ + const PERSON = 1; + /** + * Location + * + * Generated from protobuf enum LOCATION = 2; + */ + const LOCATION = 2; + /** + * Organization + * + * Generated from protobuf enum ORGANIZATION = 3; + */ + const ORGANIZATION = 3; + /** + * Event + * + * Generated from protobuf enum EVENT = 4; + */ + const EVENT = 4; + /** + * Artwork + * + * Generated from protobuf enum WORK_OF_ART = 5; + */ + const WORK_OF_ART = 5; + /** + * Consumer product + * + * Generated from protobuf enum CONSUMER_GOOD = 6; + */ + const CONSUMER_GOOD = 6; + /** + * Other types of entities + * + * Generated from protobuf enum OTHER = 7; + */ + const OTHER = 7; + /** + * Phone number + * The metadata lists the phone number, formatted according to local + * convention, plus whichever additional elements appear in the text: + * * `number` - the actual number, broken down into sections as per local + * convention + * * `national_prefix` - country code, if detected + * * `area_code` - region or area code, if detected + * * `extension` - phone extension (to be dialed after connection), if + * detected + * + * Generated from protobuf enum PHONE_NUMBER = 9; + */ + const PHONE_NUMBER = 9; + /** + * Address + * The metadata identifies the street number and locality plus whichever + * additional elements appear in the text: + * * `street_number` - street number + * * `locality` - city or town + * * `street_name` - street/route name, if detected + * * `postal_code` - postal code, if detected + * * `country` - country, if detected< + * * `broad_region` - administrative area, such as the state, if detected + * * `narrow_region` - smaller administrative area, such as county, if + * detected + * * `sublocality` - used in Asian addresses to demark a district within a + * city, if detected + * + * Generated from protobuf enum ADDRESS = 10; + */ + const ADDRESS = 10; + /** + * Date + * The metadata identifies the components of the date: + * * `year` - four digit year, if detected + * * `month` - two digit month number, if detected + * * `day` - two digit day number, if detected + * + * Generated from protobuf enum DATE = 11; + */ + const DATE = 11; + /** + * Number + * The metadata is the number itself. + * + * Generated from protobuf enum NUMBER = 12; + */ + const NUMBER = 12; + /** + * Price + * The metadata identifies the `value` and `currency`. + * + * Generated from protobuf enum PRICE = 13; + */ + const PRICE = 13; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::PERSON => 'PERSON', + self::LOCATION => 'LOCATION', + self::ORGANIZATION => 'ORGANIZATION', + self::EVENT => 'EVENT', + self::WORK_OF_ART => 'WORK_OF_ART', + self::CONSUMER_GOOD => 'CONSUMER_GOOD', + self::OTHER => 'OTHER', + self::PHONE_NUMBER => 'PHONE_NUMBER', + self::ADDRESS => 'ADDRESS', + self::DATE => 'DATE', + self::NUMBER => 'NUMBER', + self::PRICE => 'PRICE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Language\V1\Entity_Type::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention.php new file mode 100644 index 000000000000..38322b158136 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention.php @@ -0,0 +1,168 @@ +google.cloud.language.v1.EntityMention + */ +class EntityMention extends \Google\Protobuf\Internal\Message +{ + /** + * The mention text. + * + * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; + */ + protected $text = null; + /** + * The type of the entity mention. + * + * Generated from protobuf field .google.cloud.language.v1.EntityMention.Type type = 2; + */ + protected $type = 0; + /** + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the sentiment expressed for this mention of + * the entity in the provided document. + * + * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 3; + */ + protected $sentiment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1\TextSpan $text + * The mention text. + * @type int $type + * The type of the entity mention. + * @type \Google\Cloud\Language\V1\Sentiment $sentiment + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the sentiment expressed for this mention of + * the entity in the provided document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The mention text. + * + * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; + * @return \Google\Cloud\Language\V1\TextSpan|null + */ + public function getText() + { + return $this->text; + } + + public function hasText() + { + return isset($this->text); + } + + public function clearText() + { + unset($this->text); + } + + /** + * The mention text. + * + * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; + * @param \Google\Cloud\Language\V1\TextSpan $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\TextSpan::class); + $this->text = $var; + + return $this; + } + + /** + * The type of the entity mention. + * + * Generated from protobuf field .google.cloud.language.v1.EntityMention.Type type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the entity mention. + * + * Generated from protobuf field .google.cloud.language.v1.EntityMention.Type type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EntityMention\Type::class); + $this->type = $var; + + return $this; + } + + /** + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the sentiment expressed for this mention of + * the entity in the provided document. + * + * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 3; + * @return \Google\Cloud\Language\V1\Sentiment|null + */ + public function getSentiment() + { + return $this->sentiment; + } + + public function hasSentiment() + { + return isset($this->sentiment); + } + + public function clearSentiment() + { + unset($this->sentiment); + } + + /** + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the sentiment expressed for this mention of + * the entity in the provided document. + * + * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 3; + * @param \Google\Cloud\Language\V1\Sentiment $var + * @return $this + */ + public function setSentiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Sentiment::class); + $this->sentiment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention/Type.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention/Type.php new file mode 100644 index 000000000000..2fd75a738dfd --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention/Type.php @@ -0,0 +1,64 @@ +google.cloud.language.v1.EntityMention.Type + */ +class Type +{ + /** + * Unknown + * + * Generated from protobuf enum TYPE_UNKNOWN = 0; + */ + const TYPE_UNKNOWN = 0; + /** + * Proper name + * + * Generated from protobuf enum PROPER = 1; + */ + const PROPER = 1; + /** + * Common noun (or noun compound) + * + * Generated from protobuf enum COMMON = 2; + */ + const COMMON = 2; + + private static $valueToName = [ + self::TYPE_UNKNOWN => 'TYPE_UNKNOWN', + self::PROPER => 'PROPER', + self::COMMON => 'COMMON', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Language\V1\EntityMention_Type::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention_Type.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention_Type.php new file mode 100644 index 000000000000..187da39bbc0a --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention_Type.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.language.v1.LanguageService/AnalyzeSentiment', + $argument, + ['\Google\Cloud\Language\V1\AnalyzeSentimentResponse', 'decode'], + $metadata, $options); + } + + /** + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. + * @param \Google\Cloud\Language\V1\AnalyzeEntitiesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AnalyzeEntities(\Google\Cloud\Language\V1\AnalyzeEntitiesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.language.v1.LanguageService/AnalyzeEntities', + $argument, + ['\Google\Cloud\Language\V1\AnalyzeEntitiesResponse', 'decode'], + $metadata, $options); + } + + /** + * Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes + * sentiment associated with each entity and its mentions. + * @param \Google\Cloud\Language\V1\AnalyzeEntitySentimentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AnalyzeEntitySentiment(\Google\Cloud\Language\V1\AnalyzeEntitySentimentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.language.v1.LanguageService/AnalyzeEntitySentiment', + $argument, + ['\Google\Cloud\Language\V1\AnalyzeEntitySentimentResponse', 'decode'], + $metadata, $options); + } + + /** + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part of speech tags, dependency trees, and other + * properties. + * @param \Google\Cloud\Language\V1\AnalyzeSyntaxRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AnalyzeSyntax(\Google\Cloud\Language\V1\AnalyzeSyntaxRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.language.v1.LanguageService/AnalyzeSyntax', + $argument, + ['\Google\Cloud\Language\V1\AnalyzeSyntaxResponse', 'decode'], + $metadata, $options); + } + + /** + * Classifies a document into categories. + * @param \Google\Cloud\Language\V1\ClassifyTextRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ClassifyText(\Google\Cloud\Language\V1\ClassifyTextRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.language.v1.LanguageService/ClassifyText', + $argument, + ['\Google\Cloud\Language\V1\ClassifyTextResponse', 'decode'], + $metadata, $options); + } + + /** + * A convenience method that provides all the features that analyzeSentiment, + * analyzeEntities, and analyzeSyntax provide in one call. + * @param \Google\Cloud\Language\V1\AnnotateTextRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AnnotateText(\Google\Cloud\Language\V1\AnnotateTextRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.language.v1.LanguageService/AnnotateText', + $argument, + ['\Google\Cloud\Language\V1\AnnotateTextResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech.php new file mode 100644 index 000000000000..91ec89536ef9 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech.php @@ -0,0 +1,443 @@ +google.cloud.language.v1.PartOfSpeech + */ +class PartOfSpeech extends \Google\Protobuf\Internal\Message +{ + /** + * The part of speech tag. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tag tag = 1; + */ + protected $tag = 0; + /** + * The grammatical aspect. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Aspect aspect = 2; + */ + protected $aspect = 0; + /** + * The grammatical case. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Case case = 3; + */ + protected $case = 0; + /** + * The grammatical form. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Form form = 4; + */ + protected $form = 0; + /** + * The grammatical gender. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Gender gender = 5; + */ + protected $gender = 0; + /** + * The grammatical mood. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Mood mood = 6; + */ + protected $mood = 0; + /** + * The grammatical number. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Number number = 7; + */ + protected $number = 0; + /** + * The grammatical person. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Person person = 8; + */ + protected $person = 0; + /** + * The grammatical properness. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Proper proper = 9; + */ + protected $proper = 0; + /** + * The grammatical reciprocity. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Reciprocity reciprocity = 10; + */ + protected $reciprocity = 0; + /** + * The grammatical tense. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tense tense = 11; + */ + protected $tense = 0; + /** + * The grammatical voice. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Voice voice = 12; + */ + protected $voice = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $tag + * The part of speech tag. + * @type int $aspect + * The grammatical aspect. + * @type int $case + * The grammatical case. + * @type int $form + * The grammatical form. + * @type int $gender + * The grammatical gender. + * @type int $mood + * The grammatical mood. + * @type int $number + * The grammatical number. + * @type int $person + * The grammatical person. + * @type int $proper + * The grammatical properness. + * @type int $reciprocity + * The grammatical reciprocity. + * @type int $tense + * The grammatical tense. + * @type int $voice + * The grammatical voice. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The part of speech tag. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tag tag = 1; + * @return int + */ + public function getTag() + { + return $this->tag; + } + + /** + * The part of speech tag. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tag tag = 1; + * @param int $var + * @return $this + */ + public function setTag($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Tag::class); + $this->tag = $var; + + return $this; + } + + /** + * The grammatical aspect. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Aspect aspect = 2; + * @return int + */ + public function getAspect() + { + return $this->aspect; + } + + /** + * The grammatical aspect. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Aspect aspect = 2; + * @param int $var + * @return $this + */ + public function setAspect($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Aspect::class); + $this->aspect = $var; + + return $this; + } + + /** + * The grammatical case. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Case case = 3; + * @return int + */ + public function getCase() + { + return $this->case; + } + + /** + * The grammatical case. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Case case = 3; + * @param int $var + * @return $this + */ + public function setCase($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\PBCase::class); + $this->case = $var; + + return $this; + } + + /** + * The grammatical form. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Form form = 4; + * @return int + */ + public function getForm() + { + return $this->form; + } + + /** + * The grammatical form. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Form form = 4; + * @param int $var + * @return $this + */ + public function setForm($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Form::class); + $this->form = $var; + + return $this; + } + + /** + * The grammatical gender. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Gender gender = 5; + * @return int + */ + public function getGender() + { + return $this->gender; + } + + /** + * The grammatical gender. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Gender gender = 5; + * @param int $var + * @return $this + */ + public function setGender($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Gender::class); + $this->gender = $var; + + return $this; + } + + /** + * The grammatical mood. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Mood mood = 6; + * @return int + */ + public function getMood() + { + return $this->mood; + } + + /** + * The grammatical mood. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Mood mood = 6; + * @param int $var + * @return $this + */ + public function setMood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Mood::class); + $this->mood = $var; + + return $this; + } + + /** + * The grammatical number. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Number number = 7; + * @return int + */ + public function getNumber() + { + return $this->number; + } + + /** + * The grammatical number. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Number number = 7; + * @param int $var + * @return $this + */ + public function setNumber($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Number::class); + $this->number = $var; + + return $this; + } + + /** + * The grammatical person. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Person person = 8; + * @return int + */ + public function getPerson() + { + return $this->person; + } + + /** + * The grammatical person. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Person person = 8; + * @param int $var + * @return $this + */ + public function setPerson($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Person::class); + $this->person = $var; + + return $this; + } + + /** + * The grammatical properness. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Proper proper = 9; + * @return int + */ + public function getProper() + { + return $this->proper; + } + + /** + * The grammatical properness. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Proper proper = 9; + * @param int $var + * @return $this + */ + public function setProper($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Proper::class); + $this->proper = $var; + + return $this; + } + + /** + * The grammatical reciprocity. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Reciprocity reciprocity = 10; + * @return int + */ + public function getReciprocity() + { + return $this->reciprocity; + } + + /** + * The grammatical reciprocity. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Reciprocity reciprocity = 10; + * @param int $var + * @return $this + */ + public function setReciprocity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Reciprocity::class); + $this->reciprocity = $var; + + return $this; + } + + /** + * The grammatical tense. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tense tense = 11; + * @return int + */ + public function getTense() + { + return $this->tense; + } + + /** + * The grammatical tense. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tense tense = 11; + * @param int $var + * @return $this + */ + public function setTense($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Tense::class); + $this->tense = $var; + + return $this; + } + + /** + * The grammatical voice. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Voice voice = 12; + * @return int + */ + public function getVoice() + { + return $this->voice; + } + + /** + * The grammatical voice. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Voice voice = 12; + * @param int $var + * @return $this + */ + public function setVoice($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Voice::class); + $this->voice = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Aspect.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Aspect.php new file mode 100644 index 000000000000..95abc9c0df68 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Aspect.php @@ -0,0 +1,71 @@ +google.cloud.language.v1.PartOfSpeech.Aspect + */ +class Aspect +{ + /** + * Aspect is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum ASPECT_UNKNOWN = 0; + */ + const ASPECT_UNKNOWN = 0; + /** + * Perfective + * + * Generated from protobuf enum PERFECTIVE = 1; + */ + const PERFECTIVE = 1; + /** + * Imperfective + * + * Generated from protobuf enum IMPERFECTIVE = 2; + */ + const IMPERFECTIVE = 2; + /** + * Progressive + * + * Generated from protobuf enum PROGRESSIVE = 3; + */ + const PROGRESSIVE = 3; + + private static $valueToName = [ + self::ASPECT_UNKNOWN => 'ASPECT_UNKNOWN', + self::PERFECTIVE => 'PERFECTIVE', + self::IMPERFECTIVE => 'IMPERFECTIVE', + self::PROGRESSIVE => 'PROGRESSIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Aspect::class, \Google\Cloud\Language\V1\PartOfSpeech_Aspect::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Form.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Form.php new file mode 100644 index 000000000000..0d3977bbd54a --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Form.php @@ -0,0 +1,130 @@ +google.cloud.language.v1.PartOfSpeech.Form + */ +class Form +{ + /** + * Form is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum FORM_UNKNOWN = 0; + */ + const FORM_UNKNOWN = 0; + /** + * Adnomial + * + * Generated from protobuf enum ADNOMIAL = 1; + */ + const ADNOMIAL = 1; + /** + * Auxiliary + * + * Generated from protobuf enum AUXILIARY = 2; + */ + const AUXILIARY = 2; + /** + * Complementizer + * + * Generated from protobuf enum COMPLEMENTIZER = 3; + */ + const COMPLEMENTIZER = 3; + /** + * Final ending + * + * Generated from protobuf enum FINAL_ENDING = 4; + */ + const FINAL_ENDING = 4; + /** + * Gerund + * + * Generated from protobuf enum GERUND = 5; + */ + const GERUND = 5; + /** + * Realis + * + * Generated from protobuf enum REALIS = 6; + */ + const REALIS = 6; + /** + * Irrealis + * + * Generated from protobuf enum IRREALIS = 7; + */ + const IRREALIS = 7; + /** + * Short form + * + * Generated from protobuf enum SHORT = 8; + */ + const SHORT = 8; + /** + * Long form + * + * Generated from protobuf enum LONG = 9; + */ + const LONG = 9; + /** + * Order form + * + * Generated from protobuf enum ORDER = 10; + */ + const ORDER = 10; + /** + * Specific form + * + * Generated from protobuf enum SPECIFIC = 11; + */ + const SPECIFIC = 11; + + private static $valueToName = [ + self::FORM_UNKNOWN => 'FORM_UNKNOWN', + self::ADNOMIAL => 'ADNOMIAL', + self::AUXILIARY => 'AUXILIARY', + self::COMPLEMENTIZER => 'COMPLEMENTIZER', + self::FINAL_ENDING => 'FINAL_ENDING', + self::GERUND => 'GERUND', + self::REALIS => 'REALIS', + self::IRREALIS => 'IRREALIS', + self::SHORT => 'SHORT', + self::LONG => 'LONG', + self::ORDER => 'ORDER', + self::SPECIFIC => 'SPECIFIC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Form::class, \Google\Cloud\Language\V1\PartOfSpeech_Form::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Gender.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Gender.php new file mode 100644 index 000000000000..510fead88faf --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Gender.php @@ -0,0 +1,71 @@ +google.cloud.language.v1.PartOfSpeech.Gender + */ +class Gender +{ + /** + * Gender is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum GENDER_UNKNOWN = 0; + */ + const GENDER_UNKNOWN = 0; + /** + * Feminine + * + * Generated from protobuf enum FEMININE = 1; + */ + const FEMININE = 1; + /** + * Masculine + * + * Generated from protobuf enum MASCULINE = 2; + */ + const MASCULINE = 2; + /** + * Neuter + * + * Generated from protobuf enum NEUTER = 3; + */ + const NEUTER = 3; + + private static $valueToName = [ + self::GENDER_UNKNOWN => 'GENDER_UNKNOWN', + self::FEMININE => 'FEMININE', + self::MASCULINE => 'MASCULINE', + self::NEUTER => 'NEUTER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Gender::class, \Google\Cloud\Language\V1\PartOfSpeech_Gender::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Mood.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Mood.php new file mode 100644 index 000000000000..3b0c97066083 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Mood.php @@ -0,0 +1,92 @@ +google.cloud.language.v1.PartOfSpeech.Mood + */ +class Mood +{ + /** + * Mood is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum MOOD_UNKNOWN = 0; + */ + const MOOD_UNKNOWN = 0; + /** + * Conditional + * + * Generated from protobuf enum CONDITIONAL_MOOD = 1; + */ + const CONDITIONAL_MOOD = 1; + /** + * Imperative + * + * Generated from protobuf enum IMPERATIVE = 2; + */ + const IMPERATIVE = 2; + /** + * Indicative + * + * Generated from protobuf enum INDICATIVE = 3; + */ + const INDICATIVE = 3; + /** + * Interrogative + * + * Generated from protobuf enum INTERROGATIVE = 4; + */ + const INTERROGATIVE = 4; + /** + * Jussive + * + * Generated from protobuf enum JUSSIVE = 5; + */ + const JUSSIVE = 5; + /** + * Subjunctive + * + * Generated from protobuf enum SUBJUNCTIVE = 6; + */ + const SUBJUNCTIVE = 6; + + private static $valueToName = [ + self::MOOD_UNKNOWN => 'MOOD_UNKNOWN', + self::CONDITIONAL_MOOD => 'CONDITIONAL_MOOD', + self::IMPERATIVE => 'IMPERATIVE', + self::INDICATIVE => 'INDICATIVE', + self::INTERROGATIVE => 'INTERROGATIVE', + self::JUSSIVE => 'JUSSIVE', + self::SUBJUNCTIVE => 'SUBJUNCTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Mood::class, \Google\Cloud\Language\V1\PartOfSpeech_Mood::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Number.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Number.php new file mode 100644 index 000000000000..1663eed86eb7 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Number.php @@ -0,0 +1,71 @@ +google.cloud.language.v1.PartOfSpeech.Number + */ +class Number +{ + /** + * Number is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum NUMBER_UNKNOWN = 0; + */ + const NUMBER_UNKNOWN = 0; + /** + * Singular + * + * Generated from protobuf enum SINGULAR = 1; + */ + const SINGULAR = 1; + /** + * Plural + * + * Generated from protobuf enum PLURAL = 2; + */ + const PLURAL = 2; + /** + * Dual + * + * Generated from protobuf enum DUAL = 3; + */ + const DUAL = 3; + + private static $valueToName = [ + self::NUMBER_UNKNOWN => 'NUMBER_UNKNOWN', + self::SINGULAR => 'SINGULAR', + self::PLURAL => 'PLURAL', + self::DUAL => 'DUAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Number::class, \Google\Cloud\Language\V1\PartOfSpeech_Number::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/PBCase.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/PBCase.php new file mode 100644 index 000000000000..156b6963e012 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/PBCase.php @@ -0,0 +1,150 @@ +google.cloud.language.v1.PartOfSpeech.Case + */ +class PBCase +{ + /** + * Case is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum CASE_UNKNOWN = 0; + */ + const CASE_UNKNOWN = 0; + /** + * Accusative + * + * Generated from protobuf enum ACCUSATIVE = 1; + */ + const ACCUSATIVE = 1; + /** + * Adverbial + * + * Generated from protobuf enum ADVERBIAL = 2; + */ + const ADVERBIAL = 2; + /** + * Complementive + * + * Generated from protobuf enum COMPLEMENTIVE = 3; + */ + const COMPLEMENTIVE = 3; + /** + * Dative + * + * Generated from protobuf enum DATIVE = 4; + */ + const DATIVE = 4; + /** + * Genitive + * + * Generated from protobuf enum GENITIVE = 5; + */ + const GENITIVE = 5; + /** + * Instrumental + * + * Generated from protobuf enum INSTRUMENTAL = 6; + */ + const INSTRUMENTAL = 6; + /** + * Locative + * + * Generated from protobuf enum LOCATIVE = 7; + */ + const LOCATIVE = 7; + /** + * Nominative + * + * Generated from protobuf enum NOMINATIVE = 8; + */ + const NOMINATIVE = 8; + /** + * Oblique + * + * Generated from protobuf enum OBLIQUE = 9; + */ + const OBLIQUE = 9; + /** + * Partitive + * + * Generated from protobuf enum PARTITIVE = 10; + */ + const PARTITIVE = 10; + /** + * Prepositional + * + * Generated from protobuf enum PREPOSITIONAL = 11; + */ + const PREPOSITIONAL = 11; + /** + * Reflexive + * + * Generated from protobuf enum REFLEXIVE_CASE = 12; + */ + const REFLEXIVE_CASE = 12; + /** + * Relative + * + * Generated from protobuf enum RELATIVE_CASE = 13; + */ + const RELATIVE_CASE = 13; + /** + * Vocative + * + * Generated from protobuf enum VOCATIVE = 14; + */ + const VOCATIVE = 14; + + private static $valueToName = [ + self::CASE_UNKNOWN => 'CASE_UNKNOWN', + self::ACCUSATIVE => 'ACCUSATIVE', + self::ADVERBIAL => 'ADVERBIAL', + self::COMPLEMENTIVE => 'COMPLEMENTIVE', + self::DATIVE => 'DATIVE', + self::GENITIVE => 'GENITIVE', + self::INSTRUMENTAL => 'INSTRUMENTAL', + self::LOCATIVE => 'LOCATIVE', + self::NOMINATIVE => 'NOMINATIVE', + self::OBLIQUE => 'OBLIQUE', + self::PARTITIVE => 'PARTITIVE', + self::PREPOSITIONAL => 'PREPOSITIONAL', + self::REFLEXIVE_CASE => 'REFLEXIVE_CASE', + self::RELATIVE_CASE => 'RELATIVE_CASE', + self::VOCATIVE => 'VOCATIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PBCase::class, \Google\Cloud\Language\V1\PartOfSpeech_Case::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Person.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Person.php new file mode 100644 index 000000000000..ba1a5a463fed --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Person.php @@ -0,0 +1,78 @@ +google.cloud.language.v1.PartOfSpeech.Person + */ +class Person +{ + /** + * Person is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum PERSON_UNKNOWN = 0; + */ + const PERSON_UNKNOWN = 0; + /** + * First + * + * Generated from protobuf enum FIRST = 1; + */ + const FIRST = 1; + /** + * Second + * + * Generated from protobuf enum SECOND = 2; + */ + const SECOND = 2; + /** + * Third + * + * Generated from protobuf enum THIRD = 3; + */ + const THIRD = 3; + /** + * Reflexive + * + * Generated from protobuf enum REFLEXIVE_PERSON = 4; + */ + const REFLEXIVE_PERSON = 4; + + private static $valueToName = [ + self::PERSON_UNKNOWN => 'PERSON_UNKNOWN', + self::FIRST => 'FIRST', + self::SECOND => 'SECOND', + self::THIRD => 'THIRD', + self::REFLEXIVE_PERSON => 'REFLEXIVE_PERSON', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Person::class, \Google\Cloud\Language\V1\PartOfSpeech_Person::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Proper.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Proper.php new file mode 100644 index 000000000000..694ba0a32b40 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Proper.php @@ -0,0 +1,64 @@ +google.cloud.language.v1.PartOfSpeech.Proper + */ +class Proper +{ + /** + * Proper is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum PROPER_UNKNOWN = 0; + */ + const PROPER_UNKNOWN = 0; + /** + * Proper + * + * Generated from protobuf enum PROPER = 1; + */ + const PROPER = 1; + /** + * Not proper + * + * Generated from protobuf enum NOT_PROPER = 2; + */ + const NOT_PROPER = 2; + + private static $valueToName = [ + self::PROPER_UNKNOWN => 'PROPER_UNKNOWN', + self::PROPER => 'PROPER', + self::NOT_PROPER => 'NOT_PROPER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Proper::class, \Google\Cloud\Language\V1\PartOfSpeech_Proper::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Reciprocity.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Reciprocity.php new file mode 100644 index 000000000000..c849d6e3463c --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Reciprocity.php @@ -0,0 +1,65 @@ +google.cloud.language.v1.PartOfSpeech.Reciprocity + */ +class Reciprocity +{ + /** + * Reciprocity is not applicable in the analyzed language or is not + * predicted. + * + * Generated from protobuf enum RECIPROCITY_UNKNOWN = 0; + */ + const RECIPROCITY_UNKNOWN = 0; + /** + * Reciprocal + * + * Generated from protobuf enum RECIPROCAL = 1; + */ + const RECIPROCAL = 1; + /** + * Non-reciprocal + * + * Generated from protobuf enum NON_RECIPROCAL = 2; + */ + const NON_RECIPROCAL = 2; + + private static $valueToName = [ + self::RECIPROCITY_UNKNOWN => 'RECIPROCITY_UNKNOWN', + self::RECIPROCAL => 'RECIPROCAL', + self::NON_RECIPROCAL => 'NON_RECIPROCAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Reciprocity::class, \Google\Cloud\Language\V1\PartOfSpeech_Reciprocity::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tag.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tag.php new file mode 100644 index 000000000000..3e67b7be11ae --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tag.php @@ -0,0 +1,141 @@ +google.cloud.language.v1.PartOfSpeech.Tag + */ +class Tag +{ + /** + * Unknown + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * Adjective + * + * Generated from protobuf enum ADJ = 1; + */ + const ADJ = 1; + /** + * Adposition (preposition and postposition) + * + * Generated from protobuf enum ADP = 2; + */ + const ADP = 2; + /** + * Adverb + * + * Generated from protobuf enum ADV = 3; + */ + const ADV = 3; + /** + * Conjunction + * + * Generated from protobuf enum CONJ = 4; + */ + const CONJ = 4; + /** + * Determiner + * + * Generated from protobuf enum DET = 5; + */ + const DET = 5; + /** + * Noun (common and proper) + * + * Generated from protobuf enum NOUN = 6; + */ + const NOUN = 6; + /** + * Cardinal number + * + * Generated from protobuf enum NUM = 7; + */ + const NUM = 7; + /** + * Pronoun + * + * Generated from protobuf enum PRON = 8; + */ + const PRON = 8; + /** + * Particle or other function word + * + * Generated from protobuf enum PRT = 9; + */ + const PRT = 9; + /** + * Punctuation + * + * Generated from protobuf enum PUNCT = 10; + */ + const PUNCT = 10; + /** + * Verb (all tenses and modes) + * + * Generated from protobuf enum VERB = 11; + */ + const VERB = 11; + /** + * Other: foreign words, typos, abbreviations + * + * Generated from protobuf enum X = 12; + */ + const X = 12; + /** + * Affix + * + * Generated from protobuf enum AFFIX = 13; + */ + const AFFIX = 13; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::ADJ => 'ADJ', + self::ADP => 'ADP', + self::ADV => 'ADV', + self::CONJ => 'CONJ', + self::DET => 'DET', + self::NOUN => 'NOUN', + self::NUM => 'NUM', + self::PRON => 'PRON', + self::PRT => 'PRT', + self::PUNCT => 'PUNCT', + self::VERB => 'VERB', + self::X => 'X', + self::AFFIX => 'AFFIX', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Tag::class, \Google\Cloud\Language\V1\PartOfSpeech_Tag::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tense.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tense.php new file mode 100644 index 000000000000..3d0e65618a04 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tense.php @@ -0,0 +1,92 @@ +google.cloud.language.v1.PartOfSpeech.Tense + */ +class Tense +{ + /** + * Tense is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum TENSE_UNKNOWN = 0; + */ + const TENSE_UNKNOWN = 0; + /** + * Conditional + * + * Generated from protobuf enum CONDITIONAL_TENSE = 1; + */ + const CONDITIONAL_TENSE = 1; + /** + * Future + * + * Generated from protobuf enum FUTURE = 2; + */ + const FUTURE = 2; + /** + * Past + * + * Generated from protobuf enum PAST = 3; + */ + const PAST = 3; + /** + * Present + * + * Generated from protobuf enum PRESENT = 4; + */ + const PRESENT = 4; + /** + * Imperfect + * + * Generated from protobuf enum IMPERFECT = 5; + */ + const IMPERFECT = 5; + /** + * Pluperfect + * + * Generated from protobuf enum PLUPERFECT = 6; + */ + const PLUPERFECT = 6; + + private static $valueToName = [ + self::TENSE_UNKNOWN => 'TENSE_UNKNOWN', + self::CONDITIONAL_TENSE => 'CONDITIONAL_TENSE', + self::FUTURE => 'FUTURE', + self::PAST => 'PAST', + self::PRESENT => 'PRESENT', + self::IMPERFECT => 'IMPERFECT', + self::PLUPERFECT => 'PLUPERFECT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Tense::class, \Google\Cloud\Language\V1\PartOfSpeech_Tense::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Voice.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Voice.php new file mode 100644 index 000000000000..ea5996d4fe4d --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Voice.php @@ -0,0 +1,72 @@ +google.cloud.language.v1.PartOfSpeech.Voice + */ +class Voice +{ + /** + * Voice is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum VOICE_UNKNOWN = 0; + */ + const VOICE_UNKNOWN = 0; + /** + * Active + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Causative + * + * Generated from protobuf enum CAUSATIVE = 2; + */ + const CAUSATIVE = 2; + /** + * Passive + * + * Generated from protobuf enum PASSIVE = 3; + */ + const PASSIVE = 3; + + private static $valueToName = [ + self::VOICE_UNKNOWN => 'VOICE_UNKNOWN', + self::ACTIVE => 'ACTIVE', + self::CAUSATIVE => 'CAUSATIVE', + self::PASSIVE => 'PASSIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Voice::class, \Google\Cloud\Language\V1\PartOfSpeech_Voice::class); + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Aspect.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Aspect.php new file mode 100644 index 000000000000..87d4732dd0ef --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Aspect.php @@ -0,0 +1,16 @@ +google.cloud.language.v1.Sentence + */ +class Sentence extends \Google\Protobuf\Internal\Message +{ + /** + * The sentence text. + * + * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; + */ + protected $text = null; + /** + * For calls to [AnalyzeSentiment][] or if + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to + * true, this field will contain the sentiment for the sentence. + * + * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 2; + */ + protected $sentiment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1\TextSpan $text + * The sentence text. + * @type \Google\Cloud\Language\V1\Sentiment $sentiment + * For calls to [AnalyzeSentiment][] or if + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to + * true, this field will contain the sentiment for the sentence. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The sentence text. + * + * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; + * @return \Google\Cloud\Language\V1\TextSpan|null + */ + public function getText() + { + return $this->text; + } + + public function hasText() + { + return isset($this->text); + } + + public function clearText() + { + unset($this->text); + } + + /** + * The sentence text. + * + * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; + * @param \Google\Cloud\Language\V1\TextSpan $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\TextSpan::class); + $this->text = $var; + + return $this; + } + + /** + * For calls to [AnalyzeSentiment][] or if + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to + * true, this field will contain the sentiment for the sentence. + * + * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 2; + * @return \Google\Cloud\Language\V1\Sentiment|null + */ + public function getSentiment() + { + return $this->sentiment; + } + + public function hasSentiment() + { + return isset($this->sentiment); + } + + public function clearSentiment() + { + unset($this->sentiment); + } + + /** + * For calls to [AnalyzeSentiment][] or if + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to + * true, this field will contain the sentiment for the sentence. + * + * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 2; + * @param \Google\Cloud\Language\V1\Sentiment $var + * @return $this + */ + public function setSentiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Sentiment::class); + $this->sentiment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentiment.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentiment.php new file mode 100644 index 000000000000..f58d7d6a31be --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentiment.php @@ -0,0 +1,114 @@ +google.cloud.language.v1.Sentiment + */ +class Sentiment extends \Google\Protobuf\Internal\Message +{ + /** + * A non-negative number in the [0, +inf) range, which represents + * the absolute magnitude of sentiment regardless of score (positive or + * negative). + * + * Generated from protobuf field float magnitude = 2; + */ + protected $magnitude = 0.0; + /** + * Sentiment score between -1.0 (negative sentiment) and 1.0 + * (positive sentiment). + * + * Generated from protobuf field float score = 3; + */ + protected $score = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $magnitude + * A non-negative number in the [0, +inf) range, which represents + * the absolute magnitude of sentiment regardless of score (positive or + * negative). + * @type float $score + * Sentiment score between -1.0 (negative sentiment) and 1.0 + * (positive sentiment). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * A non-negative number in the [0, +inf) range, which represents + * the absolute magnitude of sentiment regardless of score (positive or + * negative). + * + * Generated from protobuf field float magnitude = 2; + * @return float + */ + public function getMagnitude() + { + return $this->magnitude; + } + + /** + * A non-negative number in the [0, +inf) range, which represents + * the absolute magnitude of sentiment regardless of score (positive or + * negative). + * + * Generated from protobuf field float magnitude = 2; + * @param float $var + * @return $this + */ + public function setMagnitude($var) + { + GPBUtil::checkFloat($var); + $this->magnitude = $var; + + return $this; + } + + /** + * Sentiment score between -1.0 (negative sentiment) and 1.0 + * (positive sentiment). + * + * Generated from protobuf field float score = 3; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Sentiment score between -1.0 (negative sentiment) and 1.0 + * (positive sentiment). + * + * Generated from protobuf field float score = 3; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/TextSpan.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/TextSpan.php new file mode 100644 index 000000000000..4b2fc550c4d6 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/TextSpan.php @@ -0,0 +1,105 @@ +google.cloud.language.v1.TextSpan + */ +class TextSpan extends \Google\Protobuf\Internal\Message +{ + /** + * The content of the output text. + * + * Generated from protobuf field string content = 1; + */ + protected $content = ''; + /** + * The API calculates the beginning offset of the content in the original + * document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request. + * + * Generated from protobuf field int32 begin_offset = 2; + */ + protected $begin_offset = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content + * The content of the output text. + * @type int $begin_offset + * The API calculates the beginning offset of the content in the original + * document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The content of the output text. + * + * Generated from protobuf field string content = 1; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * The content of the output text. + * + * 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 API calculates the beginning offset of the content in the original + * document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request. + * + * Generated from protobuf field int32 begin_offset = 2; + * @return int + */ + public function getBeginOffset() + { + return $this->begin_offset; + } + + /** + * The API calculates the beginning offset of the content in the original + * document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request. + * + * Generated from protobuf field int32 begin_offset = 2; + * @param int $var + * @return $this + */ + public function setBeginOffset($var) + { + GPBUtil::checkInt32($var); + $this->begin_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Token.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Token.php new file mode 100644 index 000000000000..f01477f0c5d6 --- /dev/null +++ b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Token.php @@ -0,0 +1,199 @@ +google.cloud.language.v1.Token + */ +class Token extends \Google\Protobuf\Internal\Message +{ + /** + * The token text. + * + * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; + */ + protected $text = null; + /** + * Parts of speech tag for this token. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech part_of_speech = 2; + */ + protected $part_of_speech = null; + /** + * Dependency tree parse for this token. + * + * Generated from protobuf field .google.cloud.language.v1.DependencyEdge dependency_edge = 3; + */ + protected $dependency_edge = null; + /** + * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + * + * Generated from protobuf field string lemma = 4; + */ + protected $lemma = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1\TextSpan $text + * The token text. + * @type \Google\Cloud\Language\V1\PartOfSpeech $part_of_speech + * Parts of speech tag for this token. + * @type \Google\Cloud\Language\V1\DependencyEdge $dependency_edge + * Dependency tree parse for this token. + * @type string $lemma + * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The token text. + * + * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; + * @return \Google\Cloud\Language\V1\TextSpan|null + */ + public function getText() + { + return $this->text; + } + + public function hasText() + { + return isset($this->text); + } + + public function clearText() + { + unset($this->text); + } + + /** + * The token text. + * + * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; + * @param \Google\Cloud\Language\V1\TextSpan $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\TextSpan::class); + $this->text = $var; + + return $this; + } + + /** + * Parts of speech tag for this token. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech part_of_speech = 2; + * @return \Google\Cloud\Language\V1\PartOfSpeech|null + */ + public function getPartOfSpeech() + { + return $this->part_of_speech; + } + + public function hasPartOfSpeech() + { + return isset($this->part_of_speech); + } + + public function clearPartOfSpeech() + { + unset($this->part_of_speech); + } + + /** + * Parts of speech tag for this token. + * + * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech part_of_speech = 2; + * @param \Google\Cloud\Language\V1\PartOfSpeech $var + * @return $this + */ + public function setPartOfSpeech($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\PartOfSpeech::class); + $this->part_of_speech = $var; + + return $this; + } + + /** + * Dependency tree parse for this token. + * + * Generated from protobuf field .google.cloud.language.v1.DependencyEdge dependency_edge = 3; + * @return \Google\Cloud\Language\V1\DependencyEdge|null + */ + public function getDependencyEdge() + { + return $this->dependency_edge; + } + + public function hasDependencyEdge() + { + return isset($this->dependency_edge); + } + + public function clearDependencyEdge() + { + unset($this->dependency_edge); + } + + /** + * Dependency tree parse for this token. + * + * Generated from protobuf field .google.cloud.language.v1.DependencyEdge dependency_edge = 3; + * @param \Google\Cloud\Language\V1\DependencyEdge $var + * @return $this + */ + public function setDependencyEdge($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\DependencyEdge::class); + $this->dependency_edge = $var; + + return $this; + } + + /** + * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + * + * Generated from protobuf field string lemma = 4; + * @return string + */ + public function getLemma() + { + return $this->lemma; + } + + /** + * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + * + * Generated from protobuf field string lemma = 4; + * @param string $var + * @return $this + */ + public function setLemma($var) + { + GPBUtil::checkString($var, True); + $this->lemma = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entities.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entities.php new file mode 100644 index 000000000000..a596ec513e84 --- /dev/null +++ b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entities.php @@ -0,0 +1,59 @@ +analyzeEntities($document); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END language_v1_generated_LanguageService_AnalyzeEntities_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entity_sentiment.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entity_sentiment.php new file mode 100644 index 000000000000..de5fd87a34ef --- /dev/null +++ b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entity_sentiment.php @@ -0,0 +1,58 @@ +analyzeEntitySentiment($document); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END language_v1_generated_LanguageService_AnalyzeEntitySentiment_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_sentiment.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_sentiment.php new file mode 100644 index 000000000000..dcb0684e807e --- /dev/null +++ b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_sentiment.php @@ -0,0 +1,57 @@ +analyzeSentiment($document); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END language_v1_generated_LanguageService_AnalyzeSentiment_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_syntax.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_syntax.php new file mode 100644 index 000000000000..1ed678625848 --- /dev/null +++ b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_syntax.php @@ -0,0 +1,59 @@ +analyzeSyntax($document); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END language_v1_generated_LanguageService_AnalyzeSyntax_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/annotate_text.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/annotate_text.php new file mode 100644 index 000000000000..189925a4fad9 --- /dev/null +++ b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/annotate_text.php @@ -0,0 +1,60 @@ +annotateText($document, $features); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END language_v1_generated_LanguageService_AnnotateText_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/classify_text.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/classify_text.php new file mode 100644 index 000000000000..0e197e02cf44 --- /dev/null +++ b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/classify_text.php @@ -0,0 +1,57 @@ +classifyText($document); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END language_v1_generated_LanguageService_ClassifyText_sync] diff --git a/owl-bot-staging/Language/v1/src/V1/Gapic/LanguageServiceGapicClient.php b/owl-bot-staging/Language/v1/src/V1/Gapic/LanguageServiceGapicClient.php new file mode 100644 index 000000000000..867b904b5b26 --- /dev/null +++ b/owl-bot-staging/Language/v1/src/V1/Gapic/LanguageServiceGapicClient.php @@ -0,0 +1,428 @@ +analyzeEntities($document); + * } finally { + * $languageServiceClient->close(); + * } + * ``` + */ +class LanguageServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.language.v1.LanguageService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'language.googleapis.com'; + + /** 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-language', + '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/language_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/language_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/language_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/language_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 'language.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); + } + + /** + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. + * + * Sample code: + * ``` + * $languageServiceClient = new LanguageServiceClient(); + * try { + * $document = new Document(); + * $response = $languageServiceClient->analyzeEntities($document); + * } finally { + * $languageServiceClient->close(); + * } + * ``` + * + * @param Document $document Required. Input document. + * @param array $optionalArgs { + * Optional. + * + * @type int $encodingType + * The encoding type used by the API to calculate offsets. + * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Language\V1\AnalyzeEntitiesResponse + * + * @throws ApiException if the remote call fails + */ + public function analyzeEntities($document, array $optionalArgs = []) + { + $request = new AnalyzeEntitiesRequest(); + $request->setDocument($document); + if (isset($optionalArgs['encodingType'])) { + $request->setEncodingType($optionalArgs['encodingType']); + } + + return $this->startCall('AnalyzeEntities', AnalyzeEntitiesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes + * sentiment associated with each entity and its mentions. + * + * Sample code: + * ``` + * $languageServiceClient = new LanguageServiceClient(); + * try { + * $document = new Document(); + * $response = $languageServiceClient->analyzeEntitySentiment($document); + * } finally { + * $languageServiceClient->close(); + * } + * ``` + * + * @param Document $document Required. Input document. + * @param array $optionalArgs { + * Optional. + * + * @type int $encodingType + * The encoding type used by the API to calculate offsets. + * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Language\V1\AnalyzeEntitySentimentResponse + * + * @throws ApiException if the remote call fails + */ + public function analyzeEntitySentiment($document, array $optionalArgs = []) + { + $request = new AnalyzeEntitySentimentRequest(); + $request->setDocument($document); + if (isset($optionalArgs['encodingType'])) { + $request->setEncodingType($optionalArgs['encodingType']); + } + + return $this->startCall('AnalyzeEntitySentiment', AnalyzeEntitySentimentResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Analyzes the sentiment of the provided text. + * + * Sample code: + * ``` + * $languageServiceClient = new LanguageServiceClient(); + * try { + * $document = new Document(); + * $response = $languageServiceClient->analyzeSentiment($document); + * } finally { + * $languageServiceClient->close(); + * } + * ``` + * + * @param Document $document Required. Input document. + * @param array $optionalArgs { + * Optional. + * + * @type int $encodingType + * The encoding type used by the API to calculate sentence offsets. + * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Language\V1\AnalyzeSentimentResponse + * + * @throws ApiException if the remote call fails + */ + public function analyzeSentiment($document, array $optionalArgs = []) + { + $request = new AnalyzeSentimentRequest(); + $request->setDocument($document); + if (isset($optionalArgs['encodingType'])) { + $request->setEncodingType($optionalArgs['encodingType']); + } + + return $this->startCall('AnalyzeSentiment', AnalyzeSentimentResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part of speech tags, dependency trees, and other + * properties. + * + * Sample code: + * ``` + * $languageServiceClient = new LanguageServiceClient(); + * try { + * $document = new Document(); + * $response = $languageServiceClient->analyzeSyntax($document); + * } finally { + * $languageServiceClient->close(); + * } + * ``` + * + * @param Document $document Required. Input document. + * @param array $optionalArgs { + * Optional. + * + * @type int $encodingType + * The encoding type used by the API to calculate offsets. + * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Language\V1\AnalyzeSyntaxResponse + * + * @throws ApiException if the remote call fails + */ + public function analyzeSyntax($document, array $optionalArgs = []) + { + $request = new AnalyzeSyntaxRequest(); + $request->setDocument($document); + if (isset($optionalArgs['encodingType'])) { + $request->setEncodingType($optionalArgs['encodingType']); + } + + return $this->startCall('AnalyzeSyntax', AnalyzeSyntaxResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * A convenience method that provides all the features that analyzeSentiment, + * analyzeEntities, and analyzeSyntax provide in one call. + * + * Sample code: + * ``` + * $languageServiceClient = new LanguageServiceClient(); + * try { + * $document = new Document(); + * $features = new Features(); + * $response = $languageServiceClient->annotateText($document, $features); + * } finally { + * $languageServiceClient->close(); + * } + * ``` + * + * @param Document $document Required. Input document. + * @param Features $features Required. The enabled features. + * @param array $optionalArgs { + * Optional. + * + * @type int $encodingType + * The encoding type used by the API to calculate offsets. + * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Language\V1\AnnotateTextResponse + * + * @throws ApiException if the remote call fails + */ + public function annotateText($document, $features, array $optionalArgs = []) + { + $request = new AnnotateTextRequest(); + $request->setDocument($document); + $request->setFeatures($features); + if (isset($optionalArgs['encodingType'])) { + $request->setEncodingType($optionalArgs['encodingType']); + } + + return $this->startCall('AnnotateText', AnnotateTextResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Classifies a document into categories. + * + * Sample code: + * ``` + * $languageServiceClient = new LanguageServiceClient(); + * try { + * $document = new Document(); + * $response = $languageServiceClient->classifyText($document); + * } finally { + * $languageServiceClient->close(); + * } + * ``` + * + * @param Document $document Required. Input document. + * @param array $optionalArgs { + * Optional. + * + * @type ClassificationModelOptions $classificationModelOptions + * Model options to use for classification. Defaults to v1 options if not + * specified. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Language\V1\ClassifyTextResponse + * + * @throws ApiException if the remote call fails + */ + public function classifyText($document, array $optionalArgs = []) + { + $request = new ClassifyTextRequest(); + $request->setDocument($document); + if (isset($optionalArgs['classificationModelOptions'])) { + $request->setClassificationModelOptions($optionalArgs['classificationModelOptions']); + } + + return $this->startCall('ClassifyText', ClassifyTextResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Language/v1/src/V1/LanguageServiceClient.php b/owl-bot-staging/Language/v1/src/V1/LanguageServiceClient.php new file mode 100644 index 000000000000..09380dea0630 --- /dev/null +++ b/owl-bot-staging/Language/v1/src/V1/LanguageServiceClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.language.v1.LanguageService' => [], + ], +]; diff --git a/owl-bot-staging/Language/v1/src/V1/resources/language_service_rest_client_config.php b/owl-bot-staging/Language/v1/src/V1/resources/language_service_rest_client_config.php new file mode 100644 index 000000000000..3713de7e1366 --- /dev/null +++ b/owl-bot-staging/Language/v1/src/V1/resources/language_service_rest_client_config.php @@ -0,0 +1,39 @@ + [ + 'google.cloud.language.v1.LanguageService' => [ + 'AnalyzeEntities' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/documents:analyzeEntities', + 'body' => '*', + ], + 'AnalyzeEntitySentiment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/documents:analyzeEntitySentiment', + 'body' => '*', + ], + 'AnalyzeSentiment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/documents:analyzeSentiment', + 'body' => '*', + ], + 'AnalyzeSyntax' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/documents:analyzeSyntax', + 'body' => '*', + ], + 'AnnotateText' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/documents:annotateText', + 'body' => '*', + ], + 'ClassifyText' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/documents:classifyText', + 'body' => '*', + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Language/v1/tests/Unit/V1/LanguageServiceClientTest.php b/owl-bot-staging/Language/v1/tests/Unit/V1/LanguageServiceClientTest.php new file mode 100644 index 000000000000..07f843489a80 --- /dev/null +++ b/owl-bot-staging/Language/v1/tests/Unit/V1/LanguageServiceClientTest.php @@ -0,0 +1,430 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return LanguageServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new LanguageServiceClient($options); + } + + /** @test */ + public function analyzeEntitiesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $language = 'language-1613589672'; + $expectedResponse = new AnalyzeEntitiesResponse(); + $expectedResponse->setLanguage($language); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $response = $gapicClient->analyzeEntities($document); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.language.v1.LanguageService/AnalyzeEntities', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function analyzeEntitiesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + try { + $gapicClient->analyzeEntities($document); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function analyzeEntitySentimentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $language = 'language-1613589672'; + $expectedResponse = new AnalyzeEntitySentimentResponse(); + $expectedResponse->setLanguage($language); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $response = $gapicClient->analyzeEntitySentiment($document); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.language.v1.LanguageService/AnalyzeEntitySentiment', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function analyzeEntitySentimentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + try { + $gapicClient->analyzeEntitySentiment($document); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function analyzeSentimentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $language = 'language-1613589672'; + $expectedResponse = new AnalyzeSentimentResponse(); + $expectedResponse->setLanguage($language); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $response = $gapicClient->analyzeSentiment($document); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.language.v1.LanguageService/AnalyzeSentiment', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function analyzeSentimentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + try { + $gapicClient->analyzeSentiment($document); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function analyzeSyntaxTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $language = 'language-1613589672'; + $expectedResponse = new AnalyzeSyntaxResponse(); + $expectedResponse->setLanguage($language); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $response = $gapicClient->analyzeSyntax($document); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.language.v1.LanguageService/AnalyzeSyntax', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function analyzeSyntaxExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + try { + $gapicClient->analyzeSyntax($document); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function annotateTextTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $language = 'language-1613589672'; + $expectedResponse = new AnnotateTextResponse(); + $expectedResponse->setLanguage($language); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $features = new Features(); + $response = $gapicClient->annotateText($document, $features); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.language.v1.LanguageService/AnnotateText', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $actualValue = $actualRequestObject->getFeatures(); + $this->assertProtobufEquals($features, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function annotateTextExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + $features = new Features(); + try { + $gapicClient->annotateText($document, $features); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function classifyTextTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ClassifyTextResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $response = $gapicClient->classifyText($document); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.language.v1.LanguageService/ClassifyText', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function classifyTextExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + try { + $gapicClient->classifyText($document); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->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/Language/v1beta2/proto/src/GPBMetadata/Google/Cloud/Language/V1Beta2/LanguageService.php b/owl-bot-staging/Language/v1beta2/proto/src/GPBMetadata/Google/Cloud/Language/V1Beta2/LanguageService.php new file mode 100644 index 0000000000000000000000000000000000000000..672e35c4c6187a10a6dca6f61fa31ce5dee4b063 GIT binary patch literal 10213 zcmd5?&2Jmm5f4dyP>+(lUVkZSQZpMTmK~dl=#MzEon%QarM1c3^>Qi8h6;8?u4p0@ zmnA7XN|6-Eu|Q9`rR}MQqL=nopnpMu_SPJV=F%3(sh3`gqUfo=d2g2@Wh<1N0F5qs zd^xn5?k0PWykxuM_x!5gOm6OMZF!w!)!%M6 znqDWBOy97!yUJip>h^^2;SMyTRpGSa+@1DuUqXj+C9HxfpmGf?)Cb9rJ02b z!LlT-v6Wm9Ixa6irR42oue0L~uAWSGyxvZyb(8B&0zT@GHlE=+wcXfITP>fw;J3QV z%X>EMi8zQc+iZBP-qCpS4X;_tc#qu24ZrhjR_?*e?=%8`skK_)J$b~|Lf;@V?>zgL z&aOUBP{}U~t`rZ&R2Yh>AQb1%1VY_*1JO#BieQ{SJMdtO%&BY!_6P#ymoXO4`PH3m z@W{(-thd|t<|4_+!fg6d>MIvbg={GYJo0fiS@q$DR&Oo}_NmnuD*RW@b;uY9K% z3sO|6vlGt{C!b@*=Q!tCIlKO zAG3G~-X;IY*RWCE2R*(~iS)+#5iW2*TWY&4`6ip{LPmpjn{QJhy)c58*5vfcr(?n$}BRFb)k~^+uZTQ zFq8j=`F%y%g z*toW)8ICk2A7hF8rhT_!<}0f0NaHw}Gg;Fpm5Z8PSuxF=G(qI1v#QzBB+0T?O+%{~ zEIj^ zJRHdeBvWvb4%@z83jqH}HWa}}I<$7SH=)Di(RDC5C&_4govz=SiyvKv#W}f*jt?<& zQ_mrTbIJvl=y=rzYRxK;c#d&FZyjY@?LBt+JvNSvg78RiIZH>8;}9cBcI89jq!YPhgWh3hdSX(BRAu3Z% zpxJp$>T4SG!-?0612a(qV641C07@h=VXu&ZW(;DK$r$ z=_<+$0o_HbpcR4bTo}PH0GY;PloeJqL+8K7xh6)*u>tgk1NMo%tO4pts%8wcs2hSi zPX0DC1^r%GgKw~~g>)fgF`QSi3@Iz-u70HIzF2sTo>x zjb|#XIjj5zrgIp8>3P#G4ww!?HAf0TdW6AVIX>IUsSlrE~JY#BA42Bj%OYGsF%Rer?AIP^g2B69A42-JB9 zU)(ggV=MF&qOdtUjKtpzy@qdhK+N?qs?41Q9cbQ4a3zCQXnR)hL{lLOQ<21 zd=_W3`%0EMCOz`pTBS!-7&-$r?*m?Nj3eKSH{DII$qTC4k+t=(+*E;Bm0wM=aXunF z_JE7@&17tC4W7ZCt8`k$_5;7N2p@_H42y{FG4hv6qj64a0atKJY0`111|?`Ouj71T z2@K%c5{~Eui)OPppAetr;uFNep`YV*mI7Xyp;O3*oNZPl1xq?6296{VK~67a&9V*9 zI!;1zCOBmpY3o)&I>C|D)JpetXH_~$^Ey$SqES(`?@FghTJgRnoe_gIX^sYlwj#Yq ziW-JAPeKeUu=zWrHi~XYd5IL@L$2Y=oDn(dyBsh?)qR%okR>IF6gaFp>N=3@6|wiW zL%vf;qQxEYD(PjBhUdfx{(6nmnk9#HdY%73#M7>9obUfa)?DDH-PR~^Uf|p~q|(J; zWJz!EWso@w(k0TAQs-qd(JDzPGVxwnHMl~HL}_P9w>RklA0iz{OZ-6&=U7UU2wLC@ z>0oO`1I*G@IvPkXFx1Gw6W3^U+cX{NI*m${!QbMeay~EJpb=m3Z4&I5mY$WCX_80R zOP|tE-X(hMlC?^jzejo@=IFplDpBFb+M1N1VUDkw zB@!erO6)Pb1{9th7RsX~egEl@eC?i|@S7Da)X|LvG2!KX=I! z2u^;vL(ic=4^VSRMWS6H4Glh`%{Iv(-N@6dMTAAIB;6xL4Q{Zl{5!&ChA*C=Ie<~ z2V&=^*krKA{NE!OiwE+@Y(8w=!9V1ghS#k;MoECSN^qrp_%+ND%cQcRYZy2mORR|% zlr=VY&@=fWdmV`Yso6m(>S!ybt!t$U3g;54Dx}rHE*=i-+7i+f{ZC8L%rs+sXDZa| zRDK>|XH>MhcR%#{H+|dt!H(DMQ5UHe^hSei9NB6Mo1&T6-_$4)@C<^+uc2GXR|^vH zsLqBK@K9?~`E`WNJ*{B3jngi|r(@q|-#tjnz`Jj;IQg`Ppv3-Dd-Amr@hqdhQ3`Dj)nb!cOheE^xunaS)Mk=;I(?WfQzK z@8a}R44oShLk{nz4xUN=)}Q^Z$*ocqmmq&1Ml09k<%6bosgB=_)ScY8cMu^D&b>R3V(6t^Tt3BSg2>se^gzoyv~hVgY62L4r|sw_Z2O>{X$N@b+~QgEAFv{M&5o-?!eY{Zfi=p zFv8Tmg%4}-A8~;WBZmX2JnDt?5OrwZ)x+6W3TmLhER&n{nvy)&EWvSDYjAa#9!$LQ zsF!bp#Gx&t95Boim~xGqa!xt>3{%34L1~&>vUiUD0)+>0eWb#J#D`UQm?u#9`(L53 zJCJF(!e{%45S9k}q2c&b6!RbcK|K?G^AdyyKG*4{@EO{l)bBm&_1fL##lgoogle.cloud.language.v1beta2.AnalyzeEntitiesRequest + */ +class AnalyzeEntitiesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; + */ + protected $encoding_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1beta2\Document $document + * Required. Input document. + * @type int $encoding_type + * The encoding type used by the API to calculate offsets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Language\V1beta2\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Language\V1beta2\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; + * @return int + */ + public function getEncodingType() + { + return $this->encoding_type; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; + * @param int $var + * @return $this + */ + public function setEncodingType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EncodingType::class); + $this->encoding_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesResponse.php new file mode 100644 index 000000000000..d2c871818b1f --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesResponse.php @@ -0,0 +1,109 @@ +google.cloud.language.v1beta2.AnalyzeEntitiesResponse + */ +class AnalyzeEntitiesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The recognized entities in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; + */ + private $entities; + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + */ + protected $language = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $entities + * The recognized entities in the input document. + * @type string $language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The recognized entities in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntities() + { + return $this->entities; + } + + /** + * The recognized entities in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; + * @param array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Entity::class); + $this->entities = $arr; + + return $this; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + * @return string + */ + public function getLanguage() + { + return $this->language; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + * @param string $var + * @return $this + */ + public function setLanguage($var) + { + GPBUtil::checkString($var, True); + $this->language = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentRequest.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentRequest.php new file mode 100644 index 000000000000..0518237c96b6 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentRequest.php @@ -0,0 +1,111 @@ +google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest + */ +class AnalyzeEntitySentimentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; + */ + protected $encoding_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1beta2\Document $document + * Required. Input document. + * @type int $encoding_type + * The encoding type used by the API to calculate offsets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Language\V1beta2\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Language\V1beta2\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; + * @return int + */ + public function getEncodingType() + { + return $this->encoding_type; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; + * @param int $var + * @return $this + */ + public function setEncodingType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EncodingType::class); + $this->encoding_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentResponse.php new file mode 100644 index 000000000000..df3732121135 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentResponse.php @@ -0,0 +1,109 @@ +google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse + */ +class AnalyzeEntitySentimentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The recognized entities in the input document with associated sentiments. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; + */ + private $entities; + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + */ + protected $language = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $entities + * The recognized entities in the input document with associated sentiments. + * @type string $language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The recognized entities in the input document with associated sentiments. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntities() + { + return $this->entities; + } + + /** + * The recognized entities in the input document with associated sentiments. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; + * @param array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Entity::class); + $this->entities = $arr; + + return $this; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + * @return string + */ + public function getLanguage() + { + return $this->language; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + * @param string $var + * @return $this + */ + public function setLanguage($var) + { + GPBUtil::checkString($var, True); + $this->language = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentRequest.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentRequest.php new file mode 100644 index 000000000000..80c589be0ee6 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentRequest.php @@ -0,0 +1,115 @@ +google.cloud.language.v1beta2.AnalyzeSentimentRequest + */ +class AnalyzeSentimentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * The encoding type used by the API to calculate sentence offsets for the + * sentence sentiment. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; + */ + protected $encoding_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1beta2\Document $document + * Required. Input document. + * @type int $encoding_type + * The encoding type used by the API to calculate sentence offsets for the + * sentence sentiment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Language\V1beta2\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Language\V1beta2\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The encoding type used by the API to calculate sentence offsets for the + * sentence sentiment. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; + * @return int + */ + public function getEncodingType() + { + return $this->encoding_type; + } + + /** + * The encoding type used by the API to calculate sentence offsets for the + * sentence sentiment. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; + * @param int $var + * @return $this + */ + public function setEncodingType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EncodingType::class); + $this->encoding_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentResponse.php new file mode 100644 index 000000000000..85f6940a0de1 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentResponse.php @@ -0,0 +1,153 @@ +google.cloud.language.v1beta2.AnalyzeSentimentResponse + */ +class AnalyzeSentimentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The overall sentiment of the input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 1; + */ + protected $document_sentiment = null; + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + */ + protected $language = ''; + /** + * The sentiment for all the sentences in the document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 3; + */ + private $sentences; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1beta2\Sentiment $document_sentiment + * The overall sentiment of the input document. + * @type string $language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * @type array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences + * The sentiment for all the sentences in the document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The overall sentiment of the input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 1; + * @return \Google\Cloud\Language\V1beta2\Sentiment|null + */ + public function getDocumentSentiment() + { + return $this->document_sentiment; + } + + public function hasDocumentSentiment() + { + return isset($this->document_sentiment); + } + + public function clearDocumentSentiment() + { + unset($this->document_sentiment); + } + + /** + * The overall sentiment of the input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 1; + * @param \Google\Cloud\Language\V1beta2\Sentiment $var + * @return $this + */ + public function setDocumentSentiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Sentiment::class); + $this->document_sentiment = $var; + + return $this; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + * @return string + */ + public function getLanguage() + { + return $this->language; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * + * Generated from protobuf field string language = 2; + * @param string $var + * @return $this + */ + public function setLanguage($var) + { + GPBUtil::checkString($var, True); + $this->language = $var; + + return $this; + } + + /** + * The sentiment for all the sentences in the document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSentences() + { + return $this->sentences; + } + + /** + * The sentiment for all the sentences in the document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 3; + * @param array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSentences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Sentence::class); + $this->sentences = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxRequest.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxRequest.php new file mode 100644 index 000000000000..4efdf49b5efc --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxRequest.php @@ -0,0 +1,111 @@ +google.cloud.language.v1beta2.AnalyzeSyntaxRequest + */ +class AnalyzeSyntaxRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; + */ + protected $encoding_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1beta2\Document $document + * Required. Input document. + * @type int $encoding_type + * The encoding type used by the API to calculate offsets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Language\V1beta2\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Language\V1beta2\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; + * @return int + */ + public function getEncodingType() + { + return $this->encoding_type; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; + * @param int $var + * @return $this + */ + public function setEncodingType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EncodingType::class); + $this->encoding_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxResponse.php new file mode 100644 index 000000000000..9ade9fd01ee7 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxResponse.php @@ -0,0 +1,143 @@ +google.cloud.language.v1beta2.AnalyzeSyntaxResponse + */ +class AnalyzeSyntaxResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Sentences in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; + */ + private $sentences; + /** + * Tokens, along with their syntactic information, in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; + */ + private $tokens; + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * + * Generated from protobuf field string language = 3; + */ + protected $language = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences + * Sentences in the input document. + * @type array<\Google\Cloud\Language\V1beta2\Token>|\Google\Protobuf\Internal\RepeatedField $tokens + * Tokens, along with their syntactic information, in the input document. + * @type string $language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Sentences in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSentences() + { + return $this->sentences; + } + + /** + * Sentences in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; + * @param array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSentences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Sentence::class); + $this->sentences = $arr; + + return $this; + } + + /** + * Tokens, along with their syntactic information, in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTokens() + { + return $this->tokens; + } + + /** + * Tokens, along with their syntactic information, in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; + * @param array<\Google\Cloud\Language\V1beta2\Token>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTokens($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Token::class); + $this->tokens = $arr; + + return $this; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * + * Generated from protobuf field string language = 3; + * @return string + */ + public function getLanguage() + { + return $this->language; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * + * Generated from protobuf field string language = 3; + * @param string $var + * @return $this + */ + public function setLanguage($var) + { + GPBUtil::checkString($var, True); + $this->language = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest.php new file mode 100644 index 000000000000..811df80d0e3f --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest.php @@ -0,0 +1,156 @@ +google.cloud.language.v1beta2.AnnotateTextRequest + */ +class AnnotateTextRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * Required. The enabled features. + * + * Generated from protobuf field .google.cloud.language.v1beta2.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $features = null; + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 3; + */ + protected $encoding_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1beta2\Document $document + * Required. Input document. + * @type \Google\Cloud\Language\V1beta2\AnnotateTextRequest\Features $features + * Required. The enabled features. + * @type int $encoding_type + * The encoding type used by the API to calculate offsets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Language\V1beta2\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Language\V1beta2\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); + $this->document = $var; + + return $this; + } + + /** + * Required. The enabled features. + * + * Generated from protobuf field .google.cloud.language.v1beta2.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Language\V1beta2\AnnotateTextRequest\Features|null + */ + public function getFeatures() + { + return $this->features; + } + + public function hasFeatures() + { + return isset($this->features); + } + + public function clearFeatures() + { + unset($this->features); + } + + /** + * Required. The enabled features. + * + * Generated from protobuf field .google.cloud.language.v1beta2.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Language\V1beta2\AnnotateTextRequest\Features $var + * @return $this + */ + public function setFeatures($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\AnnotateTextRequest\Features::class); + $this->features = $var; + + return $this; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 3; + * @return int + */ + public function getEncodingType() + { + return $this->encoding_type; + } + + /** + * The encoding type used by the API to calculate offsets. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 3; + * @param int $var + * @return $this + */ + public function setEncodingType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EncodingType::class); + $this->encoding_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest/Features.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest/Features.php new file mode 100644 index 000000000000..222c37b72e94 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest/Features.php @@ -0,0 +1,268 @@ +google.cloud.language.v1beta2.AnnotateTextRequest.Features + */ +class Features extends \Google\Protobuf\Internal\Message +{ + /** + * Extract syntax information. + * + * Generated from protobuf field bool extract_syntax = 1; + */ + protected $extract_syntax = false; + /** + * Extract entities. + * + * Generated from protobuf field bool extract_entities = 2; + */ + protected $extract_entities = false; + /** + * Extract document-level sentiment. + * + * Generated from protobuf field bool extract_document_sentiment = 3; + */ + protected $extract_document_sentiment = false; + /** + * Extract entities and their associated sentiment. + * + * Generated from protobuf field bool extract_entity_sentiment = 4; + */ + protected $extract_entity_sentiment = false; + /** + * Classify the full document into categories. If this is true, + * the API will use the default model which classifies into a + * [predefined + * taxonomy](https://cloud.google.com/natural-language/docs/categories). + * + * Generated from protobuf field bool classify_text = 6; + */ + protected $classify_text = false; + /** + * The model options to use for classification. Defaults to v1 options + * if not specified. Only used if `classify_text` is set to true. + * + * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10; + */ + protected $classification_model_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $extract_syntax + * Extract syntax information. + * @type bool $extract_entities + * Extract entities. + * @type bool $extract_document_sentiment + * Extract document-level sentiment. + * @type bool $extract_entity_sentiment + * Extract entities and their associated sentiment. + * @type bool $classify_text + * Classify the full document into categories. If this is true, + * the API will use the default model which classifies into a + * [predefined + * taxonomy](https://cloud.google.com/natural-language/docs/categories). + * @type \Google\Cloud\Language\V1beta2\ClassificationModelOptions $classification_model_options + * The model options to use for classification. Defaults to v1 options + * if not specified. Only used if `classify_text` is set to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Extract syntax information. + * + * Generated from protobuf field bool extract_syntax = 1; + * @return bool + */ + public function getExtractSyntax() + { + return $this->extract_syntax; + } + + /** + * Extract syntax information. + * + * Generated from protobuf field bool extract_syntax = 1; + * @param bool $var + * @return $this + */ + public function setExtractSyntax($var) + { + GPBUtil::checkBool($var); + $this->extract_syntax = $var; + + return $this; + } + + /** + * Extract entities. + * + * Generated from protobuf field bool extract_entities = 2; + * @return bool + */ + public function getExtractEntities() + { + return $this->extract_entities; + } + + /** + * Extract entities. + * + * Generated from protobuf field bool extract_entities = 2; + * @param bool $var + * @return $this + */ + public function setExtractEntities($var) + { + GPBUtil::checkBool($var); + $this->extract_entities = $var; + + return $this; + } + + /** + * Extract document-level sentiment. + * + * Generated from protobuf field bool extract_document_sentiment = 3; + * @return bool + */ + public function getExtractDocumentSentiment() + { + return $this->extract_document_sentiment; + } + + /** + * Extract document-level sentiment. + * + * Generated from protobuf field bool extract_document_sentiment = 3; + * @param bool $var + * @return $this + */ + public function setExtractDocumentSentiment($var) + { + GPBUtil::checkBool($var); + $this->extract_document_sentiment = $var; + + return $this; + } + + /** + * Extract entities and their associated sentiment. + * + * Generated from protobuf field bool extract_entity_sentiment = 4; + * @return bool + */ + public function getExtractEntitySentiment() + { + return $this->extract_entity_sentiment; + } + + /** + * Extract entities and their associated sentiment. + * + * Generated from protobuf field bool extract_entity_sentiment = 4; + * @param bool $var + * @return $this + */ + public function setExtractEntitySentiment($var) + { + GPBUtil::checkBool($var); + $this->extract_entity_sentiment = $var; + + return $this; + } + + /** + * Classify the full document into categories. If this is true, + * the API will use the default model which classifies into a + * [predefined + * taxonomy](https://cloud.google.com/natural-language/docs/categories). + * + * Generated from protobuf field bool classify_text = 6; + * @return bool + */ + public function getClassifyText() + { + return $this->classify_text; + } + + /** + * Classify the full document into categories. If this is true, + * the API will use the default model which classifies into a + * [predefined + * taxonomy](https://cloud.google.com/natural-language/docs/categories). + * + * Generated from protobuf field bool classify_text = 6; + * @param bool $var + * @return $this + */ + public function setClassifyText($var) + { + GPBUtil::checkBool($var); + $this->classify_text = $var; + + return $this; + } + + /** + * The model options to use for classification. Defaults to v1 options + * if not specified. Only used if `classify_text` is set to true. + * + * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10; + * @return \Google\Cloud\Language\V1beta2\ClassificationModelOptions|null + */ + public function getClassificationModelOptions() + { + return $this->classification_model_options; + } + + public function hasClassificationModelOptions() + { + return isset($this->classification_model_options); + } + + public function clearClassificationModelOptions() + { + unset($this->classification_model_options); + } + + /** + * The model options to use for classification. Defaults to v1 options + * if not specified. Only used if `classify_text` is set to true. + * + * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10; + * @param \Google\Cloud\Language\V1beta2\ClassificationModelOptions $var + * @return $this + */ + public function setClassificationModelOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions::class); + $this->classification_model_options = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Features::class, \Google\Cloud\Language\V1beta2\AnnotateTextRequest_Features::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest_Features.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest_Features.php new file mode 100644 index 000000000000..e1f981a34755 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest_Features.php @@ -0,0 +1,16 @@ +google.cloud.language.v1beta2.AnnotateTextResponse + */ +class AnnotateTextResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Sentences in the input document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; + */ + private $sentences; + /** + * Tokens, along with their syntactic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; + */ + private $tokens; + /** + * Entities, along with their semantic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities]. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 3; + */ + private $entities; + /** + * The overall sentiment for the document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 4; + */ + protected $document_sentiment = null; + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * + * Generated from protobuf field string language = 5; + */ + protected $language = ''; + /** + * Categories identified in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6; + */ + private $categories; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences + * Sentences in the input document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. + * @type array<\Google\Cloud\Language\V1beta2\Token>|\Google\Protobuf\Internal\RepeatedField $tokens + * Tokens, along with their syntactic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. + * @type array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $entities + * Entities, along with their semantic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities]. + * @type \Google\Cloud\Language\V1beta2\Sentiment $document_sentiment + * The overall sentiment for the document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]. + * @type string $language + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * @type array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $categories + * Categories identified in the input document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Sentences in the input document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSentences() + { + return $this->sentences; + } + + /** + * Sentences in the input document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; + * @param array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSentences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Sentence::class); + $this->sentences = $arr; + + return $this; + } + + /** + * Tokens, along with their syntactic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTokens() + { + return $this->tokens; + } + + /** + * Tokens, along with their syntactic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; + * @param array<\Google\Cloud\Language\V1beta2\Token>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTokens($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Token::class); + $this->tokens = $arr; + + return $this; + } + + /** + * Entities, along with their semantic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities]. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntities() + { + return $this->entities; + } + + /** + * Entities, along with their semantic information, in the input document. + * Populated if the user enables + * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities]. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 3; + * @param array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Entity::class); + $this->entities = $arr; + + return $this; + } + + /** + * The overall sentiment for the document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 4; + * @return \Google\Cloud\Language\V1beta2\Sentiment|null + */ + public function getDocumentSentiment() + { + return $this->document_sentiment; + } + + public function hasDocumentSentiment() + { + return isset($this->document_sentiment); + } + + public function clearDocumentSentiment() + { + unset($this->document_sentiment); + } + + /** + * The overall sentiment for the document. Populated if the user enables + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 4; + * @param \Google\Cloud\Language\V1beta2\Sentiment $var + * @return $this + */ + public function setDocumentSentiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Sentiment::class); + $this->document_sentiment = $var; + + return $this; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * + * Generated from protobuf field string language = 5; + * @return string + */ + public function getLanguage() + { + return $this->language; + } + + /** + * The language of the text, which will be the same as the language specified + * in the request or, if not specified, the automatically-detected language. + * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. + * + * Generated from protobuf field string language = 5; + * @param string $var + * @return $this + */ + public function setLanguage($var) + { + GPBUtil::checkString($var, True); + $this->language = $var; + + return $this; + } + + /** + * Categories identified in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCategories() + { + return $this->categories; + } + + /** + * Categories identified in the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6; + * @param array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\ClassificationCategory::class); + $this->categories = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationCategory.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationCategory.php new file mode 100644 index 000000000000..8303e14ba8f4 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationCategory.php @@ -0,0 +1,109 @@ +google.cloud.language.v1beta2.ClassificationCategory + */ +class ClassificationCategory extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the category representing the document, from the [predefined + * taxonomy](https://cloud.google.com/natural-language/docs/categories). + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The classifier's confidence of the category. Number represents how certain + * the classifier is that this category represents the given text. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the category representing the document, from the [predefined + * taxonomy](https://cloud.google.com/natural-language/docs/categories). + * @type float $confidence + * The classifier's confidence of the category. Number represents how certain + * the classifier is that this category represents the given text. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The name of the category representing the document, from the [predefined + * taxonomy](https://cloud.google.com/natural-language/docs/categories). + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the category representing the document, from the [predefined + * taxonomy](https://cloud.google.com/natural-language/docs/categories). + * + * 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 classifier's confidence of the category. Number represents how certain + * the classifier is that this category represents the given text. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * The classifier's confidence of the category. Number represents how certain + * the classifier is that this category represents the given text. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions.php new file mode 100644 index 000000000000..75c27dd88790 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions.php @@ -0,0 +1,117 @@ +google.cloud.language.v1beta2.ClassificationModelOptions + */ +class ClassificationModelOptions extends \Google\Protobuf\Internal\Message +{ + protected $model_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model $v1_model + * Setting this field will use the V1 model and V1 content categories + * version. The V1 model is a legacy model; support for this will be + * discontinued in the future. + * @type \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model $v2_model + * Setting this field will use the V2 model with the appropriate content + * categories version. The V2 model is a better performing model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Setting this field will use the V1 model and V1 content categories + * version. The V1 model is a legacy model; support for this will be + * discontinued in the future. + * + * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V1Model v1_model = 1; + * @return \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model|null + */ + public function getV1Model() + { + return $this->readOneof(1); + } + + public function hasV1Model() + { + return $this->hasOneof(1); + } + + /** + * Setting this field will use the V1 model and V1 content categories + * version. The V1 model is a legacy model; support for this will be + * discontinued in the future. + * + * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V1Model v1_model = 1; + * @param \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model $var + * @return $this + */ + public function setV1Model($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Setting this field will use the V2 model with the appropriate content + * categories version. The V2 model is a better performing model. + * + * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V2Model v2_model = 2; + * @return \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model|null + */ + public function getV2Model() + { + return $this->readOneof(2); + } + + public function hasV2Model() + { + return $this->hasOneof(2); + } + + /** + * Setting this field will use the V2 model with the appropriate content + * categories version. The V2 model is a better performing model. + * + * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V2Model v2_model = 2; + * @param \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model $var + * @return $this + */ + public function setV2Model($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getModelType() + { + return $this->whichOneof("model_type"); + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V1Model.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V1Model.php new file mode 100644 index 000000000000..ae781d4d3d46 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V1Model.php @@ -0,0 +1,36 @@ +google.cloud.language.v1beta2.ClassificationModelOptions.V1Model + */ +class V1Model extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(V1Model::class, \Google\Cloud\Language\V1beta2\ClassificationModelOptions_V1Model::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model.php new file mode 100644 index 000000000000..d312077d7246 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model.php @@ -0,0 +1,70 @@ +google.cloud.language.v1beta2.ClassificationModelOptions.V2Model + */ +class V2Model extends \Google\Protobuf\Internal\Message +{ + /** + * The content categories used for classification. + * + * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; + */ + protected $content_categories_version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $content_categories_version + * The content categories used for classification. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The content categories used for classification. + * + * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; + * @return int + */ + public function getContentCategoriesVersion() + { + return $this->content_categories_version; + } + + /** + * The content categories used for classification. + * + * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; + * @param int $var + * @return $this + */ + public function setContentCategoriesVersion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model\ContentCategoriesVersion::class); + $this->content_categories_version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(V2Model::class, \Google\Cloud\Language\V1beta2\ClassificationModelOptions_V2Model::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php new file mode 100644 index 000000000000..7b495d2a084a --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php @@ -0,0 +1,65 @@ +google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion + */ +class ContentCategoriesVersion +{ + /** + * If `ContentCategoriesVersion` is not specified, this option will + * default to `V1`. + * + * Generated from protobuf enum CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0; + */ + const CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0; + /** + * Legacy content categories of our initial launch in 2017. + * + * Generated from protobuf enum V1 = 1; + */ + const V1 = 1; + /** + * Updated content categories in 2022. + * + * Generated from protobuf enum V2 = 2; + */ + const V2 = 2; + + private static $valueToName = [ + self::CONTENT_CATEGORIES_VERSION_UNSPECIFIED => 'CONTENT_CATEGORIES_VERSION_UNSPECIFIED', + self::V1 => 'V1', + self::V2 => '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(ContentCategoriesVersion::class, \Google\Cloud\Language\V1beta2\ClassificationModelOptions_V2Model_ContentCategoriesVersion::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions_V1Model.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions_V1Model.php new file mode 100644 index 000000000000..8d869319c8e1 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions_V1Model.php @@ -0,0 +1,16 @@ +google.cloud.language.v1beta2.ClassifyTextRequest + */ +class ClassifyTextRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * Model options to use for classification. Defaults to v1 options if not + * specified. + * + * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 3; + */ + protected $classification_model_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1beta2\Document $document + * Required. Input document. + * @type \Google\Cloud\Language\V1beta2\ClassificationModelOptions $classification_model_options + * Model options to use for classification. Defaults to v1 options if not + * specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Language\V1beta2\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. Input document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Language\V1beta2\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); + $this->document = $var; + + return $this; + } + + /** + * Model options to use for classification. Defaults to v1 options if not + * specified. + * + * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 3; + * @return \Google\Cloud\Language\V1beta2\ClassificationModelOptions|null + */ + public function getClassificationModelOptions() + { + return $this->classification_model_options; + } + + public function hasClassificationModelOptions() + { + return isset($this->classification_model_options); + } + + public function clearClassificationModelOptions() + { + unset($this->classification_model_options); + } + + /** + * Model options to use for classification. Defaults to v1 options if not + * specified. + * + * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 3; + * @param \Google\Cloud\Language\V1beta2\ClassificationModelOptions $var + * @return $this + */ + public function setClassificationModelOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions::class); + $this->classification_model_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextResponse.php new file mode 100644 index 000000000000..a919aba1e73f --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextResponse.php @@ -0,0 +1,67 @@ +google.cloud.language.v1beta2.ClassifyTextResponse + */ +class ClassifyTextResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Categories representing the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 1; + */ + private $categories; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $categories + * Categories representing the input document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Categories representing the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCategories() + { + return $this->categories; + } + + /** + * Categories representing the input document. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 1; + * @param array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\ClassificationCategory::class); + $this->categories = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge.php new file mode 100644 index 000000000000..17f1fd96606c --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge.php @@ -0,0 +1,117 @@ +google.cloud.language.v1beta2.DependencyEdge + */ +class DependencyEdge extends \Google\Protobuf\Internal\Message +{ + /** + * Represents the head of this token in the dependency tree. + * This is the index of the token which has an arc going to this token. + * The index is the position of the token in the array of tokens returned + * by the API method. If this token is a root token, then the + * `head_token_index` is its own index. + * + * Generated from protobuf field int32 head_token_index = 1; + */ + protected $head_token_index = 0; + /** + * The parse label for the token. + * + * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge.Label label = 2; + */ + protected $label = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $head_token_index + * Represents the head of this token in the dependency tree. + * This is the index of the token which has an arc going to this token. + * The index is the position of the token in the array of tokens returned + * by the API method. If this token is a root token, then the + * `head_token_index` is its own index. + * @type int $label + * The parse label for the token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Represents the head of this token in the dependency tree. + * This is the index of the token which has an arc going to this token. + * The index is the position of the token in the array of tokens returned + * by the API method. If this token is a root token, then the + * `head_token_index` is its own index. + * + * Generated from protobuf field int32 head_token_index = 1; + * @return int + */ + public function getHeadTokenIndex() + { + return $this->head_token_index; + } + + /** + * Represents the head of this token in the dependency tree. + * This is the index of the token which has an arc going to this token. + * The index is the position of the token in the array of tokens returned + * by the API method. If this token is a root token, then the + * `head_token_index` is its own index. + * + * Generated from protobuf field int32 head_token_index = 1; + * @param int $var + * @return $this + */ + public function setHeadTokenIndex($var) + { + GPBUtil::checkInt32($var); + $this->head_token_index = $var; + + return $this; + } + + /** + * The parse label for the token. + * + * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge.Label label = 2; + * @return int + */ + public function getLabel() + { + return $this->label; + } + + /** + * The parse label for the token. + * + * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge.Label label = 2; + * @param int $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\DependencyEdge\Label::class); + $this->label = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge/Label.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge/Label.php new file mode 100644 index 000000000000..81e822ce5295 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge/Label.php @@ -0,0 +1,628 @@ +google.cloud.language.v1beta2.DependencyEdge.Label + */ +class Label +{ + /** + * Unknown + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * Abbreviation modifier + * + * Generated from protobuf enum ABBREV = 1; + */ + const ABBREV = 1; + /** + * Adjectival complement + * + * Generated from protobuf enum ACOMP = 2; + */ + const ACOMP = 2; + /** + * Adverbial clause modifier + * + * Generated from protobuf enum ADVCL = 3; + */ + const ADVCL = 3; + /** + * Adverbial modifier + * + * Generated from protobuf enum ADVMOD = 4; + */ + const ADVMOD = 4; + /** + * Adjectival modifier of an NP + * + * Generated from protobuf enum AMOD = 5; + */ + const AMOD = 5; + /** + * Appositional modifier of an NP + * + * Generated from protobuf enum APPOS = 6; + */ + const APPOS = 6; + /** + * Attribute dependent of a copular verb + * + * Generated from protobuf enum ATTR = 7; + */ + const ATTR = 7; + /** + * Auxiliary (non-main) verb + * + * Generated from protobuf enum AUX = 8; + */ + const AUX = 8; + /** + * Passive auxiliary + * + * Generated from protobuf enum AUXPASS = 9; + */ + const AUXPASS = 9; + /** + * Coordinating conjunction + * + * Generated from protobuf enum CC = 10; + */ + const CC = 10; + /** + * Clausal complement of a verb or adjective + * + * Generated from protobuf enum CCOMP = 11; + */ + const CCOMP = 11; + /** + * Conjunct + * + * Generated from protobuf enum CONJ = 12; + */ + const CONJ = 12; + /** + * Clausal subject + * + * Generated from protobuf enum CSUBJ = 13; + */ + const CSUBJ = 13; + /** + * Clausal passive subject + * + * Generated from protobuf enum CSUBJPASS = 14; + */ + const CSUBJPASS = 14; + /** + * Dependency (unable to determine) + * + * Generated from protobuf enum DEP = 15; + */ + const DEP = 15; + /** + * Determiner + * + * Generated from protobuf enum DET = 16; + */ + const DET = 16; + /** + * Discourse + * + * Generated from protobuf enum DISCOURSE = 17; + */ + const DISCOURSE = 17; + /** + * Direct object + * + * Generated from protobuf enum DOBJ = 18; + */ + const DOBJ = 18; + /** + * Expletive + * + * Generated from protobuf enum EXPL = 19; + */ + const EXPL = 19; + /** + * Goes with (part of a word in a text not well edited) + * + * Generated from protobuf enum GOESWITH = 20; + */ + const GOESWITH = 20; + /** + * Indirect object + * + * Generated from protobuf enum IOBJ = 21; + */ + const IOBJ = 21; + /** + * Marker (word introducing a subordinate clause) + * + * Generated from protobuf enum MARK = 22; + */ + const MARK = 22; + /** + * Multi-word expression + * + * Generated from protobuf enum MWE = 23; + */ + const MWE = 23; + /** + * Multi-word verbal expression + * + * Generated from protobuf enum MWV = 24; + */ + const MWV = 24; + /** + * Negation modifier + * + * Generated from protobuf enum NEG = 25; + */ + const NEG = 25; + /** + * Noun compound modifier + * + * Generated from protobuf enum NN = 26; + */ + const NN = 26; + /** + * Noun phrase used as an adverbial modifier + * + * Generated from protobuf enum NPADVMOD = 27; + */ + const NPADVMOD = 27; + /** + * Nominal subject + * + * Generated from protobuf enum NSUBJ = 28; + */ + const NSUBJ = 28; + /** + * Passive nominal subject + * + * Generated from protobuf enum NSUBJPASS = 29; + */ + const NSUBJPASS = 29; + /** + * Numeric modifier of a noun + * + * Generated from protobuf enum NUM = 30; + */ + const NUM = 30; + /** + * Element of compound number + * + * Generated from protobuf enum NUMBER = 31; + */ + const NUMBER = 31; + /** + * Punctuation mark + * + * Generated from protobuf enum P = 32; + */ + const P = 32; + /** + * Parataxis relation + * + * Generated from protobuf enum PARATAXIS = 33; + */ + const PARATAXIS = 33; + /** + * Participial modifier + * + * Generated from protobuf enum PARTMOD = 34; + */ + const PARTMOD = 34; + /** + * The complement of a preposition is a clause + * + * Generated from protobuf enum PCOMP = 35; + */ + const PCOMP = 35; + /** + * Object of a preposition + * + * Generated from protobuf enum POBJ = 36; + */ + const POBJ = 36; + /** + * Possession modifier + * + * Generated from protobuf enum POSS = 37; + */ + const POSS = 37; + /** + * Postverbal negative particle + * + * Generated from protobuf enum POSTNEG = 38; + */ + const POSTNEG = 38; + /** + * Predicate complement + * + * Generated from protobuf enum PRECOMP = 39; + */ + const PRECOMP = 39; + /** + * Preconjunt + * + * Generated from protobuf enum PRECONJ = 40; + */ + const PRECONJ = 40; + /** + * Predeterminer + * + * Generated from protobuf enum PREDET = 41; + */ + const PREDET = 41; + /** + * Prefix + * + * Generated from protobuf enum PREF = 42; + */ + const PREF = 42; + /** + * Prepositional modifier + * + * Generated from protobuf enum PREP = 43; + */ + const PREP = 43; + /** + * The relationship between a verb and verbal morpheme + * + * Generated from protobuf enum PRONL = 44; + */ + const PRONL = 44; + /** + * Particle + * + * Generated from protobuf enum PRT = 45; + */ + const PRT = 45; + /** + * Associative or possessive marker + * + * Generated from protobuf enum PS = 46; + */ + const PS = 46; + /** + * Quantifier phrase modifier + * + * Generated from protobuf enum QUANTMOD = 47; + */ + const QUANTMOD = 47; + /** + * Relative clause modifier + * + * Generated from protobuf enum RCMOD = 48; + */ + const RCMOD = 48; + /** + * Complementizer in relative clause + * + * Generated from protobuf enum RCMODREL = 49; + */ + const RCMODREL = 49; + /** + * Ellipsis without a preceding predicate + * + * Generated from protobuf enum RDROP = 50; + */ + const RDROP = 50; + /** + * Referent + * + * Generated from protobuf enum REF = 51; + */ + const REF = 51; + /** + * Remnant + * + * Generated from protobuf enum REMNANT = 52; + */ + const REMNANT = 52; + /** + * Reparandum + * + * Generated from protobuf enum REPARANDUM = 53; + */ + const REPARANDUM = 53; + /** + * Root + * + * Generated from protobuf enum ROOT = 54; + */ + const ROOT = 54; + /** + * Suffix specifying a unit of number + * + * Generated from protobuf enum SNUM = 55; + */ + const SNUM = 55; + /** + * Suffix + * + * Generated from protobuf enum SUFF = 56; + */ + const SUFF = 56; + /** + * Temporal modifier + * + * Generated from protobuf enum TMOD = 57; + */ + const TMOD = 57; + /** + * Topic marker + * + * Generated from protobuf enum TOPIC = 58; + */ + const TOPIC = 58; + /** + * Clause headed by an infinite form of the verb that modifies a noun + * + * Generated from protobuf enum VMOD = 59; + */ + const VMOD = 59; + /** + * Vocative + * + * Generated from protobuf enum VOCATIVE = 60; + */ + const VOCATIVE = 60; + /** + * Open clausal complement + * + * Generated from protobuf enum XCOMP = 61; + */ + const XCOMP = 61; + /** + * Name suffix + * + * Generated from protobuf enum SUFFIX = 62; + */ + const SUFFIX = 62; + /** + * Name title + * + * Generated from protobuf enum TITLE = 63; + */ + const TITLE = 63; + /** + * Adverbial phrase modifier + * + * Generated from protobuf enum ADVPHMOD = 64; + */ + const ADVPHMOD = 64; + /** + * Causative auxiliary + * + * Generated from protobuf enum AUXCAUS = 65; + */ + const AUXCAUS = 65; + /** + * Helper auxiliary + * + * Generated from protobuf enum AUXVV = 66; + */ + const AUXVV = 66; + /** + * Rentaishi (Prenominal modifier) + * + * Generated from protobuf enum DTMOD = 67; + */ + const DTMOD = 67; + /** + * Foreign words + * + * Generated from protobuf enum FOREIGN = 68; + */ + const FOREIGN = 68; + /** + * Keyword + * + * Generated from protobuf enum KW = 69; + */ + const KW = 69; + /** + * List for chains of comparable items + * + * Generated from protobuf enum LIST = 70; + */ + const PBLIST = 70; + /** + * Nominalized clause + * + * Generated from protobuf enum NOMC = 71; + */ + const NOMC = 71; + /** + * Nominalized clausal subject + * + * Generated from protobuf enum NOMCSUBJ = 72; + */ + const NOMCSUBJ = 72; + /** + * Nominalized clausal passive + * + * Generated from protobuf enum NOMCSUBJPASS = 73; + */ + const NOMCSUBJPASS = 73; + /** + * Compound of numeric modifier + * + * Generated from protobuf enum NUMC = 74; + */ + const NUMC = 74; + /** + * Copula + * + * Generated from protobuf enum COP = 75; + */ + const COP = 75; + /** + * Dislocated relation (for fronted/topicalized elements) + * + * Generated from protobuf enum DISLOCATED = 76; + */ + const DISLOCATED = 76; + /** + * Aspect marker + * + * Generated from protobuf enum ASP = 77; + */ + const ASP = 77; + /** + * Genitive modifier + * + * Generated from protobuf enum GMOD = 78; + */ + const GMOD = 78; + /** + * Genitive object + * + * Generated from protobuf enum GOBJ = 79; + */ + const GOBJ = 79; + /** + * Infinitival modifier + * + * Generated from protobuf enum INFMOD = 80; + */ + const INFMOD = 80; + /** + * Measure + * + * Generated from protobuf enum MES = 81; + */ + const MES = 81; + /** + * Nominal complement of a noun + * + * Generated from protobuf enum NCOMP = 82; + */ + const NCOMP = 82; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::ABBREV => 'ABBREV', + self::ACOMP => 'ACOMP', + self::ADVCL => 'ADVCL', + self::ADVMOD => 'ADVMOD', + self::AMOD => 'AMOD', + self::APPOS => 'APPOS', + self::ATTR => 'ATTR', + self::AUX => 'AUX', + self::AUXPASS => 'AUXPASS', + self::CC => 'CC', + self::CCOMP => 'CCOMP', + self::CONJ => 'CONJ', + self::CSUBJ => 'CSUBJ', + self::CSUBJPASS => 'CSUBJPASS', + self::DEP => 'DEP', + self::DET => 'DET', + self::DISCOURSE => 'DISCOURSE', + self::DOBJ => 'DOBJ', + self::EXPL => 'EXPL', + self::GOESWITH => 'GOESWITH', + self::IOBJ => 'IOBJ', + self::MARK => 'MARK', + self::MWE => 'MWE', + self::MWV => 'MWV', + self::NEG => 'NEG', + self::NN => 'NN', + self::NPADVMOD => 'NPADVMOD', + self::NSUBJ => 'NSUBJ', + self::NSUBJPASS => 'NSUBJPASS', + self::NUM => 'NUM', + self::NUMBER => 'NUMBER', + self::P => 'P', + self::PARATAXIS => 'PARATAXIS', + self::PARTMOD => 'PARTMOD', + self::PCOMP => 'PCOMP', + self::POBJ => 'POBJ', + self::POSS => 'POSS', + self::POSTNEG => 'POSTNEG', + self::PRECOMP => 'PRECOMP', + self::PRECONJ => 'PRECONJ', + self::PREDET => 'PREDET', + self::PREF => 'PREF', + self::PREP => 'PREP', + self::PRONL => 'PRONL', + self::PRT => 'PRT', + self::PS => 'PS', + self::QUANTMOD => 'QUANTMOD', + self::RCMOD => 'RCMOD', + self::RCMODREL => 'RCMODREL', + self::RDROP => 'RDROP', + self::REF => 'REF', + self::REMNANT => 'REMNANT', + self::REPARANDUM => 'REPARANDUM', + self::ROOT => 'ROOT', + self::SNUM => 'SNUM', + self::SUFF => 'SUFF', + self::TMOD => 'TMOD', + self::TOPIC => 'TOPIC', + self::VMOD => 'VMOD', + self::VOCATIVE => 'VOCATIVE', + self::XCOMP => 'XCOMP', + self::SUFFIX => 'SUFFIX', + self::TITLE => 'TITLE', + self::ADVPHMOD => 'ADVPHMOD', + self::AUXCAUS => 'AUXCAUS', + self::AUXVV => 'AUXVV', + self::DTMOD => 'DTMOD', + self::FOREIGN => 'FOREIGN', + self::KW => 'KW', + self::PBLIST => 'LIST', + self::NOMC => 'NOMC', + self::NOMCSUBJ => 'NOMCSUBJ', + self::NOMCSUBJPASS => 'NOMCSUBJPASS', + self::NUMC => 'NUMC', + self::COP => 'COP', + self::DISLOCATED => 'DISLOCATED', + self::ASP => 'ASP', + self::GMOD => 'GMOD', + self::GOBJ => 'GOBJ', + self::INFMOD => 'INFMOD', + self::MES => 'MES', + self::NCOMP => 'NCOMP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has 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(Label::class, \Google\Cloud\Language\V1beta2\DependencyEdge_Label::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge_Label.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge_Label.php new file mode 100644 index 000000000000..ec8b85fdba85 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge_Label.php @@ -0,0 +1,16 @@ +google.cloud.language.v1beta2.Document + */ +class Document extends \Google\Protobuf\Internal\Message +{ + /** + * Required. If the type is not set or is `TYPE_UNSPECIFIED`, + * returns an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document.Type type = 1; + */ + protected $type = 0; + /** + * The language of the document (if not specified, the language is + * automatically detected). Both ISO and BCP-47 language codes are + * accepted.
+ * [Language + * Support](https://cloud.google.com/natural-language/docs/languages) lists + * currently supported languages for each API method. If the language (either + * specified by the caller or automatically detected) is not supported by the + * called API method, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string language = 4; + */ + protected $language = ''; + /** + * The web URI where the document comes from. This URI is not used for + * fetching the content, but as a hint for analyzing the document. + * + * Generated from protobuf field string reference_web_uri = 5; + */ + protected $reference_web_uri = ''; + /** + * Indicates how detected boilerplate(e.g. advertisements, copyright + * declarations, banners) should be handled for this document. If not + * specified, boilerplate will be treated the same as content. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document.BoilerplateHandling boilerplate_handling = 6; + */ + protected $boilerplate_handling = 0; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Required. If the type is not set or is `TYPE_UNSPECIFIED`, + * returns an `INVALID_ARGUMENT` error. + * @type string $content + * The content of the input in string format. + * Cloud audit logging exempt since it is based on user data. + * @type string $gcs_content_uri + * The Google Cloud Storage URI where the file content is located. + * This URI must be of the form: gs://bucket_name/object_name. For more + * details, see https://cloud.google.com/storage/docs/reference-uris. + * NOTE: Cloud Storage object versioning is not supported. + * @type string $language + * The language of the document (if not specified, the language is + * automatically detected). Both ISO and BCP-47 language codes are + * accepted.
+ * [Language + * Support](https://cloud.google.com/natural-language/docs/languages) lists + * currently supported languages for each API method. If the language (either + * specified by the caller or automatically detected) is not supported by the + * called API method, an `INVALID_ARGUMENT` error is returned. + * @type string $reference_web_uri + * The web URI where the document comes from. This URI is not used for + * fetching the content, but as a hint for analyzing the document. + * @type int $boilerplate_handling + * Indicates how detected boilerplate(e.g. advertisements, copyright + * declarations, banners) should be handled for this document. If not + * specified, boilerplate will be treated the same as content. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. If the type is not set or is `TYPE_UNSPECIFIED`, + * returns an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. If the type is not set or is `TYPE_UNSPECIFIED`, + * returns an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\Document\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The content of the input in string format. + * Cloud audit logging exempt since it is based on user data. + * + * Generated from protobuf field string content = 2; + * @return string + */ + public function getContent() + { + return $this->readOneof(2); + } + + public function hasContent() + { + return $this->hasOneof(2); + } + + /** + * The content of the input in string format. + * Cloud audit logging exempt since it is based on user data. + * + * 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; + } + + /** + * The Google Cloud Storage URI where the file content is located. + * This URI must be of the form: gs://bucket_name/object_name. For more + * details, see https://cloud.google.com/storage/docs/reference-uris. + * NOTE: Cloud Storage object versioning is not supported. + * + * Generated from protobuf field string gcs_content_uri = 3; + * @return string + */ + public function getGcsContentUri() + { + return $this->readOneof(3); + } + + public function hasGcsContentUri() + { + return $this->hasOneof(3); + } + + /** + * The Google Cloud Storage URI where the file content is located. + * This URI must be of the form: gs://bucket_name/object_name. For more + * details, see https://cloud.google.com/storage/docs/reference-uris. + * NOTE: Cloud Storage object versioning is not supported. + * + * Generated from protobuf field string gcs_content_uri = 3; + * @param string $var + * @return $this + */ + public function setGcsContentUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The language of the document (if not specified, the language is + * automatically detected). Both ISO and BCP-47 language codes are + * accepted.
+ * [Language + * Support](https://cloud.google.com/natural-language/docs/languages) lists + * currently supported languages for each API method. If the language (either + * specified by the caller or automatically detected) is not supported by the + * called API method, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string language = 4; + * @return string + */ + public function getLanguage() + { + return $this->language; + } + + /** + * The language of the document (if not specified, the language is + * automatically detected). Both ISO and BCP-47 language codes are + * accepted.
+ * [Language + * Support](https://cloud.google.com/natural-language/docs/languages) lists + * currently supported languages for each API method. If the language (either + * specified by the caller or automatically detected) is not supported by the + * called API method, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string language = 4; + * @param string $var + * @return $this + */ + public function setLanguage($var) + { + GPBUtil::checkString($var, True); + $this->language = $var; + + return $this; + } + + /** + * The web URI where the document comes from. This URI is not used for + * fetching the content, but as a hint for analyzing the document. + * + * Generated from protobuf field string reference_web_uri = 5; + * @return string + */ + public function getReferenceWebUri() + { + return $this->reference_web_uri; + } + + /** + * The web URI where the document comes from. This URI is not used for + * fetching the content, but as a hint for analyzing the document. + * + * Generated from protobuf field string reference_web_uri = 5; + * @param string $var + * @return $this + */ + public function setReferenceWebUri($var) + { + GPBUtil::checkString($var, True); + $this->reference_web_uri = $var; + + return $this; + } + + /** + * Indicates how detected boilerplate(e.g. advertisements, copyright + * declarations, banners) should be handled for this document. If not + * specified, boilerplate will be treated the same as content. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document.BoilerplateHandling boilerplate_handling = 6; + * @return int + */ + public function getBoilerplateHandling() + { + return $this->boilerplate_handling; + } + + /** + * Indicates how detected boilerplate(e.g. advertisements, copyright + * declarations, banners) should be handled for this document. If not + * specified, boilerplate will be treated the same as content. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Document.BoilerplateHandling boilerplate_handling = 6; + * @param int $var + * @return $this + */ + public function setBoilerplateHandling($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\Document\BoilerplateHandling::class); + $this->boilerplate_handling = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/BoilerplateHandling.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/BoilerplateHandling.php new file mode 100644 index 000000000000..0b2e8a4c21c7 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/BoilerplateHandling.php @@ -0,0 +1,65 @@ +google.cloud.language.v1beta2.Document.BoilerplateHandling + */ +class BoilerplateHandling +{ + /** + * The boilerplate handling is not specified. + * + * Generated from protobuf enum BOILERPLATE_HANDLING_UNSPECIFIED = 0; + */ + const BOILERPLATE_HANDLING_UNSPECIFIED = 0; + /** + * Do not analyze detected boilerplate. Reference web URI is required for + * detecting boilerplate. + * + * Generated from protobuf enum SKIP_BOILERPLATE = 1; + */ + const SKIP_BOILERPLATE = 1; + /** + * Treat boilerplate the same as content. + * + * Generated from protobuf enum KEEP_BOILERPLATE = 2; + */ + const KEEP_BOILERPLATE = 2; + + private static $valueToName = [ + self::BOILERPLATE_HANDLING_UNSPECIFIED => 'BOILERPLATE_HANDLING_UNSPECIFIED', + self::SKIP_BOILERPLATE => 'SKIP_BOILERPLATE', + self::KEEP_BOILERPLATE => 'KEEP_BOILERPLATE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BoilerplateHandling::class, \Google\Cloud\Language\V1beta2\Document_BoilerplateHandling::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/Type.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/Type.php new file mode 100644 index 000000000000..382148db46a1 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/Type.php @@ -0,0 +1,64 @@ +google.cloud.language.v1beta2.Document.Type + */ +class Type +{ + /** + * The content type is not specified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Plain text + * + * Generated from protobuf enum PLAIN_TEXT = 1; + */ + const PLAIN_TEXT = 1; + /** + * HTML + * + * Generated from protobuf enum HTML = 2; + */ + const HTML = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::PLAIN_TEXT => 'PLAIN_TEXT', + self::HTML => 'HTML', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Language\V1beta2\Document_Type::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document_BoilerplateHandling.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document_BoilerplateHandling.php new file mode 100644 index 000000000000..780023885950 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document_BoilerplateHandling.php @@ -0,0 +1,16 @@ +google.cloud.language.v1beta2.EncodingType + */ +class EncodingType +{ + /** + * If `EncodingType` is not specified, encoding-dependent information (such as + * `begin_offset`) will be set at `-1`. + * + * Generated from protobuf enum NONE = 0; + */ + const NONE = 0; + /** + * Encoding-dependent information (such as `begin_offset`) is calculated based + * on the UTF-8 encoding of the input. C++ and Go are examples of languages + * that use this encoding natively. + * + * Generated from protobuf enum UTF8 = 1; + */ + const UTF8 = 1; + /** + * Encoding-dependent information (such as `begin_offset`) is calculated based + * on the UTF-16 encoding of the input. Java and JavaScript are examples of + * languages that use this encoding natively. + * + * Generated from protobuf enum UTF16 = 2; + */ + const UTF16 = 2; + /** + * Encoding-dependent information (such as `begin_offset`) is calculated based + * on the UTF-32 encoding of the input. Python is an example of a language + * that uses this encoding natively. + * + * Generated from protobuf enum UTF32 = 3; + */ + const UTF32 = 3; + + private static $valueToName = [ + self::NONE => 'NONE', + self::UTF8 => 'UTF8', + self::UTF16 => 'UTF16', + self::UTF32 => 'UTF32', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity.php new file mode 100644 index 000000000000..846e4fa93d5b --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity.php @@ -0,0 +1,293 @@ +google.cloud.language.v1beta2.Entity + */ +class Entity extends \Google\Protobuf\Internal\Message +{ + /** + * The representative name for the entity. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The entity type. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Entity.Type type = 2; + */ + protected $type = 0; + /** + * Metadata associated with the entity. + * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + * and Knowledge Graph MID (`mid`), if they are available. For the metadata + * associated with other entity types, see the Type table below. + * + * Generated from protobuf field map metadata = 3; + */ + private $metadata; + /** + * The salience score associated with the entity in the [0, 1.0] range. + * The salience score for an entity provides information about the + * importance or centrality of that entity to the entire document text. + * Scores closer to 0 are less salient, while scores closer to 1.0 are highly + * salient. + * + * Generated from protobuf field float salience = 4; + */ + protected $salience = 0.0; + /** + * The mentions of this entity in the input document. The API currently + * supports proper noun mentions. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.EntityMention mentions = 5; + */ + private $mentions; + /** + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the aggregate sentiment expressed for this + * entity in the provided document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 6; + */ + protected $sentiment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The representative name for the entity. + * @type int $type + * The entity type. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Metadata associated with the entity. + * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + * and Knowledge Graph MID (`mid`), if they are available. For the metadata + * associated with other entity types, see the Type table below. + * @type float $salience + * The salience score associated with the entity in the [0, 1.0] range. + * The salience score for an entity provides information about the + * importance or centrality of that entity to the entire document text. + * Scores closer to 0 are less salient, while scores closer to 1.0 are highly + * salient. + * @type array<\Google\Cloud\Language\V1beta2\EntityMention>|\Google\Protobuf\Internal\RepeatedField $mentions + * The mentions of this entity in the input document. The API currently + * supports proper noun mentions. + * @type \Google\Cloud\Language\V1beta2\Sentiment $sentiment + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the aggregate sentiment expressed for this + * entity in the provided document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The representative name for the entity. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The representative name for the entity. + * + * 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 entity type. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Entity.Type type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The entity type. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Entity.Type type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\Entity\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Metadata associated with the entity. + * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + * and Knowledge Graph MID (`mid`), if they are available. For the metadata + * associated with other entity types, see the Type table below. + * + * Generated from protobuf field map metadata = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Metadata associated with the entity. + * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + * and Knowledge Graph MID (`mid`), if they are available. For the metadata + * associated with other entity types, see the Type table below. + * + * 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; + } + + /** + * The salience score associated with the entity in the [0, 1.0] range. + * The salience score for an entity provides information about the + * importance or centrality of that entity to the entire document text. + * Scores closer to 0 are less salient, while scores closer to 1.0 are highly + * salient. + * + * Generated from protobuf field float salience = 4; + * @return float + */ + public function getSalience() + { + return $this->salience; + } + + /** + * The salience score associated with the entity in the [0, 1.0] range. + * The salience score for an entity provides information about the + * importance or centrality of that entity to the entire document text. + * Scores closer to 0 are less salient, while scores closer to 1.0 are highly + * salient. + * + * Generated from protobuf field float salience = 4; + * @param float $var + * @return $this + */ + public function setSalience($var) + { + GPBUtil::checkFloat($var); + $this->salience = $var; + + return $this; + } + + /** + * The mentions of this entity in the input document. The API currently + * supports proper noun mentions. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.EntityMention mentions = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMentions() + { + return $this->mentions; + } + + /** + * The mentions of this entity in the input document. The API currently + * supports proper noun mentions. + * + * Generated from protobuf field repeated .google.cloud.language.v1beta2.EntityMention mentions = 5; + * @param array<\Google\Cloud\Language\V1beta2\EntityMention>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMentions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\EntityMention::class); + $this->mentions = $arr; + + return $this; + } + + /** + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the aggregate sentiment expressed for this + * entity in the provided document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 6; + * @return \Google\Cloud\Language\V1beta2\Sentiment|null + */ + public function getSentiment() + { + return $this->sentiment; + } + + public function hasSentiment() + { + return isset($this->sentiment); + } + + public function clearSentiment() + { + unset($this->sentiment); + } + + /** + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the aggregate sentiment expressed for this + * entity in the provided document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 6; + * @param \Google\Cloud\Language\V1beta2\Sentiment $var + * @return $this + */ + public function setSentiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Sentiment::class); + $this->sentiment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity/Type.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity/Type.php new file mode 100644 index 000000000000..128bbb2c7e0b --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity/Type.php @@ -0,0 +1,163 @@ +google.cloud.language.v1beta2.Entity.Type + */ +class Type +{ + /** + * Unknown + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * Person + * + * Generated from protobuf enum PERSON = 1; + */ + const PERSON = 1; + /** + * Location + * + * Generated from protobuf enum LOCATION = 2; + */ + const LOCATION = 2; + /** + * Organization + * + * Generated from protobuf enum ORGANIZATION = 3; + */ + const ORGANIZATION = 3; + /** + * Event + * + * Generated from protobuf enum EVENT = 4; + */ + const EVENT = 4; + /** + * Artwork + * + * Generated from protobuf enum WORK_OF_ART = 5; + */ + const WORK_OF_ART = 5; + /** + * Consumer product + * + * Generated from protobuf enum CONSUMER_GOOD = 6; + */ + const CONSUMER_GOOD = 6; + /** + * Other types of entities + * + * Generated from protobuf enum OTHER = 7; + */ + const OTHER = 7; + /** + * Phone number + * The metadata lists the phone number, formatted according to local + * convention, plus whichever additional elements appear in the text: + * * `number` - the actual number, broken down into sections as per local + * convention + * * `national_prefix` - country code, if detected + * * `area_code` - region or area code, if detected + * * `extension` - phone extension (to be dialed after connection), if + * detected + * + * Generated from protobuf enum PHONE_NUMBER = 9; + */ + const PHONE_NUMBER = 9; + /** + * Address + * The metadata identifies the street number and locality plus whichever + * additional elements appear in the text: + * * `street_number` - street number + * * `locality` - city or town + * * `street_name` - street/route name, if detected + * * `postal_code` - postal code, if detected + * * `country` - country, if detected< + * * `broad_region` - administrative area, such as the state, if detected + * * `narrow_region` - smaller administrative area, such as county, if + * detected + * * `sublocality` - used in Asian addresses to demark a district within a + * city, if detected + * + * Generated from protobuf enum ADDRESS = 10; + */ + const ADDRESS = 10; + /** + * Date + * The metadata identifies the components of the date: + * * `year` - four digit year, if detected + * * `month` - two digit month number, if detected + * * `day` - two digit day number, if detected + * + * Generated from protobuf enum DATE = 11; + */ + const DATE = 11; + /** + * Number + * The metadata is the number itself. + * + * Generated from protobuf enum NUMBER = 12; + */ + const NUMBER = 12; + /** + * Price + * The metadata identifies the `value` and `currency`. + * + * Generated from protobuf enum PRICE = 13; + */ + const PRICE = 13; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::PERSON => 'PERSON', + self::LOCATION => 'LOCATION', + self::ORGANIZATION => 'ORGANIZATION', + self::EVENT => 'EVENT', + self::WORK_OF_ART => 'WORK_OF_ART', + self::CONSUMER_GOOD => 'CONSUMER_GOOD', + self::OTHER => 'OTHER', + self::PHONE_NUMBER => 'PHONE_NUMBER', + self::ADDRESS => 'ADDRESS', + self::DATE => 'DATE', + self::NUMBER => 'NUMBER', + self::PRICE => 'PRICE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Language\V1beta2\Entity_Type::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention.php new file mode 100644 index 000000000000..9f3769212df5 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention.php @@ -0,0 +1,168 @@ +google.cloud.language.v1beta2.EntityMention + */ +class EntityMention extends \Google\Protobuf\Internal\Message +{ + /** + * The mention text. + * + * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; + */ + protected $text = null; + /** + * The type of the entity mention. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EntityMention.Type type = 2; + */ + protected $type = 0; + /** + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the sentiment expressed for this mention of + * the entity in the provided document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 3; + */ + protected $sentiment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1beta2\TextSpan $text + * The mention text. + * @type int $type + * The type of the entity mention. + * @type \Google\Cloud\Language\V1beta2\Sentiment $sentiment + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the sentiment expressed for this mention of + * the entity in the provided document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The mention text. + * + * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; + * @return \Google\Cloud\Language\V1beta2\TextSpan|null + */ + public function getText() + { + return $this->text; + } + + public function hasText() + { + return isset($this->text); + } + + public function clearText() + { + unset($this->text); + } + + /** + * The mention text. + * + * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; + * @param \Google\Cloud\Language\V1beta2\TextSpan $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\TextSpan::class); + $this->text = $var; + + return $this; + } + + /** + * The type of the entity mention. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EntityMention.Type type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the entity mention. + * + * Generated from protobuf field .google.cloud.language.v1beta2.EntityMention.Type type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EntityMention\Type::class); + $this->type = $var; + + return $this; + } + + /** + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the sentiment expressed for this mention of + * the entity in the provided document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 3; + * @return \Google\Cloud\Language\V1beta2\Sentiment|null + */ + public function getSentiment() + { + return $this->sentiment; + } + + public function hasSentiment() + { + return isset($this->sentiment); + } + + public function clearSentiment() + { + unset($this->sentiment); + } + + /** + * For calls to [AnalyzeEntitySentiment][] or if + * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to + * true, this field will contain the sentiment expressed for this mention of + * the entity in the provided document. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 3; + * @param \Google\Cloud\Language\V1beta2\Sentiment $var + * @return $this + */ + public function setSentiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Sentiment::class); + $this->sentiment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention/Type.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention/Type.php new file mode 100644 index 000000000000..75131e71c1d9 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention/Type.php @@ -0,0 +1,64 @@ +google.cloud.language.v1beta2.EntityMention.Type + */ +class Type +{ + /** + * Unknown + * + * Generated from protobuf enum TYPE_UNKNOWN = 0; + */ + const TYPE_UNKNOWN = 0; + /** + * Proper name + * + * Generated from protobuf enum PROPER = 1; + */ + const PROPER = 1; + /** + * Common noun (or noun compound) + * + * Generated from protobuf enum COMMON = 2; + */ + const COMMON = 2; + + private static $valueToName = [ + self::TYPE_UNKNOWN => 'TYPE_UNKNOWN', + self::PROPER => 'PROPER', + self::COMMON => 'COMMON', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Language\V1beta2\EntityMention_Type::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention_Type.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention_Type.php new file mode 100644 index 000000000000..1202dcaa1ec0 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention_Type.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.language.v1beta2.LanguageService/AnalyzeSentiment', + $argument, + ['\Google\Cloud\Language\V1beta2\AnalyzeSentimentResponse', 'decode'], + $metadata, $options); + } + + /** + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. + * @param \Google\Cloud\Language\V1beta2\AnalyzeEntitiesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AnalyzeEntities(\Google\Cloud\Language\V1beta2\AnalyzeEntitiesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.language.v1beta2.LanguageService/AnalyzeEntities', + $argument, + ['\Google\Cloud\Language\V1beta2\AnalyzeEntitiesResponse', 'decode'], + $metadata, $options); + } + + /** + * Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes + * sentiment associated with each entity and its mentions. + * @param \Google\Cloud\Language\V1beta2\AnalyzeEntitySentimentRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AnalyzeEntitySentiment(\Google\Cloud\Language\V1beta2\AnalyzeEntitySentimentRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.language.v1beta2.LanguageService/AnalyzeEntitySentiment', + $argument, + ['\Google\Cloud\Language\V1beta2\AnalyzeEntitySentimentResponse', 'decode'], + $metadata, $options); + } + + /** + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part of speech tags, dependency trees, and other + * properties. + * @param \Google\Cloud\Language\V1beta2\AnalyzeSyntaxRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AnalyzeSyntax(\Google\Cloud\Language\V1beta2\AnalyzeSyntaxRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.language.v1beta2.LanguageService/AnalyzeSyntax', + $argument, + ['\Google\Cloud\Language\V1beta2\AnalyzeSyntaxResponse', 'decode'], + $metadata, $options); + } + + /** + * Classifies a document into categories. + * @param \Google\Cloud\Language\V1beta2\ClassifyTextRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ClassifyText(\Google\Cloud\Language\V1beta2\ClassifyTextRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.language.v1beta2.LanguageService/ClassifyText', + $argument, + ['\Google\Cloud\Language\V1beta2\ClassifyTextResponse', 'decode'], + $metadata, $options); + } + + /** + * A convenience method that provides all syntax, sentiment, entity, and + * classification features in one call. + * @param \Google\Cloud\Language\V1beta2\AnnotateTextRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function AnnotateText(\Google\Cloud\Language\V1beta2\AnnotateTextRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.language.v1beta2.LanguageService/AnnotateText', + $argument, + ['\Google\Cloud\Language\V1beta2\AnnotateTextResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech.php new file mode 100644 index 000000000000..5c739918469e --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech.php @@ -0,0 +1,441 @@ +google.cloud.language.v1beta2.PartOfSpeech + */ +class PartOfSpeech extends \Google\Protobuf\Internal\Message +{ + /** + * The part of speech tag. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tag tag = 1; + */ + protected $tag = 0; + /** + * The grammatical aspect. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Aspect aspect = 2; + */ + protected $aspect = 0; + /** + * The grammatical case. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Case case = 3; + */ + protected $case = 0; + /** + * The grammatical form. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Form form = 4; + */ + protected $form = 0; + /** + * The grammatical gender. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Gender gender = 5; + */ + protected $gender = 0; + /** + * The grammatical mood. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Mood mood = 6; + */ + protected $mood = 0; + /** + * The grammatical number. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Number number = 7; + */ + protected $number = 0; + /** + * The grammatical person. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Person person = 8; + */ + protected $person = 0; + /** + * The grammatical properness. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Proper proper = 9; + */ + protected $proper = 0; + /** + * The grammatical reciprocity. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10; + */ + protected $reciprocity = 0; + /** + * The grammatical tense. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tense tense = 11; + */ + protected $tense = 0; + /** + * The grammatical voice. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12; + */ + protected $voice = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $tag + * The part of speech tag. + * @type int $aspect + * The grammatical aspect. + * @type int $case + * The grammatical case. + * @type int $form + * The grammatical form. + * @type int $gender + * The grammatical gender. + * @type int $mood + * The grammatical mood. + * @type int $number + * The grammatical number. + * @type int $person + * The grammatical person. + * @type int $proper + * The grammatical properness. + * @type int $reciprocity + * The grammatical reciprocity. + * @type int $tense + * The grammatical tense. + * @type int $voice + * The grammatical voice. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The part of speech tag. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tag tag = 1; + * @return int + */ + public function getTag() + { + return $this->tag; + } + + /** + * The part of speech tag. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tag tag = 1; + * @param int $var + * @return $this + */ + public function setTag($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Tag::class); + $this->tag = $var; + + return $this; + } + + /** + * The grammatical aspect. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Aspect aspect = 2; + * @return int + */ + public function getAspect() + { + return $this->aspect; + } + + /** + * The grammatical aspect. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Aspect aspect = 2; + * @param int $var + * @return $this + */ + public function setAspect($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Aspect::class); + $this->aspect = $var; + + return $this; + } + + /** + * The grammatical case. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Case case = 3; + * @return int + */ + public function getCase() + { + return $this->case; + } + + /** + * The grammatical case. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Case case = 3; + * @param int $var + * @return $this + */ + public function setCase($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\PBCase::class); + $this->case = $var; + + return $this; + } + + /** + * The grammatical form. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Form form = 4; + * @return int + */ + public function getForm() + { + return $this->form; + } + + /** + * The grammatical form. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Form form = 4; + * @param int $var + * @return $this + */ + public function setForm($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Form::class); + $this->form = $var; + + return $this; + } + + /** + * The grammatical gender. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Gender gender = 5; + * @return int + */ + public function getGender() + { + return $this->gender; + } + + /** + * The grammatical gender. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Gender gender = 5; + * @param int $var + * @return $this + */ + public function setGender($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Gender::class); + $this->gender = $var; + + return $this; + } + + /** + * The grammatical mood. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Mood mood = 6; + * @return int + */ + public function getMood() + { + return $this->mood; + } + + /** + * The grammatical mood. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Mood mood = 6; + * @param int $var + * @return $this + */ + public function setMood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Mood::class); + $this->mood = $var; + + return $this; + } + + /** + * The grammatical number. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Number number = 7; + * @return int + */ + public function getNumber() + { + return $this->number; + } + + /** + * The grammatical number. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Number number = 7; + * @param int $var + * @return $this + */ + public function setNumber($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Number::class); + $this->number = $var; + + return $this; + } + + /** + * The grammatical person. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Person person = 8; + * @return int + */ + public function getPerson() + { + return $this->person; + } + + /** + * The grammatical person. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Person person = 8; + * @param int $var + * @return $this + */ + public function setPerson($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Person::class); + $this->person = $var; + + return $this; + } + + /** + * The grammatical properness. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Proper proper = 9; + * @return int + */ + public function getProper() + { + return $this->proper; + } + + /** + * The grammatical properness. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Proper proper = 9; + * @param int $var + * @return $this + */ + public function setProper($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Proper::class); + $this->proper = $var; + + return $this; + } + + /** + * The grammatical reciprocity. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10; + * @return int + */ + public function getReciprocity() + { + return $this->reciprocity; + } + + /** + * The grammatical reciprocity. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10; + * @param int $var + * @return $this + */ + public function setReciprocity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Reciprocity::class); + $this->reciprocity = $var; + + return $this; + } + + /** + * The grammatical tense. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tense tense = 11; + * @return int + */ + public function getTense() + { + return $this->tense; + } + + /** + * The grammatical tense. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tense tense = 11; + * @param int $var + * @return $this + */ + public function setTense($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Tense::class); + $this->tense = $var; + + return $this; + } + + /** + * The grammatical voice. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12; + * @return int + */ + public function getVoice() + { + return $this->voice; + } + + /** + * The grammatical voice. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12; + * @param int $var + * @return $this + */ + public function setVoice($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Voice::class); + $this->voice = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Aspect.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Aspect.php new file mode 100644 index 000000000000..48882ba09ced --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Aspect.php @@ -0,0 +1,71 @@ +google.cloud.language.v1beta2.PartOfSpeech.Aspect + */ +class Aspect +{ + /** + * Aspect is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum ASPECT_UNKNOWN = 0; + */ + const ASPECT_UNKNOWN = 0; + /** + * Perfective + * + * Generated from protobuf enum PERFECTIVE = 1; + */ + const PERFECTIVE = 1; + /** + * Imperfective + * + * Generated from protobuf enum IMPERFECTIVE = 2; + */ + const IMPERFECTIVE = 2; + /** + * Progressive + * + * Generated from protobuf enum PROGRESSIVE = 3; + */ + const PROGRESSIVE = 3; + + private static $valueToName = [ + self::ASPECT_UNKNOWN => 'ASPECT_UNKNOWN', + self::PERFECTIVE => 'PERFECTIVE', + self::IMPERFECTIVE => 'IMPERFECTIVE', + self::PROGRESSIVE => 'PROGRESSIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Aspect::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Aspect::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Form.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Form.php new file mode 100644 index 000000000000..b3c1847352d3 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Form.php @@ -0,0 +1,130 @@ +google.cloud.language.v1beta2.PartOfSpeech.Form + */ +class Form +{ + /** + * Form is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum FORM_UNKNOWN = 0; + */ + const FORM_UNKNOWN = 0; + /** + * Adnomial + * + * Generated from protobuf enum ADNOMIAL = 1; + */ + const ADNOMIAL = 1; + /** + * Auxiliary + * + * Generated from protobuf enum AUXILIARY = 2; + */ + const AUXILIARY = 2; + /** + * Complementizer + * + * Generated from protobuf enum COMPLEMENTIZER = 3; + */ + const COMPLEMENTIZER = 3; + /** + * Final ending + * + * Generated from protobuf enum FINAL_ENDING = 4; + */ + const FINAL_ENDING = 4; + /** + * Gerund + * + * Generated from protobuf enum GERUND = 5; + */ + const GERUND = 5; + /** + * Realis + * + * Generated from protobuf enum REALIS = 6; + */ + const REALIS = 6; + /** + * Irrealis + * + * Generated from protobuf enum IRREALIS = 7; + */ + const IRREALIS = 7; + /** + * Short form + * + * Generated from protobuf enum SHORT = 8; + */ + const SHORT = 8; + /** + * Long form + * + * Generated from protobuf enum LONG = 9; + */ + const LONG = 9; + /** + * Order form + * + * Generated from protobuf enum ORDER = 10; + */ + const ORDER = 10; + /** + * Specific form + * + * Generated from protobuf enum SPECIFIC = 11; + */ + const SPECIFIC = 11; + + private static $valueToName = [ + self::FORM_UNKNOWN => 'FORM_UNKNOWN', + self::ADNOMIAL => 'ADNOMIAL', + self::AUXILIARY => 'AUXILIARY', + self::COMPLEMENTIZER => 'COMPLEMENTIZER', + self::FINAL_ENDING => 'FINAL_ENDING', + self::GERUND => 'GERUND', + self::REALIS => 'REALIS', + self::IRREALIS => 'IRREALIS', + self::SHORT => 'SHORT', + self::LONG => 'LONG', + self::ORDER => 'ORDER', + self::SPECIFIC => 'SPECIFIC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Form::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Form::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Gender.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Gender.php new file mode 100644 index 000000000000..8481abbc6b93 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Gender.php @@ -0,0 +1,71 @@ +google.cloud.language.v1beta2.PartOfSpeech.Gender + */ +class Gender +{ + /** + * Gender is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum GENDER_UNKNOWN = 0; + */ + const GENDER_UNKNOWN = 0; + /** + * Feminine + * + * Generated from protobuf enum FEMININE = 1; + */ + const FEMININE = 1; + /** + * Masculine + * + * Generated from protobuf enum MASCULINE = 2; + */ + const MASCULINE = 2; + /** + * Neuter + * + * Generated from protobuf enum NEUTER = 3; + */ + const NEUTER = 3; + + private static $valueToName = [ + self::GENDER_UNKNOWN => 'GENDER_UNKNOWN', + self::FEMININE => 'FEMININE', + self::MASCULINE => 'MASCULINE', + self::NEUTER => 'NEUTER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Gender::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Gender::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Mood.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Mood.php new file mode 100644 index 000000000000..8857bc7dcd44 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Mood.php @@ -0,0 +1,92 @@ +google.cloud.language.v1beta2.PartOfSpeech.Mood + */ +class Mood +{ + /** + * Mood is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum MOOD_UNKNOWN = 0; + */ + const MOOD_UNKNOWN = 0; + /** + * Conditional + * + * Generated from protobuf enum CONDITIONAL_MOOD = 1; + */ + const CONDITIONAL_MOOD = 1; + /** + * Imperative + * + * Generated from protobuf enum IMPERATIVE = 2; + */ + const IMPERATIVE = 2; + /** + * Indicative + * + * Generated from protobuf enum INDICATIVE = 3; + */ + const INDICATIVE = 3; + /** + * Interrogative + * + * Generated from protobuf enum INTERROGATIVE = 4; + */ + const INTERROGATIVE = 4; + /** + * Jussive + * + * Generated from protobuf enum JUSSIVE = 5; + */ + const JUSSIVE = 5; + /** + * Subjunctive + * + * Generated from protobuf enum SUBJUNCTIVE = 6; + */ + const SUBJUNCTIVE = 6; + + private static $valueToName = [ + self::MOOD_UNKNOWN => 'MOOD_UNKNOWN', + self::CONDITIONAL_MOOD => 'CONDITIONAL_MOOD', + self::IMPERATIVE => 'IMPERATIVE', + self::INDICATIVE => 'INDICATIVE', + self::INTERROGATIVE => 'INTERROGATIVE', + self::JUSSIVE => 'JUSSIVE', + self::SUBJUNCTIVE => 'SUBJUNCTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Mood::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Mood::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Number.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Number.php new file mode 100644 index 000000000000..f3c9eddeaf95 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Number.php @@ -0,0 +1,71 @@ +google.cloud.language.v1beta2.PartOfSpeech.Number + */ +class Number +{ + /** + * Number is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum NUMBER_UNKNOWN = 0; + */ + const NUMBER_UNKNOWN = 0; + /** + * Singular + * + * Generated from protobuf enum SINGULAR = 1; + */ + const SINGULAR = 1; + /** + * Plural + * + * Generated from protobuf enum PLURAL = 2; + */ + const PLURAL = 2; + /** + * Dual + * + * Generated from protobuf enum DUAL = 3; + */ + const DUAL = 3; + + private static $valueToName = [ + self::NUMBER_UNKNOWN => 'NUMBER_UNKNOWN', + self::SINGULAR => 'SINGULAR', + self::PLURAL => 'PLURAL', + self::DUAL => 'DUAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Number::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Number::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/PBCase.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/PBCase.php new file mode 100644 index 000000000000..f110d8846a1a --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/PBCase.php @@ -0,0 +1,150 @@ +google.cloud.language.v1beta2.PartOfSpeech.Case + */ +class PBCase +{ + /** + * Case is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum CASE_UNKNOWN = 0; + */ + const CASE_UNKNOWN = 0; + /** + * Accusative + * + * Generated from protobuf enum ACCUSATIVE = 1; + */ + const ACCUSATIVE = 1; + /** + * Adverbial + * + * Generated from protobuf enum ADVERBIAL = 2; + */ + const ADVERBIAL = 2; + /** + * Complementive + * + * Generated from protobuf enum COMPLEMENTIVE = 3; + */ + const COMPLEMENTIVE = 3; + /** + * Dative + * + * Generated from protobuf enum DATIVE = 4; + */ + const DATIVE = 4; + /** + * Genitive + * + * Generated from protobuf enum GENITIVE = 5; + */ + const GENITIVE = 5; + /** + * Instrumental + * + * Generated from protobuf enum INSTRUMENTAL = 6; + */ + const INSTRUMENTAL = 6; + /** + * Locative + * + * Generated from protobuf enum LOCATIVE = 7; + */ + const LOCATIVE = 7; + /** + * Nominative + * + * Generated from protobuf enum NOMINATIVE = 8; + */ + const NOMINATIVE = 8; + /** + * Oblique + * + * Generated from protobuf enum OBLIQUE = 9; + */ + const OBLIQUE = 9; + /** + * Partitive + * + * Generated from protobuf enum PARTITIVE = 10; + */ + const PARTITIVE = 10; + /** + * Prepositional + * + * Generated from protobuf enum PREPOSITIONAL = 11; + */ + const PREPOSITIONAL = 11; + /** + * Reflexive + * + * Generated from protobuf enum REFLEXIVE_CASE = 12; + */ + const REFLEXIVE_CASE = 12; + /** + * Relative + * + * Generated from protobuf enum RELATIVE_CASE = 13; + */ + const RELATIVE_CASE = 13; + /** + * Vocative + * + * Generated from protobuf enum VOCATIVE = 14; + */ + const VOCATIVE = 14; + + private static $valueToName = [ + self::CASE_UNKNOWN => 'CASE_UNKNOWN', + self::ACCUSATIVE => 'ACCUSATIVE', + self::ADVERBIAL => 'ADVERBIAL', + self::COMPLEMENTIVE => 'COMPLEMENTIVE', + self::DATIVE => 'DATIVE', + self::GENITIVE => 'GENITIVE', + self::INSTRUMENTAL => 'INSTRUMENTAL', + self::LOCATIVE => 'LOCATIVE', + self::NOMINATIVE => 'NOMINATIVE', + self::OBLIQUE => 'OBLIQUE', + self::PARTITIVE => 'PARTITIVE', + self::PREPOSITIONAL => 'PREPOSITIONAL', + self::REFLEXIVE_CASE => 'REFLEXIVE_CASE', + self::RELATIVE_CASE => 'RELATIVE_CASE', + self::VOCATIVE => 'VOCATIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PBCase::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Case::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Person.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Person.php new file mode 100644 index 000000000000..9584fd35c7ca --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Person.php @@ -0,0 +1,78 @@ +google.cloud.language.v1beta2.PartOfSpeech.Person + */ +class Person +{ + /** + * Person is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum PERSON_UNKNOWN = 0; + */ + const PERSON_UNKNOWN = 0; + /** + * First + * + * Generated from protobuf enum FIRST = 1; + */ + const FIRST = 1; + /** + * Second + * + * Generated from protobuf enum SECOND = 2; + */ + const SECOND = 2; + /** + * Third + * + * Generated from protobuf enum THIRD = 3; + */ + const THIRD = 3; + /** + * Reflexive + * + * Generated from protobuf enum REFLEXIVE_PERSON = 4; + */ + const REFLEXIVE_PERSON = 4; + + private static $valueToName = [ + self::PERSON_UNKNOWN => 'PERSON_UNKNOWN', + self::FIRST => 'FIRST', + self::SECOND => 'SECOND', + self::THIRD => 'THIRD', + self::REFLEXIVE_PERSON => 'REFLEXIVE_PERSON', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Person::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Person::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Proper.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Proper.php new file mode 100644 index 000000000000..d71aded410d6 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Proper.php @@ -0,0 +1,64 @@ +google.cloud.language.v1beta2.PartOfSpeech.Proper + */ +class Proper +{ + /** + * Proper is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum PROPER_UNKNOWN = 0; + */ + const PROPER_UNKNOWN = 0; + /** + * Proper + * + * Generated from protobuf enum PROPER = 1; + */ + const PROPER = 1; + /** + * Not proper + * + * Generated from protobuf enum NOT_PROPER = 2; + */ + const NOT_PROPER = 2; + + private static $valueToName = [ + self::PROPER_UNKNOWN => 'PROPER_UNKNOWN', + self::PROPER => 'PROPER', + self::NOT_PROPER => 'NOT_PROPER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Proper::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Proper::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Reciprocity.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Reciprocity.php new file mode 100644 index 000000000000..aae22e4dd765 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Reciprocity.php @@ -0,0 +1,65 @@ +google.cloud.language.v1beta2.PartOfSpeech.Reciprocity + */ +class Reciprocity +{ + /** + * Reciprocity is not applicable in the analyzed language or is not + * predicted. + * + * Generated from protobuf enum RECIPROCITY_UNKNOWN = 0; + */ + const RECIPROCITY_UNKNOWN = 0; + /** + * Reciprocal + * + * Generated from protobuf enum RECIPROCAL = 1; + */ + const RECIPROCAL = 1; + /** + * Non-reciprocal + * + * Generated from protobuf enum NON_RECIPROCAL = 2; + */ + const NON_RECIPROCAL = 2; + + private static $valueToName = [ + self::RECIPROCITY_UNKNOWN => 'RECIPROCITY_UNKNOWN', + self::RECIPROCAL => 'RECIPROCAL', + self::NON_RECIPROCAL => 'NON_RECIPROCAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Reciprocity::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Reciprocity::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tag.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tag.php new file mode 100644 index 000000000000..0fb0d7e7e813 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tag.php @@ -0,0 +1,141 @@ +google.cloud.language.v1beta2.PartOfSpeech.Tag + */ +class Tag +{ + /** + * Unknown + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * Adjective + * + * Generated from protobuf enum ADJ = 1; + */ + const ADJ = 1; + /** + * Adposition (preposition and postposition) + * + * Generated from protobuf enum ADP = 2; + */ + const ADP = 2; + /** + * Adverb + * + * Generated from protobuf enum ADV = 3; + */ + const ADV = 3; + /** + * Conjunction + * + * Generated from protobuf enum CONJ = 4; + */ + const CONJ = 4; + /** + * Determiner + * + * Generated from protobuf enum DET = 5; + */ + const DET = 5; + /** + * Noun (common and proper) + * + * Generated from protobuf enum NOUN = 6; + */ + const NOUN = 6; + /** + * Cardinal number + * + * Generated from protobuf enum NUM = 7; + */ + const NUM = 7; + /** + * Pronoun + * + * Generated from protobuf enum PRON = 8; + */ + const PRON = 8; + /** + * Particle or other function word + * + * Generated from protobuf enum PRT = 9; + */ + const PRT = 9; + /** + * Punctuation + * + * Generated from protobuf enum PUNCT = 10; + */ + const PUNCT = 10; + /** + * Verb (all tenses and modes) + * + * Generated from protobuf enum VERB = 11; + */ + const VERB = 11; + /** + * Other: foreign words, typos, abbreviations + * + * Generated from protobuf enum X = 12; + */ + const X = 12; + /** + * Affix + * + * Generated from protobuf enum AFFIX = 13; + */ + const AFFIX = 13; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::ADJ => 'ADJ', + self::ADP => 'ADP', + self::ADV => 'ADV', + self::CONJ => 'CONJ', + self::DET => 'DET', + self::NOUN => 'NOUN', + self::NUM => 'NUM', + self::PRON => 'PRON', + self::PRT => 'PRT', + self::PUNCT => 'PUNCT', + self::VERB => 'VERB', + self::X => 'X', + self::AFFIX => 'AFFIX', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Tag::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Tag::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tense.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tense.php new file mode 100644 index 000000000000..e9e4e2000ad0 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tense.php @@ -0,0 +1,92 @@ +google.cloud.language.v1beta2.PartOfSpeech.Tense + */ +class Tense +{ + /** + * Tense is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum TENSE_UNKNOWN = 0; + */ + const TENSE_UNKNOWN = 0; + /** + * Conditional + * + * Generated from protobuf enum CONDITIONAL_TENSE = 1; + */ + const CONDITIONAL_TENSE = 1; + /** + * Future + * + * Generated from protobuf enum FUTURE = 2; + */ + const FUTURE = 2; + /** + * Past + * + * Generated from protobuf enum PAST = 3; + */ + const PAST = 3; + /** + * Present + * + * Generated from protobuf enum PRESENT = 4; + */ + const PRESENT = 4; + /** + * Imperfect + * + * Generated from protobuf enum IMPERFECT = 5; + */ + const IMPERFECT = 5; + /** + * Pluperfect + * + * Generated from protobuf enum PLUPERFECT = 6; + */ + const PLUPERFECT = 6; + + private static $valueToName = [ + self::TENSE_UNKNOWN => 'TENSE_UNKNOWN', + self::CONDITIONAL_TENSE => 'CONDITIONAL_TENSE', + self::FUTURE => 'FUTURE', + self::PAST => 'PAST', + self::PRESENT => 'PRESENT', + self::IMPERFECT => 'IMPERFECT', + self::PLUPERFECT => 'PLUPERFECT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Tense::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Tense::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Voice.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Voice.php new file mode 100644 index 000000000000..b1cfd65aeaa9 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Voice.php @@ -0,0 +1,72 @@ +google.cloud.language.v1beta2.PartOfSpeech.Voice + */ +class Voice +{ + /** + * Voice is not applicable in the analyzed language or is not predicted. + * + * Generated from protobuf enum VOICE_UNKNOWN = 0; + */ + const VOICE_UNKNOWN = 0; + /** + * Active + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Causative + * + * Generated from protobuf enum CAUSATIVE = 2; + */ + const CAUSATIVE = 2; + /** + * Passive + * + * Generated from protobuf enum PASSIVE = 3; + */ + const PASSIVE = 3; + + private static $valueToName = [ + self::VOICE_UNKNOWN => 'VOICE_UNKNOWN', + self::ACTIVE => 'ACTIVE', + self::CAUSATIVE => 'CAUSATIVE', + self::PASSIVE => 'PASSIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Voice::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Voice::class); + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Aspect.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Aspect.php new file mode 100644 index 000000000000..15059e3520b9 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Aspect.php @@ -0,0 +1,16 @@ +google.cloud.language.v1beta2.Sentence + */ +class Sentence extends \Google\Protobuf\Internal\Message +{ + /** + * The sentence text. + * + * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; + */ + protected $text = null; + /** + * For calls to [AnalyzeSentiment][] or if + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to + * true, this field will contain the sentiment for the sentence. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 2; + */ + protected $sentiment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1beta2\TextSpan $text + * The sentence text. + * @type \Google\Cloud\Language\V1beta2\Sentiment $sentiment + * For calls to [AnalyzeSentiment][] or if + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to + * true, this field will contain the sentiment for the sentence. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The sentence text. + * + * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; + * @return \Google\Cloud\Language\V1beta2\TextSpan|null + */ + public function getText() + { + return $this->text; + } + + public function hasText() + { + return isset($this->text); + } + + public function clearText() + { + unset($this->text); + } + + /** + * The sentence text. + * + * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; + * @param \Google\Cloud\Language\V1beta2\TextSpan $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\TextSpan::class); + $this->text = $var; + + return $this; + } + + /** + * For calls to [AnalyzeSentiment][] or if + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to + * true, this field will contain the sentiment for the sentence. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 2; + * @return \Google\Cloud\Language\V1beta2\Sentiment|null + */ + public function getSentiment() + { + return $this->sentiment; + } + + public function hasSentiment() + { + return isset($this->sentiment); + } + + public function clearSentiment() + { + unset($this->sentiment); + } + + /** + * For calls to [AnalyzeSentiment][] or if + * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to + * true, this field will contain the sentiment for the sentence. + * + * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 2; + * @param \Google\Cloud\Language\V1beta2\Sentiment $var + * @return $this + */ + public function setSentiment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Sentiment::class); + $this->sentiment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentiment.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentiment.php new file mode 100644 index 000000000000..5dd926e6ae2d --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentiment.php @@ -0,0 +1,115 @@ +google.cloud.language.v1beta2.Sentiment + */ +class Sentiment extends \Google\Protobuf\Internal\Message +{ + /** + * A non-negative number in the [0, +inf) range, which represents + * the absolute magnitude of sentiment regardless of score (positive or + * negative). + * + * Generated from protobuf field float magnitude = 2; + */ + protected $magnitude = 0.0; + /** + * Sentiment score between -1.0 (negative sentiment) and 1.0 + * (positive sentiment). + * + * Generated from protobuf field float score = 3; + */ + protected $score = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $magnitude + * A non-negative number in the [0, +inf) range, which represents + * the absolute magnitude of sentiment regardless of score (positive or + * negative). + * @type float $score + * Sentiment score between -1.0 (negative sentiment) and 1.0 + * (positive sentiment). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * A non-negative number in the [0, +inf) range, which represents + * the absolute magnitude of sentiment regardless of score (positive or + * negative). + * + * Generated from protobuf field float magnitude = 2; + * @return float + */ + public function getMagnitude() + { + return $this->magnitude; + } + + /** + * A non-negative number in the [0, +inf) range, which represents + * the absolute magnitude of sentiment regardless of score (positive or + * negative). + * + * Generated from protobuf field float magnitude = 2; + * @param float $var + * @return $this + */ + public function setMagnitude($var) + { + GPBUtil::checkFloat($var); + $this->magnitude = $var; + + return $this; + } + + /** + * Sentiment score between -1.0 (negative sentiment) and 1.0 + * (positive sentiment). + * + * Generated from protobuf field float score = 3; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Sentiment score between -1.0 (negative sentiment) and 1.0 + * (positive sentiment). + * + * Generated from protobuf field float score = 3; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/TextSpan.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/TextSpan.php new file mode 100644 index 000000000000..6e2c1de1b691 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/TextSpan.php @@ -0,0 +1,105 @@ +google.cloud.language.v1beta2.TextSpan + */ +class TextSpan extends \Google\Protobuf\Internal\Message +{ + /** + * The content of the output text. + * + * Generated from protobuf field string content = 1; + */ + protected $content = ''; + /** + * The API calculates the beginning offset of the content in the original + * document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request. + * + * Generated from protobuf field int32 begin_offset = 2; + */ + protected $begin_offset = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content + * The content of the output text. + * @type int $begin_offset + * The API calculates the beginning offset of the content in the original + * document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The content of the output text. + * + * Generated from protobuf field string content = 1; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * The content of the output text. + * + * 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 API calculates the beginning offset of the content in the original + * document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request. + * + * Generated from protobuf field int32 begin_offset = 2; + * @return int + */ + public function getBeginOffset() + { + return $this->begin_offset; + } + + /** + * The API calculates the beginning offset of the content in the original + * document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request. + * + * Generated from protobuf field int32 begin_offset = 2; + * @param int $var + * @return $this + */ + public function setBeginOffset($var) + { + GPBUtil::checkInt32($var); + $this->begin_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Token.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Token.php new file mode 100644 index 000000000000..f441782ad3a0 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Token.php @@ -0,0 +1,199 @@ +google.cloud.language.v1beta2.Token + */ +class Token extends \Google\Protobuf\Internal\Message +{ + /** + * The token text. + * + * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; + */ + protected $text = null; + /** + * Parts of speech tag for this token. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech part_of_speech = 2; + */ + protected $part_of_speech = null; + /** + * Dependency tree parse for this token. + * + * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge dependency_edge = 3; + */ + protected $dependency_edge = null; + /** + * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + * + * Generated from protobuf field string lemma = 4; + */ + protected $lemma = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Language\V1beta2\TextSpan $text + * The token text. + * @type \Google\Cloud\Language\V1beta2\PartOfSpeech $part_of_speech + * Parts of speech tag for this token. + * @type \Google\Cloud\Language\V1beta2\DependencyEdge $dependency_edge + * Dependency tree parse for this token. + * @type string $lemma + * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The token text. + * + * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; + * @return \Google\Cloud\Language\V1beta2\TextSpan|null + */ + public function getText() + { + return $this->text; + } + + public function hasText() + { + return isset($this->text); + } + + public function clearText() + { + unset($this->text); + } + + /** + * The token text. + * + * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; + * @param \Google\Cloud\Language\V1beta2\TextSpan $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\TextSpan::class); + $this->text = $var; + + return $this; + } + + /** + * Parts of speech tag for this token. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech part_of_speech = 2; + * @return \Google\Cloud\Language\V1beta2\PartOfSpeech|null + */ + public function getPartOfSpeech() + { + return $this->part_of_speech; + } + + public function hasPartOfSpeech() + { + return isset($this->part_of_speech); + } + + public function clearPartOfSpeech() + { + unset($this->part_of_speech); + } + + /** + * Parts of speech tag for this token. + * + * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech part_of_speech = 2; + * @param \Google\Cloud\Language\V1beta2\PartOfSpeech $var + * @return $this + */ + public function setPartOfSpeech($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\PartOfSpeech::class); + $this->part_of_speech = $var; + + return $this; + } + + /** + * Dependency tree parse for this token. + * + * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge dependency_edge = 3; + * @return \Google\Cloud\Language\V1beta2\DependencyEdge|null + */ + public function getDependencyEdge() + { + return $this->dependency_edge; + } + + public function hasDependencyEdge() + { + return isset($this->dependency_edge); + } + + public function clearDependencyEdge() + { + unset($this->dependency_edge); + } + + /** + * Dependency tree parse for this token. + * + * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge dependency_edge = 3; + * @param \Google\Cloud\Language\V1beta2\DependencyEdge $var + * @return $this + */ + public function setDependencyEdge($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\DependencyEdge::class); + $this->dependency_edge = $var; + + return $this; + } + + /** + * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + * + * Generated from protobuf field string lemma = 4; + * @return string + */ + public function getLemma() + { + return $this->lemma; + } + + /** + * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + * + * Generated from protobuf field string lemma = 4; + * @param string $var + * @return $this + */ + public function setLemma($var) + { + GPBUtil::checkString($var, True); + $this->lemma = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entities.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entities.php new file mode 100644 index 000000000000..f73a7447b62f --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entities.php @@ -0,0 +1,59 @@ +analyzeEntities($document); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END language_v1beta2_generated_LanguageService_AnalyzeEntities_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entity_sentiment.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entity_sentiment.php new file mode 100644 index 000000000000..29b7cea16c02 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entity_sentiment.php @@ -0,0 +1,58 @@ +analyzeEntitySentiment($document); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END language_v1beta2_generated_LanguageService_AnalyzeEntitySentiment_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_sentiment.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_sentiment.php new file mode 100644 index 000000000000..1977653f913d --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_sentiment.php @@ -0,0 +1,57 @@ +analyzeSentiment($document); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END language_v1beta2_generated_LanguageService_AnalyzeSentiment_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_syntax.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_syntax.php new file mode 100644 index 000000000000..b4e09eace78d --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_syntax.php @@ -0,0 +1,59 @@ +analyzeSyntax($document); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END language_v1beta2_generated_LanguageService_AnalyzeSyntax_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/annotate_text.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/annotate_text.php new file mode 100644 index 000000000000..b38967b84fce --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/annotate_text.php @@ -0,0 +1,60 @@ +annotateText($document, $features); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END language_v1beta2_generated_LanguageService_AnnotateText_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/classify_text.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/classify_text.php new file mode 100644 index 000000000000..7b7b8c8957d2 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/classify_text.php @@ -0,0 +1,57 @@ +classifyText($document); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END language_v1beta2_generated_LanguageService_ClassifyText_sync] diff --git a/owl-bot-staging/Language/v1beta2/src/V1beta2/Gapic/LanguageServiceGapicClient.php b/owl-bot-staging/Language/v1beta2/src/V1beta2/Gapic/LanguageServiceGapicClient.php new file mode 100644 index 000000000000..eea191f93593 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/src/V1beta2/Gapic/LanguageServiceGapicClient.php @@ -0,0 +1,447 @@ +analyzeEntities($document); + * } finally { + * $languageServiceClient->close(); + * } + * ``` + * + * @experimental + */ +class LanguageServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.language.v1beta2.LanguageService'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'language.googleapis.com'; + + /** 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-language', + '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/language_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/language_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/language_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/language_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 'language.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); + } + + /** + * Finds named entities (currently proper names and common nouns) in the text + * along with entity types, salience, mentions for each entity, and + * other properties. + * + * Sample code: + * ``` + * $languageServiceClient = new LanguageServiceClient(); + * try { + * $document = new Document(); + * $response = $languageServiceClient->analyzeEntities($document); + * } finally { + * $languageServiceClient->close(); + * } + * ``` + * + * @param Document $document Required. Input document. + * @param array $optionalArgs { + * Optional. + * + * @type int $encodingType + * The encoding type used by the API to calculate offsets. + * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1beta2\EncodingType} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Language\V1beta2\AnalyzeEntitiesResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function analyzeEntities($document, array $optionalArgs = []) + { + $request = new AnalyzeEntitiesRequest(); + $request->setDocument($document); + if (isset($optionalArgs['encodingType'])) { + $request->setEncodingType($optionalArgs['encodingType']); + } + + return $this->startCall('AnalyzeEntities', AnalyzeEntitiesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes + * sentiment associated with each entity and its mentions. + * + * Sample code: + * ``` + * $languageServiceClient = new LanguageServiceClient(); + * try { + * $document = new Document(); + * $response = $languageServiceClient->analyzeEntitySentiment($document); + * } finally { + * $languageServiceClient->close(); + * } + * ``` + * + * @param Document $document Required. Input document. + * @param array $optionalArgs { + * Optional. + * + * @type int $encodingType + * The encoding type used by the API to calculate offsets. + * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1beta2\EncodingType} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Language\V1beta2\AnalyzeEntitySentimentResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function analyzeEntitySentiment($document, array $optionalArgs = []) + { + $request = new AnalyzeEntitySentimentRequest(); + $request->setDocument($document); + if (isset($optionalArgs['encodingType'])) { + $request->setEncodingType($optionalArgs['encodingType']); + } + + return $this->startCall('AnalyzeEntitySentiment', AnalyzeEntitySentimentResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Analyzes the sentiment of the provided text. + * + * Sample code: + * ``` + * $languageServiceClient = new LanguageServiceClient(); + * try { + * $document = new Document(); + * $response = $languageServiceClient->analyzeSentiment($document); + * } finally { + * $languageServiceClient->close(); + * } + * ``` + * + * @param Document $document Required. Input document. + * @param array $optionalArgs { + * Optional. + * + * @type int $encodingType + * The encoding type used by the API to calculate sentence offsets for the + * sentence sentiment. + * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1beta2\EncodingType} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Language\V1beta2\AnalyzeSentimentResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function analyzeSentiment($document, array $optionalArgs = []) + { + $request = new AnalyzeSentimentRequest(); + $request->setDocument($document); + if (isset($optionalArgs['encodingType'])) { + $request->setEncodingType($optionalArgs['encodingType']); + } + + return $this->startCall('AnalyzeSentiment', AnalyzeSentimentResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Analyzes the syntax of the text and provides sentence boundaries and + * tokenization along with part of speech tags, dependency trees, and other + * properties. + * + * Sample code: + * ``` + * $languageServiceClient = new LanguageServiceClient(); + * try { + * $document = new Document(); + * $response = $languageServiceClient->analyzeSyntax($document); + * } finally { + * $languageServiceClient->close(); + * } + * ``` + * + * @param Document $document Required. Input document. + * @param array $optionalArgs { + * Optional. + * + * @type int $encodingType + * The encoding type used by the API to calculate offsets. + * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1beta2\EncodingType} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Language\V1beta2\AnalyzeSyntaxResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function analyzeSyntax($document, array $optionalArgs = []) + { + $request = new AnalyzeSyntaxRequest(); + $request->setDocument($document); + if (isset($optionalArgs['encodingType'])) { + $request->setEncodingType($optionalArgs['encodingType']); + } + + return $this->startCall('AnalyzeSyntax', AnalyzeSyntaxResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * A convenience method that provides all syntax, sentiment, entity, and + * classification features in one call. + * + * Sample code: + * ``` + * $languageServiceClient = new LanguageServiceClient(); + * try { + * $document = new Document(); + * $features = new Features(); + * $response = $languageServiceClient->annotateText($document, $features); + * } finally { + * $languageServiceClient->close(); + * } + * ``` + * + * @param Document $document Required. Input document. + * @param Features $features Required. The enabled features. + * @param array $optionalArgs { + * Optional. + * + * @type int $encodingType + * The encoding type used by the API to calculate offsets. + * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1beta2\EncodingType} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Language\V1beta2\AnnotateTextResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function annotateText($document, $features, array $optionalArgs = []) + { + $request = new AnnotateTextRequest(); + $request->setDocument($document); + $request->setFeatures($features); + if (isset($optionalArgs['encodingType'])) { + $request->setEncodingType($optionalArgs['encodingType']); + } + + return $this->startCall('AnnotateText', AnnotateTextResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Classifies a document into categories. + * + * Sample code: + * ``` + * $languageServiceClient = new LanguageServiceClient(); + * try { + * $document = new Document(); + * $response = $languageServiceClient->classifyText($document); + * } finally { + * $languageServiceClient->close(); + * } + * ``` + * + * @param Document $document Required. Input document. + * @param array $optionalArgs { + * Optional. + * + * @type ClassificationModelOptions $classificationModelOptions + * Model options to use for classification. Defaults to v1 options if not + * specified. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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\Language\V1beta2\ClassifyTextResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function classifyText($document, array $optionalArgs = []) + { + $request = new ClassifyTextRequest(); + $request->setDocument($document); + if (isset($optionalArgs['classificationModelOptions'])) { + $request->setClassificationModelOptions($optionalArgs['classificationModelOptions']); + } + + return $this->startCall('ClassifyText', ClassifyTextResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Language/v1beta2/src/V1beta2/LanguageServiceClient.php b/owl-bot-staging/Language/v1beta2/src/V1beta2/LanguageServiceClient.php new file mode 100644 index 000000000000..de60107ce0f9 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/src/V1beta2/LanguageServiceClient.php @@ -0,0 +1,36 @@ + [ + 'google.cloud.language.v1beta2.LanguageService' => [], + ], +]; diff --git a/owl-bot-staging/Language/v1beta2/src/V1beta2/resources/language_service_rest_client_config.php b/owl-bot-staging/Language/v1beta2/src/V1beta2/resources/language_service_rest_client_config.php new file mode 100644 index 000000000000..dd8a7e56d036 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/src/V1beta2/resources/language_service_rest_client_config.php @@ -0,0 +1,39 @@ + [ + 'google.cloud.language.v1beta2.LanguageService' => [ + 'AnalyzeEntities' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta2/documents:analyzeEntities', + 'body' => '*', + ], + 'AnalyzeEntitySentiment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta2/documents:analyzeEntitySentiment', + 'body' => '*', + ], + 'AnalyzeSentiment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta2/documents:analyzeSentiment', + 'body' => '*', + ], + 'AnalyzeSyntax' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta2/documents:analyzeSyntax', + 'body' => '*', + ], + 'AnnotateText' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta2/documents:annotateText', + 'body' => '*', + ], + 'ClassifyText' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta2/documents:classifyText', + 'body' => '*', + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Language/v1beta2/tests/Unit/V1beta2/LanguageServiceClientTest.php b/owl-bot-staging/Language/v1beta2/tests/Unit/V1beta2/LanguageServiceClientTest.php new file mode 100644 index 000000000000..9def42fac620 --- /dev/null +++ b/owl-bot-staging/Language/v1beta2/tests/Unit/V1beta2/LanguageServiceClientTest.php @@ -0,0 +1,430 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return LanguageServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new LanguageServiceClient($options); + } + + /** @test */ + public function analyzeEntitiesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $language = 'language-1613589672'; + $expectedResponse = new AnalyzeEntitiesResponse(); + $expectedResponse->setLanguage($language); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $response = $gapicClient->analyzeEntities($document); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.language.v1beta2.LanguageService/AnalyzeEntities', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function analyzeEntitiesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + try { + $gapicClient->analyzeEntities($document); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function analyzeEntitySentimentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $language = 'language-1613589672'; + $expectedResponse = new AnalyzeEntitySentimentResponse(); + $expectedResponse->setLanguage($language); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $response = $gapicClient->analyzeEntitySentiment($document); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.language.v1beta2.LanguageService/AnalyzeEntitySentiment', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function analyzeEntitySentimentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + try { + $gapicClient->analyzeEntitySentiment($document); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function analyzeSentimentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $language = 'language-1613589672'; + $expectedResponse = new AnalyzeSentimentResponse(); + $expectedResponse->setLanguage($language); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $response = $gapicClient->analyzeSentiment($document); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.language.v1beta2.LanguageService/AnalyzeSentiment', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function analyzeSentimentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + try { + $gapicClient->analyzeSentiment($document); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function analyzeSyntaxTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $language = 'language-1613589672'; + $expectedResponse = new AnalyzeSyntaxResponse(); + $expectedResponse->setLanguage($language); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $response = $gapicClient->analyzeSyntax($document); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.language.v1beta2.LanguageService/AnalyzeSyntax', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function analyzeSyntaxExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + try { + $gapicClient->analyzeSyntax($document); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function annotateTextTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $language = 'language-1613589672'; + $expectedResponse = new AnnotateTextResponse(); + $expectedResponse->setLanguage($language); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $features = new Features(); + $response = $gapicClient->annotateText($document, $features); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.language.v1beta2.LanguageService/AnnotateText', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $actualValue = $actualRequestObject->getFeatures(); + $this->assertProtobufEquals($features, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function annotateTextExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + $features = new Features(); + try { + $gapicClient->annotateText($document, $features); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function classifyTextTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ClassifyTextResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $response = $gapicClient->classifyText($document); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.language.v1beta2.LanguageService/ClassifyText', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function classifyTextExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + try { + $gapicClient->classifyText($document); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} From 16a960af0f0dcd7537a8ada942b4fc0895f8973f Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 5 Jan 2023 21:16:26 +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 --- .../resources/domains_rest_client_config.php | 1 + .../resources/domains_rest_client_config.php | 1 + ...error_group_service_rest_client_config.php | 1 + ...error_stats_service_rest_client_config.php | 1 + ...port_errors_service_rest_client_config.php | 1 + ...al_contacts_service_rest_client_config.php | 1 + .../resources/eventarc_rest_client_config.php | 1 + .../publisher_rest_client_config.php | 1 + ...d_filestore_manager_rest_client_config.php | 1 + .../firestore_admin_rest_client_config.php | 1 + .../firestore_rest_client_config.php | 1 + ...d_functions_service_rest_client_config.php | 1 + .../function_service_rest_client_config.php | 1 + .../g_suite_add_ons_rest_client_config.php | 1 + ...er_clusters_service_rest_client_config.php | 1 + ...ver_configs_service_rest_client_config.php | 1 + ...deployments_service_rest_client_config.php | 1 + .../realms_service_rest_client_config.php | 1 + .../backup_for_gke_rest_client_config.php | 1 + ..._membership_service_rest_client_config.php | 1 + .../resources/grafeas_rest_client_config.php | 1 + .../resources/policies_rest_client_config.php | 1 + .../iam_credentials_rest_client_config.php | 1 + ...proxy_admin_service_rest_client_config.php | 1 + ...roxy_o_auth_service_rest_client_config.php | 1 + .../V1/resources/ids_rest_client_config.php | 1 + .../device_manager_rest_client_config.php | 1 + .../ekm_service_rest_client_config.php | 1 + ..._management_service_rest_client_config.php | 1 + .../language_service_rest_client_config.php | 1 + .../language_service_rest_client_config.php | 1 + .../Google/Cloud/Domains/V1Alpha2/Domains.php | Bin 13231 -> 0 bytes .../Domains/V1alpha2/AuthorizationCode.php | 71 - .../ConfigureContactSettingsRequest.php | 239 -- .../V1alpha2/ConfigureDnsSettingsRequest.php | 221 -- .../ConfigureManagementSettingsRequest.php | 167 -- .../Cloud/Domains/V1alpha2/ContactNotice.php | 55 - .../Cloud/Domains/V1alpha2/ContactPrivacy.php | 81 - .../Domains/V1alpha2/ContactSettings.php | 222 -- .../V1alpha2/ContactSettings/Contact.php | 190 -- .../V1alpha2/ContactSettings_Contact.php | 16 - .../V1alpha2/DeleteRegistrationRequest.php | 71 - .../Cloud/Domains/V1alpha2/DnsSettings.php | 146 - .../V1alpha2/DnsSettings/CustomDns.php | 120 - .../Domains/V1alpha2/DnsSettings/DsRecord.php | 174 -- .../DnsSettings/DsRecord/Algorithm.php | 170 -- .../DnsSettings/DsRecord/DigestType.php | 79 - .../Domains/V1alpha2/DnsSettings/DsState.php | 68 - .../V1alpha2/DnsSettings/GlueRecord.php | 159 - .../V1alpha2/DnsSettings/GoogleDomainsDns.php | 165 -- .../V1alpha2/DnsSettings_CustomDns.php | 16 - .../Domains/V1alpha2/DnsSettings_DsRecord.php | 16 - .../DnsSettings_DsRecord_Algorithm.php | 16 - .../DnsSettings_DsRecord_DigestType.php | 16 - .../Domains/V1alpha2/DnsSettings_DsState.php | 16 - .../V1alpha2/DnsSettings_GlueRecord.php | 16 - .../V1alpha2/DnsSettings_GoogleDomainsDns.php | 16 - .../Cloud/Domains/V1alpha2/DomainNotice.php | 58 - .../Domains/V1alpha2/DomainsGrpcClient.php | 341 --- .../V1alpha2/ExportRegistrationRequest.php | 71 - .../V1alpha2/GetRegistrationRequest.php | 71 - .../V1alpha2/ListRegistrationsRequest.php | 225 -- .../V1alpha2/ListRegistrationsResponse.php | 105 - .../Domains/V1alpha2/ManagementSettings.php | 101 - .../ManagementSettings/RenewalMethod.php | 70 - .../ManagementSettings_RenewalMethod.php | 16 - .../Domains/V1alpha2/OperationMetadata.php | 257 -- .../V1alpha2/RegisterDomainRequest.php | 289 -- .../Domains/V1alpha2/RegisterParameters.php | 221 -- .../RegisterParameters/Availability.php | 81 - .../RegisterParameters_Availability.php | 16 - .../Cloud/Domains/V1alpha2/Registration.php | 573 ---- .../Domains/V1alpha2/Registration/Issue.php | 71 - .../Domains/V1alpha2/Registration/State.php | 108 - .../Domains/V1alpha2/Registration_Issue.php | 16 - .../Domains/V1alpha2/Registration_State.php | 16 - .../ResetAuthorizationCodeRequest.php | 71 - .../RetrieveAuthorizationCodeRequest.php | 71 - .../RetrieveRegisterParametersRequest.php | 101 - .../RetrieveRegisterParametersResponse.php | 77 - .../RetrieveTransferParametersRequest.php | 101 - .../RetrieveTransferParametersResponse.php | 77 - .../Domains/V1alpha2/SearchDomainsRequest.php | 101 - .../V1alpha2/SearchDomainsResponse.php | 67 - .../V1alpha2/TransferDomainRequest.php | 311 -- .../Domains/V1alpha2/TransferLockState.php | 61 - .../Domains/V1alpha2/TransferParameters.php | 255 -- .../V1alpha2/UpdateRegistrationRequest.php | 129 - .../configure_contact_settings.php | 88 - .../DomainsClient/configure_dns_settings.php | 87 - .../configure_management_settings.php | 87 - .../DomainsClient/delete_registration.php | 94 - .../DomainsClient/export_registration.php | 87 - .../DomainsClient/get_registration.php | 67 - .../DomainsClient/list_registrations.php | 72 - .../DomainsClient/register_domain.php | 160 - .../reset_authorization_code.php | 74 - .../retrieve_authorization_code.php | 75 - .../retrieve_register_parameters.php | 69 - .../retrieve_transfer_parameters.php | 73 - .../V1alpha2/DomainsClient/search_domains.php | 72 - .../DomainsClient/transfer_domain.php | 168 -- .../DomainsClient/update_registration.php | 74 - .../v1alpha2/src/V1alpha2/DomainsClient.php | 36 - .../src/V1alpha2/Gapic/DomainsGapicClient.php | 1473 ---------- .../v1alpha2/src/V1alpha2/gapic_metadata.json | 93 - .../resources/domains_client_config.json | 119 - .../resources/domains_descriptor_config.php | 98 - .../resources/domains_rest_client_config.php | 271 -- .../tests/Unit/V1alpha2/DomainsClientTest.php | 1625 ----------- .../Google/Cloud/Domains/V1Beta1/Domains.php | Bin 13146 -> 0 bytes .../Domains/V1beta1/AuthorizationCode.php | 71 - .../ConfigureContactSettingsRequest.php | 239 -- .../V1beta1/ConfigureDnsSettingsRequest.php | 221 -- .../ConfigureManagementSettingsRequest.php | 167 -- .../Cloud/Domains/V1beta1/ContactNotice.php | 55 - .../Cloud/Domains/V1beta1/ContactPrivacy.php | 81 - .../Cloud/Domains/V1beta1/ContactSettings.php | 222 -- .../V1beta1/ContactSettings/Contact.php | 190 -- .../V1beta1/ContactSettings_Contact.php | 16 - .../V1beta1/DeleteRegistrationRequest.php | 71 - .../Cloud/Domains/V1beta1/DnsSettings.php | 146 - .../Domains/V1beta1/DnsSettings/CustomDns.php | 120 - .../Domains/V1beta1/DnsSettings/DsRecord.php | 174 -- .../DnsSettings/DsRecord/Algorithm.php | 170 -- .../DnsSettings/DsRecord/DigestType.php | 79 - .../Domains/V1beta1/DnsSettings/DsState.php | 68 - .../V1beta1/DnsSettings/GlueRecord.php | 159 - .../V1beta1/DnsSettings/GoogleDomainsDns.php | 165 -- .../Domains/V1beta1/DnsSettings_CustomDns.php | 16 - .../Domains/V1beta1/DnsSettings_DsRecord.php | 16 - .../DnsSettings_DsRecord_Algorithm.php | 16 - .../DnsSettings_DsRecord_DigestType.php | 16 - .../Domains/V1beta1/DnsSettings_DsState.php | 16 - .../V1beta1/DnsSettings_GlueRecord.php | 16 - .../V1beta1/DnsSettings_GoogleDomainsDns.php | 16 - .../Cloud/Domains/V1beta1/DomainNotice.php | 58 - .../Domains/V1beta1/DomainsGrpcClient.php | 341 --- .../V1beta1/ExportRegistrationRequest.php | 71 - .../V1beta1/GetRegistrationRequest.php | 71 - .../V1beta1/ListRegistrationsRequest.php | 225 -- .../V1beta1/ListRegistrationsResponse.php | 105 - .../Domains/V1beta1/ManagementSettings.php | 101 - .../ManagementSettings/RenewalMethod.php | 70 - .../ManagementSettings_RenewalMethod.php | 16 - .../Domains/V1beta1/OperationMetadata.php | 257 -- .../Domains/V1beta1/RegisterDomainRequest.php | 289 -- .../Domains/V1beta1/RegisterParameters.php | 221 -- .../RegisterParameters/Availability.php | 81 - .../RegisterParameters_Availability.php | 16 - .../Cloud/Domains/V1beta1/Registration.php | 573 ---- .../Domains/V1beta1/Registration/Issue.php | 71 - .../Domains/V1beta1/Registration/State.php | 108 - .../Domains/V1beta1/Registration_Issue.php | 16 - .../Domains/V1beta1/Registration_State.php | 16 - .../V1beta1/ResetAuthorizationCodeRequest.php | 71 - .../RetrieveAuthorizationCodeRequest.php | 71 - .../RetrieveRegisterParametersRequest.php | 101 - .../RetrieveRegisterParametersResponse.php | 77 - .../RetrieveTransferParametersRequest.php | 101 - .../RetrieveTransferParametersResponse.php | 77 - .../Domains/V1beta1/SearchDomainsRequest.php | 101 - .../Domains/V1beta1/SearchDomainsResponse.php | 67 - .../Domains/V1beta1/TransferDomainRequest.php | 311 -- .../Domains/V1beta1/TransferLockState.php | 61 - .../Domains/V1beta1/TransferParameters.php | 255 -- .../V1beta1/UpdateRegistrationRequest.php | 129 - .../configure_contact_settings.php | 88 - .../DomainsClient/configure_dns_settings.php | 87 - .../configure_management_settings.php | 87 - .../DomainsClient/delete_registration.php | 94 - .../DomainsClient/export_registration.php | 87 - .../DomainsClient/get_registration.php | 67 - .../DomainsClient/list_registrations.php | 72 - .../V1beta1/DomainsClient/register_domain.php | 160 - .../reset_authorization_code.php | 74 - .../retrieve_authorization_code.php | 75 - .../retrieve_register_parameters.php | 69 - .../retrieve_transfer_parameters.php | 73 - .../V1beta1/DomainsClient/search_domains.php | 72 - .../V1beta1/DomainsClient/transfer_domain.php | 168 -- .../DomainsClient/update_registration.php | 74 - .../v1beta1/src/V1beta1/DomainsClient.php | 36 - .../src/V1beta1/Gapic/DomainsGapicClient.php | 1473 ---------- .../v1beta1/src/V1beta1/gapic_metadata.json | 93 - .../resources/domains_client_config.json | 119 - .../resources/domains_descriptor_config.php | 98 - .../resources/domains_rest_client_config.php | 271 -- .../tests/Unit/V1beta1/DomainsClientTest.php | 1625 ----------- .../Clouderrorreporting/V1Beta1/Common.php | Bin 2312 -> 0 bytes .../V1Beta1/ErrorGroupService.php | 42 - .../V1Beta1/ErrorStatsService.php | Bin 5156 -> 0 bytes .../V1Beta1/ReportErrorsService.php | 46 - .../V1beta1/DeleteEventsRequest.php | 83 - .../V1beta1/DeleteEventsResponse.php | 33 - .../ErrorReporting/V1beta1/ErrorContext.php | 206 -- .../ErrorReporting/V1beta1/ErrorEvent.php | 207 -- .../ErrorReporting/V1beta1/ErrorGroup.php | 181 -- .../V1beta1/ErrorGroupOrder.php | 76 - .../V1beta1/ErrorGroupServiceGrpcClient.php | 66 - .../V1beta1/ErrorGroupStats.php | 488 ---- .../V1beta1/ErrorStatsServiceGrpcClient.php | 81 - .../V1beta1/GetGroupRequest.php | 83 - .../V1beta1/HttpRequestContext.php | 252 -- .../V1beta1/ListEventsRequest.php | 289 -- .../V1beta1/ListEventsResponse.php | 153 - .../V1beta1/ListGroupStatsRequest.php | 493 ---- .../V1beta1/ListGroupStatsResponse.php | 165 -- .../ErrorReporting/V1beta1/QueryTimeRange.php | 68 - .../V1beta1/QueryTimeRange/Period.php | 90 - .../V1beta1/QueryTimeRange_Period.php | 16 - .../V1beta1/ReportErrorEventRequest.php | 127 - .../V1beta1/ReportErrorEventResponse.php | 34 - .../V1beta1/ReportErrorsServiceGrpcClient.php | 66 - .../V1beta1/ReportedErrorEvent.php | 295 -- .../V1beta1/ResolutionStatus.php | 78 - .../ErrorReporting/V1beta1/ServiceContext.php | 180 -- .../V1beta1/ServiceContextFilter.php | 150 - .../ErrorReporting/V1beta1/SourceLocation.php | 150 - .../ErrorReporting/V1beta1/TimedCount.php | 157 - .../V1beta1/TimedCountAlignment.php | 71 - .../ErrorReporting/V1beta1/TrackingIssue.php | 71 - .../V1beta1/UpdateGroupRequest.php | 77 - .../ErrorGroupServiceClient/get_group.php | 71 - .../ErrorGroupServiceClient/update_group.php | 57 - .../ErrorStatsServiceClient/delete_events.php | 71 - .../ErrorStatsServiceClient/list_events.php | 78 - .../list_group_stats.php | 76 - .../report_error_event.php | 120 - .../src/V1beta1/ErrorGroupServiceClient.php | 36 - .../src/V1beta1/ErrorStatsServiceClient.php | 36 - .../Gapic/ErrorGroupServiceGapicClient.php | 340 --- .../Gapic/ErrorStatsServiceGapicClient.php | 530 ---- .../Gapic/ReportErrorsServiceGapicClient.php | 316 -- .../src/V1beta1/ReportErrorsServiceClient.php | 36 - .../v1beta1/src/V1beta1/gapic_metadata.json | 66 - .../error_group_service_client_config.json | 45 - .../error_group_service_descriptor_config.php | 7 - ...error_group_service_rest_client_config.php | 33 - .../error_stats_service_client_config.json | 50 - .../error_stats_service_descriptor_config.php | 28 - ...error_stats_service_rest_client_config.php | 45 - .../report_errors_service_client_config.json | 37 - ...eport_errors_service_descriptor_config.php | 7 - ...port_errors_service_rest_client_config.php | 21 - .../V1beta1/ErrorGroupServiceClientTest.php | 185 -- .../V1beta1/ErrorStatsServiceClientTest.php | 263 -- .../V1beta1/ReportErrorsServiceClientTest.php | 133 - .../Cloud/Essentialcontacts/V1/Enums.php | Bin 1167 -> 0 bytes .../Cloud/Essentialcontacts/V1/Service.php | 86 - .../V1/ComputeContactsRequest.php | 209 -- .../V1/ComputeContactsResponse.php | 121 - .../Cloud/EssentialContacts/V1/Contact.php | 283 -- .../V1/CreateContactRequest.php | 123 - .../V1/DeleteContactRequest.php | 79 - .../V1/EssentialContactsServiceGrpcClient.php | 144 - .../V1/GetContactRequest.php | 79 - .../V1/ListContactsRequest.php | 167 -- .../V1/ListContactsResponse.php | 113 - .../V1/NotificationCategory.php | 113 - .../V1/SendTestMessageRequest.php | 167 -- .../V1/UpdateContactRequest.php | 133 - .../EssentialContacts/V1/ValidationState.php | 64 - .../compute_contacts.php | 75 - .../create_contact.php | 71 - .../delete_contact.php | 67 - .../get_contact.php | 69 - .../list_contacts.php | 73 - .../send_test_message.php | 89 - .../update_contact.php | 57 - .../src/V1/EssentialContactsServiceClient.php | 34 - .../EssentialContactsServiceGapicClient.php | 820 ------ .../v1/src/V1/gapic_metadata.json | 53 - ...ential_contacts_service_client_config.json | 79 - ...ial_contacts_service_descriptor_config.php | 28 - ...al_contacts_service_rest_client_config.php | 166 -- .../V1/EssentialContactsServiceClientTest.php | 523 ---- .../Google/Cloud/Eventarc/V1/Channel.php | Bin 1619 -> 0 bytes .../Cloud/Eventarc/V1/ChannelConnection.php | 39 - .../Google/Cloud/Eventarc/V1/Discovery.php | 44 - .../Google/Cloud/Eventarc/V1/Eventarc.php | 173 -- .../Cloud/Eventarc/V1/GoogleChannelConfig.php | 37 - .../Google/Cloud/Eventarc/V1/Trigger.php | Bin 3016 -> 0 bytes .../src/Google/Cloud/Eventarc/V1/Channel.php | 420 --- .../Cloud/Eventarc/V1/Channel/State.php | 82 - .../Cloud/Eventarc/V1/ChannelConnection.php | 284 -- .../Cloud/Eventarc/V1/Channel_State.php | 16 - .../src/Google/Cloud/Eventarc/V1/CloudRun.php | 155 - .../V1/CreateChannelConnectionRequest.php | 145 - .../Eventarc/V1/CreateChannelRequest.php | 183 -- .../Eventarc/V1/CreateTriggerRequest.php | 183 -- .../V1/DeleteChannelConnectionRequest.php | 67 - .../Eventarc/V1/DeleteChannelRequest.php | 105 - .../Eventarc/V1/DeleteTriggerRequest.php | 181 -- .../Google/Cloud/Eventarc/V1/Destination.php | 192 -- .../Google/Cloud/Eventarc/V1/EventFilter.php | 155 - .../Google/Cloud/Eventarc/V1/EventType.php | 201 -- .../Cloud/Eventarc/V1/EventarcGrpcClient.php | 306 -- .../Cloud/Eventarc/V1/FilteringAttribute.php | 178 -- .../src/Google/Cloud/Eventarc/V1/GKE.php | 223 -- .../V1/GetChannelConnectionRequest.php | 67 - .../Cloud/Eventarc/V1/GetChannelRequest.php | 67 - .../V1/GetGoogleChannelConfigRequest.php | 67 - .../Cloud/Eventarc/V1/GetProviderRequest.php | 67 - .../Cloud/Eventarc/V1/GetTriggerRequest.php | 67 - .../Cloud/Eventarc/V1/GoogleChannelConfig.php | 165 -- .../V1/ListChannelConnectionsRequest.php | 151 - .../V1/ListChannelConnectionsResponse.php | 147 - .../Cloud/Eventarc/V1/ListChannelsRequest.php | 197 -- .../Eventarc/V1/ListChannelsResponse.php | 139 - .../Eventarc/V1/ListProvidersRequest.php | 227 -- .../Eventarc/V1/ListProvidersResponse.php | 139 - .../Cloud/Eventarc/V1/ListTriggersRequest.php | 239 -- .../Eventarc/V1/ListTriggersResponse.php | 139 - .../Cloud/Eventarc/V1/OperationMetadata.php | 303 -- .../src/Google/Cloud/Eventarc/V1/Provider.php | 139 - .../src/Google/Cloud/Eventarc/V1/Pubsub.php | 129 - .../Cloud/Eventarc/V1/StateCondition.php | 101 - .../Google/Cloud/Eventarc/V1/Transport.php | 79 - .../src/Google/Cloud/Eventarc/V1/Trigger.php | 569 ---- .../Eventarc/V1/UpdateChannelRequest.php | 167 -- .../V1/UpdateGoogleChannelConfigRequest.php | 129 - .../Eventarc/V1/UpdateTriggerRequest.php | 205 -- .../V1/EventarcClient/create_channel.php | 95 - .../create_channel_connection.php | 110 - .../V1/EventarcClient/create_trigger.php | 120 - .../V1/EventarcClient/delete_channel.php | 81 - .../delete_channel_connection.php | 82 - .../V1/EventarcClient/delete_trigger.php | 81 - .../samples/V1/EventarcClient/get_channel.php | 66 - .../EventarcClient/get_channel_connection.php | 70 - .../get_google_channel_config.php | 66 - .../V1/EventarcClient/get_iam_policy.php | 67 - .../V1/EventarcClient/get_location.php | 53 - .../V1/EventarcClient/get_provider.php | 66 - .../samples/V1/EventarcClient/get_trigger.php | 66 - .../list_channel_connections.php | 71 - .../V1/EventarcClient/list_channels.php | 71 - .../V1/EventarcClient/list_locations.php | 58 - .../V1/EventarcClient/list_providers.php | 71 - .../V1/EventarcClient/list_triggers.php | 71 - .../V1/EventarcClient/set_iam_policy.php | 73 - .../EventarcClient/test_iam_permissions.php | 80 - .../V1/EventarcClient/update_channel.php | 78 - .../update_google_channel_config.php | 70 - .../V1/EventarcClient/update_trigger.php | 78 - .../Eventarc/v1/src/V1/EventarcClient.php | 34 - .../v1/src/V1/Gapic/EventarcGapicClient.php | 1993 ------------- .../Eventarc/v1/src/V1/gapic_metadata.json | 133 - .../V1/resources/eventarc_client_config.json | 137 - .../resources/eventarc_descriptor_config.php | 138 - .../resources/eventarc_rest_client_config.php | 381 --- .../v1/tests/Unit/V1/EventarcClientTest.php | 2136 -------------- .../Eventarc/Publishing/V1/Publisher.php | 44 - .../PublishChannelConnectionEventsRequest.php | 159 - ...PublishChannelConnectionEventsResponse.php | 33 - .../Publishing/V1/PublishEventsRequest.php | 159 - .../Publishing/V1/PublishEventsResponse.php | 33 - .../Publishing/V1/PublisherGrpcClient.php | 87 - .../publish_channel_connection_events.php | 53 - .../V1/PublisherClient/publish_events.php | 53 - .../v1/src/V1/Gapic/PublisherGapicClient.php | 298 -- .../v1/src/V1/PublisherClient.php | 34 - .../v1/src/V1/gapic_metadata.json | 28 - .../V1/resources/publisher_client_config.json | 42 - .../resources/publisher_descriptor_config.php | 7 - .../publisher_rest_client_config.php | 33 - .../v1/tests/Unit/V1/PublisherClientTest.php | 166 -- .../Filestore/V1/CloudFilestoreService.php | Bin 8126 -> 0 bytes .../src/Google/Cloud/Filestore/V1/Backup.php | 524 ---- .../Cloud/Filestore/V1/Backup/State.php | 79 - .../Cloud/Filestore/V1/Backup_State.php | 16 - .../V1/CloudFilestoreManagerGrpcClient.php | 227 -- .../Filestore/V1/CreateBackupRequest.php | 173 -- .../Filestore/V1/CreateInstanceRequest.php | 157 - .../Filestore/V1/DeleteBackupRequest.php | 71 - .../Filestore/V1/DeleteInstanceRequest.php | 71 - .../Cloud/Filestore/V1/FileShareConfig.php | 191 -- .../Cloud/Filestore/V1/GetBackupRequest.php | 71 - .../Cloud/Filestore/V1/GetInstanceRequest.php | 71 - .../Google/Cloud/Filestore/V1/Instance.php | 470 --- .../Cloud/Filestore/V1/Instance/State.php | 96 - .../Cloud/Filestore/V1/Instance/Tier.php | 90 - .../Cloud/Filestore/V1/Instance_State.php | 16 - .../Cloud/Filestore/V1/Instance_Tier.php | 16 - .../Cloud/Filestore/V1/ListBackupsRequest.php | 227 -- .../Filestore/V1/ListBackupsResponse.php | 159 - .../Filestore/V1/ListInstancesRequest.php | 223 -- .../Filestore/V1/ListInstancesResponse.php | 155 - .../Cloud/Filestore/V1/NetworkConfig.php | 217 -- .../V1/NetworkConfig/AddressMode.php | 57 - .../V1/NetworkConfig_AddressMode.php | 16 - .../Cloud/Filestore/V1/NfsExportOptions.php | 271 -- .../V1/NfsExportOptions/AccessMode.php | 64 - .../V1/NfsExportOptions/SquashMode.php | 64 - .../V1/NfsExportOptions_AccessMode.php | 16 - .../V1/NfsExportOptions_SquashMode.php | 16 - .../Filestore/V1/RestoreInstanceRequest.php | 155 - .../Filestore/V1/UpdateBackupRequest.php | 125 - .../Filestore/V1/UpdateInstanceRequest.php | 141 - .../create_backup.php | 91 - .../create_instance.php | 89 - .../delete_backup.php | 76 - .../delete_instance.php | 76 - .../get_backup.php | 67 - .../get_instance.php | 67 - .../list_backups.php | 77 - .../list_instances.php | 76 - .../restore_instance.php | 86 - .../update_backup.php | 70 - .../update_instance.php | 65 - .../v1/src/V1/CloudFilestoreManagerClient.php | 34 - .../CloudFilestoreManagerGapicClient.php | 1156 -------- .../Filestore/v1/src/V1/gapic_metadata.json | 73 - ...cloud_filestore_manager_client_config.json | 119 - ...ud_filestore_manager_descriptor_config.php | 98 - ...d_filestore_manager_rest_client_config.php | 217 -- .../V1/CloudFilestoreManagerClientTest.php | 1233 -------- .../Google/Firestore/Admin/V1/Database.php | Bin 1722 -> 0 bytes .../Google/Firestore/Admin/V1/Field.php | Bin 1674 -> 0 bytes .../Firestore/Admin/V1/FirestoreAdmin.php | 115 - .../Google/Firestore/Admin/V1/Index.php | Bin 1705 -> 0 bytes .../Google/Firestore/Admin/V1/Location.php | 28 - .../Google/Firestore/Admin/V1/Operation.php | Bin 3272 -> 0 bytes .../Firestore/Admin/V1/CreateIndexRequest.php | 115 - .../Cloud/Firestore/Admin/V1/Database.php | 317 -- .../V1/Database/AppEngineIntegrationMode.php | 68 - .../Admin/V1/Database/ConcurrencyMode.php | 77 - .../Admin/V1/Database/DatabaseType.php | 67 - .../V1/Database_AppEngineIntegrationMode.php | 16 - .../Admin/V1/Database_ConcurrencyMode.php | 16 - .../Admin/V1/Database_DatabaseType.php | 16 - .../Firestore/Admin/V1/DeleteIndexRequest.php | 71 - .../Admin/V1/ExportDocumentsMetadata.php | 316 -- .../Admin/V1/ExportDocumentsRequest.php | 167 -- .../Admin/V1/ExportDocumentsResponse.php | 75 - .../Google/Cloud/Firestore/Admin/V1/Field.php | 261 -- .../Firestore/Admin/V1/Field/IndexConfig.php | 208 -- .../Firestore/Admin/V1/Field/TtlConfig.php | 74 - .../Admin/V1/Field/TtlConfig/State.php | 78 - .../Admin/V1/FieldOperationMetadata.php | 368 --- .../IndexConfigDelta.php | 114 - .../IndexConfigDelta/ChangeType.php | 64 - .../FieldOperationMetadata/TtlConfigDelta.php | 70 - .../TtlConfigDelta/ChangeType.php | 64 - ...ieldOperationMetadata_IndexConfigDelta.php | 16 - ...onMetadata_IndexConfigDelta_ChangeType.php | 16 - .../FieldOperationMetadata_TtlConfigDelta.php | 16 - ...tionMetadata_TtlConfigDelta_ChangeType.php | 16 - .../Firestore/Admin/V1/Field_IndexConfig.php | 16 - .../Firestore/Admin/V1/Field_TtlConfig.php | 16 - .../Admin/V1/Field_TtlConfig_State.php | 16 - .../Admin/V1/FirestoreAdminGrpcClient.php | 275 -- .../Firestore/Admin/V1/GetDatabaseRequest.php | 71 - .../Firestore/Admin/V1/GetFieldRequest.php | 71 - .../Firestore/Admin/V1/GetIndexRequest.php | 71 - .../Admin/V1/ImportDocumentsMetadata.php | 316 -- .../Admin/V1/ImportDocumentsRequest.php | 159 - .../Google/Cloud/Firestore/Admin/V1/Index.php | 234 -- .../Firestore/Admin/V1/Index/IndexField.php | 158 - .../Admin/V1/Index/IndexField/ArrayConfig.php | 57 - .../Admin/V1/Index/IndexField/Order.php | 64 - .../Firestore/Admin/V1/Index/QueryScope.php | 69 - .../Cloud/Firestore/Admin/V1/Index/State.php | 86 - .../Admin/V1/IndexOperationMetadata.php | 286 -- .../Firestore/Admin/V1/Index_IndexField.php | 16 - .../Admin/V1/Index_IndexField_ArrayConfig.php | 16 - .../Admin/V1/Index_IndexField_Order.php | 16 - .../Firestore/Admin/V1/Index_QueryScope.php | 16 - .../Cloud/Firestore/Admin/V1/Index_State.php | 16 - .../Admin/V1/ListDatabasesRequest.php | 71 - .../Admin/V1/ListDatabasesResponse.php | 67 - .../Firestore/Admin/V1/ListFieldsRequest.php | 197 -- .../Firestore/Admin/V1/ListFieldsResponse.php | 105 - .../Firestore/Admin/V1/ListIndexesRequest.php | 181 -- .../Admin/V1/ListIndexesResponse.php | 105 - .../Firestore/Admin/V1/LocationMetadata.php | 33 - .../Firestore/Admin/V1/OperationState.php | 98 - .../Cloud/Firestore/Admin/V1/Progress.php | 103 - .../Admin/V1/UpdateDatabaseMetadata.php | 33 - .../Admin/V1/UpdateDatabaseRequest.php | 121 - .../Firestore/Admin/V1/UpdateFieldRequest.php | 125 - .../V1/FirestoreAdminClient/create_index.php | 88 - .../V1/FirestoreAdminClient/delete_index.php | 70 - .../FirestoreAdminClient/export_documents.php | 89 - .../V1/FirestoreAdminClient/get_database.php | 67 - .../V1/FirestoreAdminClient/get_field.php | 72 - .../V1/FirestoreAdminClient/get_index.php | 72 - .../FirestoreAdminClient/import_documents.php | 80 - .../FirestoreAdminClient/list_databases.php | 67 - .../V1/FirestoreAdminClient/list_fields.php | 81 - .../V1/FirestoreAdminClient/list_indexes.php | 76 - .../FirestoreAdminClient/update_database.php | 68 - .../V1/FirestoreAdminClient/update_field.php | 118 - .../v1/Admin/src/V1/FirestoreAdminClient.php | 34 - .../V1/Gapic/FirestoreAdminGapicClient.php | 1237 -------- .../v1/Admin/src/V1/gapic_metadata.json | 78 - .../firestore_admin_client_config.json | 106 - .../firestore_admin_descriptor_config.php | 78 - .../firestore_admin_rest_client_config.php | 195 -- .../Unit/V1/FirestoreAdminClientTest.php | 1116 ------- .../Google/Firestore/V1/AggregationResult.php | 33 - .../Google/Firestore/V1/Common.php | Bin 1297 -> 0 bytes .../Google/Firestore/V1/Document.php | Bin 1931 -> 0 bytes .../Google/Firestore/V1/Firestore.php | Bin 10729 -> 0 bytes .../GPBMetadata/Google/Firestore/V1/Query.php | Bin 3478 -> 0 bytes .../GPBMetadata/Google/Firestore/V1/Write.php | Bin 2521 -> 0 bytes .../Cloud/Firestore/V1/AggregationResult.php | 82 - .../Google/Cloud/Firestore/V1/ArrayValue.php | 67 - .../Firestore/V1/BatchGetDocumentsRequest.php | 289 -- .../V1/BatchGetDocumentsResponse.php | 209 -- .../Cloud/Firestore/V1/BatchWriteRequest.php | 151 - .../Cloud/Firestore/V1/BatchWriteResponse.php | 117 - .../Firestore/V1/BeginTransactionRequest.php | 119 - .../Firestore/V1/BeginTransactionResponse.php | 67 - .../Cloud/Firestore/V1/CommitRequest.php | 143 - .../Cloud/Firestore/V1/CommitResponse.php | 123 - .../Firestore/V1/CreateDocumentRequest.php | 243 -- .../src/Google/Cloud/Firestore/V1/Cursor.php | 113 - .../Firestore/V1/DeleteDocumentRequest.php | 119 - .../Google/Cloud/Firestore/V1/Document.php | 290 -- .../Cloud/Firestore/V1/DocumentChange.php | 153 - .../Cloud/Firestore/V1/DocumentDelete.php | 153 - .../Cloud/Firestore/V1/DocumentMask.php | 75 - .../Cloud/Firestore/V1/DocumentRemove.php | 154 - .../Cloud/Firestore/V1/DocumentTransform.php | 109 - .../V1/DocumentTransform/FieldTransform.php | 413 --- .../FieldTransform/ServerValue.php | 59 - .../V1/DocumentTransform_FieldTransform.php | 16 - ...ntTransform_FieldTransform_ServerValue.php | 16 - .../Cloud/Firestore/V1/ExistenceFilter.php | 109 - .../Firestore/V1/FirestoreGrpcClient.php | 302 -- .../Cloud/Firestore/V1/GetDocumentRequest.php | 201 -- .../Firestore/V1/ListCollectionIdsRequest.php | 196 -- .../V1/ListCollectionIdsResponse.php | 101 - .../Firestore/V1/ListDocumentsRequest.php | 411 --- .../Firestore/V1/ListDocumentsResponse.php | 101 - .../Cloud/Firestore/V1/ListenRequest.php | 180 -- .../Cloud/Firestore/V1/ListenResponse.php | 219 -- .../Google/Cloud/Firestore/V1/MapValue.php | 83 - .../Firestore/V1/PartitionQueryRequest.php | 357 --- .../Firestore/V1/PartitionQueryResponse.php | 161 -- .../Cloud/Firestore/V1/Precondition.php | 114 - .../Cloud/Firestore/V1/RollbackRequest.php | 105 - .../V1/RunAggregationQueryRequest.php | 252 -- .../V1/RunAggregationQueryResponse.php | 167 -- .../Cloud/Firestore/V1/RunQueryRequest.php | 252 -- .../Cloud/Firestore/V1/RunQueryResponse.php | 270 -- .../V1/StructuredAggregationQuery.php | 117 - .../Aggregation.php | 216 -- .../Aggregation/Count.php | 163 -- ...StructuredAggregationQuery_Aggregation.php | 16 - ...uredAggregationQuery_Aggregation_Count.php | 16 - .../Cloud/Firestore/V1/StructuredQuery.php | 580 ---- .../V1/StructuredQuery/CollectionSelector.php | 116 - .../V1/StructuredQuery/CompositeFilter.php | 112 - .../CompositeFilter/Operator.php | 61 - .../V1/StructuredQuery/Direction.php | 64 - .../V1/StructuredQuery/FieldFilter.php | 158 - .../StructuredQuery/FieldFilter/Operator.php | 143 - .../V1/StructuredQuery/FieldReference.php | 78 - .../Firestore/V1/StructuredQuery/Filter.php | 144 - .../Firestore/V1/StructuredQuery/Order.php | 114 - .../V1/StructuredQuery/Projection.php | 78 - .../V1/StructuredQuery/UnaryFilter.php | 112 - .../StructuredQuery/UnaryFilter/Operator.php | 84 - .../V1/StructuredQuery_CollectionSelector.php | 16 - .../V1/StructuredQuery_CompositeFilter.php | 16 - ...ructuredQuery_CompositeFilter_Operator.php | 16 - .../V1/StructuredQuery_Direction.php | 16 - .../V1/StructuredQuery_FieldFilter.php | 16 - .../StructuredQuery_FieldFilter_Operator.php | 16 - .../V1/StructuredQuery_FieldReference.php | 16 - .../Firestore/V1/StructuredQuery_Filter.php | 16 - .../Firestore/V1/StructuredQuery_Order.php | 16 - .../V1/StructuredQuery_Projection.php | 16 - .../V1/StructuredQuery_UnaryFilter.php | 16 - .../StructuredQuery_UnaryFilter_Operator.php | 16 - .../src/Google/Cloud/Firestore/V1/Target.php | 261 -- .../Firestore/V1/Target/DocumentsTarget.php | 82 - .../Cloud/Firestore/V1/Target/QueryTarget.php | 132 - .../Cloud/Firestore/V1/TargetChange.php | 267 -- .../V1/TargetChange/TargetChangeType.php | 86 - .../V1/TargetChange_TargetChangeType.php | 16 - .../Firestore/V1/Target_DocumentsTarget.php | 16 - .../Cloud/Firestore/V1/Target_QueryTarget.php | 16 - .../Cloud/Firestore/V1/TransactionOptions.php | 108 - .../V1/TransactionOptions/PBReadOnly.php | 84 - .../V1/TransactionOptions/ReadOnly.php | 9 - .../V1/TransactionOptions/ReadWrite.php | 70 - .../V1/TransactionOptions_ReadOnly.php | 16 - .../V1/TransactionOptions_ReadWrite.php | 16 - .../Firestore/V1/UpdateDocumentRequest.php | 245 -- .../src/Google/Cloud/Firestore/V1/Value.php | 435 --- .../src/Google/Cloud/Firestore/V1/Write.php | 314 -- .../Cloud/Firestore/V1/WriteRequest.php | 277 -- .../Cloud/Firestore/V1/WriteResponse.php | 203 -- .../Google/Cloud/Firestore/V1/WriteResult.php | 127 - .../FirestoreClient/batch_get_documents.php | 82 - .../V1/FirestoreClient/batch_write.php | 61 - .../V1/FirestoreClient/begin_transaction.php | 66 - .../v1/samples/V1/FirestoreClient/commit.php | 70 - .../V1/FirestoreClient/create_document.php | 76 - .../V1/FirestoreClient/delete_document.php | 64 - .../V1/FirestoreClient/get_document.php | 66 - .../FirestoreClient/list_collection_ids.php | 72 - .../V1/FirestoreClient/list_documents.php | 78 - .../v1/samples/V1/FirestoreClient/listen.php | 77 - .../V1/FirestoreClient/partition_query.php | 60 - .../samples/V1/FirestoreClient/rollback.php | 66 - .../FirestoreClient/run_aggregation_query.php | 86 - .../samples/V1/FirestoreClient/run_query.php | 75 - .../V1/FirestoreClient/update_document.php | 58 - .../v1/samples/V1/FirestoreClient/write.php | 78 - .../Firestore/v1/src/V1/FirestoreClient.php | 34 - .../v1/src/V1/Gapic/FirestoreGapicClient.php | 1312 --------- .../Firestore/v1/src/V1/gapic_metadata.json | 98 - .../V1/resources/firestore_client_config.json | 174 -- .../resources/firestore_descriptor_config.php | 63 - .../firestore_rest_client_config.php | 272 -- .../v1/tests/Unit/V1/FirestoreClientTest.php | 1219 -------- .../Google/Cloud/Functions/V1/Functions.php | Bin 8448 -> 0 bytes .../Google/Cloud/Functions/V1/Operations.php | Bin 1278 -> 0 bytes .../Functions/V1/CallFunctionRequest.php | 101 - .../Functions/V1/CallFunctionResponse.php | 143 - .../Cloud/Functions/V1/CloudFunction.php | 1587 ---------- .../V1/CloudFunction/DockerRegistry.php | 69 - .../V1/CloudFunction/IngressSettings.php | 73 - .../VpcConnectorEgressSettings.php | 67 - .../Functions/V1/CloudFunctionStatus.php | 83 - .../V1/CloudFunction_DockerRegistry.php | 16 - .../V1/CloudFunction_IngressSettings.php | 16 - ...oudFunction_VpcConnectorEgressSettings.php | 16 - .../V1/CloudFunctionsServiceGrpcClient.php | 241 -- .../Functions/V1/CreateFunctionRequest.php | 115 - .../Functions/V1/DeleteFunctionRequest.php | 67 - .../Cloud/Functions/V1/EventTrigger.php | 292 -- .../Cloud/Functions/V1/FailurePolicy.php | 76 - .../Functions/V1/FailurePolicy/Retry.php | 40 - .../Functions/V1/FailurePolicy_Retry.php | 16 - .../V1/GenerateDownloadUrlRequest.php | 109 - .../V1/GenerateDownloadUrlResponse.php | 71 - .../Functions/V1/GenerateUploadUrlRequest.php | 161 -- .../V1/GenerateUploadUrlResponse.php | 75 - .../Cloud/Functions/V1/GetFunctionRequest.php | 67 - .../Cloud/Functions/V1/HttpsTrigger.php | 101 - .../V1/HttpsTrigger/SecurityLevel.php | 70 - .../V1/HttpsTrigger_SecurityLevel.php | 16 - .../Functions/V1/ListFunctionsRequest.php | 167 -- .../Functions/V1/ListFunctionsResponse.php | 151 - .../Functions/V1/OperationMetadataV1.php | 349 --- .../Cloud/Functions/V1/OperationType.php | 68 - .../Cloud/Functions/V1/SecretEnvVar.php | 191 -- .../Cloud/Functions/V1/SecretVolume.php | 213 -- .../V1/SecretVolume/SecretVersion.php | 124 - .../V1/SecretVolume_SecretVersion.php | 16 - .../Cloud/Functions/V1/SourceRepository.php | 150 - .../Functions/V1/UpdateFunctionRequest.php | 121 - .../call_function.php | 75 - .../create_function.php | 84 - .../delete_function.php | 81 - .../generate_download_url.php | 57 - .../generate_upload_url.php | 77 - .../get_function.php | 70 - .../get_iam_policy.php | 68 - .../list_functions.php | 58 - .../set_iam_policy.php | 70 - .../test_iam_permissions.php | 77 - .../update_function.php | 68 - .../v1/src/V1/CloudFunctionsServiceClient.php | 34 - .../CloudFunctionsServiceGapicClient.php | 1055 ------- .../Functions/v1/src/V1/gapic_metadata.json | 73 - ...cloud_functions_service_client_config.json | 100 - ...ud_functions_service_descriptor_config.php | 48 - ...d_functions_service_rest_client_config.php | 168 -- .../V1/CloudFunctionsServiceClientTest.php | 1021 ------- .../Google/Cloud/Functions/V2/Functions.php | Bin 10714 -> 0 bytes .../Google/Cloud/Functions/V2/BuildConfig.php | 442 --- .../Functions/V2/CreateFunctionRequest.php | 161 -- .../Functions/V2/DeleteFunctionRequest.php | 67 - .../Google/Cloud/Functions/V2/Environment.php | 61 - .../Google/Cloud/Functions/V2/EventFilter.php | 147 - .../Cloud/Functions/V2/EventTrigger.php | 374 --- .../Functions/V2/EventTrigger/RetryPolicy.php | 66 - .../Functions/V2/EventTrigger_RetryPolicy.php | 16 - .../V2/FunctionServiceGrpcClient.php | 190 -- .../Cloud/Functions/V2/Function_State.php | 16 - .../V2/GenerateDownloadUrlRequest.php | 71 - .../V2/GenerateDownloadUrlResponse.php | 71 - .../Functions/V2/GenerateUploadUrlRequest.php | 71 - .../V2/GenerateUploadUrlResponse.php | 139 - .../Cloud/Functions/V2/GetFunctionRequest.php | 67 - .../Functions/V2/ListFunctionsRequest.php | 247 -- .../Functions/V2/ListFunctionsResponse.php | 143 - .../Functions/V2/ListRuntimesRequest.php | 109 - .../Functions/V2/ListRuntimesResponse.php | 67 - .../V2/ListRuntimesResponse/Runtime.php | 207 -- .../V2/ListRuntimesResponse/RuntimeStage.php | 92 - .../V2/ListRuntimesResponse_Runtime.php | 16 - .../V2/ListRuntimesResponse_RuntimeStage.php | 16 - .../Cloud/Functions/V2/OperationMetadata.php | 381 --- .../Google/Cloud/Functions/V2/PBFunction.php | 430 --- .../Cloud/Functions/V2/PBFunction/State.php | 86 - .../Google/Cloud/Functions/V2/RepoSource.php | 309 -- .../Cloud/Functions/V2/SecretEnvVar.php | 191 -- .../Cloud/Functions/V2/SecretVolume.php | 203 -- .../V2/SecretVolume/SecretVersion.php | 124 - .../V2/SecretVolume_SecretVersion.php | 16 - .../Cloud/Functions/V2/ServiceConfig.php | 676 ----- .../V2/ServiceConfig/IngressSettings.php | 73 - .../VpcConnectorEgressSettings.php | 67 - .../V2/ServiceConfig_IngressSettings.php | 16 - ...rviceConfig_VpcConnectorEgressSettings.php | 16 - .../src/Google/Cloud/Functions/V2/Source.php | 111 - .../Cloud/Functions/V2/SourceProvenance.php | 130 - .../src/Google/Cloud/Functions/V2/Stage.php | 237 -- .../Google/Cloud/Functions/V2/Stage/Name.php | 92 - .../Google/Cloud/Functions/V2/Stage/State.php | 71 - .../Google/Cloud/Functions/V2/Stage_Name.php | 16 - .../Google/Cloud/Functions/V2/Stage_State.php | 16 - .../Cloud/Functions/V2/StateMessage.php | 135 - .../Functions/V2/StateMessage/Severity.php | 71 - .../Functions/V2/StateMessage_Severity.php | 16 - .../Cloud/Functions/V2/StorageSource.php | 155 - .../Functions/V2/UpdateFunctionRequest.php | 129 - .../FunctionServiceClient/create_function.php | 84 - .../FunctionServiceClient/delete_function.php | 77 - .../generate_download_url.php | 71 - .../generate_upload_url.php | 89 - .../V2/FunctionServiceClient/get_function.php | 66 - .../FunctionServiceClient/get_iam_policy.php | 67 - .../FunctionServiceClient/list_functions.php | 76 - .../FunctionServiceClient/list_locations.php | 58 - .../FunctionServiceClient/list_runtimes.php | 67 - .../FunctionServiceClient/set_iam_policy.php | 73 - .../test_iam_permissions.php | 80 - .../FunctionServiceClient/update_function.php | 68 - .../v2/src/V2/FunctionServiceClient.php | 34 - .../V2/Gapic/FunctionServiceGapicClient.php | 1093 ------- .../Functions/v2/src/V2/gapic_metadata.json | 78 - .../function_service_client_config.json | 82 - .../function_service_descriptor_config.php | 58 - .../function_service_rest_client_config.php | 176 -- .../Unit/V2/FunctionServiceClientTest.php | 997 ------- .../Cloud/Gsuiteaddons/V1/Gsuiteaddons.php | 116 - .../Google/Cloud/GSuiteAddOns/V1/AddOns.php | 385 --- .../Cloud/GSuiteAddOns/V1/Authorization.php | 147 - .../V1/CreateDeploymentRequest.php | 153 - .../V1/DeleteDeploymentRequest.php | 109 - .../Cloud/GSuiteAddOns/V1/Deployment.php | 195 -- .../V1/GSuiteAddOnsGrpcClient.php | 201 -- .../V1/GetAuthorizationRequest.php | 75 - .../GSuiteAddOns/V1/GetDeploymentRequest.php | 71 - .../V1/GetInstallStatusRequest.php | 71 - .../V1/InstallDeploymentRequest.php | 71 - .../Cloud/GSuiteAddOns/V1/InstallStatus.php | 142 - .../V1/ListDeploymentsRequest.php | 163 -- .../V1/ListDeploymentsResponse.php | 105 - .../V1/ReplaceDeploymentRequest.php | 77 - .../V1/UninstallDeploymentRequest.php | 71 - .../GSuiteAddOnsClient/create_deployment.php | 74 - .../GSuiteAddOnsClient/delete_deployment.php | 66 - .../GSuiteAddOnsClient/get_authorization.php | 69 - .../V1/GSuiteAddOnsClient/get_deployment.php | 68 - .../GSuiteAddOnsClient/get_install_status.php | 68 - .../GSuiteAddOnsClient/install_deployment.php | 68 - .../GSuiteAddOnsClient/list_deployments.php | 73 - .../GSuiteAddOnsClient/replace_deployment.php | 56 - .../uninstall_deployment.php | 68 - .../v1/src/V1/GSuiteAddOnsClient.php | 34 - .../src/V1/Gapic/GSuiteAddOnsGapicClient.php | 777 ----- .../v1/src/V1/gapic_metadata.json | 63 - .../g_suite_add_ons_client_config.json | 100 - .../g_suite_add_ons_descriptor_config.php | 18 - .../g_suite_add_ons_rest_client_config.php | 116 - .../tests/Unit/V1/GSuiteAddOnsClientTest.php | 622 ---- .../Google/Cloud/Gaming/V1/Common.php | Bin 3371 -> 0 bytes .../Cloud/Gaming/V1/GameServerClusters.php | Bin 4910 -> 0 bytes .../Gaming/V1/GameServerClustersService.php | 43 - .../Cloud/Gaming/V1/GameServerConfigs.php | 73 - .../Gaming/V1/GameServerConfigsService.php | 39 - .../Cloud/Gaming/V1/GameServerDeployments.php | Bin 4147 -> 0 bytes .../V1/GameServerDeploymentsService.php | 45 - .../Google/Cloud/Gaming/V1/Realms.php | 75 - .../Google/Cloud/Gaming/V1/RealmsService.php | 42 - .../V1/CreateGameServerClusterRequest.php | 149 - .../V1/CreateGameServerConfigRequest.php | 149 - .../V1/CreateGameServerDeploymentRequest.php | 149 - .../Cloud/Gaming/V1/CreateRealmRequest.php | 149 - .../V1/DeleteGameServerClusterRequest.php | 71 - .../V1/DeleteGameServerConfigRequest.php | 71 - .../V1/DeleteGameServerDeploymentRequest.php | 71 - .../Cloud/Gaming/V1/DeleteRealmRequest.php | 71 - .../Cloud/Gaming/V1/DeployedFleetDetails.php | 121 - .../V1/DeployedFleetDetails/DeployedFleet.php | 200 -- .../DeployedFleet/DeployedFleetStatus.php | 181 -- .../DeployedFleetAutoscaler.php | 152 - .../V1/DeployedFleetDetails_DeployedFleet.php | 16 - ...edFleetDetails_DeployedFleetAutoscaler.php | 16 - ...ails_DeployedFleet_DeployedFleetStatus.php | 16 - .../Gaming/V1/FetchDeploymentStateRequest.php | 71 - .../V1/FetchDeploymentStateResponse.php | 101 - .../DeployedClusterState.php | 108 - ...mentStateResponse_DeployedClusterState.php | 16 - .../Google/Cloud/Gaming/V1/FleetConfig.php | 105 - .../Cloud/Gaming/V1/GameServerCluster.php | 369 --- .../V1/GameServerClusterConnectionInfo.php | 117 - .../Cloud/Gaming/V1/GameServerClusterView.php | 64 - .../GameServerClustersServiceGrpcClient.php | 157 - .../Cloud/Gaming/V1/GameServerConfig.php | 311 -- .../Gaming/V1/GameServerConfigOverride.php | 117 - .../V1/GameServerConfigsServiceGrpcClient.php | 99 - .../Cloud/Gaming/V1/GameServerDeployment.php | 273 -- .../Gaming/V1/GameServerDeploymentRollout.php | 290 -- ...GameServerDeploymentsServiceGrpcClient.php | 179 -- .../Gaming/V1/GetGameServerClusterRequest.php | 125 - .../Gaming/V1/GetGameServerConfigRequest.php | 71 - .../V1/GetGameServerDeploymentRequest.php | 71 - .../GetGameServerDeploymentRolloutRequest.php | 72 - .../Cloud/Gaming/V1/GetRealmRequest.php | 71 - .../Cloud/Gaming/V1/GkeClusterReference.php | 95 - .../Gaming/V1/KubernetesClusterState.php | 253 -- .../InstallationState.php | 108 - ...bernetesClusterState_InstallationState.php | 16 - .../Google/Cloud/Gaming/V1/LabelSelector.php | 67 - .../V1/ListGameServerClustersRequest.php | 281 -- .../V1/ListGameServerClustersResponse.php | 139 - .../V1/ListGameServerConfigsRequest.php | 227 -- .../V1/ListGameServerConfigsResponse.php | 139 - .../V1/ListGameServerDeploymentsRequest.php | 231 -- .../V1/ListGameServerDeploymentsResponse.php | 139 - .../Cloud/Gaming/V1/ListRealmsRequest.php | 231 -- .../Cloud/Gaming/V1/ListRealmsResponse.php | 139 - .../Cloud/Gaming/V1/OperationMetadata.php | 383 --- .../Cloud/Gaming/V1/OperationStatus.php | 133 - .../Gaming/V1/OperationStatus/ErrorCode.php | 61 - .../Gaming/V1/OperationStatus_ErrorCode.php | 16 - .../PreviewCreateGameServerClusterRequest.php | 236 -- ...PreviewCreateGameServerClusterResponse.php | 160 - .../PreviewDeleteGameServerClusterRequest.php | 115 - ...PreviewDeleteGameServerClusterResponse.php | 112 - ...viewGameServerDeploymentRolloutRequest.php | 181 -- ...iewGameServerDeploymentRolloutResponse.php | 146 - .../Gaming/V1/PreviewRealmUpdateRequest.php | 177 -- .../Gaming/V1/PreviewRealmUpdateResponse.php | 111 - .../PreviewUpdateGameServerClusterRequest.php | 177 -- ...PreviewUpdateGameServerClusterResponse.php | 111 - .../src/Google/Cloud/Gaming/V1/Realm.php | 307 -- .../Google/Cloud/Gaming/V1/RealmSelector.php | 67 - .../Gaming/V1/RealmsServiceGrpcClient.php | 126 - .../Google/Cloud/Gaming/V1/ScalingConfig.php | 181 -- .../src/Google/Cloud/Gaming/V1/Schedule.php | 219 -- .../src/Google/Cloud/Gaming/V1/SpecSource.php | 109 - .../Google/Cloud/Gaming/V1/TargetDetails.php | 143 - .../V1/TargetDetails/TargetFleetDetails.php | 124 - .../TargetFleetDetails/TargetFleet.php | 118 - .../TargetFleetAutoscaler.php | 118 - .../V1/TargetDetails_TargetFleetDetails.php | 16 - ...Details_TargetFleetDetails_TargetFleet.php | 16 - ...rgetFleetDetails_TargetFleetAutoscaler.php | 16 - .../Google/Cloud/Gaming/V1/TargetState.php | 67 - .../V1/UpdateGameServerClusterRequest.php | 133 - .../V1/UpdateGameServerDeploymentRequest.php | 134 - ...dateGameServerDeploymentRolloutRequest.php | 134 - .../Cloud/Gaming/V1/UpdateRealmRequest.php | 133 - .../create_game_server_cluster.php | 97 - .../delete_game_server_cluster.php | 81 - .../get_game_server_cluster.php | 72 - .../list_game_server_clusters.php | 72 - .../preview_create_game_server_cluster.php | 91 - .../preview_delete_game_server_cluster.php | 72 - .../preview_update_game_server_cluster.php | 78 - .../update_game_server_cluster.php | 89 - .../create_game_server_config.php | 94 - .../delete_game_server_config.php | 82 - .../get_game_server_config.php | 72 - .../list_game_server_configs.php | 77 - .../create_game_server_deployment.php | 88 - .../delete_game_server_deployment.php | 80 - .../fetch_deployment_state.php | 68 - .../get_game_server_deployment.php | 71 - .../get_game_server_deployment_rollout.php | 71 - .../list_game_server_deployments.php | 72 - ...preview_game_server_deployment_rollout.php | 58 - .../update_game_server_deployment.php | 73 - .../update_game_server_deployment_rollout.php | 79 - .../V1/RealmsServiceClient/create_realm.php | 92 - .../V1/RealmsServiceClient/delete_realm.php | 76 - .../V1/RealmsServiceClient/get_realm.php | 67 - .../V1/RealmsServiceClient/list_realms.php | 72 - .../preview_realm_update.php | 74 - .../V1/RealmsServiceClient/update_realm.php | 85 - .../V1/GameServerClustersServiceClient.php | 34 - .../src/V1/GameServerConfigsServiceClient.php | 34 - .../V1/GameServerDeploymentsServiceClient.php | 34 - .../GameServerClustersServiceGapicClient.php | 861 ------ .../GameServerConfigsServiceGapicClient.php | 603 ---- ...ameServerDeploymentsServiceGapicClient.php | 921 ------ .../src/V1/Gapic/RealmsServiceGapicClient.php | 722 ----- .../Gaming/v1/src/V1/RealmsServiceClient.php | 34 - .../Gaming/v1/src/V1/gapic_metadata.json | 180 -- ...server_clusters_service_client_config.json | 94 - ...ver_clusters_service_descriptor_config.php | 48 - ...er_clusters_service_rest_client_config.php | 217 -- ..._server_configs_service_client_config.json | 64 - ...rver_configs_service_descriptor_config.php | 38 - ...ver_configs_service_rest_client_config.php | 165 -- ...ver_deployments_service_client_config.json | 89 - ..._deployments_service_descriptor_config.php | 58 - ...deployments_service_rest_client_config.php | 233 -- .../realms_service_client_config.json | 74 - .../realms_service_descriptor_config.php | 48 - .../realms_service_rest_client_config.php | 194 -- .../GameServerClustersServiceClientTest.php | 786 ----- .../V1/GameServerConfigsServiceClientTest.php | 443 --- ...GameServerDeploymentsServiceClientTest.php | 887 ------ .../tests/Unit/V1/RealmsServiceClientTest.php | 658 ----- .../Google/Cloud/Gkebackup/V1/Backup.php | Bin 2893 -> 0 bytes .../Google/Cloud/Gkebackup/V1/BackupPlan.php | Bin 2426 -> 0 bytes .../Google/Cloud/Gkebackup/V1/Common.php | 40 - .../Google/Cloud/Gkebackup/V1/Gkebackup.php | 228 -- .../Google/Cloud/Gkebackup/V1/Restore.php | Bin 3776 -> 0 bytes .../Google/Cloud/Gkebackup/V1/RestorePlan.php | 49 - .../Google/Cloud/Gkebackup/V1/Volume.php | Bin 2979 -> 0 bytes .../src/Google/Cloud/GkeBackup/V1/Backup.php | 1170 -------- .../GkeBackup/V1/Backup/ClusterMetadata.php | 233 -- .../Cloud/GkeBackup/V1/Backup/State.php | 88 - .../GkeBackup/V1/BackupForGKEGrpcClient.php | 396 --- .../Google/Cloud/GkeBackup/V1/BackupPlan.php | 605 ---- .../GkeBackup/V1/BackupPlan/BackupConfig.php | 288 -- .../V1/BackupPlan/RetentionPolicy.php | 222 -- .../GkeBackup/V1/BackupPlan/Schedule.php | 121 - .../GkeBackup/V1/BackupPlan_BackupConfig.php | 16 - .../V1/BackupPlan_RetentionPolicy.php | 16 - .../GkeBackup/V1/BackupPlan_Schedule.php | 16 - .../GkeBackup/V1/Backup_ClusterMetadata.php | 16 - .../Cloud/GkeBackup/V1/Backup_State.php | 16 - .../GkeBackup/V1/CreateBackupPlanRequest.php | 173 -- .../GkeBackup/V1/CreateBackupRequest.php | 173 -- .../GkeBackup/V1/CreateRestorePlanRequest.php | 173 -- .../GkeBackup/V1/CreateRestoreRequest.php | 173 -- .../GkeBackup/V1/DeleteBackupPlanRequest.php | 113 - .../GkeBackup/V1/DeleteBackupRequest.php | 155 - .../GkeBackup/V1/DeleteRestorePlanRequest.php | 155 - .../GkeBackup/V1/DeleteRestoreRequest.php | 155 - .../Cloud/GkeBackup/V1/EncryptionKey.php | 72 - .../GkeBackup/V1/GetBackupPlanRequest.php | 71 - .../Cloud/GkeBackup/V1/GetBackupRequest.php | 71 - .../GkeBackup/V1/GetRestorePlanRequest.php | 71 - .../Cloud/GkeBackup/V1/GetRestoreRequest.php | 71 - .../GkeBackup/V1/GetVolumeBackupRequest.php | 71 - .../GkeBackup/V1/GetVolumeRestoreRequest.php | 71 - .../GkeBackup/V1/ListBackupPlansRequest.php | 247 -- .../GkeBackup/V1/ListBackupPlansResponse.php | 151 - .../Cloud/GkeBackup/V1/ListBackupsRequest.php | 247 -- .../GkeBackup/V1/ListBackupsResponse.php | 109 - .../GkeBackup/V1/ListRestorePlansRequest.php | 247 -- .../GkeBackup/V1/ListRestorePlansResponse.php | 151 - .../GkeBackup/V1/ListRestoresRequest.php | 247 -- .../GkeBackup/V1/ListRestoresResponse.php | 147 - .../GkeBackup/V1/ListVolumeBackupsRequest.php | 247 -- .../V1/ListVolumeBackupsResponse.php | 117 - .../V1/ListVolumeRestoresRequest.php | 247 -- .../V1/ListVolumeRestoresResponse.php | 117 - .../Cloud/GkeBackup/V1/NamespacedName.php | 101 - .../Cloud/GkeBackup/V1/NamespacedNames.php | 67 - .../Google/Cloud/GkeBackup/V1/Namespaces.php | 67 - .../Cloud/GkeBackup/V1/OperationMetadata.php | 303 -- .../src/Google/Cloud/GkeBackup/V1/Restore.php | 729 ----- .../Cloud/GkeBackup/V1/Restore/State.php | 88 - .../Cloud/GkeBackup/V1/RestoreConfig.php | 382 --- .../ClusterResourceConflictPolicy.php | 69 - .../ClusterResourceRestoreScope.php | 82 - .../GkeBackup/V1/RestoreConfig/GroupKind.php | 118 - .../NamespacedResourceRestoreMode.php | 75 - .../V1/RestoreConfig/SubstitutionRule.php | 312 -- .../RestoreConfig/VolumeDataRestorePolicy.php | 77 - ...reConfig_ClusterResourceConflictPolicy.php | 16 - ...toreConfig_ClusterResourceRestoreScope.php | 16 - .../GkeBackup/V1/RestoreConfig_GroupKind.php | 16 - ...reConfig_NamespacedResourceRestoreMode.php | 16 - .../V1/RestoreConfig_SubstitutionRule.php | 16 - .../RestoreConfig_VolumeDataRestorePolicy.php | 16 - .../Google/Cloud/GkeBackup/V1/RestorePlan.php | 477 --- .../Cloud/GkeBackup/V1/Restore_State.php | 16 - .../GkeBackup/V1/UpdateBackupPlanRequest.php | 157 - .../GkeBackup/V1/UpdateBackupRequest.php | 153 - .../GkeBackup/V1/UpdateRestorePlanRequest.php | 153 - .../GkeBackup/V1/UpdateRestoreRequest.php | 153 - .../Cloud/GkeBackup/V1/VolumeBackup.php | 578 ---- .../Cloud/GkeBackup/V1/VolumeBackup/State.php | 98 - .../V1/VolumeBackup/VolumeBackupFormat.php | 57 - .../Cloud/GkeBackup/V1/VolumeBackup_State.php | 16 - .../V1/VolumeBackup_VolumeBackupFormat.php | 16 - .../Cloud/GkeBackup/V1/VolumeRestore.php | 530 ---- .../GkeBackup/V1/VolumeRestore/State.php | 86 - .../GkeBackup/V1/VolumeRestore/VolumeType.php | 57 - .../GkeBackup/V1/VolumeRestore_State.php | 16 - .../GkeBackup/V1/VolumeRestore_VolumeType.php | 16 - .../V1/BackupForGKEClient/create_backup.php | 79 - .../BackupForGKEClient/create_backup_plan.php | 107 - .../V1/BackupForGKEClient/create_restore.php | 106 - .../create_restore_plan.php | 127 - .../V1/BackupForGKEClient/delete_backup.php | 81 - .../BackupForGKEClient/delete_backup_plan.php | 76 - .../V1/BackupForGKEClient/delete_restore.php | 81 - .../delete_restore_plan.php | 76 - .../V1/BackupForGKEClient/get_backup.php | 72 - .../V1/BackupForGKEClient/get_backup_plan.php | 67 - .../V1/BackupForGKEClient/get_restore.php | 72 - .../BackupForGKEClient/get_restore_plan.php | 67 - .../BackupForGKEClient/get_volume_backup.php | 73 - .../BackupForGKEClient/get_volume_restore.php | 73 - .../BackupForGKEClient/list_backup_plans.php | 72 - .../V1/BackupForGKEClient/list_backups.php | 72 - .../BackupForGKEClient/list_restore_plans.php | 72 - .../V1/BackupForGKEClient/list_restores.php | 72 - .../list_volume_backups.php | 77 - .../list_volume_restores.php | 77 - .../V1/BackupForGKEClient/update_backup.php | 68 - .../BackupForGKEClient/update_backup_plan.php | 91 - .../V1/BackupForGKEClient/update_restore.php | 90 - .../update_restore_plan.php | 107 - .../v1/src/V1/BackupForGKEClient.php | 34 - .../src/V1/Gapic/BackupForGKEGapicClient.php | 2238 -------------- .../GkeBackup/v1/src/V1/gapic_metadata.json | 138 - .../backup_for_gke_client_config.json | 184 -- .../backup_for_gke_descriptor_config.php | 188 -- .../backup_for_gke_rest_client_config.php | 478 --- .../tests/Unit/V1/BackupForGKEClientTest.php | 2568 ----------------- .../Cloud/Gkehub/V1Beta1/Membership.php | Bin 8786 -> 0 bytes .../Cloud/GkeHub/V1beta1/ApplianceCluster.php | 76 - .../Google/Cloud/GkeHub/V1beta1/Authority.php | 231 -- .../Cloud/GkeHub/V1beta1/ConnectAgent.php | 168 -- .../GkeHub/V1beta1/ConnectAgentResource.php | 112 - .../V1beta1/CreateMembershipRequest.php | 247 -- .../V1beta1/DeleteMembershipRequest.php | 145 - .../Cloud/GkeHub/V1beta1/EdgeCluster.php | 75 - .../GenerateConnectManifestRequest.php | 261 -- .../GenerateConnectManifestResponse.php | 72 - .../GenerateExclusivityManifestRequest.php | 155 - .../GenerateExclusivityManifestResponse.php | 109 - .../GkeHub/V1beta1/GetMembershipRequest.php | 71 - .../Cloud/GkeHub/V1beta1/GkeCluster.php | 113 - .../GkeHubMembershipServiceGrpcClient.php | 185 -- .../GkeHub/V1beta1/KubernetesMetadata.php | 272 -- .../GkeHub/V1beta1/KubernetesResource.php | 245 -- .../GkeHub/V1beta1/ListMembershipsRequest.php | 267 -- .../V1beta1/ListMembershipsResponse.php | 143 - .../Cloud/GkeHub/V1beta1/Membership.php | 623 ---- .../V1beta1/Membership/InfrastructureType.php | 70 - .../GkeHub/V1beta1/MembershipEndpoint.php | 326 --- .../Cloud/GkeHub/V1beta1/MembershipState.php | 157 - .../GkeHub/V1beta1/MembershipState/Code.php | 85 - .../GkeHub/V1beta1/MembershipState_Code.php | 16 - .../V1beta1/Membership_InfrastructureType.php | 16 - .../GkeHub/V1beta1/MultiCloudCluster.php | 121 - .../Cloud/GkeHub/V1beta1/OnPremCluster.php | 185 -- .../V1beta1/OnPremCluster/ClusterType.php | 78 - .../V1beta1/OnPremCluster_ClusterType.php | 16 - .../GkeHub/V1beta1/OperationMetadata.php | 303 -- .../Cloud/GkeHub/V1beta1/ResourceManifest.php | 114 - .../Cloud/GkeHub/V1beta1/ResourceOptions.php | 163 -- .../Google/Cloud/GkeHub/V1beta1/TypeMeta.php | 102 - .../V1beta1/UpdateMembershipRequest.php | 265 -- .../V1beta1/ValidateExclusivityRequest.php | 148 - .../V1beta1/ValidateExclusivityResponse.php | 93 - .../create_membership.php | 100 - .../delete_membership.php | 84 - .../generate_connect_manifest.php | 74 - .../generate_exclusivity_manifest.php | 82 - .../get_iam_policy.php | 67 - .../get_location.php | 53 - .../get_membership.php | 71 - .../list_locations.php | 58 - .../list_memberships.php | 72 - .../set_iam_policy.php | 73 - .../test_iam_permissions.php | 80 - .../update_membership.php | 92 - .../validate_exclusivity.php | 74 - .../GkeHubMembershipServiceGapicClient.php | 1305 --------- .../V1beta1/GkeHubMembershipServiceClient.php | 36 - .../v1beta1/src/V1beta1/gapic_metadata.json | 83 - ..._hub_membership_service_client_config.json | 99 - ...b_membership_service_descriptor_config.php | 58 - ..._membership_service_rest_client_config.php | 213 -- .../GkeHubMembershipServiceClientTest.php | 1084 ------- .../GPBMetadata/Grafeas/V1/Attestation.php | 40 - .../src/GPBMetadata/Grafeas/V1/Build.php | 39 - .../src/GPBMetadata/Grafeas/V1/Common.php | Bin 1213 -> 0 bytes .../src/GPBMetadata/Grafeas/V1/Compliance.php | Bin 1315 -> 0 bytes .../proto/src/GPBMetadata/Grafeas/V1/Cvss.php | Bin 3353 -> 0 bytes .../src/GPBMetadata/Grafeas/V1/Deployment.php | Bin 1084 -> 0 bytes .../src/GPBMetadata/Grafeas/V1/Discovery.php | Bin 1786 -> 0 bytes .../Grafeas/V1/DsseAttestation.php | Bin 1079 -> 0 bytes .../src/GPBMetadata/Grafeas/V1/Grafeas.php | Bin 8039 -> 0 bytes .../src/GPBMetadata/Grafeas/V1/Image.php | 44 - .../Grafeas/V1/IntotoProvenance.php | 54 - .../Grafeas/V1/IntotoStatement.php | Bin 1374 -> 0 bytes .../src/GPBMetadata/Grafeas/V1/Package.php | Bin 1945 -> 0 bytes .../src/GPBMetadata/Grafeas/V1/Provenance.php | Bin 2688 -> 0 bytes .../src/GPBMetadata/Grafeas/V1/Severity.php | Bin 744 -> 0 bytes .../GPBMetadata/Grafeas/V1/SlsaProvenance.php | 61 - .../Grafeas/V1/SlsaProvenanceZeroTwo.php | 71 - .../src/GPBMetadata/Grafeas/V1/Upgrade.php | 60 - .../GPBMetadata/Grafeas/V1/Vulnerability.php | 94 - .../v1/proto/src/Grafeas/V1/AliasContext.php | 101 - .../src/Grafeas/V1/AliasContext/Kind.php | 72 - .../src/Grafeas/V1/AliasContext_Kind.php | 16 - .../v1/proto/src/Grafeas/V1/Architecture.php | 61 - .../v1/proto/src/Grafeas/V1/Artifact.php | 159 - .../proto/src/Grafeas/V1/AttestationNote.php | 84 - .../src/Grafeas/V1/AttestationNote/Hint.php | 80 - .../src/Grafeas/V1/AttestationNote_Hint.php | 16 - .../src/Grafeas/V1/AttestationOccurrence.php | 190 -- .../Grafeas/V1/BatchCreateNotesRequest.php | 105 - .../Grafeas/V1/BatchCreateNotesResponse.php | 67 - .../V1/BatchCreateOccurrencesRequest.php | 105 - .../V1/BatchCreateOccurrencesResponse.php | 67 - .../v1/proto/src/Grafeas/V1/BuildNote.php | 68 - .../proto/src/Grafeas/V1/BuildOccurrence.php | 251 -- .../proto/src/Grafeas/V1/BuildProvenance.php | 528 ---- .../v1/proto/src/Grafeas/V1/BuilderConfig.php | 58 - .../Grafeas/v1/proto/src/Grafeas/V1/CVSS.php | 382 --- .../src/Grafeas/V1/CVSS/AttackComplexity.php | 56 - .../src/Grafeas/V1/CVSS/AttackVector.php | 66 - .../src/Grafeas/V1/CVSS/Authentication.php | 61 - .../v1/proto/src/Grafeas/V1/CVSS/Impact.php | 61 - .../Grafeas/V1/CVSS/PrivilegesRequired.php | 61 - .../v1/proto/src/Grafeas/V1/CVSS/Scope.php | 56 - .../src/Grafeas/V1/CVSS/UserInteraction.php | 56 - .../v1/proto/src/Grafeas/V1/CVSSVersion.php | 55 - .../src/Grafeas/V1/CVSS_AttackComplexity.php | 16 - .../src/Grafeas/V1/CVSS_AttackVector.php | 16 - .../src/Grafeas/V1/CVSS_Authentication.php | 16 - .../v1/proto/src/Grafeas/V1/CVSS_Impact.php | 16 - .../Grafeas/V1/CVSS_PrivilegesRequired.php | 16 - .../v1/proto/src/Grafeas/V1/CVSS_Scope.php | 16 - .../src/Grafeas/V1/CVSS_UserInteraction.php | 16 - .../v1/proto/src/Grafeas/V1/CVSSv3.php | 353 --- .../Grafeas/V1/CVSSv3/AttackComplexity.php | 56 - .../src/Grafeas/V1/CVSSv3/AttackVector.php | 66 - .../v1/proto/src/Grafeas/V1/CVSSv3/Impact.php | 61 - .../Grafeas/V1/CVSSv3/PrivilegesRequired.php | 61 - .../v1/proto/src/Grafeas/V1/CVSSv3/Scope.php | 56 - .../src/Grafeas/V1/CVSSv3/UserInteraction.php | 56 - .../Grafeas/V1/CVSSv3_AttackComplexity.php | 16 - .../src/Grafeas/V1/CVSSv3_AttackVector.php | 16 - .../v1/proto/src/Grafeas/V1/CVSSv3_Impact.php | 16 - .../Grafeas/V1/CVSSv3_PrivilegesRequired.php | 16 - .../v1/proto/src/Grafeas/V1/CVSSv3_Scope.php | 16 - .../src/Grafeas/V1/CVSSv3_UserInteraction.php | 16 - .../src/Grafeas/V1/CloudRepoSourceContext.php | 153 - .../v1/proto/src/Grafeas/V1/Command.php | 249 -- .../v1/proto/src/Grafeas/V1/Completeness.php | 148 - .../proto/src/Grafeas/V1/ComplianceNote.php | 272 -- .../V1/ComplianceNote/CisBenchmark.php | 90 - .../V1/ComplianceNote_CisBenchmark.php | 16 - .../src/Grafeas/V1/ComplianceOccurrence.php | 88 - .../src/Grafeas/V1/ComplianceVersion.php | 148 - .../src/Grafeas/V1/CreateNoteRequest.php | 149 - .../Grafeas/V1/CreateOccurrenceRequest.php | 115 - .../src/Grafeas/V1/DSSEAttestationNote.php | 75 - .../V1/DSSEAttestationNote/DSSEHint.php | 80 - .../V1/DSSEAttestationNote_DSSEHint.php | 16 - .../Grafeas/V1/DSSEAttestationOccurrence.php | 119 - .../src/Grafeas/V1/DeleteNoteRequest.php | 71 - .../Grafeas/V1/DeleteOccurrenceRequest.php | 71 - .../proto/src/Grafeas/V1/DeploymentNote.php | 67 - .../src/Grafeas/V1/DeploymentOccurrence.php | 295 -- .../V1/DeploymentOccurrence/Platform.php | 71 - .../V1/DeploymentOccurrence_Platform.php | 16 - .../v1/proto/src/Grafeas/V1/Digest.php | 101 - .../v1/proto/src/Grafeas/V1/DiscoveryNote.php | 73 - .../src/Grafeas/V1/DiscoveryOccurrence.php | 350 --- .../DiscoveryOccurrence/AnalysisCompleted.php | 64 - .../V1/DiscoveryOccurrence/AnalysisStatus.php | 94 - .../ContinuousAnalysis.php | 64 - .../DiscoveryOccurrence_AnalysisCompleted.php | 16 - .../V1/DiscoveryOccurrence_AnalysisStatus.php | 16 - ...DiscoveryOccurrence_ContinuousAnalysis.php | 16 - .../v1/proto/src/Grafeas/V1/Distribution.php | 256 -- .../v1/proto/src/Grafeas/V1/Envelope.php | 116 - .../src/Grafeas/V1/EnvelopeSignature.php | 85 - .../v1/proto/src/Grafeas/V1/FileHashes.php | 68 - .../v1/proto/src/Grafeas/V1/FileLocation.php | 71 - .../v1/proto/src/Grafeas/V1/Fingerprint.php | 151 - .../src/Grafeas/V1/GerritSourceContext.php | 184 -- .../proto/src/Grafeas/V1/GetNoteRequest.php | 71 - .../Grafeas/V1/GetOccurrenceNoteRequest.php | 71 - .../src/Grafeas/V1/GetOccurrenceRequest.php | 71 - .../proto/src/Grafeas/V1/GitSourceContext.php | 102 - .../src/Grafeas/V1/GrafeasGrpcClient.php | 263 -- .../Grafeas/v1/proto/src/Grafeas/V1/Hash.php | 101 - .../v1/proto/src/Grafeas/V1/ImageNote.php | 119 - .../proto/src/Grafeas/V1/ImageOccurrence.php | 197 -- .../proto/src/Grafeas/V1/InTotoProvenance.php | 214 -- .../proto/src/Grafeas/V1/InTotoStatement.php | 224 -- .../Grafeas/v1/proto/src/Grafeas/V1/Jwt.php | 73 - .../Grafeas/v1/proto/src/Grafeas/V1/Layer.php | 105 - .../v1/proto/src/Grafeas/V1/License.php | 117 - .../Grafeas/V1/ListNoteOccurrencesRequest.php | 173 -- .../V1/ListNoteOccurrencesResponse.php | 101 - .../proto/src/Grafeas/V1/ListNotesRequest.php | 177 -- .../src/Grafeas/V1/ListNotesResponse.php | 109 - .../src/Grafeas/V1/ListOccurrencesRequest.php | 177 -- .../Grafeas/V1/ListOccurrencesResponse.php | 109 - .../v1/proto/src/Grafeas/V1/Location.php | 154 - .../v1/proto/src/Grafeas/V1/Metadata.php | 249 -- .../proto/src/Grafeas/V1/NonCompliantFile.php | 135 - .../Grafeas/v1/proto/src/Grafeas/V1/Note.php | 724 ----- .../v1/proto/src/Grafeas/V1/NoteKind.php | 117 - .../v1/proto/src/Grafeas/V1/Occurrence.php | 701 ----- .../v1/proto/src/Grafeas/V1/PackageNote.php | 451 --- .../src/Grafeas/V1/PackageOccurrence.php | 311 -- .../v1/proto/src/Grafeas/V1/ProjectRepoId.php | 102 - .../v1/proto/src/Grafeas/V1/Recipe.php | 273 -- .../v1/proto/src/Grafeas/V1/RelatedUrl.php | 101 - .../v1/proto/src/Grafeas/V1/RepoId.php | 108 - .../v1/proto/src/Grafeas/V1/Severity.php | 82 - .../v1/proto/src/Grafeas/V1/Signature.php | 192 -- .../proto/src/Grafeas/V1/SlsaProvenance.php | 214 -- .../Grafeas/V1/SlsaProvenance/Material.php | 88 - .../Grafeas/V1/SlsaProvenance/SlsaBuilder.php | 61 - .../V1/SlsaProvenance/SlsaCompleteness.php | 151 - .../V1/SlsaProvenance/SlsaMetadata.php | 252 -- .../Grafeas/V1/SlsaProvenance/SlsaRecipe.php | 296 -- .../src/Grafeas/V1/SlsaProvenanceZeroTwo.php | 235 -- .../V1/SlsaProvenanceZeroTwo/SlsaBuilder.php | 64 - .../SlsaCompleteness.php | 118 - .../SlsaConfigSource.php | 118 - .../SlsaProvenanceZeroTwo/SlsaInvocation.php | 147 - .../V1/SlsaProvenanceZeroTwo/SlsaMaterial.php | 91 - .../V1/SlsaProvenanceZeroTwo/SlsaMetadata.php | 201 -- .../V1/SlsaProvenanceZeroTwo_SlsaBuilder.php | 16 - ...SlsaProvenanceZeroTwo_SlsaCompleteness.php | 16 - ...SlsaProvenanceZeroTwo_SlsaConfigSource.php | 16 - .../SlsaProvenanceZeroTwo_SlsaInvocation.php | 16 - .../V1/SlsaProvenanceZeroTwo_SlsaMaterial.php | 16 - .../V1/SlsaProvenanceZeroTwo_SlsaMetadata.php | 16 - .../Grafeas/V1/SlsaProvenance_Material.php | 16 - .../Grafeas/V1/SlsaProvenance_SlsaBuilder.php | 16 - .../V1/SlsaProvenance_SlsaCompleteness.php | 16 - .../V1/SlsaProvenance_SlsaMetadata.php | 16 - .../Grafeas/V1/SlsaProvenance_SlsaRecipe.php | 16 - .../v1/proto/src/Grafeas/V1/Source.php | 215 -- .../v1/proto/src/Grafeas/V1/SourceContext.php | 176 -- .../v1/proto/src/Grafeas/V1/Subject.php | 104 - .../src/Grafeas/V1/UpdateNoteRequest.php | 159 - .../Grafeas/V1/UpdateOccurrenceRequest.php | 159 - .../src/Grafeas/V1/UpgradeDistribution.php | 187 -- .../v1/proto/src/Grafeas/V1/UpgradeNote.php | 196 -- .../src/Grafeas/V1/UpgradeOccurrence.php | 215 -- .../v1/proto/src/Grafeas/V1/Version.php | 269 -- .../src/Grafeas/V1/Version/VersionKind.php | 71 - .../src/Grafeas/V1/Version_VersionKind.php | 16 - .../src/Grafeas/V1/VulnerabilityNote.php | 315 -- .../Grafeas/V1/VulnerabilityNote/Detail.php | 645 ----- .../V1/VulnerabilityNote/WindowsDetail.php | 186 -- .../WindowsDetail/KnowledgeBase.php | 106 - .../Grafeas/V1/VulnerabilityNote_Detail.php | 16 - .../V1/VulnerabilityNote_WindowsDetail.php | 16 - ...bilityNote_WindowsDetail_KnowledgeBase.php | 16 - .../Grafeas/V1/VulnerabilityOccurrence.php | 469 --- .../VulnerabilityOccurrence/PackageIssue.php | 429 --- .../VulnerabilityOccurrence_PackageIssue.php | 16 - .../v1/proto/src/Grafeas/V1/WindowsUpdate.php | 298 -- .../src/Grafeas/V1/WindowsUpdate/Category.php | 104 - .../src/Grafeas/V1/WindowsUpdate/Identity.php | 104 - .../src/Grafeas/V1/WindowsUpdate_Category.php | 16 - .../src/Grafeas/V1/WindowsUpdate_Identity.php | 16 - .../V1/GrafeasClient/batch_create_notes.php | 70 - .../batch_create_occurrences.php | 71 - .../samples/V1/GrafeasClient/create_note.php | 72 - .../V1/GrafeasClient/create_occurrence.php | 70 - .../samples/V1/GrafeasClient/delete_note.php | 65 - .../V1/GrafeasClient/delete_occurrence.php | 67 - .../v1/samples/V1/GrafeasClient/get_note.php | 67 - .../V1/GrafeasClient/get_occurrence.php | 67 - .../V1/GrafeasClient/get_occurrence_note.php | 68 - .../GrafeasClient/list_note_occurrences.php | 74 - .../samples/V1/GrafeasClient/list_notes.php | 72 - .../V1/GrafeasClient/list_occurrences.php | 72 - .../samples/V1/GrafeasClient/update_note.php | 70 - .../V1/GrafeasClient/update_occurrence.php | 70 - .../v1/src/V1/Gapic/GrafeasGapicClient.php | 1031 ------- .../Grafeas/v1/src/V1/GrafeasClient.php | 34 - .../Grafeas/v1/src/V1/gapic_metadata.json | 88 - .../V1/resources/grafeas_client_config.json | 115 - .../resources/grafeas_descriptor_config.php | 38 - .../resources/grafeas_rest_client_config.php | 172 -- .../v1/tests/Unit/V1/GrafeasClientTest.php | 990 ------- .../src/GPBMetadata/Google/Iam/V2/Deny.php | 34 - .../src/GPBMetadata/Google/Iam/V2/Policy.php | Bin 3121 -> 0 bytes .../Cloud/Iam/V2/CreatePolicyRequest.php | 185 -- .../Cloud/Iam/V2/DeletePolicyRequest.php | 141 - .../src/Google/Cloud/Iam/V2/DenyRule.php | 425 --- .../Google/Cloud/Iam/V2/GetPolicyRequest.php | 91 - .../Cloud/Iam/V2/ListPoliciesRequest.php | 175 -- .../Cloud/Iam/V2/ListPoliciesResponse.php | 105 - .../Cloud/Iam/V2/PoliciesGrpcClient.php | 124 - .../proto/src/Google/Cloud/Iam/V2/Policy.php | 505 ---- .../Cloud/Iam/V2/PolicyOperationMetadata.php | 77 - .../src/Google/Cloud/Iam/V2/PolicyRule.php | 113 - .../Cloud/Iam/V2/UpdatePolicyRequest.php | 89 - .../V2/PoliciesClient/create_policy.php | 90 - .../V2/PoliciesClient/delete_policy.php | 86 - .../samples/V2/PoliciesClient/get_policy.php | 74 - .../V2/PoliciesClient/list_policies.php | 85 - .../V2/PoliciesClient/update_policy.php | 78 - .../v2/src/V2/Gapic/PoliciesGapicClient.php | 598 ---- .../Iam/v2/src/V2/PoliciesClient.php | 34 - .../Iam/v2/src/V2/gapic_metadata.json | 43 - .../V2/resources/policies_client_config.json | 59 - .../resources/policies_descriptor_config.php | 48 - .../resources/policies_rest_client_config.php | 80 - .../v2/tests/Unit/V2/PoliciesClientTest.php | 595 ---- .../Google/Iam/Credentials/V1/Common.php | 66 - .../Iam/Credentials/V1/Iamcredentials.php | 36 - .../V1/GenerateAccessTokenRequest.php | 245 -- .../V1/GenerateAccessTokenResponse.php | 113 - .../Credentials/V1/GenerateIdTokenRequest.php | 219 -- .../V1/GenerateIdTokenResponse.php | 65 - .../V1/IAMCredentialsGrpcClient.php | 103 - .../Iam/Credentials/V1/SignBlobRequest.php | 177 -- .../Iam/Credentials/V1/SignBlobResponse.php | 99 - .../Iam/Credentials/V1/SignJwtRequest.php | 177 -- .../Iam/Credentials/V1/SignJwtResponse.php | 99 - .../generate_access_token.php | 77 - .../generate_id_token.php | 72 - .../V1/IAMCredentialsClient/sign_blob.php | 71 - .../V1/IAMCredentialsClient/sign_jwt.php | 71 - .../V1/Gapic/IAMCredentialsGapicClient.php | 517 ---- .../v1/src/V1/IAMCredentialsClient.php | 34 - .../v1/src/V1/gapic_metadata.json | 38 - .../iam_credentials_client_config.json | 55 - .../iam_credentials_descriptor_config.php | 7 - .../iam_credentials_rest_client_config.php | 57 - .../Unit/V1/IAMCredentialsClientTest.php | 324 --- .../Google/Cloud/Iap/V1/Service.php | Bin 9409 -> 0 bytes .../Cloud/Iap/V1/AccessDeniedPageSettings.php | 261 -- .../Google/Cloud/Iap/V1/AccessSettings.php | 253 -- .../Cloud/Iap/V1/AllowedDomainsSettings.php | 112 - .../Cloud/Iap/V1/ApplicationSettings.php | 242 -- .../Iap/V1/AttributePropagationSettings.php | 252 -- .../OutputCredentials.php | 75 - ...ePropagationSettings_OutputCredentials.php | 16 - .../proto/src/Google/Cloud/Iap/V1/Brand.php | 182 -- .../src/Google/Cloud/Iap/V1/CorsSettings.php | 111 - .../Cloud/Iap/V1/CreateBrandRequest.php | 115 - .../CreateIdentityAwareProxyClientRequest.php | 123 - .../Iap/V1/CreateTunnelDestGroupRequest.php | 165 -- .../src/Google/Cloud/Iap/V1/CsmSettings.php | 113 - .../DeleteIdentityAwareProxyClientRequest.php | 75 - .../Iap/V1/DeleteTunnelDestGroupRequest.php | 75 - .../src/Google/Cloud/Iap/V1/GcipSettings.php | 170 -- .../Google/Cloud/Iap/V1/GetBrandRequest.php | 71 - .../Cloud/Iap/V1/GetIapSettingsRequest.php | 75 - .../V1/GetIdentityAwareProxyClientRequest.php | 75 - .../Iap/V1/GetTunnelDestGroupRequest.php | 75 - .../src/Google/Cloud/Iap/V1/IapSettings.php | 155 - ...entityAwareProxyAdminServiceGrpcClient.php | 199 -- .../Cloud/Iap/V1/IdentityAwareProxyClient.php | 135 - ...entityAwareProxyOAuthServiceGrpcClient.php | 170 -- .../Google/Cloud/Iap/V1/ListBrandsRequest.php | 71 - .../Cloud/Iap/V1/ListBrandsResponse.php | 67 - .../ListIdentityAwareProxyClientsRequest.php | 167 -- .../ListIdentityAwareProxyClientsResponse.php | 105 - .../Iap/V1/ListTunnelDestGroupsRequest.php | 175 -- .../Iap/V1/ListTunnelDestGroupsResponse.php | 105 - .../src/Google/Cloud/Iap/V1/OAuthSettings.php | 129 - .../Google/Cloud/Iap/V1/ReauthSettings.php | 153 - .../Cloud/Iap/V1/ReauthSettings/Method.php | 71 - .../Iap/V1/ReauthSettings/PolicyType.php | 69 - .../Cloud/Iap/V1/ReauthSettings_Method.php | 16 - .../Iap/V1/ReauthSettings_PolicyType.php | 16 - ...tIdentityAwareProxyClientSecretRequest.php | 75 - .../Google/Cloud/Iap/V1/TunnelDestGroup.php | 143 - .../Cloud/Iap/V1/UpdateIapSettingsRequest.php | 137 - .../Iap/V1/UpdateTunnelDestGroupRequest.php | 129 - .../create_tunnel_dest_group.php | 92 - .../delete_tunnel_dest_group.php | 70 - .../get_iam_policy.php | 69 - .../get_iap_settings.php | 67 - .../get_tunnel_dest_group.php | 72 - .../list_tunnel_dest_groups.php | 79 - .../set_iam_policy.php | 72 - .../test_iam_permissions.php | 77 - .../update_iap_settings.php | 70 - .../update_tunnel_dest_group.php | 71 - .../create_brand.php | 76 - .../create_identity_aware_proxy_client.php | 76 - .../delete_identity_aware_proxy_client.php | 67 - .../get_brand.php | 66 - .../get_identity_aware_proxy_client.php | 68 - .../list_brands.php | 66 - .../list_identity_aware_proxy_clients.php | 71 - ...set_identity_aware_proxy_client_secret.php | 68 - ...ntityAwareProxyAdminServiceGapicClient.php | 791 ----- ...ntityAwareProxyOAuthServiceGapicClient.php | 538 ---- .../IdentityAwareProxyAdminServiceClient.php | 34 - .../IdentityAwareProxyOAuthServiceClient.php | 34 - .../Iap/v1/src/V1/gapic_metadata.json | 117 - ...are_proxy_admin_service_client_config.json | 82 - ..._proxy_admin_service_descriptor_config.php | 18 - ...proxy_admin_service_rest_client_config.php | 130 - ...re_proxy_o_auth_service_client_config.json | 72 - ...proxy_o_auth_service_descriptor_config.php | 18 - ...roxy_o_auth_service_rest_client_config.php | 100 - ...entityAwareProxyAdminServiceClientTest.php | 701 ----- ...entityAwareProxyOAuthServiceClientTest.php | 580 ---- .../GPBMetadata/Google/Cloud/Ids/V1/Ids.php | Bin 3693 -> 0 bytes .../Cloud/Ids/V1/CreateEndpointRequest.php | 237 -- .../Cloud/Ids/V1/DeleteEndpointRequest.php | 139 - .../src/Google/Cloud/Ids/V1/Endpoint.php | 432 --- .../Google/Cloud/Ids/V1/Endpoint/Severity.php | 85 - .../Google/Cloud/Ids/V1/Endpoint/State.php | 71 - .../Google/Cloud/Ids/V1/Endpoint_Severity.php | 16 - .../Google/Cloud/Ids/V1/Endpoint_State.php | 16 - .../Cloud/Ids/V1/GetEndpointRequest.php | 69 - .../src/Google/Cloud/Ids/V1/IDSGrpcClient.php | 95 - .../Cloud/Ids/V1/ListEndpointsRequest.php | 225 -- .../Cloud/Ids/V1/ListEndpointsResponse.php | 137 - .../Google/Cloud/Ids/V1/OperationMetadata.php | 303 -- .../samples/V1/IDSClient/create_endpoint.php | 100 - .../samples/V1/IDSClient/delete_endpoint.php | 75 - .../v1/samples/V1/IDSClient/get_endpoint.php | 67 - .../samples/V1/IDSClient/list_endpoints.php | 71 - .../Ids/v1/src/V1/Gapic/IDSGapicClient.php | 634 ---- owl-bot-staging/Ids/v1/src/V1/IDSClient.php | 34 - .../Ids/v1/src/V1/gapic_metadata.json | 38 - .../src/V1/resources/ids_client_config.json | 74 - .../V1/resources/ids_descriptor_config.php | 38 - .../V1/resources/ids_rest_client_config.php | 165 -- .../Ids/v1/tests/Unit/V1/IDSClientTest.php | 468 --- .../Google/Cloud/Iot/V1/DeviceManager.php | Bin 9166 -> 0 bytes .../Google/Cloud/Iot/V1/Resources.php | Bin 4609 -> 0 bytes .../Iot/V1/BindDeviceToGatewayRequest.php | 151 - .../Iot/V1/BindDeviceToGatewayResponse.php | 33 - .../Iot/V1/CreateDeviceRegistryRequest.php | 123 - .../Cloud/Iot/V1/CreateDeviceRequest.php | 127 - .../Iot/V1/DeleteDeviceRegistryRequest.php | 71 - .../Cloud/Iot/V1/DeleteDeviceRequest.php | 75 - .../proto/src/Google/Cloud/Iot/V1/Device.php | 891 ------ .../src/Google/Cloud/Iot/V1/DeviceConfig.php | 237 -- .../Google/Cloud/Iot/V1/DeviceCredential.php | 157 - .../Cloud/Iot/V1/DeviceManagerGrpcClient.php | 341 --- .../Google/Cloud/Iot/V1/DeviceRegistry.php | 435 --- .../src/Google/Cloud/Iot/V1/DeviceState.php | 115 - .../Cloud/Iot/V1/EventNotificationConfig.php | 117 - .../Google/Cloud/Iot/V1/GatewayAuthMethod.php | 74 - .../src/Google/Cloud/Iot/V1/GatewayConfig.php | 187 -- .../Cloud/Iot/V1/GatewayListOptions.php | 165 -- .../src/Google/Cloud/Iot/V1/GatewayType.php | 61 - .../Cloud/Iot/V1/GetDeviceRegistryRequest.php | 71 - .../Google/Cloud/Iot/V1/GetDeviceRequest.php | 127 - .../src/Google/Cloud/Iot/V1/HttpConfig.php | 71 - .../src/Google/Cloud/Iot/V1/HttpState.php | 63 - .../V1/ListDeviceConfigVersionsRequest.php | 117 - .../V1/ListDeviceConfigVersionsResponse.php | 71 - .../Iot/V1/ListDeviceRegistriesRequest.php | 159 - .../Iot/V1/ListDeviceRegistriesResponse.php | 109 - .../Cloud/Iot/V1/ListDeviceStatesRequest.php | 117 - .../Cloud/Iot/V1/ListDeviceStatesResponse.php | 71 - .../Cloud/Iot/V1/ListDevicesRequest.php | 335 --- .../Cloud/Iot/V1/ListDevicesResponse.php | 105 - .../src/Google/Cloud/Iot/V1/LogLevel.php | 80 - .../V1/ModifyCloudToDeviceConfigRequest.php | 159 - .../src/Google/Cloud/Iot/V1/MqttConfig.php | 71 - .../src/Google/Cloud/Iot/V1/MqttState.php | 62 - .../Cloud/Iot/V1/PublicKeyCertificate.php | 145 - .../Iot/V1/PublicKeyCertificateFormat.php | 57 - .../Cloud/Iot/V1/PublicKeyCredential.php | 101 - .../Google/Cloud/Iot/V1/PublicKeyFormat.php | 87 - .../Cloud/Iot/V1/RegistryCredential.php | 75 - .../Iot/V1/SendCommandToDeviceRequest.php | 159 - .../Iot/V1/SendCommandToDeviceResponse.php | 33 - .../Cloud/Iot/V1/StateNotificationConfig.php | 71 - .../Iot/V1/UnbindDeviceFromGatewayRequest.php | 151 - .../V1/UnbindDeviceFromGatewayResponse.php | 33 - .../Iot/V1/UpdateDeviceRegistryRequest.php | 145 - .../Cloud/Iot/V1/UpdateDeviceRequest.php | 145 - .../Cloud/Iot/V1/X509CertificateDetails.php | 257 -- .../bind_device_to_gateway.php | 77 - .../V1/DeviceManagerClient/create_device.php | 71 - .../create_device_registry.php | 70 - .../V1/DeviceManagerClient/delete_device.php | 71 - .../delete_device_registry.php | 65 - .../V1/DeviceManagerClient/get_device.php | 73 - .../get_device_registry.php | 67 - .../V1/DeviceManagerClient/get_iam_policy.php | 68 - .../list_device_config_versions.php | 74 - .../list_device_registries.php | 72 - .../list_device_states.php | 74 - .../V1/DeviceManagerClient/list_devices.php | 72 - .../modify_cloud_to_device_config.php | 77 - .../send_command_to_device.php | 87 - .../V1/DeviceManagerClient/set_iam_policy.php | 70 - .../test_iam_permissions.php | 76 - .../unbind_device_from_gateway.php | 77 - .../V1/DeviceManagerClient/update_device.php | 58 - .../update_device_registry.php | 58 - .../Iot/v1/src/V1/DeviceManagerClient.php | 34 - .../src/V1/Gapic/DeviceManagerGapicClient.php | 1337 --------- .../Iot/v1/src/V1/gapic_metadata.json | 113 - .../device_manager_client_config.json | 154 - .../device_manager_descriptor_config.php | 28 - .../device_manager_rest_client_config.php | 320 -- .../tests/Unit/V1/DeviceManagerClientTest.php | 1290 --------- .../Google/Cloud/Kms/V1/EkmService.php | 86 - .../Google/Cloud/Kms/V1/Resources.php | Bin 6758 -> 0 bytes .../Google/Cloud/Kms/V1/Service.php | Bin 13400 -> 0 bytes .../Cloud/Kms/V1/AsymmetricDecryptRequest.php | 297 -- .../Kms/V1/AsymmetricDecryptResponse.php | 339 --- .../Cloud/Kms/V1/AsymmetricSignRequest.php | 544 ---- .../Cloud/Kms/V1/AsymmetricSignResponse.php | 463 --- .../src/Google/Cloud/Kms/V1/Certificate.php | 388 --- .../Cloud/Kms/V1/CreateCryptoKeyRequest.php | 220 -- .../Kms/V1/CreateCryptoKeyVersionRequest.php | 124 - .../Kms/V1/CreateEkmConnectionRequest.php | 162 -- .../Cloud/Kms/V1/CreateImportJobRequest.php | 162 -- .../Cloud/Kms/V1/CreateKeyRingRequest.php | 162 -- .../src/Google/Cloud/Kms/V1/CryptoKey.php | 676 ----- .../Kms/V1/CryptoKey/CryptoKeyPurpose.php | 93 - .../Google/Cloud/Kms/V1/CryptoKeyVersion.php | 731 ----- .../CryptoKeyVersionAlgorithm.php | 280 -- .../CryptoKeyVersionState.php | 125 - .../CryptoKeyVersion/CryptoKeyVersionView.php | 67 - .../Cloud/Kms/V1/CryptoKeyVersionTemplate.php | 150 - ...toKeyVersion_CryptoKeyVersionAlgorithm.php | 16 - ...CryptoKeyVersion_CryptoKeyVersionState.php | 16 - .../CryptoKeyVersion_CryptoKeyVersionView.php | 16 - .../Kms/V1/CryptoKey_CryptoKeyPurpose.php | 16 - .../Google/Cloud/Kms/V1/DecryptRequest.php | 510 ---- .../Google/Cloud/Kms/V1/DecryptResponse.php | 315 -- .../Kms/V1/DestroyCryptoKeyVersionRequest.php | 72 - .../proto/src/Google/Cloud/Kms/V1/Digest.php | 141 - .../src/Google/Cloud/Kms/V1/EkmConnection.php | 222 -- .../Kms/V1/EkmConnection/ServiceResolver.php | 206 -- .../Kms/V1/EkmConnection_ServiceResolver.php | 16 - .../Cloud/Kms/V1/EkmServiceGrpcClient.php | 101 - .../Google/Cloud/Kms/V1/EncryptRequest.php | 594 ---- .../Google/Cloud/Kms/V1/EncryptResponse.php | 471 --- .../Kms/V1/ExternalProtectionLevelOptions.php | 122 - .../Kms/V1/GenerateRandomBytesRequest.php | 156 - .../Kms/V1/GenerateRandomBytesResponse.php | 211 -- .../Cloud/Kms/V1/GetCryptoKeyRequest.php | 72 - .../Kms/V1/GetCryptoKeyVersionRequest.php | 72 - .../Cloud/Kms/V1/GetEkmConnectionRequest.php | 72 - .../Cloud/Kms/V1/GetImportJobRequest.php | 72 - .../Google/Cloud/Kms/V1/GetKeyRingRequest.php | 72 - .../Cloud/Kms/V1/GetPublicKeyRequest.php | 72 - .../Kms/V1/ImportCryptoKeyVersionRequest.php | 491 ---- .../src/Google/Cloud/Kms/V1/ImportJob.php | 549 ---- .../Cloud/Kms/V1/ImportJob/ImportJobState.php | 79 - .../Cloud/Kms/V1/ImportJob/ImportMethod.php | 120 - .../Kms/V1/ImportJob/WrappingPublicKey.php | 88 - .../Cloud/Kms/V1/ImportJob_ImportJobState.php | 16 - .../Cloud/Kms/V1/ImportJob_ImportMethod.php | 16 - .../Kms/V1/ImportJob_WrappingPublicKey.php | 16 - .../Kms/V1/KeyManagementServiceGrpcClient.php | 530 ---- .../Cloud/Kms/V1/KeyOperationAttestation.php | 151 - .../AttestationFormat.php | 68 - .../CertificateChains.php | 140 - ...OperationAttestation_AttestationFormat.php | 16 - ...OperationAttestation_CertificateChains.php | 16 - .../proto/src/Google/Cloud/Kms/V1/KeyRing.php | 124 - .../Kms/V1/ListCryptoKeyVersionsRequest.php | 298 -- .../Kms/V1/ListCryptoKeyVersionsResponse.php | 152 - .../Cloud/Kms/V1/ListCryptoKeysRequest.php | 294 -- .../Cloud/Kms/V1/ListCryptoKeysResponse.php | 148 - .../Kms/V1/ListEkmConnectionsRequest.php | 264 -- .../Kms/V1/ListEkmConnectionsResponse.php | 148 - .../Cloud/Kms/V1/ListImportJobsRequest.php | 260 -- .../Cloud/Kms/V1/ListImportJobsResponse.php | 148 - .../Cloud/Kms/V1/ListKeyRingsRequest.php | 264 -- .../Cloud/Kms/V1/ListKeyRingsResponse.php | 148 - .../Google/Cloud/Kms/V1/LocationMetadata.php | 126 - .../Google/Cloud/Kms/V1/MacSignRequest.php | 281 -- .../Google/Cloud/Kms/V1/MacSignResponse.php | 377 --- .../Google/Cloud/Kms/V1/MacVerifyRequest.php | 486 ---- .../Google/Cloud/Kms/V1/MacVerifyResponse.php | 386 --- .../Google/Cloud/Kms/V1/ProtectionLevel.php | 77 - .../src/Google/Cloud/Kms/V1/PublicKey.php | 354 --- .../Kms/V1/RestoreCryptoKeyVersionRequest.php | 72 - .../UpdateCryptoKeyPrimaryVersionRequest.php | 110 - .../Cloud/Kms/V1/UpdateCryptoKeyRequest.php | 122 - .../Kms/V1/UpdateCryptoKeyVersionRequest.php | 126 - .../Kms/V1/UpdateEkmConnectionRequest.php | 126 - .../create_ekm_connection.php | 79 - .../EkmServiceClient/get_ekm_connection.php | 68 - .../V1/EkmServiceClient/get_iam_policy.php | 67 - .../V1/EkmServiceClient/get_location.php | 53 - .../EkmServiceClient/list_ekm_connections.php | 73 - .../V1/EkmServiceClient/list_locations.php | 58 - .../V1/EkmServiceClient/set_iam_policy.php | 73 - .../EkmServiceClient/test_iam_permissions.php | 80 - .../update_ekm_connection.php | 58 - .../asymmetric_decrypt.php | 82 - .../asymmetric_sign.php | 82 - .../create_crypto_key.php | 82 - .../create_crypto_key_version.php | 84 - .../create_import_job.php | 105 - .../create_key_ring.php | 75 - .../V1/KeyManagementServiceClient/decrypt.php | 79 - .../destroy_crypto_key_version.php | 93 - .../V1/KeyManagementServiceClient/encrypt.php | 86 - .../generate_random_bytes.php | 54 - .../get_crypto_key.php | 74 - .../get_crypto_key_version.php | 74 - .../get_iam_policy.php | 67 - .../get_import_job.php | 72 - .../get_key_ring.php | 67 - .../get_location.php | 53 - .../get_public_key.php | 78 - .../import_crypto_key_version.php | 100 - .../list_crypto_key_versions.php | 78 - .../list_crypto_keys.php | 72 - .../list_import_jobs.php | 72 - .../list_key_rings.php | 73 - .../list_locations.php | 58 - .../KeyManagementServiceClient/mac_sign.php | 79 - .../KeyManagementServiceClient/mac_verify.php | 83 - .../restore_crypto_key_version.php | 81 - .../set_iam_policy.php | 73 - .../test_iam_permissions.php | 80 - .../update_crypto_key.php | 58 - .../update_crypto_key_primary_version.php | 85 - .../update_crypto_key_version.php | 69 - .../Kms/v1/src/V1/EkmServiceClient.php | 34 - .../v1/src/V1/Gapic/EkmServiceGapicClient.php | 797 ----- .../Gapic/KeyManagementServiceGapicClient.php | 2551 ---------------- .../v1/src/V1/KeyManagementServiceClient.php | 34 - .../Kms/v1/src/V1/gapic_metadata.json | 227 -- .../resources/ekm_service_client_config.json | 71 - .../ekm_service_descriptor_config.php | 28 - .../ekm_service_rest_client_config.php | 185 -- .../key_management_service_client_config.json | 181 -- ...y_management_service_descriptor_config.php | 58 - ..._management_service_rest_client_config.php | 452 --- .../v1/tests/Unit/V1/EkmServiceClientTest.php | 645 ----- .../V1/KeyManagementServiceClientTest.php | 2155 -------------- .../Cloud/Language/V1/LanguageService.php | Bin 9584 -> 0 bytes .../Language/V1/AnalyzeEntitiesRequest.php | 111 - .../Language/V1/AnalyzeEntitiesResponse.php | 109 - .../V1/AnalyzeEntitySentimentRequest.php | 111 - .../V1/AnalyzeEntitySentimentResponse.php | 109 - .../Language/V1/AnalyzeSentimentRequest.php | 111 - .../Language/V1/AnalyzeSentimentResponse.php | 153 - .../Language/V1/AnalyzeSyntaxRequest.php | 111 - .../Language/V1/AnalyzeSyntaxResponse.php | 143 - .../Cloud/Language/V1/AnnotateTextRequest.php | 156 - .../V1/AnnotateTextRequest/Features.php | 255 -- .../V1/AnnotateTextRequest_Features.php | 16 - .../Language/V1/AnnotateTextResponse.php | 279 -- .../Language/V1/ClassificationCategory.php | 109 - .../V1/ClassificationModelOptions.php | 117 - .../V1/ClassificationModelOptions/V1Model.php | 36 - .../V1/ClassificationModelOptions/V2Model.php | 70 - .../V2Model/ContentCategoriesVersion.php | 65 - .../V1/ClassificationModelOptions_V1Model.php | 16 - .../V1/ClassificationModelOptions_V2Model.php | 16 - ...tions_V2Model_ContentCategoriesVersion.php | 16 - .../Cloud/Language/V1/ClassifyTextRequest.php | 125 - .../Language/V1/ClassifyTextResponse.php | 67 - .../Cloud/Language/V1/DependencyEdge.php | 119 - .../Language/V1/DependencyEdge/Label.php | 628 ---- .../Language/V1/DependencyEdge_Label.php | 16 - .../src/Google/Cloud/Language/V1/Document.php | 220 -- .../Cloud/Language/V1/Document/Type.php | 64 - .../Cloud/Language/V1/Document_Type.php | 16 - .../Google/Cloud/Language/V1/EncodingType.php | 79 - .../src/Google/Cloud/Language/V1/Entity.php | 293 -- .../Google/Cloud/Language/V1/Entity/Type.php | 163 -- .../Cloud/Language/V1/EntityMention.php | 168 -- .../Cloud/Language/V1/EntityMention/Type.php | 64 - .../Cloud/Language/V1/EntityMention_Type.php | 16 - .../Google/Cloud/Language/V1/Entity_Type.php | 16 - .../Language/V1/LanguageServiceGrpcClient.php | 132 - .../Google/Cloud/Language/V1/PartOfSpeech.php | 443 --- .../Cloud/Language/V1/PartOfSpeech/Aspect.php | 71 - .../Cloud/Language/V1/PartOfSpeech/Form.php | 130 - .../Cloud/Language/V1/PartOfSpeech/Gender.php | 71 - .../Cloud/Language/V1/PartOfSpeech/Mood.php | 92 - .../Cloud/Language/V1/PartOfSpeech/Number.php | 71 - .../Cloud/Language/V1/PartOfSpeech/PBCase.php | 150 - .../Cloud/Language/V1/PartOfSpeech/Person.php | 78 - .../Cloud/Language/V1/PartOfSpeech/Proper.php | 64 - .../Language/V1/PartOfSpeech/Reciprocity.php | 65 - .../Cloud/Language/V1/PartOfSpeech/Tag.php | 141 - .../Cloud/Language/V1/PartOfSpeech/Tense.php | 92 - .../Cloud/Language/V1/PartOfSpeech/Voice.php | 72 - .../Cloud/Language/V1/PartOfSpeech_Aspect.php | 16 - .../Cloud/Language/V1/PartOfSpeech_Case.php | 16 - .../Cloud/Language/V1/PartOfSpeech_Form.php | 16 - .../Cloud/Language/V1/PartOfSpeech_Gender.php | 16 - .../Cloud/Language/V1/PartOfSpeech_Mood.php | 16 - .../Cloud/Language/V1/PartOfSpeech_Number.php | 16 - .../Cloud/Language/V1/PartOfSpeech_Person.php | 16 - .../Cloud/Language/V1/PartOfSpeech_Proper.php | 16 - .../Language/V1/PartOfSpeech_Reciprocity.php | 16 - .../Cloud/Language/V1/PartOfSpeech_Tag.php | 16 - .../Cloud/Language/V1/PartOfSpeech_Tense.php | 16 - .../Cloud/Language/V1/PartOfSpeech_Voice.php | 16 - .../src/Google/Cloud/Language/V1/Sentence.php | 129 - .../Google/Cloud/Language/V1/Sentiment.php | 114 - .../src/Google/Cloud/Language/V1/TextSpan.php | 105 - .../src/Google/Cloud/Language/V1/Token.php | 199 -- .../analyze_entities.php | 59 - .../analyze_entity_sentiment.php | 58 - .../analyze_sentiment.php | 57 - .../LanguageServiceClient/analyze_syntax.php | 59 - .../LanguageServiceClient/annotate_text.php | 60 - .../LanguageServiceClient/classify_text.php | 57 - .../V1/Gapic/LanguageServiceGapicClient.php | 428 --- .../v1/src/V1/LanguageServiceClient.php | 34 - .../Language/v1/src/V1/gapic_metadata.json | 48 - .../language_service_client_config.json | 65 - .../language_service_descriptor_config.php | 7 - .../language_service_rest_client_config.php | 39 - .../Unit/V1/LanguageServiceClientTest.php | 430 --- .../Language/V1Beta2/LanguageService.php | Bin 10213 -> 0 bytes .../V1beta2/AnalyzeEntitiesRequest.php | 111 - .../V1beta2/AnalyzeEntitiesResponse.php | 109 - .../V1beta2/AnalyzeEntitySentimentRequest.php | 111 - .../AnalyzeEntitySentimentResponse.php | 109 - .../V1beta2/AnalyzeSentimentRequest.php | 115 - .../V1beta2/AnalyzeSentimentResponse.php | 153 - .../Language/V1beta2/AnalyzeSyntaxRequest.php | 111 - .../V1beta2/AnalyzeSyntaxResponse.php | 143 - .../Language/V1beta2/AnnotateTextRequest.php | 156 - .../V1beta2/AnnotateTextRequest/Features.php | 268 -- .../V1beta2/AnnotateTextRequest_Features.php | 16 - .../Language/V1beta2/AnnotateTextResponse.php | 279 -- .../V1beta2/ClassificationCategory.php | 109 - .../V1beta2/ClassificationModelOptions.php | 117 - .../ClassificationModelOptions/V1Model.php | 36 - .../ClassificationModelOptions/V2Model.php | 70 - .../V2Model/ContentCategoriesVersion.php | 65 - .../ClassificationModelOptions_V1Model.php | 16 - .../ClassificationModelOptions_V2Model.php | 16 - ...tions_V2Model_ContentCategoriesVersion.php | 16 - .../Language/V1beta2/ClassifyTextRequest.php | 125 - .../Language/V1beta2/ClassifyTextResponse.php | 67 - .../Cloud/Language/V1beta2/DependencyEdge.php | 117 - .../Language/V1beta2/DependencyEdge/Label.php | 628 ---- .../Language/V1beta2/DependencyEdge_Label.php | 16 - .../Cloud/Language/V1beta2/Document.php | 300 -- .../V1beta2/Document/BoilerplateHandling.php | 65 - .../Cloud/Language/V1beta2/Document/Type.php | 64 - .../V1beta2/Document_BoilerplateHandling.php | 16 - .../Cloud/Language/V1beta2/Document_Type.php | 16 - .../Cloud/Language/V1beta2/EncodingType.php | 79 - .../Google/Cloud/Language/V1beta2/Entity.php | 293 -- .../Cloud/Language/V1beta2/Entity/Type.php | 163 -- .../Cloud/Language/V1beta2/EntityMention.php | 168 -- .../Language/V1beta2/EntityMention/Type.php | 64 - .../Language/V1beta2/EntityMention_Type.php | 16 - .../Cloud/Language/V1beta2/Entity_Type.php | 16 - .../V1beta2/LanguageServiceGrpcClient.php | 132 - .../Cloud/Language/V1beta2/PartOfSpeech.php | 441 --- .../Language/V1beta2/PartOfSpeech/Aspect.php | 71 - .../Language/V1beta2/PartOfSpeech/Form.php | 130 - .../Language/V1beta2/PartOfSpeech/Gender.php | 71 - .../Language/V1beta2/PartOfSpeech/Mood.php | 92 - .../Language/V1beta2/PartOfSpeech/Number.php | 71 - .../Language/V1beta2/PartOfSpeech/PBCase.php | 150 - .../Language/V1beta2/PartOfSpeech/Person.php | 78 - .../Language/V1beta2/PartOfSpeech/Proper.php | 64 - .../V1beta2/PartOfSpeech/Reciprocity.php | 65 - .../Language/V1beta2/PartOfSpeech/Tag.php | 141 - .../Language/V1beta2/PartOfSpeech/Tense.php | 92 - .../Language/V1beta2/PartOfSpeech/Voice.php | 72 - .../Language/V1beta2/PartOfSpeech_Aspect.php | 16 - .../Language/V1beta2/PartOfSpeech_Case.php | 16 - .../Language/V1beta2/PartOfSpeech_Form.php | 16 - .../Language/V1beta2/PartOfSpeech_Gender.php | 16 - .../Language/V1beta2/PartOfSpeech_Mood.php | 16 - .../Language/V1beta2/PartOfSpeech_Number.php | 16 - .../Language/V1beta2/PartOfSpeech_Person.php | 16 - .../Language/V1beta2/PartOfSpeech_Proper.php | 16 - .../V1beta2/PartOfSpeech_Reciprocity.php | 16 - .../Language/V1beta2/PartOfSpeech_Tag.php | 16 - .../Language/V1beta2/PartOfSpeech_Tense.php | 16 - .../Language/V1beta2/PartOfSpeech_Voice.php | 16 - .../Cloud/Language/V1beta2/Sentence.php | 129 - .../Cloud/Language/V1beta2/Sentiment.php | 115 - .../Cloud/Language/V1beta2/TextSpan.php | 105 - .../Google/Cloud/Language/V1beta2/Token.php | 199 -- .../analyze_entities.php | 59 - .../analyze_entity_sentiment.php | 58 - .../analyze_sentiment.php | 57 - .../LanguageServiceClient/analyze_syntax.php | 59 - .../LanguageServiceClient/annotate_text.php | 60 - .../LanguageServiceClient/classify_text.php | 57 - .../Gapic/LanguageServiceGapicClient.php | 447 --- .../src/V1beta2/LanguageServiceClient.php | 36 - .../v1beta2/src/V1beta2/gapic_metadata.json | 48 - .../language_service_client_config.json | 65 - .../language_service_descriptor_config.php | 7 - .../language_service_rest_client_config.php | 39 - .../V1beta2/LanguageServiceClientTest.php | 430 --- 1802 files changed, 31 insertions(+), 256190 deletions(-) delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/GPBMetadata/Google/Cloud/Domains/V1Alpha2/Domains.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/AuthorizationCode.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureContactSettingsRequest.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureDnsSettingsRequest.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureManagementSettingsRequest.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactNotice.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactPrivacy.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings/Contact.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings_Contact.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DeleteRegistrationRequest.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/CustomDns.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/Algorithm.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/DigestType.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsState.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GlueRecord.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GoogleDomainsDns.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_CustomDns.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_DsRecord.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_DsRecord_Algorithm.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_DsRecord_DigestType.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_DsState.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_GlueRecord.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_GoogleDomainsDns.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DomainNotice.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DomainsGrpcClient.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ExportRegistrationRequest.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/GetRegistrationRequest.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsRequest.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsResponse.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings/RenewalMethod.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings_RenewalMethod.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/OperationMetadata.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterDomainRequest.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters/Availability.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters_Availability.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/Issue.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/State.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration_Issue.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration_State.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ResetAuthorizationCodeRequest.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveAuthorizationCodeRequest.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersRequest.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersResponse.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersRequest.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersResponse.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsRequest.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsResponse.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferDomainRequest.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferLockState.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferParameters.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/UpdateRegistrationRequest.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_contact_settings.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_dns_settings.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_management_settings.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/delete_registration.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/export_registration.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/get_registration.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/list_registrations.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/register_domain.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/reset_authorization_code.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_authorization_code.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_register_parameters.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_transfer_parameters.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/search_domains.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/transfer_domain.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/update_registration.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/src/V1alpha2/DomainsClient.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/src/V1alpha2/Gapic/DomainsGapicClient.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/src/V1alpha2/gapic_metadata.json delete mode 100644 owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_client_config.json delete mode 100644 owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_descriptor_config.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_rest_client_config.php delete mode 100644 owl-bot-staging/Domains/v1alpha2/tests/Unit/V1alpha2/DomainsClientTest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/GPBMetadata/Google/Cloud/Domains/V1Beta1/Domains.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/AuthorizationCode.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureContactSettingsRequest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureDnsSettingsRequest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureManagementSettingsRequest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactNotice.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactPrivacy.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings/Contact.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings_Contact.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DeleteRegistrationRequest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/CustomDns.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/Algorithm.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/DigestType.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsState.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GlueRecord.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GoogleDomainsDns.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_CustomDns.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_DsRecord.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_DsRecord_Algorithm.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_DsRecord_DigestType.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_DsState.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_GlueRecord.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_GoogleDomainsDns.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DomainNotice.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DomainsGrpcClient.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ExportRegistrationRequest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/GetRegistrationRequest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsRequest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsResponse.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings/RenewalMethod.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings_RenewalMethod.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/OperationMetadata.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterDomainRequest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters/Availability.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters_Availability.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/Issue.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/State.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration_Issue.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration_State.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ResetAuthorizationCodeRequest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveAuthorizationCodeRequest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersRequest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersResponse.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersRequest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersResponse.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsRequest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsResponse.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferDomainRequest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferLockState.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferParameters.php delete mode 100644 owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/UpdateRegistrationRequest.php delete mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_contact_settings.php delete mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_dns_settings.php delete mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_management_settings.php delete mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/delete_registration.php delete mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/export_registration.php delete mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/get_registration.php delete mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/list_registrations.php delete mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/register_domain.php delete mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/reset_authorization_code.php delete mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_authorization_code.php delete mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_register_parameters.php delete mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_transfer_parameters.php delete mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/search_domains.php delete mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/transfer_domain.php delete mode 100644 owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/update_registration.php delete mode 100644 owl-bot-staging/Domains/v1beta1/src/V1beta1/DomainsClient.php delete mode 100644 owl-bot-staging/Domains/v1beta1/src/V1beta1/Gapic/DomainsGapicClient.php delete mode 100644 owl-bot-staging/Domains/v1beta1/src/V1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_client_config.json delete mode 100644 owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_descriptor_config.php delete mode 100644 owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_rest_client_config.php delete mode 100644 owl-bot-staging/Domains/v1beta1/tests/Unit/V1beta1/DomainsClientTest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ReportErrorsService.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorStatsServiceClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorGroupServiceGapicClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_client_config.json delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_descriptor_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/GPBMetadata/Google/Cloud/Essentialcontacts/V1/Enums.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/GPBMetadata/Google/Cloud/Essentialcontacts/V1/Service.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsRequest.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsResponse.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/Contact.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/CreateContactRequest.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/DeleteContactRequest.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/EssentialContactsServiceGrpcClient.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/GetContactRequest.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsRequest.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsResponse.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/NotificationCategory.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/SendTestMessageRequest.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/UpdateContactRequest.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ValidationState.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/compute_contacts.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/create_contact.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/delete_contact.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/get_contact.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/list_contacts.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/send_test_message.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/update_contact.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/src/V1/EssentialContactsServiceClient.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/src/V1/Gapic/EssentialContactsServiceGapicClient.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_client_config.json delete mode 100644 owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_descriptor_config.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_rest_client_config.php delete mode 100644 owl-bot-staging/EssentialContacts/v1/tests/Unit/V1/EssentialContactsServiceClientTest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Channel.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/ChannelConnection.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Discovery.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Eventarc.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Trigger.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel/State.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ChannelConnection.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel_State.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CloudRun.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelConnectionRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateTriggerRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelConnectionRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteTriggerRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Destination.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventFilter.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventType.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventarcGrpcClient.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/FilteringAttribute.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GKE.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelConnectionRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetGoogleChannelConfigRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetProviderRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetTriggerRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsResponse.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsResponse.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersResponse.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersResponse.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Provider.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Pubsub.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/StateCondition.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Transport.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Trigger.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateChannelRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateGoogleChannelConfigRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateTriggerRequest.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel_connection.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_trigger.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel_connection.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_trigger.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel_connection.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_google_channel_config.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_location.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_provider.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_trigger.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channel_connections.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channels.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_locations.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_providers.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_triggers.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_channel.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_google_channel_config.php delete mode 100644 owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_trigger.php delete mode 100644 owl-bot-staging/Eventarc/v1/src/V1/EventarcClient.php delete mode 100644 owl-bot-staging/Eventarc/v1/src/V1/Gapic/EventarcGapicClient.php delete mode 100644 owl-bot-staging/Eventarc/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_client_config.json delete mode 100644 owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_descriptor_config.php delete mode 100644 owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_rest_client_config.php delete mode 100644 owl-bot-staging/Eventarc/v1/tests/Unit/V1/EventarcClientTest.php delete mode 100644 owl-bot-staging/EventarcPublishing/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/Publishing/V1/Publisher.php delete mode 100644 owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsRequest.php delete mode 100644 owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsResponse.php delete mode 100644 owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsRequest.php delete mode 100644 owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsResponse.php delete mode 100644 owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublisherGrpcClient.php delete mode 100644 owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_channel_connection_events.php delete mode 100644 owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_events.php delete mode 100644 owl-bot-staging/EventarcPublishing/v1/src/V1/Gapic/PublisherGapicClient.php delete mode 100644 owl-bot-staging/EventarcPublishing/v1/src/V1/PublisherClient.php delete mode 100644 owl-bot-staging/EventarcPublishing/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_client_config.json delete mode 100644 owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_descriptor_config.php delete mode 100644 owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_rest_client_config.php delete mode 100644 owl-bot-staging/EventarcPublishing/v1/tests/Unit/V1/PublisherClientTest.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/GPBMetadata/Google/Cloud/Filestore/V1/CloudFilestoreService.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup/State.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup_State.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CloudFilestoreManagerGrpcClient.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateBackupRequest.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateInstanceRequest.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteBackupRequest.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteInstanceRequest.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/FileShareConfig.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetBackupRequest.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetInstanceRequest.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/State.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/Tier.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance_State.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance_Tier.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsRequest.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsResponse.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesRequest.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesResponse.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig/AddressMode.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig_AddressMode.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/AccessMode.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/SquashMode.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions_AccessMode.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions_SquashMode.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/RestoreInstanceRequest.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateBackupRequest.php delete mode 100644 owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateInstanceRequest.php delete mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_backup.php delete mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_instance.php delete mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_backup.php delete mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_instance.php delete mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_backup.php delete mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_instance.php delete mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_backups.php delete mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_instances.php delete mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/restore_instance.php delete mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_backup.php delete mode 100644 owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_instance.php delete mode 100644 owl-bot-staging/Filestore/v1/src/V1/CloudFilestoreManagerClient.php delete mode 100644 owl-bot-staging/Filestore/v1/src/V1/Gapic/CloudFilestoreManagerGapicClient.php delete mode 100644 owl-bot-staging/Filestore/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_client_config.json delete mode 100644 owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_descriptor_config.php delete mode 100644 owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_rest_client_config.php delete mode 100644 owl-bot-staging/Filestore/v1/tests/Unit/V1/CloudFilestoreManagerClientTest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database_AppEngineIntegrationMode.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database_ConcurrencyMode.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database_DatabaseType.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata_IndexConfigDelta.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata_IndexConfigDelta_ChangeType.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata_TtlConfigDelta.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata_TtlConfigDelta_ChangeType.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field_IndexConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field_TtlConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field_TtlConfig_State.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FirestoreAdminGrpcClient.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_IndexField.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_IndexField_ArrayConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_IndexField_Order.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_QueryScope.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_State.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/FirestoreAdminClient.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/Gapic/FirestoreAdminGapicClient.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/FirestoreAdminClientTest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform_FieldTransform.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform_FieldTransform_ServerValue.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/FirestoreGrpcClient.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery_Aggregation.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery_Aggregation_Count.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_CollectionSelector.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_CompositeFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_CompositeFilter_Operator.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_Direction.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_FieldFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_FieldFilter_Operator.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_FieldReference.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_Filter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_Order.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_Projection.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_UnaryFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_UnaryFilter_Operator.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange_TargetChangeType.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target_DocumentsTarget.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target_QueryTarget.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadOnly.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions_ReadOnly.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions_ReadWrite.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/FirestoreClient.php delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/Gapic/FirestoreGapicClient.php delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php delete mode 100644 owl-bot-staging/Firestore/v1/tests/Unit/V1/FirestoreClientTest.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/GPBMetadata/Google/Cloud/Functions/V1/Functions.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/GPBMetadata/Google/Cloud/Functions/V1/Operations.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionRequest.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionResponse.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/DockerRegistry.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/IngressSettings.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/VpcConnectorEgressSettings.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunctionStatus.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction_DockerRegistry.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction_IngressSettings.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction_VpcConnectorEgressSettings.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunctionsServiceGrpcClient.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CreateFunctionRequest.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/DeleteFunctionRequest.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/EventTrigger.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy/Retry.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy_Retry.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateDownloadUrlRequest.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateDownloadUrlResponse.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlRequest.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlResponse.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GetFunctionRequest.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger/SecurityLevel.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger_SecurityLevel.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/ListFunctionsRequest.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/ListFunctionsResponse.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationMetadataV1.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationType.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretEnvVar.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume/SecretVersion.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume_SecretVersion.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SourceRepository.php delete mode 100644 owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/UpdateFunctionRequest.php delete mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/call_function.php delete mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/create_function.php delete mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/delete_function.php delete mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_download_url.php delete mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_upload_url.php delete mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_function.php delete mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/list_functions.php delete mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/update_function.php delete mode 100644 owl-bot-staging/Functions/v1/src/V1/CloudFunctionsServiceClient.php delete mode 100644 owl-bot-staging/Functions/v1/src/V1/Gapic/CloudFunctionsServiceGapicClient.php delete mode 100644 owl-bot-staging/Functions/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_client_config.json delete mode 100644 owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_descriptor_config.php delete mode 100644 owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_rest_client_config.php delete mode 100644 owl-bot-staging/Functions/v1/tests/Unit/V1/CloudFunctionsServiceClientTest.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/GPBMetadata/Google/Cloud/Functions/V2/Functions.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/BuildConfig.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/CreateFunctionRequest.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/DeleteFunctionRequest.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Environment.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventFilter.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger/RetryPolicy.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger_RetryPolicy.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/FunctionServiceGrpcClient.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Function_State.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlRequest.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlResponse.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlRequest.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlResponse.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GetFunctionRequest.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsRequest.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsResponse.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesRequest.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/Runtime.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/RuntimeStage.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse_Runtime.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse_RuntimeStage.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/OperationMetadata.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction/State.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/RepoSource.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretEnvVar.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume/SecretVersion.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume_SecretVersion.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/IngressSettings.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/VpcConnectorEgressSettings.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig_IngressSettings.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig_VpcConnectorEgressSettings.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Source.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SourceProvenance.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/Name.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/State.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage_Name.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage_State.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage/Severity.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage_Severity.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StorageSource.php delete mode 100644 owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/UpdateFunctionRequest.php delete mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/create_function.php delete mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/delete_function.php delete mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_download_url.php delete mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_upload_url.php delete mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_function.php delete mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_functions.php delete mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_locations.php delete mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_runtimes.php delete mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/update_function.php delete mode 100644 owl-bot-staging/Functions/v2/src/V2/FunctionServiceClient.php delete mode 100644 owl-bot-staging/Functions/v2/src/V2/Gapic/FunctionServiceGapicClient.php delete mode 100644 owl-bot-staging/Functions/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Functions/v2/src/V2/resources/function_service_client_config.json delete mode 100644 owl-bot-staging/Functions/v2/src/V2/resources/function_service_descriptor_config.php delete mode 100644 owl-bot-staging/Functions/v2/src/V2/resources/function_service_rest_client_config.php delete mode 100644 owl-bot-staging/Functions/v2/tests/Unit/V2/FunctionServiceClientTest.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/GPBMetadata/Google/Cloud/Gsuiteaddons/V1/Gsuiteaddons.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/AddOns.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Authorization.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/CreateDeploymentRequest.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/DeleteDeploymentRequest.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Deployment.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GSuiteAddOnsGrpcClient.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetAuthorizationRequest.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetDeploymentRequest.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetInstallStatusRequest.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallDeploymentRequest.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallStatus.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsRequest.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsResponse.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ReplaceDeploymentRequest.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/UninstallDeploymentRequest.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/create_deployment.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/delete_deployment.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_authorization.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_deployment.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_install_status.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/install_deployment.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/list_deployments.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/replace_deployment.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/uninstall_deployment.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/src/V1/GSuiteAddOnsClient.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/src/V1/Gapic/GSuiteAddOnsGapicClient.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_client_config.json delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_descriptor_config.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_rest_client_config.php delete mode 100644 owl-bot-staging/GSuiteAddOns/v1/tests/Unit/V1/GSuiteAddOnsClientTest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/Common.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerClusters.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerClustersService.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerConfigs.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerConfigsService.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerDeployments.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerDeploymentsService.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/Realms.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/RealmsService.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerClusterRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerConfigRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerDeploymentRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateRealmRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerClusterRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerConfigRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerDeploymentRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteRealmRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet/DeployedFleetStatus.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleetAutoscaler.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails_DeployedFleet.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails_DeployedFleetAutoscaler.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails_DeployedFleet_DeployedFleetStatus.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse/DeployedClusterState.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse_DeployedClusterState.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FleetConfig.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerCluster.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterConnectionInfo.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterView.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClustersServiceGrpcClient.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfig.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigOverride.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigsServiceGrpcClient.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeployment.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentRollout.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentsServiceGrpcClient.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerClusterRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerConfigRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRolloutRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetRealmRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GkeClusterReference.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState/InstallationState.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState_InstallationState.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/LabelSelector.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersResponse.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsResponse.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsResponse.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsResponse.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus/ErrorCode.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus_ErrorCode.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewCreateGameServerClusterRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewCreateGameServerClusterResponse.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterResponse.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutResponse.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateResponse.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterResponse.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Realm.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmSelector.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmsServiceGrpcClient.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ScalingConfig.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Schedule.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/SpecSource.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleet.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleetAutoscaler.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails_TargetFleetDetails.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails_TargetFleetDetails_TargetFleet.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails_TargetFleetDetails_TargetFleetAutoscaler.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetState.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerClusterRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRolloutRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateRealmRequest.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/create_game_server_cluster.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/delete_game_server_cluster.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/get_game_server_cluster.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/list_game_server_clusters.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_create_game_server_cluster.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_delete_game_server_cluster.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_update_game_server_cluster.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/update_game_server_cluster.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/create_game_server_config.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/delete_game_server_config.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/get_game_server_config.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/list_game_server_configs.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/create_game_server_deployment.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/delete_game_server_deployment.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/fetch_deployment_state.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment_rollout.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/list_game_server_deployments.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/preview_game_server_deployment_rollout.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment_rollout.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/create_realm.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/delete_realm.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/get_realm.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/list_realms.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/preview_realm_update.php delete mode 100644 owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/update_realm.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/GameServerClustersServiceClient.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/GameServerConfigsServiceClient.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/GameServerDeploymentsServiceClient.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerClustersServiceGapicClient.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerConfigsServiceGapicClient.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerDeploymentsServiceGapicClient.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/Gapic/RealmsServiceGapicClient.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/RealmsServiceClient.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_clusters_service_client_config.json delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_clusters_service_descriptor_config.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_clusters_service_rest_client_config.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_client_config.json delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_descriptor_config.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_rest_client_config.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_client_config.json delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_descriptor_config.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_rest_client_config.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_client_config.json delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_descriptor_config.php delete mode 100644 owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_rest_client_config.php delete mode 100644 owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerClustersServiceClientTest.php delete mode 100644 owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerConfigsServiceClientTest.php delete mode 100644 owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerDeploymentsServiceClientTest.php delete mode 100644 owl-bot-staging/Gaming/v1/tests/Unit/V1/RealmsServiceClientTest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Backup.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/BackupPlan.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Common.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Gkebackup.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Restore.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/RestorePlan.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Volume.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/ClusterMetadata.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/State.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupForGKEGrpcClient.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/BackupConfig.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/RetentionPolicy.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/Schedule.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan_BackupConfig.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan_RetentionPolicy.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan_Schedule.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup_ClusterMetadata.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup_State.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupPlanRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestorePlanRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestoreRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupPlanRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestorePlanRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestoreRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/EncryptionKey.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupPlanRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestorePlanRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestoreRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeBackupRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeRestoreRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansResponse.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsResponse.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansResponse.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresResponse.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsResponse.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresResponse.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedName.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedNames.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Namespaces.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore/State.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceConflictPolicy.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceRestoreScope.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/GroupKind.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/NamespacedResourceRestoreMode.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/SubstitutionRule.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/VolumeDataRestorePolicy.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_ClusterResourceConflictPolicy.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_ClusterResourceRestoreScope.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_GroupKind.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_NamespacedResourceRestoreMode.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_SubstitutionRule.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_VolumeDataRestorePolicy.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestorePlan.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore_State.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupPlanRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestorePlanRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestoreRequest.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/State.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/VolumeBackupFormat.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup_State.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup_VolumeBackupFormat.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/State.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/VolumeType.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore_State.php delete mode 100644 owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore_VolumeType.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup_plan.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore_plan.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup_plan.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore_plan.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup_plan.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore_plan.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_backup.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_restore.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backup_plans.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backups.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restore_plans.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restores.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_backups.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_restores.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup_plan.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore.php delete mode 100644 owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore_plan.php delete mode 100644 owl-bot-staging/GkeBackup/v1/src/V1/BackupForGKEClient.php delete mode 100644 owl-bot-staging/GkeBackup/v1/src/V1/Gapic/BackupForGKEGapicClient.php delete mode 100644 owl-bot-staging/GkeBackup/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_client_config.json delete mode 100644 owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_descriptor_config.php delete mode 100644 owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_rest_client_config.php delete mode 100644 owl-bot-staging/GkeBackup/v1/tests/Unit/V1/BackupForGKEClientTest.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1Beta1/Membership.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ApplianceCluster.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Authority.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgent.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgentResource.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/CreateMembershipRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/DeleteMembershipRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/EdgeCluster.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GetMembershipRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeCluster.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeHubMembershipServiceGrpcClient.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesMetadata.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesResource.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership/InfrastructureType.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipEndpoint.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState/Code.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState_Code.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership_InfrastructureType.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MultiCloudCluster.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster/ClusterType.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster_ClusterType.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OperationMetadata.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceManifest.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceOptions.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/TypeMeta.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/UpdateMembershipRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityRequest.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityResponse.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/create_membership.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/delete_membership.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_connect_manifest.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_exclusivity_manifest.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_location.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_membership.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_locations.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_memberships.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/update_membership.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/validate_exclusivity.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/src/V1beta1/Gapic/GkeHubMembershipServiceGapicClient.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/src/V1beta1/GkeHubMembershipServiceClient.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/src/V1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/GkeHub/v1beta1/src/V1beta1/resources/gke_hub_membership_service_client_config.json delete mode 100644 owl-bot-staging/GkeHub/v1beta1/src/V1beta1/resources/gke_hub_membership_service_descriptor_config.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php delete mode 100644 owl-bot-staging/GkeHub/v1beta1/tests/Unit/V1beta1/GkeHubMembershipServiceClientTest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Attestation.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Build.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Common.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Compliance.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Cvss.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Deployment.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Discovery.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/DsseAttestation.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Grafeas.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Image.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoProvenance.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoStatement.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Package.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Provenance.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Severity.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenance.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenanceZeroTwo.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Upgrade.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Vulnerability.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext/Kind.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext_Kind.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Architecture.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Artifact.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote/Hint.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote_Hint.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationOccurrence.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesRequest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesResponse.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesRequest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesResponse.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildNote.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildOccurrence.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildProvenance.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuilderConfig.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackComplexity.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackVector.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Authentication.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Impact.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/PrivilegesRequired.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Scope.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/UserInteraction.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSVersion.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_AttackComplexity.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_AttackVector.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_Authentication.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_Impact.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_PrivilegesRequired.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_Scope.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_UserInteraction.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackComplexity.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackVector.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Impact.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/PrivilegesRequired.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Scope.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/UserInteraction.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_AttackComplexity.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_AttackVector.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_Impact.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_PrivilegesRequired.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_Scope.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_UserInteraction.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CloudRepoSourceContext.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Command.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Completeness.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote/CisBenchmark.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote_CisBenchmark.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceOccurrence.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceVersion.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateNoteRequest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateOccurrenceRequest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote/DSSEHint.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote_DSSEHint.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationOccurrence.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteNoteRequest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteOccurrenceRequest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentNote.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence/Platform.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence_Platform.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Digest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryNote.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisCompleted.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisStatus.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/ContinuousAnalysis.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence_AnalysisCompleted.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence_AnalysisStatus.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence_ContinuousAnalysis.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Distribution.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Envelope.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/EnvelopeSignature.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileHashes.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileLocation.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Fingerprint.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GerritSourceContext.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetNoteRequest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceNoteRequest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceRequest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GitSourceContext.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GrafeasGrpcClient.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Hash.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageNote.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageOccurrence.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoProvenance.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoStatement.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Jwt.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Layer.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/License.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesRequest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesResponse.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesRequest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesResponse.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesRequest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesResponse.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Location.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Metadata.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NonCompliantFile.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Note.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NoteKind.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Occurrence.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageNote.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageOccurrence.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ProjectRepoId.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Recipe.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RelatedUrl.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RepoId.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Severity.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Signature.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/Material.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaBuilder.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaCompleteness.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaMetadata.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaRecipe.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaBuilder.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaCompleteness.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaConfigSource.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaInvocation.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMaterial.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMetadata.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaBuilder.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaCompleteness.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaConfigSource.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaInvocation.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaMaterial.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaMetadata.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance_Material.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance_SlsaBuilder.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance_SlsaCompleteness.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance_SlsaMetadata.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance_SlsaRecipe.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Source.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SourceContext.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Subject.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateNoteRequest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateOccurrenceRequest.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeDistribution.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeNote.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeOccurrence.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version/VersionKind.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version_VersionKind.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/Detail.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail/KnowledgeBase.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote_Detail.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote_WindowsDetail.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote_WindowsDetail_KnowledgeBase.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence/PackageIssue.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence_PackageIssue.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Category.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Identity.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate_Category.php delete mode 100644 owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate_Identity.php delete mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_notes.php delete mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_occurrences.php delete mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_note.php delete mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_occurrence.php delete mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_note.php delete mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_occurrence.php delete mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_note.php delete mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence.php delete mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence_note.php delete mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_note_occurrences.php delete mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_notes.php delete mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_occurrences.php delete mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_note.php delete mode 100644 owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_occurrence.php delete mode 100644 owl-bot-staging/Grafeas/v1/src/V1/Gapic/GrafeasGapicClient.php delete mode 100644 owl-bot-staging/Grafeas/v1/src/V1/GrafeasClient.php delete mode 100644 owl-bot-staging/Grafeas/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_client_config.json delete mode 100644 owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_descriptor_config.php delete mode 100644 owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_rest_client_config.php delete mode 100644 owl-bot-staging/Grafeas/v1/tests/Unit/V1/GrafeasClientTest.php delete mode 100644 owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Deny.php delete mode 100644 owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Policy.php delete mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/CreatePolicyRequest.php delete mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DeletePolicyRequest.php delete mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DenyRule.php delete mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/GetPolicyRequest.php delete mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesRequest.php delete mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesResponse.php delete mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PoliciesGrpcClient.php delete mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/Policy.php delete mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyOperationMetadata.php delete mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyRule.php delete mode 100644 owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/UpdatePolicyRequest.php delete mode 100644 owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/create_policy.php delete mode 100644 owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/delete_policy.php delete mode 100644 owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/get_policy.php delete mode 100644 owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/list_policies.php delete mode 100644 owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/update_policy.php delete mode 100644 owl-bot-staging/Iam/v2/src/V2/Gapic/PoliciesGapicClient.php delete mode 100644 owl-bot-staging/Iam/v2/src/V2/PoliciesClient.php delete mode 100644 owl-bot-staging/Iam/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Iam/v2/src/V2/resources/policies_client_config.json delete mode 100644 owl-bot-staging/Iam/v2/src/V2/resources/policies_descriptor_config.php delete mode 100644 owl-bot-staging/Iam/v2/src/V2/resources/policies_rest_client_config.php delete mode 100644 owl-bot-staging/Iam/v2/tests/Unit/V2/PoliciesClientTest.php delete mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Common.php delete mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Iamcredentials.php delete mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenRequest.php delete mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenResponse.php delete mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenRequest.php delete mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenResponse.php delete mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/IAMCredentialsGrpcClient.php delete mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobRequest.php delete mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobResponse.php delete mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtRequest.php delete mode 100644 owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtResponse.php delete mode 100644 owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_access_token.php delete mode 100644 owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_id_token.php delete mode 100644 owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_blob.php delete mode 100644 owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_jwt.php delete mode 100644 owl-bot-staging/IamCredentials/v1/src/V1/Gapic/IAMCredentialsGapicClient.php delete mode 100644 owl-bot-staging/IamCredentials/v1/src/V1/IAMCredentialsClient.php delete mode 100644 owl-bot-staging/IamCredentials/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_client_config.json delete mode 100644 owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_descriptor_config.php delete mode 100644 owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_rest_client_config.php delete mode 100644 owl-bot-staging/IamCredentials/v1/tests/Unit/V1/IAMCredentialsClientTest.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/GPBMetadata/Google/Cloud/Iap/V1/Service.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessDeniedPageSettings.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessSettings.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AllowedDomainsSettings.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ApplicationSettings.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings/OutputCredentials.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings_OutputCredentials.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/Brand.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CorsSettings.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateBrandRequest.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateIdentityAwareProxyClientRequest.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateTunnelDestGroupRequest.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CsmSettings.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteIdentityAwareProxyClientRequest.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteTunnelDestGroupRequest.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GcipSettings.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetBrandRequest.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIapSettingsRequest.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIdentityAwareProxyClientRequest.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetTunnelDestGroupRequest.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IapSettings.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyAdminServiceGrpcClient.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyClient.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyOAuthServiceGrpcClient.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsRequest.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsResponse.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsRequest.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsResponse.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsRequest.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsResponse.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/OAuthSettings.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/Method.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/PolicyType.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings_Method.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings_PolicyType.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ResetIdentityAwareProxyClientSecretRequest.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/TunnelDestGroup.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateIapSettingsRequest.php delete mode 100644 owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateTunnelDestGroupRequest.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/create_tunnel_dest_group.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/delete_tunnel_dest_group.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iap_settings.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_tunnel_dest_group.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/list_tunnel_dest_groups.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_iap_settings.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_tunnel_dest_group.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_brand.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_identity_aware_proxy_client.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/delete_identity_aware_proxy_client.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_brand.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_identity_aware_proxy_client.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_brands.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_identity_aware_proxy_clients.php delete mode 100644 owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/reset_identity_aware_proxy_client_secret.php delete mode 100644 owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyAdminServiceGapicClient.php delete mode 100644 owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyOAuthServiceGapicClient.php delete mode 100644 owl-bot-staging/Iap/v1/src/V1/IdentityAwareProxyAdminServiceClient.php delete mode 100644 owl-bot-staging/Iap/v1/src/V1/IdentityAwareProxyOAuthServiceClient.php delete mode 100644 owl-bot-staging/Iap/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_client_config.json delete mode 100644 owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_descriptor_config.php delete mode 100644 owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php delete mode 100644 owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_client_config.json delete mode 100644 owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_descriptor_config.php delete mode 100644 owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php delete mode 100644 owl-bot-staging/Iap/v1/tests/Unit/V1/IdentityAwareProxyAdminServiceClientTest.php delete mode 100644 owl-bot-staging/Iap/v1/tests/Unit/V1/IdentityAwareProxyOAuthServiceClientTest.php delete mode 100644 owl-bot-staging/Ids/v1/proto/src/GPBMetadata/Google/Cloud/Ids/V1/Ids.php delete mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/CreateEndpointRequest.php delete mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/DeleteEndpointRequest.php delete mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint.php delete mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/Severity.php delete mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/State.php delete mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint_Severity.php delete mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint_State.php delete mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/GetEndpointRequest.php delete mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/IDSGrpcClient.php delete mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsRequest.php delete mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsResponse.php delete mode 100644 owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/Ids/v1/samples/V1/IDSClient/create_endpoint.php delete mode 100644 owl-bot-staging/Ids/v1/samples/V1/IDSClient/delete_endpoint.php delete mode 100644 owl-bot-staging/Ids/v1/samples/V1/IDSClient/get_endpoint.php delete mode 100644 owl-bot-staging/Ids/v1/samples/V1/IDSClient/list_endpoints.php delete mode 100644 owl-bot-staging/Ids/v1/src/V1/Gapic/IDSGapicClient.php delete mode 100644 owl-bot-staging/Ids/v1/src/V1/IDSClient.php delete mode 100644 owl-bot-staging/Ids/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Ids/v1/src/V1/resources/ids_client_config.json delete mode 100644 owl-bot-staging/Ids/v1/src/V1/resources/ids_descriptor_config.php delete mode 100644 owl-bot-staging/Ids/v1/src/V1/resources/ids_rest_client_config.php delete mode 100644 owl-bot-staging/Ids/v1/tests/Unit/V1/IDSClientTest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/DeviceManager.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/Resources.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/BindDeviceToGatewayRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/BindDeviceToGatewayResponse.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRegistryRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRegistryRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/Device.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceConfig.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceCredential.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceManagerGrpcClient.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceRegistry.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceState.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/EventNotificationConfig.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayAuthMethod.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayConfig.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayListOptions.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayType.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRegistryRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpConfig.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpState.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsResponse.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesResponse.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesResponse.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesResponse.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/LogLevel.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ModifyCloudToDeviceConfigRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttConfig.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttState.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificate.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificateFormat.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCredential.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyFormat.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/RegistryCredential.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceResponse.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/StateNotificationConfig.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayResponse.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRegistryRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRequest.php delete mode 100644 owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/X509CertificateDetails.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/bind_device_to_gateway.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device_registry.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device_registry.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device_registry.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_config_versions.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_registries.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_states.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_devices.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/modify_cloud_to_device_config.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/send_command_to_device.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/unbind_device_from_gateway.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device.php delete mode 100644 owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device_registry.php delete mode 100644 owl-bot-staging/Iot/v1/src/V1/DeviceManagerClient.php delete mode 100644 owl-bot-staging/Iot/v1/src/V1/Gapic/DeviceManagerGapicClient.php delete mode 100644 owl-bot-staging/Iot/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Iot/v1/src/V1/resources/device_manager_client_config.json delete mode 100644 owl-bot-staging/Iot/v1/src/V1/resources/device_manager_descriptor_config.php delete mode 100644 owl-bot-staging/Iot/v1/src/V1/resources/device_manager_rest_client_config.php delete mode 100644 owl-bot-staging/Iot/v1/tests/Unit/V1/DeviceManagerClientTest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/EkmService.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Resources.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Service.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion_CryptoKeyVersionAlgorithm.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion_CryptoKeyVersionState.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion_CryptoKeyVersionView.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey_CryptoKeyPurpose.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection_ServiceResolver.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmServiceGrpcClient.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob_ImportJobState.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob_ImportMethod.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob_WrappingPublicKey.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyManagementServiceGrpcClient.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation_AttestationFormat.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation_CertificateChains.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyRing.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php delete mode 100644 owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/EkmServiceClient.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/Gapic/EkmServiceGapicClient.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/Gapic/KeyManagementServiceGapicClient.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/KeyManagementServiceClient.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_client_config.json delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_descriptor_config.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php delete mode 100644 owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php delete mode 100644 owl-bot-staging/Kms/v1/tests/Unit/V1/EkmServiceClientTest.php delete mode 100644 owl-bot-staging/Kms/v1/tests/Unit/V1/KeyManagementServiceClientTest.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/GPBMetadata/Google/Cloud/Language/V1/LanguageService.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesRequest.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesResponse.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentRequest.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentResponse.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentRequest.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentResponse.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxRequest.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxResponse.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest/Features.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest_Features.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextResponse.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationCategory.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V1Model.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions_V1Model.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions_V2Model.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions_V2Model_ContentCategoriesVersion.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextRequest.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextResponse.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge/Label.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge_Label.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document/Type.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document_Type.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EncodingType.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity/Type.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention/Type.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention_Type.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity_Type.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/LanguageServiceGrpcClient.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Aspect.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Form.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Gender.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Mood.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Number.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/PBCase.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Person.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Proper.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Reciprocity.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tag.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tense.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Voice.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Aspect.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Case.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Form.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Gender.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Mood.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Number.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Person.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Proper.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Reciprocity.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Tag.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Tense.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Voice.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentence.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentiment.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/TextSpan.php delete mode 100644 owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Token.php delete mode 100644 owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entities.php delete mode 100644 owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entity_sentiment.php delete mode 100644 owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_sentiment.php delete mode 100644 owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_syntax.php delete mode 100644 owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/annotate_text.php delete mode 100644 owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/classify_text.php delete mode 100644 owl-bot-staging/Language/v1/src/V1/Gapic/LanguageServiceGapicClient.php delete mode 100644 owl-bot-staging/Language/v1/src/V1/LanguageServiceClient.php delete mode 100644 owl-bot-staging/Language/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Language/v1/src/V1/resources/language_service_client_config.json delete mode 100644 owl-bot-staging/Language/v1/src/V1/resources/language_service_descriptor_config.php delete mode 100644 owl-bot-staging/Language/v1/src/V1/resources/language_service_rest_client_config.php delete mode 100644 owl-bot-staging/Language/v1/tests/Unit/V1/LanguageServiceClientTest.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/GPBMetadata/Google/Cloud/Language/V1Beta2/LanguageService.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesRequest.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesResponse.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentRequest.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentResponse.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentRequest.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentResponse.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxRequest.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxResponse.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest/Features.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest_Features.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextResponse.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationCategory.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V1Model.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions_V1Model.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions_V2Model.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions_V2Model_ContentCategoriesVersion.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextRequest.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextResponse.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge/Label.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge_Label.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/BoilerplateHandling.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/Type.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document_BoilerplateHandling.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document_Type.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EncodingType.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity/Type.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention/Type.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention_Type.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity_Type.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/LanguageServiceGrpcClient.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Aspect.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Form.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Gender.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Mood.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Number.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/PBCase.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Person.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Proper.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Reciprocity.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tag.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tense.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Voice.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Aspect.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Case.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Form.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Gender.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Mood.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Number.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Person.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Proper.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Reciprocity.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Tag.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Tense.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Voice.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentence.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentiment.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/TextSpan.php delete mode 100644 owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Token.php delete mode 100644 owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entities.php delete mode 100644 owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entity_sentiment.php delete mode 100644 owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_sentiment.php delete mode 100644 owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_syntax.php delete mode 100644 owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/annotate_text.php delete mode 100644 owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/classify_text.php delete mode 100644 owl-bot-staging/Language/v1beta2/src/V1beta2/Gapic/LanguageServiceGapicClient.php delete mode 100644 owl-bot-staging/Language/v1beta2/src/V1beta2/LanguageServiceClient.php delete mode 100644 owl-bot-staging/Language/v1beta2/src/V1beta2/gapic_metadata.json delete mode 100644 owl-bot-staging/Language/v1beta2/src/V1beta2/resources/language_service_client_config.json delete mode 100644 owl-bot-staging/Language/v1beta2/src/V1beta2/resources/language_service_descriptor_config.php delete mode 100644 owl-bot-staging/Language/v1beta2/src/V1beta2/resources/language_service_rest_client_config.php delete mode 100644 owl-bot-staging/Language/v1beta2/tests/Unit/V1beta2/LanguageServiceClientTest.php diff --git a/Domains/src/V1alpha2/resources/domains_rest_client_config.php b/Domains/src/V1alpha2/resources/domains_rest_client_config.php index 3e6115ca7525..a9a9f76ad3c4 100644 --- a/Domains/src/V1alpha2/resources/domains_rest_client_config.php +++ b/Domains/src/V1alpha2/resources/domains_rest_client_config.php @@ -267,4 +267,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Domains/src/V1beta1/resources/domains_rest_client_config.php b/Domains/src/V1beta1/resources/domains_rest_client_config.php index a75708556b1a..0d8c43034439 100644 --- a/Domains/src/V1beta1/resources/domains_rest_client_config.php +++ b/Domains/src/V1beta1/resources/domains_rest_client_config.php @@ -267,4 +267,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/ErrorReporting/src/V1beta1/resources/error_group_service_rest_client_config.php b/ErrorReporting/src/V1beta1/resources/error_group_service_rest_client_config.php index 8660657af11a..e967a41f87ee 100644 --- a/ErrorReporting/src/V1beta1/resources/error_group_service_rest_client_config.php +++ b/ErrorReporting/src/V1beta1/resources/error_group_service_rest_client_config.php @@ -29,4 +29,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/ErrorReporting/src/V1beta1/resources/error_stats_service_rest_client_config.php b/ErrorReporting/src/V1beta1/resources/error_stats_service_rest_client_config.php index 57064b872a4e..8b9bb159bcb1 100644 --- a/ErrorReporting/src/V1beta1/resources/error_stats_service_rest_client_config.php +++ b/ErrorReporting/src/V1beta1/resources/error_stats_service_rest_client_config.php @@ -41,4 +41,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/ErrorReporting/src/V1beta1/resources/report_errors_service_rest_client_config.php b/ErrorReporting/src/V1beta1/resources/report_errors_service_rest_client_config.php index f2c99ae79229..c7565d89467b 100644 --- a/ErrorReporting/src/V1beta1/resources/report_errors_service_rest_client_config.php +++ b/ErrorReporting/src/V1beta1/resources/report_errors_service_rest_client_config.php @@ -17,4 +17,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/EssentialContacts/src/V1/resources/essential_contacts_service_rest_client_config.php b/EssentialContacts/src/V1/resources/essential_contacts_service_rest_client_config.php index 70b03ed627b2..04bf88c1516f 100644 --- a/EssentialContacts/src/V1/resources/essential_contacts_service_rest_client_config.php +++ b/EssentialContacts/src/V1/resources/essential_contacts_service_rest_client_config.php @@ -162,4 +162,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Eventarc/src/V1/resources/eventarc_rest_client_config.php b/Eventarc/src/V1/resources/eventarc_rest_client_config.php index 1dbe7f209fab..1618910026c6 100644 --- a/Eventarc/src/V1/resources/eventarc_rest_client_config.php +++ b/Eventarc/src/V1/resources/eventarc_rest_client_config.php @@ -377,4 +377,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/EventarcPublishing/src/V1/resources/publisher_rest_client_config.php b/EventarcPublishing/src/V1/resources/publisher_rest_client_config.php index dfd2669329fc..2c4ad8b6ef1c 100644 --- a/EventarcPublishing/src/V1/resources/publisher_rest_client_config.php +++ b/EventarcPublishing/src/V1/resources/publisher_rest_client_config.php @@ -29,4 +29,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Filestore/src/V1/resources/cloud_filestore_manager_rest_client_config.php b/Filestore/src/V1/resources/cloud_filestore_manager_rest_client_config.php index 238fc6faff23..5d5d552c22ac 100644 --- a/Filestore/src/V1/resources/cloud_filestore_manager_rest_client_config.php +++ b/Filestore/src/V1/resources/cloud_filestore_manager_rest_client_config.php @@ -213,4 +213,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Firestore/src/Admin/V1/resources/firestore_admin_rest_client_config.php b/Firestore/src/Admin/V1/resources/firestore_admin_rest_client_config.php index 75e18ee71f16..8a487f1dbd84 100644 --- a/Firestore/src/Admin/V1/resources/firestore_admin_rest_client_config.php +++ b/Firestore/src/Admin/V1/resources/firestore_admin_rest_client_config.php @@ -191,4 +191,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Firestore/src/V1/resources/firestore_rest_client_config.php b/Firestore/src/V1/resources/firestore_rest_client_config.php index 4d8957f46397..984cef14a450 100644 --- a/Firestore/src/V1/resources/firestore_rest_client_config.php +++ b/Firestore/src/V1/resources/firestore_rest_client_config.php @@ -268,4 +268,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Functions/src/V1/resources/cloud_functions_service_rest_client_config.php b/Functions/src/V1/resources/cloud_functions_service_rest_client_config.php index 09bfdc288e9b..4ccbce38fd50 100644 --- a/Functions/src/V1/resources/cloud_functions_service_rest_client_config.php +++ b/Functions/src/V1/resources/cloud_functions_service_rest_client_config.php @@ -164,4 +164,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Functions/src/V2/resources/function_service_rest_client_config.php b/Functions/src/V2/resources/function_service_rest_client_config.php index 38ed1a3d5730..07539b7883bc 100644 --- a/Functions/src/V2/resources/function_service_rest_client_config.php +++ b/Functions/src/V2/resources/function_service_rest_client_config.php @@ -172,4 +172,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/GSuiteAddOns/src/V1/resources/g_suite_add_ons_rest_client_config.php b/GSuiteAddOns/src/V1/resources/g_suite_add_ons_rest_client_config.php index f9f2fb916e33..38e022bdead8 100644 --- a/GSuiteAddOns/src/V1/resources/g_suite_add_ons_rest_client_config.php +++ b/GSuiteAddOns/src/V1/resources/g_suite_add_ons_rest_client_config.php @@ -112,4 +112,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Gaming/src/V1/resources/game_server_clusters_service_rest_client_config.php b/Gaming/src/V1/resources/game_server_clusters_service_rest_client_config.php index da2f35597788..71744f4afe82 100644 --- a/Gaming/src/V1/resources/game_server_clusters_service_rest_client_config.php +++ b/Gaming/src/V1/resources/game_server_clusters_service_rest_client_config.php @@ -213,4 +213,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Gaming/src/V1/resources/game_server_configs_service_rest_client_config.php b/Gaming/src/V1/resources/game_server_configs_service_rest_client_config.php index 0db327cf7fff..105c41262ae0 100644 --- a/Gaming/src/V1/resources/game_server_configs_service_rest_client_config.php +++ b/Gaming/src/V1/resources/game_server_configs_service_rest_client_config.php @@ -161,4 +161,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Gaming/src/V1/resources/game_server_deployments_service_rest_client_config.php b/Gaming/src/V1/resources/game_server_deployments_service_rest_client_config.php index 7e6854aa8b3a..8924ef153b6a 100644 --- a/Gaming/src/V1/resources/game_server_deployments_service_rest_client_config.php +++ b/Gaming/src/V1/resources/game_server_deployments_service_rest_client_config.php @@ -229,4 +229,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Gaming/src/V1/resources/realms_service_rest_client_config.php b/Gaming/src/V1/resources/realms_service_rest_client_config.php index 4ca5897d9d1c..564af8d59c6c 100644 --- a/Gaming/src/V1/resources/realms_service_rest_client_config.php +++ b/Gaming/src/V1/resources/realms_service_rest_client_config.php @@ -190,4 +190,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/GkeBackup/src/V1/resources/backup_for_gke_rest_client_config.php b/GkeBackup/src/V1/resources/backup_for_gke_rest_client_config.php index f63dea7a3d1a..043e32abae6d 100644 --- a/GkeBackup/src/V1/resources/backup_for_gke_rest_client_config.php +++ b/GkeBackup/src/V1/resources/backup_for_gke_rest_client_config.php @@ -474,4 +474,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/GkeHub/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php b/GkeHub/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php index 4876cf636afe..837fb971ce08 100644 --- a/GkeHub/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php +++ b/GkeHub/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php @@ -209,4 +209,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Grafeas/src/V1/resources/grafeas_rest_client_config.php b/Grafeas/src/V1/resources/grafeas_rest_client_config.php index c6fa86c0d925..30b86b499f1a 100644 --- a/Grafeas/src/V1/resources/grafeas_rest_client_config.php +++ b/Grafeas/src/V1/resources/grafeas_rest_client_config.php @@ -168,4 +168,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Iam/src/V2/resources/policies_rest_client_config.php b/Iam/src/V2/resources/policies_rest_client_config.php index 121c286777c1..37374681f440 100644 --- a/Iam/src/V2/resources/policies_rest_client_config.php +++ b/Iam/src/V2/resources/policies_rest_client_config.php @@ -76,4 +76,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/IamCredentials/src/V1/resources/iam_credentials_rest_client_config.php b/IamCredentials/src/V1/resources/iam_credentials_rest_client_config.php index 8ed6a33e6b84..e4c5263da78c 100644 --- a/IamCredentials/src/V1/resources/iam_credentials_rest_client_config.php +++ b/IamCredentials/src/V1/resources/iam_credentials_rest_client_config.php @@ -53,4 +53,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Iap/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php b/Iap/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php index e877a86dd66b..c49e6cb53acc 100644 --- a/Iap/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php +++ b/Iap/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php @@ -126,4 +126,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Iap/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php b/Iap/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php index 104aa836854e..0e5faa00e399 100644 --- a/Iap/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php +++ b/Iap/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php @@ -96,4 +96,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Ids/src/V1/resources/ids_rest_client_config.php b/Ids/src/V1/resources/ids_rest_client_config.php index 8a7da2952755..e81293b497d7 100644 --- a/Ids/src/V1/resources/ids_rest_client_config.php +++ b/Ids/src/V1/resources/ids_rest_client_config.php @@ -161,4 +161,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Iot/src/V1/resources/device_manager_rest_client_config.php b/Iot/src/V1/resources/device_manager_rest_client_config.php index e9afd2453fc5..dbf0bf784afc 100644 --- a/Iot/src/V1/resources/device_manager_rest_client_config.php +++ b/Iot/src/V1/resources/device_manager_rest_client_config.php @@ -316,4 +316,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Kms/src/V1/resources/ekm_service_rest_client_config.php b/Kms/src/V1/resources/ekm_service_rest_client_config.php index ce5123bfcfcb..55ca57743070 100644 --- a/Kms/src/V1/resources/ekm_service_rest_client_config.php +++ b/Kms/src/V1/resources/ekm_service_rest_client_config.php @@ -181,4 +181,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Kms/src/V1/resources/key_management_service_rest_client_config.php b/Kms/src/V1/resources/key_management_service_rest_client_config.php index abef2c092b65..4aba8af3de42 100644 --- a/Kms/src/V1/resources/key_management_service_rest_client_config.php +++ b/Kms/src/V1/resources/key_management_service_rest_client_config.php @@ -448,4 +448,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Language/src/V1/resources/language_service_rest_client_config.php b/Language/src/V1/resources/language_service_rest_client_config.php index 3f087dd3570e..3713de7e1366 100644 --- a/Language/src/V1/resources/language_service_rest_client_config.php +++ b/Language/src/V1/resources/language_service_rest_client_config.php @@ -35,4 +35,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/Language/src/V1beta2/resources/language_service_rest_client_config.php b/Language/src/V1beta2/resources/language_service_rest_client_config.php index d33aa4589a88..dd8a7e56d036 100644 --- a/Language/src/V1beta2/resources/language_service_rest_client_config.php +++ b/Language/src/V1beta2/resources/language_service_rest_client_config.php @@ -35,4 +35,5 @@ ], ], ], + 'numericEnums' => true, ]; diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/GPBMetadata/Google/Cloud/Domains/V1Alpha2/Domains.php b/owl-bot-staging/Domains/v1alpha2/proto/src/GPBMetadata/Google/Cloud/Domains/V1Alpha2/Domains.php deleted file mode 100644 index d89449a6e416bd26002cf9df0b10316efc486b8a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13231 zcmd5@O>7&-6%I-L@kyeo@lR-_iRpEM*osV6w4K;;oMc6=BqkC`kdzW9YBwu#MQuzi z+1;gVB`{hP=%GM+X^R3yQS{QBdg!62qV1)J9&%`l_Ga`DG(8n9a_S{$ioTiIT`vE; zq~!qh!6J9(y?O7=`oZ)m0-Ak7x4nT)rHaGTHKZBsCi?qoOXyYmG*&t|lw>Myr~vHVza`HF->(v!?Updqo#%QEP)pnVoh1_W9HKV2LnqJ$snJrlh-eOzKU=yfeJS zE^S#um$j6G=J2%Tqo%sE+0fOa5ornyoT)BWtA=V0SWM=hmtWCrZ^W^#^Q~f_UUc1s zI?wa)`B&kE5h9d4%?Bq~I4A6IPB`H_|D?@JX=)hp)O~nl&!6+W*rPro@7hjc4>;=? zfZDO-VZXXyzpA&FJK1oT+aBcP8J0*e9+P~Q165+&r5ufl|8nl06gO~pf_^2t(4&SwoK>dLNKH)CPsGo5;A6nQonrKDTN z5y`>H14UPA>H+$lY^s)piNTBkvx=XVn=WO^CM2)HOjS4AjHVf*1t0M;y6JM*glMIq zTS~cSX0%jsFmEqcJ@)(hR7z&nXP8CVPKt?n}&9%RE}a1 zwx*Yd6SKgH*m}-ihH3ArOhf37dc*^P%)jB}z0E{!QBBx=lR2IvU zyp<~zq;z&QD`lcjkQkgQN^99txhR&i`J7yka+z#yEgB$C!pV*|t73KoNrL1QL~(Sk zv?>+d;URJoPPk9)p<@JKLQI#l+fsA_r3;s~aOzwJxlEE7n3CQq8)RxC65f&J-zvfilhLYMr&`FKBRc#;ne_I|xD{3HmZkALs%K*YcX@2*mp z4^(TvQDu22l6uu=)q8nil3;wWWkWVRt~cQ%W<%Y?Hc>`F@5nsqjG?1OQeXC&qHI%c zAR+S(;cb}hn1nn7^F=8qy(woZm#RNz3*~ToMA2O)WsjEH`d*~BsMvPC^pCGq^@D-Nr1!p{||4*lGj=*z` zHNhF){c_fCz)TH;NjB6F3EF_u5CjlvYki;Q}{0by5cau#N2k;2?(9I6I2L5P>J zAXx*bn(mZAHszHOrp%c3guf3!v|Fjc6Ng9^rf_2JMAUqdRBEJYnH%v$y3wIS=#h2c z3Ga_%Fy&}PPQWClJK0id%x}g?0m4eX)-W_{|A3{vNb1%|a&vPfM286}VI!f{u<4X( zLt@A5E04l6!`RSvltf^HGes}LmPPn!5W?*#&%$YOV=Z6Ime)7C!VD8=u_SJ0u3>CV zKrpk8`F9dRnUWX{(GOBO9UUXnFo~l|>*7*$oJ3&;U*}3v`U-n8LGz^jy8U#L=41Xe zb?wFIRQv0-rBoCsOXR(lFO{P+G`CA>WLm(X$deMxwjW-(eia|$|Ir8|%cQPdTe=ZF zLBcRDWv*Vm9*rXRsVo+jqLeO2{}aGJq1r@ zvTIVQESGN=x@*G}j4?$6wA|R@1!;Yu(qFl{w1lSOZ>Wr8^JRcFH!{f?2=8Ol$=gP^ zp$y{lh}Jy3>a?QRh|y>a+s|M0Jf|KWMu8_YCW``EQ!^#GU$vcwGx!FrkT2rjtz2Pi zWg}Z!#}XK@shoH1H^G$%ZJ>yr(3aSyo4?7XW|7o?>sl{ z^>bSxEdH$15o&O{Ya+9WaE3}-e(ny~V>A^5OBRAKyj)EWxv^1=f=ej859f=jWoYUl zmPNXq^S*V|i*;_~JP~;;B`pvhHn*R~)T{h9IlVdw{|v%u=P_SKN6i~BfhNVR6!WO? z%JAz&R$+!O3*Qaf@%e&Jd~z{333r+_M0nFABZQ?@FvHPI7D@SW;)>)L4Uyo49eXYp z+9*X*i$3z$A!f6=3^PaQ?DZqMMXIQ=aTdqK;laX;VLDv&(=dxW9S!kIRc`3@qZr+s zPk9~8X>r@`=UD!Wcd&kQw;jxF+dD#P7zgX+EBqTB%z6BO=U{z&gL~NVe1qrsfxfW; zL}}qh$jHo zkj?^ooYn^R$ZFhCbzU@RKe?yXF@M_qtM@D{ z11KDqgnfiiJ11yT3${R z5Nt92GKDbh4C)qj2g6Lb$TiD4!oLC_VA|T#YAr+U-KIZGzVON@1{egk@qMjd9qN^= zTi-zdXqUd92H+`IU(XKwF)G@P0&)#UK>@p#ayZp`!1|E2Yt+ZRfs#S zVNd>d#O{}KMvG}-7oNsLIMwi~mbc{j9PS@6MQ2Q^_ zS(vM|47yW5SdgEA8Emb>i0gFXhzy9p1Bb_n4EJBqan|CGxS-u@!4K5>^l`#@1ebd{ zu^AX+ogDLC;Wq)8b5Et6y9^}RdC)0Qb$@ooj~{b@Q3(^bViw@i^YMPwCs$_h-HxjM>d$&`6h^X@9CnH!9x=%)A=g2fC;T5P@cx*ifDc| zC*w7fY`Pm`LtKBoR4&PdqO_40=?P9?;Vqc8b+9*acxK>;)|bi7^KhY$3bL4{fq{oh zYtp8a!;_tbBFs7Q;hs^D3vkXoVcN*2-{_05A?&x6qi-3ehOnRgIhgwN8ARwfz)$`f zfY}brgZP2$9i#24Fz{^jrA4`#_)`=X9})^y7~l3MT_MJ;q4K`onJ zVCaDuaX_9$h76G(2J!S}Akso!bGFq3&!l}ontAaU9BeC?%nIA2{ODFN2CDc#Jms3C z%GR9WyX3O~M4Sr7eS!F`VdrpX<)3y8;JG%DaPyJyy#Uir5?=FY$MK#aSD5E|)mRQJ zJP_lYbkQjQ^d`=t7ccopJl}mq!WG6%j$W^DqRUf#hV_bGQpYI6dPP4DkKZeLXBp%b z-wi^<89k&|bPjh6;Nuk^9@{G{`{0&&#T7rVSX8`4l;I#lIm(}~w)VgY#P8-v4~1iu z>rSi;NH={5ZEsj-QFMd6^oUXPK(s+t^4kEM=)x(8-%)PYct;(-{*xyR4zvoZeKeqF zzXP&B(i`Dsa^e01k%1`W+jz;K7ZD+TrtKwhwD57&A8}VLr!pSXdxcAkqQ!CtVEsUh zc{we5keH#|^VdNSEYSz-@JmDP2EUhfNbCHHTjyQjodMPvc6pa8gW)6=Rk)6i?o*!xfb>E>zS*gl zWJoJnEUTu4S3E`UZ=R=-iSv}?yl z;sTuJm!#TPU8RGjbwv8?puZ7>v(DC`cMtA&cWof0qw>fHFhY~9^*iLYXRW>7J9O%B zb_+dPJrFy}6Wt`7>5tTrmwj?%f3jmMFKi!Q`F_YF3xE#g=U@LwJi~WP-4_P_EGG6X zt7$GLlXvglwGH9kCZMe*{~5~VW?ixN8pgrO5uC?6mk&4DiVZ`U1^QEuLg4L;?W(m# zUD0cahEYq_RGl5kB>5{k=YU_l+_XjConQo4o_8w@& IeYg+sKe9SqTL1t6 diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/AuthorizationCode.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/AuthorizationCode.php deleted file mode 100644 index d5d6139e31d1..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/AuthorizationCode.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.domains.v1alpha2.AuthorizationCode - */ -class AuthorizationCode extends \Google\Protobuf\Internal\Message -{ - /** - * The Authorization Code in ASCII. It can be used to transfer the domain - * to or from another registrar. - * - * Generated from protobuf field string code = 1; - */ - protected $code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $code - * The Authorization Code in ASCII. It can be used to transfer the domain - * to or from another registrar. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * The Authorization Code in ASCII. It can be used to transfer the domain - * to or from another registrar. - * - * Generated from protobuf field string code = 1; - * @return string - */ - public function getCode() - { - return $this->code; - } - - /** - * The Authorization Code in ASCII. It can be used to transfer the domain - * to or from another registrar. - * - * 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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureContactSettingsRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureContactSettingsRequest.php deleted file mode 100644 index 3538366302eb..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureContactSettingsRequest.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.domains.v1alpha2.ConfigureContactSettingsRequest - */ -class ConfigureContactSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` whose contact settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $registration = ''; - /** - * Fields of the `ContactSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings contact_settings = 2; - */ - protected $contact_settings = null; - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the registrant contact is being updated, the - * `update_mask` is `"registrant_contact"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in `contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 4; - */ - private $contact_notices; - /** - * Validate the request without actually updating the contact settings. - * - * Generated from protobuf field bool validate_only = 5; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $registration - * Required. The name of the `Registration` whose contact settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * @type \Google\Cloud\Domains\V1alpha2\ContactSettings $contact_settings - * Fields of the `ContactSettings` to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the registrant contact is being updated, the - * `update_mask` is `"registrant_contact"`. - * @type array|\Google\Protobuf\Internal\RepeatedField $contact_notices - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in `contact_settings`. - * @type bool $validate_only - * Validate the request without actually updating the contact settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` whose contact settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getRegistration() - { - return $this->registration; - } - - /** - * Required. The name of the `Registration` whose contact settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkString($var, True); - $this->registration = $var; - - return $this; - } - - /** - * Fields of the `ContactSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings contact_settings = 2; - * @return \Google\Cloud\Domains\V1alpha2\ContactSettings|null - */ - public function getContactSettings() - { - return $this->contact_settings; - } - - public function hasContactSettings() - { - return isset($this->contact_settings); - } - - public function clearContactSettings() - { - unset($this->contact_settings); - } - - /** - * Fields of the `ContactSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings contact_settings = 2; - * @param \Google\Cloud\Domains\V1alpha2\ContactSettings $var - * @return $this - */ - public function setContactSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ContactSettings::class); - $this->contact_settings = $var; - - return $this; - } - - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the registrant contact is being updated, the - * `update_mask` is `"registrant_contact"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 describing which fields to update as a comma-separated list. - * For example, if only the registrant contact is being updated, the - * `update_mask` is `"registrant_contact"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in `contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContactNotices() - { - return $this->contact_notices; - } - - /** - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in `contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContactNotices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\ContactNotice::class); - $this->contact_notices = $arr; - - return $this; - } - - /** - * Validate the request without actually updating the contact settings. - * - * Generated from protobuf field bool validate_only = 5; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Validate the request without actually updating the contact settings. - * - * Generated from protobuf field bool validate_only = 5; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureDnsSettingsRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureDnsSettingsRequest.php deleted file mode 100644 index 89f1df4e9c88..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureDnsSettingsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.domains.v1alpha2.ConfigureDnsSettingsRequest - */ -class ConfigureDnsSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` whose DNS settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $registration = ''; - /** - * Fields of the `DnsSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings dns_settings = 2; - */ - protected $dns_settings = null; - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the name servers are being updated for an existing - * Custom DNS configuration, the `update_mask` is - * `"custom_dns.name_servers"`. - * When changing the DNS provider from one type to another, pass the new - * provider's field name as part of the field mask. For example, when changing - * from a Google Domains DNS configuration to a Custom DNS configuration, the - * `update_mask` is `"custom_dns"`. // - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Validate the request without actually updating the DNS settings. - * - * Generated from protobuf field bool validate_only = 4; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $registration - * Required. The name of the `Registration` whose DNS settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * @type \Google\Cloud\Domains\V1alpha2\DnsSettings $dns_settings - * Fields of the `DnsSettings` to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the name servers are being updated for an existing - * Custom DNS configuration, the `update_mask` is - * `"custom_dns.name_servers"`. - * When changing the DNS provider from one type to another, pass the new - * provider's field name as part of the field mask. For example, when changing - * from a Google Domains DNS configuration to a Custom DNS configuration, the - * `update_mask` is `"custom_dns"`. // - * @type bool $validate_only - * Validate the request without actually updating the DNS settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` whose DNS settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getRegistration() - { - return $this->registration; - } - - /** - * Required. The name of the `Registration` whose DNS settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkString($var, True); - $this->registration = $var; - - return $this; - } - - /** - * Fields of the `DnsSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings dns_settings = 2; - * @return \Google\Cloud\Domains\V1alpha2\DnsSettings|null - */ - public function getDnsSettings() - { - return $this->dns_settings; - } - - public function hasDnsSettings() - { - return isset($this->dns_settings); - } - - public function clearDnsSettings() - { - unset($this->dns_settings); - } - - /** - * Fields of the `DnsSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings dns_settings = 2; - * @param \Google\Cloud\Domains\V1alpha2\DnsSettings $var - * @return $this - */ - public function setDnsSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\DnsSettings::class); - $this->dns_settings = $var; - - return $this; - } - - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the name servers are being updated for an existing - * Custom DNS configuration, the `update_mask` is - * `"custom_dns.name_servers"`. - * When changing the DNS provider from one type to another, pass the new - * provider's field name as part of the field mask. For example, when changing - * from a Google Domains DNS configuration to a Custom DNS configuration, the - * `update_mask` is `"custom_dns"`. // - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 describing which fields to update as a comma-separated list. - * For example, if only the name servers are being updated for an existing - * Custom DNS configuration, the `update_mask` is - * `"custom_dns.name_servers"`. - * When changing the DNS provider from one type to another, pass the new - * provider's field name as part of the field mask. For example, when changing - * from a Google Domains DNS configuration to a Custom DNS configuration, the - * `update_mask` is `"custom_dns"`. // - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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; - } - - /** - * Validate the request without actually updating the DNS settings. - * - * Generated from protobuf field bool validate_only = 4; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Validate the request without actually updating the DNS settings. - * - * Generated from protobuf field bool validate_only = 4; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureManagementSettingsRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureManagementSettingsRequest.php deleted file mode 100644 index 1a12a52cd259..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ConfigureManagementSettingsRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.domains.v1alpha2.ConfigureManagementSettingsRequest - */ -class ConfigureManagementSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` whose management settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $registration = ''; - /** - * Fields of the `ManagementSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings management_settings = 2; - */ - protected $management_settings = null; - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the transfer lock is being updated, the `update_mask` - * is `"transfer_lock_state"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $registration - * Required. The name of the `Registration` whose management settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * @type \Google\Cloud\Domains\V1alpha2\ManagementSettings $management_settings - * Fields of the `ManagementSettings` to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the transfer lock is being updated, the `update_mask` - * is `"transfer_lock_state"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` whose management settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getRegistration() - { - return $this->registration; - } - - /** - * Required. The name of the `Registration` whose management settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkString($var, True); - $this->registration = $var; - - return $this; - } - - /** - * Fields of the `ManagementSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings management_settings = 2; - * @return \Google\Cloud\Domains\V1alpha2\ManagementSettings|null - */ - public function getManagementSettings() - { - return $this->management_settings; - } - - public function hasManagementSettings() - { - return isset($this->management_settings); - } - - public function clearManagementSettings() - { - unset($this->management_settings); - } - - /** - * Fields of the `ManagementSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings management_settings = 2; - * @param \Google\Cloud\Domains\V1alpha2\ManagementSettings $var - * @return $this - */ - public function setManagementSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ManagementSettings::class); - $this->management_settings = $var; - - return $this; - } - - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the transfer lock is being updated, the `update_mask` - * is `"transfer_lock_state"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 describing which fields to update as a comma-separated list. - * For example, if only the transfer lock is being updated, the `update_mask` - * is `"transfer_lock_state"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactNotice.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactNotice.php deleted file mode 100644 index c4104fa0eb67..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactNotice.php +++ /dev/null @@ -1,55 +0,0 @@ -google.cloud.domains.v1alpha2.ContactNotice - */ -class ContactNotice -{ - /** - * The notice is undefined. - * - * Generated from protobuf enum CONTACT_NOTICE_UNSPECIFIED = 0; - */ - const CONTACT_NOTICE_UNSPECIFIED = 0; - /** - * Required when setting the `privacy` field of `ContactSettings` to - * `PUBLIC_CONTACT_DATA`, which exposes contact data publicly. - * - * Generated from protobuf enum PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT = 1; - */ - const PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT = 1; - - private static $valueToName = [ - self::CONTACT_NOTICE_UNSPECIFIED => 'CONTACT_NOTICE_UNSPECIFIED', - self::PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT => 'PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactPrivacy.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactPrivacy.php deleted file mode 100644 index f50a78c509fc..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactPrivacy.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.domains.v1alpha2.ContactPrivacy - */ -class ContactPrivacy -{ - /** - * The contact privacy settings are undefined. - * - * Generated from protobuf enum CONTACT_PRIVACY_UNSPECIFIED = 0; - */ - const CONTACT_PRIVACY_UNSPECIFIED = 0; - /** - * All the data from `ContactSettings` is publicly available. When setting - * this option, you must also provide a - * `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the - * request. - * - * Generated from protobuf enum PUBLIC_CONTACT_DATA = 1; - */ - const PUBLIC_CONTACT_DATA = 1; - /** - * None of the data from `ContactSettings` is publicly available. Instead, - * proxy contact data is published for your domain. Email sent to the proxy - * email address is forwarded to the registrant's email address. Cloud Domains - * provides this privacy proxy service at no additional cost. - * - * Generated from protobuf enum PRIVATE_CONTACT_DATA = 2; - */ - const PRIVATE_CONTACT_DATA = 2; - /** - * Some data from `ContactSettings` is publicly available. The actual - * information redacted depends on the domain. For details, see [the - * registration privacy - * article](https://support.google.com/domains/answer/3251242). - * - * Generated from protobuf enum REDACTED_CONTACT_DATA = 3; - */ - const REDACTED_CONTACT_DATA = 3; - - private static $valueToName = [ - self::CONTACT_PRIVACY_UNSPECIFIED => 'CONTACT_PRIVACY_UNSPECIFIED', - self::PUBLIC_CONTACT_DATA => 'PUBLIC_CONTACT_DATA', - self::PRIVATE_CONTACT_DATA => 'PRIVATE_CONTACT_DATA', - self::REDACTED_CONTACT_DATA => 'REDACTED_CONTACT_DATA', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings.php deleted file mode 100644 index bcfaa0bec763..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings.php +++ /dev/null @@ -1,222 +0,0 @@ -google.cloud.domains.v1alpha2.ContactSettings - */ -class ContactSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Privacy setting for the contacts associated with the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactPrivacy privacy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $privacy = 0; - /** - * Required. The registrant contact for the `Registration`. - * *Caution: Anyone with access to this email address, phone number, - * and/or postal address can take control of the domain.* - * *Warning: For new `Registration`s, the registrant receives an email - * confirmation that they must complete within 15 days to avoid domain - * suspension.* - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact registrant_contact = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $registrant_contact = null; - /** - * Required. The administrative contact for the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact admin_contact = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $admin_contact = null; - /** - * Required. The technical contact for the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact technical_contact = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $technical_contact = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $privacy - * Required. Privacy setting for the contacts associated with the `Registration`. - * @type \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $registrant_contact - * Required. The registrant contact for the `Registration`. - * *Caution: Anyone with access to this email address, phone number, - * and/or postal address can take control of the domain.* - * *Warning: For new `Registration`s, the registrant receives an email - * confirmation that they must complete within 15 days to avoid domain - * suspension.* - * @type \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $admin_contact - * Required. The administrative contact for the `Registration`. - * @type \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $technical_contact - * Required. The technical contact for the `Registration`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. Privacy setting for the contacts associated with the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactPrivacy privacy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getPrivacy() - { - return $this->privacy; - } - - /** - * Required. Privacy setting for the contacts associated with the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactPrivacy privacy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setPrivacy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\ContactPrivacy::class); - $this->privacy = $var; - - return $this; - } - - /** - * Required. The registrant contact for the `Registration`. - * *Caution: Anyone with access to this email address, phone number, - * and/or postal address can take control of the domain.* - * *Warning: For new `Registration`s, the registrant receives an email - * confirmation that they must complete within 15 days to avoid domain - * suspension.* - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact registrant_contact = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact|null - */ - public function getRegistrantContact() - { - return $this->registrant_contact; - } - - public function hasRegistrantContact() - { - return isset($this->registrant_contact); - } - - public function clearRegistrantContact() - { - unset($this->registrant_contact); - } - - /** - * Required. The registrant contact for the `Registration`. - * *Caution: Anyone with access to this email address, phone number, - * and/or postal address can take control of the domain.* - * *Warning: For new `Registration`s, the registrant receives an email - * confirmation that they must complete within 15 days to avoid domain - * suspension.* - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact registrant_contact = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $var - * @return $this - */ - public function setRegistrantContact($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact::class); - $this->registrant_contact = $var; - - return $this; - } - - /** - * Required. The administrative contact for the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact admin_contact = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact|null - */ - public function getAdminContact() - { - return $this->admin_contact; - } - - public function hasAdminContact() - { - return isset($this->admin_contact); - } - - public function clearAdminContact() - { - unset($this->admin_contact); - } - - /** - * Required. The administrative contact for the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact admin_contact = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $var - * @return $this - */ - public function setAdminContact($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact::class); - $this->admin_contact = $var; - - return $this; - } - - /** - * Required. The technical contact for the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact technical_contact = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact|null - */ - public function getTechnicalContact() - { - return $this->technical_contact; - } - - public function hasTechnicalContact() - { - return isset($this->technical_contact); - } - - public function clearTechnicalContact() - { - unset($this->technical_contact); - } - - /** - * Required. The technical contact for the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings.Contact technical_contact = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact $var - * @return $this - */ - public function setTechnicalContact($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ContactSettings\Contact::class); - $this->technical_contact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings/Contact.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings/Contact.php deleted file mode 100644 index d06d25d193e3..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings/Contact.php +++ /dev/null @@ -1,190 +0,0 @@ -google.cloud.domains.v1alpha2.ContactSettings.Contact - */ -class Contact extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Postal address of the contact. - * - * Generated from protobuf field .google.type.PostalAddress postal_address = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $postal_address = null; - /** - * Required. Email address of the contact. - * - * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $email = ''; - /** - * Required. Phone number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * - * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $phone_number = ''; - /** - * Fax number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * - * Generated from protobuf field string fax_number = 4; - */ - protected $fax_number = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\PostalAddress $postal_address - * Required. Postal address of the contact. - * @type string $email - * Required. Email address of the contact. - * @type string $phone_number - * Required. Phone number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * @type string $fax_number - * Fax number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. Postal address of the contact. - * - * Generated from protobuf field .google.type.PostalAddress postal_address = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\PostalAddress|null - */ - public function getPostalAddress() - { - return $this->postal_address; - } - - public function hasPostalAddress() - { - return isset($this->postal_address); - } - - public function clearPostalAddress() - { - unset($this->postal_address); - } - - /** - * Required. Postal address of the contact. - * - * Generated from protobuf field .google.type.PostalAddress postal_address = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\PostalAddress $var - * @return $this - */ - public function setPostalAddress($var) - { - GPBUtil::checkMessage($var, \Google\Type\PostalAddress::class); - $this->postal_address = $var; - - return $this; - } - - /** - * Required. Email address of the contact. - * - * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Required. Email address of the contact. - * - * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - - /** - * Required. Phone number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * - * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPhoneNumber() - { - return $this->phone_number; - } - - /** - * Required. Phone number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * - * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPhoneNumber($var) - { - GPBUtil::checkString($var, True); - $this->phone_number = $var; - - return $this; - } - - /** - * Fax number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * - * Generated from protobuf field string fax_number = 4; - * @return string - */ - public function getFaxNumber() - { - return $this->fax_number; - } - - /** - * Fax number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * - * Generated from protobuf field string fax_number = 4; - * @param string $var - * @return $this - */ - public function setFaxNumber($var) - { - GPBUtil::checkString($var, True); - $this->fax_number = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Contact::class, \Google\Cloud\Domains\V1alpha2\ContactSettings_Contact::class); - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings_Contact.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings_Contact.php deleted file mode 100644 index 5e0fa4955390..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ContactSettings_Contact.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.domains.v1alpha2.DeleteRegistrationRequest - */ -class DeleteRegistrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` to delete, - * in the format `projects/*/locations/*/registrations/*`. - * - * 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 name of the `Registration` to delete, - * in the format `projects/*/locations/*/registrations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` to delete, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated 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 `Registration` to delete, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings.php deleted file mode 100644 index 6358bd0ed983..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.domains.v1alpha2.DnsSettings - */ -class DnsSettings extends \Google\Protobuf\Internal\Message -{ - /** - * The list of glue records for this `Registration`. Commonly empty. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.GlueRecord glue_records = 4; - */ - private $glue_records; - protected $dns_provider; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Domains\V1alpha2\DnsSettings\CustomDns $custom_dns - * An arbitrary DNS provider identified by its name servers. - * @type \Google\Cloud\Domains\V1alpha2\DnsSettings\GoogleDomainsDns $google_domains_dns - * The free DNS zone provided by - * [Google Domains](https://domains.google/). - * @type array<\Google\Cloud\Domains\V1alpha2\DnsSettings\GlueRecord>|\Google\Protobuf\Internal\RepeatedField $glue_records - * The list of glue records for this `Registration`. Commonly empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * An arbitrary DNS provider identified by its name servers. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.CustomDns custom_dns = 1; - * @return \Google\Cloud\Domains\V1alpha2\DnsSettings\CustomDns|null - */ - public function getCustomDns() - { - return $this->readOneof(1); - } - - public function hasCustomDns() - { - return $this->hasOneof(1); - } - - /** - * An arbitrary DNS provider identified by its name servers. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.CustomDns custom_dns = 1; - * @param \Google\Cloud\Domains\V1alpha2\DnsSettings\CustomDns $var - * @return $this - */ - public function setCustomDns($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\DnsSettings\CustomDns::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The free DNS zone provided by - * [Google Domains](https://domains.google/). - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.GoogleDomainsDns google_domains_dns = 2; - * @return \Google\Cloud\Domains\V1alpha2\DnsSettings\GoogleDomainsDns|null - */ - public function getGoogleDomainsDns() - { - return $this->readOneof(2); - } - - public function hasGoogleDomainsDns() - { - return $this->hasOneof(2); - } - - /** - * The free DNS zone provided by - * [Google Domains](https://domains.google/). - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.GoogleDomainsDns google_domains_dns = 2; - * @param \Google\Cloud\Domains\V1alpha2\DnsSettings\GoogleDomainsDns $var - * @return $this - */ - public function setGoogleDomainsDns($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\DnsSettings\GoogleDomainsDns::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The list of glue records for this `Registration`. Commonly empty. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.GlueRecord glue_records = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGlueRecords() - { - return $this->glue_records; - } - - /** - * The list of glue records for this `Registration`. Commonly empty. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.GlueRecord glue_records = 4; - * @param array<\Google\Cloud\Domains\V1alpha2\DnsSettings\GlueRecord>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGlueRecords($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1alpha2\DnsSettings\GlueRecord::class); - $this->glue_records = $arr; - - return $this; - } - - /** - * @return string - */ - public function getDnsProvider() - { - return $this->whichOneof("dns_provider"); - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/CustomDns.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/CustomDns.php deleted file mode 100644 index e071d7558638..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/CustomDns.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.domains.v1alpha2.DnsSettings.CustomDns - */ -class CustomDns extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. - * - * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $name_servers; - /** - * The list of DS records for this domain, which are used to enable DNSSEC. - * The domain's DNS provider can provide the values to set here. If this - * field is empty, DNSSEC is disabled. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.DsRecord ds_records = 2; - */ - private $ds_records; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $name_servers - * Required. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. - * @type array<\Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $ds_records - * The list of DS records for this domain, which are used to enable DNSSEC. - * The domain's DNS provider can provide the values to set here. If this - * field is empty, DNSSEC is disabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. - * - * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNameServers() - { - return $this->name_servers; - } - - /** - * Required. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. - * - * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNameServers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->name_servers = $arr; - - return $this; - } - - /** - * The list of DS records for this domain, which are used to enable DNSSEC. - * The domain's DNS provider can provide the values to set here. If this - * field is empty, DNSSEC is disabled. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.DsRecord ds_records = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDsRecords() - { - return $this->ds_records; - } - - /** - * The list of DS records for this domain, which are used to enable DNSSEC. - * The domain's DNS provider can provide the values to set here. If this - * field is empty, DNSSEC is disabled. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.DsRecord ds_records = 2; - * @param array<\Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDsRecords($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord::class); - $this->ds_records = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CustomDns::class, \Google\Cloud\Domains\V1alpha2\DnsSettings_CustomDns::class); - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord.php deleted file mode 100644 index 72a0148d4880..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.domains.v1alpha2.DnsSettings.DsRecord - */ -class DsRecord extends \Google\Protobuf\Internal\Message -{ - /** - * The key tag of the record. Must be set in range 0 -- 65535. - * - * Generated from protobuf field int32 key_tag = 1; - */ - protected $key_tag = 0; - /** - * The algorithm used to generate the referenced DNSKEY. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsRecord.Algorithm algorithm = 2; - */ - protected $algorithm = 0; - /** - * The hash function used to generate the digest of the referenced DNSKEY. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsRecord.DigestType digest_type = 3; - */ - protected $digest_type = 0; - /** - * The digest generated from the referenced DNSKEY. - * - * Generated from protobuf field string digest = 4; - */ - protected $digest = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $key_tag - * The key tag of the record. Must be set in range 0 -- 65535. - * @type int $algorithm - * The algorithm used to generate the referenced DNSKEY. - * @type int $digest_type - * The hash function used to generate the digest of the referenced DNSKEY. - * @type string $digest - * The digest generated from the referenced DNSKEY. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * The key tag of the record. Must be set in range 0 -- 65535. - * - * Generated from protobuf field int32 key_tag = 1; - * @return int - */ - public function getKeyTag() - { - return $this->key_tag; - } - - /** - * The key tag of the record. Must be set in range 0 -- 65535. - * - * Generated from protobuf field int32 key_tag = 1; - * @param int $var - * @return $this - */ - public function setKeyTag($var) - { - GPBUtil::checkInt32($var); - $this->key_tag = $var; - - return $this; - } - - /** - * The algorithm used to generate the referenced DNSKEY. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsRecord.Algorithm algorithm = 2; - * @return int - */ - public function getAlgorithm() - { - return $this->algorithm; - } - - /** - * The algorithm used to generate the referenced DNSKEY. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsRecord.Algorithm algorithm = 2; - * @param int $var - * @return $this - */ - public function setAlgorithm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord\Algorithm::class); - $this->algorithm = $var; - - return $this; - } - - /** - * The hash function used to generate the digest of the referenced DNSKEY. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsRecord.DigestType digest_type = 3; - * @return int - */ - public function getDigestType() - { - return $this->digest_type; - } - - /** - * The hash function used to generate the digest of the referenced DNSKEY. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsRecord.DigestType digest_type = 3; - * @param int $var - * @return $this - */ - public function setDigestType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord\DigestType::class); - $this->digest_type = $var; - - return $this; - } - - /** - * The digest generated from the referenced DNSKEY. - * - * Generated from protobuf field string digest = 4; - * @return string - */ - public function getDigest() - { - return $this->digest; - } - - /** - * The digest generated from the referenced DNSKEY. - * - * Generated from protobuf field string digest = 4; - * @param string $var - * @return $this - */ - public function setDigest($var) - { - GPBUtil::checkString($var, True); - $this->digest = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DsRecord::class, \Google\Cloud\Domains\V1alpha2\DnsSettings_DsRecord::class); - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/Algorithm.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/Algorithm.php deleted file mode 100644 index 3df3453dfaac..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/Algorithm.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.domains.v1alpha2.DnsSettings.DsRecord.Algorithm - */ -class Algorithm -{ - /** - * The algorithm is unspecified. - * - * Generated from protobuf enum ALGORITHM_UNSPECIFIED = 0; - */ - const ALGORITHM_UNSPECIFIED = 0; - /** - * RSA/MD5. Cannot be used for new deployments. - * - * Generated from protobuf enum RSAMD5 = 1; - */ - const RSAMD5 = 1; - /** - * Diffie-Hellman. Cannot be used for new deployments. - * - * Generated from protobuf enum DH = 2; - */ - const DH = 2; - /** - * DSA/SHA1. Not recommended for new deployments. - * - * Generated from protobuf enum DSA = 3; - */ - const DSA = 3; - /** - * ECC. Not recommended for new deployments. - * - * Generated from protobuf enum ECC = 4; - */ - const ECC = 4; - /** - * RSA/SHA-1. Not recommended for new deployments. - * - * Generated from protobuf enum RSASHA1 = 5; - */ - const RSASHA1 = 5; - /** - * DSA-NSEC3-SHA1. Not recommended for new deployments. - * - * Generated from protobuf enum DSANSEC3SHA1 = 6; - */ - const DSANSEC3SHA1 = 6; - /** - * RSA/SHA1-NSEC3-SHA1. Not recommended for new deployments. - * - * Generated from protobuf enum RSASHA1NSEC3SHA1 = 7; - */ - const RSASHA1NSEC3SHA1 = 7; - /** - * RSA/SHA-256. - * - * Generated from protobuf enum RSASHA256 = 8; - */ - const RSASHA256 = 8; - /** - * RSA/SHA-512. - * - * Generated from protobuf enum RSASHA512 = 10; - */ - const RSASHA512 = 10; - /** - * GOST R 34.10-2001. - * - * Generated from protobuf enum ECCGOST = 12; - */ - const ECCGOST = 12; - /** - * ECDSA Curve P-256 with SHA-256. - * - * Generated from protobuf enum ECDSAP256SHA256 = 13; - */ - const ECDSAP256SHA256 = 13; - /** - * ECDSA Curve P-384 with SHA-384. - * - * Generated from protobuf enum ECDSAP384SHA384 = 14; - */ - const ECDSAP384SHA384 = 14; - /** - * Ed25519. - * - * Generated from protobuf enum ED25519 = 15; - */ - const ED25519 = 15; - /** - * Ed448. - * - * Generated from protobuf enum ED448 = 16; - */ - const ED448 = 16; - /** - * Reserved for Indirect Keys. Cannot be used for new deployments. - * - * Generated from protobuf enum INDIRECT = 252; - */ - const INDIRECT = 252; - /** - * Private algorithm. Cannot be used for new deployments. - * - * Generated from protobuf enum PRIVATEDNS = 253; - */ - const PRIVATEDNS = 253; - /** - * Private algorithm OID. Cannot be used for new deployments. - * - * Generated from protobuf enum PRIVATEOID = 254; - */ - const PRIVATEOID = 254; - - private static $valueToName = [ - self::ALGORITHM_UNSPECIFIED => 'ALGORITHM_UNSPECIFIED', - self::RSAMD5 => 'RSAMD5', - self::DH => 'DH', - self::DSA => 'DSA', - self::ECC => 'ECC', - self::RSASHA1 => 'RSASHA1', - self::DSANSEC3SHA1 => 'DSANSEC3SHA1', - self::RSASHA1NSEC3SHA1 => 'RSASHA1NSEC3SHA1', - self::RSASHA256 => 'RSASHA256', - self::RSASHA512 => 'RSASHA512', - self::ECCGOST => 'ECCGOST', - self::ECDSAP256SHA256 => 'ECDSAP256SHA256', - self::ECDSAP384SHA384 => 'ECDSAP384SHA384', - self::ED25519 => 'ED25519', - self::ED448 => 'ED448', - self::INDIRECT => 'INDIRECT', - self::PRIVATEDNS => 'PRIVATEDNS', - self::PRIVATEOID => 'PRIVATEOID', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Algorithm::class, \Google\Cloud\Domains\V1alpha2\DnsSettings_DsRecord_Algorithm::class); - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/DigestType.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/DigestType.php deleted file mode 100644 index f01322aa7de1..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsRecord/DigestType.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.domains.v1alpha2.DnsSettings.DsRecord.DigestType - */ -class DigestType -{ - /** - * The DigestType is unspecified. - * - * Generated from protobuf enum DIGEST_TYPE_UNSPECIFIED = 0; - */ - const DIGEST_TYPE_UNSPECIFIED = 0; - /** - * SHA-1. Not recommended for new deployments. - * - * Generated from protobuf enum SHA1 = 1; - */ - const SHA1 = 1; - /** - * SHA-256. - * - * Generated from protobuf enum SHA256 = 2; - */ - const SHA256 = 2; - /** - * GOST R 34.11-94. - * - * Generated from protobuf enum GOST3411 = 3; - */ - const GOST3411 = 3; - /** - * SHA-384. - * - * Generated from protobuf enum SHA384 = 4; - */ - const SHA384 = 4; - - private static $valueToName = [ - self::DIGEST_TYPE_UNSPECIFIED => 'DIGEST_TYPE_UNSPECIFIED', - self::SHA1 => 'SHA1', - self::SHA256 => 'SHA256', - self::GOST3411 => 'GOST3411', - self::SHA384 => 'SHA384', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DigestType::class, \Google\Cloud\Domains\V1alpha2\DnsSettings_DsRecord_DigestType::class); - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsState.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsState.php deleted file mode 100644 index 899066f15a66..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/DsState.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.domains.v1alpha2.DnsSettings.DsState - */ -class DsState -{ - /** - * DS state is unspecified. - * - * Generated from protobuf enum DS_STATE_UNSPECIFIED = 0; - */ - const DS_STATE_UNSPECIFIED = 0; - /** - * DNSSEC is disabled for this domain. No DS records for this domain are - * published in the parent DNS zone. - * - * Generated from protobuf enum DS_RECORDS_UNPUBLISHED = 1; - */ - const DS_RECORDS_UNPUBLISHED = 1; - /** - * DNSSEC is enabled for this domain. Appropriate DS records for this domain - * are published in the parent DNS zone. This option is valid only if the - * DNS zone referenced in the `Registration`'s `dns_provider` field is - * already DNSSEC-signed. - * - * Generated from protobuf enum DS_RECORDS_PUBLISHED = 2; - */ - const DS_RECORDS_PUBLISHED = 2; - - private static $valueToName = [ - self::DS_STATE_UNSPECIFIED => 'DS_STATE_UNSPECIFIED', - self::DS_RECORDS_UNPUBLISHED => 'DS_RECORDS_UNPUBLISHED', - self::DS_RECORDS_PUBLISHED => 'DS_RECORDS_PUBLISHED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DsState::class, \Google\Cloud\Domains\V1alpha2\DnsSettings_DsState::class); - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GlueRecord.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GlueRecord.php deleted file mode 100644 index 408db83faf91..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GlueRecord.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.domains.v1alpha2.DnsSettings.GlueRecord - */ -class GlueRecord extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Domain name of the host in Punycode format. - * - * Generated from protobuf field string host_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $host_name = ''; - /** - * List of IPv4 addresses corresponding to this host in the standard decimal - * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and - * `ipv6_address` must be set. - * - * Generated from protobuf field repeated string ipv4_addresses = 2; - */ - private $ipv4_addresses; - /** - * List of IPv6 addresses corresponding to this host in the standard - * hexadecimal format (e.g. `2001:db8::`). At least one of - * `ipv4_address` and `ipv6_address` must be set. - * - * Generated from protobuf field repeated string ipv6_addresses = 3; - */ - private $ipv6_addresses; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $host_name - * Required. Domain name of the host in Punycode format. - * @type array|\Google\Protobuf\Internal\RepeatedField $ipv4_addresses - * List of IPv4 addresses corresponding to this host in the standard decimal - * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and - * `ipv6_address` must be set. - * @type array|\Google\Protobuf\Internal\RepeatedField $ipv6_addresses - * List of IPv6 addresses corresponding to this host in the standard - * hexadecimal format (e.g. `2001:db8::`). At least one of - * `ipv4_address` and `ipv6_address` must be set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. Domain name of the host in Punycode format. - * - * Generated from protobuf field string host_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHostName() - { - return $this->host_name; - } - - /** - * Required. Domain name of the host in Punycode format. - * - * Generated from protobuf field string host_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHostName($var) - { - GPBUtil::checkString($var, True); - $this->host_name = $var; - - return $this; - } - - /** - * List of IPv4 addresses corresponding to this host in the standard decimal - * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and - * `ipv6_address` must be set. - * - * Generated from protobuf field repeated string ipv4_addresses = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpv4Addresses() - { - return $this->ipv4_addresses; - } - - /** - * List of IPv4 addresses corresponding to this host in the standard decimal - * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and - * `ipv6_address` must be set. - * - * Generated from protobuf field repeated string ipv4_addresses = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpv4Addresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ipv4_addresses = $arr; - - return $this; - } - - /** - * List of IPv6 addresses corresponding to this host in the standard - * hexadecimal format (e.g. `2001:db8::`). At least one of - * `ipv4_address` and `ipv6_address` must be set. - * - * Generated from protobuf field repeated string ipv6_addresses = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpv6Addresses() - { - return $this->ipv6_addresses; - } - - /** - * List of IPv6 addresses corresponding to this host in the standard - * hexadecimal format (e.g. `2001:db8::`). At least one of - * `ipv4_address` and `ipv6_address` must be set. - * - * Generated from protobuf field repeated string ipv6_addresses = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpv6Addresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ipv6_addresses = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GlueRecord::class, \Google\Cloud\Domains\V1alpha2\DnsSettings_GlueRecord::class); - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GoogleDomainsDns.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GoogleDomainsDns.php deleted file mode 100644 index 0eec4b52da89..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings/GoogleDomainsDns.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.domains.v1alpha2.DnsSettings.GoogleDomainsDns - */ -class GoogleDomainsDns extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. This field is automatically populated with the name - * servers assigned to the Google Domains DNS zone. - * - * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $name_servers; - /** - * Required. The state of DS records for this domain. Used to enable or disable - * automatic DNSSEC. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsState ds_state = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ds_state = 0; - /** - * Output only. The list of DS records published for this domain. The list is - * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, - * otherwise it remains empty. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.DsRecord ds_records = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $ds_records; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $name_servers - * Output only. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. This field is automatically populated with the name - * servers assigned to the Google Domains DNS zone. - * @type int $ds_state - * Required. The state of DS records for this domain. Used to enable or disable - * automatic DNSSEC. - * @type array<\Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $ds_records - * Output only. The list of DS records published for this domain. The list is - * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, - * otherwise it remains empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Output only. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. This field is automatically populated with the name - * servers assigned to the Google Domains DNS zone. - * - * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNameServers() - { - return $this->name_servers; - } - - /** - * Output only. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. This field is automatically populated with the name - * servers assigned to the Google Domains DNS zone. - * - * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNameServers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->name_servers = $arr; - - return $this; - } - - /** - * Required. The state of DS records for this domain. Used to enable or disable - * automatic DNSSEC. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsState ds_state = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDsState() - { - return $this->ds_state; - } - - /** - * Required. The state of DS records for this domain. Used to enable or disable - * automatic DNSSEC. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings.DsState ds_state = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDsState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\DnsSettings\DsState::class); - $this->ds_state = $var; - - return $this; - } - - /** - * Output only. The list of DS records published for this domain. The list is - * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, - * otherwise it remains empty. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.DsRecord ds_records = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDsRecords() - { - return $this->ds_records; - } - - /** - * Output only. The list of DS records published for this domain. The list is - * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, - * otherwise it remains empty. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DnsSettings.DsRecord ds_records = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDsRecords($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1alpha2\DnsSettings\DsRecord::class); - $this->ds_records = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GoogleDomainsDns::class, \Google\Cloud\Domains\V1alpha2\DnsSettings_GoogleDomainsDns::class); - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_CustomDns.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_CustomDns.php deleted file mode 100644 index a0f4ab4b92a1..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DnsSettings_CustomDns.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.domains.v1alpha2.DomainNotice - */ -class DomainNotice -{ - /** - * The notice is undefined. - * - * Generated from protobuf enum DOMAIN_NOTICE_UNSPECIFIED = 0; - */ - const DOMAIN_NOTICE_UNSPECIFIED = 0; - /** - * Indicates that the domain is preloaded on the HTTP Strict Transport - * Security list in browsers. Serving a website on such domain requires - * an SSL certificate. For details, see - * [how to get an SSL - * certificate](https://support.google.com/domains/answer/7638036). - * - * Generated from protobuf enum HSTS_PRELOADED = 1; - */ - const HSTS_PRELOADED = 1; - - private static $valueToName = [ - self::DOMAIN_NOTICE_UNSPECIFIED => 'DOMAIN_NOTICE_UNSPECIFIED', - self::HSTS_PRELOADED => 'HSTS_PRELOADED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DomainsGrpcClient.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DomainsGrpcClient.php deleted file mode 100644 index ec51b6209034..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/DomainsGrpcClient.php +++ /dev/null @@ -1,341 +0,0 @@ -_simpleRequest('/google.cloud.domains.v1alpha2.Domains/SearchDomains', - $argument, - ['\Google\Cloud\Domains\V1alpha2\SearchDomainsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets parameters needed to register a new domain name, including price and - * up-to-date availability. Use the returned values to call `RegisterDomain`. - * @param \Google\Cloud\Domains\V1alpha2\RetrieveRegisterParametersRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RetrieveRegisterParameters(\Google\Cloud\Domains\V1alpha2\RetrieveRegisterParametersRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/RetrieveRegisterParameters', - $argument, - ['\Google\Cloud\Domains\V1alpha2\RetrieveRegisterParametersResponse', 'decode'], - $metadata, $options); - } - - /** - * Registers a new domain name and creates a corresponding `Registration` - * resource. - * - * Call `RetrieveRegisterParameters` first to check availability of the domain - * name and determine parameters like price that are needed to build a call to - * this method. - * - * A successful call creates a `Registration` resource in state - * `REGISTRATION_PENDING`, which resolves to `ACTIVE` within 1-2 - * minutes, indicating that the domain was successfully registered. If the - * resource ends up in state `REGISTRATION_FAILED`, it indicates that the - * domain was not registered successfully, and you can safely delete the - * resource and retry registration. - * @param \Google\Cloud\Domains\V1alpha2\RegisterDomainRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RegisterDomain(\Google\Cloud\Domains\V1alpha2\RegisterDomainRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/RegisterDomain', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Gets parameters needed to transfer a domain name from another registrar to - * Cloud Domains. For domains managed by Google Domains, transferring to Cloud - * Domains is not supported. - * - * - * Use the returned values to call `TransferDomain`. - * @param \Google\Cloud\Domains\V1alpha2\RetrieveTransferParametersRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RetrieveTransferParameters(\Google\Cloud\Domains\V1alpha2\RetrieveTransferParametersRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/RetrieveTransferParameters', - $argument, - ['\Google\Cloud\Domains\V1alpha2\RetrieveTransferParametersResponse', 'decode'], - $metadata, $options); - } - - /** - * Transfers a domain name from another registrar to Cloud Domains. For - * domains managed by Google Domains, transferring to Cloud Domains is not - * supported. - * - * - * Before calling this method, go to the domain's current registrar to unlock - * the domain for transfer and retrieve the domain's transfer authorization - * code. Then call `RetrieveTransferParameters` to confirm that the domain is - * unlocked and to get values needed to build a call to this method. - * - * A successful call creates a `Registration` resource in state - * `TRANSFER_PENDING`. It can take several days to complete the transfer - * process. The registrant can often speed up this process by approving the - * transfer through the current registrar, either by clicking a link in an - * email from the registrar or by visiting the registrar's website. - * - * A few minutes after transfer approval, the resource transitions to state - * `ACTIVE`, indicating that the transfer was successful. If the transfer is - * rejected or the request expires without being approved, the resource can - * end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete - * the resource and retry the transfer. - * @param \Google\Cloud\Domains\V1alpha2\TransferDomainRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function TransferDomain(\Google\Cloud\Domains\V1alpha2\TransferDomainRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/TransferDomain', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists the `Registration` resources in a project. - * @param \Google\Cloud\Domains\V1alpha2\ListRegistrationsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListRegistrations(\Google\Cloud\Domains\V1alpha2\ListRegistrationsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/ListRegistrations', - $argument, - ['\Google\Cloud\Domains\V1alpha2\ListRegistrationsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets the details of a `Registration` resource. - * @param \Google\Cloud\Domains\V1alpha2\GetRegistrationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetRegistration(\Google\Cloud\Domains\V1alpha2\GetRegistrationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/GetRegistration', - $argument, - ['\Google\Cloud\Domains\V1alpha2\Registration', 'decode'], - $metadata, $options); - } - - /** - * Updates select fields of a `Registration` resource, notably `labels`. To - * update other fields, use the appropriate custom update method: - * - * * To update management settings, see `ConfigureManagementSettings` - * * To update DNS configuration, see `ConfigureDnsSettings` - * * To update contact information, see `ConfigureContactSettings` - * @param \Google\Cloud\Domains\V1alpha2\UpdateRegistrationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateRegistration(\Google\Cloud\Domains\V1alpha2\UpdateRegistrationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/UpdateRegistration', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates a `Registration`'s management settings. - * @param \Google\Cloud\Domains\V1alpha2\ConfigureManagementSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ConfigureManagementSettings(\Google\Cloud\Domains\V1alpha2\ConfigureManagementSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/ConfigureManagementSettings', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates a `Registration`'s DNS settings. - * @param \Google\Cloud\Domains\V1alpha2\ConfigureDnsSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ConfigureDnsSettings(\Google\Cloud\Domains\V1alpha2\ConfigureDnsSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/ConfigureDnsSettings', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates a `Registration`'s contact settings. Some changes require - * confirmation by the domain's registrant contact . - * @param \Google\Cloud\Domains\V1alpha2\ConfigureContactSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ConfigureContactSettings(\Google\Cloud\Domains\V1alpha2\ConfigureContactSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/ConfigureContactSettings', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Exports a `Registration` resource, such that it is no longer managed by - * Cloud Domains. - * - * When an active domain is successfully exported, you can continue to use the - * domain in [Google Domains](https://domains.google/) until it expires. The - * calling user becomes the domain's sole owner in Google Domains, and - * permissions for the domain are subsequently managed there. The domain does - * not renew automatically unless the new owner sets up billing in Google - * Domains. - * @param \Google\Cloud\Domains\V1alpha2\ExportRegistrationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ExportRegistration(\Google\Cloud\Domains\V1alpha2\ExportRegistrationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/ExportRegistration', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a `Registration` resource. - * - * This method works on any `Registration` resource using [Subscription or - * Commitment billing](/domains/pricing#billing-models), provided that the - * resource was created at least 1 day in the past. - * - * For `Registration` resources using - * [Monthly billing](/domains/pricing#billing-models), this method works if: - * - * * `state` is `EXPORTED` with `expire_time` in the past - * * `state` is `REGISTRATION_FAILED` - * * `state` is `TRANSFER_FAILED` - * - * When an active registration is successfully deleted, you can continue to - * use the domain in [Google Domains](https://domains.google/) until it - * expires. The calling user becomes the domain's sole owner in Google - * Domains, and permissions for the domain are subsequently managed there. The - * domain does not renew automatically unless the new owner sets up billing in - * Google Domains. - * @param \Google\Cloud\Domains\V1alpha2\DeleteRegistrationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteRegistration(\Google\Cloud\Domains\V1alpha2\DeleteRegistrationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/DeleteRegistration', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Gets the authorization code of the `Registration` for the purpose of - * transferring the domain to another registrar. - * - * You can call this method only after 60 days have elapsed since the initial - * domain registration. - * @param \Google\Cloud\Domains\V1alpha2\RetrieveAuthorizationCodeRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RetrieveAuthorizationCode(\Google\Cloud\Domains\V1alpha2\RetrieveAuthorizationCodeRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/RetrieveAuthorizationCode', - $argument, - ['\Google\Cloud\Domains\V1alpha2\AuthorizationCode', 'decode'], - $metadata, $options); - } - - /** - * Resets the authorization code of the `Registration` to a new random string. - * - * You can call this method only after 60 days have elapsed since the initial - * domain registration. - * @param \Google\Cloud\Domains\V1alpha2\ResetAuthorizationCodeRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ResetAuthorizationCode(\Google\Cloud\Domains\V1alpha2\ResetAuthorizationCodeRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1alpha2.Domains/ResetAuthorizationCode', - $argument, - ['\Google\Cloud\Domains\V1alpha2\AuthorizationCode', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ExportRegistrationRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ExportRegistrationRequest.php deleted file mode 100644 index 54533db3cc90..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ExportRegistrationRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.domains.v1alpha2.ExportRegistrationRequest - */ -class ExportRegistrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` to export, - * in the format `projects/*/locations/*/registrations/*`. - * - * 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 name of the `Registration` to export, - * in the format `projects/*/locations/*/registrations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` to export, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated 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 `Registration` to export, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/GetRegistrationRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/GetRegistrationRequest.php deleted file mode 100644 index 793e3a1ab317..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/GetRegistrationRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.domains.v1alpha2.GetRegistrationRequest - */ -class GetRegistrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` to get, in the format - * `projects/*/locations/*/registrations/*`. - * - * 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 name of the `Registration` to get, in the format - * `projects/*/locations/*/registrations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` to get, in the format - * `projects/*/locations/*/registrations/*`. - * - * Generated 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 `Registration` to get, in the format - * `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsRequest.php deleted file mode 100644 index 899e43a4a253..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsRequest.php +++ /dev/null @@ -1,225 +0,0 @@ -google.cloud.domains.v1alpha2.ListRegistrationsRequest - */ -class ListRegistrationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which to list `Registration`s, 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 results to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * When set to the `next_page_token` from a prior response, provides the next - * page of results. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filter expression to restrict the `Registration`s returned. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, a boolean, or an enum value. The comparison operator should be one - * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. - * For example, to filter to a specific domain name, use an expression like - * `domainName="example.com"`. You can also check for the existence of a - * field; for example, to find domains using custom DNS settings, use an - * expression like `dnsSettings.customDns:*`. - * You can also create compound filters by combining expressions with the - * `AND` and `OR` operators. For example, to find domains that are suspended - * or have specific issues flagged, use an expression like - * `(state=SUSPENDED) OR (issue:*)`. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which to list `Registration`s, specified in - * the format `projects/*/locations/*`. - * @type int $page_size - * Maximum number of results to return. - * @type string $page_token - * When set to the `next_page_token` from a prior response, provides the next - * page of results. - * @type string $filter - * Filter expression to restrict the `Registration`s returned. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, a boolean, or an enum value. The comparison operator should be one - * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. - * For example, to filter to a specific domain name, use an expression like - * `domainName="example.com"`. You can also check for the existence of a - * field; for example, to find domains using custom DNS settings, use an - * expression like `dnsSettings.customDns:*`. - * You can also create compound filters by combining expressions with the - * `AND` and `OR` operators. For example, to find domains that are suspended - * or have specific issues flagged, use an expression like - * `(state=SUSPENDED) OR (issue:*)`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which to list `Registration`s, 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 to list `Registration`s, 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 results to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * 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; - } - - /** - * When set to the `next_page_token` from a prior response, provides the next - * page of results. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * When set to the `next_page_token` from a prior response, provides the next - * page 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; - } - - /** - * Filter expression to restrict the `Registration`s returned. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, a boolean, or an enum value. The comparison operator should be one - * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. - * For example, to filter to a specific domain name, use an expression like - * `domainName="example.com"`. You can also check for the existence of a - * field; for example, to find domains using custom DNS settings, use an - * expression like `dnsSettings.customDns:*`. - * You can also create compound filters by combining expressions with the - * `AND` and `OR` operators. For example, to find domains that are suspended - * or have specific issues flagged, use an expression like - * `(state=SUSPENDED) OR (issue:*)`. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter expression to restrict the `Registration`s returned. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, a boolean, or an enum value. The comparison operator should be one - * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. - * For example, to filter to a specific domain name, use an expression like - * `domainName="example.com"`. You can also check for the existence of a - * field; for example, to find domains using custom DNS settings, use an - * expression like `dnsSettings.customDns:*`. - * You can also create compound filters by combining expressions with the - * `AND` and `OR` operators. For example, to find domains that are suspended - * or have specific issues flagged, use an expression like - * `(state=SUSPENDED) OR (issue:*)`. - * - * 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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsResponse.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsResponse.php deleted file mode 100644 index 44864a869126..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ListRegistrationsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.domains.v1alpha2.ListRegistrationsResponse - */ -class ListRegistrationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of `Registration`s. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.Registration registrations = 1; - */ - private $registrations; - /** - * When present, there are more results to retrieve. Set `page_token` to this - * value on a subsequent call 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\Domains\V1alpha2\Registration>|\Google\Protobuf\Internal\RepeatedField $registrations - * A list of `Registration`s. - * @type string $next_page_token - * When present, there are more results to retrieve. Set `page_token` to this - * value on a subsequent call to get the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * A list of `Registration`s. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.Registration registrations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRegistrations() - { - return $this->registrations; - } - - /** - * A list of `Registration`s. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.Registration registrations = 1; - * @param array<\Google\Cloud\Domains\V1alpha2\Registration>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRegistrations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1alpha2\Registration::class); - $this->registrations = $arr; - - return $this; - } - - /** - * When present, there are more results to retrieve. Set `page_token` to this - * value on a subsequent call 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; - } - - /** - * When present, there are more results to retrieve. Set `page_token` to this - * value on a subsequent call 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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings.php deleted file mode 100644 index e66af21800b7..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.domains.v1alpha2.ManagementSettings - */ -class ManagementSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The renewal method for this `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings.RenewalMethod renewal_method = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $renewal_method = 0; - /** - * Controls whether the domain can be transferred to another registrar. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferLockState transfer_lock_state = 4; - */ - protected $transfer_lock_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $renewal_method - * Output only. The renewal method for this `Registration`. - * @type int $transfer_lock_state - * Controls whether the domain can be transferred to another registrar. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The renewal method for this `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings.RenewalMethod renewal_method = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRenewalMethod() - { - return $this->renewal_method; - } - - /** - * Output only. The renewal method for this `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings.RenewalMethod renewal_method = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRenewalMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\ManagementSettings\RenewalMethod::class); - $this->renewal_method = $var; - - return $this; - } - - /** - * Controls whether the domain can be transferred to another registrar. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferLockState transfer_lock_state = 4; - * @return int - */ - public function getTransferLockState() - { - return $this->transfer_lock_state; - } - - /** - * Controls whether the domain can be transferred to another registrar. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferLockState transfer_lock_state = 4; - * @param int $var - * @return $this - */ - public function setTransferLockState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\TransferLockState::class); - $this->transfer_lock_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings/RenewalMethod.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings/RenewalMethod.php deleted file mode 100644 index d6a71724a36b..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings/RenewalMethod.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.domains.v1alpha2.ManagementSettings.RenewalMethod - */ -class RenewalMethod -{ - /** - * The renewal method is undefined. - * - * Generated from protobuf enum RENEWAL_METHOD_UNSPECIFIED = 0; - */ - const RENEWAL_METHOD_UNSPECIFIED = 0; - /** - * The domain is automatically renewed each year . - * To disable automatic renewals, delete the resource by calling - * `DeleteRegistration` or export it by calling `ExportRegistration`. - * - * Generated from protobuf enum AUTOMATIC_RENEWAL = 1; - */ - const AUTOMATIC_RENEWAL = 1; - /** - * The domain must be explicitly renewed each year before its - * `expire_time`. This option is only available when the `Registration` - * is in state `EXPORTED`. - * To manage the domain's current billing and - * renewal settings, go to [Google Domains](https://domains.google/). - * - * Generated from protobuf enum MANUAL_RENEWAL = 2; - */ - const MANUAL_RENEWAL = 2; - - private static $valueToName = [ - self::RENEWAL_METHOD_UNSPECIFIED => 'RENEWAL_METHOD_UNSPECIFIED', - self::AUTOMATIC_RENEWAL => 'AUTOMATIC_RENEWAL', - self::MANUAL_RENEWAL => 'MANUAL_RENEWAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RenewalMethod::class, \Google\Cloud\Domains\V1alpha2\ManagementSettings_RenewalMethod::class); - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings_RenewalMethod.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings_RenewalMethod.php deleted file mode 100644 index 267801c6deec..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/ManagementSettings_RenewalMethod.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.domains.v1alpha2.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_detail = 5; - */ - protected $status_detail = ''; - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 6; - */ - 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 - * Server-defined resource path for the target of the operation. - * @type string $verb - * Name of the verb executed by the operation. - * @type string $status_detail - * Human-readable status of the operation, if any. - * @type string $api_version - * API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::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_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; - } - - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 6; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 6; - * @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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterDomainRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterDomainRequest.php deleted file mode 100644 index 6d9d6ec676fc..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterDomainRequest.php +++ /dev/null @@ -1,289 +0,0 @@ -google.cloud.domains.v1alpha2.RegisterDomainRequest - */ -class RegisterDomainRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the `Registration`. 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. The complete `Registration` resource to be created. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $registration = null; - /** - * The list of domain notices that you acknowledge. Call - * `RetrieveRegisterParameters` to see the notices that need acknowledgement. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DomainNotice domain_notices = 3; - */ - private $domain_notices; - /** - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 4; - */ - private $contact_notices; - /** - * Required. Yearly price to register or renew the domain. - * The value that should be put here can be obtained from - * RetrieveRegisterParameters or SearchDomains calls. - * - * Generated from protobuf field .google.type.Money yearly_price = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $yearly_price = null; - /** - * When true, only validation is performed, without actually registering - * the domain. Follows: - * https://cloud.google.com/apis/design/design_patterns#request_validation - * - * Generated from protobuf field bool validate_only = 6; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the `Registration`. Must be in the - * format `projects/*/locations/*`. - * @type \Google\Cloud\Domains\V1alpha2\Registration $registration - * Required. The complete `Registration` resource to be created. - * @type array|\Google\Protobuf\Internal\RepeatedField $domain_notices - * The list of domain notices that you acknowledge. Call - * `RetrieveRegisterParameters` to see the notices that need acknowledgement. - * @type array|\Google\Protobuf\Internal\RepeatedField $contact_notices - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * @type \Google\Type\Money $yearly_price - * Required. Yearly price to register or renew the domain. - * The value that should be put here can be obtained from - * RetrieveRegisterParameters or SearchDomains calls. - * @type bool $validate_only - * When true, only validation is performed, without actually registering - * the domain. Follows: - * https://cloud.google.com/apis/design/design_patterns#request_validation - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the `Registration`. 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 `Registration`. 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. The complete `Registration` resource to be created. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Domains\V1alpha2\Registration|null - */ - public function getRegistration() - { - return $this->registration; - } - - public function hasRegistration() - { - return isset($this->registration); - } - - public function clearRegistration() - { - unset($this->registration); - } - - /** - * Required. The complete `Registration` resource to be created. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Domains\V1alpha2\Registration $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\Registration::class); - $this->registration = $var; - - return $this; - } - - /** - * The list of domain notices that you acknowledge. Call - * `RetrieveRegisterParameters` to see the notices that need acknowledgement. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DomainNotice domain_notices = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDomainNotices() - { - return $this->domain_notices; - } - - /** - * The list of domain notices that you acknowledge. Call - * `RetrieveRegisterParameters` to see the notices that need acknowledgement. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DomainNotice domain_notices = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDomainNotices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\DomainNotice::class); - $this->domain_notices = $arr; - - return $this; - } - - /** - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContactNotices() - { - return $this->contact_notices; - } - - /** - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContactNotices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\ContactNotice::class); - $this->contact_notices = $arr; - - return $this; - } - - /** - * Required. Yearly price to register or renew the domain. - * The value that should be put here can be obtained from - * RetrieveRegisterParameters or SearchDomains calls. - * - * Generated from protobuf field .google.type.Money yearly_price = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\Money|null - */ - public function getYearlyPrice() - { - return $this->yearly_price; - } - - public function hasYearlyPrice() - { - return isset($this->yearly_price); - } - - public function clearYearlyPrice() - { - unset($this->yearly_price); - } - - /** - * Required. Yearly price to register or renew the domain. - * The value that should be put here can be obtained from - * RetrieveRegisterParameters or SearchDomains calls. - * - * Generated from protobuf field .google.type.Money yearly_price = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\Money $var - * @return $this - */ - public function setYearlyPrice($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->yearly_price = $var; - - return $this; - } - - /** - * When true, only validation is performed, without actually registering - * the domain. Follows: - * https://cloud.google.com/apis/design/design_patterns#request_validation - * - * Generated from protobuf field bool validate_only = 6; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * When true, only validation is performed, without actually registering - * the domain. Follows: - * https://cloud.google.com/apis/design/design_patterns#request_validation - * - * Generated from protobuf field bool validate_only = 6; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters.php deleted file mode 100644 index 4914dbebd423..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.domains.v1alpha2.RegisterParameters - */ -class RegisterParameters extends \Google\Protobuf\Internal\Message -{ - /** - * The domain name. Unicode domain names are expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1; - */ - protected $domain_name = ''; - /** - * Indicates whether the domain is available for registration. This value is - * accurate when obtained by calling `RetrieveRegisterParameters`, but is - * approximate when obtained by calling `SearchDomains`. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.RegisterParameters.Availability availability = 2; - */ - protected $availability = 0; - /** - * Contact privacy options that the domain supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 3; - */ - private $supported_privacy; - /** - * Notices about special properties of the domain. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DomainNotice domain_notices = 4; - */ - private $domain_notices; - /** - * Price to register or renew the domain for one year. - * - * Generated from protobuf field .google.type.Money yearly_price = 5; - */ - protected $yearly_price = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $domain_name - * The domain name. Unicode domain names are expressed in Punycode format. - * @type int $availability - * Indicates whether the domain is available for registration. This value is - * accurate when obtained by calling `RetrieveRegisterParameters`, but is - * approximate when obtained by calling `SearchDomains`. - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_privacy - * Contact privacy options that the domain supports. - * @type array|\Google\Protobuf\Internal\RepeatedField $domain_notices - * Notices about special properties of the domain. - * @type \Google\Type\Money $yearly_price - * Price to register or renew the domain for one year. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * The domain name. Unicode domain names are expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1; - * @return string - */ - public function getDomainName() - { - return $this->domain_name; - } - - /** - * The domain name. Unicode domain names are expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1; - * @param string $var - * @return $this - */ - public function setDomainName($var) - { - GPBUtil::checkString($var, True); - $this->domain_name = $var; - - return $this; - } - - /** - * Indicates whether the domain is available for registration. This value is - * accurate when obtained by calling `RetrieveRegisterParameters`, but is - * approximate when obtained by calling `SearchDomains`. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.RegisterParameters.Availability availability = 2; - * @return int - */ - public function getAvailability() - { - return $this->availability; - } - - /** - * Indicates whether the domain is available for registration. This value is - * accurate when obtained by calling `RetrieveRegisterParameters`, but is - * approximate when obtained by calling `SearchDomains`. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.RegisterParameters.Availability availability = 2; - * @param int $var - * @return $this - */ - public function setAvailability($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\RegisterParameters\Availability::class); - $this->availability = $var; - - return $this; - } - - /** - * Contact privacy options that the domain supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedPrivacy() - { - return $this->supported_privacy; - } - - /** - * Contact privacy options that the domain supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedPrivacy($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\ContactPrivacy::class); - $this->supported_privacy = $arr; - - return $this; - } - - /** - * Notices about special properties of the domain. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DomainNotice domain_notices = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDomainNotices() - { - return $this->domain_notices; - } - - /** - * Notices about special properties of the domain. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.DomainNotice domain_notices = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDomainNotices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\DomainNotice::class); - $this->domain_notices = $arr; - - return $this; - } - - /** - * Price to register or renew the domain for one year. - * - * Generated from protobuf field .google.type.Money yearly_price = 5; - * @return \Google\Type\Money|null - */ - public function getYearlyPrice() - { - return $this->yearly_price; - } - - public function hasYearlyPrice() - { - return isset($this->yearly_price); - } - - public function clearYearlyPrice() - { - unset($this->yearly_price); - } - - /** - * Price to register or renew the domain for one year. - * - * Generated from protobuf field .google.type.Money yearly_price = 5; - * @param \Google\Type\Money $var - * @return $this - */ - public function setYearlyPrice($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->yearly_price = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters/Availability.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters/Availability.php deleted file mode 100644 index 75cebb5a5131..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters/Availability.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.domains.v1alpha2.RegisterParameters.Availability - */ -class Availability -{ - /** - * The availability is unspecified. - * - * Generated from protobuf enum AVAILABILITY_UNSPECIFIED = 0; - */ - const AVAILABILITY_UNSPECIFIED = 0; - /** - * The domain is available for registration. - * - * Generated from protobuf enum AVAILABLE = 1; - */ - const AVAILABLE = 1; - /** - * The domain is not available for registration. Generally this means it is - * already registered to another party. - * - * Generated from protobuf enum UNAVAILABLE = 2; - */ - const UNAVAILABLE = 2; - /** - * The domain is not currently supported by Cloud Domains, but may - * be available elsewhere. - * - * Generated from protobuf enum UNSUPPORTED = 3; - */ - const UNSUPPORTED = 3; - /** - * Cloud Domains is unable to determine domain availability, generally - * due to system maintenance at the domain name registry. - * - * Generated from protobuf enum UNKNOWN = 4; - */ - const UNKNOWN = 4; - - private static $valueToName = [ - self::AVAILABILITY_UNSPECIFIED => 'AVAILABILITY_UNSPECIFIED', - self::AVAILABLE => 'AVAILABLE', - self::UNAVAILABLE => 'UNAVAILABLE', - self::UNSUPPORTED => 'UNSUPPORTED', - self::UNKNOWN => 'UNKNOWN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Availability::class, \Google\Cloud\Domains\V1alpha2\RegisterParameters_Availability::class); - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters_Availability.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters_Availability.php deleted file mode 100644 index ff936a73c696..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RegisterParameters_Availability.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.domains.v1alpha2.Registration - */ -class Registration extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of the `Registration` resource, in the format - * `projects/*/locations/*/registrations/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $domain_name = ''; - /** - * Output only. The creation timestamp of the `Registration` resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The expiration timestamp of the `Registration`. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. The state of the `Registration` - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The set of issues with the `Registration` that require attention. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.Registration.Issue issues = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $issues; - /** - * Set of labels associated with the `Registration`. - * - * Generated from protobuf field map labels = 9; - */ - private $labels; - /** - * Settings for management of the `Registration`, including renewal, billing, - * and transfer. You cannot update these with the `UpdateRegistration` - * method. To update these settings, use the `ConfigureManagementSettings` - * method. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings management_settings = 10; - */ - protected $management_settings = null; - /** - * Settings controlling the DNS configuration of the `Registration`. You - * cannot update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureDnsSettings` method. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings dns_settings = 11; - */ - protected $dns_settings = null; - /** - * Required. Settings for contact information linked to the `Registration`. You cannot - * update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureContactSettings` method. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings contact_settings = 12 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $contact_settings = null; - /** - * Output only. Pending contact settings for the `Registration`. Updates to the - * `contact_settings` field that change its `registrant_contact` or `privacy` - * fields require email confirmation by the `registrant_contact` - * before taking effect. This field is set only if there are pending updates - * to the `contact_settings` that have not been confirmed. To confirm the - * changes, the `registrant_contact` must follow the instructions in the - * email they receive. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings pending_contact_settings = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $pending_contact_settings = null; - /** - * Output only. Set of options for the `contact_settings.privacy` field that this - * `Registration` supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $supported_privacy; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Name of the `Registration` resource, in the format - * `projects/*/locations/*/registrations/`. - * @type string $domain_name - * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of the `Registration` resource. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. The expiration timestamp of the `Registration`. - * @type int $state - * Output only. The state of the `Registration` - * @type array|\Google\Protobuf\Internal\RepeatedField $issues - * Output only. The set of issues with the `Registration` that require attention. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Set of labels associated with the `Registration`. - * @type \Google\Cloud\Domains\V1alpha2\ManagementSettings $management_settings - * Settings for management of the `Registration`, including renewal, billing, - * and transfer. You cannot update these with the `UpdateRegistration` - * method. To update these settings, use the `ConfigureManagementSettings` - * method. - * @type \Google\Cloud\Domains\V1alpha2\DnsSettings $dns_settings - * Settings controlling the DNS configuration of the `Registration`. You - * cannot update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureDnsSettings` method. - * @type \Google\Cloud\Domains\V1alpha2\ContactSettings $contact_settings - * Required. Settings for contact information linked to the `Registration`. You cannot - * update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureContactSettings` method. - * @type \Google\Cloud\Domains\V1alpha2\ContactSettings $pending_contact_settings - * Output only. Pending contact settings for the `Registration`. Updates to the - * `contact_settings` field that change its `registrant_contact` or `privacy` - * fields require email confirmation by the `registrant_contact` - * before taking effect. This field is set only if there are pending updates - * to the `contact_settings` that have not been confirmed. To confirm the - * changes, the `registrant_contact` must follow the instructions in the - * email they receive. - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_privacy - * Output only. Set of options for the `contact_settings.privacy` field that this - * `Registration` supports. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of the `Registration` resource, in the format - * `projects/*/locations/*/registrations/`. - * - * 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 `Registration` resource, in the format - * `projects/*/locations/*/registrations/`. - * - * 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; - } - - /** - * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getDomainName() - { - return $this->domain_name; - } - - /** - * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setDomainName($var) - { - GPBUtil::checkString($var, True); - $this->domain_name = $var; - - return $this; - } - - /** - * Output only. The creation timestamp of the `Registration` resource. - * - * 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 creation timestamp of the `Registration` resource. - * - * 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 expiration timestamp of the `Registration`. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.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. The expiration timestamp of the `Registration`. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.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; - } - - /** - * Output only. The state of the `Registration` - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the `Registration` - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\Registration\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The set of issues with the `Registration` that require attention. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.Registration.Issue issues = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIssues() - { - return $this->issues; - } - - /** - * Output only. The set of issues with the `Registration` that require attention. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.Registration.Issue issues = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIssues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\Registration\Issue::class); - $this->issues = $arr; - - return $this; - } - - /** - * Set of labels associated with the `Registration`. - * - * Generated from protobuf field map labels = 9; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Set of labels associated with the `Registration`. - * - * 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; - } - - /** - * Settings for management of the `Registration`, including renewal, billing, - * and transfer. You cannot update these with the `UpdateRegistration` - * method. To update these settings, use the `ConfigureManagementSettings` - * method. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings management_settings = 10; - * @return \Google\Cloud\Domains\V1alpha2\ManagementSettings|null - */ - public function getManagementSettings() - { - return $this->management_settings; - } - - public function hasManagementSettings() - { - return isset($this->management_settings); - } - - public function clearManagementSettings() - { - unset($this->management_settings); - } - - /** - * Settings for management of the `Registration`, including renewal, billing, - * and transfer. You cannot update these with the `UpdateRegistration` - * method. To update these settings, use the `ConfigureManagementSettings` - * method. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ManagementSettings management_settings = 10; - * @param \Google\Cloud\Domains\V1alpha2\ManagementSettings $var - * @return $this - */ - public function setManagementSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ManagementSettings::class); - $this->management_settings = $var; - - return $this; - } - - /** - * Settings controlling the DNS configuration of the `Registration`. You - * cannot update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureDnsSettings` method. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings dns_settings = 11; - * @return \Google\Cloud\Domains\V1alpha2\DnsSettings|null - */ - public function getDnsSettings() - { - return $this->dns_settings; - } - - public function hasDnsSettings() - { - return isset($this->dns_settings); - } - - public function clearDnsSettings() - { - unset($this->dns_settings); - } - - /** - * Settings controlling the DNS configuration of the `Registration`. You - * cannot update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureDnsSettings` method. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.DnsSettings dns_settings = 11; - * @param \Google\Cloud\Domains\V1alpha2\DnsSettings $var - * @return $this - */ - public function setDnsSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\DnsSettings::class); - $this->dns_settings = $var; - - return $this; - } - - /** - * Required. Settings for contact information linked to the `Registration`. You cannot - * update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureContactSettings` method. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings contact_settings = 12 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Domains\V1alpha2\ContactSettings|null - */ - public function getContactSettings() - { - return $this->contact_settings; - } - - public function hasContactSettings() - { - return isset($this->contact_settings); - } - - public function clearContactSettings() - { - unset($this->contact_settings); - } - - /** - * Required. Settings for contact information linked to the `Registration`. You cannot - * update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureContactSettings` method. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings contact_settings = 12 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Domains\V1alpha2\ContactSettings $var - * @return $this - */ - public function setContactSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ContactSettings::class); - $this->contact_settings = $var; - - return $this; - } - - /** - * Output only. Pending contact settings for the `Registration`. Updates to the - * `contact_settings` field that change its `registrant_contact` or `privacy` - * fields require email confirmation by the `registrant_contact` - * before taking effect. This field is set only if there are pending updates - * to the `contact_settings` that have not been confirmed. To confirm the - * changes, the `registrant_contact` must follow the instructions in the - * email they receive. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings pending_contact_settings = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Domains\V1alpha2\ContactSettings|null - */ - public function getPendingContactSettings() - { - return $this->pending_contact_settings; - } - - public function hasPendingContactSettings() - { - return isset($this->pending_contact_settings); - } - - public function clearPendingContactSettings() - { - unset($this->pending_contact_settings); - } - - /** - * Output only. Pending contact settings for the `Registration`. Updates to the - * `contact_settings` field that change its `registrant_contact` or `privacy` - * fields require email confirmation by the `registrant_contact` - * before taking effect. This field is set only if there are pending updates - * to the `contact_settings` that have not been confirmed. To confirm the - * changes, the `registrant_contact` must follow the instructions in the - * email they receive. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.ContactSettings pending_contact_settings = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Domains\V1alpha2\ContactSettings $var - * @return $this - */ - public function setPendingContactSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\ContactSettings::class); - $this->pending_contact_settings = $var; - - return $this; - } - - /** - * Output only. Set of options for the `contact_settings.privacy` field that this - * `Registration` supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedPrivacy() - { - return $this->supported_privacy; - } - - /** - * Output only. Set of options for the `contact_settings.privacy` field that this - * `Registration` supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedPrivacy($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\ContactPrivacy::class); - $this->supported_privacy = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/Issue.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/Issue.php deleted file mode 100644 index 98ac3f378de6..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/Issue.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.domains.v1alpha2.Registration.Issue - */ -class Issue -{ - /** - * The issue is undefined. - * - * Generated from protobuf enum ISSUE_UNSPECIFIED = 0; - */ - const ISSUE_UNSPECIFIED = 0; - /** - * Contact the Cloud Support team to resolve a problem with this domain. - * - * Generated from protobuf enum CONTACT_SUPPORT = 1; - */ - const CONTACT_SUPPORT = 1; - /** - * [ICANN](https://icann.org/) requires verification of the email address - * in the `Registration`'s `contact_settings.registrant_contact` field. To - * verify the email address, follow the - * instructions in the email the `registrant_contact` receives following - * registration. If you do not complete email verification within - * 15 days of registration, the domain is suspended. To resend the - * verification email, call ConfigureContactSettings and provide the current - * `registrant_contact.email`. - * - * Generated from protobuf enum UNVERIFIED_EMAIL = 2; - */ - const UNVERIFIED_EMAIL = 2; - - private static $valueToName = [ - self::ISSUE_UNSPECIFIED => 'ISSUE_UNSPECIFIED', - self::CONTACT_SUPPORT => 'CONTACT_SUPPORT', - self::UNVERIFIED_EMAIL => 'UNVERIFIED_EMAIL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Issue::class, \Google\Cloud\Domains\V1alpha2\Registration_Issue::class); - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/State.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/State.php deleted file mode 100644 index 93589982f064..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration/State.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.domains.v1alpha2.Registration.State - */ -class State -{ - /** - * The state is undefined. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The domain is being registered. - * - * Generated from protobuf enum REGISTRATION_PENDING = 1; - */ - const REGISTRATION_PENDING = 1; - /** - * The domain registration failed. You can delete resources in this state - * to allow registration to be retried. - * - * Generated from protobuf enum REGISTRATION_FAILED = 2; - */ - const REGISTRATION_FAILED = 2; - /** - * The domain is being transferred from another registrar to Cloud Domains. - * - * Generated from protobuf enum TRANSFER_PENDING = 3; - */ - const TRANSFER_PENDING = 3; - /** - * The attempt to transfer the domain from another registrar to - * Cloud Domains failed. You can delete resources in this state and retry - * the transfer. - * - * Generated from protobuf enum TRANSFER_FAILED = 4; - */ - const TRANSFER_FAILED = 4; - /** - * The domain is registered and operational. The domain renews automatically - * as long as it remains in this state. - * - * Generated from protobuf enum ACTIVE = 6; - */ - const ACTIVE = 6; - /** - * The domain is suspended and inoperative. For more details, see the - * `issues` field. - * - * Generated from protobuf enum SUSPENDED = 7; - */ - const SUSPENDED = 7; - /** - * The domain is no longer managed with Cloud Domains. It may have been - * transferred to another registrar or exported for management in - * [Google Domains](https://domains.google/). You can no longer update it - * with this API, and information shown about it may be stale. Domains in - * this state are not automatically renewed by Cloud Domains. - * - * Generated from protobuf enum EXPORTED = 8; - */ - const EXPORTED = 8; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::REGISTRATION_PENDING => 'REGISTRATION_PENDING', - self::REGISTRATION_FAILED => 'REGISTRATION_FAILED', - self::TRANSFER_PENDING => 'TRANSFER_PENDING', - self::TRANSFER_FAILED => 'TRANSFER_FAILED', - self::ACTIVE => 'ACTIVE', - self::SUSPENDED => 'SUSPENDED', - self::EXPORTED => 'EXPORTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Domains\V1alpha2\Registration_State::class); - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration_Issue.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration_Issue.php deleted file mode 100644 index 7d1b709a2ee1..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/Registration_Issue.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.domains.v1alpha2.ResetAuthorizationCodeRequest - */ -class ResetAuthorizationCodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` whose authorization code is being reset, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $registration = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $registration - * Required. The name of the `Registration` whose authorization code is being reset, - * in the format `projects/*/locations/*/registrations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` whose authorization code is being reset, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getRegistration() - { - return $this->registration; - } - - /** - * Required. The name of the `Registration` whose authorization code is being reset, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkString($var, True); - $this->registration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveAuthorizationCodeRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveAuthorizationCodeRequest.php deleted file mode 100644 index 80758d4364a6..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveAuthorizationCodeRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.domains.v1alpha2.RetrieveAuthorizationCodeRequest - */ -class RetrieveAuthorizationCodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` whose authorization code is being retrieved, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $registration = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $registration - * Required. The name of the `Registration` whose authorization code is being retrieved, - * in the format `projects/*/locations/*/registrations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` whose authorization code is being retrieved, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getRegistration() - { - return $this->registration; - } - - /** - * Required. The name of the `Registration` whose authorization code is being retrieved, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkString($var, True); - $this->registration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersRequest.php deleted file mode 100644 index d41b31cbf124..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.domains.v1alpha2.RetrieveRegisterParametersRequest - */ -class RetrieveRegisterParametersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $domain_name = ''; - /** - * Required. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $domain_name - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * @type string $location - * Required. The location. Must be in the format `projects/*/locations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDomainName() - { - return $this->domain_name; - } - - /** - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1 [(.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. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Required. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersResponse.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersResponse.php deleted file mode 100644 index d7e6d18a0c46..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveRegisterParametersResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.domains.v1alpha2.RetrieveRegisterParametersResponse - */ -class RetrieveRegisterParametersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Parameters to use when calling the `RegisterDomain` method. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.RegisterParameters register_parameters = 1; - */ - protected $register_parameters = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Domains\V1alpha2\RegisterParameters $register_parameters - * Parameters to use when calling the `RegisterDomain` method. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Parameters to use when calling the `RegisterDomain` method. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.RegisterParameters register_parameters = 1; - * @return \Google\Cloud\Domains\V1alpha2\RegisterParameters|null - */ - public function getRegisterParameters() - { - return $this->register_parameters; - } - - public function hasRegisterParameters() - { - return isset($this->register_parameters); - } - - public function clearRegisterParameters() - { - unset($this->register_parameters); - } - - /** - * Parameters to use when calling the `RegisterDomain` method. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.RegisterParameters register_parameters = 1; - * @param \Google\Cloud\Domains\V1alpha2\RegisterParameters $var - * @return $this - */ - public function setRegisterParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\RegisterParameters::class); - $this->register_parameters = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersRequest.php deleted file mode 100644 index 7be00fd2c465..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.domains.v1alpha2.RetrieveTransferParametersRequest - */ -class RetrieveTransferParametersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $domain_name = ''; - /** - * Required. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $domain_name - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * @type string $location - * Required. The location. Must be in the format `projects/*/locations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDomainName() - { - return $this->domain_name; - } - - /** - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1 [(.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. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Required. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersResponse.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersResponse.php deleted file mode 100644 index daa94d3fe315..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/RetrieveTransferParametersResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.domains.v1alpha2.RetrieveTransferParametersResponse - */ -class RetrieveTransferParametersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Parameters to use when calling the `TransferDomain` method. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferParameters transfer_parameters = 1; - */ - protected $transfer_parameters = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Domains\V1alpha2\TransferParameters $transfer_parameters - * Parameters to use when calling the `TransferDomain` method. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Parameters to use when calling the `TransferDomain` method. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferParameters transfer_parameters = 1; - * @return \Google\Cloud\Domains\V1alpha2\TransferParameters|null - */ - public function getTransferParameters() - { - return $this->transfer_parameters; - } - - public function hasTransferParameters() - { - return isset($this->transfer_parameters); - } - - public function clearTransferParameters() - { - unset($this->transfer_parameters); - } - - /** - * Parameters to use when calling the `TransferDomain` method. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferParameters transfer_parameters = 1; - * @param \Google\Cloud\Domains\V1alpha2\TransferParameters $var - * @return $this - */ - public function setTransferParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\TransferParameters::class); - $this->transfer_parameters = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsRequest.php deleted file mode 100644 index 9ea67c0cc8e1..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.domains.v1alpha2.SearchDomainsRequest - */ -class SearchDomainsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. String used to search for available domain names. - * - * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query = ''; - /** - * Required. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query - * Required. String used to search for available domain names. - * @type string $location - * Required. The location. Must be in the format `projects/*/locations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. String used to search for available domain names. - * - * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Required. String used to search for available domain names. - * - * 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; - } - - /** - * Required. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Required. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsResponse.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsResponse.php deleted file mode 100644 index 0e15e16ab2c8..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/SearchDomainsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.domains.v1alpha2.SearchDomainsResponse - */ -class SearchDomainsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Results of the domain name search. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.RegisterParameters register_parameters = 1; - */ - private $register_parameters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Domains\V1alpha2\RegisterParameters>|\Google\Protobuf\Internal\RepeatedField $register_parameters - * Results of the domain name search. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Results of the domain name search. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.RegisterParameters register_parameters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRegisterParameters() - { - return $this->register_parameters; - } - - /** - * Results of the domain name search. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.RegisterParameters register_parameters = 1; - * @param array<\Google\Cloud\Domains\V1alpha2\RegisterParameters>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRegisterParameters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1alpha2\RegisterParameters::class); - $this->register_parameters = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferDomainRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferDomainRequest.php deleted file mode 100644 index eee617feba40..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferDomainRequest.php +++ /dev/null @@ -1,311 +0,0 @@ -google.cloud.domains.v1alpha2.TransferDomainRequest - */ -class TransferDomainRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the `Registration`. 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. The complete `Registration` resource to be created. - * You can leave `registration.dns_settings` unset to import the - * domain's current DNS configuration from its current registrar. Use this - * option only if you are sure that the domain's current DNS service - * does not cease upon transfer, as is often the case for DNS services - * provided for free by the registrar. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $registration = null; - /** - * The list of contact notices that you acknowledge. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 3; - */ - private $contact_notices; - /** - * Required. Acknowledgement of the price to transfer or renew the domain for one year. - * Call `RetrieveTransferParameters` to obtain the price, which you must - * acknowledge. - * - * Generated from protobuf field .google.type.Money yearly_price = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $yearly_price = null; - /** - * The domain's transfer authorization code. You can obtain this from the - * domain's current registrar. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.AuthorizationCode authorization_code = 5; - */ - protected $authorization_code = null; - /** - * Validate the request without actually transferring the domain. - * - * Generated from protobuf field bool validate_only = 6; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the `Registration`. Must be in the - * format `projects/*/locations/*`. - * @type \Google\Cloud\Domains\V1alpha2\Registration $registration - * Required. The complete `Registration` resource to be created. - * You can leave `registration.dns_settings` unset to import the - * domain's current DNS configuration from its current registrar. Use this - * option only if you are sure that the domain's current DNS service - * does not cease upon transfer, as is often the case for DNS services - * provided for free by the registrar. - * @type array|\Google\Protobuf\Internal\RepeatedField $contact_notices - * The list of contact notices that you acknowledge. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * @type \Google\Type\Money $yearly_price - * Required. Acknowledgement of the price to transfer or renew the domain for one year. - * Call `RetrieveTransferParameters` to obtain the price, which you must - * acknowledge. - * @type \Google\Cloud\Domains\V1alpha2\AuthorizationCode $authorization_code - * The domain's transfer authorization code. You can obtain this from the - * domain's current registrar. - * @type bool $validate_only - * Validate the request without actually transferring the domain. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the `Registration`. 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 `Registration`. 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. The complete `Registration` resource to be created. - * You can leave `registration.dns_settings` unset to import the - * domain's current DNS configuration from its current registrar. Use this - * option only if you are sure that the domain's current DNS service - * does not cease upon transfer, as is often the case for DNS services - * provided for free by the registrar. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Domains\V1alpha2\Registration|null - */ - public function getRegistration() - { - return $this->registration; - } - - public function hasRegistration() - { - return isset($this->registration); - } - - public function clearRegistration() - { - unset($this->registration); - } - - /** - * Required. The complete `Registration` resource to be created. - * You can leave `registration.dns_settings` unset to import the - * domain's current DNS configuration from its current registrar. Use this - * option only if you are sure that the domain's current DNS service - * does not cease upon transfer, as is often the case for DNS services - * provided for free by the registrar. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Domains\V1alpha2\Registration $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\Registration::class); - $this->registration = $var; - - return $this; - } - - /** - * The list of contact notices that you acknowledge. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContactNotices() - { - return $this->contact_notices; - } - - /** - * The list of contact notices that you acknowledge. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactNotice contact_notices = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContactNotices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\ContactNotice::class); - $this->contact_notices = $arr; - - return $this; - } - - /** - * Required. Acknowledgement of the price to transfer or renew the domain for one year. - * Call `RetrieveTransferParameters` to obtain the price, which you must - * acknowledge. - * - * Generated from protobuf field .google.type.Money yearly_price = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\Money|null - */ - public function getYearlyPrice() - { - return $this->yearly_price; - } - - public function hasYearlyPrice() - { - return isset($this->yearly_price); - } - - public function clearYearlyPrice() - { - unset($this->yearly_price); - } - - /** - * Required. Acknowledgement of the price to transfer or renew the domain for one year. - * Call `RetrieveTransferParameters` to obtain the price, which you must - * acknowledge. - * - * Generated from protobuf field .google.type.Money yearly_price = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\Money $var - * @return $this - */ - public function setYearlyPrice($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->yearly_price = $var; - - return $this; - } - - /** - * The domain's transfer authorization code. You can obtain this from the - * domain's current registrar. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.AuthorizationCode authorization_code = 5; - * @return \Google\Cloud\Domains\V1alpha2\AuthorizationCode|null - */ - public function getAuthorizationCode() - { - return $this->authorization_code; - } - - public function hasAuthorizationCode() - { - return isset($this->authorization_code); - } - - public function clearAuthorizationCode() - { - unset($this->authorization_code); - } - - /** - * The domain's transfer authorization code. You can obtain this from the - * domain's current registrar. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.AuthorizationCode authorization_code = 5; - * @param \Google\Cloud\Domains\V1alpha2\AuthorizationCode $var - * @return $this - */ - public function setAuthorizationCode($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\AuthorizationCode::class); - $this->authorization_code = $var; - - return $this; - } - - /** - * Validate the request without actually transferring the domain. - * - * Generated from protobuf field bool validate_only = 6; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Validate the request without actually transferring the domain. - * - * Generated from protobuf field bool validate_only = 6; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferLockState.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferLockState.php deleted file mode 100644 index 1dcdc4f16a0d..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferLockState.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.domains.v1alpha2.TransferLockState - */ -class TransferLockState -{ - /** - * The state is unspecified. - * - * Generated from protobuf enum TRANSFER_LOCK_STATE_UNSPECIFIED = 0; - */ - const TRANSFER_LOCK_STATE_UNSPECIFIED = 0; - /** - * The domain is unlocked and can be transferred to another registrar. - * - * Generated from protobuf enum UNLOCKED = 1; - */ - const UNLOCKED = 1; - /** - * The domain is locked and cannot be transferred to another registrar. - * - * Generated from protobuf enum LOCKED = 2; - */ - const LOCKED = 2; - - private static $valueToName = [ - self::TRANSFER_LOCK_STATE_UNSPECIFIED => 'TRANSFER_LOCK_STATE_UNSPECIFIED', - self::UNLOCKED => 'UNLOCKED', - self::LOCKED => 'LOCKED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferParameters.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferParameters.php deleted file mode 100644 index 8cb3b9431ef2..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/TransferParameters.php +++ /dev/null @@ -1,255 +0,0 @@ -google.cloud.domains.v1alpha2.TransferParameters - */ -class TransferParameters extends \Google\Protobuf\Internal\Message -{ - /** - * The domain name. Unicode domain names are expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1; - */ - protected $domain_name = ''; - /** - * The registrar that currently manages the domain. - * - * Generated from protobuf field string current_registrar = 2; - */ - protected $current_registrar = ''; - /** - * The name servers that currently store the configuration of the domain. - * - * Generated from protobuf field repeated string name_servers = 3; - */ - private $name_servers; - /** - * Indicates whether the domain is protected by a transfer lock. For a - * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, - * go to its current registrar. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferLockState transfer_lock_state = 4; - */ - protected $transfer_lock_state = 0; - /** - * Contact privacy options that the domain supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 5; - */ - private $supported_privacy; - /** - * Price to transfer or renew the domain for one year. - * - * Generated from protobuf field .google.type.Money yearly_price = 6; - */ - protected $yearly_price = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $domain_name - * The domain name. Unicode domain names are expressed in Punycode format. - * @type string $current_registrar - * The registrar that currently manages the domain. - * @type array|\Google\Protobuf\Internal\RepeatedField $name_servers - * The name servers that currently store the configuration of the domain. - * @type int $transfer_lock_state - * Indicates whether the domain is protected by a transfer lock. For a - * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, - * go to its current registrar. - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_privacy - * Contact privacy options that the domain supports. - * @type \Google\Type\Money $yearly_price - * Price to transfer or renew the domain for one year. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * The domain name. Unicode domain names are expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1; - * @return string - */ - public function getDomainName() - { - return $this->domain_name; - } - - /** - * The domain name. Unicode domain names are expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1; - * @param string $var - * @return $this - */ - public function setDomainName($var) - { - GPBUtil::checkString($var, True); - $this->domain_name = $var; - - return $this; - } - - /** - * The registrar that currently manages the domain. - * - * Generated from protobuf field string current_registrar = 2; - * @return string - */ - public function getCurrentRegistrar() - { - return $this->current_registrar; - } - - /** - * The registrar that currently manages the domain. - * - * Generated from protobuf field string current_registrar = 2; - * @param string $var - * @return $this - */ - public function setCurrentRegistrar($var) - { - GPBUtil::checkString($var, True); - $this->current_registrar = $var; - - return $this; - } - - /** - * The name servers that currently store the configuration of the domain. - * - * Generated from protobuf field repeated string name_servers = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNameServers() - { - return $this->name_servers; - } - - /** - * The name servers that currently store the configuration of the domain. - * - * Generated from protobuf field repeated string name_servers = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNameServers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->name_servers = $arr; - - return $this; - } - - /** - * Indicates whether the domain is protected by a transfer lock. For a - * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, - * go to its current registrar. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferLockState transfer_lock_state = 4; - * @return int - */ - public function getTransferLockState() - { - return $this->transfer_lock_state; - } - - /** - * Indicates whether the domain is protected by a transfer lock. For a - * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, - * go to its current registrar. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.TransferLockState transfer_lock_state = 4; - * @param int $var - * @return $this - */ - public function setTransferLockState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1alpha2\TransferLockState::class); - $this->transfer_lock_state = $var; - - return $this; - } - - /** - * Contact privacy options that the domain supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedPrivacy() - { - return $this->supported_privacy; - } - - /** - * Contact privacy options that the domain supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1alpha2.ContactPrivacy supported_privacy = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedPrivacy($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1alpha2\ContactPrivacy::class); - $this->supported_privacy = $arr; - - return $this; - } - - /** - * Price to transfer or renew the domain for one year. - * - * Generated from protobuf field .google.type.Money yearly_price = 6; - * @return \Google\Type\Money|null - */ - public function getYearlyPrice() - { - return $this->yearly_price; - } - - public function hasYearlyPrice() - { - return isset($this->yearly_price); - } - - public function clearYearlyPrice() - { - unset($this->yearly_price); - } - - /** - * Price to transfer or renew the domain for one year. - * - * Generated from protobuf field .google.type.Money yearly_price = 6; - * @param \Google\Type\Money $var - * @return $this - */ - public function setYearlyPrice($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->yearly_price = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/UpdateRegistrationRequest.php b/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/UpdateRegistrationRequest.php deleted file mode 100644 index 6d7be0e71f25..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/proto/src/Google/Cloud/Domains/V1alpha2/UpdateRegistrationRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.domains.v1alpha2.UpdateRegistrationRequest - */ -class UpdateRegistrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Fields of the `Registration` to update. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 1; - */ - protected $registration = null; - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the labels are being updated, the `update_mask` is - * `"labels"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Domains\V1alpha2\Registration $registration - * Fields of the `Registration` to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the labels are being updated, the `update_mask` is - * `"labels"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Fields of the `Registration` to update. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 1; - * @return \Google\Cloud\Domains\V1alpha2\Registration|null - */ - public function getRegistration() - { - return $this->registration; - } - - public function hasRegistration() - { - return isset($this->registration); - } - - public function clearRegistration() - { - unset($this->registration); - } - - /** - * Fields of the `Registration` to update. - * - * Generated from protobuf field .google.cloud.domains.v1alpha2.Registration registration = 1; - * @param \Google\Cloud\Domains\V1alpha2\Registration $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1alpha2\Registration::class); - $this->registration = $var; - - return $this; - } - - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the labels are being updated, the `update_mask` is - * `"labels"`. - * - * 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 field mask describing which fields to update as a comma-separated list. - * For example, if only the labels are being updated, the `update_mask` is - * `"labels"`. - * - * 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/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_contact_settings.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_contact_settings.php deleted file mode 100644 index 07d16b703d45..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_contact_settings.php +++ /dev/null @@ -1,88 +0,0 @@ -configureContactSettings($formattedRegistration, $updateMask); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Registration $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedRegistration = DomainsClient::registrationName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRATION]' - ); - - configure_contact_settings_sample($formattedRegistration); -} -// [END domains_v1alpha2_generated_Domains_ConfigureContactSettings_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_dns_settings.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_dns_settings.php deleted file mode 100644 index eb51a826d4a5..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_dns_settings.php +++ /dev/null @@ -1,87 +0,0 @@ -configureDnsSettings($formattedRegistration, $updateMask); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Registration $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedRegistration = DomainsClient::registrationName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRATION]' - ); - - configure_dns_settings_sample($formattedRegistration); -} -// [END domains_v1alpha2_generated_Domains_ConfigureDnsSettings_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_management_settings.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_management_settings.php deleted file mode 100644 index 3f4262d5ef62..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/configure_management_settings.php +++ /dev/null @@ -1,87 +0,0 @@ -configureManagementSettings($formattedRegistration, $updateMask); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Registration $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedRegistration = DomainsClient::registrationName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRATION]' - ); - - configure_management_settings_sample($formattedRegistration); -} -// [END domains_v1alpha2_generated_Domains_ConfigureManagementSettings_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/delete_registration.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/delete_registration.php deleted file mode 100644 index 570959c75f59..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/delete_registration.php +++ /dev/null @@ -1,94 +0,0 @@ -deleteRegistration($formattedName); - $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 = DomainsClient::registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - - delete_registration_sample($formattedName); -} -// [END domains_v1alpha2_generated_Domains_DeleteRegistration_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/export_registration.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/export_registration.php deleted file mode 100644 index fa8cc638dc96..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/export_registration.php +++ /dev/null @@ -1,87 +0,0 @@ -exportRegistration($formattedName); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Registration $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DomainsClient::registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - - export_registration_sample($formattedName); -} -// [END domains_v1alpha2_generated_Domains_ExportRegistration_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/get_registration.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/get_registration.php deleted file mode 100644 index d22f33295be6..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/get_registration.php +++ /dev/null @@ -1,67 +0,0 @@ -getRegistration($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DomainsClient::registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - - get_registration_sample($formattedName); -} -// [END domains_v1alpha2_generated_Domains_GetRegistration_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/list_registrations.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/list_registrations.php deleted file mode 100644 index 1fb8ee027719..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/list_registrations.php +++ /dev/null @@ -1,72 +0,0 @@ -listRegistrations($formattedParent); - - /** @var Registration $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 = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); - - list_registrations_sample($formattedParent); -} -// [END domains_v1alpha2_generated_Domains_ListRegistrations_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/register_domain.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/register_domain.php deleted file mode 100644 index 5cb968695577..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/register_domain.php +++ /dev/null @@ -1,160 +0,0 @@ -setPostalAddress($registrationContactSettingsRegistrantContactPostalAddress) - ->setEmail($registrationContactSettingsRegistrantContactEmail) - ->setPhoneNumber($registrationContactSettingsRegistrantContactPhoneNumber); - $registrationContactSettingsAdminContactPostalAddress = new PostalAddress(); - $registrationContactSettingsAdminContact = (new Contact()) - ->setPostalAddress($registrationContactSettingsAdminContactPostalAddress) - ->setEmail($registrationContactSettingsAdminContactEmail) - ->setPhoneNumber($registrationContactSettingsAdminContactPhoneNumber); - $registrationContactSettingsTechnicalContactPostalAddress = new PostalAddress(); - $registrationContactSettingsTechnicalContact = (new Contact()) - ->setPostalAddress($registrationContactSettingsTechnicalContactPostalAddress) - ->setEmail($registrationContactSettingsTechnicalContactEmail) - ->setPhoneNumber($registrationContactSettingsTechnicalContactPhoneNumber); - $registrationContactSettings = (new ContactSettings()) - ->setPrivacy($registrationContactSettingsPrivacy) - ->setRegistrantContact($registrationContactSettingsRegistrantContact) - ->setAdminContact($registrationContactSettingsAdminContact) - ->setTechnicalContact($registrationContactSettingsTechnicalContact); - $registration = (new Registration()) - ->setDomainName($registrationDomainName) - ->setContactSettings($registrationContactSettings); - $yearlyPrice = new Money(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $domainsClient->registerDomain($formattedParent, $registration, $yearlyPrice); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Registration $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); - $registrationDomainName = '[DOMAIN_NAME]'; - $registrationContactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; - $registrationContactSettingsRegistrantContactEmail = '[EMAIL]'; - $registrationContactSettingsRegistrantContactPhoneNumber = '[PHONE_NUMBER]'; - $registrationContactSettingsAdminContactEmail = '[EMAIL]'; - $registrationContactSettingsAdminContactPhoneNumber = '[PHONE_NUMBER]'; - $registrationContactSettingsTechnicalContactEmail = '[EMAIL]'; - $registrationContactSettingsTechnicalContactPhoneNumber = '[PHONE_NUMBER]'; - - register_domain_sample( - $formattedParent, - $registrationDomainName, - $registrationContactSettingsPrivacy, - $registrationContactSettingsRegistrantContactEmail, - $registrationContactSettingsRegistrantContactPhoneNumber, - $registrationContactSettingsAdminContactEmail, - $registrationContactSettingsAdminContactPhoneNumber, - $registrationContactSettingsTechnicalContactEmail, - $registrationContactSettingsTechnicalContactPhoneNumber - ); -} -// [END domains_v1alpha2_generated_Domains_RegisterDomain_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/reset_authorization_code.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/reset_authorization_code.php deleted file mode 100644 index e151c787c78c..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/reset_authorization_code.php +++ /dev/null @@ -1,74 +0,0 @@ -resetAuthorizationCode($formattedRegistration); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedRegistration = DomainsClient::registrationName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRATION]' - ); - - reset_authorization_code_sample($formattedRegistration); -} -// [END domains_v1alpha2_generated_Domains_ResetAuthorizationCode_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_authorization_code.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_authorization_code.php deleted file mode 100644 index c26c483a9374..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_authorization_code.php +++ /dev/null @@ -1,75 +0,0 @@ -retrieveAuthorizationCode($formattedRegistration); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedRegistration = DomainsClient::registrationName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRATION]' - ); - - retrieve_authorization_code_sample($formattedRegistration); -} -// [END domains_v1alpha2_generated_Domains_RetrieveAuthorizationCode_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_register_parameters.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_register_parameters.php deleted file mode 100644 index ac895294259f..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_register_parameters.php +++ /dev/null @@ -1,69 +0,0 @@ -retrieveRegisterParameters($domainName, $formattedLocation); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 = '[DOMAIN_NAME]'; - $formattedLocation = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); - - retrieve_register_parameters_sample($domainName, $formattedLocation); -} -// [END domains_v1alpha2_generated_Domains_RetrieveRegisterParameters_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_transfer_parameters.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_transfer_parameters.php deleted file mode 100644 index 916d5c220084..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/retrieve_transfer_parameters.php +++ /dev/null @@ -1,73 +0,0 @@ -retrieveTransferParameters($domainName, $formattedLocation); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 = '[DOMAIN_NAME]'; - $formattedLocation = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); - - retrieve_transfer_parameters_sample($domainName, $formattedLocation); -} -// [END domains_v1alpha2_generated_Domains_RetrieveTransferParameters_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/search_domains.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/search_domains.php deleted file mode 100644 index b5239352b28b..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/search_domains.php +++ /dev/null @@ -1,72 +0,0 @@ -searchDomains($query, $formattedLocation); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $query = '[QUERY]'; - $formattedLocation = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); - - search_domains_sample($query, $formattedLocation); -} -// [END domains_v1alpha2_generated_Domains_SearchDomains_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/transfer_domain.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/transfer_domain.php deleted file mode 100644 index 848574220086..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/transfer_domain.php +++ /dev/null @@ -1,168 +0,0 @@ -setPostalAddress($registrationContactSettingsRegistrantContactPostalAddress) - ->setEmail($registrationContactSettingsRegistrantContactEmail) - ->setPhoneNumber($registrationContactSettingsRegistrantContactPhoneNumber); - $registrationContactSettingsAdminContactPostalAddress = new PostalAddress(); - $registrationContactSettingsAdminContact = (new Contact()) - ->setPostalAddress($registrationContactSettingsAdminContactPostalAddress) - ->setEmail($registrationContactSettingsAdminContactEmail) - ->setPhoneNumber($registrationContactSettingsAdminContactPhoneNumber); - $registrationContactSettingsTechnicalContactPostalAddress = new PostalAddress(); - $registrationContactSettingsTechnicalContact = (new Contact()) - ->setPostalAddress($registrationContactSettingsTechnicalContactPostalAddress) - ->setEmail($registrationContactSettingsTechnicalContactEmail) - ->setPhoneNumber($registrationContactSettingsTechnicalContactPhoneNumber); - $registrationContactSettings = (new ContactSettings()) - ->setPrivacy($registrationContactSettingsPrivacy) - ->setRegistrantContact($registrationContactSettingsRegistrantContact) - ->setAdminContact($registrationContactSettingsAdminContact) - ->setTechnicalContact($registrationContactSettingsTechnicalContact); - $registration = (new Registration()) - ->setDomainName($registrationDomainName) - ->setContactSettings($registrationContactSettings); - $yearlyPrice = new Money(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $domainsClient->transferDomain($formattedParent, $registration, $yearlyPrice); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Registration $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); - $registrationDomainName = '[DOMAIN_NAME]'; - $registrationContactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; - $registrationContactSettingsRegistrantContactEmail = '[EMAIL]'; - $registrationContactSettingsRegistrantContactPhoneNumber = '[PHONE_NUMBER]'; - $registrationContactSettingsAdminContactEmail = '[EMAIL]'; - $registrationContactSettingsAdminContactPhoneNumber = '[PHONE_NUMBER]'; - $registrationContactSettingsTechnicalContactEmail = '[EMAIL]'; - $registrationContactSettingsTechnicalContactPhoneNumber = '[PHONE_NUMBER]'; - - transfer_domain_sample( - $formattedParent, - $registrationDomainName, - $registrationContactSettingsPrivacy, - $registrationContactSettingsRegistrantContactEmail, - $registrationContactSettingsRegistrantContactPhoneNumber, - $registrationContactSettingsAdminContactEmail, - $registrationContactSettingsAdminContactPhoneNumber, - $registrationContactSettingsTechnicalContactEmail, - $registrationContactSettingsTechnicalContactPhoneNumber - ); -} -// [END domains_v1alpha2_generated_Domains_TransferDomain_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/update_registration.php b/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/update_registration.php deleted file mode 100644 index f51f705b6e3c..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/samples/V1alpha2/DomainsClient/update_registration.php +++ /dev/null @@ -1,74 +0,0 @@ -updateRegistration($updateMask); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Registration $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - 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 domains_v1alpha2_generated_Domains_UpdateRegistration_sync] diff --git a/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/DomainsClient.php b/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/DomainsClient.php deleted file mode 100644 index 367c0bcb90af..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/DomainsClient.php +++ /dev/null @@ -1,36 +0,0 @@ -registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $updateMask = new FieldMask(); - * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureContactSettings'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->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. - * - * @experimental - */ -class DomainsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.domains.v1alpha2.Domains'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'domains.googleapis.com'; - - /** 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 $locationNameTemplate; - - private static $registrationNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/domains_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/domains_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/domains_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/domains_rest_client_config.php', - ], - ], - ]; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getRegistrationNameTemplate() - { - if (self::$registrationNameTemplate == null) { - self::$registrationNameTemplate = new PathTemplate('projects/{project}/locations/{location}/registrations/{registration}'); - } - - return self::$registrationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'location' => self::getLocationNameTemplate(), - 'registration' => self::getRegistrationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * 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. - * - * @experimental - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a registration - * resource. - * - * @param string $project - * @param string $location - * @param string $registration - * - * @return string The formatted registration resource. - * - * @experimental - */ - public static function registrationName($project, $location, $registration) - { - return self::getRegistrationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'registration' => $registration, - ]); - } - - /** - * 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} - * - registration: projects/{project}/locations/{location}/registrations/{registration} - * - * 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. - * - * @experimental - */ - 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"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - * - * @experimental - */ - 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 - * - * @experimental - */ - 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; - } - - /** - * 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 'domains.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Updates a `Registration`'s contact settings. Some changes require - * confirmation by the domain's registrant contact . - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $updateMask = new FieldMask(); - * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureContactSettings'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $registration Required. The name of the `Registration` whose contact settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the registrant contact is being updated, the - * `update_mask` is `"registrant_contact"`. - * @param array $optionalArgs { - * Optional. - * - * @type ContactSettings $contactSettings - * Fields of the `ContactSettings` to update. - * @type int[] $contactNotices - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in `contact_settings`. - * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1alpha2\ContactNotice} - * @type bool $validateOnly - * Validate the request without actually updating the contact settings. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function configureContactSettings($registration, $updateMask, array $optionalArgs = []) - { - $request = new ConfigureContactSettingsRequest(); - $requestParamHeaders = []; - $request->setRegistration($registration); - $request->setUpdateMask($updateMask); - $requestParamHeaders['registration'] = $registration; - if (isset($optionalArgs['contactSettings'])) { - $request->setContactSettings($optionalArgs['contactSettings']); - } - - if (isset($optionalArgs['contactNotices'])) { - $request->setContactNotices($optionalArgs['contactNotices']); - } - - 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->startOperationsCall('ConfigureContactSettings', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a `Registration`'s DNS settings. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $updateMask = new FieldMask(); - * $operationResponse = $domainsClient->configureDnsSettings($formattedRegistration, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->configureDnsSettings($formattedRegistration, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureDnsSettings'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $registration Required. The name of the `Registration` whose DNS settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the name servers are being updated for an existing - * Custom DNS configuration, the `update_mask` is - * `"custom_dns.name_servers"`. - * - * When changing the DNS provider from one type to another, pass the new - * provider's field name as part of the field mask. For example, when changing - * from a Google Domains DNS configuration to a Custom DNS configuration, the - * `update_mask` is `"custom_dns"`. // - * @param array $optionalArgs { - * Optional. - * - * @type DnsSettings $dnsSettings - * Fields of the `DnsSettings` to update. - * @type bool $validateOnly - * Validate the request without actually updating the DNS settings. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function configureDnsSettings($registration, $updateMask, array $optionalArgs = []) - { - $request = new ConfigureDnsSettingsRequest(); - $requestParamHeaders = []; - $request->setRegistration($registration); - $request->setUpdateMask($updateMask); - $requestParamHeaders['registration'] = $registration; - if (isset($optionalArgs['dnsSettings'])) { - $request->setDnsSettings($optionalArgs['dnsSettings']); - } - - 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->startOperationsCall('ConfigureDnsSettings', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a `Registration`'s management settings. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $updateMask = new FieldMask(); - * $operationResponse = $domainsClient->configureManagementSettings($formattedRegistration, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->configureManagementSettings($formattedRegistration, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureManagementSettings'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $registration Required. The name of the `Registration` whose management settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the transfer lock is being updated, the `update_mask` - * is `"transfer_lock_state"`. - * @param array $optionalArgs { - * Optional. - * - * @type ManagementSettings $managementSettings - * Fields of the `ManagementSettings` 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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function configureManagementSettings($registration, $updateMask, array $optionalArgs = []) - { - $request = new ConfigureManagementSettingsRequest(); - $requestParamHeaders = []; - $request->setRegistration($registration); - $request->setUpdateMask($updateMask); - $requestParamHeaders['registration'] = $registration; - if (isset($optionalArgs['managementSettings'])) { - $request->setManagementSettings($optionalArgs['managementSettings']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ConfigureManagementSettings', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a `Registration` resource. - * - * This method works on any `Registration` resource using [Subscription or - * Commitment billing](/domains/pricing#billing-models), provided that the - * resource was created at least 1 day in the past. - * - * For `Registration` resources using - * [Monthly billing](/domains/pricing#billing-models), this method works if: - * - * * `state` is `EXPORTED` with `expire_time` in the past - * * `state` is `REGISTRATION_FAILED` - * * `state` is `TRANSFER_FAILED` - * - * When an active registration is successfully deleted, you can continue to - * use the domain in [Google Domains](https://domains.google/) until it - * expires. The calling user becomes the domain's sole owner in Google - * Domains, and permissions for the domain are subsequently managed there. The - * domain does not renew automatically unless the new owner sets up billing in - * Google Domains. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedName = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $operationResponse = $domainsClient->deleteRegistration($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->deleteRegistration($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'deleteRegistration'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the `Registration` to delete, - * in the format `projects/*/locations/*/registrations/*`. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteRegistration($name, array $optionalArgs = []) - { - $request = new DeleteRegistrationRequest(); - $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->startOperationsCall('DeleteRegistration', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Exports a `Registration` resource, such that it is no longer managed by - * Cloud Domains. - * - * When an active domain is successfully exported, you can continue to use the - * domain in [Google Domains](https://domains.google/) until it expires. The - * calling user becomes the domain's sole owner in Google Domains, and - * permissions for the domain are subsequently managed there. The domain does - * not renew automatically unless the new owner sets up billing in Google - * Domains. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedName = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $operationResponse = $domainsClient->exportRegistration($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->exportRegistration($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'exportRegistration'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the `Registration` to export, - * in the format `projects/*/locations/*/registrations/*`. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function exportRegistration($name, array $optionalArgs = []) - { - $request = new ExportRegistrationRequest(); - $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->startOperationsCall('ExportRegistration', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the details of a `Registration` resource. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedName = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $response = $domainsClient->getRegistration($formattedName); - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the `Registration` to get, in the format - * `projects/*/locations/*/registrations/*`. - * @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\Domains\V1alpha2\Registration - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getRegistration($name, array $optionalArgs = []) - { - $request = new GetRegistrationRequest(); - $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('GetRegistration', Registration::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the `Registration` resources in a project. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedParent = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $domainsClient->listRegistrations($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $domainsClient->listRegistrations($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and location from which to list `Registration`s, specified in - * the format `projects/*/locations/*`. - * @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 - * Filter expression to restrict the `Registration`s returned. - * - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, a boolean, or an enum value. The comparison operator should be one - * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. - * - * For example, to filter to a specific domain name, use an expression like - * `domainName="example.com"`. You can also check for the existence of a - * field; for example, to find domains using custom DNS settings, use an - * expression like `dnsSettings.customDns:*`. - * - * You can also create compound filters by combining expressions with the - * `AND` and `OR` operators. For example, to find domains that are suspended - * or have specific issues flagged, use an expression like - * `(state=SUSPENDED) OR (issue:*)`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 - * - * @experimental - */ - public function listRegistrations($parent, array $optionalArgs = []) - { - $request = new ListRegistrationsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListRegistrations', $optionalArgs, ListRegistrationsResponse::class, $request); - } - - /** - * Registers a new domain name and creates a corresponding `Registration` - * resource. - * - * Call `RetrieveRegisterParameters` first to check availability of the domain - * name and determine parameters like price that are needed to build a call to - * this method. - * - * A successful call creates a `Registration` resource in state - * `REGISTRATION_PENDING`, which resolves to `ACTIVE` within 1-2 - * minutes, indicating that the domain was successfully registered. If the - * resource ends up in state `REGISTRATION_FAILED`, it indicates that the - * domain was not registered successfully, and you can safely delete the - * resource and retry registration. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedParent = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); - * $registration = new Registration(); - * $yearlyPrice = new Money(); - * $operationResponse = $domainsClient->registerDomain($formattedParent, $registration, $yearlyPrice); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->registerDomain($formattedParent, $registration, $yearlyPrice); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'registerDomain'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the `Registration`. Must be in the - * format `projects/*/locations/*`. - * @param Registration $registration Required. The complete `Registration` resource to be created. - * @param Money $yearlyPrice Required. Yearly price to register or renew the domain. - * The value that should be put here can be obtained from - * RetrieveRegisterParameters or SearchDomains calls. - * @param array $optionalArgs { - * Optional. - * - * @type int[] $domainNotices - * The list of domain notices that you acknowledge. Call - * `RetrieveRegisterParameters` to see the notices that need acknowledgement. - * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1alpha2\DomainNotice} - * @type int[] $contactNotices - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1alpha2\ContactNotice} - * @type bool $validateOnly - * When true, only validation is performed, without actually registering - * the domain. Follows: - * https://cloud.google.com/apis/design/design_patterns#request_validation - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function registerDomain($parent, $registration, $yearlyPrice, array $optionalArgs = []) - { - $request = new RegisterDomainRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setRegistration($registration); - $request->setYearlyPrice($yearlyPrice); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['domainNotices'])) { - $request->setDomainNotices($optionalArgs['domainNotices']); - } - - if (isset($optionalArgs['contactNotices'])) { - $request->setContactNotices($optionalArgs['contactNotices']); - } - - 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->startOperationsCall('RegisterDomain', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Resets the authorization code of the `Registration` to a new random string. - * - * You can call this method only after 60 days have elapsed since the initial - * domain registration. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $response = $domainsClient->resetAuthorizationCode($formattedRegistration); - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $registration Required. The name of the `Registration` whose authorization code is being reset, - * in the format `projects/*/locations/*/registrations/*`. - * @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\Domains\V1alpha2\AuthorizationCode - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function resetAuthorizationCode($registration, array $optionalArgs = []) - { - $request = new ResetAuthorizationCodeRequest(); - $requestParamHeaders = []; - $request->setRegistration($registration); - $requestParamHeaders['registration'] = $registration; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ResetAuthorizationCode', AuthorizationCode::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the authorization code of the `Registration` for the purpose of - * transferring the domain to another registrar. - * - * You can call this method only after 60 days have elapsed since the initial - * domain registration. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $response = $domainsClient->retrieveAuthorizationCode($formattedRegistration); - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $registration Required. The name of the `Registration` whose authorization code is being retrieved, - * in the format `projects/*/locations/*/registrations/*`. - * @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\Domains\V1alpha2\AuthorizationCode - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function retrieveAuthorizationCode($registration, array $optionalArgs = []) - { - $request = new RetrieveAuthorizationCodeRequest(); - $requestParamHeaders = []; - $request->setRegistration($registration); - $requestParamHeaders['registration'] = $registration; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RetrieveAuthorizationCode', AuthorizationCode::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets parameters needed to register a new domain name, including price and - * up-to-date availability. Use the returned values to call `RegisterDomain`. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $domainName = 'domain_name'; - * $formattedLocation = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $domainsClient->retrieveRegisterParameters($domainName, $formattedLocation); - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $domainName Required. The domain name. Unicode domain names must be expressed in Punycode format. - * @param string $location Required. The location. Must be in the format `projects/*/locations/*`. - * @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\Domains\V1alpha2\RetrieveRegisterParametersResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function retrieveRegisterParameters($domainName, $location, array $optionalArgs = []) - { - $request = new RetrieveRegisterParametersRequest(); - $requestParamHeaders = []; - $request->setDomainName($domainName); - $request->setLocation($location); - $requestParamHeaders['location'] = $location; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RetrieveRegisterParameters', RetrieveRegisterParametersResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets parameters needed to transfer a domain name from another registrar to - * Cloud Domains. For domains managed by Google Domains, transferring to Cloud - * Domains is not supported. - * - * - * Use the returned values to call `TransferDomain`. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $domainName = 'domain_name'; - * $formattedLocation = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $domainsClient->retrieveTransferParameters($domainName, $formattedLocation); - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $domainName Required. The domain name. Unicode domain names must be expressed in Punycode format. - * @param string $location Required. The location. Must be in the format `projects/*/locations/*`. - * @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\Domains\V1alpha2\RetrieveTransferParametersResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function retrieveTransferParameters($domainName, $location, array $optionalArgs = []) - { - $request = new RetrieveTransferParametersRequest(); - $requestParamHeaders = []; - $request->setDomainName($domainName); - $request->setLocation($location); - $requestParamHeaders['location'] = $location; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RetrieveTransferParameters', RetrieveTransferParametersResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Searches for available domain names similar to the provided query. - * - * Availability results from this method are approximate; call - * `RetrieveRegisterParameters` on a domain before registering to confirm - * availability. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $query = 'query'; - * $formattedLocation = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $domainsClient->searchDomains($query, $formattedLocation); - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $query Required. String used to search for available domain names. - * @param string $location Required. The location. Must be in the format `projects/*/locations/*`. - * @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\Domains\V1alpha2\SearchDomainsResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function searchDomains($query, $location, array $optionalArgs = []) - { - $request = new SearchDomainsRequest(); - $requestParamHeaders = []; - $request->setQuery($query); - $request->setLocation($location); - $requestParamHeaders['location'] = $location; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SearchDomains', SearchDomainsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Transfers a domain name from another registrar to Cloud Domains. For - * domains managed by Google Domains, transferring to Cloud Domains is not - * supported. - * - * - * Before calling this method, go to the domain's current registrar to unlock - * the domain for transfer and retrieve the domain's transfer authorization - * code. Then call `RetrieveTransferParameters` to confirm that the domain is - * unlocked and to get values needed to build a call to this method. - * - * A successful call creates a `Registration` resource in state - * `TRANSFER_PENDING`. It can take several days to complete the transfer - * process. The registrant can often speed up this process by approving the - * transfer through the current registrar, either by clicking a link in an - * email from the registrar or by visiting the registrar's website. - * - * A few minutes after transfer approval, the resource transitions to state - * `ACTIVE`, indicating that the transfer was successful. If the transfer is - * rejected or the request expires without being approved, the resource can - * end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete - * the resource and retry the transfer. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedParent = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); - * $registration = new Registration(); - * $yearlyPrice = new Money(); - * $operationResponse = $domainsClient->transferDomain($formattedParent, $registration, $yearlyPrice); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->transferDomain($formattedParent, $registration, $yearlyPrice); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'transferDomain'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the `Registration`. Must be in the - * format `projects/*/locations/*`. - * @param Registration $registration Required. The complete `Registration` resource to be created. - * - * You can leave `registration.dns_settings` unset to import the - * domain's current DNS configuration from its current registrar. Use this - * option only if you are sure that the domain's current DNS service - * does not cease upon transfer, as is often the case for DNS services - * provided for free by the registrar. - * @param Money $yearlyPrice Required. Acknowledgement of the price to transfer or renew the domain for one year. - * Call `RetrieveTransferParameters` to obtain the price, which you must - * acknowledge. - * @param array $optionalArgs { - * Optional. - * - * @type int[] $contactNotices - * The list of contact notices that you acknowledge. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1alpha2\ContactNotice} - * @type AuthorizationCode $authorizationCode - * The domain's transfer authorization code. You can obtain this from the - * domain's current registrar. - * @type bool $validateOnly - * Validate the request without actually transferring the domain. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function transferDomain($parent, $registration, $yearlyPrice, array $optionalArgs = []) - { - $request = new TransferDomainRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setRegistration($registration); - $request->setYearlyPrice($yearlyPrice); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['contactNotices'])) { - $request->setContactNotices($optionalArgs['contactNotices']); - } - - if (isset($optionalArgs['authorizationCode'])) { - $request->setAuthorizationCode($optionalArgs['authorizationCode']); - } - - 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->startOperationsCall('TransferDomain', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates select fields of a `Registration` resource, notably `labels`. To - * update other fields, use the appropriate custom update method: - * - * * To update management settings, see `ConfigureManagementSettings` - * * To update DNS configuration, see `ConfigureDnsSettings` - * * To update contact information, see `ConfigureContactSettings` - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $updateMask = new FieldMask(); - * $operationResponse = $domainsClient->updateRegistration($updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->updateRegistration($updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'updateRegistration'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the labels are being updated, the `update_mask` is - * `"labels"`. - * @param array $optionalArgs { - * Optional. - * - * @type Registration $registration - * Fields of the `Registration` 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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateRegistration($updateMask, array $optionalArgs = []) - { - $request = new UpdateRegistrationRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - if (isset($optionalArgs['registration'])) { - $request->setRegistration($optionalArgs['registration']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateRegistration', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/gapic_metadata.json b/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/gapic_metadata.json deleted file mode 100644 index 63eb4208305c..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/gapic_metadata.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.domains.v1alpha2", - "libraryPackage": "Google\\Cloud\\Domains\\V1alpha2", - "services": { - "Domains": { - "clients": { - "grpc": { - "libraryClient": "DomainsGapicClient", - "rpcs": { - "ConfigureContactSettings": { - "methods": [ - "configureContactSettings" - ] - }, - "ConfigureDnsSettings": { - "methods": [ - "configureDnsSettings" - ] - }, - "ConfigureManagementSettings": { - "methods": [ - "configureManagementSettings" - ] - }, - "DeleteRegistration": { - "methods": [ - "deleteRegistration" - ] - }, - "ExportRegistration": { - "methods": [ - "exportRegistration" - ] - }, - "GetRegistration": { - "methods": [ - "getRegistration" - ] - }, - "ListRegistrations": { - "methods": [ - "listRegistrations" - ] - }, - "RegisterDomain": { - "methods": [ - "registerDomain" - ] - }, - "ResetAuthorizationCode": { - "methods": [ - "resetAuthorizationCode" - ] - }, - "RetrieveAuthorizationCode": { - "methods": [ - "retrieveAuthorizationCode" - ] - }, - "RetrieveRegisterParameters": { - "methods": [ - "retrieveRegisterParameters" - ] - }, - "RetrieveTransferParameters": { - "methods": [ - "retrieveTransferParameters" - ] - }, - "SearchDomains": { - "methods": [ - "searchDomains" - ] - }, - "TransferDomain": { - "methods": [ - "transferDomain" - ] - }, - "UpdateRegistration": { - "methods": [ - "updateRegistration" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_client_config.json b/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_client_config.json deleted file mode 100644 index 6bfd4a2253d4..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_client_config.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "interfaces": { - "google.cloud.domains.v1alpha2.Domains": { - "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": { - "ConfigureContactSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ConfigureDnsSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ConfigureManagementSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteRegistration": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ExportRegistration": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetRegistration": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListRegistrations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RegisterDomain": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ResetAuthorizationCode": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RetrieveAuthorizationCode": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RetrieveRegisterParameters": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RetrieveTransferParameters": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SearchDomains": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TransferDomain": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateRegistration": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_descriptor_config.php b/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_descriptor_config.php deleted file mode 100644 index 2adf181e173d..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_descriptor_config.php +++ /dev/null @@ -1,98 +0,0 @@ - [ - 'google.cloud.domains.v1alpha2.Domains' => [ - 'ConfigureContactSettings' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Domains\V1alpha2\Registration', - 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ConfigureDnsSettings' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Domains\V1alpha2\Registration', - 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ConfigureManagementSettings' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Domains\V1alpha2\Registration', - 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteRegistration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ExportRegistration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Domains\V1alpha2\Registration', - 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'RegisterDomain' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Domains\V1alpha2\Registration', - 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'TransferDomain' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Domains\V1alpha2\Registration', - 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateRegistration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Domains\V1alpha2\Registration', - 'metadataReturnType' => '\Google\Cloud\Domains\V1alpha2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListRegistrations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRegistrations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_rest_client_config.php b/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_rest_client_config.php deleted file mode 100644 index a9a9f76ad3c4..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/src/V1alpha2/resources/domains_rest_client_config.php +++ /dev/null @@ -1,271 +0,0 @@ - [ - 'google.cloud.domains.v1alpha2.Domains' => [ - 'ConfigureContactSettings' => [ - 'method' => 'post', - 'uriTemplate' => '/v1alpha2/{registration=projects/*/locations/*/registrations/*}:configureContactSettings', - 'body' => '*', - 'placeholders' => [ - 'registration' => [ - 'getters' => [ - 'getRegistration', - ], - ], - ], - ], - 'ConfigureDnsSettings' => [ - 'method' => 'post', - 'uriTemplate' => '/v1alpha2/{registration=projects/*/locations/*/registrations/*}:configureDnsSettings', - 'body' => '*', - 'placeholders' => [ - 'registration' => [ - 'getters' => [ - 'getRegistration', - ], - ], - ], - ], - 'ConfigureManagementSettings' => [ - 'method' => 'post', - 'uriTemplate' => '/v1alpha2/{registration=projects/*/locations/*/registrations/*}:configureManagementSettings', - 'body' => '*', - 'placeholders' => [ - 'registration' => [ - 'getters' => [ - 'getRegistration', - ], - ], - ], - ], - 'DeleteRegistration' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1alpha2/{name=projects/*/locations/*/registrations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportRegistration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1alpha2/{name=projects/*/locations/*/registrations/*}:export', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRegistration' => [ - 'method' => 'get', - 'uriTemplate' => '/v1alpha2/{name=projects/*/locations/*/registrations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListRegistrations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1alpha2/{parent=projects/*/locations/*}/registrations', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RegisterDomain' => [ - 'method' => 'post', - 'uriTemplate' => '/v1alpha2/{parent=projects/*/locations/*}/registrations:register', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ResetAuthorizationCode' => [ - 'method' => 'post', - 'uriTemplate' => '/v1alpha2/{registration=projects/*/locations/*/registrations/*}:resetAuthorizationCode', - 'body' => '*', - 'placeholders' => [ - 'registration' => [ - 'getters' => [ - 'getRegistration', - ], - ], - ], - ], - 'RetrieveAuthorizationCode' => [ - 'method' => 'get', - 'uriTemplate' => '/v1alpha2/{registration=projects/*/locations/*/registrations/*}:retrieveAuthorizationCode', - 'placeholders' => [ - 'registration' => [ - 'getters' => [ - 'getRegistration', - ], - ], - ], - ], - 'RetrieveRegisterParameters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1alpha2/{location=projects/*/locations/*}/registrations:retrieveRegisterParameters', - 'placeholders' => [ - 'location' => [ - 'getters' => [ - 'getLocation', - ], - ], - ], - ], - 'RetrieveTransferParameters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1alpha2/{location=projects/*/locations/*}/registrations:retrieveTransferParameters', - 'placeholders' => [ - 'location' => [ - 'getters' => [ - 'getLocation', - ], - ], - ], - ], - 'SearchDomains' => [ - 'method' => 'get', - 'uriTemplate' => '/v1alpha2/{location=projects/*/locations/*}/registrations:searchDomains', - 'placeholders' => [ - 'location' => [ - 'getters' => [ - 'getLocation', - ], - ], - ], - ], - 'TransferDomain' => [ - 'method' => 'post', - 'uriTemplate' => '/v1alpha2/{parent=projects/*/locations/*}/registrations:transfer', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateRegistration' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1alpha2/{registration.name=projects/*/locations/*/registrations/*}', - 'body' => 'registration', - 'placeholders' => [ - 'registration.name' => [ - 'getters' => [ - 'getRegistration', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1alpha2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1alpha2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1alpha2/{resource=projects/*/locations/*/registrations/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1alpha2/{resource=projects/*/locations/*/registrations/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1alpha2/{resource=projects/*/locations/*/registrations/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1alpha2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1alpha2/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Domains/v1alpha2/tests/Unit/V1alpha2/DomainsClientTest.php b/owl-bot-staging/Domains/v1alpha2/tests/Unit/V1alpha2/DomainsClientTest.php deleted file mode 100644 index fdfe157aeccf..000000000000 --- a/owl-bot-staging/Domains/v1alpha2/tests/Unit/V1alpha2/DomainsClientTest.php +++ /dev/null @@ -1,1625 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DomainsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DomainsClient($options); - } - - /** @test */ - public function configureContactSettingsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/configureContactSettingsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name); - $expectedResponse->setDomainName($domainName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/configureContactSettingsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $updateMask = new FieldMask(); - $response = $gapicClient->configureContactSettings($formattedRegistration, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1alpha2.Domains/ConfigureContactSettings', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRegistration(); - $this->assertProtobufEquals($formattedRegistration, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/configureContactSettingsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function configureContactSettingsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/configureContactSettingsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $updateMask = new FieldMask(); - $response = $gapicClient->configureContactSettings($formattedRegistration, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/configureContactSettingsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function configureDnsSettingsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/configureDnsSettingsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name); - $expectedResponse->setDomainName($domainName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/configureDnsSettingsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $updateMask = new FieldMask(); - $response = $gapicClient->configureDnsSettings($formattedRegistration, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1alpha2.Domains/ConfigureDnsSettings', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRegistration(); - $this->assertProtobufEquals($formattedRegistration, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/configureDnsSettingsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function configureDnsSettingsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/configureDnsSettingsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $updateMask = new FieldMask(); - $response = $gapicClient->configureDnsSettings($formattedRegistration, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/configureDnsSettingsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function configureManagementSettingsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/configureManagementSettingsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name); - $expectedResponse->setDomainName($domainName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/configureManagementSettingsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $updateMask = new FieldMask(); - $response = $gapicClient->configureManagementSettings($formattedRegistration, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1alpha2.Domains/ConfigureManagementSettings', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRegistration(); - $this->assertProtobufEquals($formattedRegistration, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/configureManagementSettingsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function configureManagementSettingsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/configureManagementSettingsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $updateMask = new FieldMask(); - $response = $gapicClient->configureManagementSettings($formattedRegistration, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/configureManagementSettingsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRegistrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRegistrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteRegistrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $response = $gapicClient->deleteRegistration($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1alpha2.Domains/DeleteRegistration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRegistrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRegistrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRegistrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $response = $gapicClient->deleteRegistration($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRegistrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function exportRegistrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportRegistrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name2); - $expectedResponse->setDomainName($domainName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportRegistrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $response = $gapicClient->exportRegistration($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1alpha2.Domains/ExportRegistration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportRegistrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function exportRegistrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportRegistrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $response = $gapicClient->exportRegistration($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportRegistrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getRegistrationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name2); - $expectedResponse->setDomainName($domainName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $response = $gapicClient->getRegistration($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1alpha2.Domains/GetRegistration', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRegistrationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - try { - $gapicClient->getRegistration($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 listRegistrationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $registrationsElement = new Registration(); - $registrations = [ - $registrationsElement, - ]; - $expectedResponse = new ListRegistrationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRegistrations($registrations); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listRegistrations($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRegistrations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1alpha2.Domains/ListRegistrations', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRegistrationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listRegistrations($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 registerDomainTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/registerDomainTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name); - $expectedResponse->setDomainName($domainName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/registerDomainTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $registration = new Registration(); - $registrationDomainName = 'registrationDomainName1873916680'; - $registration->setDomainName($registrationDomainName); - $registrationContactSettings = new ContactSettings(); - $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; - $registrationContactSettings->setPrivacy($contactSettingsPrivacy); - $contactSettingsRegistrantContact = new Contact(); - $registrantContactPostalAddress = new PostalAddress(); - $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); - $registrantContactEmail = 'registrantContactEmail1001340839'; - $contactSettingsRegistrantContact->setEmail($registrantContactEmail); - $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; - $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); - $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); - $contactSettingsAdminContact = new Contact(); - $adminContactPostalAddress = new PostalAddress(); - $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); - $adminContactEmail = 'adminContactEmail1687004235'; - $contactSettingsAdminContact->setEmail($adminContactEmail); - $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; - $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); - $registrationContactSettings->setAdminContact($contactSettingsAdminContact); - $contactSettingsTechnicalContact = new Contact(); - $technicalContactPostalAddress = new PostalAddress(); - $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); - $technicalContactEmail = 'technicalContactEmail-221168807'; - $contactSettingsTechnicalContact->setEmail($technicalContactEmail); - $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; - $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); - $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); - $registration->setContactSettings($registrationContactSettings); - $yearlyPrice = new Money(); - $response = $gapicClient->registerDomain($formattedParent, $registration, $yearlyPrice); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1alpha2.Domains/RegisterDomain', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRegistration(); - $this->assertProtobufEquals($registration, $actualValue); - $actualValue = $actualApiRequestObject->getYearlyPrice(); - $this->assertProtobufEquals($yearlyPrice, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/registerDomainTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function registerDomainExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/registerDomainTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $registration = new Registration(); - $registrationDomainName = 'registrationDomainName1873916680'; - $registration->setDomainName($registrationDomainName); - $registrationContactSettings = new ContactSettings(); - $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; - $registrationContactSettings->setPrivacy($contactSettingsPrivacy); - $contactSettingsRegistrantContact = new Contact(); - $registrantContactPostalAddress = new PostalAddress(); - $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); - $registrantContactEmail = 'registrantContactEmail1001340839'; - $contactSettingsRegistrantContact->setEmail($registrantContactEmail); - $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; - $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); - $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); - $contactSettingsAdminContact = new Contact(); - $adminContactPostalAddress = new PostalAddress(); - $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); - $adminContactEmail = 'adminContactEmail1687004235'; - $contactSettingsAdminContact->setEmail($adminContactEmail); - $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; - $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); - $registrationContactSettings->setAdminContact($contactSettingsAdminContact); - $contactSettingsTechnicalContact = new Contact(); - $technicalContactPostalAddress = new PostalAddress(); - $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); - $technicalContactEmail = 'technicalContactEmail-221168807'; - $contactSettingsTechnicalContact->setEmail($technicalContactEmail); - $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; - $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); - $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); - $registration->setContactSettings($registrationContactSettings); - $yearlyPrice = new Money(); - $response = $gapicClient->registerDomain($formattedParent, $registration, $yearlyPrice); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/registerDomainTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resetAuthorizationCodeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $code = 'code3059181'; - $expectedResponse = new AuthorizationCode(); - $expectedResponse->setCode($code); - $transport->addResponse($expectedResponse); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $response = $gapicClient->resetAuthorizationCode($formattedRegistration); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1alpha2.Domains/ResetAuthorizationCode', $actualFuncCall); - $actualValue = $actualRequestObject->getRegistration(); - $this->assertProtobufEquals($formattedRegistration, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetAuthorizationCodeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - try { - $gapicClient->resetAuthorizationCode($formattedRegistration); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveAuthorizationCodeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $code = 'code3059181'; - $expectedResponse = new AuthorizationCode(); - $expectedResponse->setCode($code); - $transport->addResponse($expectedResponse); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $response = $gapicClient->retrieveAuthorizationCode($formattedRegistration); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1alpha2.Domains/RetrieveAuthorizationCode', $actualFuncCall); - $actualValue = $actualRequestObject->getRegistration(); - $this->assertProtobufEquals($formattedRegistration, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveAuthorizationCodeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - try { - $gapicClient->retrieveAuthorizationCode($formattedRegistration); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveRegisterParametersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RetrieveRegisterParametersResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $domainName = 'domainName104118566'; - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->retrieveRegisterParameters($domainName, $formattedLocation); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1alpha2.Domains/RetrieveRegisterParameters', $actualFuncCall); - $actualValue = $actualRequestObject->getDomainName(); - $this->assertProtobufEquals($domainName, $actualValue); - $actualValue = $actualRequestObject->getLocation(); - $this->assertProtobufEquals($formattedLocation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveRegisterParametersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $domainName = 'domainName104118566'; - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->retrieveRegisterParameters($domainName, $formattedLocation); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveTransferParametersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RetrieveTransferParametersResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $domainName = 'domainName104118566'; - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->retrieveTransferParameters($domainName, $formattedLocation); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1alpha2.Domains/RetrieveTransferParameters', $actualFuncCall); - $actualValue = $actualRequestObject->getDomainName(); - $this->assertProtobufEquals($domainName, $actualValue); - $actualValue = $actualRequestObject->getLocation(); - $this->assertProtobufEquals($formattedLocation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveTransferParametersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $domainName = 'domainName104118566'; - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->retrieveTransferParameters($domainName, $formattedLocation); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchDomainsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SearchDomainsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $query = 'query107944136'; - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->searchDomains($query, $formattedLocation); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1alpha2.Domains/SearchDomains', $actualFuncCall); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $actualValue = $actualRequestObject->getLocation(); - $this->assertProtobufEquals($formattedLocation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchDomainsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $query = 'query107944136'; - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->searchDomains($query, $formattedLocation); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function transferDomainTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/transferDomainTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name); - $expectedResponse->setDomainName($domainName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/transferDomainTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $registration = new Registration(); - $registrationDomainName = 'registrationDomainName1873916680'; - $registration->setDomainName($registrationDomainName); - $registrationContactSettings = new ContactSettings(); - $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; - $registrationContactSettings->setPrivacy($contactSettingsPrivacy); - $contactSettingsRegistrantContact = new Contact(); - $registrantContactPostalAddress = new PostalAddress(); - $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); - $registrantContactEmail = 'registrantContactEmail1001340839'; - $contactSettingsRegistrantContact->setEmail($registrantContactEmail); - $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; - $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); - $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); - $contactSettingsAdminContact = new Contact(); - $adminContactPostalAddress = new PostalAddress(); - $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); - $adminContactEmail = 'adminContactEmail1687004235'; - $contactSettingsAdminContact->setEmail($adminContactEmail); - $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; - $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); - $registrationContactSettings->setAdminContact($contactSettingsAdminContact); - $contactSettingsTechnicalContact = new Contact(); - $technicalContactPostalAddress = new PostalAddress(); - $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); - $technicalContactEmail = 'technicalContactEmail-221168807'; - $contactSettingsTechnicalContact->setEmail($technicalContactEmail); - $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; - $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); - $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); - $registration->setContactSettings($registrationContactSettings); - $yearlyPrice = new Money(); - $response = $gapicClient->transferDomain($formattedParent, $registration, $yearlyPrice); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1alpha2.Domains/TransferDomain', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRegistration(); - $this->assertProtobufEquals($registration, $actualValue); - $actualValue = $actualApiRequestObject->getYearlyPrice(); - $this->assertProtobufEquals($yearlyPrice, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/transferDomainTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function transferDomainExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/transferDomainTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $registration = new Registration(); - $registrationDomainName = 'registrationDomainName1873916680'; - $registration->setDomainName($registrationDomainName); - $registrationContactSettings = new ContactSettings(); - $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; - $registrationContactSettings->setPrivacy($contactSettingsPrivacy); - $contactSettingsRegistrantContact = new Contact(); - $registrantContactPostalAddress = new PostalAddress(); - $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); - $registrantContactEmail = 'registrantContactEmail1001340839'; - $contactSettingsRegistrantContact->setEmail($registrantContactEmail); - $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; - $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); - $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); - $contactSettingsAdminContact = new Contact(); - $adminContactPostalAddress = new PostalAddress(); - $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); - $adminContactEmail = 'adminContactEmail1687004235'; - $contactSettingsAdminContact->setEmail($adminContactEmail); - $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; - $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); - $registrationContactSettings->setAdminContact($contactSettingsAdminContact); - $contactSettingsTechnicalContact = new Contact(); - $technicalContactPostalAddress = new PostalAddress(); - $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); - $technicalContactEmail = 'technicalContactEmail-221168807'; - $contactSettingsTechnicalContact->setEmail($technicalContactEmail); - $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; - $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); - $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); - $registration->setContactSettings($registrationContactSettings); - $yearlyPrice = new Money(); - $response = $gapicClient->transferDomain($formattedParent, $registration, $yearlyPrice); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/transferDomainTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateRegistrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateRegistrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name); - $expectedResponse->setDomainName($domainName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateRegistrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $response = $gapicClient->updateRegistration($updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1alpha2.Domains/UpdateRegistration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRegistrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateRegistrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateRegistrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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(); - $response = $gapicClient->updateRegistration($updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRegistrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/GPBMetadata/Google/Cloud/Domains/V1Beta1/Domains.php b/owl-bot-staging/Domains/v1beta1/proto/src/GPBMetadata/Google/Cloud/Domains/V1Beta1/Domains.php deleted file mode 100644 index 824429d87b60c75a7eeeeb97652f117c05ca5d9c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13146 zcmd5@O>7&-6%I-L@kyeo@lR;w$MiZuY(*w3`X{y=Cs~mziLpeo{Bayt=wd~#sEx@b zyStRF1V(`ZMGx(z@TEXe6b0H#fL?lPiynF?dN7bnd#W#WfnHh^J@nF|Xo|j>*qTBmXYgdgnjfT}IH)_%C*3OP< zM9YnOQ>&>)EE-K^qnT_mDy7oJvq)+-T1Hu2j#e9uYE6xoYmHVVUTM@7O*i9vOWUfY zEIHp}j4gn!)K#;ol-1~3ZeDhf|lAtE%N1k&c|dU@uGAX*<#L zT*l?)9wBc=Eu*D+SC2*w)oK~~4JJ2b@X-CV)yHCDQ`-`Cy+N(e(9PxLwoYvp2N5P~ znyOo)(X47}t+Jx-DtlVP7>zWq+72_ckQ)uXYP57+)2mzACUw)%lyvuwNxi9<_lB3) zr7ddcv6fPA4o_R$Z>n3H4PD(IktWx`m1<(8VyNZ;o5}q1;yaq{jX2kJzEup<^RBy4 z=XnD@{VFUBAD`r9J~zfDHGJE1@PbQv<{-@$N zxeU`~L&YpBQ>h{Wd^nw$k8#cUBB)f%bv4cssniEe&9JE^hNDWsI88WeWD@6x5?^vw z>AR&duUfGJrQ>T$Frk@dOEn`?(ZGmo(v*<1S%rz3vaQz4ND$dfC$5el%?2Zsbj#Q$ zn{d3Y=t@$Q-9(J2`(5ro9_74S{>=J`Vsg3*&oAt))ho*Dw38`GlYNV4S%VISF%xqF9vV zQl^lTlIhj7lnTE^is=m`@skq}#@U&| zs+4!92gq?a=8oD^#|XfLm@KAmOW_HWE?6kx(wP);nItnXCEdwo^F{nNC8S}TxhoYj zT_}{g#YFDOY^I3Jh%Zz_we|i|NHOjoa#XoUAK8zclq=S>aUmptJ_XFwU+h2i@fj!-Qr6$)^ zYqwEh=_ZtT=kPu6<%GF`vB544x$t=2fa910brTyy8O6LO^Hej2P8v$Y4_~2Z6K)_K za}D7x%yz6nUWNI*l#xCVH{?yJxSmaQISp=-SSn^W(PfgdJrnnXKxk9Ul#t39^9#QP znD$0&8r#U0X*KFHMn3b~>BObO1@@4~l8hEd)?XlZfbiXw?agK^sqarGmWOA##+u#~ z?{+!o_hF`raU>gRxnWey$QVnSmq*}<)OkicuS3uknw*9iT9z>58GEWh^$+mEdj@I3d~ z7)&`jkz+84Sx&Z;D)X3el7*mBt2PYH+O4x}7fQT6iqzazG11{c^4KEilkS9oF8%ooJX)D?`W3Gk=Z zG3ic1AXN~<0s28oCc|T78YXd8VO?AbkCQOW;Nwg|N?u|k6Er#6kK3b@Gzs(3#FeYz zsrJ_^ONlU0mdJZ8TPTKSXhN5g$TWvjktZdXZ4X|$b{Plp|8R(rr4m=JEL{&DBS9FK zQkO4Z3x|>WR2r*EUP>0j|MB52LN1@ajWsBhDTF`w4rJ4*@PB>6hX5Y?y#z0&(rZ$o zC>KA>br*yw7-Ne1XpOPO^V6b2rN4A}X$eimpHLac=8FJpZcvg_5ZuKMllO>j_vpv* zkk;J0?DU=3cF{l#+T&L}I*?kX- zsp-U(!vmm8oS6NcXM-=ptWv3Ky33Mx+ecwpf;meq@9J6^i>f0jjjba|I{!@{OxmK8 zw;=8RnblXn7qb(4cr|V*V6d8Gg5j z1T%b7_@UPh&4t55lS{!VxW}wOh_^{H!crWwnm}E zn};YQ8;;fK!AHS!!!ReU439-@<-XY zAPh?o3UF#o?XW`I2wn{CO;&|oAL{%qJo3TmQj-R@R|tpkdtG^tR)*<8>B`H9!hJ2q zUZw!0ojBb}?jV#g7nNrDM);c#1WZ^vTD4`Uy~lA!Jh6{>!Ie?;KL}0ZC)feir&q9U zbq_)}yVU)=4_m8u{C;>tFrqmiXozI!C3Q?yS z?8*F&*hi0NVH;k-%Qe;dBG>p)00_5^x0%LsdB?Q}>!L{kW|TcVlPKF-O|$k{0t_Vv zpc=i*W1@!%S?dR9^I|{J=@SpH-3=-4B?r{2j)wI7u&t!<5zKU`@iIij+XxtoE9s4N z@xv|z24NEW>4t=-^kXnx%Crake82{x@f;tZ5J)L=E0g^o6CPuTu+yovd(!@UbQl zSog*pSNN3==G=>B=j{X%@4UU^{XlOycW>{=B23|R4!`T;srRti*lSsefo~Dmy%&mv z80|Liyl63@7-`FtEBH19p7UuY4AMQt^R-ODT)Y!!N0Z>f*CAxr75nOjoWUAvUtcf? zEZOaFc-g|hpQP-}ONm9114K4x*7?MbnC{8El)@VkDb@KXuzl~sFx@8`K#>~I>>h)!Z{dj; z<)n*F+NUqoEP8>F$Ku)U_Z?hW+@$Dr2q&sMHD^eN=%sW_GNeQFWANM^qIZ#l9OB!4 z2syKdbBNB_j`jl_;>SmI2+O{UWe#y^kV7mg-nz-)j-h zAnBiD`q0^qu*Rb28oByx(ep&KAyo299~|pKBglZu*{eYcsy^@QKK967ns4U7#2AAOo!0OW~+6z(v2uU9^x$wyo|JEjEe{%NT%ETy`)3h=I7itvT(P*ZHC?2uxMndx;eyTyv<&9IT}^HV=W zTwU=4eMQUxdB}hh@IiD#+UaN9PFq{T2hYo`x)fl>y3k>)GFS209qLa$AibE*ptRIW zF{F`9mP}WKn{5+~l!)+!OoX49Ay`@+D&agu9eeSmK|1zQ45=gUgs&}l>fIc6Q~fbGa^vvK*q`dCnhT{PYu*n~WRBmV`TYBj#Z&xD)P3>)J2AFv zSxs{}9>0J8zHJ5ftpM6n^52YHY}OQOr(x7r?gRa~$)WaIu@MF{M}L@+^W9C_K3Z+m z6ula27}a=H)!8LWoIj#V_WyOt4O{T-2{!-I8}8fli~OeHq)$ diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/AuthorizationCode.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/AuthorizationCode.php deleted file mode 100644 index 18a20a20e223..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/AuthorizationCode.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.domains.v1beta1.AuthorizationCode - */ -class AuthorizationCode extends \Google\Protobuf\Internal\Message -{ - /** - * The Authorization Code in ASCII. It can be used to transfer the domain - * to or from another registrar. - * - * Generated from protobuf field string code = 1; - */ - protected $code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $code - * The Authorization Code in ASCII. It can be used to transfer the domain - * to or from another registrar. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * The Authorization Code in ASCII. It can be used to transfer the domain - * to or from another registrar. - * - * Generated from protobuf field string code = 1; - * @return string - */ - public function getCode() - { - return $this->code; - } - - /** - * The Authorization Code in ASCII. It can be used to transfer the domain - * to or from another registrar. - * - * 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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureContactSettingsRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureContactSettingsRequest.php deleted file mode 100644 index a6eb4ec7efc6..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureContactSettingsRequest.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.domains.v1beta1.ConfigureContactSettingsRequest - */ -class ConfigureContactSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` whose contact settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $registration = ''; - /** - * Fields of the `ContactSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings contact_settings = 2; - */ - protected $contact_settings = null; - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the registrant contact is being updated, the - * `update_mask` is `"registrant_contact"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in `contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 4; - */ - private $contact_notices; - /** - * Validate the request without actually updating the contact settings. - * - * Generated from protobuf field bool validate_only = 5; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $registration - * Required. The name of the `Registration` whose contact settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * @type \Google\Cloud\Domains\V1beta1\ContactSettings $contact_settings - * Fields of the `ContactSettings` to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the registrant contact is being updated, the - * `update_mask` is `"registrant_contact"`. - * @type array|\Google\Protobuf\Internal\RepeatedField $contact_notices - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in `contact_settings`. - * @type bool $validate_only - * Validate the request without actually updating the contact settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` whose contact settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getRegistration() - { - return $this->registration; - } - - /** - * Required. The name of the `Registration` whose contact settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkString($var, True); - $this->registration = $var; - - return $this; - } - - /** - * Fields of the `ContactSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings contact_settings = 2; - * @return \Google\Cloud\Domains\V1beta1\ContactSettings|null - */ - public function getContactSettings() - { - return $this->contact_settings; - } - - public function hasContactSettings() - { - return isset($this->contact_settings); - } - - public function clearContactSettings() - { - unset($this->contact_settings); - } - - /** - * Fields of the `ContactSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings contact_settings = 2; - * @param \Google\Cloud\Domains\V1beta1\ContactSettings $var - * @return $this - */ - public function setContactSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ContactSettings::class); - $this->contact_settings = $var; - - return $this; - } - - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the registrant contact is being updated, the - * `update_mask` is `"registrant_contact"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 describing which fields to update as a comma-separated list. - * For example, if only the registrant contact is being updated, the - * `update_mask` is `"registrant_contact"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in `contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContactNotices() - { - return $this->contact_notices; - } - - /** - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in `contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContactNotices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\ContactNotice::class); - $this->contact_notices = $arr; - - return $this; - } - - /** - * Validate the request without actually updating the contact settings. - * - * Generated from protobuf field bool validate_only = 5; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Validate the request without actually updating the contact settings. - * - * Generated from protobuf field bool validate_only = 5; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureDnsSettingsRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureDnsSettingsRequest.php deleted file mode 100644 index 08d2543b1b9d..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureDnsSettingsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.domains.v1beta1.ConfigureDnsSettingsRequest - */ -class ConfigureDnsSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` whose DNS settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $registration = ''; - /** - * Fields of the `DnsSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings dns_settings = 2; - */ - protected $dns_settings = null; - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the name servers are being updated for an existing - * Custom DNS configuration, the `update_mask` is - * `"custom_dns.name_servers"`. - * When changing the DNS provider from one type to another, pass the new - * provider's field name as part of the field mask. For example, when changing - * from a Google Domains DNS configuration to a Custom DNS configuration, the - * `update_mask` is `"custom_dns"`. // - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Validate the request without actually updating the DNS settings. - * - * Generated from protobuf field bool validate_only = 4; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $registration - * Required. The name of the `Registration` whose DNS settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * @type \Google\Cloud\Domains\V1beta1\DnsSettings $dns_settings - * Fields of the `DnsSettings` to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the name servers are being updated for an existing - * Custom DNS configuration, the `update_mask` is - * `"custom_dns.name_servers"`. - * When changing the DNS provider from one type to another, pass the new - * provider's field name as part of the field mask. For example, when changing - * from a Google Domains DNS configuration to a Custom DNS configuration, the - * `update_mask` is `"custom_dns"`. // - * @type bool $validate_only - * Validate the request without actually updating the DNS settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` whose DNS settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getRegistration() - { - return $this->registration; - } - - /** - * Required. The name of the `Registration` whose DNS settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkString($var, True); - $this->registration = $var; - - return $this; - } - - /** - * Fields of the `DnsSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings dns_settings = 2; - * @return \Google\Cloud\Domains\V1beta1\DnsSettings|null - */ - public function getDnsSettings() - { - return $this->dns_settings; - } - - public function hasDnsSettings() - { - return isset($this->dns_settings); - } - - public function clearDnsSettings() - { - unset($this->dns_settings); - } - - /** - * Fields of the `DnsSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings dns_settings = 2; - * @param \Google\Cloud\Domains\V1beta1\DnsSettings $var - * @return $this - */ - public function setDnsSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\DnsSettings::class); - $this->dns_settings = $var; - - return $this; - } - - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the name servers are being updated for an existing - * Custom DNS configuration, the `update_mask` is - * `"custom_dns.name_servers"`. - * When changing the DNS provider from one type to another, pass the new - * provider's field name as part of the field mask. For example, when changing - * from a Google Domains DNS configuration to a Custom DNS configuration, the - * `update_mask` is `"custom_dns"`. // - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 describing which fields to update as a comma-separated list. - * For example, if only the name servers are being updated for an existing - * Custom DNS configuration, the `update_mask` is - * `"custom_dns.name_servers"`. - * When changing the DNS provider from one type to another, pass the new - * provider's field name as part of the field mask. For example, when changing - * from a Google Domains DNS configuration to a Custom DNS configuration, the - * `update_mask` is `"custom_dns"`. // - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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; - } - - /** - * Validate the request without actually updating the DNS settings. - * - * Generated from protobuf field bool validate_only = 4; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Validate the request without actually updating the DNS settings. - * - * Generated from protobuf field bool validate_only = 4; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureManagementSettingsRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureManagementSettingsRequest.php deleted file mode 100644 index f19dfe7e7121..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ConfigureManagementSettingsRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.domains.v1beta1.ConfigureManagementSettingsRequest - */ -class ConfigureManagementSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` whose management settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $registration = ''; - /** - * Fields of the `ManagementSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings management_settings = 2; - */ - protected $management_settings = null; - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the transfer lock is being updated, the `update_mask` - * is `"transfer_lock_state"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $registration - * Required. The name of the `Registration` whose management settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * @type \Google\Cloud\Domains\V1beta1\ManagementSettings $management_settings - * Fields of the `ManagementSettings` to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the transfer lock is being updated, the `update_mask` - * is `"transfer_lock_state"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` whose management settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getRegistration() - { - return $this->registration; - } - - /** - * Required. The name of the `Registration` whose management settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkString($var, True); - $this->registration = $var; - - return $this; - } - - /** - * Fields of the `ManagementSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings management_settings = 2; - * @return \Google\Cloud\Domains\V1beta1\ManagementSettings|null - */ - public function getManagementSettings() - { - return $this->management_settings; - } - - public function hasManagementSettings() - { - return isset($this->management_settings); - } - - public function clearManagementSettings() - { - unset($this->management_settings); - } - - /** - * Fields of the `ManagementSettings` to update. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings management_settings = 2; - * @param \Google\Cloud\Domains\V1beta1\ManagementSettings $var - * @return $this - */ - public function setManagementSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ManagementSettings::class); - $this->management_settings = $var; - - return $this; - } - - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the transfer lock is being updated, the `update_mask` - * is `"transfer_lock_state"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 describing which fields to update as a comma-separated list. - * For example, if only the transfer lock is being updated, the `update_mask` - * is `"transfer_lock_state"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactNotice.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactNotice.php deleted file mode 100644 index 95d19bbb5b3b..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactNotice.php +++ /dev/null @@ -1,55 +0,0 @@ -google.cloud.domains.v1beta1.ContactNotice - */ -class ContactNotice -{ - /** - * The notice is undefined. - * - * Generated from protobuf enum CONTACT_NOTICE_UNSPECIFIED = 0; - */ - const CONTACT_NOTICE_UNSPECIFIED = 0; - /** - * Required when setting the `privacy` field of `ContactSettings` to - * `PUBLIC_CONTACT_DATA`, which exposes contact data publicly. - * - * Generated from protobuf enum PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT = 1; - */ - const PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT = 1; - - private static $valueToName = [ - self::CONTACT_NOTICE_UNSPECIFIED => 'CONTACT_NOTICE_UNSPECIFIED', - self::PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT => 'PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactPrivacy.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactPrivacy.php deleted file mode 100644 index 9324a94243e1..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactPrivacy.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.domains.v1beta1.ContactPrivacy - */ -class ContactPrivacy -{ - /** - * The contact privacy settings are undefined. - * - * Generated from protobuf enum CONTACT_PRIVACY_UNSPECIFIED = 0; - */ - const CONTACT_PRIVACY_UNSPECIFIED = 0; - /** - * All the data from `ContactSettings` is publicly available. When setting - * this option, you must also provide a - * `PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT` in the `contact_notices` field of the - * request. - * - * Generated from protobuf enum PUBLIC_CONTACT_DATA = 1; - */ - const PUBLIC_CONTACT_DATA = 1; - /** - * None of the data from `ContactSettings` is publicly available. Instead, - * proxy contact data is published for your domain. Email sent to the proxy - * email address is forwarded to the registrant's email address. Cloud Domains - * provides this privacy proxy service at no additional cost. - * - * Generated from protobuf enum PRIVATE_CONTACT_DATA = 2; - */ - const PRIVATE_CONTACT_DATA = 2; - /** - * Some data from `ContactSettings` is publicly available. The actual - * information redacted depends on the domain. For details, see [the - * registration privacy - * article](https://support.google.com/domains/answer/3251242). - * - * Generated from protobuf enum REDACTED_CONTACT_DATA = 3; - */ - const REDACTED_CONTACT_DATA = 3; - - private static $valueToName = [ - self::CONTACT_PRIVACY_UNSPECIFIED => 'CONTACT_PRIVACY_UNSPECIFIED', - self::PUBLIC_CONTACT_DATA => 'PUBLIC_CONTACT_DATA', - self::PRIVATE_CONTACT_DATA => 'PRIVATE_CONTACT_DATA', - self::REDACTED_CONTACT_DATA => 'REDACTED_CONTACT_DATA', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings.php deleted file mode 100644 index 49086fe471b0..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings.php +++ /dev/null @@ -1,222 +0,0 @@ -google.cloud.domains.v1beta1.ContactSettings - */ -class ContactSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Privacy setting for the contacts associated with the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactPrivacy privacy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $privacy = 0; - /** - * Required. The registrant contact for the `Registration`. - * *Caution: Anyone with access to this email address, phone number, - * and/or postal address can take control of the domain.* - * *Warning: For new `Registration`s, the registrant receives an email - * confirmation that they must complete within 15 days to avoid domain - * suspension.* - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact registrant_contact = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $registrant_contact = null; - /** - * Required. The administrative contact for the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact admin_contact = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $admin_contact = null; - /** - * Required. The technical contact for the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact technical_contact = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $technical_contact = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $privacy - * Required. Privacy setting for the contacts associated with the `Registration`. - * @type \Google\Cloud\Domains\V1beta1\ContactSettings\Contact $registrant_contact - * Required. The registrant contact for the `Registration`. - * *Caution: Anyone with access to this email address, phone number, - * and/or postal address can take control of the domain.* - * *Warning: For new `Registration`s, the registrant receives an email - * confirmation that they must complete within 15 days to avoid domain - * suspension.* - * @type \Google\Cloud\Domains\V1beta1\ContactSettings\Contact $admin_contact - * Required. The administrative contact for the `Registration`. - * @type \Google\Cloud\Domains\V1beta1\ContactSettings\Contact $technical_contact - * Required. The technical contact for the `Registration`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. Privacy setting for the contacts associated with the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactPrivacy privacy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getPrivacy() - { - return $this->privacy; - } - - /** - * Required. Privacy setting for the contacts associated with the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactPrivacy privacy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setPrivacy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\ContactPrivacy::class); - $this->privacy = $var; - - return $this; - } - - /** - * Required. The registrant contact for the `Registration`. - * *Caution: Anyone with access to this email address, phone number, - * and/or postal address can take control of the domain.* - * *Warning: For new `Registration`s, the registrant receives an email - * confirmation that they must complete within 15 days to avoid domain - * suspension.* - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact registrant_contact = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Domains\V1beta1\ContactSettings\Contact|null - */ - public function getRegistrantContact() - { - return $this->registrant_contact; - } - - public function hasRegistrantContact() - { - return isset($this->registrant_contact); - } - - public function clearRegistrantContact() - { - unset($this->registrant_contact); - } - - /** - * Required. The registrant contact for the `Registration`. - * *Caution: Anyone with access to this email address, phone number, - * and/or postal address can take control of the domain.* - * *Warning: For new `Registration`s, the registrant receives an email - * confirmation that they must complete within 15 days to avoid domain - * suspension.* - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact registrant_contact = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Domains\V1beta1\ContactSettings\Contact $var - * @return $this - */ - public function setRegistrantContact($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ContactSettings\Contact::class); - $this->registrant_contact = $var; - - return $this; - } - - /** - * Required. The administrative contact for the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact admin_contact = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Domains\V1beta1\ContactSettings\Contact|null - */ - public function getAdminContact() - { - return $this->admin_contact; - } - - public function hasAdminContact() - { - return isset($this->admin_contact); - } - - public function clearAdminContact() - { - unset($this->admin_contact); - } - - /** - * Required. The administrative contact for the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact admin_contact = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Domains\V1beta1\ContactSettings\Contact $var - * @return $this - */ - public function setAdminContact($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ContactSettings\Contact::class); - $this->admin_contact = $var; - - return $this; - } - - /** - * Required. The technical contact for the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact technical_contact = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Domains\V1beta1\ContactSettings\Contact|null - */ - public function getTechnicalContact() - { - return $this->technical_contact; - } - - public function hasTechnicalContact() - { - return isset($this->technical_contact); - } - - public function clearTechnicalContact() - { - unset($this->technical_contact); - } - - /** - * Required. The technical contact for the `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings.Contact technical_contact = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Domains\V1beta1\ContactSettings\Contact $var - * @return $this - */ - public function setTechnicalContact($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ContactSettings\Contact::class); - $this->technical_contact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings/Contact.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings/Contact.php deleted file mode 100644 index 2836ffe5f282..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings/Contact.php +++ /dev/null @@ -1,190 +0,0 @@ -google.cloud.domains.v1beta1.ContactSettings.Contact - */ -class Contact extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Postal address of the contact. - * - * Generated from protobuf field .google.type.PostalAddress postal_address = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $postal_address = null; - /** - * Required. Email address of the contact. - * - * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $email = ''; - /** - * Required. Phone number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * - * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $phone_number = ''; - /** - * Fax number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * - * Generated from protobuf field string fax_number = 4; - */ - protected $fax_number = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\PostalAddress $postal_address - * Required. Postal address of the contact. - * @type string $email - * Required. Email address of the contact. - * @type string $phone_number - * Required. Phone number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * @type string $fax_number - * Fax number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. Postal address of the contact. - * - * Generated from protobuf field .google.type.PostalAddress postal_address = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\PostalAddress|null - */ - public function getPostalAddress() - { - return $this->postal_address; - } - - public function hasPostalAddress() - { - return isset($this->postal_address); - } - - public function clearPostalAddress() - { - unset($this->postal_address); - } - - /** - * Required. Postal address of the contact. - * - * Generated from protobuf field .google.type.PostalAddress postal_address = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\PostalAddress $var - * @return $this - */ - public function setPostalAddress($var) - { - GPBUtil::checkMessage($var, \Google\Type\PostalAddress::class); - $this->postal_address = $var; - - return $this; - } - - /** - * Required. Email address of the contact. - * - * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Required. Email address of the contact. - * - * Generated from protobuf field string email = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - - /** - * Required. Phone number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * - * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPhoneNumber() - { - return $this->phone_number; - } - - /** - * Required. Phone number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * - * Generated from protobuf field string phone_number = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPhoneNumber($var) - { - GPBUtil::checkString($var, True); - $this->phone_number = $var; - - return $this; - } - - /** - * Fax number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * - * Generated from protobuf field string fax_number = 4; - * @return string - */ - public function getFaxNumber() - { - return $this->fax_number; - } - - /** - * Fax number of the contact in international format. For example, - * `"+1-800-555-0123"`. - * - * Generated from protobuf field string fax_number = 4; - * @param string $var - * @return $this - */ - public function setFaxNumber($var) - { - GPBUtil::checkString($var, True); - $this->fax_number = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Contact::class, \Google\Cloud\Domains\V1beta1\ContactSettings_Contact::class); - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings_Contact.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings_Contact.php deleted file mode 100644 index 1dde8a4b83d0..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ContactSettings_Contact.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.domains.v1beta1.DeleteRegistrationRequest - */ -class DeleteRegistrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` to delete, - * in the format `projects/*/locations/*/registrations/*`. - * - * 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 name of the `Registration` to delete, - * in the format `projects/*/locations/*/registrations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` to delete, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated 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 `Registration` to delete, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings.php deleted file mode 100644 index bb2f49d3e819..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.domains.v1beta1.DnsSettings - */ -class DnsSettings extends \Google\Protobuf\Internal\Message -{ - /** - * The list of glue records for this `Registration`. Commonly empty. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.GlueRecord glue_records = 4; - */ - private $glue_records; - protected $dns_provider; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Domains\V1beta1\DnsSettings\CustomDns $custom_dns - * An arbitrary DNS provider identified by its name servers. - * @type \Google\Cloud\Domains\V1beta1\DnsSettings\GoogleDomainsDns $google_domains_dns - * The free DNS zone provided by - * [Google Domains](https://domains.google/). - * @type array<\Google\Cloud\Domains\V1beta1\DnsSettings\GlueRecord>|\Google\Protobuf\Internal\RepeatedField $glue_records - * The list of glue records for this `Registration`. Commonly empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * An arbitrary DNS provider identified by its name servers. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.CustomDns custom_dns = 1; - * @return \Google\Cloud\Domains\V1beta1\DnsSettings\CustomDns|null - */ - public function getCustomDns() - { - return $this->readOneof(1); - } - - public function hasCustomDns() - { - return $this->hasOneof(1); - } - - /** - * An arbitrary DNS provider identified by its name servers. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.CustomDns custom_dns = 1; - * @param \Google\Cloud\Domains\V1beta1\DnsSettings\CustomDns $var - * @return $this - */ - public function setCustomDns($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\DnsSettings\CustomDns::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The free DNS zone provided by - * [Google Domains](https://domains.google/). - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.GoogleDomainsDns google_domains_dns = 2; - * @return \Google\Cloud\Domains\V1beta1\DnsSettings\GoogleDomainsDns|null - */ - public function getGoogleDomainsDns() - { - return $this->readOneof(2); - } - - public function hasGoogleDomainsDns() - { - return $this->hasOneof(2); - } - - /** - * The free DNS zone provided by - * [Google Domains](https://domains.google/). - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.GoogleDomainsDns google_domains_dns = 2; - * @param \Google\Cloud\Domains\V1beta1\DnsSettings\GoogleDomainsDns $var - * @return $this - */ - public function setGoogleDomainsDns($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\DnsSettings\GoogleDomainsDns::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The list of glue records for this `Registration`. Commonly empty. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.GlueRecord glue_records = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGlueRecords() - { - return $this->glue_records; - } - - /** - * The list of glue records for this `Registration`. Commonly empty. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.GlueRecord glue_records = 4; - * @param array<\Google\Cloud\Domains\V1beta1\DnsSettings\GlueRecord>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGlueRecords($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1beta1\DnsSettings\GlueRecord::class); - $this->glue_records = $arr; - - return $this; - } - - /** - * @return string - */ - public function getDnsProvider() - { - return $this->whichOneof("dns_provider"); - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/CustomDns.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/CustomDns.php deleted file mode 100644 index 1650693d6a8d..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/CustomDns.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.domains.v1beta1.DnsSettings.CustomDns - */ -class CustomDns extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. - * - * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $name_servers; - /** - * The list of DS records for this domain, which are used to enable DNSSEC. - * The domain's DNS provider can provide the values to set here. If this - * field is empty, DNSSEC is disabled. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.DsRecord ds_records = 2; - */ - private $ds_records; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $name_servers - * Required. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. - * @type array<\Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $ds_records - * The list of DS records for this domain, which are used to enable DNSSEC. - * The domain's DNS provider can provide the values to set here. If this - * field is empty, DNSSEC is disabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. - * - * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNameServers() - { - return $this->name_servers; - } - - /** - * Required. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. - * - * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNameServers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->name_servers = $arr; - - return $this; - } - - /** - * The list of DS records for this domain, which are used to enable DNSSEC. - * The domain's DNS provider can provide the values to set here. If this - * field is empty, DNSSEC is disabled. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.DsRecord ds_records = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDsRecords() - { - return $this->ds_records; - } - - /** - * The list of DS records for this domain, which are used to enable DNSSEC. - * The domain's DNS provider can provide the values to set here. If this - * field is empty, DNSSEC is disabled. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.DsRecord ds_records = 2; - * @param array<\Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDsRecords($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord::class); - $this->ds_records = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CustomDns::class, \Google\Cloud\Domains\V1beta1\DnsSettings_CustomDns::class); - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord.php deleted file mode 100644 index db8290eefe45..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.domains.v1beta1.DnsSettings.DsRecord - */ -class DsRecord extends \Google\Protobuf\Internal\Message -{ - /** - * The key tag of the record. Must be set in range 0 -- 65535. - * - * Generated from protobuf field int32 key_tag = 1; - */ - protected $key_tag = 0; - /** - * The algorithm used to generate the referenced DNSKEY. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsRecord.Algorithm algorithm = 2; - */ - protected $algorithm = 0; - /** - * The hash function used to generate the digest of the referenced DNSKEY. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsRecord.DigestType digest_type = 3; - */ - protected $digest_type = 0; - /** - * The digest generated from the referenced DNSKEY. - * - * Generated from protobuf field string digest = 4; - */ - protected $digest = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $key_tag - * The key tag of the record. Must be set in range 0 -- 65535. - * @type int $algorithm - * The algorithm used to generate the referenced DNSKEY. - * @type int $digest_type - * The hash function used to generate the digest of the referenced DNSKEY. - * @type string $digest - * The digest generated from the referenced DNSKEY. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * The key tag of the record. Must be set in range 0 -- 65535. - * - * Generated from protobuf field int32 key_tag = 1; - * @return int - */ - public function getKeyTag() - { - return $this->key_tag; - } - - /** - * The key tag of the record. Must be set in range 0 -- 65535. - * - * Generated from protobuf field int32 key_tag = 1; - * @param int $var - * @return $this - */ - public function setKeyTag($var) - { - GPBUtil::checkInt32($var); - $this->key_tag = $var; - - return $this; - } - - /** - * The algorithm used to generate the referenced DNSKEY. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsRecord.Algorithm algorithm = 2; - * @return int - */ - public function getAlgorithm() - { - return $this->algorithm; - } - - /** - * The algorithm used to generate the referenced DNSKEY. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsRecord.Algorithm algorithm = 2; - * @param int $var - * @return $this - */ - public function setAlgorithm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord\Algorithm::class); - $this->algorithm = $var; - - return $this; - } - - /** - * The hash function used to generate the digest of the referenced DNSKEY. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsRecord.DigestType digest_type = 3; - * @return int - */ - public function getDigestType() - { - return $this->digest_type; - } - - /** - * The hash function used to generate the digest of the referenced DNSKEY. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsRecord.DigestType digest_type = 3; - * @param int $var - * @return $this - */ - public function setDigestType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord\DigestType::class); - $this->digest_type = $var; - - return $this; - } - - /** - * The digest generated from the referenced DNSKEY. - * - * Generated from protobuf field string digest = 4; - * @return string - */ - public function getDigest() - { - return $this->digest; - } - - /** - * The digest generated from the referenced DNSKEY. - * - * Generated from protobuf field string digest = 4; - * @param string $var - * @return $this - */ - public function setDigest($var) - { - GPBUtil::checkString($var, True); - $this->digest = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DsRecord::class, \Google\Cloud\Domains\V1beta1\DnsSettings_DsRecord::class); - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/Algorithm.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/Algorithm.php deleted file mode 100644 index 8685ec7b55b0..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/Algorithm.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.domains.v1beta1.DnsSettings.DsRecord.Algorithm - */ -class Algorithm -{ - /** - * The algorithm is unspecified. - * - * Generated from protobuf enum ALGORITHM_UNSPECIFIED = 0; - */ - const ALGORITHM_UNSPECIFIED = 0; - /** - * RSA/MD5. Cannot be used for new deployments. - * - * Generated from protobuf enum RSAMD5 = 1; - */ - const RSAMD5 = 1; - /** - * Diffie-Hellman. Cannot be used for new deployments. - * - * Generated from protobuf enum DH = 2; - */ - const DH = 2; - /** - * DSA/SHA1. Not recommended for new deployments. - * - * Generated from protobuf enum DSA = 3; - */ - const DSA = 3; - /** - * ECC. Not recommended for new deployments. - * - * Generated from protobuf enum ECC = 4; - */ - const ECC = 4; - /** - * RSA/SHA-1. Not recommended for new deployments. - * - * Generated from protobuf enum RSASHA1 = 5; - */ - const RSASHA1 = 5; - /** - * DSA-NSEC3-SHA1. Not recommended for new deployments. - * - * Generated from protobuf enum DSANSEC3SHA1 = 6; - */ - const DSANSEC3SHA1 = 6; - /** - * RSA/SHA1-NSEC3-SHA1. Not recommended for new deployments. - * - * Generated from protobuf enum RSASHA1NSEC3SHA1 = 7; - */ - const RSASHA1NSEC3SHA1 = 7; - /** - * RSA/SHA-256. - * - * Generated from protobuf enum RSASHA256 = 8; - */ - const RSASHA256 = 8; - /** - * RSA/SHA-512. - * - * Generated from protobuf enum RSASHA512 = 10; - */ - const RSASHA512 = 10; - /** - * GOST R 34.10-2001. - * - * Generated from protobuf enum ECCGOST = 12; - */ - const ECCGOST = 12; - /** - * ECDSA Curve P-256 with SHA-256. - * - * Generated from protobuf enum ECDSAP256SHA256 = 13; - */ - const ECDSAP256SHA256 = 13; - /** - * ECDSA Curve P-384 with SHA-384. - * - * Generated from protobuf enum ECDSAP384SHA384 = 14; - */ - const ECDSAP384SHA384 = 14; - /** - * Ed25519. - * - * Generated from protobuf enum ED25519 = 15; - */ - const ED25519 = 15; - /** - * Ed448. - * - * Generated from protobuf enum ED448 = 16; - */ - const ED448 = 16; - /** - * Reserved for Indirect Keys. Cannot be used for new deployments. - * - * Generated from protobuf enum INDIRECT = 252; - */ - const INDIRECT = 252; - /** - * Private algorithm. Cannot be used for new deployments. - * - * Generated from protobuf enum PRIVATEDNS = 253; - */ - const PRIVATEDNS = 253; - /** - * Private algorithm OID. Cannot be used for new deployments. - * - * Generated from protobuf enum PRIVATEOID = 254; - */ - const PRIVATEOID = 254; - - private static $valueToName = [ - self::ALGORITHM_UNSPECIFIED => 'ALGORITHM_UNSPECIFIED', - self::RSAMD5 => 'RSAMD5', - self::DH => 'DH', - self::DSA => 'DSA', - self::ECC => 'ECC', - self::RSASHA1 => 'RSASHA1', - self::DSANSEC3SHA1 => 'DSANSEC3SHA1', - self::RSASHA1NSEC3SHA1 => 'RSASHA1NSEC3SHA1', - self::RSASHA256 => 'RSASHA256', - self::RSASHA512 => 'RSASHA512', - self::ECCGOST => 'ECCGOST', - self::ECDSAP256SHA256 => 'ECDSAP256SHA256', - self::ECDSAP384SHA384 => 'ECDSAP384SHA384', - self::ED25519 => 'ED25519', - self::ED448 => 'ED448', - self::INDIRECT => 'INDIRECT', - self::PRIVATEDNS => 'PRIVATEDNS', - self::PRIVATEOID => 'PRIVATEOID', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Algorithm::class, \Google\Cloud\Domains\V1beta1\DnsSettings_DsRecord_Algorithm::class); - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/DigestType.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/DigestType.php deleted file mode 100644 index cdc987629ae4..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsRecord/DigestType.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.domains.v1beta1.DnsSettings.DsRecord.DigestType - */ -class DigestType -{ - /** - * The DigestType is unspecified. - * - * Generated from protobuf enum DIGEST_TYPE_UNSPECIFIED = 0; - */ - const DIGEST_TYPE_UNSPECIFIED = 0; - /** - * SHA-1. Not recommended for new deployments. - * - * Generated from protobuf enum SHA1 = 1; - */ - const SHA1 = 1; - /** - * SHA-256. - * - * Generated from protobuf enum SHA256 = 2; - */ - const SHA256 = 2; - /** - * GOST R 34.11-94. - * - * Generated from protobuf enum GOST3411 = 3; - */ - const GOST3411 = 3; - /** - * SHA-384. - * - * Generated from protobuf enum SHA384 = 4; - */ - const SHA384 = 4; - - private static $valueToName = [ - self::DIGEST_TYPE_UNSPECIFIED => 'DIGEST_TYPE_UNSPECIFIED', - self::SHA1 => 'SHA1', - self::SHA256 => 'SHA256', - self::GOST3411 => 'GOST3411', - self::SHA384 => 'SHA384', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DigestType::class, \Google\Cloud\Domains\V1beta1\DnsSettings_DsRecord_DigestType::class); - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsState.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsState.php deleted file mode 100644 index c201dec2b64e..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/DsState.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.domains.v1beta1.DnsSettings.DsState - */ -class DsState -{ - /** - * DS state is unspecified. - * - * Generated from protobuf enum DS_STATE_UNSPECIFIED = 0; - */ - const DS_STATE_UNSPECIFIED = 0; - /** - * DNSSEC is disabled for this domain. No DS records for this domain are - * published in the parent DNS zone. - * - * Generated from protobuf enum DS_RECORDS_UNPUBLISHED = 1; - */ - const DS_RECORDS_UNPUBLISHED = 1; - /** - * DNSSEC is enabled for this domain. Appropriate DS records for this domain - * are published in the parent DNS zone. This option is valid only if the - * DNS zone referenced in the `Registration`'s `dns_provider` field is - * already DNSSEC-signed. - * - * Generated from protobuf enum DS_RECORDS_PUBLISHED = 2; - */ - const DS_RECORDS_PUBLISHED = 2; - - private static $valueToName = [ - self::DS_STATE_UNSPECIFIED => 'DS_STATE_UNSPECIFIED', - self::DS_RECORDS_UNPUBLISHED => 'DS_RECORDS_UNPUBLISHED', - self::DS_RECORDS_PUBLISHED => 'DS_RECORDS_PUBLISHED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DsState::class, \Google\Cloud\Domains\V1beta1\DnsSettings_DsState::class); - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GlueRecord.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GlueRecord.php deleted file mode 100644 index a6c0d7883c9c..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GlueRecord.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.domains.v1beta1.DnsSettings.GlueRecord - */ -class GlueRecord extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Domain name of the host in Punycode format. - * - * Generated from protobuf field string host_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $host_name = ''; - /** - * List of IPv4 addresses corresponding to this host in the standard decimal - * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and - * `ipv6_address` must be set. - * - * Generated from protobuf field repeated string ipv4_addresses = 2; - */ - private $ipv4_addresses; - /** - * List of IPv6 addresses corresponding to this host in the standard - * hexadecimal format (e.g. `2001:db8::`). At least one of - * `ipv4_address` and `ipv6_address` must be set. - * - * Generated from protobuf field repeated string ipv6_addresses = 3; - */ - private $ipv6_addresses; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $host_name - * Required. Domain name of the host in Punycode format. - * @type array|\Google\Protobuf\Internal\RepeatedField $ipv4_addresses - * List of IPv4 addresses corresponding to this host in the standard decimal - * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and - * `ipv6_address` must be set. - * @type array|\Google\Protobuf\Internal\RepeatedField $ipv6_addresses - * List of IPv6 addresses corresponding to this host in the standard - * hexadecimal format (e.g. `2001:db8::`). At least one of - * `ipv4_address` and `ipv6_address` must be set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. Domain name of the host in Punycode format. - * - * Generated from protobuf field string host_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHostName() - { - return $this->host_name; - } - - /** - * Required. Domain name of the host in Punycode format. - * - * Generated from protobuf field string host_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHostName($var) - { - GPBUtil::checkString($var, True); - $this->host_name = $var; - - return $this; - } - - /** - * List of IPv4 addresses corresponding to this host in the standard decimal - * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and - * `ipv6_address` must be set. - * - * Generated from protobuf field repeated string ipv4_addresses = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpv4Addresses() - { - return $this->ipv4_addresses; - } - - /** - * List of IPv4 addresses corresponding to this host in the standard decimal - * format (e.g. `198.51.100.1`). At least one of `ipv4_address` and - * `ipv6_address` must be set. - * - * Generated from protobuf field repeated string ipv4_addresses = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpv4Addresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ipv4_addresses = $arr; - - return $this; - } - - /** - * List of IPv6 addresses corresponding to this host in the standard - * hexadecimal format (e.g. `2001:db8::`). At least one of - * `ipv4_address` and `ipv6_address` must be set. - * - * Generated from protobuf field repeated string ipv6_addresses = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpv6Addresses() - { - return $this->ipv6_addresses; - } - - /** - * List of IPv6 addresses corresponding to this host in the standard - * hexadecimal format (e.g. `2001:db8::`). At least one of - * `ipv4_address` and `ipv6_address` must be set. - * - * Generated from protobuf field repeated string ipv6_addresses = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpv6Addresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ipv6_addresses = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GlueRecord::class, \Google\Cloud\Domains\V1beta1\DnsSettings_GlueRecord::class); - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GoogleDomainsDns.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GoogleDomainsDns.php deleted file mode 100644 index 630f80b1f07e..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings/GoogleDomainsDns.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.domains.v1beta1.DnsSettings.GoogleDomainsDns - */ -class GoogleDomainsDns extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. This field is automatically populated with the name - * servers assigned to the Google Domains DNS zone. - * - * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $name_servers; - /** - * Required. The state of DS records for this domain. Used to enable or disable - * automatic DNSSEC. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsState ds_state = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ds_state = 0; - /** - * Output only. The list of DS records published for this domain. The list is - * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, - * otherwise it remains empty. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.DsRecord ds_records = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $ds_records; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $name_servers - * Output only. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. This field is automatically populated with the name - * servers assigned to the Google Domains DNS zone. - * @type int $ds_state - * Required. The state of DS records for this domain. Used to enable or disable - * automatic DNSSEC. - * @type array<\Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $ds_records - * Output only. The list of DS records published for this domain. The list is - * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, - * otherwise it remains empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Output only. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. This field is automatically populated with the name - * servers assigned to the Google Domains DNS zone. - * - * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNameServers() - { - return $this->name_servers; - } - - /** - * Output only. A list of name servers that store the DNS zone for this domain. Each name - * server is a domain name, with Unicode domain names expressed in - * Punycode format. This field is automatically populated with the name - * servers assigned to the Google Domains DNS zone. - * - * Generated from protobuf field repeated string name_servers = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNameServers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->name_servers = $arr; - - return $this; - } - - /** - * Required. The state of DS records for this domain. Used to enable or disable - * automatic DNSSEC. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsState ds_state = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDsState() - { - return $this->ds_state; - } - - /** - * Required. The state of DS records for this domain. Used to enable or disable - * automatic DNSSEC. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings.DsState ds_state = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDsState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\DnsSettings\DsState::class); - $this->ds_state = $var; - - return $this; - } - - /** - * Output only. The list of DS records published for this domain. The list is - * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, - * otherwise it remains empty. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.DsRecord ds_records = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDsRecords() - { - return $this->ds_records; - } - - /** - * Output only. The list of DS records published for this domain. The list is - * automatically populated when `ds_state` is `DS_RECORDS_PUBLISHED`, - * otherwise it remains empty. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DnsSettings.DsRecord ds_records = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDsRecords($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1beta1\DnsSettings\DsRecord::class); - $this->ds_records = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GoogleDomainsDns::class, \Google\Cloud\Domains\V1beta1\DnsSettings_GoogleDomainsDns::class); - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_CustomDns.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_CustomDns.php deleted file mode 100644 index 882fc0641a52..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DnsSettings_CustomDns.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.domains.v1beta1.DomainNotice - */ -class DomainNotice -{ - /** - * The notice is undefined. - * - * Generated from protobuf enum DOMAIN_NOTICE_UNSPECIFIED = 0; - */ - const DOMAIN_NOTICE_UNSPECIFIED = 0; - /** - * Indicates that the domain is preloaded on the HTTP Strict Transport - * Security list in browsers. Serving a website on such domain requires - * an SSL certificate. For details, see - * [how to get an SSL - * certificate](https://support.google.com/domains/answer/7638036). - * - * Generated from protobuf enum HSTS_PRELOADED = 1; - */ - const HSTS_PRELOADED = 1; - - private static $valueToName = [ - self::DOMAIN_NOTICE_UNSPECIFIED => 'DOMAIN_NOTICE_UNSPECIFIED', - self::HSTS_PRELOADED => 'HSTS_PRELOADED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DomainsGrpcClient.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DomainsGrpcClient.php deleted file mode 100644 index d9ca6f6b1493..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/DomainsGrpcClient.php +++ /dev/null @@ -1,341 +0,0 @@ -_simpleRequest('/google.cloud.domains.v1beta1.Domains/SearchDomains', - $argument, - ['\Google\Cloud\Domains\V1beta1\SearchDomainsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets parameters needed to register a new domain name, including price and - * up-to-date availability. Use the returned values to call `RegisterDomain`. - * @param \Google\Cloud\Domains\V1beta1\RetrieveRegisterParametersRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RetrieveRegisterParameters(\Google\Cloud\Domains\V1beta1\RetrieveRegisterParametersRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/RetrieveRegisterParameters', - $argument, - ['\Google\Cloud\Domains\V1beta1\RetrieveRegisterParametersResponse', 'decode'], - $metadata, $options); - } - - /** - * Registers a new domain name and creates a corresponding `Registration` - * resource. - * - * Call `RetrieveRegisterParameters` first to check availability of the domain - * name and determine parameters like price that are needed to build a call to - * this method. - * - * A successful call creates a `Registration` resource in state - * `REGISTRATION_PENDING`, which resolves to `ACTIVE` within 1-2 - * minutes, indicating that the domain was successfully registered. If the - * resource ends up in state `REGISTRATION_FAILED`, it indicates that the - * domain was not registered successfully, and you can safely delete the - * resource and retry registration. - * @param \Google\Cloud\Domains\V1beta1\RegisterDomainRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RegisterDomain(\Google\Cloud\Domains\V1beta1\RegisterDomainRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/RegisterDomain', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Gets parameters needed to transfer a domain name from another registrar to - * Cloud Domains. For domains managed by Google Domains, transferring to Cloud - * Domains is not supported. - * - * - * Use the returned values to call `TransferDomain`. - * @param \Google\Cloud\Domains\V1beta1\RetrieveTransferParametersRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RetrieveTransferParameters(\Google\Cloud\Domains\V1beta1\RetrieveTransferParametersRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/RetrieveTransferParameters', - $argument, - ['\Google\Cloud\Domains\V1beta1\RetrieveTransferParametersResponse', 'decode'], - $metadata, $options); - } - - /** - * Transfers a domain name from another registrar to Cloud Domains. For - * domains managed by Google Domains, transferring to Cloud Domains is not - * supported. - * - * - * Before calling this method, go to the domain's current registrar to unlock - * the domain for transfer and retrieve the domain's transfer authorization - * code. Then call `RetrieveTransferParameters` to confirm that the domain is - * unlocked and to get values needed to build a call to this method. - * - * A successful call creates a `Registration` resource in state - * `TRANSFER_PENDING`. It can take several days to complete the transfer - * process. The registrant can often speed up this process by approving the - * transfer through the current registrar, either by clicking a link in an - * email from the registrar or by visiting the registrar's website. - * - * A few minutes after transfer approval, the resource transitions to state - * `ACTIVE`, indicating that the transfer was successful. If the transfer is - * rejected or the request expires without being approved, the resource can - * end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete - * the resource and retry the transfer. - * @param \Google\Cloud\Domains\V1beta1\TransferDomainRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function TransferDomain(\Google\Cloud\Domains\V1beta1\TransferDomainRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/TransferDomain', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists the `Registration` resources in a project. - * @param \Google\Cloud\Domains\V1beta1\ListRegistrationsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListRegistrations(\Google\Cloud\Domains\V1beta1\ListRegistrationsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/ListRegistrations', - $argument, - ['\Google\Cloud\Domains\V1beta1\ListRegistrationsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets the details of a `Registration` resource. - * @param \Google\Cloud\Domains\V1beta1\GetRegistrationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetRegistration(\Google\Cloud\Domains\V1beta1\GetRegistrationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/GetRegistration', - $argument, - ['\Google\Cloud\Domains\V1beta1\Registration', 'decode'], - $metadata, $options); - } - - /** - * Updates select fields of a `Registration` resource, notably `labels`. To - * update other fields, use the appropriate custom update method: - * - * * To update management settings, see `ConfigureManagementSettings` - * * To update DNS configuration, see `ConfigureDnsSettings` - * * To update contact information, see `ConfigureContactSettings` - * @param \Google\Cloud\Domains\V1beta1\UpdateRegistrationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateRegistration(\Google\Cloud\Domains\V1beta1\UpdateRegistrationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/UpdateRegistration', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates a `Registration`'s management settings. - * @param \Google\Cloud\Domains\V1beta1\ConfigureManagementSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ConfigureManagementSettings(\Google\Cloud\Domains\V1beta1\ConfigureManagementSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/ConfigureManagementSettings', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates a `Registration`'s DNS settings. - * @param \Google\Cloud\Domains\V1beta1\ConfigureDnsSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ConfigureDnsSettings(\Google\Cloud\Domains\V1beta1\ConfigureDnsSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/ConfigureDnsSettings', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates a `Registration`'s contact settings. Some changes require - * confirmation by the domain's registrant contact . - * @param \Google\Cloud\Domains\V1beta1\ConfigureContactSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ConfigureContactSettings(\Google\Cloud\Domains\V1beta1\ConfigureContactSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/ConfigureContactSettings', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Exports a `Registration` resource, such that it is no longer managed by - * Cloud Domains. - * - * When an active domain is successfully exported, you can continue to use the - * domain in [Google Domains](https://domains.google/) until it expires. The - * calling user becomes the domain's sole owner in Google Domains, and - * permissions for the domain are subsequently managed there. The domain does - * not renew automatically unless the new owner sets up billing in Google - * Domains. - * @param \Google\Cloud\Domains\V1beta1\ExportRegistrationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ExportRegistration(\Google\Cloud\Domains\V1beta1\ExportRegistrationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/ExportRegistration', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a `Registration` resource. - * - * This method works on any `Registration` resource using [Subscription or - * Commitment billing](/domains/pricing#billing-models), provided that the - * resource was created at least 1 day in the past. - * - * For `Registration` resources using - * [Monthly billing](/domains/pricing#billing-models), this method works if: - * - * * `state` is `EXPORTED` with `expire_time` in the past - * * `state` is `REGISTRATION_FAILED` - * * `state` is `TRANSFER_FAILED` - * - * When an active registration is successfully deleted, you can continue to - * use the domain in [Google Domains](https://domains.google/) until it - * expires. The calling user becomes the domain's sole owner in Google - * Domains, and permissions for the domain are subsequently managed there. The - * domain does not renew automatically unless the new owner sets up billing in - * Google Domains. - * @param \Google\Cloud\Domains\V1beta1\DeleteRegistrationRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteRegistration(\Google\Cloud\Domains\V1beta1\DeleteRegistrationRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/DeleteRegistration', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Gets the authorization code of the `Registration` for the purpose of - * transferring the domain to another registrar. - * - * You can call this method only after 60 days have elapsed since the initial - * domain registration. - * @param \Google\Cloud\Domains\V1beta1\RetrieveAuthorizationCodeRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RetrieveAuthorizationCode(\Google\Cloud\Domains\V1beta1\RetrieveAuthorizationCodeRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/RetrieveAuthorizationCode', - $argument, - ['\Google\Cloud\Domains\V1beta1\AuthorizationCode', 'decode'], - $metadata, $options); - } - - /** - * Resets the authorization code of the `Registration` to a new random string. - * - * You can call this method only after 60 days have elapsed since the initial - * domain registration. - * @param \Google\Cloud\Domains\V1beta1\ResetAuthorizationCodeRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ResetAuthorizationCode(\Google\Cloud\Domains\V1beta1\ResetAuthorizationCodeRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.domains.v1beta1.Domains/ResetAuthorizationCode', - $argument, - ['\Google\Cloud\Domains\V1beta1\AuthorizationCode', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ExportRegistrationRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ExportRegistrationRequest.php deleted file mode 100644 index 8ece729ad5d4..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ExportRegistrationRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.domains.v1beta1.ExportRegistrationRequest - */ -class ExportRegistrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` to export, - * in the format `projects/*/locations/*/registrations/*`. - * - * 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 name of the `Registration` to export, - * in the format `projects/*/locations/*/registrations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` to export, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated 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 `Registration` to export, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/GetRegistrationRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/GetRegistrationRequest.php deleted file mode 100644 index a8145f693ba4..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/GetRegistrationRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.domains.v1beta1.GetRegistrationRequest - */ -class GetRegistrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` to get, in the format - * `projects/*/locations/*/registrations/*`. - * - * 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 name of the `Registration` to get, in the format - * `projects/*/locations/*/registrations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` to get, in the format - * `projects/*/locations/*/registrations/*`. - * - * Generated 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 `Registration` to get, in the format - * `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsRequest.php deleted file mode 100644 index 35be80495617..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsRequest.php +++ /dev/null @@ -1,225 +0,0 @@ -google.cloud.domains.v1beta1.ListRegistrationsRequest - */ -class ListRegistrationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which to list `Registration`s, 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 results to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * When set to the `next_page_token` from a prior response, provides the next - * page of results. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filter expression to restrict the `Registration`s returned. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, a boolean, or an enum value. The comparison operator should be one - * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. - * For example, to filter to a specific domain name, use an expression like - * `domainName="example.com"`. You can also check for the existence of a - * field; for example, to find domains using custom DNS settings, use an - * expression like `dnsSettings.customDns:*`. - * You can also create compound filters by combining expressions with the - * `AND` and `OR` operators. For example, to find domains that are suspended - * or have specific issues flagged, use an expression like - * `(state=SUSPENDED) OR (issue:*)`. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which to list `Registration`s, specified in - * the format `projects/*/locations/*`. - * @type int $page_size - * Maximum number of results to return. - * @type string $page_token - * When set to the `next_page_token` from a prior response, provides the next - * page of results. - * @type string $filter - * Filter expression to restrict the `Registration`s returned. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, a boolean, or an enum value. The comparison operator should be one - * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. - * For example, to filter to a specific domain name, use an expression like - * `domainName="example.com"`. You can also check for the existence of a - * field; for example, to find domains using custom DNS settings, use an - * expression like `dnsSettings.customDns:*`. - * You can also create compound filters by combining expressions with the - * `AND` and `OR` operators. For example, to find domains that are suspended - * or have specific issues flagged, use an expression like - * `(state=SUSPENDED) OR (issue:*)`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which to list `Registration`s, 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 to list `Registration`s, 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 results to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * 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; - } - - /** - * When set to the `next_page_token` from a prior response, provides the next - * page of results. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * When set to the `next_page_token` from a prior response, provides the next - * page 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; - } - - /** - * Filter expression to restrict the `Registration`s returned. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, a boolean, or an enum value. The comparison operator should be one - * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. - * For example, to filter to a specific domain name, use an expression like - * `domainName="example.com"`. You can also check for the existence of a - * field; for example, to find domains using custom DNS settings, use an - * expression like `dnsSettings.customDns:*`. - * You can also create compound filters by combining expressions with the - * `AND` and `OR` operators. For example, to find domains that are suspended - * or have specific issues flagged, use an expression like - * `(state=SUSPENDED) OR (issue:*)`. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter expression to restrict the `Registration`s returned. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, a boolean, or an enum value. The comparison operator should be one - * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. - * For example, to filter to a specific domain name, use an expression like - * `domainName="example.com"`. You can also check for the existence of a - * field; for example, to find domains using custom DNS settings, use an - * expression like `dnsSettings.customDns:*`. - * You can also create compound filters by combining expressions with the - * `AND` and `OR` operators. For example, to find domains that are suspended - * or have specific issues flagged, use an expression like - * `(state=SUSPENDED) OR (issue:*)`. - * - * 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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsResponse.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsResponse.php deleted file mode 100644 index 294db21f90e8..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ListRegistrationsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.domains.v1beta1.ListRegistrationsResponse - */ -class ListRegistrationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of `Registration`s. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.Registration registrations = 1; - */ - private $registrations; - /** - * When present, there are more results to retrieve. Set `page_token` to this - * value on a subsequent call 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\Domains\V1beta1\Registration>|\Google\Protobuf\Internal\RepeatedField $registrations - * A list of `Registration`s. - * @type string $next_page_token - * When present, there are more results to retrieve. Set `page_token` to this - * value on a subsequent call to get the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * A list of `Registration`s. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.Registration registrations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRegistrations() - { - return $this->registrations; - } - - /** - * A list of `Registration`s. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.Registration registrations = 1; - * @param array<\Google\Cloud\Domains\V1beta1\Registration>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRegistrations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1beta1\Registration::class); - $this->registrations = $arr; - - return $this; - } - - /** - * When present, there are more results to retrieve. Set `page_token` to this - * value on a subsequent call 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; - } - - /** - * When present, there are more results to retrieve. Set `page_token` to this - * value on a subsequent call 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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings.php deleted file mode 100644 index bebbc13d72ab..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.domains.v1beta1.ManagementSettings - */ -class ManagementSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The renewal method for this `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings.RenewalMethod renewal_method = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $renewal_method = 0; - /** - * Controls whether the domain can be transferred to another registrar. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.TransferLockState transfer_lock_state = 4; - */ - protected $transfer_lock_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $renewal_method - * Output only. The renewal method for this `Registration`. - * @type int $transfer_lock_state - * Controls whether the domain can be transferred to another registrar. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The renewal method for this `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings.RenewalMethod renewal_method = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRenewalMethod() - { - return $this->renewal_method; - } - - /** - * Output only. The renewal method for this `Registration`. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings.RenewalMethod renewal_method = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRenewalMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\ManagementSettings\RenewalMethod::class); - $this->renewal_method = $var; - - return $this; - } - - /** - * Controls whether the domain can be transferred to another registrar. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.TransferLockState transfer_lock_state = 4; - * @return int - */ - public function getTransferLockState() - { - return $this->transfer_lock_state; - } - - /** - * Controls whether the domain can be transferred to another registrar. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.TransferLockState transfer_lock_state = 4; - * @param int $var - * @return $this - */ - public function setTransferLockState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\TransferLockState::class); - $this->transfer_lock_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings/RenewalMethod.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings/RenewalMethod.php deleted file mode 100644 index 4114f4769e46..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings/RenewalMethod.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.domains.v1beta1.ManagementSettings.RenewalMethod - */ -class RenewalMethod -{ - /** - * The renewal method is undefined. - * - * Generated from protobuf enum RENEWAL_METHOD_UNSPECIFIED = 0; - */ - const RENEWAL_METHOD_UNSPECIFIED = 0; - /** - * The domain is automatically renewed each year . - * To disable automatic renewals, delete the resource by calling - * `DeleteRegistration` or export it by calling `ExportRegistration`. - * - * Generated from protobuf enum AUTOMATIC_RENEWAL = 1; - */ - const AUTOMATIC_RENEWAL = 1; - /** - * The domain must be explicitly renewed each year before its - * `expire_time`. This option is only available when the `Registration` - * is in state `EXPORTED`. - * To manage the domain's current billing and - * renewal settings, go to [Google Domains](https://domains.google/). - * - * Generated from protobuf enum MANUAL_RENEWAL = 2; - */ - const MANUAL_RENEWAL = 2; - - private static $valueToName = [ - self::RENEWAL_METHOD_UNSPECIFIED => 'RENEWAL_METHOD_UNSPECIFIED', - self::AUTOMATIC_RENEWAL => 'AUTOMATIC_RENEWAL', - self::MANUAL_RENEWAL => 'MANUAL_RENEWAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RenewalMethod::class, \Google\Cloud\Domains\V1beta1\ManagementSettings_RenewalMethod::class); - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings_RenewalMethod.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings_RenewalMethod.php deleted file mode 100644 index ca48efe927f2..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/ManagementSettings_RenewalMethod.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.domains.v1beta1.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_detail = 5; - */ - protected $status_detail = ''; - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 6; - */ - 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 - * Server-defined resource path for the target of the operation. - * @type string $verb - * Name of the verb executed by the operation. - * @type string $status_detail - * Human-readable status of the operation, if any. - * @type string $api_version - * API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::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_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; - } - - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 6; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 6; - * @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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterDomainRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterDomainRequest.php deleted file mode 100644 index 8dbb302ce09d..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterDomainRequest.php +++ /dev/null @@ -1,289 +0,0 @@ -google.cloud.domains.v1beta1.RegisterDomainRequest - */ -class RegisterDomainRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the `Registration`. 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. The complete `Registration` resource to be created. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $registration = null; - /** - * The list of domain notices that you acknowledge. Call - * `RetrieveRegisterParameters` to see the notices that need acknowledgement. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DomainNotice domain_notices = 3; - */ - private $domain_notices; - /** - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 4; - */ - private $contact_notices; - /** - * Required. Yearly price to register or renew the domain. - * The value that should be put here can be obtained from - * RetrieveRegisterParameters or SearchDomains calls. - * - * Generated from protobuf field .google.type.Money yearly_price = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $yearly_price = null; - /** - * When true, only validation is performed, without actually registering - * the domain. Follows: - * https://cloud.google.com/apis/design/design_patterns#request_validation - * - * Generated from protobuf field bool validate_only = 6; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the `Registration`. Must be in the - * format `projects/*/locations/*`. - * @type \Google\Cloud\Domains\V1beta1\Registration $registration - * Required. The complete `Registration` resource to be created. - * @type array|\Google\Protobuf\Internal\RepeatedField $domain_notices - * The list of domain notices that you acknowledge. Call - * `RetrieveRegisterParameters` to see the notices that need acknowledgement. - * @type array|\Google\Protobuf\Internal\RepeatedField $contact_notices - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * @type \Google\Type\Money $yearly_price - * Required. Yearly price to register or renew the domain. - * The value that should be put here can be obtained from - * RetrieveRegisterParameters or SearchDomains calls. - * @type bool $validate_only - * When true, only validation is performed, without actually registering - * the domain. Follows: - * https://cloud.google.com/apis/design/design_patterns#request_validation - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the `Registration`. 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 `Registration`. 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. The complete `Registration` resource to be created. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Domains\V1beta1\Registration|null - */ - public function getRegistration() - { - return $this->registration; - } - - public function hasRegistration() - { - return isset($this->registration); - } - - public function clearRegistration() - { - unset($this->registration); - } - - /** - * Required. The complete `Registration` resource to be created. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Domains\V1beta1\Registration $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\Registration::class); - $this->registration = $var; - - return $this; - } - - /** - * The list of domain notices that you acknowledge. Call - * `RetrieveRegisterParameters` to see the notices that need acknowledgement. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DomainNotice domain_notices = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDomainNotices() - { - return $this->domain_notices; - } - - /** - * The list of domain notices that you acknowledge. Call - * `RetrieveRegisterParameters` to see the notices that need acknowledgement. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DomainNotice domain_notices = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDomainNotices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\DomainNotice::class); - $this->domain_notices = $arr; - - return $this; - } - - /** - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContactNotices() - { - return $this->contact_notices; - } - - /** - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContactNotices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\ContactNotice::class); - $this->contact_notices = $arr; - - return $this; - } - - /** - * Required. Yearly price to register or renew the domain. - * The value that should be put here can be obtained from - * RetrieveRegisterParameters or SearchDomains calls. - * - * Generated from protobuf field .google.type.Money yearly_price = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\Money|null - */ - public function getYearlyPrice() - { - return $this->yearly_price; - } - - public function hasYearlyPrice() - { - return isset($this->yearly_price); - } - - public function clearYearlyPrice() - { - unset($this->yearly_price); - } - - /** - * Required. Yearly price to register or renew the domain. - * The value that should be put here can be obtained from - * RetrieveRegisterParameters or SearchDomains calls. - * - * Generated from protobuf field .google.type.Money yearly_price = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\Money $var - * @return $this - */ - public function setYearlyPrice($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->yearly_price = $var; - - return $this; - } - - /** - * When true, only validation is performed, without actually registering - * the domain. Follows: - * https://cloud.google.com/apis/design/design_patterns#request_validation - * - * Generated from protobuf field bool validate_only = 6; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * When true, only validation is performed, without actually registering - * the domain. Follows: - * https://cloud.google.com/apis/design/design_patterns#request_validation - * - * Generated from protobuf field bool validate_only = 6; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters.php deleted file mode 100644 index 71076173be67..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.domains.v1beta1.RegisterParameters - */ -class RegisterParameters extends \Google\Protobuf\Internal\Message -{ - /** - * The domain name. Unicode domain names are expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1; - */ - protected $domain_name = ''; - /** - * Indicates whether the domain is available for registration. This value is - * accurate when obtained by calling `RetrieveRegisterParameters`, but is - * approximate when obtained by calling `SearchDomains`. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.RegisterParameters.Availability availability = 2; - */ - protected $availability = 0; - /** - * Contact privacy options that the domain supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 3; - */ - private $supported_privacy; - /** - * Notices about special properties of the domain. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DomainNotice domain_notices = 4; - */ - private $domain_notices; - /** - * Price to register or renew the domain for one year. - * - * Generated from protobuf field .google.type.Money yearly_price = 5; - */ - protected $yearly_price = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $domain_name - * The domain name. Unicode domain names are expressed in Punycode format. - * @type int $availability - * Indicates whether the domain is available for registration. This value is - * accurate when obtained by calling `RetrieveRegisterParameters`, but is - * approximate when obtained by calling `SearchDomains`. - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_privacy - * Contact privacy options that the domain supports. - * @type array|\Google\Protobuf\Internal\RepeatedField $domain_notices - * Notices about special properties of the domain. - * @type \Google\Type\Money $yearly_price - * Price to register or renew the domain for one year. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * The domain name. Unicode domain names are expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1; - * @return string - */ - public function getDomainName() - { - return $this->domain_name; - } - - /** - * The domain name. Unicode domain names are expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1; - * @param string $var - * @return $this - */ - public function setDomainName($var) - { - GPBUtil::checkString($var, True); - $this->domain_name = $var; - - return $this; - } - - /** - * Indicates whether the domain is available for registration. This value is - * accurate when obtained by calling `RetrieveRegisterParameters`, but is - * approximate when obtained by calling `SearchDomains`. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.RegisterParameters.Availability availability = 2; - * @return int - */ - public function getAvailability() - { - return $this->availability; - } - - /** - * Indicates whether the domain is available for registration. This value is - * accurate when obtained by calling `RetrieveRegisterParameters`, but is - * approximate when obtained by calling `SearchDomains`. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.RegisterParameters.Availability availability = 2; - * @param int $var - * @return $this - */ - public function setAvailability($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\RegisterParameters\Availability::class); - $this->availability = $var; - - return $this; - } - - /** - * Contact privacy options that the domain supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedPrivacy() - { - return $this->supported_privacy; - } - - /** - * Contact privacy options that the domain supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedPrivacy($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\ContactPrivacy::class); - $this->supported_privacy = $arr; - - return $this; - } - - /** - * Notices about special properties of the domain. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DomainNotice domain_notices = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDomainNotices() - { - return $this->domain_notices; - } - - /** - * Notices about special properties of the domain. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.DomainNotice domain_notices = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDomainNotices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\DomainNotice::class); - $this->domain_notices = $arr; - - return $this; - } - - /** - * Price to register or renew the domain for one year. - * - * Generated from protobuf field .google.type.Money yearly_price = 5; - * @return \Google\Type\Money|null - */ - public function getYearlyPrice() - { - return $this->yearly_price; - } - - public function hasYearlyPrice() - { - return isset($this->yearly_price); - } - - public function clearYearlyPrice() - { - unset($this->yearly_price); - } - - /** - * Price to register or renew the domain for one year. - * - * Generated from protobuf field .google.type.Money yearly_price = 5; - * @param \Google\Type\Money $var - * @return $this - */ - public function setYearlyPrice($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->yearly_price = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters/Availability.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters/Availability.php deleted file mode 100644 index 90b20eb551f5..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters/Availability.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.domains.v1beta1.RegisterParameters.Availability - */ -class Availability -{ - /** - * The availability is unspecified. - * - * Generated from protobuf enum AVAILABILITY_UNSPECIFIED = 0; - */ - const AVAILABILITY_UNSPECIFIED = 0; - /** - * The domain is available for registration. - * - * Generated from protobuf enum AVAILABLE = 1; - */ - const AVAILABLE = 1; - /** - * The domain is not available for registration. Generally this means it is - * already registered to another party. - * - * Generated from protobuf enum UNAVAILABLE = 2; - */ - const UNAVAILABLE = 2; - /** - * The domain is not currently supported by Cloud Domains, but may - * be available elsewhere. - * - * Generated from protobuf enum UNSUPPORTED = 3; - */ - const UNSUPPORTED = 3; - /** - * Cloud Domains is unable to determine domain availability, generally - * due to system maintenance at the domain name registry. - * - * Generated from protobuf enum UNKNOWN = 4; - */ - const UNKNOWN = 4; - - private static $valueToName = [ - self::AVAILABILITY_UNSPECIFIED => 'AVAILABILITY_UNSPECIFIED', - self::AVAILABLE => 'AVAILABLE', - self::UNAVAILABLE => 'UNAVAILABLE', - self::UNSUPPORTED => 'UNSUPPORTED', - self::UNKNOWN => 'UNKNOWN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Availability::class, \Google\Cloud\Domains\V1beta1\RegisterParameters_Availability::class); - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters_Availability.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters_Availability.php deleted file mode 100644 index 8c4ccf74970f..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RegisterParameters_Availability.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.domains.v1beta1.Registration - */ -class Registration extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of the `Registration` resource, in the format - * `projects/*/locations/*/registrations/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $domain_name = ''; - /** - * Output only. The creation timestamp of the `Registration` resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The expiration timestamp of the `Registration`. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. The state of the `Registration` - * - * Generated from protobuf field .google.cloud.domains.v1beta1.Registration.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The set of issues with the `Registration` that require attention. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.Registration.Issue issues = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $issues; - /** - * Set of labels associated with the `Registration`. - * - * Generated from protobuf field map labels = 9; - */ - private $labels; - /** - * Settings for management of the `Registration`, including renewal, billing, - * and transfer. You cannot update these with the `UpdateRegistration` - * method. To update these settings, use the `ConfigureManagementSettings` - * method. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings management_settings = 10; - */ - protected $management_settings = null; - /** - * Settings controlling the DNS configuration of the `Registration`. You - * cannot update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureDnsSettings` method. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings dns_settings = 11; - */ - protected $dns_settings = null; - /** - * Required. Settings for contact information linked to the `Registration`. You cannot - * update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureContactSettings` method. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings contact_settings = 12 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $contact_settings = null; - /** - * Output only. Pending contact settings for the `Registration`. Updates to the - * `contact_settings` field that change its `registrant_contact` or `privacy` - * fields require email confirmation by the `registrant_contact` - * before taking effect. This field is set only if there are pending updates - * to the `contact_settings` that have not been confirmed. To confirm the - * changes, the `registrant_contact` must follow the instructions in the - * email they receive. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings pending_contact_settings = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $pending_contact_settings = null; - /** - * Output only. Set of options for the `contact_settings.privacy` field that this - * `Registration` supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $supported_privacy; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Name of the `Registration` resource, in the format - * `projects/*/locations/*/registrations/`. - * @type string $domain_name - * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of the `Registration` resource. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. The expiration timestamp of the `Registration`. - * @type int $state - * Output only. The state of the `Registration` - * @type array|\Google\Protobuf\Internal\RepeatedField $issues - * Output only. The set of issues with the `Registration` that require attention. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Set of labels associated with the `Registration`. - * @type \Google\Cloud\Domains\V1beta1\ManagementSettings $management_settings - * Settings for management of the `Registration`, including renewal, billing, - * and transfer. You cannot update these with the `UpdateRegistration` - * method. To update these settings, use the `ConfigureManagementSettings` - * method. - * @type \Google\Cloud\Domains\V1beta1\DnsSettings $dns_settings - * Settings controlling the DNS configuration of the `Registration`. You - * cannot update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureDnsSettings` method. - * @type \Google\Cloud\Domains\V1beta1\ContactSettings $contact_settings - * Required. Settings for contact information linked to the `Registration`. You cannot - * update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureContactSettings` method. - * @type \Google\Cloud\Domains\V1beta1\ContactSettings $pending_contact_settings - * Output only. Pending contact settings for the `Registration`. Updates to the - * `contact_settings` field that change its `registrant_contact` or `privacy` - * fields require email confirmation by the `registrant_contact` - * before taking effect. This field is set only if there are pending updates - * to the `contact_settings` that have not been confirmed. To confirm the - * changes, the `registrant_contact` must follow the instructions in the - * email they receive. - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_privacy - * Output only. Set of options for the `contact_settings.privacy` field that this - * `Registration` supports. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of the `Registration` resource, in the format - * `projects/*/locations/*/registrations/`. - * - * 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 `Registration` resource, in the format - * `projects/*/locations/*/registrations/`. - * - * 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; - } - - /** - * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getDomainName() - { - return $this->domain_name; - } - - /** - * Required. Immutable. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setDomainName($var) - { - GPBUtil::checkString($var, True); - $this->domain_name = $var; - - return $this; - } - - /** - * Output only. The creation timestamp of the `Registration` resource. - * - * 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 creation timestamp of the `Registration` resource. - * - * 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 expiration timestamp of the `Registration`. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.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. The expiration timestamp of the `Registration`. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.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; - } - - /** - * Output only. The state of the `Registration` - * - * Generated from protobuf field .google.cloud.domains.v1beta1.Registration.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the `Registration` - * - * Generated from protobuf field .google.cloud.domains.v1beta1.Registration.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\Registration\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The set of issues with the `Registration` that require attention. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.Registration.Issue issues = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIssues() - { - return $this->issues; - } - - /** - * Output only. The set of issues with the `Registration` that require attention. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.Registration.Issue issues = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIssues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\Registration\Issue::class); - $this->issues = $arr; - - return $this; - } - - /** - * Set of labels associated with the `Registration`. - * - * Generated from protobuf field map labels = 9; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Set of labels associated with the `Registration`. - * - * 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; - } - - /** - * Settings for management of the `Registration`, including renewal, billing, - * and transfer. You cannot update these with the `UpdateRegistration` - * method. To update these settings, use the `ConfigureManagementSettings` - * method. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings management_settings = 10; - * @return \Google\Cloud\Domains\V1beta1\ManagementSettings|null - */ - public function getManagementSettings() - { - return $this->management_settings; - } - - public function hasManagementSettings() - { - return isset($this->management_settings); - } - - public function clearManagementSettings() - { - unset($this->management_settings); - } - - /** - * Settings for management of the `Registration`, including renewal, billing, - * and transfer. You cannot update these with the `UpdateRegistration` - * method. To update these settings, use the `ConfigureManagementSettings` - * method. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ManagementSettings management_settings = 10; - * @param \Google\Cloud\Domains\V1beta1\ManagementSettings $var - * @return $this - */ - public function setManagementSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ManagementSettings::class); - $this->management_settings = $var; - - return $this; - } - - /** - * Settings controlling the DNS configuration of the `Registration`. You - * cannot update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureDnsSettings` method. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings dns_settings = 11; - * @return \Google\Cloud\Domains\V1beta1\DnsSettings|null - */ - public function getDnsSettings() - { - return $this->dns_settings; - } - - public function hasDnsSettings() - { - return isset($this->dns_settings); - } - - public function clearDnsSettings() - { - unset($this->dns_settings); - } - - /** - * Settings controlling the DNS configuration of the `Registration`. You - * cannot update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureDnsSettings` method. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.DnsSettings dns_settings = 11; - * @param \Google\Cloud\Domains\V1beta1\DnsSettings $var - * @return $this - */ - public function setDnsSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\DnsSettings::class); - $this->dns_settings = $var; - - return $this; - } - - /** - * Required. Settings for contact information linked to the `Registration`. You cannot - * update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureContactSettings` method. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings contact_settings = 12 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Domains\V1beta1\ContactSettings|null - */ - public function getContactSettings() - { - return $this->contact_settings; - } - - public function hasContactSettings() - { - return isset($this->contact_settings); - } - - public function clearContactSettings() - { - unset($this->contact_settings); - } - - /** - * Required. Settings for contact information linked to the `Registration`. You cannot - * update these with the `UpdateRegistration` method. To update these - * settings, use the `ConfigureContactSettings` method. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings contact_settings = 12 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Domains\V1beta1\ContactSettings $var - * @return $this - */ - public function setContactSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ContactSettings::class); - $this->contact_settings = $var; - - return $this; - } - - /** - * Output only. Pending contact settings for the `Registration`. Updates to the - * `contact_settings` field that change its `registrant_contact` or `privacy` - * fields require email confirmation by the `registrant_contact` - * before taking effect. This field is set only if there are pending updates - * to the `contact_settings` that have not been confirmed. To confirm the - * changes, the `registrant_contact` must follow the instructions in the - * email they receive. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings pending_contact_settings = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Domains\V1beta1\ContactSettings|null - */ - public function getPendingContactSettings() - { - return $this->pending_contact_settings; - } - - public function hasPendingContactSettings() - { - return isset($this->pending_contact_settings); - } - - public function clearPendingContactSettings() - { - unset($this->pending_contact_settings); - } - - /** - * Output only. Pending contact settings for the `Registration`. Updates to the - * `contact_settings` field that change its `registrant_contact` or `privacy` - * fields require email confirmation by the `registrant_contact` - * before taking effect. This field is set only if there are pending updates - * to the `contact_settings` that have not been confirmed. To confirm the - * changes, the `registrant_contact` must follow the instructions in the - * email they receive. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.ContactSettings pending_contact_settings = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Domains\V1beta1\ContactSettings $var - * @return $this - */ - public function setPendingContactSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\ContactSettings::class); - $this->pending_contact_settings = $var; - - return $this; - } - - /** - * Output only. Set of options for the `contact_settings.privacy` field that this - * `Registration` supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedPrivacy() - { - return $this->supported_privacy; - } - - /** - * Output only. Set of options for the `contact_settings.privacy` field that this - * `Registration` supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedPrivacy($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\ContactPrivacy::class); - $this->supported_privacy = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/Issue.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/Issue.php deleted file mode 100644 index 6b0e83080633..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/Issue.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.domains.v1beta1.Registration.Issue - */ -class Issue -{ - /** - * The issue is undefined. - * - * Generated from protobuf enum ISSUE_UNSPECIFIED = 0; - */ - const ISSUE_UNSPECIFIED = 0; - /** - * Contact the Cloud Support team to resolve a problem with this domain. - * - * Generated from protobuf enum CONTACT_SUPPORT = 1; - */ - const CONTACT_SUPPORT = 1; - /** - * [ICANN](https://icann.org/) requires verification of the email address - * in the `Registration`'s `contact_settings.registrant_contact` field. To - * verify the email address, follow the - * instructions in the email the `registrant_contact` receives following - * registration. If you do not complete email verification within - * 15 days of registration, the domain is suspended. To resend the - * verification email, call ConfigureContactSettings and provide the current - * `registrant_contact.email`. - * - * Generated from protobuf enum UNVERIFIED_EMAIL = 2; - */ - const UNVERIFIED_EMAIL = 2; - - private static $valueToName = [ - self::ISSUE_UNSPECIFIED => 'ISSUE_UNSPECIFIED', - self::CONTACT_SUPPORT => 'CONTACT_SUPPORT', - self::UNVERIFIED_EMAIL => 'UNVERIFIED_EMAIL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Issue::class, \Google\Cloud\Domains\V1beta1\Registration_Issue::class); - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/State.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/State.php deleted file mode 100644 index 4711d251a677..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration/State.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.domains.v1beta1.Registration.State - */ -class State -{ - /** - * The state is undefined. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The domain is being registered. - * - * Generated from protobuf enum REGISTRATION_PENDING = 1; - */ - const REGISTRATION_PENDING = 1; - /** - * The domain registration failed. You can delete resources in this state - * to allow registration to be retried. - * - * Generated from protobuf enum REGISTRATION_FAILED = 2; - */ - const REGISTRATION_FAILED = 2; - /** - * The domain is being transferred from another registrar to Cloud Domains. - * - * Generated from protobuf enum TRANSFER_PENDING = 3; - */ - const TRANSFER_PENDING = 3; - /** - * The attempt to transfer the domain from another registrar to - * Cloud Domains failed. You can delete resources in this state and retry - * the transfer. - * - * Generated from protobuf enum TRANSFER_FAILED = 4; - */ - const TRANSFER_FAILED = 4; - /** - * The domain is registered and operational. The domain renews automatically - * as long as it remains in this state. - * - * Generated from protobuf enum ACTIVE = 6; - */ - const ACTIVE = 6; - /** - * The domain is suspended and inoperative. For more details, see the - * `issues` field. - * - * Generated from protobuf enum SUSPENDED = 7; - */ - const SUSPENDED = 7; - /** - * The domain is no longer managed with Cloud Domains. It may have been - * transferred to another registrar or exported for management in - * [Google Domains](https://domains.google/). You can no longer update it - * with this API, and information shown about it may be stale. Domains in - * this state are not automatically renewed by Cloud Domains. - * - * Generated from protobuf enum EXPORTED = 8; - */ - const EXPORTED = 8; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::REGISTRATION_PENDING => 'REGISTRATION_PENDING', - self::REGISTRATION_FAILED => 'REGISTRATION_FAILED', - self::TRANSFER_PENDING => 'TRANSFER_PENDING', - self::TRANSFER_FAILED => 'TRANSFER_FAILED', - self::ACTIVE => 'ACTIVE', - self::SUSPENDED => 'SUSPENDED', - self::EXPORTED => 'EXPORTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Domains\V1beta1\Registration_State::class); - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration_Issue.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration_Issue.php deleted file mode 100644 index aa94a77bedf0..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/Registration_Issue.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.domains.v1beta1.ResetAuthorizationCodeRequest - */ -class ResetAuthorizationCodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` whose authorization code is being reset, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $registration = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $registration - * Required. The name of the `Registration` whose authorization code is being reset, - * in the format `projects/*/locations/*/registrations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` whose authorization code is being reset, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getRegistration() - { - return $this->registration; - } - - /** - * Required. The name of the `Registration` whose authorization code is being reset, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkString($var, True); - $this->registration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveAuthorizationCodeRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveAuthorizationCodeRequest.php deleted file mode 100644 index 374105772078..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveAuthorizationCodeRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.domains.v1beta1.RetrieveAuthorizationCodeRequest - */ -class RetrieveAuthorizationCodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `Registration` whose authorization code is being retrieved, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $registration = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $registration - * Required. The name of the `Registration` whose authorization code is being retrieved, - * in the format `projects/*/locations/*/registrations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `Registration` whose authorization code is being retrieved, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getRegistration() - { - return $this->registration; - } - - /** - * Required. The name of the `Registration` whose authorization code is being retrieved, - * in the format `projects/*/locations/*/registrations/*`. - * - * Generated from protobuf field string registration = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkString($var, True); - $this->registration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersRequest.php deleted file mode 100644 index 6b00a0161245..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.domains.v1beta1.RetrieveRegisterParametersRequest - */ -class RetrieveRegisterParametersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $domain_name = ''; - /** - * Required. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $domain_name - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * @type string $location - * Required. The location. Must be in the format `projects/*/locations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDomainName() - { - return $this->domain_name; - } - - /** - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1 [(.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. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Required. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersResponse.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersResponse.php deleted file mode 100644 index d7a863374b88..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveRegisterParametersResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.domains.v1beta1.RetrieveRegisterParametersResponse - */ -class RetrieveRegisterParametersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Parameters to use when calling the `RegisterDomain` method. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.RegisterParameters register_parameters = 1; - */ - protected $register_parameters = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Domains\V1beta1\RegisterParameters $register_parameters - * Parameters to use when calling the `RegisterDomain` method. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Parameters to use when calling the `RegisterDomain` method. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.RegisterParameters register_parameters = 1; - * @return \Google\Cloud\Domains\V1beta1\RegisterParameters|null - */ - public function getRegisterParameters() - { - return $this->register_parameters; - } - - public function hasRegisterParameters() - { - return isset($this->register_parameters); - } - - public function clearRegisterParameters() - { - unset($this->register_parameters); - } - - /** - * Parameters to use when calling the `RegisterDomain` method. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.RegisterParameters register_parameters = 1; - * @param \Google\Cloud\Domains\V1beta1\RegisterParameters $var - * @return $this - */ - public function setRegisterParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\RegisterParameters::class); - $this->register_parameters = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersRequest.php deleted file mode 100644 index b5f5729ba2f7..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.domains.v1beta1.RetrieveTransferParametersRequest - */ -class RetrieveTransferParametersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $domain_name = ''; - /** - * Required. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $domain_name - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * @type string $location - * Required. The location. Must be in the format `projects/*/locations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDomainName() - { - return $this->domain_name; - } - - /** - * Required. The domain name. Unicode domain names must be expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1 [(.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. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Required. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersResponse.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersResponse.php deleted file mode 100644 index 93cd532eae9e..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/RetrieveTransferParametersResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.domains.v1beta1.RetrieveTransferParametersResponse - */ -class RetrieveTransferParametersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Parameters to use when calling the `TransferDomain` method. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.TransferParameters transfer_parameters = 1; - */ - protected $transfer_parameters = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Domains\V1beta1\TransferParameters $transfer_parameters - * Parameters to use when calling the `TransferDomain` method. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Parameters to use when calling the `TransferDomain` method. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.TransferParameters transfer_parameters = 1; - * @return \Google\Cloud\Domains\V1beta1\TransferParameters|null - */ - public function getTransferParameters() - { - return $this->transfer_parameters; - } - - public function hasTransferParameters() - { - return isset($this->transfer_parameters); - } - - public function clearTransferParameters() - { - unset($this->transfer_parameters); - } - - /** - * Parameters to use when calling the `TransferDomain` method. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.TransferParameters transfer_parameters = 1; - * @param \Google\Cloud\Domains\V1beta1\TransferParameters $var - * @return $this - */ - public function setTransferParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\TransferParameters::class); - $this->transfer_parameters = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsRequest.php deleted file mode 100644 index 723dbc53bba6..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.domains.v1beta1.SearchDomainsRequest - */ -class SearchDomainsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. String used to search for available domain names. - * - * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query = ''; - /** - * Required. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query - * Required. String used to search for available domain names. - * @type string $location - * Required. The location. Must be in the format `projects/*/locations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. String used to search for available domain names. - * - * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Required. String used to search for available domain names. - * - * 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; - } - - /** - * Required. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Required. The location. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsResponse.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsResponse.php deleted file mode 100644 index 3ab2b2f9158f..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/SearchDomainsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.domains.v1beta1.SearchDomainsResponse - */ -class SearchDomainsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Results of the domain name search. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.RegisterParameters register_parameters = 1; - */ - private $register_parameters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Domains\V1beta1\RegisterParameters>|\Google\Protobuf\Internal\RepeatedField $register_parameters - * Results of the domain name search. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Results of the domain name search. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.RegisterParameters register_parameters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRegisterParameters() - { - return $this->register_parameters; - } - - /** - * Results of the domain name search. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.RegisterParameters register_parameters = 1; - * @param array<\Google\Cloud\Domains\V1beta1\RegisterParameters>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRegisterParameters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Domains\V1beta1\RegisterParameters::class); - $this->register_parameters = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferDomainRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferDomainRequest.php deleted file mode 100644 index 0643aff926ad..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferDomainRequest.php +++ /dev/null @@ -1,311 +0,0 @@ -google.cloud.domains.v1beta1.TransferDomainRequest - */ -class TransferDomainRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the `Registration`. 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. The complete `Registration` resource to be created. - * You can leave `registration.dns_settings` unset to import the - * domain's current DNS configuration from its current registrar. Use this - * option only if you are sure that the domain's current DNS service - * does not cease upon transfer, as is often the case for DNS services - * provided for free by the registrar. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $registration = null; - /** - * The list of contact notices that you acknowledge. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 3; - */ - private $contact_notices; - /** - * Required. Acknowledgement of the price to transfer or renew the domain for one year. - * Call `RetrieveTransferParameters` to obtain the price, which you must - * acknowledge. - * - * Generated from protobuf field .google.type.Money yearly_price = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $yearly_price = null; - /** - * The domain's transfer authorization code. You can obtain this from the - * domain's current registrar. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.AuthorizationCode authorization_code = 5; - */ - protected $authorization_code = null; - /** - * Validate the request without actually transferring the domain. - * - * Generated from protobuf field bool validate_only = 6; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the `Registration`. Must be in the - * format `projects/*/locations/*`. - * @type \Google\Cloud\Domains\V1beta1\Registration $registration - * Required. The complete `Registration` resource to be created. - * You can leave `registration.dns_settings` unset to import the - * domain's current DNS configuration from its current registrar. Use this - * option only if you are sure that the domain's current DNS service - * does not cease upon transfer, as is often the case for DNS services - * provided for free by the registrar. - * @type array|\Google\Protobuf\Internal\RepeatedField $contact_notices - * The list of contact notices that you acknowledge. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * @type \Google\Type\Money $yearly_price - * Required. Acknowledgement of the price to transfer or renew the domain for one year. - * Call `RetrieveTransferParameters` to obtain the price, which you must - * acknowledge. - * @type \Google\Cloud\Domains\V1beta1\AuthorizationCode $authorization_code - * The domain's transfer authorization code. You can obtain this from the - * domain's current registrar. - * @type bool $validate_only - * Validate the request without actually transferring the domain. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the `Registration`. 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 `Registration`. 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. The complete `Registration` resource to be created. - * You can leave `registration.dns_settings` unset to import the - * domain's current DNS configuration from its current registrar. Use this - * option only if you are sure that the domain's current DNS service - * does not cease upon transfer, as is often the case for DNS services - * provided for free by the registrar. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Domains\V1beta1\Registration|null - */ - public function getRegistration() - { - return $this->registration; - } - - public function hasRegistration() - { - return isset($this->registration); - } - - public function clearRegistration() - { - unset($this->registration); - } - - /** - * Required. The complete `Registration` resource to be created. - * You can leave `registration.dns_settings` unset to import the - * domain's current DNS configuration from its current registrar. Use this - * option only if you are sure that the domain's current DNS service - * does not cease upon transfer, as is often the case for DNS services - * provided for free by the registrar. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Domains\V1beta1\Registration $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\Registration::class); - $this->registration = $var; - - return $this; - } - - /** - * The list of contact notices that you acknowledge. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContactNotices() - { - return $this->contact_notices; - } - - /** - * The list of contact notices that you acknowledge. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactNotice contact_notices = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContactNotices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\ContactNotice::class); - $this->contact_notices = $arr; - - return $this; - } - - /** - * Required. Acknowledgement of the price to transfer or renew the domain for one year. - * Call `RetrieveTransferParameters` to obtain the price, which you must - * acknowledge. - * - * Generated from protobuf field .google.type.Money yearly_price = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\Money|null - */ - public function getYearlyPrice() - { - return $this->yearly_price; - } - - public function hasYearlyPrice() - { - return isset($this->yearly_price); - } - - public function clearYearlyPrice() - { - unset($this->yearly_price); - } - - /** - * Required. Acknowledgement of the price to transfer or renew the domain for one year. - * Call `RetrieveTransferParameters` to obtain the price, which you must - * acknowledge. - * - * Generated from protobuf field .google.type.Money yearly_price = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\Money $var - * @return $this - */ - public function setYearlyPrice($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->yearly_price = $var; - - return $this; - } - - /** - * The domain's transfer authorization code. You can obtain this from the - * domain's current registrar. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.AuthorizationCode authorization_code = 5; - * @return \Google\Cloud\Domains\V1beta1\AuthorizationCode|null - */ - public function getAuthorizationCode() - { - return $this->authorization_code; - } - - public function hasAuthorizationCode() - { - return isset($this->authorization_code); - } - - public function clearAuthorizationCode() - { - unset($this->authorization_code); - } - - /** - * The domain's transfer authorization code. You can obtain this from the - * domain's current registrar. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.AuthorizationCode authorization_code = 5; - * @param \Google\Cloud\Domains\V1beta1\AuthorizationCode $var - * @return $this - */ - public function setAuthorizationCode($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\AuthorizationCode::class); - $this->authorization_code = $var; - - return $this; - } - - /** - * Validate the request without actually transferring the domain. - * - * Generated from protobuf field bool validate_only = 6; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Validate the request without actually transferring the domain. - * - * Generated from protobuf field bool validate_only = 6; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferLockState.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferLockState.php deleted file mode 100644 index a927574f68d8..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferLockState.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.domains.v1beta1.TransferLockState - */ -class TransferLockState -{ - /** - * The state is unspecified. - * - * Generated from protobuf enum TRANSFER_LOCK_STATE_UNSPECIFIED = 0; - */ - const TRANSFER_LOCK_STATE_UNSPECIFIED = 0; - /** - * The domain is unlocked and can be transferred to another registrar. - * - * Generated from protobuf enum UNLOCKED = 1; - */ - const UNLOCKED = 1; - /** - * The domain is locked and cannot be transferred to another registrar. - * - * Generated from protobuf enum LOCKED = 2; - */ - const LOCKED = 2; - - private static $valueToName = [ - self::TRANSFER_LOCK_STATE_UNSPECIFIED => 'TRANSFER_LOCK_STATE_UNSPECIFIED', - self::UNLOCKED => 'UNLOCKED', - self::LOCKED => 'LOCKED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferParameters.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferParameters.php deleted file mode 100644 index f639715281b2..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/TransferParameters.php +++ /dev/null @@ -1,255 +0,0 @@ -google.cloud.domains.v1beta1.TransferParameters - */ -class TransferParameters extends \Google\Protobuf\Internal\Message -{ - /** - * The domain name. Unicode domain names are expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1; - */ - protected $domain_name = ''; - /** - * The registrar that currently manages the domain. - * - * Generated from protobuf field string current_registrar = 2; - */ - protected $current_registrar = ''; - /** - * The name servers that currently store the configuration of the domain. - * - * Generated from protobuf field repeated string name_servers = 3; - */ - private $name_servers; - /** - * Indicates whether the domain is protected by a transfer lock. For a - * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, - * go to its current registrar. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.TransferLockState transfer_lock_state = 4; - */ - protected $transfer_lock_state = 0; - /** - * Contact privacy options that the domain supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 5; - */ - private $supported_privacy; - /** - * Price to transfer or renew the domain for one year. - * - * Generated from protobuf field .google.type.Money yearly_price = 6; - */ - protected $yearly_price = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $domain_name - * The domain name. Unicode domain names are expressed in Punycode format. - * @type string $current_registrar - * The registrar that currently manages the domain. - * @type array|\Google\Protobuf\Internal\RepeatedField $name_servers - * The name servers that currently store the configuration of the domain. - * @type int $transfer_lock_state - * Indicates whether the domain is protected by a transfer lock. For a - * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, - * go to its current registrar. - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_privacy - * Contact privacy options that the domain supports. - * @type \Google\Type\Money $yearly_price - * Price to transfer or renew the domain for one year. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * The domain name. Unicode domain names are expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1; - * @return string - */ - public function getDomainName() - { - return $this->domain_name; - } - - /** - * The domain name. Unicode domain names are expressed in Punycode format. - * - * Generated from protobuf field string domain_name = 1; - * @param string $var - * @return $this - */ - public function setDomainName($var) - { - GPBUtil::checkString($var, True); - $this->domain_name = $var; - - return $this; - } - - /** - * The registrar that currently manages the domain. - * - * Generated from protobuf field string current_registrar = 2; - * @return string - */ - public function getCurrentRegistrar() - { - return $this->current_registrar; - } - - /** - * The registrar that currently manages the domain. - * - * Generated from protobuf field string current_registrar = 2; - * @param string $var - * @return $this - */ - public function setCurrentRegistrar($var) - { - GPBUtil::checkString($var, True); - $this->current_registrar = $var; - - return $this; - } - - /** - * The name servers that currently store the configuration of the domain. - * - * Generated from protobuf field repeated string name_servers = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNameServers() - { - return $this->name_servers; - } - - /** - * The name servers that currently store the configuration of the domain. - * - * Generated from protobuf field repeated string name_servers = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNameServers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->name_servers = $arr; - - return $this; - } - - /** - * Indicates whether the domain is protected by a transfer lock. For a - * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, - * go to its current registrar. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.TransferLockState transfer_lock_state = 4; - * @return int - */ - public function getTransferLockState() - { - return $this->transfer_lock_state; - } - - /** - * Indicates whether the domain is protected by a transfer lock. For a - * transfer to succeed, this must show `UNLOCKED`. To unlock a domain, - * go to its current registrar. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.TransferLockState transfer_lock_state = 4; - * @param int $var - * @return $this - */ - public function setTransferLockState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Domains\V1beta1\TransferLockState::class); - $this->transfer_lock_state = $var; - - return $this; - } - - /** - * Contact privacy options that the domain supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedPrivacy() - { - return $this->supported_privacy; - } - - /** - * Contact privacy options that the domain supports. - * - * Generated from protobuf field repeated .google.cloud.domains.v1beta1.ContactPrivacy supported_privacy = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedPrivacy($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Domains\V1beta1\ContactPrivacy::class); - $this->supported_privacy = $arr; - - return $this; - } - - /** - * Price to transfer or renew the domain for one year. - * - * Generated from protobuf field .google.type.Money yearly_price = 6; - * @return \Google\Type\Money|null - */ - public function getYearlyPrice() - { - return $this->yearly_price; - } - - public function hasYearlyPrice() - { - return isset($this->yearly_price); - } - - public function clearYearlyPrice() - { - unset($this->yearly_price); - } - - /** - * Price to transfer or renew the domain for one year. - * - * Generated from protobuf field .google.type.Money yearly_price = 6; - * @param \Google\Type\Money $var - * @return $this - */ - public function setYearlyPrice($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->yearly_price = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/UpdateRegistrationRequest.php b/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/UpdateRegistrationRequest.php deleted file mode 100644 index f0d576d869d4..000000000000 --- a/owl-bot-staging/Domains/v1beta1/proto/src/Google/Cloud/Domains/V1beta1/UpdateRegistrationRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.domains.v1beta1.UpdateRegistrationRequest - */ -class UpdateRegistrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Fields of the `Registration` to update. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 1; - */ - protected $registration = null; - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the labels are being updated, the `update_mask` is - * `"labels"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Domains\V1beta1\Registration $registration - * Fields of the `Registration` to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the labels are being updated, the `update_mask` is - * `"labels"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Domains\V1Beta1\Domains::initOnce(); - parent::__construct($data); - } - - /** - * Fields of the `Registration` to update. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 1; - * @return \Google\Cloud\Domains\V1beta1\Registration|null - */ - public function getRegistration() - { - return $this->registration; - } - - public function hasRegistration() - { - return isset($this->registration); - } - - public function clearRegistration() - { - unset($this->registration); - } - - /** - * Fields of the `Registration` to update. - * - * Generated from protobuf field .google.cloud.domains.v1beta1.Registration registration = 1; - * @param \Google\Cloud\Domains\V1beta1\Registration $var - * @return $this - */ - public function setRegistration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Domains\V1beta1\Registration::class); - $this->registration = $var; - - return $this; - } - - /** - * Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the labels are being updated, the `update_mask` is - * `"labels"`. - * - * 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 field mask describing which fields to update as a comma-separated list. - * For example, if only the labels are being updated, the `update_mask` is - * `"labels"`. - * - * 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/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_contact_settings.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_contact_settings.php deleted file mode 100644 index bb665b172f0f..000000000000 --- a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_contact_settings.php +++ /dev/null @@ -1,88 +0,0 @@ -configureContactSettings($formattedRegistration, $updateMask); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Registration $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedRegistration = DomainsClient::registrationName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRATION]' - ); - - configure_contact_settings_sample($formattedRegistration); -} -// [END domains_v1beta1_generated_Domains_ConfigureContactSettings_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_dns_settings.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_dns_settings.php deleted file mode 100644 index 73df1e5ba374..000000000000 --- a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_dns_settings.php +++ /dev/null @@ -1,87 +0,0 @@ -configureDnsSettings($formattedRegistration, $updateMask); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Registration $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedRegistration = DomainsClient::registrationName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRATION]' - ); - - configure_dns_settings_sample($formattedRegistration); -} -// [END domains_v1beta1_generated_Domains_ConfigureDnsSettings_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_management_settings.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_management_settings.php deleted file mode 100644 index db08f748382c..000000000000 --- a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/configure_management_settings.php +++ /dev/null @@ -1,87 +0,0 @@ -configureManagementSettings($formattedRegistration, $updateMask); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Registration $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedRegistration = DomainsClient::registrationName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRATION]' - ); - - configure_management_settings_sample($formattedRegistration); -} -// [END domains_v1beta1_generated_Domains_ConfigureManagementSettings_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/delete_registration.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/delete_registration.php deleted file mode 100644 index e46268438386..000000000000 --- a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/delete_registration.php +++ /dev/null @@ -1,94 +0,0 @@ -deleteRegistration($formattedName); - $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 = DomainsClient::registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - - delete_registration_sample($formattedName); -} -// [END domains_v1beta1_generated_Domains_DeleteRegistration_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/export_registration.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/export_registration.php deleted file mode 100644 index f246a75846db..000000000000 --- a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/export_registration.php +++ /dev/null @@ -1,87 +0,0 @@ -exportRegistration($formattedName); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Registration $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DomainsClient::registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - - export_registration_sample($formattedName); -} -// [END domains_v1beta1_generated_Domains_ExportRegistration_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/get_registration.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/get_registration.php deleted file mode 100644 index f869ab11af8d..000000000000 --- a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/get_registration.php +++ /dev/null @@ -1,67 +0,0 @@ -getRegistration($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DomainsClient::registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - - get_registration_sample($formattedName); -} -// [END domains_v1beta1_generated_Domains_GetRegistration_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/list_registrations.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/list_registrations.php deleted file mode 100644 index 55ef0d68920c..000000000000 --- a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/list_registrations.php +++ /dev/null @@ -1,72 +0,0 @@ -listRegistrations($formattedParent); - - /** @var Registration $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 = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); - - list_registrations_sample($formattedParent); -} -// [END domains_v1beta1_generated_Domains_ListRegistrations_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/register_domain.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/register_domain.php deleted file mode 100644 index 5df3d43abca0..000000000000 --- a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/register_domain.php +++ /dev/null @@ -1,160 +0,0 @@ -setPostalAddress($registrationContactSettingsRegistrantContactPostalAddress) - ->setEmail($registrationContactSettingsRegistrantContactEmail) - ->setPhoneNumber($registrationContactSettingsRegistrantContactPhoneNumber); - $registrationContactSettingsAdminContactPostalAddress = new PostalAddress(); - $registrationContactSettingsAdminContact = (new Contact()) - ->setPostalAddress($registrationContactSettingsAdminContactPostalAddress) - ->setEmail($registrationContactSettingsAdminContactEmail) - ->setPhoneNumber($registrationContactSettingsAdminContactPhoneNumber); - $registrationContactSettingsTechnicalContactPostalAddress = new PostalAddress(); - $registrationContactSettingsTechnicalContact = (new Contact()) - ->setPostalAddress($registrationContactSettingsTechnicalContactPostalAddress) - ->setEmail($registrationContactSettingsTechnicalContactEmail) - ->setPhoneNumber($registrationContactSettingsTechnicalContactPhoneNumber); - $registrationContactSettings = (new ContactSettings()) - ->setPrivacy($registrationContactSettingsPrivacy) - ->setRegistrantContact($registrationContactSettingsRegistrantContact) - ->setAdminContact($registrationContactSettingsAdminContact) - ->setTechnicalContact($registrationContactSettingsTechnicalContact); - $registration = (new Registration()) - ->setDomainName($registrationDomainName) - ->setContactSettings($registrationContactSettings); - $yearlyPrice = new Money(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $domainsClient->registerDomain($formattedParent, $registration, $yearlyPrice); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Registration $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); - $registrationDomainName = '[DOMAIN_NAME]'; - $registrationContactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; - $registrationContactSettingsRegistrantContactEmail = '[EMAIL]'; - $registrationContactSettingsRegistrantContactPhoneNumber = '[PHONE_NUMBER]'; - $registrationContactSettingsAdminContactEmail = '[EMAIL]'; - $registrationContactSettingsAdminContactPhoneNumber = '[PHONE_NUMBER]'; - $registrationContactSettingsTechnicalContactEmail = '[EMAIL]'; - $registrationContactSettingsTechnicalContactPhoneNumber = '[PHONE_NUMBER]'; - - register_domain_sample( - $formattedParent, - $registrationDomainName, - $registrationContactSettingsPrivacy, - $registrationContactSettingsRegistrantContactEmail, - $registrationContactSettingsRegistrantContactPhoneNumber, - $registrationContactSettingsAdminContactEmail, - $registrationContactSettingsAdminContactPhoneNumber, - $registrationContactSettingsTechnicalContactEmail, - $registrationContactSettingsTechnicalContactPhoneNumber - ); -} -// [END domains_v1beta1_generated_Domains_RegisterDomain_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/reset_authorization_code.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/reset_authorization_code.php deleted file mode 100644 index dd8674b7b307..000000000000 --- a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/reset_authorization_code.php +++ /dev/null @@ -1,74 +0,0 @@ -resetAuthorizationCode($formattedRegistration); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedRegistration = DomainsClient::registrationName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRATION]' - ); - - reset_authorization_code_sample($formattedRegistration); -} -// [END domains_v1beta1_generated_Domains_ResetAuthorizationCode_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_authorization_code.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_authorization_code.php deleted file mode 100644 index fd466f2dc6ac..000000000000 --- a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_authorization_code.php +++ /dev/null @@ -1,75 +0,0 @@ -retrieveAuthorizationCode($formattedRegistration); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedRegistration = DomainsClient::registrationName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRATION]' - ); - - retrieve_authorization_code_sample($formattedRegistration); -} -// [END domains_v1beta1_generated_Domains_RetrieveAuthorizationCode_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_register_parameters.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_register_parameters.php deleted file mode 100644 index 4bec1c04dca6..000000000000 --- a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_register_parameters.php +++ /dev/null @@ -1,69 +0,0 @@ -retrieveRegisterParameters($domainName, $formattedLocation); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 = '[DOMAIN_NAME]'; - $formattedLocation = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); - - retrieve_register_parameters_sample($domainName, $formattedLocation); -} -// [END domains_v1beta1_generated_Domains_RetrieveRegisterParameters_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_transfer_parameters.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_transfer_parameters.php deleted file mode 100644 index e356103e698a..000000000000 --- a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/retrieve_transfer_parameters.php +++ /dev/null @@ -1,73 +0,0 @@ -retrieveTransferParameters($domainName, $formattedLocation); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 = '[DOMAIN_NAME]'; - $formattedLocation = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); - - retrieve_transfer_parameters_sample($domainName, $formattedLocation); -} -// [END domains_v1beta1_generated_Domains_RetrieveTransferParameters_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/search_domains.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/search_domains.php deleted file mode 100644 index 561d41f65a99..000000000000 --- a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/search_domains.php +++ /dev/null @@ -1,72 +0,0 @@ -searchDomains($query, $formattedLocation); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $query = '[QUERY]'; - $formattedLocation = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); - - search_domains_sample($query, $formattedLocation); -} -// [END domains_v1beta1_generated_Domains_SearchDomains_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/transfer_domain.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/transfer_domain.php deleted file mode 100644 index 8f3de899a1fd..000000000000 --- a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/transfer_domain.php +++ /dev/null @@ -1,168 +0,0 @@ -setPostalAddress($registrationContactSettingsRegistrantContactPostalAddress) - ->setEmail($registrationContactSettingsRegistrantContactEmail) - ->setPhoneNumber($registrationContactSettingsRegistrantContactPhoneNumber); - $registrationContactSettingsAdminContactPostalAddress = new PostalAddress(); - $registrationContactSettingsAdminContact = (new Contact()) - ->setPostalAddress($registrationContactSettingsAdminContactPostalAddress) - ->setEmail($registrationContactSettingsAdminContactEmail) - ->setPhoneNumber($registrationContactSettingsAdminContactPhoneNumber); - $registrationContactSettingsTechnicalContactPostalAddress = new PostalAddress(); - $registrationContactSettingsTechnicalContact = (new Contact()) - ->setPostalAddress($registrationContactSettingsTechnicalContactPostalAddress) - ->setEmail($registrationContactSettingsTechnicalContactEmail) - ->setPhoneNumber($registrationContactSettingsTechnicalContactPhoneNumber); - $registrationContactSettings = (new ContactSettings()) - ->setPrivacy($registrationContactSettingsPrivacy) - ->setRegistrantContact($registrationContactSettingsRegistrantContact) - ->setAdminContact($registrationContactSettingsAdminContact) - ->setTechnicalContact($registrationContactSettingsTechnicalContact); - $registration = (new Registration()) - ->setDomainName($registrationDomainName) - ->setContactSettings($registrationContactSettings); - $yearlyPrice = new Money(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $domainsClient->transferDomain($formattedParent, $registration, $yearlyPrice); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Registration $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DomainsClient::locationName('[PROJECT]', '[LOCATION]'); - $registrationDomainName = '[DOMAIN_NAME]'; - $registrationContactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; - $registrationContactSettingsRegistrantContactEmail = '[EMAIL]'; - $registrationContactSettingsRegistrantContactPhoneNumber = '[PHONE_NUMBER]'; - $registrationContactSettingsAdminContactEmail = '[EMAIL]'; - $registrationContactSettingsAdminContactPhoneNumber = '[PHONE_NUMBER]'; - $registrationContactSettingsTechnicalContactEmail = '[EMAIL]'; - $registrationContactSettingsTechnicalContactPhoneNumber = '[PHONE_NUMBER]'; - - transfer_domain_sample( - $formattedParent, - $registrationDomainName, - $registrationContactSettingsPrivacy, - $registrationContactSettingsRegistrantContactEmail, - $registrationContactSettingsRegistrantContactPhoneNumber, - $registrationContactSettingsAdminContactEmail, - $registrationContactSettingsAdminContactPhoneNumber, - $registrationContactSettingsTechnicalContactEmail, - $registrationContactSettingsTechnicalContactPhoneNumber - ); -} -// [END domains_v1beta1_generated_Domains_TransferDomain_sync] diff --git a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/update_registration.php b/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/update_registration.php deleted file mode 100644 index 0d2eb4ecde5d..000000000000 --- a/owl-bot-staging/Domains/v1beta1/samples/V1beta1/DomainsClient/update_registration.php +++ /dev/null @@ -1,74 +0,0 @@ -updateRegistration($updateMask); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Registration $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - 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 domains_v1beta1_generated_Domains_UpdateRegistration_sync] diff --git a/owl-bot-staging/Domains/v1beta1/src/V1beta1/DomainsClient.php b/owl-bot-staging/Domains/v1beta1/src/V1beta1/DomainsClient.php deleted file mode 100644 index 864ad2aaa278..000000000000 --- a/owl-bot-staging/Domains/v1beta1/src/V1beta1/DomainsClient.php +++ /dev/null @@ -1,36 +0,0 @@ -registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $updateMask = new FieldMask(); - * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureContactSettings'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->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. - * - * @experimental - */ -class DomainsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.domains.v1beta1.Domains'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'domains.googleapis.com'; - - /** 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 $locationNameTemplate; - - private static $registrationNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/domains_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/domains_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/domains_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/domains_rest_client_config.php', - ], - ], - ]; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getRegistrationNameTemplate() - { - if (self::$registrationNameTemplate == null) { - self::$registrationNameTemplate = new PathTemplate('projects/{project}/locations/{location}/registrations/{registration}'); - } - - return self::$registrationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'location' => self::getLocationNameTemplate(), - 'registration' => self::getRegistrationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * 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. - * - * @experimental - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a registration - * resource. - * - * @param string $project - * @param string $location - * @param string $registration - * - * @return string The formatted registration resource. - * - * @experimental - */ - public static function registrationName($project, $location, $registration) - { - return self::getRegistrationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'registration' => $registration, - ]); - } - - /** - * 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} - * - registration: projects/{project}/locations/{location}/registrations/{registration} - * - * 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. - * - * @experimental - */ - 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"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - * - * @experimental - */ - 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 - * - * @experimental - */ - 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; - } - - /** - * 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 'domains.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Updates a `Registration`'s contact settings. Some changes require - * confirmation by the domain's registrant contact . - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $updateMask = new FieldMask(); - * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->configureContactSettings($formattedRegistration, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureContactSettings'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $registration Required. The name of the `Registration` whose contact settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the registrant contact is being updated, the - * `update_mask` is `"registrant_contact"`. - * @param array $optionalArgs { - * Optional. - * - * @type ContactSettings $contactSettings - * Fields of the `ContactSettings` to update. - * @type int[] $contactNotices - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in `contact_settings`. - * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1beta1\ContactNotice} - * @type bool $validateOnly - * Validate the request without actually updating the contact settings. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function configureContactSettings($registration, $updateMask, array $optionalArgs = []) - { - $request = new ConfigureContactSettingsRequest(); - $requestParamHeaders = []; - $request->setRegistration($registration); - $request->setUpdateMask($updateMask); - $requestParamHeaders['registration'] = $registration; - if (isset($optionalArgs['contactSettings'])) { - $request->setContactSettings($optionalArgs['contactSettings']); - } - - if (isset($optionalArgs['contactNotices'])) { - $request->setContactNotices($optionalArgs['contactNotices']); - } - - 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->startOperationsCall('ConfigureContactSettings', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a `Registration`'s DNS settings. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $updateMask = new FieldMask(); - * $operationResponse = $domainsClient->configureDnsSettings($formattedRegistration, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->configureDnsSettings($formattedRegistration, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureDnsSettings'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $registration Required. The name of the `Registration` whose DNS settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the name servers are being updated for an existing - * Custom DNS configuration, the `update_mask` is - * `"custom_dns.name_servers"`. - * - * When changing the DNS provider from one type to another, pass the new - * provider's field name as part of the field mask. For example, when changing - * from a Google Domains DNS configuration to a Custom DNS configuration, the - * `update_mask` is `"custom_dns"`. // - * @param array $optionalArgs { - * Optional. - * - * @type DnsSettings $dnsSettings - * Fields of the `DnsSettings` to update. - * @type bool $validateOnly - * Validate the request without actually updating the DNS settings. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function configureDnsSettings($registration, $updateMask, array $optionalArgs = []) - { - $request = new ConfigureDnsSettingsRequest(); - $requestParamHeaders = []; - $request->setRegistration($registration); - $request->setUpdateMask($updateMask); - $requestParamHeaders['registration'] = $registration; - if (isset($optionalArgs['dnsSettings'])) { - $request->setDnsSettings($optionalArgs['dnsSettings']); - } - - 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->startOperationsCall('ConfigureDnsSettings', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a `Registration`'s management settings. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $updateMask = new FieldMask(); - * $operationResponse = $domainsClient->configureManagementSettings($formattedRegistration, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->configureManagementSettings($formattedRegistration, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'configureManagementSettings'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $registration Required. The name of the `Registration` whose management settings are being updated, - * in the format `projects/*/locations/*/registrations/*`. - * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the transfer lock is being updated, the `update_mask` - * is `"transfer_lock_state"`. - * @param array $optionalArgs { - * Optional. - * - * @type ManagementSettings $managementSettings - * Fields of the `ManagementSettings` 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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function configureManagementSettings($registration, $updateMask, array $optionalArgs = []) - { - $request = new ConfigureManagementSettingsRequest(); - $requestParamHeaders = []; - $request->setRegistration($registration); - $request->setUpdateMask($updateMask); - $requestParamHeaders['registration'] = $registration; - if (isset($optionalArgs['managementSettings'])) { - $request->setManagementSettings($optionalArgs['managementSettings']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ConfigureManagementSettings', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a `Registration` resource. - * - * This method works on any `Registration` resource using [Subscription or - * Commitment billing](/domains/pricing#billing-models), provided that the - * resource was created at least 1 day in the past. - * - * For `Registration` resources using - * [Monthly billing](/domains/pricing#billing-models), this method works if: - * - * * `state` is `EXPORTED` with `expire_time` in the past - * * `state` is `REGISTRATION_FAILED` - * * `state` is `TRANSFER_FAILED` - * - * When an active registration is successfully deleted, you can continue to - * use the domain in [Google Domains](https://domains.google/) until it - * expires. The calling user becomes the domain's sole owner in Google - * Domains, and permissions for the domain are subsequently managed there. The - * domain does not renew automatically unless the new owner sets up billing in - * Google Domains. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedName = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $operationResponse = $domainsClient->deleteRegistration($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->deleteRegistration($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'deleteRegistration'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the `Registration` to delete, - * in the format `projects/*/locations/*/registrations/*`. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteRegistration($name, array $optionalArgs = []) - { - $request = new DeleteRegistrationRequest(); - $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->startOperationsCall('DeleteRegistration', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Exports a `Registration` resource, such that it is no longer managed by - * Cloud Domains. - * - * When an active domain is successfully exported, you can continue to use the - * domain in [Google Domains](https://domains.google/) until it expires. The - * calling user becomes the domain's sole owner in Google Domains, and - * permissions for the domain are subsequently managed there. The domain does - * not renew automatically unless the new owner sets up billing in Google - * Domains. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedName = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $operationResponse = $domainsClient->exportRegistration($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->exportRegistration($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'exportRegistration'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the `Registration` to export, - * in the format `projects/*/locations/*/registrations/*`. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function exportRegistration($name, array $optionalArgs = []) - { - $request = new ExportRegistrationRequest(); - $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->startOperationsCall('ExportRegistration', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the details of a `Registration` resource. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedName = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $response = $domainsClient->getRegistration($formattedName); - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the `Registration` to get, in the format - * `projects/*/locations/*/registrations/*`. - * @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\Domains\V1beta1\Registration - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getRegistration($name, array $optionalArgs = []) - { - $request = new GetRegistrationRequest(); - $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('GetRegistration', Registration::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the `Registration` resources in a project. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedParent = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $domainsClient->listRegistrations($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $domainsClient->listRegistrations($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and location from which to list `Registration`s, specified in - * the format `projects/*/locations/*`. - * @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 - * Filter expression to restrict the `Registration`s returned. - * - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, a boolean, or an enum value. The comparison operator should be one - * of =, !=, >, <, >=, <=, or : for prefix or wildcard matches. - * - * For example, to filter to a specific domain name, use an expression like - * `domainName="example.com"`. You can also check for the existence of a - * field; for example, to find domains using custom DNS settings, use an - * expression like `dnsSettings.customDns:*`. - * - * You can also create compound filters by combining expressions with the - * `AND` and `OR` operators. For example, to find domains that are suspended - * or have specific issues flagged, use an expression like - * `(state=SUSPENDED) OR (issue:*)`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 - * - * @experimental - */ - public function listRegistrations($parent, array $optionalArgs = []) - { - $request = new ListRegistrationsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListRegistrations', $optionalArgs, ListRegistrationsResponse::class, $request); - } - - /** - * Registers a new domain name and creates a corresponding `Registration` - * resource. - * - * Call `RetrieveRegisterParameters` first to check availability of the domain - * name and determine parameters like price that are needed to build a call to - * this method. - * - * A successful call creates a `Registration` resource in state - * `REGISTRATION_PENDING`, which resolves to `ACTIVE` within 1-2 - * minutes, indicating that the domain was successfully registered. If the - * resource ends up in state `REGISTRATION_FAILED`, it indicates that the - * domain was not registered successfully, and you can safely delete the - * resource and retry registration. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedParent = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); - * $registration = new Registration(); - * $yearlyPrice = new Money(); - * $operationResponse = $domainsClient->registerDomain($formattedParent, $registration, $yearlyPrice); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->registerDomain($formattedParent, $registration, $yearlyPrice); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'registerDomain'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the `Registration`. Must be in the - * format `projects/*/locations/*`. - * @param Registration $registration Required. The complete `Registration` resource to be created. - * @param Money $yearlyPrice Required. Yearly price to register or renew the domain. - * The value that should be put here can be obtained from - * RetrieveRegisterParameters or SearchDomains calls. - * @param array $optionalArgs { - * Optional. - * - * @type int[] $domainNotices - * The list of domain notices that you acknowledge. Call - * `RetrieveRegisterParameters` to see the notices that need acknowledgement. - * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1beta1\DomainNotice} - * @type int[] $contactNotices - * The list of contact notices that the caller acknowledges. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1beta1\ContactNotice} - * @type bool $validateOnly - * When true, only validation is performed, without actually registering - * the domain. Follows: - * https://cloud.google.com/apis/design/design_patterns#request_validation - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function registerDomain($parent, $registration, $yearlyPrice, array $optionalArgs = []) - { - $request = new RegisterDomainRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setRegistration($registration); - $request->setYearlyPrice($yearlyPrice); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['domainNotices'])) { - $request->setDomainNotices($optionalArgs['domainNotices']); - } - - if (isset($optionalArgs['contactNotices'])) { - $request->setContactNotices($optionalArgs['contactNotices']); - } - - 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->startOperationsCall('RegisterDomain', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Resets the authorization code of the `Registration` to a new random string. - * - * You can call this method only after 60 days have elapsed since the initial - * domain registration. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $response = $domainsClient->resetAuthorizationCode($formattedRegistration); - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $registration Required. The name of the `Registration` whose authorization code is being reset, - * in the format `projects/*/locations/*/registrations/*`. - * @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\Domains\V1beta1\AuthorizationCode - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function resetAuthorizationCode($registration, array $optionalArgs = []) - { - $request = new ResetAuthorizationCodeRequest(); - $requestParamHeaders = []; - $request->setRegistration($registration); - $requestParamHeaders['registration'] = $registration; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ResetAuthorizationCode', AuthorizationCode::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the authorization code of the `Registration` for the purpose of - * transferring the domain to another registrar. - * - * You can call this method only after 60 days have elapsed since the initial - * domain registration. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedRegistration = $domainsClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - * $response = $domainsClient->retrieveAuthorizationCode($formattedRegistration); - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $registration Required. The name of the `Registration` whose authorization code is being retrieved, - * in the format `projects/*/locations/*/registrations/*`. - * @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\Domains\V1beta1\AuthorizationCode - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function retrieveAuthorizationCode($registration, array $optionalArgs = []) - { - $request = new RetrieveAuthorizationCodeRequest(); - $requestParamHeaders = []; - $request->setRegistration($registration); - $requestParamHeaders['registration'] = $registration; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RetrieveAuthorizationCode', AuthorizationCode::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets parameters needed to register a new domain name, including price and - * up-to-date availability. Use the returned values to call `RegisterDomain`. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $domainName = 'domain_name'; - * $formattedLocation = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $domainsClient->retrieveRegisterParameters($domainName, $formattedLocation); - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $domainName Required. The domain name. Unicode domain names must be expressed in Punycode format. - * @param string $location Required. The location. Must be in the format `projects/*/locations/*`. - * @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\Domains\V1beta1\RetrieveRegisterParametersResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function retrieveRegisterParameters($domainName, $location, array $optionalArgs = []) - { - $request = new RetrieveRegisterParametersRequest(); - $requestParamHeaders = []; - $request->setDomainName($domainName); - $request->setLocation($location); - $requestParamHeaders['location'] = $location; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RetrieveRegisterParameters', RetrieveRegisterParametersResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets parameters needed to transfer a domain name from another registrar to - * Cloud Domains. For domains managed by Google Domains, transferring to Cloud - * Domains is not supported. - * - * - * Use the returned values to call `TransferDomain`. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $domainName = 'domain_name'; - * $formattedLocation = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $domainsClient->retrieveTransferParameters($domainName, $formattedLocation); - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $domainName Required. The domain name. Unicode domain names must be expressed in Punycode format. - * @param string $location Required. The location. Must be in the format `projects/*/locations/*`. - * @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\Domains\V1beta1\RetrieveTransferParametersResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function retrieveTransferParameters($domainName, $location, array $optionalArgs = []) - { - $request = new RetrieveTransferParametersRequest(); - $requestParamHeaders = []; - $request->setDomainName($domainName); - $request->setLocation($location); - $requestParamHeaders['location'] = $location; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RetrieveTransferParameters', RetrieveTransferParametersResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Searches for available domain names similar to the provided query. - * - * Availability results from this method are approximate; call - * `RetrieveRegisterParameters` on a domain before registering to confirm - * availability. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $query = 'query'; - * $formattedLocation = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $domainsClient->searchDomains($query, $formattedLocation); - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $query Required. String used to search for available domain names. - * @param string $location Required. The location. Must be in the format `projects/*/locations/*`. - * @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\Domains\V1beta1\SearchDomainsResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function searchDomains($query, $location, array $optionalArgs = []) - { - $request = new SearchDomainsRequest(); - $requestParamHeaders = []; - $request->setQuery($query); - $request->setLocation($location); - $requestParamHeaders['location'] = $location; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SearchDomains', SearchDomainsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Transfers a domain name from another registrar to Cloud Domains. For - * domains managed by Google Domains, transferring to Cloud Domains is not - * supported. - * - * - * Before calling this method, go to the domain's current registrar to unlock - * the domain for transfer and retrieve the domain's transfer authorization - * code. Then call `RetrieveTransferParameters` to confirm that the domain is - * unlocked and to get values needed to build a call to this method. - * - * A successful call creates a `Registration` resource in state - * `TRANSFER_PENDING`. It can take several days to complete the transfer - * process. The registrant can often speed up this process by approving the - * transfer through the current registrar, either by clicking a link in an - * email from the registrar or by visiting the registrar's website. - * - * A few minutes after transfer approval, the resource transitions to state - * `ACTIVE`, indicating that the transfer was successful. If the transfer is - * rejected or the request expires without being approved, the resource can - * end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete - * the resource and retry the transfer. - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $formattedParent = $domainsClient->locationName('[PROJECT]', '[LOCATION]'); - * $registration = new Registration(); - * $yearlyPrice = new Money(); - * $operationResponse = $domainsClient->transferDomain($formattedParent, $registration, $yearlyPrice); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->transferDomain($formattedParent, $registration, $yearlyPrice); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'transferDomain'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the `Registration`. Must be in the - * format `projects/*/locations/*`. - * @param Registration $registration Required. The complete `Registration` resource to be created. - * - * You can leave `registration.dns_settings` unset to import the - * domain's current DNS configuration from its current registrar. Use this - * option only if you are sure that the domain's current DNS service - * does not cease upon transfer, as is often the case for DNS services - * provided for free by the registrar. - * @param Money $yearlyPrice Required. Acknowledgement of the price to transfer or renew the domain for one year. - * Call `RetrieveTransferParameters` to obtain the price, which you must - * acknowledge. - * @param array $optionalArgs { - * Optional. - * - * @type int[] $contactNotices - * The list of contact notices that you acknowledge. The notices - * needed here depend on the values specified in - * `registration.contact_settings`. - * For allowed values, use constants defined on {@see \Google\Cloud\Domains\V1beta1\ContactNotice} - * @type AuthorizationCode $authorizationCode - * The domain's transfer authorization code. You can obtain this from the - * domain's current registrar. - * @type bool $validateOnly - * Validate the request without actually transferring the domain. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function transferDomain($parent, $registration, $yearlyPrice, array $optionalArgs = []) - { - $request = new TransferDomainRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setRegistration($registration); - $request->setYearlyPrice($yearlyPrice); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['contactNotices'])) { - $request->setContactNotices($optionalArgs['contactNotices']); - } - - if (isset($optionalArgs['authorizationCode'])) { - $request->setAuthorizationCode($optionalArgs['authorizationCode']); - } - - 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->startOperationsCall('TransferDomain', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates select fields of a `Registration` resource, notably `labels`. To - * update other fields, use the appropriate custom update method: - * - * * To update management settings, see `ConfigureManagementSettings` - * * To update DNS configuration, see `ConfigureDnsSettings` - * * To update contact information, see `ConfigureContactSettings` - * - * Sample code: - * ``` - * $domainsClient = new DomainsClient(); - * try { - * $updateMask = new FieldMask(); - * $operationResponse = $domainsClient->updateRegistration($updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $domainsClient->updateRegistration($updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $domainsClient->resumeOperation($operationName, 'updateRegistration'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $domainsClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. The field mask describing which fields to update as a comma-separated list. - * For example, if only the labels are being updated, the `update_mask` is - * `"labels"`. - * @param array $optionalArgs { - * Optional. - * - * @type Registration $registration - * Fields of the `Registration` 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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateRegistration($updateMask, array $optionalArgs = []) - { - $request = new UpdateRegistrationRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - if (isset($optionalArgs['registration'])) { - $request->setRegistration($optionalArgs['registration']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateRegistration', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/Domains/v1beta1/src/V1beta1/gapic_metadata.json b/owl-bot-staging/Domains/v1beta1/src/V1beta1/gapic_metadata.json deleted file mode 100644 index fd839fab3d82..000000000000 --- a/owl-bot-staging/Domains/v1beta1/src/V1beta1/gapic_metadata.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.domains.v1beta1", - "libraryPackage": "Google\\Cloud\\Domains\\V1beta1", - "services": { - "Domains": { - "clients": { - "grpc": { - "libraryClient": "DomainsGapicClient", - "rpcs": { - "ConfigureContactSettings": { - "methods": [ - "configureContactSettings" - ] - }, - "ConfigureDnsSettings": { - "methods": [ - "configureDnsSettings" - ] - }, - "ConfigureManagementSettings": { - "methods": [ - "configureManagementSettings" - ] - }, - "DeleteRegistration": { - "methods": [ - "deleteRegistration" - ] - }, - "ExportRegistration": { - "methods": [ - "exportRegistration" - ] - }, - "GetRegistration": { - "methods": [ - "getRegistration" - ] - }, - "ListRegistrations": { - "methods": [ - "listRegistrations" - ] - }, - "RegisterDomain": { - "methods": [ - "registerDomain" - ] - }, - "ResetAuthorizationCode": { - "methods": [ - "resetAuthorizationCode" - ] - }, - "RetrieveAuthorizationCode": { - "methods": [ - "retrieveAuthorizationCode" - ] - }, - "RetrieveRegisterParameters": { - "methods": [ - "retrieveRegisterParameters" - ] - }, - "RetrieveTransferParameters": { - "methods": [ - "retrieveTransferParameters" - ] - }, - "SearchDomains": { - "methods": [ - "searchDomains" - ] - }, - "TransferDomain": { - "methods": [ - "transferDomain" - ] - }, - "UpdateRegistration": { - "methods": [ - "updateRegistration" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_client_config.json b/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_client_config.json deleted file mode 100644 index 26b7a889c460..000000000000 --- a/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_client_config.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "interfaces": { - "google.cloud.domains.v1beta1.Domains": { - "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": { - "ConfigureContactSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ConfigureDnsSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ConfigureManagementSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteRegistration": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ExportRegistration": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetRegistration": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListRegistrations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RegisterDomain": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ResetAuthorizationCode": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RetrieveAuthorizationCode": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RetrieveRegisterParameters": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RetrieveTransferParameters": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SearchDomains": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TransferDomain": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateRegistration": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_descriptor_config.php b/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_descriptor_config.php deleted file mode 100644 index e243d0114897..000000000000 --- a/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_descriptor_config.php +++ /dev/null @@ -1,98 +0,0 @@ - [ - 'google.cloud.domains.v1beta1.Domains' => [ - 'ConfigureContactSettings' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Domains\V1beta1\Registration', - 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ConfigureDnsSettings' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Domains\V1beta1\Registration', - 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ConfigureManagementSettings' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Domains\V1beta1\Registration', - 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteRegistration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ExportRegistration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Domains\V1beta1\Registration', - 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'RegisterDomain' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Domains\V1beta1\Registration', - 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'TransferDomain' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Domains\V1beta1\Registration', - 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateRegistration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Domains\V1beta1\Registration', - 'metadataReturnType' => '\Google\Cloud\Domains\V1beta1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListRegistrations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRegistrations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_rest_client_config.php b/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_rest_client_config.php deleted file mode 100644 index 0d8c43034439..000000000000 --- a/owl-bot-staging/Domains/v1beta1/src/V1beta1/resources/domains_rest_client_config.php +++ /dev/null @@ -1,271 +0,0 @@ - [ - 'google.cloud.domains.v1beta1.Domains' => [ - 'ConfigureContactSettings' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{registration=projects/*/locations/*/registrations/*}:configureContactSettings', - 'body' => '*', - 'placeholders' => [ - 'registration' => [ - 'getters' => [ - 'getRegistration', - ], - ], - ], - ], - 'ConfigureDnsSettings' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{registration=projects/*/locations/*/registrations/*}:configureDnsSettings', - 'body' => '*', - 'placeholders' => [ - 'registration' => [ - 'getters' => [ - 'getRegistration', - ], - ], - ], - ], - 'ConfigureManagementSettings' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{registration=projects/*/locations/*/registrations/*}:configureManagementSettings', - 'body' => '*', - 'placeholders' => [ - 'registration' => [ - 'getters' => [ - 'getRegistration', - ], - ], - ], - ], - 'DeleteRegistration' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/registrations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportRegistration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/registrations/*}:export', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRegistration' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/registrations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListRegistrations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/registrations', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RegisterDomain' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/registrations:register', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ResetAuthorizationCode' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{registration=projects/*/locations/*/registrations/*}:resetAuthorizationCode', - 'body' => '*', - 'placeholders' => [ - 'registration' => [ - 'getters' => [ - 'getRegistration', - ], - ], - ], - ], - 'RetrieveAuthorizationCode' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{registration=projects/*/locations/*/registrations/*}:retrieveAuthorizationCode', - 'placeholders' => [ - 'registration' => [ - 'getters' => [ - 'getRegistration', - ], - ], - ], - ], - 'RetrieveRegisterParameters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{location=projects/*/locations/*}/registrations:retrieveRegisterParameters', - 'placeholders' => [ - 'location' => [ - 'getters' => [ - 'getLocation', - ], - ], - ], - ], - 'RetrieveTransferParameters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{location=projects/*/locations/*}/registrations:retrieveTransferParameters', - 'placeholders' => [ - 'location' => [ - 'getters' => [ - 'getLocation', - ], - ], - ], - ], - 'SearchDomains' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{location=projects/*/locations/*}/registrations:searchDomains', - 'placeholders' => [ - 'location' => [ - 'getters' => [ - 'getLocation', - ], - ], - ], - ], - 'TransferDomain' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/registrations:transfer', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateRegistration' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1beta1/{registration.name=projects/*/locations/*/registrations/*}', - 'body' => 'registration', - 'placeholders' => [ - 'registration.name' => [ - 'getters' => [ - 'getRegistration', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/registrations/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/registrations/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/registrations/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Domains/v1beta1/tests/Unit/V1beta1/DomainsClientTest.php b/owl-bot-staging/Domains/v1beta1/tests/Unit/V1beta1/DomainsClientTest.php deleted file mode 100644 index dc8514072518..000000000000 --- a/owl-bot-staging/Domains/v1beta1/tests/Unit/V1beta1/DomainsClientTest.php +++ /dev/null @@ -1,1625 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DomainsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DomainsClient($options); - } - - /** @test */ - public function configureContactSettingsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/configureContactSettingsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name); - $expectedResponse->setDomainName($domainName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/configureContactSettingsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $updateMask = new FieldMask(); - $response = $gapicClient->configureContactSettings($formattedRegistration, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1beta1.Domains/ConfigureContactSettings', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRegistration(); - $this->assertProtobufEquals($formattedRegistration, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/configureContactSettingsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function configureContactSettingsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/configureContactSettingsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $updateMask = new FieldMask(); - $response = $gapicClient->configureContactSettings($formattedRegistration, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/configureContactSettingsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function configureDnsSettingsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/configureDnsSettingsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name); - $expectedResponse->setDomainName($domainName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/configureDnsSettingsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $updateMask = new FieldMask(); - $response = $gapicClient->configureDnsSettings($formattedRegistration, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1beta1.Domains/ConfigureDnsSettings', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRegistration(); - $this->assertProtobufEquals($formattedRegistration, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/configureDnsSettingsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function configureDnsSettingsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/configureDnsSettingsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $updateMask = new FieldMask(); - $response = $gapicClient->configureDnsSettings($formattedRegistration, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/configureDnsSettingsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function configureManagementSettingsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/configureManagementSettingsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name); - $expectedResponse->setDomainName($domainName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/configureManagementSettingsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $updateMask = new FieldMask(); - $response = $gapicClient->configureManagementSettings($formattedRegistration, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1beta1.Domains/ConfigureManagementSettings', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRegistration(); - $this->assertProtobufEquals($formattedRegistration, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/configureManagementSettingsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function configureManagementSettingsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/configureManagementSettingsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $updateMask = new FieldMask(); - $response = $gapicClient->configureManagementSettings($formattedRegistration, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/configureManagementSettingsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRegistrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRegistrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteRegistrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $response = $gapicClient->deleteRegistration($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1beta1.Domains/DeleteRegistration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRegistrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRegistrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRegistrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $response = $gapicClient->deleteRegistration($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRegistrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function exportRegistrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportRegistrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name2); - $expectedResponse->setDomainName($domainName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportRegistrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $response = $gapicClient->exportRegistration($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1beta1.Domains/ExportRegistration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportRegistrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function exportRegistrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportRegistrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $response = $gapicClient->exportRegistration($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportRegistrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getRegistrationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name2); - $expectedResponse->setDomainName($domainName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $response = $gapicClient->getRegistration($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1beta1.Domains/GetRegistration', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRegistrationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - try { - $gapicClient->getRegistration($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 listRegistrationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $registrationsElement = new Registration(); - $registrations = [ - $registrationsElement, - ]; - $expectedResponse = new ListRegistrationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRegistrations($registrations); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listRegistrations($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRegistrations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1beta1.Domains/ListRegistrations', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRegistrationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listRegistrations($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 registerDomainTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/registerDomainTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name); - $expectedResponse->setDomainName($domainName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/registerDomainTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $registration = new Registration(); - $registrationDomainName = 'registrationDomainName1873916680'; - $registration->setDomainName($registrationDomainName); - $registrationContactSettings = new ContactSettings(); - $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; - $registrationContactSettings->setPrivacy($contactSettingsPrivacy); - $contactSettingsRegistrantContact = new Contact(); - $registrantContactPostalAddress = new PostalAddress(); - $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); - $registrantContactEmail = 'registrantContactEmail1001340839'; - $contactSettingsRegistrantContact->setEmail($registrantContactEmail); - $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; - $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); - $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); - $contactSettingsAdminContact = new Contact(); - $adminContactPostalAddress = new PostalAddress(); - $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); - $adminContactEmail = 'adminContactEmail1687004235'; - $contactSettingsAdminContact->setEmail($adminContactEmail); - $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; - $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); - $registrationContactSettings->setAdminContact($contactSettingsAdminContact); - $contactSettingsTechnicalContact = new Contact(); - $technicalContactPostalAddress = new PostalAddress(); - $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); - $technicalContactEmail = 'technicalContactEmail-221168807'; - $contactSettingsTechnicalContact->setEmail($technicalContactEmail); - $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; - $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); - $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); - $registration->setContactSettings($registrationContactSettings); - $yearlyPrice = new Money(); - $response = $gapicClient->registerDomain($formattedParent, $registration, $yearlyPrice); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1beta1.Domains/RegisterDomain', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRegistration(); - $this->assertProtobufEquals($registration, $actualValue); - $actualValue = $actualApiRequestObject->getYearlyPrice(); - $this->assertProtobufEquals($yearlyPrice, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/registerDomainTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function registerDomainExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/registerDomainTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $registration = new Registration(); - $registrationDomainName = 'registrationDomainName1873916680'; - $registration->setDomainName($registrationDomainName); - $registrationContactSettings = new ContactSettings(); - $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; - $registrationContactSettings->setPrivacy($contactSettingsPrivacy); - $contactSettingsRegistrantContact = new Contact(); - $registrantContactPostalAddress = new PostalAddress(); - $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); - $registrantContactEmail = 'registrantContactEmail1001340839'; - $contactSettingsRegistrantContact->setEmail($registrantContactEmail); - $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; - $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); - $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); - $contactSettingsAdminContact = new Contact(); - $adminContactPostalAddress = new PostalAddress(); - $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); - $adminContactEmail = 'adminContactEmail1687004235'; - $contactSettingsAdminContact->setEmail($adminContactEmail); - $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; - $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); - $registrationContactSettings->setAdminContact($contactSettingsAdminContact); - $contactSettingsTechnicalContact = new Contact(); - $technicalContactPostalAddress = new PostalAddress(); - $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); - $technicalContactEmail = 'technicalContactEmail-221168807'; - $contactSettingsTechnicalContact->setEmail($technicalContactEmail); - $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; - $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); - $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); - $registration->setContactSettings($registrationContactSettings); - $yearlyPrice = new Money(); - $response = $gapicClient->registerDomain($formattedParent, $registration, $yearlyPrice); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/registerDomainTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resetAuthorizationCodeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $code = 'code3059181'; - $expectedResponse = new AuthorizationCode(); - $expectedResponse->setCode($code); - $transport->addResponse($expectedResponse); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $response = $gapicClient->resetAuthorizationCode($formattedRegistration); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1beta1.Domains/ResetAuthorizationCode', $actualFuncCall); - $actualValue = $actualRequestObject->getRegistration(); - $this->assertProtobufEquals($formattedRegistration, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetAuthorizationCodeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - try { - $gapicClient->resetAuthorizationCode($formattedRegistration); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveAuthorizationCodeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $code = 'code3059181'; - $expectedResponse = new AuthorizationCode(); - $expectedResponse->setCode($code); - $transport->addResponse($expectedResponse); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - $response = $gapicClient->retrieveAuthorizationCode($formattedRegistration); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1beta1.Domains/RetrieveAuthorizationCode', $actualFuncCall); - $actualValue = $actualRequestObject->getRegistration(); - $this->assertProtobufEquals($formattedRegistration, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveAuthorizationCodeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedRegistration = $gapicClient->registrationName('[PROJECT]', '[LOCATION]', '[REGISTRATION]'); - try { - $gapicClient->retrieveAuthorizationCode($formattedRegistration); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveRegisterParametersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RetrieveRegisterParametersResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $domainName = 'domainName104118566'; - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->retrieveRegisterParameters($domainName, $formattedLocation); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1beta1.Domains/RetrieveRegisterParameters', $actualFuncCall); - $actualValue = $actualRequestObject->getDomainName(); - $this->assertProtobufEquals($domainName, $actualValue); - $actualValue = $actualRequestObject->getLocation(); - $this->assertProtobufEquals($formattedLocation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveRegisterParametersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $domainName = 'domainName104118566'; - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->retrieveRegisterParameters($domainName, $formattedLocation); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveTransferParametersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RetrieveTransferParametersResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $domainName = 'domainName104118566'; - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->retrieveTransferParameters($domainName, $formattedLocation); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1beta1.Domains/RetrieveTransferParameters', $actualFuncCall); - $actualValue = $actualRequestObject->getDomainName(); - $this->assertProtobufEquals($domainName, $actualValue); - $actualValue = $actualRequestObject->getLocation(); - $this->assertProtobufEquals($formattedLocation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function retrieveTransferParametersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $domainName = 'domainName104118566'; - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->retrieveTransferParameters($domainName, $formattedLocation); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchDomainsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SearchDomainsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $query = 'query107944136'; - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->searchDomains($query, $formattedLocation); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1beta1.Domains/SearchDomains', $actualFuncCall); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $actualValue = $actualRequestObject->getLocation(); - $this->assertProtobufEquals($formattedLocation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchDomainsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $query = 'query107944136'; - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->searchDomains($query, $formattedLocation); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function transferDomainTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/transferDomainTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name); - $expectedResponse->setDomainName($domainName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/transferDomainTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $registration = new Registration(); - $registrationDomainName = 'registrationDomainName1873916680'; - $registration->setDomainName($registrationDomainName); - $registrationContactSettings = new ContactSettings(); - $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; - $registrationContactSettings->setPrivacy($contactSettingsPrivacy); - $contactSettingsRegistrantContact = new Contact(); - $registrantContactPostalAddress = new PostalAddress(); - $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); - $registrantContactEmail = 'registrantContactEmail1001340839'; - $contactSettingsRegistrantContact->setEmail($registrantContactEmail); - $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; - $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); - $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); - $contactSettingsAdminContact = new Contact(); - $adminContactPostalAddress = new PostalAddress(); - $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); - $adminContactEmail = 'adminContactEmail1687004235'; - $contactSettingsAdminContact->setEmail($adminContactEmail); - $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; - $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); - $registrationContactSettings->setAdminContact($contactSettingsAdminContact); - $contactSettingsTechnicalContact = new Contact(); - $technicalContactPostalAddress = new PostalAddress(); - $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); - $technicalContactEmail = 'technicalContactEmail-221168807'; - $contactSettingsTechnicalContact->setEmail($technicalContactEmail); - $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; - $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); - $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); - $registration->setContactSettings($registrationContactSettings); - $yearlyPrice = new Money(); - $response = $gapicClient->transferDomain($formattedParent, $registration, $yearlyPrice); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1beta1.Domains/TransferDomain', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRegistration(); - $this->assertProtobufEquals($registration, $actualValue); - $actualValue = $actualApiRequestObject->getYearlyPrice(); - $this->assertProtobufEquals($yearlyPrice, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/transferDomainTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function transferDomainExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/transferDomainTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $registration = new Registration(); - $registrationDomainName = 'registrationDomainName1873916680'; - $registration->setDomainName($registrationDomainName); - $registrationContactSettings = new ContactSettings(); - $contactSettingsPrivacy = ContactPrivacy::CONTACT_PRIVACY_UNSPECIFIED; - $registrationContactSettings->setPrivacy($contactSettingsPrivacy); - $contactSettingsRegistrantContact = new Contact(); - $registrantContactPostalAddress = new PostalAddress(); - $contactSettingsRegistrantContact->setPostalAddress($registrantContactPostalAddress); - $registrantContactEmail = 'registrantContactEmail1001340839'; - $contactSettingsRegistrantContact->setEmail($registrantContactEmail); - $registrantContactPhoneNumber = 'registrantContactPhoneNumber-2077279710'; - $contactSettingsRegistrantContact->setPhoneNumber($registrantContactPhoneNumber); - $registrationContactSettings->setRegistrantContact($contactSettingsRegistrantContact); - $contactSettingsAdminContact = new Contact(); - $adminContactPostalAddress = new PostalAddress(); - $contactSettingsAdminContact->setPostalAddress($adminContactPostalAddress); - $adminContactEmail = 'adminContactEmail1687004235'; - $contactSettingsAdminContact->setEmail($adminContactEmail); - $adminContactPhoneNumber = 'adminContactPhoneNumber-516910138'; - $contactSettingsAdminContact->setPhoneNumber($adminContactPhoneNumber); - $registrationContactSettings->setAdminContact($contactSettingsAdminContact); - $contactSettingsTechnicalContact = new Contact(); - $technicalContactPostalAddress = new PostalAddress(); - $contactSettingsTechnicalContact->setPostalAddress($technicalContactPostalAddress); - $technicalContactEmail = 'technicalContactEmail-221168807'; - $contactSettingsTechnicalContact->setEmail($technicalContactEmail); - $technicalContactPhoneNumber = 'technicalContactPhoneNumber582887508'; - $contactSettingsTechnicalContact->setPhoneNumber($technicalContactPhoneNumber); - $registrationContactSettings->setTechnicalContact($contactSettingsTechnicalContact); - $registration->setContactSettings($registrationContactSettings); - $yearlyPrice = new Money(); - $response = $gapicClient->transferDomain($formattedParent, $registration, $yearlyPrice); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/transferDomainTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateRegistrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateRegistrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $domainName = 'domainName104118566'; - $expectedResponse = new Registration(); - $expectedResponse->setName($name); - $expectedResponse->setDomainName($domainName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateRegistrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $response = $gapicClient->updateRegistration($updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.domains.v1beta1.Domains/UpdateRegistration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRegistrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateRegistrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateRegistrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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(); - $response = $gapicClient->updateRegistration($updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRegistrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php deleted file mode 100644 index 7a2c5a1ceeb0129959448848e7a1e055208c70dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2312 zcmbVOU31$+6vfU*lj}4|1J}zbzB@t(Wc`P8qWIU#vcx)E=0p%tk^)@+e_erDP>hED{%o6TVi%b}s1hg`uXM(XH zu6O}UMwD~LIgJ<>emJR|?GLGN_bZ4tW1*=I0SMh0jU(5iq}e%siUA{6xOP+F*>#O) z*RJE)&-RZc-XVY&xN%Hs3Kw1h!B3P71K%UDa0Pzd^JB*kec`)-|1;KkM8<9qQ%t=c zJ5EAR_$(wcp&fd({D7pGGWK4C^l(=;B6vbCpH2v;BH`ho;w=Hr=TG(m{i=~~cd2fYby3ho{-UgT zO?@AGBivbJEzDI~Jo?htl~+fjd7)3xF6B8jN%TJawFRI3U!NEsrU3iv{OpO@~y&8rm@U?t%}s#@vq zoR+k4Mnhqk08~CWQhF6qIJljamG#A(8_ej#PE7fk?@`BNXsDlr(!OwTm?gbU=gnS< zQA;6=9k_uGj@=2xhRNQ34L34)DRtrC^QGXGU>dyCg6-?a=_0go@cc8%V{EWK|9!YA zn=Xf@BVIZ`BWo%;rTT>w-htnU?Z9)t9cqy`9AwW0H&-6f}C&*B;%liIjLDLt+^`aL_?H*$$_!p=xtb^Q88sBeap0Y(hFt)NL~&$Dim5OyoQ|O_Tk7^ zsbt)N_fWiug)!Cl1-&w&>e8$kw_uag857j;qvE=fwT&IRLQV#aaWpxRE2f&ryHE)H zkUC*98)|9R4D3_32OKpT6oZE^VE4`2X6(TS-A1o{GU&J3r%tb5?GJj+;I!9i)LKtk zjr#68#s;jmJB`!b9L|=lYVDiT_VbfQy@|i&arSJe^k?|jim?f6PX~Q`Ts{6Z4{}v5 z)AHj&x&u3MDRpw+eXpm}gavLmF&Up!P+)cYDi@>Rt+w{zf^qUsF85phZd0vlQ*CHd znYf#+d{eLJKeH%1UF5cXHO|IeuKqW8o&P9>vn+*YSyuxsO9u|uRTZD!pYNDY(q(yR RxBll|RgvimJco0De*y2v^#T9@ diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php deleted file mode 100644 index 98ad3355d980..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php +++ /dev/null @@ -1,42 +0,0 @@ -internalAddGeneratedFile( - ' -ð -Egoogle/devtools/clouderrorreporting/v1beta1/error_group_service.proto+google.devtools.clouderrorreporting.v1beta1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto8google/devtools/clouderrorreporting/v1beta1/common.proto"\\ -GetGroupRequestI - -group_name ( B5àAúA/ --clouderrorreporting.googleapis.com/ErrorGroup"a -UpdateGroupRequestK -group ( 27.google.devtools.clouderrorreporting.v1beta1.ErrorGroupBàA2û -ErrorGroupServiceÁ -GetGroup<.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest7.google.devtools.clouderrorreporting.v1beta1.ErrorGroup">‚Óä“+)/v1beta1/{group_name=projects/*/groups/*}ÚA -group_nameÉ - UpdateGroup?.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest7.google.devtools.clouderrorreporting.v1beta1.ErrorGroup"@‚Óä“2)/v1beta1/{group.name=projects/*/groups/*}:groupÚAgroupVÊA"clouderrorreporting.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB£ -/com.google.devtools.clouderrorreporting.v1beta1BErrorGroupServiceProtoPZ^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreportingøª#Google.Cloud.ErrorReporting.V1Beta1Ê#Google\\Cloud\\ErrorReporting\\V1beta1ê&Google::Cloud::ErrorReporting::V1beta1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php deleted file mode 100644 index fdd537f4a0dc755436c095b08343d5715e162542..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5156 zcmcgwOK%%h6vlRwHm9lU+~(ni*VHXEec3cc6uHldJqZzM?Al2S$m%e$ublyVW|+B7 zDODr{5*wB*S+ZlvFJRpz2nkgzxp~_c4wq2~k|NbW`WfJ>NZ#?|k=h^@g|Z z!AWg_I@GrqZD?x`G`3DP&v%(yciY-px7nn=R(Cs|-KKt4(~2c+xwN7g#l@8qXd1X( zzfSX7%XM3AnrqMv=DO`5S8u!B2K9Z{_o?Ul%ywG2jf-oPSr>C+*bJD(0yCighFzyw zu_AzDb!gyOb*e3t=WgNbhQ+Mff&i}-6?m<%6TEik;v5IR0#I*TL7*9Y?J8fRDwlwV zpy5BSyVkbr8ebj%J7ou^?byt=+V&S1|23^?wF8PMJLfjLPMz7Vqj7_hQ>Qa$G>OUQ zp7Jnmv=5yv^AuwGYKsn|zGJn~{h;pK9&`ONPR-|Al=TwNM`q5bWjUPP)MliQ`TPzi zuW8Kh(*D&o&8MvEJ6D9?9ALBetF}ujb1Sec)QyQ4qdoz zE5_)JMvox#*nTs;lJWwdhVL~no=e}6a}p*Swr_Tq_RXsHot{!_TAqz<&Z!`~cl!0d z4^3Wgb4?XoO*q~+!BqHh|6swA&~Y=>)EEcve?9`>IG* zDO|xt;(X4KDhMR;R{(gprf)ednjR9^R|dkq-KG8m&f5xykf>K-oTE0(y4!V_874eE zEbxzq_+iGgVaG`84`2kN8GWRrWC zJ|sMv4&i$qaR||f(y$Ceu8-SQdPKN$HJraMcf?L3$W!7N5^)knJmiBJ;I@)JjHp9$ zd|N;c2FRxD7q&>Zow#bU-2_Q*Lki6TbnaPl8jt}qfOfn7#>!r zBY7n|X^&)(SxDkJq~At%$6hvfV5}FFl7#>}ggZZ2(?$h>yb2Rew`1=N|3}u z8VVUUB<^e*RJ6gM2@{n!HV`B80H7~@z0z^{Opq)9GT3J_k-VIHvWlFCL)2-=*-{+$ zNMYuWIE?W&5{?8fT*y`X#{Xv_m%TU`Cw3F^h)QvO?y6E;qm@ei6a&(qUZqgja8jWt zuYV{`gEib1f1bB4{S|{`G~h#J3WzE@hUq+*0XQVqQ$hN`JJNx^7uT2cQnm53PLHH`OD z2l@;zy=CI8YHBER55}XdFV6yG91bcy5&EePA2_;!(uqe|p_^)S8jgf#8k0Tns1SZt z{*U2Uk+vzLFRHyVlQ14#K{D)Y7mjU7N^jdIZ@>woQYlr;LTPn*#nhJ;7nW}s_$!+C zmtkt_lW}`hUotCbP{g9d$TUoD|ERB+#&R(gKfBq#qlxXEAl3pJm(5b8XjHZ>lmw8T z6pd;@R(DCSu9#KBST@C&sBWQR=qpB1jwF!p$MpGmqrit&t45_NKOC6-b{NJ)Ux>|A zm6kk3K1YuVWHA0ljg?4F7Y6Eq?HIC7nbKFk{`p-zM=tbk`w#n%(AU%-LGJ8kP813MX^>hz6gwpRfziU7}%Gy4cos^MdOA`+ZD#n}z= zTMS0~$xa442KSqWH5}~T5JgY{-jo5J9VEcWHEH_JBR#X*1u}Xy`bE#KGv)>PT<-q; z`>HIxdy~~=>+%kG!E0Nr>H3|yAL5Y1JJlc+oSWRyK4tzeQ;vOfPr8F>ZM@lJUB8uU zQ3or<+}xI@`+Cv3vP-mo$6`OmPcDd;t89TkSY?GPmGC(%t6r=gg|lk%U8`1$&a2_m zmUuUN8h=y5internalAddGeneratedFile( - ' -¤ -Ggoogle/devtools/clouderrorreporting/v1beta1/report_errors_service.proto+google.devtools.clouderrorreporting.v1beta1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto8google/devtools/clouderrorreporting/v1beta1/common.protogoogle/protobuf/timestamp.proto"¹ -ReportErrorEventRequestI - project_name ( B3àAúA- -+cloudresourcemanager.googleapis.com/ProjectS -event ( 2?.google.devtools.clouderrorreporting.v1beta1.ReportedErrorEventBàA" -ReportErrorEventResponse"‹ -ReportedErrorEvent3 - -event_time ( 2.google.protobuf.TimestampBàAY -service_context ( 2;.google.devtools.clouderrorreporting.v1beta1.ServiceContextBàA -message ( BàAO -context ( 29.google.devtools.clouderrorreporting.v1beta1.ErrorContextBàA2å -ReportErrorsServiceõ -ReportErrorEventD.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequestE.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse"T‚Óä“9"0/v1beta1/{project_name=projects/*}/events:report:eventÚAproject_name,eventVÊA"clouderrorreporting.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¥ -/com.google.devtools.clouderrorreporting.v1beta1BReportErrorsServiceProtoPZ^google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1;clouderrorreportingøª#Google.Cloud.ErrorReporting.V1Beta1Ê#Google\\Cloud\\ErrorReporting\\V1beta1ê&Google::Cloud::ErrorReporting::V1beta1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php deleted file mode 100644 index e92e678b6697..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php +++ /dev/null @@ -1,83 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.DeleteEventsRequest - */ -class DeleteEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $project_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_name - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProjectName() - { - return $this->project_name; - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProjectName($var) - { - GPBUtil::checkString($var, True); - $this->project_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php deleted file mode 100644 index 53e2ba2358d4..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.DeleteEventsResponse - */ -class DeleteEventsResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php deleted file mode 100644 index 1c5566968212..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php +++ /dev/null @@ -1,206 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ErrorContext - */ -class ErrorContext extends \Google\Protobuf\Internal\Message -{ - /** - * The HTTP request which was processed when the error was - * triggered. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; - */ - protected $http_request = null; - /** - * The user who caused or was affected by the crash. - * This can be a user ID, an email address, or an arbitrary token that - * uniquely identifies the user. - * When sending an error report, leave this field empty if the user was not - * logged in. In this case the - * Error Reporting system will use other data, such as remote IP address, to - * distinguish affected users. See `affected_users_count` in - * `ErrorGroupStats`. - * - * Generated from protobuf field string user = 2; - */ - protected $user = ''; - /** - * The location in the source code where the decision was made to - * report the error, usually the place where it was logged. - * For a logged exception this would be the source line where the - * exception is logged, usually close to the place where it was - * caught. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; - */ - protected $report_location = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext $http_request - * The HTTP request which was processed when the error was - * triggered. - * @type string $user - * The user who caused or was affected by the crash. - * This can be a user ID, an email address, or an arbitrary token that - * uniquely identifies the user. - * When sending an error report, leave this field empty if the user was not - * logged in. In this case the - * Error Reporting system will use other data, such as remote IP address, to - * distinguish affected users. See `affected_users_count` in - * `ErrorGroupStats`. - * @type \Google\Cloud\ErrorReporting\V1beta1\SourceLocation $report_location - * The location in the source code where the decision was made to - * report the error, usually the place where it was logged. - * For a logged exception this would be the source line where the - * exception is logged, usually close to the place where it was - * caught. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The HTTP request which was processed when the error was - * triggered. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; - * @return \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext|null - */ - public function getHttpRequest() - { - return $this->http_request; - } - - public function hasHttpRequest() - { - return isset($this->http_request); - } - - public function clearHttpRequest() - { - unset($this->http_request); - } - - /** - * The HTTP request which was processed when the error was - * triggered. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; - * @param \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext $var - * @return $this - */ - public function setHttpRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext::class); - $this->http_request = $var; - - return $this; - } - - /** - * The user who caused or was affected by the crash. - * This can be a user ID, an email address, or an arbitrary token that - * uniquely identifies the user. - * When sending an error report, leave this field empty if the user was not - * logged in. In this case the - * Error Reporting system will use other data, such as remote IP address, to - * distinguish affected users. See `affected_users_count` in - * `ErrorGroupStats`. - * - * Generated from protobuf field string user = 2; - * @return string - */ - public function getUser() - { - return $this->user; - } - - /** - * The user who caused or was affected by the crash. - * This can be a user ID, an email address, or an arbitrary token that - * uniquely identifies the user. - * When sending an error report, leave this field empty if the user was not - * logged in. In this case the - * Error Reporting system will use other data, such as remote IP address, to - * distinguish affected users. See `affected_users_count` in - * `ErrorGroupStats`. - * - * 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; - } - - /** - * The location in the source code where the decision was made to - * report the error, usually the place where it was logged. - * For a logged exception this would be the source line where the - * exception is logged, usually close to the place where it was - * caught. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; - * @return \Google\Cloud\ErrorReporting\V1beta1\SourceLocation|null - */ - public function getReportLocation() - { - return $this->report_location; - } - - public function hasReportLocation() - { - return isset($this->report_location); - } - - public function clearReportLocation() - { - unset($this->report_location); - } - - /** - * The location in the source code where the decision was made to - * report the error, usually the place where it was logged. - * For a logged exception this would be the source line where the - * exception is logged, usually close to the place where it was - * caught. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; - * @param \Google\Cloud\ErrorReporting\V1beta1\SourceLocation $var - * @return $this - */ - public function setReportLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\SourceLocation::class); - $this->report_location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php deleted file mode 100644 index 64d7396ca2d5..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php +++ /dev/null @@ -1,207 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ErrorEvent - */ -class ErrorEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Time when the event occurred as provided in the error report. - * If the report did not contain a timestamp, the time the error was received - * by the Error Reporting system is used. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; - */ - protected $event_time = null; - /** - * The `ServiceContext` for which this error was reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; - */ - protected $service_context = null; - /** - * The stack trace that was reported or logged by the service. - * - * Generated from protobuf field string message = 3; - */ - protected $message = ''; - /** - * Data about the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; - */ - protected $context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $event_time - * Time when the event occurred as provided in the error report. - * If the report did not contain a timestamp, the time the error was received - * by the Error Reporting system is used. - * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $service_context - * The `ServiceContext` for which this error was reported. - * @type string $message - * The stack trace that was reported or logged by the service. - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $context - * Data about the context in which the error occurred. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Time when the event occurred as provided in the error report. - * If the report did not contain a timestamp, the time the error was received - * by the Error Reporting system is used. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventTime() - { - return $this->event_time; - } - - public function hasEventTime() - { - return isset($this->event_time); - } - - public function clearEventTime() - { - unset($this->event_time); - } - - /** - * Time when the event occurred as provided in the error report. - * If the report did not contain a timestamp, the time the error was received - * by the Error Reporting system is used. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - - /** - * The `ServiceContext` for which this error was reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext|null - */ - public function getServiceContext() - { - return $this->service_context; - } - - public function hasServiceContext() - { - return isset($this->service_context); - } - - public function clearServiceContext() - { - unset($this->service_context); - } - - /** - * The `ServiceContext` for which this error was reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; - * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $var - * @return $this - */ - public function setServiceContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); - $this->service_context = $var; - - return $this; - } - - /** - * The stack trace that was reported or logged by the service. - * - * Generated from protobuf field string message = 3; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The stack trace that was reported or logged by the service. - * - * Generated from protobuf field string message = 3; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Data about the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext|null - */ - public function getContext() - { - return $this->context; - } - - public function hasContext() - { - return isset($this->context); - } - - public function clearContext() - { - unset($this->context); - } - - /** - * Data about the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $var - * @return $this - */ - public function setContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorContext::class); - $this->context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php deleted file mode 100644 index 0b3b5c6b574a..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php +++ /dev/null @@ -1,181 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ErrorGroup - */ -class ErrorGroup extends \Google\Protobuf\Internal\Message -{ - /** - * The group resource name. - * Example: projects/my-project-123/groups/CNSgkpnppqKCUw - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Group IDs are unique for a given project. If the same kind of error - * occurs in different service contexts, it will receive the same group ID. - * - * Generated from protobuf field string group_id = 2; - */ - protected $group_id = ''; - /** - * Associated tracking issues. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; - */ - private $tracking_issues; - /** - * Error group's resolution status. - * An unspecified resolution status will be interpreted as OPEN - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; - */ - protected $resolution_status = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The group resource name. - * Example: projects/my-project-123/groups/CNSgkpnppqKCUw - * @type string $group_id - * Group IDs are unique for a given project. If the same kind of error - * occurs in different service contexts, it will receive the same group ID. - * @type array<\Google\Cloud\ErrorReporting\V1beta1\TrackingIssue>|\Google\Protobuf\Internal\RepeatedField $tracking_issues - * Associated tracking issues. - * @type int $resolution_status - * Error group's resolution status. - * An unspecified resolution status will be interpreted as OPEN - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The group resource name. - * Example: projects/my-project-123/groups/CNSgkpnppqKCUw - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The group resource name. - * Example: projects/my-project-123/groups/CNSgkpnppqKCUw - * - * 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; - } - - /** - * Group IDs are unique for a given project. If the same kind of error - * occurs in different service contexts, it will receive the same group ID. - * - * Generated from protobuf field string group_id = 2; - * @return string - */ - public function getGroupId() - { - return $this->group_id; - } - - /** - * Group IDs are unique for a given project. If the same kind of error - * occurs in different service contexts, it will receive the same group ID. - * - * Generated from protobuf field string group_id = 2; - * @param string $var - * @return $this - */ - public function setGroupId($var) - { - GPBUtil::checkString($var, True); - $this->group_id = $var; - - return $this; - } - - /** - * Associated tracking issues. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTrackingIssues() - { - return $this->tracking_issues; - } - - /** - * Associated tracking issues. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; - * @param array<\Google\Cloud\ErrorReporting\V1beta1\TrackingIssue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTrackingIssues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue::class); - $this->tracking_issues = $arr; - - return $this; - } - - /** - * Error group's resolution status. - * An unspecified resolution status will be interpreted as OPEN - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; - * @return int - */ - public function getResolutionStatus() - { - return $this->resolution_status; - } - - /** - * Error group's resolution status. - * An unspecified resolution status will be interpreted as OPEN - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; - * @param int $var - * @return $this - */ - public function setResolutionStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\ResolutionStatus::class); - $this->resolution_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php deleted file mode 100644 index fd726de75f01..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php +++ /dev/null @@ -1,76 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder - */ -class ErrorGroupOrder -{ - /** - * No group order specified. - * - * Generated from protobuf enum GROUP_ORDER_UNSPECIFIED = 0; - */ - const GROUP_ORDER_UNSPECIFIED = 0; - /** - * Total count of errors in the given time window in descending order. - * - * Generated from protobuf enum COUNT_DESC = 1; - */ - const COUNT_DESC = 1; - /** - * Timestamp when the group was last seen in the given time window - * in descending order. - * - * Generated from protobuf enum LAST_SEEN_DESC = 2; - */ - const LAST_SEEN_DESC = 2; - /** - * Timestamp when the group was created in descending order. - * - * Generated from protobuf enum CREATED_DESC = 3; - */ - const CREATED_DESC = 3; - /** - * Number of affected users in the given time window in descending order. - * - * Generated from protobuf enum AFFECTED_USERS_DESC = 4; - */ - const AFFECTED_USERS_DESC = 4; - - private static $valueToName = [ - self::GROUP_ORDER_UNSPECIFIED => 'GROUP_ORDER_UNSPECIFIED', - self::COUNT_DESC => 'COUNT_DESC', - self::LAST_SEEN_DESC => 'LAST_SEEN_DESC', - self::CREATED_DESC => 'CREATED_DESC', - self::AFFECTED_USERS_DESC => 'AFFECTED_USERS_DESC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php deleted file mode 100644 index 5f5856a4f6d7..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupServiceGrpcClient.php +++ /dev/null @@ -1,66 +0,0 @@ -_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup', - $argument, - ['\Google\Cloud\ErrorReporting\V1beta1\ErrorGroup', 'decode'], - $metadata, $options); - } - - /** - * Replace the data for the specified group. - * Fails if the group does not exist. - * @param \Google\Cloud\ErrorReporting\V1beta1\UpdateGroupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateGroup(\Google\Cloud\ErrorReporting\V1beta1\UpdateGroupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/UpdateGroup', - $argument, - ['\Google\Cloud\ErrorReporting\V1beta1\ErrorGroup', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php deleted file mode 100644 index d76b7b2712ee..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php +++ /dev/null @@ -1,488 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats - */ -class ErrorGroupStats extends \Google\Protobuf\Internal\Message -{ - /** - * Group data that is independent of the filter criteria. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; - */ - protected $group = null; - /** - * Approximate total number of events in the given group that match - * the filter criteria. - * - * Generated from protobuf field int64 count = 2; - */ - protected $count = 0; - /** - * Approximate number of affected users in the given group that - * match the filter criteria. - * Users are distinguished by data in the `ErrorContext` of the - * individual error events, such as their login name or their remote - * IP address in case of HTTP requests. - * The number of affected users can be zero even if the number of - * errors is non-zero if no data was provided from which the - * affected user could be deduced. - * Users are counted based on data in the request - * context that was provided in the error report. If more users are - * implicitly affected, such as due to a crash of the whole service, - * this is not reflected here. - * - * Generated from protobuf field int64 affected_users_count = 3; - */ - protected $affected_users_count = 0; - /** - * Approximate number of occurrences over time. - * Timed counts returned by ListGroups are guaranteed to be: - * - Inside the requested time interval - * - Non-overlapping, and - * - Ordered by ascending time. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; - */ - private $timed_counts; - /** - * Approximate first occurrence that was ever seen for this group - * and which matches the given filter criteria, ignoring the - * time_range that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; - */ - protected $first_seen_time = null; - /** - * Approximate last occurrence that was ever seen for this group and - * which matches the given filter criteria, ignoring the time_range - * that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; - */ - protected $last_seen_time = null; - /** - * Service contexts with a non-zero error count for the given filter - * criteria. This list can be truncated if multiple services are affected. - * Refer to `num_affected_services` for the total count. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; - */ - private $affected_services; - /** - * The total number of services with a non-zero error count for the given - * filter criteria. - * - * Generated from protobuf field int32 num_affected_services = 8; - */ - protected $num_affected_services = 0; - /** - * An arbitrary event that is chosen as representative for the whole group. - * The representative event is intended to be used as a quick preview for - * the whole group. Events in the group are usually sufficiently similar - * to each other such that showing an arbitrary representative provides - * insight into the characteristics of the group as a whole. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; - */ - protected $representative = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group - * Group data that is independent of the filter criteria. - * @type int|string $count - * Approximate total number of events in the given group that match - * the filter criteria. - * @type int|string $affected_users_count - * Approximate number of affected users in the given group that - * match the filter criteria. - * Users are distinguished by data in the `ErrorContext` of the - * individual error events, such as their login name or their remote - * IP address in case of HTTP requests. - * The number of affected users can be zero even if the number of - * errors is non-zero if no data was provided from which the - * affected user could be deduced. - * Users are counted based on data in the request - * context that was provided in the error report. If more users are - * implicitly affected, such as due to a crash of the whole service, - * this is not reflected here. - * @type array<\Google\Cloud\ErrorReporting\V1beta1\TimedCount>|\Google\Protobuf\Internal\RepeatedField $timed_counts - * Approximate number of occurrences over time. - * Timed counts returned by ListGroups are guaranteed to be: - * - Inside the requested time interval - * - Non-overlapping, and - * - Ordered by ascending time. - * @type \Google\Protobuf\Timestamp $first_seen_time - * Approximate first occurrence that was ever seen for this group - * and which matches the given filter criteria, ignoring the - * time_range that was specified in the request. - * @type \Google\Protobuf\Timestamp $last_seen_time - * Approximate last occurrence that was ever seen for this group and - * which matches the given filter criteria, ignoring the time_range - * that was specified in the request. - * @type array<\Google\Cloud\ErrorReporting\V1beta1\ServiceContext>|\Google\Protobuf\Internal\RepeatedField $affected_services - * Service contexts with a non-zero error count for the given filter - * criteria. This list can be truncated if multiple services are affected. - * Refer to `num_affected_services` for the total count. - * @type int $num_affected_services - * The total number of services with a non-zero error count for the given - * filter criteria. - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent $representative - * An arbitrary event that is chosen as representative for the whole group. - * The representative event is intended to be used as a quick preview for - * the whole group. Events in the group are usually sufficiently similar - * to each other such that showing an arbitrary representative provides - * insight into the characteristics of the group as a whole. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Group data that is independent of the filter criteria. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup|null - */ - public function getGroup() - { - return $this->group; - } - - public function hasGroup() - { - return isset($this->group); - } - - public function clearGroup() - { - unset($this->group); - } - - /** - * Group data that is independent of the filter criteria. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup::class); - $this->group = $var; - - return $this; - } - - /** - * Approximate total number of events in the given group that match - * the filter criteria. - * - * Generated from protobuf field int64 count = 2; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Approximate total number of events in the given group that match - * the filter criteria. - * - * Generated from protobuf field int64 count = 2; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - - /** - * Approximate number of affected users in the given group that - * match the filter criteria. - * Users are distinguished by data in the `ErrorContext` of the - * individual error events, such as their login name or their remote - * IP address in case of HTTP requests. - * The number of affected users can be zero even if the number of - * errors is non-zero if no data was provided from which the - * affected user could be deduced. - * Users are counted based on data in the request - * context that was provided in the error report. If more users are - * implicitly affected, such as due to a crash of the whole service, - * this is not reflected here. - * - * Generated from protobuf field int64 affected_users_count = 3; - * @return int|string - */ - public function getAffectedUsersCount() - { - return $this->affected_users_count; - } - - /** - * Approximate number of affected users in the given group that - * match the filter criteria. - * Users are distinguished by data in the `ErrorContext` of the - * individual error events, such as their login name or their remote - * IP address in case of HTTP requests. - * The number of affected users can be zero even if the number of - * errors is non-zero if no data was provided from which the - * affected user could be deduced. - * Users are counted based on data in the request - * context that was provided in the error report. If more users are - * implicitly affected, such as due to a crash of the whole service, - * this is not reflected here. - * - * Generated from protobuf field int64 affected_users_count = 3; - * @param int|string $var - * @return $this - */ - public function setAffectedUsersCount($var) - { - GPBUtil::checkInt64($var); - $this->affected_users_count = $var; - - return $this; - } - - /** - * Approximate number of occurrences over time. - * Timed counts returned by ListGroups are guaranteed to be: - * - Inside the requested time interval - * - Non-overlapping, and - * - Ordered by ascending time. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTimedCounts() - { - return $this->timed_counts; - } - - /** - * Approximate number of occurrences over time. - * Timed counts returned by ListGroups are guaranteed to be: - * - Inside the requested time interval - * - Non-overlapping, and - * - Ordered by ascending time. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; - * @param array<\Google\Cloud\ErrorReporting\V1beta1\TimedCount>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTimedCounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\TimedCount::class); - $this->timed_counts = $arr; - - return $this; - } - - /** - * Approximate first occurrence that was ever seen for this group - * and which matches the given filter criteria, ignoring the - * time_range that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFirstSeenTime() - { - return $this->first_seen_time; - } - - public function hasFirstSeenTime() - { - return isset($this->first_seen_time); - } - - public function clearFirstSeenTime() - { - unset($this->first_seen_time); - } - - /** - * Approximate first occurrence that was ever seen for this group - * and which matches the given filter criteria, ignoring the - * time_range that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFirstSeenTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->first_seen_time = $var; - - return $this; - } - - /** - * Approximate last occurrence that was ever seen for this group and - * which matches the given filter criteria, ignoring the time_range - * that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastSeenTime() - { - return $this->last_seen_time; - } - - public function hasLastSeenTime() - { - return isset($this->last_seen_time); - } - - public function clearLastSeenTime() - { - unset($this->last_seen_time); - } - - /** - * Approximate last occurrence that was ever seen for this group and - * which matches the given filter criteria, ignoring the time_range - * that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastSeenTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_seen_time = $var; - - return $this; - } - - /** - * Service contexts with a non-zero error count for the given filter - * criteria. This list can be truncated if multiple services are affected. - * Refer to `num_affected_services` for the total count. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAffectedServices() - { - return $this->affected_services; - } - - /** - * Service contexts with a non-zero error count for the given filter - * criteria. This list can be truncated if multiple services are affected. - * Refer to `num_affected_services` for the total count. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; - * @param array<\Google\Cloud\ErrorReporting\V1beta1\ServiceContext>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAffectedServices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); - $this->affected_services = $arr; - - return $this; - } - - /** - * The total number of services with a non-zero error count for the given - * filter criteria. - * - * Generated from protobuf field int32 num_affected_services = 8; - * @return int - */ - public function getNumAffectedServices() - { - return $this->num_affected_services; - } - - /** - * The total number of services with a non-zero error count for the given - * filter criteria. - * - * Generated from protobuf field int32 num_affected_services = 8; - * @param int $var - * @return $this - */ - public function setNumAffectedServices($var) - { - GPBUtil::checkInt32($var); - $this->num_affected_services = $var; - - return $this; - } - - /** - * An arbitrary event that is chosen as representative for the whole group. - * The representative event is intended to be used as a quick preview for - * the whole group. Events in the group are usually sufficiently similar - * to each other such that showing an arbitrary representative provides - * insight into the characteristics of the group as a whole. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent|null - */ - public function getRepresentative() - { - return $this->representative; - } - - public function hasRepresentative() - { - return isset($this->representative); - } - - public function clearRepresentative() - { - unset($this->representative); - } - - /** - * An arbitrary event that is chosen as representative for the whole group. - * The representative event is intended to be used as a quick preview for - * the whole group. Events in the group are usually sufficiently similar - * to each other such that showing an arbitrary representative provides - * insight into the characteristics of the group as a whole. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent $var - * @return $this - */ - public function setRepresentative($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent::class); - $this->representative = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php deleted file mode 100644 index 2a17f17379b1..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorStatsServiceGrpcClient.php +++ /dev/null @@ -1,81 +0,0 @@ -_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListGroupStats', - $argument, - ['\Google\Cloud\ErrorReporting\V1beta1\ListGroupStatsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists the specified events. - * @param \Google\Cloud\ErrorReporting\V1beta1\ListEventsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListEvents(\Google\Cloud\ErrorReporting\V1beta1\ListEventsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListEvents', - $argument, - ['\Google\Cloud\ErrorReporting\V1beta1\ListEventsResponse', 'decode'], - $metadata, $options); - } - - /** - * Deletes all error events of a given project. - * @param \Google\Cloud\ErrorReporting\V1beta1\DeleteEventsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteEvents(\Google\Cloud\ErrorReporting\V1beta1\DeleteEventsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents', - $argument, - ['\Google\Cloud\ErrorReporting\V1beta1\DeleteEventsResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php deleted file mode 100644 index b08f87708c7a..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php +++ /dev/null @@ -1,83 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.GetGroupRequest - */ -class GetGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The group resource name. Written as - * `projects/{projectID}/groups/{group_name}`. Call - * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) - * to return a list of groups belonging to this project. - * Example: `projects/my-project-123/groups/my-group` - * - * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $group_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group_name - * Required. The group resource name. Written as - * `projects/{projectID}/groups/{group_name}`. Call - * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) - * to return a list of groups belonging to this project. - * Example: `projects/my-project-123/groups/my-group` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorGroupService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The group resource name. Written as - * `projects/{projectID}/groups/{group_name}`. Call - * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) - * to return a list of groups belonging to this project. - * Example: `projects/my-project-123/groups/my-group` - * - * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getGroupName() - { - return $this->group_name; - } - - /** - * Required. The group resource name. Written as - * `projects/{projectID}/groups/{group_name}`. Call - * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) - * to return a list of groups belonging to this project. - * Example: `projects/my-project-123/groups/my-group` - * - * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGroupName($var) - { - GPBUtil::checkString($var, True); - $this->group_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php deleted file mode 100644 index 95c45a2ac88f..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php +++ /dev/null @@ -1,252 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.HttpRequestContext - */ -class HttpRequestContext extends \Google\Protobuf\Internal\Message -{ - /** - * The type of HTTP request, such as `GET`, `POST`, etc. - * - * Generated from protobuf field string method = 1; - */ - protected $method = ''; - /** - * The URL of the request. - * - * Generated from protobuf field string url = 2; - */ - protected $url = ''; - /** - * The user agent information that is provided with the request. - * - * Generated from protobuf field string user_agent = 3; - */ - protected $user_agent = ''; - /** - * The referrer information that is provided with the request. - * - * Generated from protobuf field string referrer = 4; - */ - protected $referrer = ''; - /** - * The HTTP response status code for the request. - * - * Generated from protobuf field int32 response_status_code = 5; - */ - protected $response_status_code = 0; - /** - * The IP address from which the request originated. - * This can be IPv4, IPv6, or a token which is derived from the - * IP address, depending on the data that has been provided - * in the error report. - * - * Generated from protobuf field string remote_ip = 6; - */ - protected $remote_ip = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $method - * The type of HTTP request, such as `GET`, `POST`, etc. - * @type string $url - * The URL of the request. - * @type string $user_agent - * The user agent information that is provided with the request. - * @type string $referrer - * The referrer information that is provided with the request. - * @type int $response_status_code - * The HTTP response status code for the request. - * @type string $remote_ip - * The IP address from which the request originated. - * This can be IPv4, IPv6, or a token which is derived from the - * IP address, depending on the data that has been provided - * in the error report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The type of HTTP request, such as `GET`, `POST`, etc. - * - * Generated from protobuf field string method = 1; - * @return string - */ - public function getMethod() - { - return $this->method; - } - - /** - * The type of HTTP request, such as `GET`, `POST`, etc. - * - * Generated from protobuf field string method = 1; - * @param string $var - * @return $this - */ - public function setMethod($var) - { - GPBUtil::checkString($var, True); - $this->method = $var; - - return $this; - } - - /** - * The URL of the request. - * - * Generated from protobuf field string url = 2; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The URL of the request. - * - * 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; - } - - /** - * The user agent information that is provided with the request. - * - * Generated from protobuf field string user_agent = 3; - * @return string - */ - public function getUserAgent() - { - return $this->user_agent; - } - - /** - * The user agent information that is provided with the request. - * - * Generated from protobuf field string user_agent = 3; - * @param string $var - * @return $this - */ - public function setUserAgent($var) - { - GPBUtil::checkString($var, True); - $this->user_agent = $var; - - return $this; - } - - /** - * The referrer information that is provided with the request. - * - * Generated from protobuf field string referrer = 4; - * @return string - */ - public function getReferrer() - { - return $this->referrer; - } - - /** - * The referrer information that is provided with the request. - * - * Generated from protobuf field string referrer = 4; - * @param string $var - * @return $this - */ - public function setReferrer($var) - { - GPBUtil::checkString($var, True); - $this->referrer = $var; - - return $this; - } - - /** - * The HTTP response status code for the request. - * - * Generated from protobuf field int32 response_status_code = 5; - * @return int - */ - public function getResponseStatusCode() - { - return $this->response_status_code; - } - - /** - * The HTTP response status code for the request. - * - * Generated from protobuf field int32 response_status_code = 5; - * @param int $var - * @return $this - */ - public function setResponseStatusCode($var) - { - GPBUtil::checkInt32($var); - $this->response_status_code = $var; - - return $this; - } - - /** - * The IP address from which the request originated. - * This can be IPv4, IPv6, or a token which is derived from the - * IP address, depending on the data that has been provided - * in the error report. - * - * Generated from protobuf field string remote_ip = 6; - * @return string - */ - public function getRemoteIp() - { - return $this->remote_ip; - } - - /** - * The IP address from which the request originated. - * This can be IPv4, IPv6, or a token which is derived from the - * IP address, depending on the data that has been provided - * in the error report. - * - * Generated from protobuf field string remote_ip = 6; - * @param string $var - * @return $this - */ - public function setRemoteIp($var) - { - GPBUtil::checkString($var, True); - $this->remote_ip = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php deleted file mode 100644 index db3b0b9de9b6..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php +++ /dev/null @@ -1,289 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ListEventsRequest - */ -class ListEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $project_name = ''; - /** - * Required. The group for which events shall be returned. - * - * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group_id = ''; - /** - * Optional. List only ErrorGroups which belong to a service context that - * matches the filter. - * Data for all service contexts is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_filter = null; - /** - * Optional. List only data for the given time range. - * If not set a default time range is used. The field time_range_begin - * in the response will specify the beginning of this time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $time_range = null; - /** - * Optional. The maximum number of results to return per response. - * - * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A `next_page_token` provided by a previous response. - * - * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_name - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * @type string $group_id - * Required. The group for which events shall be returned. - * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $service_filter - * Optional. List only ErrorGroups which belong to a service context that - * matches the filter. - * Data for all service contexts is returned if this field is not specified. - * @type \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $time_range - * Optional. List only data for the given time range. - * If not set a default time range is used. The field time_range_begin - * in the response will specify the beginning of this time range. - * @type int $page_size - * Optional. The maximum number of results to return per response. - * @type string $page_token - * Optional. A `next_page_token` provided by a previous response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProjectName() - { - return $this->project_name; - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProjectName($var) - { - GPBUtil::checkString($var, True); - $this->project_name = $var; - - return $this; - } - - /** - * Required. The group for which events shall be returned. - * - * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGroupId() - { - return $this->group_id; - } - - /** - * Required. The group for which events shall be returned. - * - * 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; - } - - /** - * Optional. List only ErrorGroups which belong to a service context that - * matches the filter. - * Data for all service contexts is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter|null - */ - public function getServiceFilter() - { - return $this->service_filter; - } - - public function hasServiceFilter() - { - return isset($this->service_filter); - } - - public function clearServiceFilter() - { - unset($this->service_filter); - } - - /** - * Optional. List only ErrorGroups which belong to a service context that - * matches the filter. - * Data for all service contexts is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $var - * @return $this - */ - public function setServiceFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter::class); - $this->service_filter = $var; - - return $this; - } - - /** - * Optional. List only data for the given time range. - * If not set a default time range is used. The field time_range_begin - * in the response will specify the beginning of this time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange|null - */ - public function getTimeRange() - { - return $this->time_range; - } - - public function hasTimeRange() - { - return isset($this->time_range); - } - - public function clearTimeRange() - { - unset($this->time_range); - } - - /** - * Optional. List only data for the given time range. - * If not set a default time range is used. The field time_range_begin - * in the response will specify the beginning of this time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $var - * @return $this - */ - public function setTimeRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange::class); - $this->time_range = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return per response. - * - * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return per response. - * - * Generated from protobuf field int32 page_size = 6 [(.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 `next_page_token` provided by a previous response. - * - * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A `next_page_token` provided by a previous response. - * - * Generated from protobuf field string page_token = 7 [(.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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php deleted file mode 100644 index 55faa7e5a56a..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php +++ /dev/null @@ -1,153 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ListEventsResponse - */ -class ListEventsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The error events which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; - */ - private $error_events; - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The timestamp specifies the start time to which the request was restricted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - */ - protected $time_range_begin = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ErrorReporting\V1beta1\ErrorEvent>|\Google\Protobuf\Internal\RepeatedField $error_events - * The error events which match the given request. - * @type string $next_page_token - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * @type \Google\Protobuf\Timestamp $time_range_begin - * The timestamp specifies the start time to which the request was restricted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * The error events which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrorEvents() - { - return $this->error_events; - } - - /** - * The error events which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; - * @param array<\Google\Cloud\ErrorReporting\V1beta1\ErrorEvent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrorEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent::class); - $this->error_events = $arr; - - return $this; - } - - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view 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; - } - - /** - * The timestamp specifies the start time to which the request was restricted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimeRangeBegin() - { - return $this->time_range_begin; - } - - public function hasTimeRangeBegin() - { - return isset($this->time_range_begin); - } - - public function clearTimeRangeBegin() - { - unset($this->time_range_begin); - } - - /** - * The timestamp specifies the start time to which the request was restricted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimeRangeBegin($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->time_range_begin = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php deleted file mode 100644 index 43a433e3045f..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php +++ /dev/null @@ -1,493 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest - */ -class ListGroupStatsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` - * and `{projectNumber}` can be found in the - * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). - * Examples: `projects/my-project-123`, `projects/5551234`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $project_name = ''; - /** - * Optional. List all ErrorGroupStats with these IDs. - * - * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $group_id; - /** - * Optional. List only ErrorGroupStats which belong to a service - * context that matches the filter. - * Data for all service contexts is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_filter = null; - /** - * Optional. List data for the given time range. - * If not set, a default time range is used. The field - * time_range_begin in the response will specify the beginning - * of this time range. - * Only ErrorGroupStats with a non-zero count in the given time - * range are returned, unless the request contains an explicit - * group_id list. If a group_id list is given, also - * ErrorGroupStats with zero occurrences are returned. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $time_range = null; - /** - * Optional. The preferred duration for a single returned `TimedCount`. - * If not set, no timed counts are returned. - * - * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $timed_count_duration = null; - /** - * Optional. The alignment of the timed counts to be returned. - * Default is `ALIGNMENT_EQUAL_AT_END`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $alignment = 0; - /** - * Optional. Time where the timed counts shall be aligned if rounded - * alignment is chosen. Default is 00:00 UTC. - * - * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $alignment_time = null; - /** - * Optional. The sort order in which the results are returned. - * Default is `COUNT_DESC`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order = 0; - /** - * Optional. The maximum number of results to return per response. - * Default is 20. - * - * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A `next_page_token` provided by a previous response. To view - * additional results, pass this token along with the identical query - * parameters as the first request. - * - * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_name - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` - * and `{projectNumber}` can be found in the - * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). - * Examples: `projects/my-project-123`, `projects/5551234`. - * @type array|\Google\Protobuf\Internal\RepeatedField $group_id - * Optional. List all ErrorGroupStats with these IDs. - * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $service_filter - * Optional. List only ErrorGroupStats which belong to a service - * context that matches the filter. - * Data for all service contexts is returned if this field is not specified. - * @type \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $time_range - * Optional. List data for the given time range. - * If not set, a default time range is used. The field - * time_range_begin in the response will specify the beginning - * of this time range. - * Only ErrorGroupStats with a non-zero count in the given time - * range are returned, unless the request contains an explicit - * group_id list. If a group_id list is given, also - * ErrorGroupStats with zero occurrences are returned. - * @type \Google\Protobuf\Duration $timed_count_duration - * Optional. The preferred duration for a single returned `TimedCount`. - * If not set, no timed counts are returned. - * @type int $alignment - * Optional. The alignment of the timed counts to be returned. - * Default is `ALIGNMENT_EQUAL_AT_END`. - * @type \Google\Protobuf\Timestamp $alignment_time - * Optional. Time where the timed counts shall be aligned if rounded - * alignment is chosen. Default is 00:00 UTC. - * @type int $order - * Optional. The sort order in which the results are returned. - * Default is `COUNT_DESC`. - * @type int $page_size - * Optional. The maximum number of results to return per response. - * Default is 20. - * @type string $page_token - * Optional. A `next_page_token` provided by a previous response. To view - * additional results, pass this token along with the identical query - * parameters as the first request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` - * and `{projectNumber}` can be found in the - * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). - * Examples: `projects/my-project-123`, `projects/5551234`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProjectName() - { - return $this->project_name; - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` - * and `{projectNumber}` can be found in the - * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). - * Examples: `projects/my-project-123`, `projects/5551234`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProjectName($var) - { - GPBUtil::checkString($var, True); - $this->project_name = $var; - - return $this; - } - - /** - * Optional. List all ErrorGroupStats with these IDs. - * - * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroupId() - { - return $this->group_id; - } - - /** - * Optional. List all ErrorGroupStats with these IDs. - * - * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroupId($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->group_id = $arr; - - return $this; - } - - /** - * Optional. List only ErrorGroupStats which belong to a service - * context that matches the filter. - * Data for all service contexts is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter|null - */ - public function getServiceFilter() - { - return $this->service_filter; - } - - public function hasServiceFilter() - { - return isset($this->service_filter); - } - - public function clearServiceFilter() - { - unset($this->service_filter); - } - - /** - * Optional. List only ErrorGroupStats which belong to a service - * context that matches the filter. - * Data for all service contexts is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $var - * @return $this - */ - public function setServiceFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter::class); - $this->service_filter = $var; - - return $this; - } - - /** - * Optional. List data for the given time range. - * If not set, a default time range is used. The field - * time_range_begin in the response will specify the beginning - * of this time range. - * Only ErrorGroupStats with a non-zero count in the given time - * range are returned, unless the request contains an explicit - * group_id list. If a group_id list is given, also - * ErrorGroupStats with zero occurrences are returned. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange|null - */ - public function getTimeRange() - { - return $this->time_range; - } - - public function hasTimeRange() - { - return isset($this->time_range); - } - - public function clearTimeRange() - { - unset($this->time_range); - } - - /** - * Optional. List data for the given time range. - * If not set, a default time range is used. The field - * time_range_begin in the response will specify the beginning - * of this time range. - * Only ErrorGroupStats with a non-zero count in the given time - * range are returned, unless the request contains an explicit - * group_id list. If a group_id list is given, also - * ErrorGroupStats with zero occurrences are returned. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $var - * @return $this - */ - public function setTimeRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange::class); - $this->time_range = $var; - - return $this; - } - - /** - * Optional. The preferred duration for a single returned `TimedCount`. - * If not set, no timed counts are returned. - * - * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getTimedCountDuration() - { - return $this->timed_count_duration; - } - - public function hasTimedCountDuration() - { - return isset($this->timed_count_duration); - } - - public function clearTimedCountDuration() - { - unset($this->timed_count_duration); - } - - /** - * Optional. The preferred duration for a single returned `TimedCount`. - * If not set, no timed counts are returned. - * - * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimedCountDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timed_count_duration = $var; - - return $this; - } - - /** - * Optional. The alignment of the timed counts to be returned. - * Default is `ALIGNMENT_EQUAL_AT_END`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAlignment() - { - return $this->alignment; - } - - /** - * Optional. The alignment of the timed counts to be returned. - * Default is `ALIGNMENT_EQUAL_AT_END`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAlignment($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\TimedCountAlignment::class); - $this->alignment = $var; - - return $this; - } - - /** - * Optional. Time where the timed counts shall be aligned if rounded - * alignment is chosen. Default is 00:00 UTC. - * - * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getAlignmentTime() - { - return $this->alignment_time; - } - - public function hasAlignmentTime() - { - return isset($this->alignment_time); - } - - public function clearAlignmentTime() - { - unset($this->alignment_time); - } - - /** - * Optional. Time where the timed counts shall be aligned if rounded - * alignment is chosen. Default is 00:00 UTC. - * - * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setAlignmentTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->alignment_time = $var; - - return $this; - } - - /** - * Optional. The sort order in which the results are returned. - * Default is `COUNT_DESC`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getOrder() - { - return $this->order; - } - - /** - * Optional. The sort order in which the results are returned. - * Default is `COUNT_DESC`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setOrder($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupOrder::class); - $this->order = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return per response. - * Default is 20. - * - * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return per response. - * Default is 20. - * - * Generated from protobuf field int32 page_size = 11 [(.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 `next_page_token` provided by a previous response. To view - * additional results, pass this token along with the identical query - * parameters as the first request. - * - * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A `next_page_token` provided by a previous response. To view - * additional results, pass this token along with the identical query - * parameters as the first request. - * - * Generated from protobuf field string page_token = 12 [(.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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php deleted file mode 100644 index 56bfa9df4b28..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php +++ /dev/null @@ -1,165 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse - */ -class ListGroupStatsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The error group stats which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; - */ - private $error_group_stats; - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The timestamp specifies the start time to which the request was restricted. - * The start time is set based on the requested time range. It may be adjusted - * to a later time if a project has exceeded the storage quota and older data - * has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - */ - protected $time_range_begin = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats>|\Google\Protobuf\Internal\RepeatedField $error_group_stats - * The error group stats which match the given request. - * @type string $next_page_token - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * @type \Google\Protobuf\Timestamp $time_range_begin - * The timestamp specifies the start time to which the request was restricted. - * The start time is set based on the requested time range. It may be adjusted - * to a later time if a project has exceeded the storage quota and older data - * has been deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * The error group stats which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrorGroupStats() - { - return $this->error_group_stats; - } - - /** - * The error group stats which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; - * @param array<\Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrorGroupStats($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats::class); - $this->error_group_stats = $arr; - - return $this; - } - - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view 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; - } - - /** - * The timestamp specifies the start time to which the request was restricted. - * The start time is set based on the requested time range. It may be adjusted - * to a later time if a project has exceeded the storage quota and older data - * has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimeRangeBegin() - { - return $this->time_range_begin; - } - - public function hasTimeRangeBegin() - { - return isset($this->time_range_begin); - } - - public function clearTimeRangeBegin() - { - unset($this->time_range_begin); - } - - /** - * The timestamp specifies the start time to which the request was restricted. - * The start time is set based on the requested time range. It may be adjusted - * to a later time if a project has exceeded the storage quota and older data - * has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimeRangeBegin($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->time_range_begin = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php deleted file mode 100644 index e095a9c2c996..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php +++ /dev/null @@ -1,68 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.QueryTimeRange - */ -class QueryTimeRange extends \Google\Protobuf\Internal\Message -{ - /** - * Restricts the query to the specified time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; - */ - protected $period = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $period - * Restricts the query to the specified time range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Restricts the query to the specified time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; - * @return int - */ - public function getPeriod() - { - return $this->period; - } - - /** - * Restricts the query to the specified time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; - * @param int $var - * @return $this - */ - public function setPeriod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange\Period::class); - $this->period = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php deleted file mode 100644 index 9aa826cf2d57..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php +++ /dev/null @@ -1,90 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period - */ -class Period -{ - /** - * Do not use. - * - * Generated from protobuf enum PERIOD_UNSPECIFIED = 0; - */ - const PERIOD_UNSPECIFIED = 0; - /** - * Retrieve data for the last hour. - * Recommended minimum timed count duration: 1 min. - * - * Generated from protobuf enum PERIOD_1_HOUR = 1; - */ - const PERIOD_1_HOUR = 1; - /** - * Retrieve data for the last 6 hours. - * Recommended minimum timed count duration: 10 min. - * - * Generated from protobuf enum PERIOD_6_HOURS = 2; - */ - const PERIOD_6_HOURS = 2; - /** - * Retrieve data for the last day. - * Recommended minimum timed count duration: 1 hour. - * - * Generated from protobuf enum PERIOD_1_DAY = 3; - */ - const PERIOD_1_DAY = 3; - /** - * Retrieve data for the last week. - * Recommended minimum timed count duration: 6 hours. - * - * Generated from protobuf enum PERIOD_1_WEEK = 4; - */ - const PERIOD_1_WEEK = 4; - /** - * Retrieve data for the last 30 days. - * Recommended minimum timed count duration: 1 day. - * - * Generated from protobuf enum PERIOD_30_DAYS = 5; - */ - const PERIOD_30_DAYS = 5; - - private static $valueToName = [ - self::PERIOD_UNSPECIFIED => 'PERIOD_UNSPECIFIED', - self::PERIOD_1_HOUR => 'PERIOD_1_HOUR', - self::PERIOD_6_HOURS => 'PERIOD_6_HOURS', - self::PERIOD_1_DAY => 'PERIOD_1_DAY', - self::PERIOD_1_WEEK => 'PERIOD_1_WEEK', - self::PERIOD_30_DAYS => 'PERIOD_30_DAYS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Period::class, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange_Period::class); - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php deleted file mode 100644 index 1ab3a0a72ac0..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange_Period.php +++ /dev/null @@ -1,16 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequest - */ -class ReportErrorEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectId}`, where `{projectId}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: // `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $project_name = ''; - /** - * Required. The error event to be reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_name - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectId}`, where `{projectId}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: // `projects/my-project-123`. - * @type \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $event - * Required. The error event to be reported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectId}`, where `{projectId}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: // `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProjectName() - { - return $this->project_name; - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectId}`, where `{projectId}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: // `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProjectName($var) - { - GPBUtil::checkString($var, True); - $this->project_name = $var; - - return $this; - } - - /** - * Required. The error event to be reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent|null - */ - public function getEvent() - { - return $this->event; - } - - public function hasEvent() - { - return isset($this->event); - } - - public function clearEvent() - { - unset($this->event); - } - - /** - * Required. The error event to be reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent::class); - $this->event = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php deleted file mode 100644 index 14380862c6a8..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse - */ -class ReportErrorEventResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php deleted file mode 100644 index 6586dff9b22f..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorsServiceGrpcClient.php +++ /dev/null @@ -1,66 +0,0 @@ -_simpleRequest('/google.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent', - $argument, - ['\Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php deleted file mode 100644 index d92ac7651617..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php +++ /dev/null @@ -1,295 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent - */ -class ReportedErrorEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Time when the event occurred. - * If not provided, the time when the event was received by the - * Error Reporting system will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $event_time = null; - /** - * Required. The service context in which this error has occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service_context = null; - /** - * Required. The error message. - * If no `context.reportLocation` is provided, the message must contain a - * header (typically consisting of the exception type name and an error - * message) and an exception stack trace in one of the supported programming - * languages and formats. - * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. - * Supported stack trace formats are: - * * **Java**: Must be the return value of - * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). - * * **Python**: Must be the return value of - * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). - * * **JavaScript**: Must be the value of - * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned - * by V8. - * * **Ruby**: Must contain frames returned by - * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). - * * **C#**: Must be the return value of - * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). - * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` - * and contain the result of - * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). - * * **Go**: Must be the return value of - * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). - * - * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $message = ''; - /** - * Optional. A description of the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $event_time - * Optional. Time when the event occurred. - * If not provided, the time when the event was received by the - * Error Reporting system will be used. - * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $service_context - * Required. The service context in which this error has occurred. - * @type string $message - * Required. The error message. - * If no `context.reportLocation` is provided, the message must contain a - * header (typically consisting of the exception type name and an error - * message) and an exception stack trace in one of the supported programming - * languages and formats. - * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. - * Supported stack trace formats are: - * * **Java**: Must be the return value of - * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). - * * **Python**: Must be the return value of - * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). - * * **JavaScript**: Must be the value of - * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned - * by V8. - * * **Ruby**: Must contain frames returned by - * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). - * * **C#**: Must be the return value of - * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). - * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` - * and contain the result of - * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). - * * **Go**: Must be the return value of - * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $context - * Optional. A description of the context in which the error occurred. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Time when the event occurred. - * If not provided, the time when the event was received by the - * Error Reporting system will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventTime() - { - return $this->event_time; - } - - public function hasEventTime() - { - return isset($this->event_time); - } - - public function clearEventTime() - { - unset($this->event_time); - } - - /** - * Optional. Time when the event occurred. - * If not provided, the time when the event was received by the - * Error Reporting system will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - - /** - * Required. The service context in which this error has occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext|null - */ - public function getServiceContext() - { - return $this->service_context; - } - - public function hasServiceContext() - { - return isset($this->service_context); - } - - public function clearServiceContext() - { - unset($this->service_context); - } - - /** - * Required. The service context in which this error has occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $var - * @return $this - */ - public function setServiceContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); - $this->service_context = $var; - - return $this; - } - - /** - * Required. The error message. - * If no `context.reportLocation` is provided, the message must contain a - * header (typically consisting of the exception type name and an error - * message) and an exception stack trace in one of the supported programming - * languages and formats. - * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. - * Supported stack trace formats are: - * * **Java**: Must be the return value of - * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). - * * **Python**: Must be the return value of - * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). - * * **JavaScript**: Must be the value of - * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned - * by V8. - * * **Ruby**: Must contain frames returned by - * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). - * * **C#**: Must be the return value of - * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). - * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` - * and contain the result of - * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). - * * **Go**: Must be the return value of - * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). - * - * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Required. The error message. - * If no `context.reportLocation` is provided, the message must contain a - * header (typically consisting of the exception type name and an error - * message) and an exception stack trace in one of the supported programming - * languages and formats. - * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. - * Supported stack trace formats are: - * * **Java**: Must be the return value of - * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). - * * **Python**: Must be the return value of - * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). - * * **JavaScript**: Must be the value of - * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned - * by V8. - * * **Ruby**: Must contain frames returned by - * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). - * * **C#**: Must be the return value of - * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). - * * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` - * and contain the result of - * [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). - * * **Go**: Must be the return value of - * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). - * - * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Optional. A description of the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext|null - */ - public function getContext() - { - return $this->context; - } - - public function hasContext() - { - return isset($this->context); - } - - public function clearContext() - { - unset($this->context); - } - - /** - * Optional. A description of the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $var - * @return $this - */ - public function setContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorContext::class); - $this->context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php deleted file mode 100644 index a50feb043ec5..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php +++ /dev/null @@ -1,78 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ResolutionStatus - */ -class ResolutionStatus -{ - /** - * Status is unknown. When left unspecified in requests, it is treated like - * OPEN. - * - * Generated from protobuf enum RESOLUTION_STATUS_UNSPECIFIED = 0; - */ - const RESOLUTION_STATUS_UNSPECIFIED = 0; - /** - * The error group is not being addressed. This is the default for - * new groups. It is also used for errors re-occurring after marked RESOLVED. - * - * Generated from protobuf enum OPEN = 1; - */ - const OPEN = 1; - /** - * Error Group manually acknowledged, it can have an issue link attached. - * - * Generated from protobuf enum ACKNOWLEDGED = 2; - */ - const ACKNOWLEDGED = 2; - /** - * Error Group manually resolved, more events for this group are not expected - * to occur. - * - * Generated from protobuf enum RESOLVED = 3; - */ - const RESOLVED = 3; - /** - * The error group is muted and excluded by default on group stats requests. - * - * Generated from protobuf enum MUTED = 4; - */ - const MUTED = 4; - - private static $valueToName = [ - self::RESOLUTION_STATUS_UNSPECIFIED => 'RESOLUTION_STATUS_UNSPECIFIED', - self::OPEN => 'OPEN', - self::ACKNOWLEDGED => 'ACKNOWLEDGED', - self::RESOLVED => 'RESOLVED', - self::MUTED => 'MUTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php deleted file mode 100644 index df54f8cfb839..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php +++ /dev/null @@ -1,180 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ServiceContext - */ -class ServiceContext extends \Google\Protobuf\Internal\Message -{ - /** - * An identifier of the service, such as the name of the - * executable, job, or Google App Engine service name. This field is expected - * to have a low number of values that are relatively stable over time, as - * opposed to `version`, which can be changed whenever new code is deployed. - * Contains the service name for error reports extracted from Google - * App Engine logs or `default` if the App Engine default service is used. - * - * Generated from protobuf field string service = 2; - */ - protected $service = ''; - /** - * Represents the source code version that the developer provided, - * which could represent a version label or a Git SHA-1 hash, for example. - * For App Engine standard environment, the version is set to the version of - * the app. - * - * Generated from protobuf field string version = 3; - */ - protected $version = ''; - /** - * Type of the MonitoredResource. List of possible values: - * https://cloud.google.com/monitoring/api/resources - * Value is set automatically for incoming errors and must not be set when - * reporting errors. - * - * Generated from protobuf field string resource_type = 4; - */ - protected $resource_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * An identifier of the service, such as the name of the - * executable, job, or Google App Engine service name. This field is expected - * to have a low number of values that are relatively stable over time, as - * opposed to `version`, which can be changed whenever new code is deployed. - * Contains the service name for error reports extracted from Google - * App Engine logs or `default` if the App Engine default service is used. - * @type string $version - * Represents the source code version that the developer provided, - * which could represent a version label or a Git SHA-1 hash, for example. - * For App Engine standard environment, the version is set to the version of - * the app. - * @type string $resource_type - * Type of the MonitoredResource. List of possible values: - * https://cloud.google.com/monitoring/api/resources - * Value is set automatically for incoming errors and must not be set when - * reporting errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * An identifier of the service, such as the name of the - * executable, job, or Google App Engine service name. This field is expected - * to have a low number of values that are relatively stable over time, as - * opposed to `version`, which can be changed whenever new code is deployed. - * Contains the service name for error reports extracted from Google - * App Engine logs or `default` if the App Engine default service is used. - * - * Generated from protobuf field string service = 2; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * An identifier of the service, such as the name of the - * executable, job, or Google App Engine service name. This field is expected - * to have a low number of values that are relatively stable over time, as - * opposed to `version`, which can be changed whenever new code is deployed. - * Contains the service name for error reports extracted from Google - * App Engine logs or `default` if the App Engine default service is used. - * - * Generated from protobuf field string service = 2; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * Represents the source code version that the developer provided, - * which could represent a version label or a Git SHA-1 hash, for example. - * For App Engine standard environment, the version is set to the version of - * the app. - * - * Generated from protobuf field string version = 3; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Represents the source code version that the developer provided, - * which could represent a version label or a Git SHA-1 hash, for example. - * For App Engine standard environment, the version is set to the version of - * the app. - * - * 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; - } - - /** - * Type of the MonitoredResource. List of possible values: - * https://cloud.google.com/monitoring/api/resources - * Value is set automatically for incoming errors and must not be set when - * reporting errors. - * - * Generated from protobuf field string resource_type = 4; - * @return string - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * Type of the MonitoredResource. List of possible values: - * https://cloud.google.com/monitoring/api/resources - * Value is set automatically for incoming errors and must not be set when - * reporting errors. - * - * Generated from protobuf field string resource_type = 4; - * @param string $var - * @return $this - */ - public function setResourceType($var) - { - GPBUtil::checkString($var, True); - $this->resource_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php deleted file mode 100644 index 140d3323103d..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php +++ /dev/null @@ -1,150 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter - */ -class ServiceContextFilter extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The exact value to match against - * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). - * - * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service = ''; - /** - * Optional. The exact value to match against - * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = ''; - /** - * Optional. The exact value to match against - * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). - * - * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * Optional. The exact value to match against - * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). - * @type string $version - * Optional. The exact value to match against - * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). - * @type string $resource_type - * Optional. The exact value to match against - * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). - * - * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). - * - * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). - * - * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). - * - * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setResourceType($var) - { - GPBUtil::checkString($var, True); - $this->resource_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php deleted file mode 100644 index f85e34012700..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php +++ /dev/null @@ -1,150 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.SourceLocation - */ -class SourceLocation extends \Google\Protobuf\Internal\Message -{ - /** - * The source code filename, which can include a truncated relative - * path, or a full path from a production machine. - * - * Generated from protobuf field string file_path = 1; - */ - protected $file_path = ''; - /** - * 1-based. 0 indicates that the line number is unknown. - * - * Generated from protobuf field int32 line_number = 2; - */ - protected $line_number = 0; - /** - * Human-readable name of a function or method. - * The value can include optional context like the class or package name. - * For example, `my.package.MyClass.method` in case of Java. - * - * Generated from protobuf field string function_name = 4; - */ - protected $function_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $file_path - * The source code filename, which can include a truncated relative - * path, or a full path from a production machine. - * @type int $line_number - * 1-based. 0 indicates that the line number is unknown. - * @type string $function_name - * Human-readable name of a function or method. - * The value can include optional context like the class or package name. - * For example, `my.package.MyClass.method` in case of Java. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The source code filename, which can include a truncated relative - * path, or a full path from a production machine. - * - * Generated from protobuf field string file_path = 1; - * @return string - */ - public function getFilePath() - { - return $this->file_path; - } - - /** - * The source code filename, which can include a truncated relative - * path, or a full path from a production machine. - * - * Generated from protobuf field string file_path = 1; - * @param string $var - * @return $this - */ - public function setFilePath($var) - { - GPBUtil::checkString($var, True); - $this->file_path = $var; - - return $this; - } - - /** - * 1-based. 0 indicates that the line number is unknown. - * - * Generated from protobuf field int32 line_number = 2; - * @return int - */ - public function getLineNumber() - { - return $this->line_number; - } - - /** - * 1-based. 0 indicates that the line number is unknown. - * - * Generated from protobuf field int32 line_number = 2; - * @param int $var - * @return $this - */ - public function setLineNumber($var) - { - GPBUtil::checkInt32($var); - $this->line_number = $var; - - return $this; - } - - /** - * Human-readable name of a function or method. - * The value can include optional context like the class or package name. - * For example, `my.package.MyClass.method` in case of Java. - * - * Generated from protobuf field string function_name = 4; - * @return string - */ - public function getFunctionName() - { - return $this->function_name; - } - - /** - * Human-readable name of a function or method. - * The value can include optional context like the class or package name. - * For example, `my.package.MyClass.method` in case of Java. - * - * Generated from protobuf field string function_name = 4; - * @param string $var - * @return $this - */ - public function setFunctionName($var) - { - GPBUtil::checkString($var, True); - $this->function_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php deleted file mode 100644 index 7605fd7676fd..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php +++ /dev/null @@ -1,157 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.TimedCount - */ -class TimedCount extends \Google\Protobuf\Internal\Message -{ - /** - * Approximate number of occurrences in the given time period. - * - * Generated from protobuf field int64 count = 1; - */ - protected $count = 0; - /** - * Start of the time period to which `count` refers (included). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * End of the time period to which `count` refers (excluded). - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $count - * Approximate number of occurrences in the given time period. - * @type \Google\Protobuf\Timestamp $start_time - * Start of the time period to which `count` refers (included). - * @type \Google\Protobuf\Timestamp $end_time - * End of the time period to which `count` refers (excluded). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Approximate number of occurrences in the given time period. - * - * Generated from protobuf field int64 count = 1; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Approximate number of occurrences in the given time period. - * - * Generated from protobuf field int64 count = 1; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - - /** - * Start of the time period to which `count` refers (included). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @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 time period to which `count` refers (included). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * End of the time period to which `count` refers (excluded). - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @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); - } - - /** - * End of the time period to which `count` refers (excluded). - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php deleted file mode 100644 index 633e74c96e9d..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php +++ /dev/null @@ -1,71 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment - */ -class TimedCountAlignment -{ - /** - * No alignment specified. - * - * Generated from protobuf enum ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0; - */ - const ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0; - /** - * The time periods shall be consecutive, have width equal to the - * requested duration, and be aligned at the `alignment_time` provided in - * the request. - * The `alignment_time` does not have to be inside the query period but - * even if it is outside, only time periods are returned which overlap - * with the query period. - * A rounded alignment will typically result in a - * different size of the first or the last time period. - * - * Generated from protobuf enum ALIGNMENT_EQUAL_ROUNDED = 1; - */ - const ALIGNMENT_EQUAL_ROUNDED = 1; - /** - * The time periods shall be consecutive, have width equal to the - * requested duration, and be aligned at the end of the requested time - * period. This can result in a different size of the - * first time period. - * - * Generated from protobuf enum ALIGNMENT_EQUAL_AT_END = 2; - */ - const ALIGNMENT_EQUAL_AT_END = 2; - - private static $valueToName = [ - self::ERROR_COUNT_ALIGNMENT_UNSPECIFIED => 'ERROR_COUNT_ALIGNMENT_UNSPECIFIED', - self::ALIGNMENT_EQUAL_ROUNDED => 'ALIGNMENT_EQUAL_ROUNDED', - self::ALIGNMENT_EQUAL_AT_END => 'ALIGNMENT_EQUAL_AT_END', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php deleted file mode 100644 index b6a97dcab003..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php +++ /dev/null @@ -1,71 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.TrackingIssue - */ -class TrackingIssue extends \Google\Protobuf\Internal\Message -{ - /** - * A URL pointing to a related entry in an issue tracking system. - * Example: `https://github.com/user/project/issues/4` - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * A URL pointing to a related entry in an issue tracking system. - * Example: `https://github.com/user/project/issues/4` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * A URL pointing to a related entry in an issue tracking system. - * Example: `https://github.com/user/project/issues/4` - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * A URL pointing to a related entry in an issue tracking system. - * Example: `https://github.com/user/project/issues/4` - * - * 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; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php deleted file mode 100644 index 2475ee41bdc5..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest - */ -class UpdateGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The group which replaces the resource on the server. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group - * Required. The group which replaces the resource on the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorGroupService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The group which replaces the resource on the server. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup|null - */ - public function getGroup() - { - return $this->group; - } - - public function hasGroup() - { - return isset($this->group); - } - - public function clearGroup() - { - unset($this->group); - } - - /** - * Required. The group which replaces the resource on the server. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup::class); - $this->group = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php deleted file mode 100644 index 7ae7842c593a..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php +++ /dev/null @@ -1,71 +0,0 @@ -getGroup($formattedGroupName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedGroupName = ErrorGroupServiceClient::errorGroupName('[PROJECT]', '[GROUP]'); - - get_group_sample($formattedGroupName); -} -// [END clouderrorreporting_v1beta1_generated_ErrorGroupService_GetGroup_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php deleted file mode 100644 index c7b5f35a8602..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php +++ /dev/null @@ -1,57 +0,0 @@ -updateGroup($group); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END clouderrorreporting_v1beta1_generated_ErrorGroupService_UpdateGroup_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php deleted file mode 100644 index 514c4b63af15..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php +++ /dev/null @@ -1,71 +0,0 @@ -deleteEvents($formattedProjectName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedProjectName = ErrorStatsServiceClient::projectName('[PROJECT]'); - - delete_events_sample($formattedProjectName); -} -// [END clouderrorreporting_v1beta1_generated_ErrorStatsService_DeleteEvents_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php deleted file mode 100644 index 36ee1680820f..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php +++ /dev/null @@ -1,78 +0,0 @@ -listEvents($formattedProjectName, $groupId); - - /** @var ErrorEvent $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 -{ - $formattedProjectName = ErrorStatsServiceClient::projectName('[PROJECT]'); - $groupId = '[GROUP_ID]'; - - list_events_sample($formattedProjectName, $groupId); -} -// [END clouderrorreporting_v1beta1_generated_ErrorStatsService_ListEvents_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php deleted file mode 100644 index 19915578b034..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php +++ /dev/null @@ -1,76 +0,0 @@ -listGroupStats($formattedProjectName); - - /** @var ErrorGroupStats $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 -{ - $formattedProjectName = ErrorStatsServiceClient::projectName('[PROJECT]'); - - list_group_stats_sample($formattedProjectName); -} -// [END clouderrorreporting_v1beta1_generated_ErrorStatsService_ListGroupStats_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php deleted file mode 100644 index d29c431aa38a..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php +++ /dev/null @@ -1,120 +0,0 @@ -setServiceContext($eventServiceContext) - ->setMessage($eventMessage); - - // Call the API and handle any network failures. - try { - /** @var ReportErrorEventResponse $response */ - $response = $reportErrorsServiceClient->reportErrorEvent($formattedProjectName, $event); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedProjectName = ReportErrorsServiceClient::projectName('[PROJECT]'); - $eventMessage = '[MESSAGE]'; - - report_error_event_sample($formattedProjectName, $eventMessage); -} -// [END clouderrorreporting_v1beta1_generated_ReportErrorsService_ReportErrorEvent_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php deleted file mode 100644 index 2534c4aacd62..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ErrorGroupServiceClient.php +++ /dev/null @@ -1,36 +0,0 @@ -errorGroupName('[PROJECT]', '[GROUP]'); - * $response = $errorGroupServiceClient->getGroup($formattedGroupName); - * } finally { - * $errorGroupServiceClient->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. - * - * @experimental - */ -class ErrorGroupServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; - - /** 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 $errorGroupNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/error_group_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/error_group_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/error_group_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/error_group_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getErrorGroupNameTemplate() - { - if (self::$errorGroupNameTemplate == null) { - self::$errorGroupNameTemplate = new PathTemplate('projects/{project}/groups/{group}'); - } - - return self::$errorGroupNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'errorGroup' => self::getErrorGroupNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a error_group - * resource. - * - * @param string $project - * @param string $group - * - * @return string The formatted error_group resource. - * - * @experimental - */ - public static function errorGroupName($project, $group) - { - return self::getErrorGroupNameTemplate()->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 - * - errorGroup: 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. - * - * @experimental - */ - 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 'clouderrorreporting.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); - } - - /** - * Get the specified group. - * - * Sample code: - * ``` - * $errorGroupServiceClient = new ErrorGroupServiceClient(); - * try { - * $formattedGroupName = $errorGroupServiceClient->errorGroupName('[PROJECT]', '[GROUP]'); - * $response = $errorGroupServiceClient->getGroup($formattedGroupName); - * } finally { - * $errorGroupServiceClient->close(); - * } - * ``` - * - * @param string $groupName Required. The group resource name. Written as - * `projects/{projectID}/groups/{group_name}`. Call - * [`groupStats.list`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/projects.groupStats/list) - * to return a list of groups belonging to this project. - * - * Example: `projects/my-project-123/groups/my-group` - * @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\ErrorReporting\V1beta1\ErrorGroup - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getGroup($groupName, array $optionalArgs = []) - { - $request = new GetGroupRequest(); - $requestParamHeaders = []; - $request->setGroupName($groupName); - $requestParamHeaders['group_name'] = $groupName; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetGroup', ErrorGroup::class, $optionalArgs, $request)->wait(); - } - - /** - * Replace the data for the specified group. - * Fails if the group does not exist. - * - * Sample code: - * ``` - * $errorGroupServiceClient = new ErrorGroupServiceClient(); - * try { - * $group = new ErrorGroup(); - * $response = $errorGroupServiceClient->updateGroup($group); - * } finally { - * $errorGroupServiceClient->close(); - * } - * ``` - * - * @param ErrorGroup $group Required. The group which replaces the resource on the server. - * @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\ErrorReporting\V1beta1\ErrorGroup - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateGroup($group, array $optionalArgs = []) - { - $request = new UpdateGroupRequest(); - $requestParamHeaders = []; - $request->setGroup($group); - $requestParamHeaders['group.name'] = $group->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateGroup', ErrorGroup::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php deleted file mode 100644 index bf09507d96b8..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ErrorStatsServiceGapicClient.php +++ /dev/null @@ -1,530 +0,0 @@ -projectName('[PROJECT]'); - * $response = $errorStatsServiceClient->deleteEvents($formattedProjectName); - * } finally { - * $errorStatsServiceClient->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. - * - * @experimental - */ -class ErrorStatsServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; - - /** 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 $projectNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/error_stats_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/error_stats_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/error_stats_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/error_stats_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'project' => self::getProjectNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - * - * @experimental - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->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 - * - 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. - * - * @experimental - */ - 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 'clouderrorreporting.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); - } - - /** - * Deletes all error events of a given project. - * - * Sample code: - * ``` - * $errorStatsServiceClient = new ErrorStatsServiceClient(); - * try { - * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]'); - * $response = $errorStatsServiceClient->deleteEvents($formattedProjectName); - * } finally { - * $errorStatsServiceClient->close(); - * } - * ``` - * - * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * - * Example: `projects/my-project-123`. - * @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\ErrorReporting\V1beta1\DeleteEventsResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteEvents($projectName, array $optionalArgs = []) - { - $request = new DeleteEventsRequest(); - $requestParamHeaders = []; - $request->setProjectName($projectName); - $requestParamHeaders['project_name'] = $projectName; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteEvents', DeleteEventsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the specified events. - * - * Sample code: - * ``` - * $errorStatsServiceClient = new ErrorStatsServiceClient(); - * try { - * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]'); - * $groupId = 'group_id'; - * // Iterate over pages of elements - * $pagedResponse = $errorStatsServiceClient->listEvents($formattedProjectName, $groupId); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $errorStatsServiceClient->listEvents($formattedProjectName, $groupId); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $errorStatsServiceClient->close(); - * } - * ``` - * - * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}`, where `{projectID}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * - * Example: `projects/my-project-123`. - * @param string $groupId Required. The group for which events shall be returned. - * @param array $optionalArgs { - * Optional. - * - * @type ServiceContextFilter $serviceFilter - * Optional. List only ErrorGroups which belong to a service context that - * matches the filter. - * Data for all service contexts is returned if this field is not specified. - * @type QueryTimeRange $timeRange - * Optional. List only data for the given time range. - * If not set a default time range is used. The field time_range_begin - * in the response will specify the beginning of this time range. - * @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 - * - * @experimental - */ - public function listEvents($projectName, $groupId, array $optionalArgs = []) - { - $request = new ListEventsRequest(); - $requestParamHeaders = []; - $request->setProjectName($projectName); - $request->setGroupId($groupId); - $requestParamHeaders['project_name'] = $projectName; - if (isset($optionalArgs['serviceFilter'])) { - $request->setServiceFilter($optionalArgs['serviceFilter']); - } - - if (isset($optionalArgs['timeRange'])) { - $request->setTimeRange($optionalArgs['timeRange']); - } - - 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('ListEvents', $optionalArgs, ListEventsResponse::class, $request); - } - - /** - * Lists the specified groups. - * - * Sample code: - * ``` - * $errorStatsServiceClient = new ErrorStatsServiceClient(); - * try { - * $formattedProjectName = $errorStatsServiceClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $errorStatsServiceClient->listGroupStats($formattedProjectName); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $errorStatsServiceClient->close(); - * } - * ``` - * - * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectNumber}`, where `{projectID}` - * and `{projectNumber}` can be found in the - * [Google Cloud Console](https://support.google.com/cloud/answer/6158840). - * - * Examples: `projects/my-project-123`, `projects/5551234`. - * @param array $optionalArgs { - * Optional. - * - * @type string[] $groupId - * Optional. List all ErrorGroupStats with these IDs. - * @type ServiceContextFilter $serviceFilter - * Optional. List only ErrorGroupStats which belong to a service - * context that matches the filter. - * Data for all service contexts is returned if this field is not specified. - * @type QueryTimeRange $timeRange - * Optional. List data for the given time range. - * If not set, a default time range is used. The field - * time_range_begin in the response will specify the beginning - * of this time range. - * Only ErrorGroupStats with a non-zero count in the given time - * range are returned, unless the request contains an explicit - * group_id list. If a group_id list is given, also - * ErrorGroupStats with zero occurrences are returned. - * @type Duration $timedCountDuration - * Optional. The preferred duration for a single returned `TimedCount`. - * If not set, no timed counts are returned. - * @type int $alignment - * Optional. The alignment of the timed counts to be returned. - * Default is `ALIGNMENT_EQUAL_AT_END`. - * For allowed values, use constants defined on {@see \Google\Cloud\ErrorReporting\V1beta1\TimedCountAlignment} - * @type Timestamp $alignmentTime - * Optional. Time where the timed counts shall be aligned if rounded - * alignment is chosen. Default is 00:00 UTC. - * @type int $order - * Optional. The sort order in which the results are returned. - * Default is `COUNT_DESC`. - * For allowed values, use constants defined on {@see \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupOrder} - * @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 - * - * @experimental - */ - public function listGroupStats($projectName, array $optionalArgs = []) - { - $request = new ListGroupStatsRequest(); - $requestParamHeaders = []; - $request->setProjectName($projectName); - $requestParamHeaders['project_name'] = $projectName; - if (isset($optionalArgs['groupId'])) { - $request->setGroupId($optionalArgs['groupId']); - } - - if (isset($optionalArgs['serviceFilter'])) { - $request->setServiceFilter($optionalArgs['serviceFilter']); - } - - if (isset($optionalArgs['timeRange'])) { - $request->setTimeRange($optionalArgs['timeRange']); - } - - if (isset($optionalArgs['timedCountDuration'])) { - $request->setTimedCountDuration($optionalArgs['timedCountDuration']); - } - - if (isset($optionalArgs['alignment'])) { - $request->setAlignment($optionalArgs['alignment']); - } - - if (isset($optionalArgs['alignmentTime'])) { - $request->setAlignmentTime($optionalArgs['alignmentTime']); - } - - if (isset($optionalArgs['order'])) { - $request->setOrder($optionalArgs['order']); - } - - 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('ListGroupStats', $optionalArgs, ListGroupStatsResponse::class, $request); - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php deleted file mode 100644 index 1c7331481c3b..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Gapic/ReportErrorsServiceGapicClient.php +++ /dev/null @@ -1,316 +0,0 @@ -projectName('[PROJECT]'); - * $event = new ReportedErrorEvent(); - * $response = $reportErrorsServiceClient->reportErrorEvent($formattedProjectName, $event); - * } finally { - * $reportErrorsServiceClient->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. - * - * @experimental - */ -class ReportErrorsServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; - - /** 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 $projectNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/report_errors_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/report_errors_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/report_errors_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/report_errors_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'project' => self::getProjectNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - * - * @experimental - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->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 - * - 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. - * - * @experimental - */ - 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 'clouderrorreporting.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); - } - - /** - * Report an individual error event and record the event to a log. - * - * This endpoint accepts **either** an OAuth token, - * **or** an [API key](https://support.google.com/cloud/answer/6158862) - * for authentication. To use an API key, append it to the URL as the value of - * a `key` parameter. For example: - * - * `POST - * https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456` - * - * **Note:** [Error Reporting](/error-reporting) is a global service built - * on Cloud Logging and doesn't analyze logs stored - * in regional log buckets or logs routed to other Google Cloud projects. - * - * For more information, see - * [Using Error Reporting with regionalized - * logs](/error-reporting/docs/regionalization). - * - * Sample code: - * ``` - * $reportErrorsServiceClient = new ReportErrorsServiceClient(); - * try { - * $formattedProjectName = $reportErrorsServiceClient->projectName('[PROJECT]'); - * $event = new ReportedErrorEvent(); - * $response = $reportErrorsServiceClient->reportErrorEvent($formattedProjectName, $event); - * } finally { - * $reportErrorsServiceClient->close(); - * } - * ``` - * - * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectId}`, where `{projectId}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * - * Example: // `projects/my-project-123`. - * @param ReportedErrorEvent $event Required. The error event to be reported. - * @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\ErrorReporting\V1beta1\ReportErrorEventResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function reportErrorEvent($projectName, $event, array $optionalArgs = []) - { - $request = new ReportErrorEventRequest(); - $requestParamHeaders = []; - $request->setProjectName($projectName); - $request->setEvent($event); - $requestParamHeaders['project_name'] = $projectName; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ReportErrorEvent', ReportErrorEventResponse::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php deleted file mode 100644 index 1cf0f5c77828..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/ReportErrorsServiceClient.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService' => [], - ], -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php deleted file mode 100644 index e967a41f87ee..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php +++ /dev/null @@ -1,33 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService' => [ - 'GetGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{group_name=projects/*/groups/*}', - 'placeholders' => [ - 'group_name' => [ - 'getters' => [ - 'getGroupName', - ], - ], - ], - ], - 'UpdateGroup' => [ - 'method' => 'put', - 'uriTemplate' => '/v1beta1/{group.name=projects/*/groups/*}', - 'body' => 'group', - 'placeholders' => [ - 'group.name' => [ - 'getters' => [ - 'getGroup', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json deleted file mode 100644 index 0a7501188091..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "interfaces": { - "google.devtools.clouderrorreporting.v1beta1.ErrorStatsService": { - "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": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "DeleteEvents": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListEvents": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListGroupStats": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php deleted file mode 100644 index 35148865a5eb..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php +++ /dev/null @@ -1,28 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService' => [ - 'ListEvents' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getErrorEvents', - ], - ], - 'ListGroupStats' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getErrorGroupStats', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php deleted file mode 100644 index 8b9bb159bcb1..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php +++ /dev/null @@ -1,45 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService' => [ - 'DeleteEvents' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events', - 'placeholders' => [ - 'project_name' => [ - 'getters' => [ - 'getProjectName', - ], - ], - ], - ], - 'ListEvents' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events', - 'placeholders' => [ - 'project_name' => [ - 'getters' => [ - 'getProjectName', - ], - ], - ], - 'queryParams' => [ - 'group_id', - ], - ], - 'ListGroupStats' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{project_name=projects/*}/groupStats', - 'placeholders' => [ - 'project_name' => [ - 'getters' => [ - 'getProjectName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json deleted file mode 100644 index 701d5afb9615..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "interfaces": { - "google.devtools.clouderrorreporting.v1beta1.ReportErrorsService": { - "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": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ReportErrorEvent": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php deleted file mode 100644 index 52aefb0c1051..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php +++ /dev/null @@ -1,7 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService' => [], - ], -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php deleted file mode 100644 index c7565d89467b..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php +++ /dev/null @@ -1,21 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService' => [ - 'ReportErrorEvent' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events:report', - 'body' => 'event', - 'placeholders' => [ - 'project_name' => [ - 'getters' => [ - 'getProjectName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php deleted file mode 100644 index 9df60a549c5e..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorGroupServiceClientTest.php +++ /dev/null @@ -1,185 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ErrorGroupServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ErrorGroupServiceClient($options); - } - - /** @test */ - public function getGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $groupId = 'groupId506361563'; - $expectedResponse = new ErrorGroup(); - $expectedResponse->setName($name); - $expectedResponse->setGroupId($groupId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedGroupName = $gapicClient->errorGroupName('[PROJECT]', '[GROUP]'); - $response = $gapicClient->getGroup($formattedGroupName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getGroupName(); - $this->assertProtobufEquals($formattedGroupName, $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 - $formattedGroupName = $gapicClient->errorGroupName('[PROJECT]', '[GROUP]'); - try { - $gapicClient->getGroup($formattedGroupName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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'; - $groupId = 'groupId506361563'; - $expectedResponse = new ErrorGroup(); - $expectedResponse->setName($name); - $expectedResponse->setGroupId($groupId); - $transport->addResponse($expectedResponse); - // Mock request - $group = new ErrorGroup(); - $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.devtools.clouderrorreporting.v1beta1.ErrorGroupService/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 ErrorGroup(); - 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/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php deleted file mode 100644 index 4fd50e022e43..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ErrorStatsServiceClientTest.php +++ /dev/null @@ -1,263 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ErrorStatsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ErrorStatsServiceClient($options); - } - - /** @test */ - public function deleteEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new DeleteEventsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->deleteEvents($formattedProjectName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEventsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - try { - $gapicClient->deleteEvents($formattedProjectName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $errorEventsElement = new ErrorEvent(); - $errorEvents = [ - $errorEventsElement, - ]; - $expectedResponse = new ListEventsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setErrorEvents($errorEvents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $groupId = 'groupId506361563'; - $response = $gapicClient->listEvents($formattedProjectName, $groupId); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getErrorEvents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $actualValue = $actualRequestObject->getGroupId(); - $this->assertProtobufEquals($groupId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEventsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $groupId = 'groupId506361563'; - try { - $gapicClient->listEvents($formattedProjectName, $groupId); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupStatsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $errorGroupStatsElement = new ErrorGroupStats(); - $errorGroupStats = [ - $errorGroupStatsElement, - ]; - $expectedResponse = new ListGroupStatsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setErrorGroupStats($errorGroupStats); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listGroupStats($formattedProjectName); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getErrorGroupStats()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListGroupStats', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupStatsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - try { - $gapicClient->listGroupStats($formattedProjectName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->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/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php deleted file mode 100644 index 8b8a666af77d..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/ReportErrorsServiceClientTest.php +++ /dev/null @@ -1,133 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ReportErrorsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ReportErrorsServiceClient($options); - } - - /** @test */ - public function reportErrorEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReportErrorEventResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $event = new ReportedErrorEvent(); - $eventServiceContext = new ServiceContext(); - $event->setServiceContext($eventServiceContext); - $eventMessage = 'eventMessage1863181325'; - $event->setMessage($eventMessage); - $response = $gapicClient->reportErrorEvent($formattedProjectName, $event); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $actualValue = $actualRequestObject->getEvent(); - $this->assertProtobufEquals($event, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reportErrorEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $event = new ReportedErrorEvent(); - $eventServiceContext = new ServiceContext(); - $event->setServiceContext($eventServiceContext); - $eventMessage = 'eventMessage1863181325'; - $event->setMessage($eventMessage); - try { - $gapicClient->reportErrorEvent($formattedProjectName, $event); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->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/EssentialContacts/v1/proto/src/GPBMetadata/Google/Cloud/Essentialcontacts/V1/Enums.php b/owl-bot-staging/EssentialContacts/v1/proto/src/GPBMetadata/Google/Cloud/Essentialcontacts/V1/Enums.php deleted file mode 100644 index 3f482c7e004491b855c973eb3a51a1c7e6e027db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1167 zcmb7DTW-@p6eTI8?eM7OBJsn=M6_yJQAZJfE(ImFYb=ao#ZIImOVPxcxFfkUmOZXi zP&dR5*aC}S0jz*e#^W?pjR4^vKjz$XkMBL__1o+`123SBDb5kcGdR71{2aq9XPm_> zh0}6A$2pAIMMhGbYY>_P=nX<>nNHXer3EYV80#=$EJ<-EPFXqY;G)2k6O_h`auoBT zbJ^`+T3!^IWCnnu3tVI<#?bcrA23HV#8G5RlE|n?BI_w_Q?92qjf_@=5&B37n&}z@l;$J1=R>38Szo7|I2rk-=olzl>NBvjterTX;h2^e1`0TQ54Oj`9>Q}%cp!X(RS2Gs zd#)o&E6qVDDDDUr-6TS3R4N>=erfi9Ho%_9hxX5r^?`J)w2|NVI9wDYEJZZYSe|qe zOl3Yg^%2TQ@s~s$uk7VZvt`Q&X);3EGD5~8huXON?FJJqa`roDH>gM??MHLBrqXrE krRytXx<2ksA4tKk_Lr7>Sv&cb@&9OgiLCv74Xy$B1?^dJfB*mh diff --git a/owl-bot-staging/EssentialContacts/v1/proto/src/GPBMetadata/Google/Cloud/Essentialcontacts/V1/Service.php b/owl-bot-staging/EssentialContacts/v1/proto/src/GPBMetadata/Google/Cloud/Essentialcontacts/V1/Service.php deleted file mode 100644 index 05aa10522b35..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/proto/src/GPBMetadata/Google/Cloud/Essentialcontacts/V1/Service.php +++ /dev/null @@ -1,86 +0,0 @@ -internalAddGeneratedFile( - ' -€" -/google/cloud/essentialcontacts/v1/service.proto!google.cloud.essentialcontacts.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto-google/cloud/essentialcontacts/v1/enums.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ñ -Contact -name (  -email ( d -#notification_category_subscriptions (27.google.cloud.essentialcontacts.v1.NotificationCategory - language_tag ( L -validation_state (22.google.cloud.essentialcontacts.v1.ValidationState1 - validate_time ( 2.google.protobuf.Timestamp:«êA§ -(essentialcontacts.googleapis.com/Contact%projects/{project}/contacts/{contact}#folders/{folder}/contacts/{contact}/organizations/{organization}/contacts/{contact}"ˆ -ListContactsRequest@ -parent ( B0àAúA*(essentialcontacts.googleapis.com/Contact - page_size (BàA - -page_token ( BàA"m -ListContactsResponse< -contacts ( 2*.google.cloud.essentialcontacts.v1.Contact -next_page_token ( "S -GetContactRequest> -name ( B0àAúA* -(essentialcontacts.googleapis.com/Contact"V -DeleteContactRequest> -name ( B0àAúA* -(essentialcontacts.googleapis.com/Contact"š -CreateContactRequest@ -parent ( B0àAúA*(essentialcontacts.googleapis.com/Contact@ -contact ( 2*.google.cloud.essentialcontacts.v1.ContactBàA"Ž -UpdateContactRequest@ -contact ( 2*.google.cloud.essentialcontacts.v1.ContactBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"å -ComputeContactsRequest@ -parent ( B0àAúA*(essentialcontacts.googleapis.com/ContactX -notification_categories (27.google.cloud.essentialcontacts.v1.NotificationCategory - page_size (BàA - -page_token ( BàA"p -ComputeContactsResponse< -contacts ( 2*.google.cloud.essentialcontacts.v1.Contact -next_page_token ( "ý -SendTestMessageRequestB -contacts ( B0àAúA* -(essentialcontacts.googleapis.com/ContactB -resource ( B0àAúA*(essentialcontacts.googleapis.com/Contact[ -notification_category (27.google.cloud.essentialcontacts.v1.NotificationCategoryBàA2Ë -EssentialContactsService˜ - CreateContact7.google.cloud.essentialcontacts.v1.CreateContactRequest*.google.cloud.essentialcontacts.v1.Contact"¡‚Ó䓉" /v1/{parent=projects/*}/contacts:contactZ*"/v1/{parent=folders/*}/contacts:contactZ0"%/v1/{parent=organizations/*}/contacts:contactÚAparent,contactµ - UpdateContact7.google.cloud.essentialcontacts.v1.UpdateContactRequest*.google.cloud.essentialcontacts.v1.Contact"¾‚Óä“¡2(/v1/{contact.name=projects/*/contacts/*}:contactZ22\'/v1/{contact.name=folders/*/contacts/*}:contactZ82-/v1/{contact.name=organizations/*/contacts/*}:contactÚAcontact,update_maskþ - ListContacts6.google.cloud.essentialcontacts.v1.ListContactsRequest7.google.cloud.essentialcontacts.v1.ListContactsResponse"}‚Óä“n /v1/{parent=projects/*}/contactsZ!/v1/{parent=folders/*}/contactsZ\'%/v1/{parent=organizations/*}/contactsÚAparentë - -GetContact4.google.cloud.essentialcontacts.v1.GetContactRequest*.google.cloud.essentialcontacts.v1.Contact"{‚Óä“n /v1/{name=projects/*/contacts/*}Z!/v1/{name=folders/*/contacts/*}Z\'%/v1/{name=organizations/*/contacts/*}ÚAnameÝ - DeleteContact7.google.cloud.essentialcontacts.v1.DeleteContactRequest.google.protobuf.Empty"{‚Óä“n* /v1/{name=projects/*/contacts/*}Z!*/v1/{name=folders/*/contacts/*}Z\'*%/v1/{name=organizations/*/contacts/*}ÚAname˜ -ComputeContacts9.google.cloud.essentialcontacts.v1.ComputeContactsRequest:.google.cloud.essentialcontacts.v1.ComputeContactsResponse"‚Ó䓆(/v1/{parent=projects/*}/contacts:computeZ)\'/v1/{parent=folders/*}/contacts:computeZ/-/v1/{parent=organizations/*}/contacts:compute› -SendTestMessage9.google.cloud.essentialcontacts.v1.SendTestMessageRequest.google.protobuf.Empty"´‚Óä“­"2/v1/{resource=projects/*}/contacts:sendTestMessage:*Z6"1/v1/{resource=folders/*}/contacts:sendTestMessage:*Z<"7/v1/{resource=organizations/*}/contacts:sendTestMessage:*TÊA essentialcontacts.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBì -%com.google.cloud.essentialcontacts.v1PZRgoogle.golang.org/genproto/googleapis/cloud/essentialcontacts/v1;essentialcontactsª!Google.Cloud.EssentialContacts.V1Ê!Google\\Cloud\\EssentialContacts\\V1ê$Google::Cloud::EssentialContacts::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsRequest.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsRequest.php deleted file mode 100644 index a00eed430a0d..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsRequest.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.essentialcontacts.v1.ComputeContactsRequest - */ -class ComputeContactsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the resource to compute contacts for. - * Format: organizations/{organization_id}, - * folders/{folder_id} or projects/{project_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The categories of notifications to compute contacts for. If ALL is included - * in this list, contacts subscribed to any notification category will be - * returned. - * - * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.NotificationCategory notification_categories = 6; - */ - private $notification_categories; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `next_page_token` in the - * response indicates that more results might be available. - * If not specified, the default page_size is 100. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. If present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the resource to compute contacts for. - * Format: organizations/{organization_id}, - * folders/{folder_id} or projects/{project_id} - * @type array|\Google\Protobuf\Internal\RepeatedField $notification_categories - * The categories of notifications to compute contacts for. If ALL is included - * in this list, contacts subscribed to any notification category will be - * returned. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `next_page_token` in the - * response indicates that more results might be available. - * If not specified, the default page_size is 100. - * @type string $page_token - * Optional. If present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the resource to compute contacts for. - * Format: organizations/{organization_id}, - * folders/{folder_id} or projects/{project_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 name of the resource to compute contacts for. - * Format: organizations/{organization_id}, - * folders/{folder_id} or projects/{project_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 categories of notifications to compute contacts for. If ALL is included - * in this list, contacts subscribed to any notification category will be - * returned. - * - * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.NotificationCategory notification_categories = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNotificationCategories() - { - return $this->notification_categories; - } - - /** - * The categories of notifications to compute contacts for. If ALL is included - * in this list, contacts subscribed to any notification category will be - * returned. - * - * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.NotificationCategory notification_categories = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNotificationCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\EssentialContacts\V1\NotificationCategory::class); - $this->notification_categories = $arr; - - return $this; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `next_page_token` in the - * response indicates that more results might be available. - * If not specified, the default page_size is 100. - * - * 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 from this request. - * Non-positive values are ignored. The presence of `next_page_token` in the - * response indicates that more results might be available. - * If not specified, the default page_size is 100. - * - * 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 present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * 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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsResponse.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsResponse.php deleted file mode 100644 index 3bd97e666fdd..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ComputeContactsResponse.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.essentialcontacts.v1.ComputeContactsResponse - */ -class ComputeContactsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * All contacts for the resource that are subscribed to the specified - * notification categories, including contacts inherited from any parent - * resources. - * - * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.Contact contacts = 1; - */ - private $contacts; - /** - * If there are 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` and the - * rest of the parameters the same as the original request. - * - * 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\EssentialContacts\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $contacts - * All contacts for the resource that are subscribed to the specified - * notification categories, including contacts inherited from any parent - * resources. - * @type string $next_page_token - * If there are 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` and the - * rest of the parameters the same as the original request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * All contacts for the resource that are subscribed to the specified - * notification categories, including contacts inherited from any parent - * resources. - * - * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.Contact contacts = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContacts() - { - return $this->contacts; - } - - /** - * All contacts for the resource that are subscribed to the specified - * notification categories, including contacts inherited from any parent - * resources. - * - * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.Contact contacts = 1; - * @param array<\Google\Cloud\EssentialContacts\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContacts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\EssentialContacts\V1\Contact::class); - $this->contacts = $arr; - - return $this; - } - - /** - * If there are 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` and the - * rest of the parameters the same as the original request. - * - * 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 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` and the - * rest of the parameters the same as the original request. - * - * 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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/Contact.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/Contact.php deleted file mode 100644 index 895ee5d8e570..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/Contact.php +++ /dev/null @@ -1,283 +0,0 @@ -google.cloud.essentialcontacts.v1.Contact - */ -class Contact extends \Google\Protobuf\Internal\Message -{ - /** - * The identifier for the contact. - * Format: {resource_type}/{resource_id}/contacts/{contact_id} - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The email address to send notifications to. This does not need to - * be a Google account. - * - * Generated from protobuf field string email = 2; - */ - protected $email = ''; - /** - * The categories of notifications that the contact will receive - * communications for. - * - * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.NotificationCategory notification_category_subscriptions = 3; - */ - private $notification_category_subscriptions; - /** - * The preferred language for notifications, as a ISO 639-1 language code. See - * [Supported - * languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages) - * for a list of supported languages. - * - * Generated from protobuf field string language_tag = 4; - */ - protected $language_tag = ''; - /** - * The validity of the contact. A contact is considered valid if it is the - * correct recipient for notifications for a particular resource. - * - * Generated from protobuf field .google.cloud.essentialcontacts.v1.ValidationState validation_state = 8; - */ - protected $validation_state = 0; - /** - * The last time the validation_state was updated, either manually or - * automatically. A contact is considered stale if its validation state was - * updated more than 1 year ago. - * - * Generated from protobuf field .google.protobuf.Timestamp validate_time = 9; - */ - protected $validate_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The identifier for the contact. - * Format: {resource_type}/{resource_id}/contacts/{contact_id} - * @type string $email - * Required. The email address to send notifications to. This does not need to - * be a Google account. - * @type array|\Google\Protobuf\Internal\RepeatedField $notification_category_subscriptions - * The categories of notifications that the contact will receive - * communications for. - * @type string $language_tag - * The preferred language for notifications, as a ISO 639-1 language code. See - * [Supported - * languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages) - * for a list of supported languages. - * @type int $validation_state - * The validity of the contact. A contact is considered valid if it is the - * correct recipient for notifications for a particular resource. - * @type \Google\Protobuf\Timestamp $validate_time - * The last time the validation_state was updated, either manually or - * automatically. A contact is considered stale if its validation state was - * updated more than 1 year ago. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The identifier for the contact. - * Format: {resource_type}/{resource_id}/contacts/{contact_id} - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The identifier for the contact. - * Format: {resource_type}/{resource_id}/contacts/{contact_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; - } - - /** - * Required. The email address to send notifications to. This does not need to - * be a Google account. - * - * Generated from protobuf field string email = 2; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Required. The email address to send notifications to. This does not need to - * be a Google account. - * - * Generated from protobuf field string email = 2; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - - /** - * The categories of notifications that the contact will receive - * communications for. - * - * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.NotificationCategory notification_category_subscriptions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNotificationCategorySubscriptions() - { - return $this->notification_category_subscriptions; - } - - /** - * The categories of notifications that the contact will receive - * communications for. - * - * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.NotificationCategory notification_category_subscriptions = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNotificationCategorySubscriptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\EssentialContacts\V1\NotificationCategory::class); - $this->notification_category_subscriptions = $arr; - - return $this; - } - - /** - * The preferred language for notifications, as a ISO 639-1 language code. See - * [Supported - * languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages) - * for a list of supported languages. - * - * Generated from protobuf field string language_tag = 4; - * @return string - */ - public function getLanguageTag() - { - return $this->language_tag; - } - - /** - * The preferred language for notifications, as a ISO 639-1 language code. See - * [Supported - * languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages) - * for a list of supported languages. - * - * Generated from protobuf field string language_tag = 4; - * @param string $var - * @return $this - */ - public function setLanguageTag($var) - { - GPBUtil::checkString($var, True); - $this->language_tag = $var; - - return $this; - } - - /** - * The validity of the contact. A contact is considered valid if it is the - * correct recipient for notifications for a particular resource. - * - * Generated from protobuf field .google.cloud.essentialcontacts.v1.ValidationState validation_state = 8; - * @return int - */ - public function getValidationState() - { - return $this->validation_state; - } - - /** - * The validity of the contact. A contact is considered valid if it is the - * correct recipient for notifications for a particular resource. - * - * Generated from protobuf field .google.cloud.essentialcontacts.v1.ValidationState validation_state = 8; - * @param int $var - * @return $this - */ - public function setValidationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\EssentialContacts\V1\ValidationState::class); - $this->validation_state = $var; - - return $this; - } - - /** - * The last time the validation_state was updated, either manually or - * automatically. A contact is considered stale if its validation state was - * updated more than 1 year ago. - * - * Generated from protobuf field .google.protobuf.Timestamp validate_time = 9; - * @return \Google\Protobuf\Timestamp|null - */ - public function getValidateTime() - { - return $this->validate_time; - } - - public function hasValidateTime() - { - return isset($this->validate_time); - } - - public function clearValidateTime() - { - unset($this->validate_time); - } - - /** - * The last time the validation_state was updated, either manually or - * automatically. A contact is considered stale if its validation state was - * updated more than 1 year ago. - * - * Generated from protobuf field .google.protobuf.Timestamp validate_time = 9; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setValidateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->validate_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/CreateContactRequest.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/CreateContactRequest.php deleted file mode 100644 index 7b165928e641..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/CreateContactRequest.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.essentialcontacts.v1.CreateContactRequest - */ -class CreateContactRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource to save this contact for. - * Format: organizations/{organization_id}, folders/{folder_id} or - * projects/{project_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The contact to create. Must specify an email address and language - * tag. - * - * Generated from protobuf field .google.cloud.essentialcontacts.v1.Contact contact = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $contact = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource to save this contact for. - * Format: organizations/{organization_id}, folders/{folder_id} or - * projects/{project_id} - * @type \Google\Cloud\EssentialContacts\V1\Contact $contact - * Required. The contact to create. Must specify an email address and language - * tag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource to save this contact for. - * Format: organizations/{organization_id}, folders/{folder_id} or - * projects/{project_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 resource to save this contact for. - * Format: organizations/{organization_id}, folders/{folder_id} or - * projects/{project_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 contact to create. Must specify an email address and language - * tag. - * - * Generated from protobuf field .google.cloud.essentialcontacts.v1.Contact contact = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\EssentialContacts\V1\Contact|null - */ - public function getContact() - { - return $this->contact; - } - - public function hasContact() - { - return isset($this->contact); - } - - public function clearContact() - { - unset($this->contact); - } - - /** - * Required. The contact to create. Must specify an email address and language - * tag. - * - * Generated from protobuf field .google.cloud.essentialcontacts.v1.Contact contact = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\EssentialContacts\V1\Contact $var - * @return $this - */ - public function setContact($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\EssentialContacts\V1\Contact::class); - $this->contact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/DeleteContactRequest.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/DeleteContactRequest.php deleted file mode 100644 index c01520860609..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/DeleteContactRequest.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.essentialcontacts.v1.DeleteContactRequest - */ -class DeleteContactRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the contact to delete. - * Format: organizations/{organization_id}/contacts/{contact_id}, - * folders/{folder_id}/contacts/{contact_id} or - * projects/{project_id}/contacts/{contact_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 name of the contact to delete. - * Format: organizations/{organization_id}/contacts/{contact_id}, - * folders/{folder_id}/contacts/{contact_id} or - * projects/{project_id}/contacts/{contact_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the contact to delete. - * Format: organizations/{organization_id}/contacts/{contact_id}, - * folders/{folder_id}/contacts/{contact_id} or - * projects/{project_id}/contacts/{contact_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 name of the contact to delete. - * Format: organizations/{organization_id}/contacts/{contact_id}, - * folders/{folder_id}/contacts/{contact_id} or - * projects/{project_id}/contacts/{contact_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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/EssentialContactsServiceGrpcClient.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/EssentialContactsServiceGrpcClient.php deleted file mode 100644 index 9f4d2da086dc..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/EssentialContactsServiceGrpcClient.php +++ /dev/null @@ -1,144 +0,0 @@ -_simpleRequest('/google.cloud.essentialcontacts.v1.EssentialContactsService/CreateContact', - $argument, - ['\Google\Cloud\EssentialContacts\V1\Contact', 'decode'], - $metadata, $options); - } - - /** - * Updates a contact. - * Note: A contact's email address cannot be changed. - * @param \Google\Cloud\EssentialContacts\V1\UpdateContactRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateContact(\Google\Cloud\EssentialContacts\V1\UpdateContactRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.essentialcontacts.v1.EssentialContactsService/UpdateContact', - $argument, - ['\Google\Cloud\EssentialContacts\V1\Contact', 'decode'], - $metadata, $options); - } - - /** - * Lists the contacts that have been set on a resource. - * @param \Google\Cloud\EssentialContacts\V1\ListContactsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListContacts(\Google\Cloud\EssentialContacts\V1\ListContactsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.essentialcontacts.v1.EssentialContactsService/ListContacts', - $argument, - ['\Google\Cloud\EssentialContacts\V1\ListContactsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets a single contact. - * @param \Google\Cloud\EssentialContacts\V1\GetContactRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetContact(\Google\Cloud\EssentialContacts\V1\GetContactRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.essentialcontacts.v1.EssentialContactsService/GetContact', - $argument, - ['\Google\Cloud\EssentialContacts\V1\Contact', 'decode'], - $metadata, $options); - } - - /** - * Deletes a contact. - * @param \Google\Cloud\EssentialContacts\V1\DeleteContactRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteContact(\Google\Cloud\EssentialContacts\V1\DeleteContactRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.essentialcontacts.v1.EssentialContactsService/DeleteContact', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Lists all contacts for the resource that are subscribed to the - * specified notification categories, including contacts inherited from - * any parent resources. - * @param \Google\Cloud\EssentialContacts\V1\ComputeContactsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ComputeContacts(\Google\Cloud\EssentialContacts\V1\ComputeContactsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.essentialcontacts.v1.EssentialContactsService/ComputeContacts', - $argument, - ['\Google\Cloud\EssentialContacts\V1\ComputeContactsResponse', 'decode'], - $metadata, $options); - } - - /** - * Allows a contact admin to send a test message to contact to verify that it - * has been configured correctly. - * @param \Google\Cloud\EssentialContacts\V1\SendTestMessageRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SendTestMessage(\Google\Cloud\EssentialContacts\V1\SendTestMessageRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.essentialcontacts.v1.EssentialContactsService/SendTestMessage', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/GetContactRequest.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/GetContactRequest.php deleted file mode 100644 index f5e85ff913cb..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/GetContactRequest.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.essentialcontacts.v1.GetContactRequest - */ -class GetContactRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the contact to retrieve. - * Format: organizations/{organization_id}/contacts/{contact_id}, - * folders/{folder_id}/contacts/{contact_id} or - * projects/{project_id}/contacts/{contact_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 name of the contact to retrieve. - * Format: organizations/{organization_id}/contacts/{contact_id}, - * folders/{folder_id}/contacts/{contact_id} or - * projects/{project_id}/contacts/{contact_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the contact to retrieve. - * Format: organizations/{organization_id}/contacts/{contact_id}, - * folders/{folder_id}/contacts/{contact_id} or - * projects/{project_id}/contacts/{contact_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 name of the contact to retrieve. - * Format: organizations/{organization_id}/contacts/{contact_id}, - * folders/{folder_id}/contacts/{contact_id} or - * projects/{project_id}/contacts/{contact_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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsRequest.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsRequest.php deleted file mode 100644 index d0b6a2ecd9cc..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.essentialcontacts.v1.ListContactsRequest - */ -class ListContactsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. - * Format: organizations/{organization_id}, folders/{folder_id} or - * projects/{project_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `next_page_token` in the - * response indicates that more results might be available. - * If not specified, the default page_size is 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. If present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. - * Format: organizations/{organization_id}, folders/{folder_id} or - * projects/{project_id} - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `next_page_token` in the - * response indicates that more results might be available. - * If not specified, the default page_size is 100. - * @type string $page_token - * Optional. If present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. - * Format: organizations/{organization_id}, folders/{folder_id} or - * projects/{project_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 parent resource name. - * Format: organizations/{organization_id}, folders/{folder_id} or - * projects/{project_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 maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `next_page_token` in the - * response indicates that more results might be available. - * If not specified, the default page_size 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 results to return from this request. - * Non-positive values are ignored. The presence of `next_page_token` in the - * response indicates that more results might be available. - * If not specified, the default page_size 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. If present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous 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 present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous 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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsResponse.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsResponse.php deleted file mode 100644 index 7d094531e0d4..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ListContactsResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.essentialcontacts.v1.ListContactsResponse - */ -class ListContactsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The contacts for the specified resource. - * - * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.Contact contacts = 1; - */ - private $contacts; - /** - * If there are 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` and the - * rest of the parameters the same as the original request. - * - * 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\EssentialContacts\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $contacts - * The contacts for the specified resource. - * @type string $next_page_token - * If there are 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` and the - * rest of the parameters the same as the original request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The contacts for the specified resource. - * - * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.Contact contacts = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContacts() - { - return $this->contacts; - } - - /** - * The contacts for the specified resource. - * - * Generated from protobuf field repeated .google.cloud.essentialcontacts.v1.Contact contacts = 1; - * @param array<\Google\Cloud\EssentialContacts\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContacts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\EssentialContacts\V1\Contact::class); - $this->contacts = $arr; - - return $this; - } - - /** - * If there are 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` and the - * rest of the parameters the same as the original request. - * - * 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 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` and the - * rest of the parameters the same as the original request. - * - * 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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/NotificationCategory.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/NotificationCategory.php deleted file mode 100644 index 4839f5697d55..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/NotificationCategory.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.essentialcontacts.v1.NotificationCategory - */ -class NotificationCategory -{ - /** - * Notification category is unrecognized or unspecified. - * - * Generated from protobuf enum NOTIFICATION_CATEGORY_UNSPECIFIED = 0; - */ - const NOTIFICATION_CATEGORY_UNSPECIFIED = 0; - /** - * All notifications related to the resource, including notifications - * pertaining to categories added in the future. - * - * Generated from protobuf enum ALL = 2; - */ - const ALL = 2; - /** - * Notifications related to imminent account suspension. - * - * Generated from protobuf enum SUSPENSION = 3; - */ - const SUSPENSION = 3; - /** - * Notifications related to security/privacy incidents, notifications, and - * vulnerabilities. - * - * Generated from protobuf enum SECURITY = 5; - */ - const SECURITY = 5; - /** - * Notifications related to technical events and issues such as outages, - * errors, or bugs. - * - * Generated from protobuf enum TECHNICAL = 6; - */ - const TECHNICAL = 6; - /** - * Notifications related to billing and payments notifications, price updates, - * errors, or credits. - * - * Generated from protobuf enum BILLING = 7; - */ - const BILLING = 7; - /** - * Notifications related to enforcement actions, regulatory compliance, or - * government notices. - * - * Generated from protobuf enum LEGAL = 8; - */ - const LEGAL = 8; - /** - * Notifications related to new versions, product terms updates, or - * deprecations. - * - * Generated from protobuf enum PRODUCT_UPDATES = 9; - */ - const PRODUCT_UPDATES = 9; - /** - * Child category of TECHNICAL. If assigned, technical incident notifications - * will go to these contacts instead of TECHNICAL. - * - * Generated from protobuf enum TECHNICAL_INCIDENTS = 10; - */ - const TECHNICAL_INCIDENTS = 10; - - private static $valueToName = [ - self::NOTIFICATION_CATEGORY_UNSPECIFIED => 'NOTIFICATION_CATEGORY_UNSPECIFIED', - self::ALL => 'ALL', - self::SUSPENSION => 'SUSPENSION', - self::SECURITY => 'SECURITY', - self::TECHNICAL => 'TECHNICAL', - self::BILLING => 'BILLING', - self::LEGAL => 'LEGAL', - self::PRODUCT_UPDATES => 'PRODUCT_UPDATES', - self::TECHNICAL_INCIDENTS => 'TECHNICAL_INCIDENTS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/SendTestMessageRequest.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/SendTestMessageRequest.php deleted file mode 100644 index e756f41f0c33..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/SendTestMessageRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.essentialcontacts.v1.SendTestMessageRequest - */ -class SendTestMessageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The list of names of the contacts to send a test message to. - * Format: organizations/{organization_id}/contacts/{contact_id}, - * folders/{folder_id}/contacts/{contact_id} or - * projects/{project_id}/contacts/{contact_id} - * - * Generated from protobuf field repeated string contacts = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $contacts; - /** - * Required. The name of the resource to send the test message for. All - * contacts must either be set directly on this resource or inherited from - * another resource that is an ancestor of this one. Format: - * organizations/{organization_id}, folders/{folder_id} or - * projects/{project_id} - * - * Generated from protobuf field string resource = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $resource = ''; - /** - * Required. The notification category to send the test message for. All - * contacts must be subscribed to this category. - * - * Generated from protobuf field .google.cloud.essentialcontacts.v1.NotificationCategory notification_category = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $notification_category = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $contacts - * Required. The list of names of the contacts to send a test message to. - * Format: organizations/{organization_id}/contacts/{contact_id}, - * folders/{folder_id}/contacts/{contact_id} or - * projects/{project_id}/contacts/{contact_id} - * @type string $resource - * Required. The name of the resource to send the test message for. All - * contacts must either be set directly on this resource or inherited from - * another resource that is an ancestor of this one. Format: - * organizations/{organization_id}, folders/{folder_id} or - * projects/{project_id} - * @type int $notification_category - * Required. The notification category to send the test message for. All - * contacts must be subscribed to this category. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The list of names of the contacts to send a test message to. - * Format: organizations/{organization_id}/contacts/{contact_id}, - * folders/{folder_id}/contacts/{contact_id} or - * projects/{project_id}/contacts/{contact_id} - * - * Generated from protobuf field repeated string contacts = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContacts() - { - return $this->contacts; - } - - /** - * Required. The list of names of the contacts to send a test message to. - * Format: organizations/{organization_id}/contacts/{contact_id}, - * folders/{folder_id}/contacts/{contact_id} or - * projects/{project_id}/contacts/{contact_id} - * - * Generated from protobuf field repeated string contacts = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContacts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->contacts = $arr; - - return $this; - } - - /** - * Required. The name of the resource to send the test message for. All - * contacts must either be set directly on this resource or inherited from - * another resource that is an ancestor of this one. Format: - * organizations/{organization_id}, folders/{folder_id} or - * projects/{project_id} - * - * Generated from protobuf field string resource = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getResource() - { - return $this->resource; - } - - /** - * Required. The name of the resource to send the test message for. All - * contacts must either be set directly on this resource or inherited from - * another resource that is an ancestor of this one. Format: - * organizations/{organization_id}, folders/{folder_id} or - * projects/{project_id} - * - * Generated from protobuf field string resource = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->resource = $var; - - return $this; - } - - /** - * Required. The notification category to send the test message for. All - * contacts must be subscribed to this category. - * - * Generated from protobuf field .google.cloud.essentialcontacts.v1.NotificationCategory notification_category = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getNotificationCategory() - { - return $this->notification_category; - } - - /** - * Required. The notification category to send the test message for. All - * contacts must be subscribed to this category. - * - * Generated from protobuf field .google.cloud.essentialcontacts.v1.NotificationCategory notification_category = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setNotificationCategory($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\EssentialContacts\V1\NotificationCategory::class); - $this->notification_category = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/UpdateContactRequest.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/UpdateContactRequest.php deleted file mode 100644 index cf62327ad3e9..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/UpdateContactRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.essentialcontacts.v1.UpdateContactRequest - */ -class UpdateContactRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The contact resource to replace the existing saved contact. Note: - * the email address of the contact cannot be modified. - * - * Generated from protobuf field .google.cloud.essentialcontacts.v1.Contact contact = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $contact = null; - /** - * Optional. The update mask applied to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\EssentialContacts\V1\Contact $contact - * Required. The contact resource to replace the existing saved contact. Note: - * the email address of the contact cannot be modified. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The update mask applied to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Essentialcontacts\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The contact resource to replace the existing saved contact. Note: - * the email address of the contact cannot be modified. - * - * Generated from protobuf field .google.cloud.essentialcontacts.v1.Contact contact = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\EssentialContacts\V1\Contact|null - */ - public function getContact() - { - return $this->contact; - } - - public function hasContact() - { - return isset($this->contact); - } - - public function clearContact() - { - unset($this->contact); - } - - /** - * Required. The contact resource to replace the existing saved contact. Note: - * the email address of the contact cannot be modified. - * - * Generated from protobuf field .google.cloud.essentialcontacts.v1.Contact contact = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\EssentialContacts\V1\Contact $var - * @return $this - */ - public function setContact($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\EssentialContacts\V1\Contact::class); - $this->contact = $var; - - return $this; - } - - /** - * Optional. The update mask applied to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 update mask applied to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ValidationState.php b/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ValidationState.php deleted file mode 100644 index d1085febe567..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/proto/src/Google/Cloud/EssentialContacts/V1/ValidationState.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.essentialcontacts.v1.ValidationState - */ -class ValidationState -{ - /** - * The validation state is unknown or unspecified. - * - * Generated from protobuf enum VALIDATION_STATE_UNSPECIFIED = 0; - */ - const VALIDATION_STATE_UNSPECIFIED = 0; - /** - * The contact is marked as valid. This is usually done manually by the - * contact admin. All new contacts begin in the valid state. - * - * Generated from protobuf enum VALID = 1; - */ - const VALID = 1; - /** - * The contact is considered invalid. This may become the state if the - * contact's email is found to be unreachable. - * - * Generated from protobuf enum INVALID = 2; - */ - const INVALID = 2; - - private static $valueToName = [ - self::VALIDATION_STATE_UNSPECIFIED => 'VALIDATION_STATE_UNSPECIFIED', - self::VALID => 'VALID', - 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); - } -} - diff --git a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/compute_contacts.php b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/compute_contacts.php deleted file mode 100644 index 3c96177620b2..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/compute_contacts.php +++ /dev/null @@ -1,75 +0,0 @@ -computeContacts($formattedParent); - - /** @var Contact $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 = EssentialContactsServiceClient::projectName('[PROJECT]'); - - compute_contacts_sample($formattedParent); -} -// [END essentialcontacts_v1_generated_EssentialContactsService_ComputeContacts_sync] diff --git a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/create_contact.php b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/create_contact.php deleted file mode 100644 index 41fc6710827c..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/create_contact.php +++ /dev/null @@ -1,71 +0,0 @@ -createContact($formattedParent, $contact); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = EssentialContactsServiceClient::projectName('[PROJECT]'); - - create_contact_sample($formattedParent); -} -// [END essentialcontacts_v1_generated_EssentialContactsService_CreateContact_sync] diff --git a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/delete_contact.php b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/delete_contact.php deleted file mode 100644 index b6b151e40efa..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/delete_contact.php +++ /dev/null @@ -1,67 +0,0 @@ -deleteContact($formattedName); - 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 = EssentialContactsServiceClient::contactName('[PROJECT]', '[CONTACT]'); - - delete_contact_sample($formattedName); -} -// [END essentialcontacts_v1_generated_EssentialContactsService_DeleteContact_sync] diff --git a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/get_contact.php b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/get_contact.php deleted file mode 100644 index 92cb59035a0c..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/get_contact.php +++ /dev/null @@ -1,69 +0,0 @@ -getContact($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EssentialContactsServiceClient::contactName('[PROJECT]', '[CONTACT]'); - - get_contact_sample($formattedName); -} -// [END essentialcontacts_v1_generated_EssentialContactsService_GetContact_sync] diff --git a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/list_contacts.php b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/list_contacts.php deleted file mode 100644 index 9923265963a3..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/list_contacts.php +++ /dev/null @@ -1,73 +0,0 @@ -listContacts($formattedParent); - - /** @var Contact $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 = EssentialContactsServiceClient::projectName('[PROJECT]'); - - list_contacts_sample($formattedParent); -} -// [END essentialcontacts_v1_generated_EssentialContactsService_ListContacts_sync] diff --git a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/send_test_message.php b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/send_test_message.php deleted file mode 100644 index 603171684111..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/send_test_message.php +++ /dev/null @@ -1,89 +0,0 @@ -sendTestMessage( - $formattedContacts, - $formattedResource, - $notificationCategory - ); - 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 -{ - $formattedContactsElement = EssentialContactsServiceClient::contactName('[PROJECT]', '[CONTACT]'); - $formattedResource = EssentialContactsServiceClient::projectName('[PROJECT]'); - $notificationCategory = NotificationCategory::NOTIFICATION_CATEGORY_UNSPECIFIED; - - send_test_message_sample($formattedContactsElement, $formattedResource, $notificationCategory); -} -// [END essentialcontacts_v1_generated_EssentialContactsService_SendTestMessage_sync] diff --git a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/update_contact.php b/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/update_contact.php deleted file mode 100644 index f4b58a3db84b..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/samples/V1/EssentialContactsServiceClient/update_contact.php +++ /dev/null @@ -1,57 +0,0 @@ -updateContact($contact); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END essentialcontacts_v1_generated_EssentialContactsService_UpdateContact_sync] diff --git a/owl-bot-staging/EssentialContacts/v1/src/V1/EssentialContactsServiceClient.php b/owl-bot-staging/EssentialContacts/v1/src/V1/EssentialContactsServiceClient.php deleted file mode 100644 index 16b3e4abe899..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/src/V1/EssentialContactsServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ -projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $essentialContactsServiceClient->computeContacts($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $essentialContactsServiceClient->computeContacts($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $essentialContactsServiceClient->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. - */ -class EssentialContactsServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.essentialcontacts.v1.EssentialContactsService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'essentialcontacts.googleapis.com'; - - /** 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 $contactNameTemplate; - - private static $folderNameTemplate; - - private static $folderContactNameTemplate; - - private static $organizationNameTemplate; - - private static $organizationContactNameTemplate; - - private static $projectNameTemplate; - - private static $projectContactNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/essential_contacts_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/essential_contacts_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/essential_contacts_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/essential_contacts_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getContactNameTemplate() - { - if (self::$contactNameTemplate == null) { - self::$contactNameTemplate = new PathTemplate('projects/{project}/contacts/{contact}'); - } - - return self::$contactNameTemplate; - } - - private static function getFolderNameTemplate() - { - if (self::$folderNameTemplate == null) { - self::$folderNameTemplate = new PathTemplate('folders/{folder}'); - } - - return self::$folderNameTemplate; - } - - private static function getFolderContactNameTemplate() - { - if (self::$folderContactNameTemplate == null) { - self::$folderContactNameTemplate = new PathTemplate('folders/{folder}/contacts/{contact}'); - } - - return self::$folderContactNameTemplate; - } - - private static function getOrganizationNameTemplate() - { - if (self::$organizationNameTemplate == null) { - self::$organizationNameTemplate = new PathTemplate('organizations/{organization}'); - } - - return self::$organizationNameTemplate; - } - - private static function getOrganizationContactNameTemplate() - { - if (self::$organizationContactNameTemplate == null) { - self::$organizationContactNameTemplate = new PathTemplate('organizations/{organization}/contacts/{contact}'); - } - - return self::$organizationContactNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getProjectContactNameTemplate() - { - if (self::$projectContactNameTemplate == null) { - self::$projectContactNameTemplate = new PathTemplate('projects/{project}/contacts/{contact}'); - } - - return self::$projectContactNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'contact' => self::getContactNameTemplate(), - 'folder' => self::getFolderNameTemplate(), - 'folderContact' => self::getFolderContactNameTemplate(), - 'organization' => self::getOrganizationNameTemplate(), - 'organizationContact' => self::getOrganizationContactNameTemplate(), - 'project' => self::getProjectNameTemplate(), - 'projectContact' => self::getProjectContactNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a contact - * resource. - * - * @param string $project - * @param string $contact - * - * @return string The formatted contact resource. - */ - public static function contactName($project, $contact) - { - return self::getContactNameTemplate()->render([ - 'project' => $project, - 'contact' => $contact, - ]); - } - - /** - * 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_contact resource. - * - * @param string $folder - * @param string $contact - * - * @return string The formatted folder_contact resource. - */ - public static function folderContactName($folder, $contact) - { - return self::getFolderContactNameTemplate()->render([ - 'folder' => $folder, - 'contact' => $contact, - ]); - } - - /** - * 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_contact resource. - * - * @param string $organization - * @param string $contact - * - * @return string The formatted organization_contact resource. - */ - public static function organizationContactName($organization, $contact) - { - return self::getOrganizationContactNameTemplate()->render([ - 'organization' => $organization, - 'contact' => $contact, - ]); - } - - /** - * 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_contact resource. - * - * @param string $project - * @param string $contact - * - * @return string The formatted project_contact resource. - */ - public static function projectContactName($project, $contact) - { - return self::getProjectContactNameTemplate()->render([ - 'project' => $project, - 'contact' => $contact, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - contact: projects/{project}/contacts/{contact} - * - folder: folders/{folder} - * - folderContact: folders/{folder}/contacts/{contact} - * - organization: organizations/{organization} - * - organizationContact: organizations/{organization}/contacts/{contact} - * - project: projects/{project} - * - projectContact: projects/{project}/contacts/{contact} - * - * 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 'essentialcontacts.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); - } - - /** - * Lists all contacts for the resource that are subscribed to the - * specified notification categories, including contacts inherited from - * any parent resources. - * - * Sample code: - * ``` - * $essentialContactsServiceClient = new EssentialContactsServiceClient(); - * try { - * $formattedParent = $essentialContactsServiceClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $essentialContactsServiceClient->computeContacts($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $essentialContactsServiceClient->computeContacts($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $essentialContactsServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the resource to compute contacts for. - * Format: organizations/{organization_id}, - * folders/{folder_id} or projects/{project_id} - * @param array $optionalArgs { - * Optional. - * - * @type int[] $notificationCategories - * The categories of notifications to compute contacts for. If ALL is included - * in this list, contacts subscribed to any notification category will be - * returned. - * For allowed values, use constants defined on {@see \Google\Cloud\EssentialContacts\V1\NotificationCategory} - * @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 computeContacts($parent, array $optionalArgs = []) - { - $request = new ComputeContactsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['notificationCategories'])) { - $request->setNotificationCategories($optionalArgs['notificationCategories']); - } - - 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('ComputeContacts', $optionalArgs, ComputeContactsResponse::class, $request); - } - - /** - * Adds a new contact for a resource. - * - * Sample code: - * ``` - * $essentialContactsServiceClient = new EssentialContactsServiceClient(); - * try { - * $formattedParent = $essentialContactsServiceClient->projectName('[PROJECT]'); - * $contact = new Contact(); - * $response = $essentialContactsServiceClient->createContact($formattedParent, $contact); - * } finally { - * $essentialContactsServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource to save this contact for. - * Format: organizations/{organization_id}, folders/{folder_id} or - * projects/{project_id} - * @param Contact $contact Required. The contact to create. Must specify an email address and language - * tag. - * @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\EssentialContacts\V1\Contact - * - * @throws ApiException if the remote call fails - */ - public function createContact($parent, $contact, array $optionalArgs = []) - { - $request = new CreateContactRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setContact($contact); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateContact', Contact::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a contact. - * - * Sample code: - * ``` - * $essentialContactsServiceClient = new EssentialContactsServiceClient(); - * try { - * $formattedName = $essentialContactsServiceClient->contactName('[PROJECT]', '[CONTACT]'); - * $essentialContactsServiceClient->deleteContact($formattedName); - * } finally { - * $essentialContactsServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the contact to delete. - * Format: organizations/{organization_id}/contacts/{contact_id}, - * folders/{folder_id}/contacts/{contact_id} or - * projects/{project_id}/contacts/{contact_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 deleteContact($name, array $optionalArgs = []) - { - $request = new DeleteContactRequest(); - $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('DeleteContact', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a single contact. - * - * Sample code: - * ``` - * $essentialContactsServiceClient = new EssentialContactsServiceClient(); - * try { - * $formattedName = $essentialContactsServiceClient->contactName('[PROJECT]', '[CONTACT]'); - * $response = $essentialContactsServiceClient->getContact($formattedName); - * } finally { - * $essentialContactsServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the contact to retrieve. - * Format: organizations/{organization_id}/contacts/{contact_id}, - * folders/{folder_id}/contacts/{contact_id} or - * projects/{project_id}/contacts/{contact_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\EssentialContacts\V1\Contact - * - * @throws ApiException if the remote call fails - */ - public function getContact($name, array $optionalArgs = []) - { - $request = new GetContactRequest(); - $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('GetContact', Contact::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the contacts that have been set on a resource. - * - * Sample code: - * ``` - * $essentialContactsServiceClient = new EssentialContactsServiceClient(); - * try { - * $formattedParent = $essentialContactsServiceClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $essentialContactsServiceClient->listContacts($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $essentialContactsServiceClient->listContacts($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $essentialContactsServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name. - * Format: organizations/{organization_id}, folders/{folder_id} or - * projects/{project_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 RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listContacts($parent, array $optionalArgs = []) - { - $request = new ListContactsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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('ListContacts', $optionalArgs, ListContactsResponse::class, $request); - } - - /** - * Allows a contact admin to send a test message to contact to verify that it - * has been configured correctly. - * - * Sample code: - * ``` - * $essentialContactsServiceClient = new EssentialContactsServiceClient(); - * try { - * $formattedContacts = [ - * $essentialContactsServiceClient->contactName('[PROJECT]', '[CONTACT]'), - * ]; - * $formattedResource = $essentialContactsServiceClient->projectName('[PROJECT]'); - * $notificationCategory = NotificationCategory::NOTIFICATION_CATEGORY_UNSPECIFIED; - * $essentialContactsServiceClient->sendTestMessage($formattedContacts, $formattedResource, $notificationCategory); - * } finally { - * $essentialContactsServiceClient->close(); - * } - * ``` - * - * @param string[] $contacts Required. The list of names of the contacts to send a test message to. - * Format: organizations/{organization_id}/contacts/{contact_id}, - * folders/{folder_id}/contacts/{contact_id} or - * projects/{project_id}/contacts/{contact_id} - * @param string $resource Required. The name of the resource to send the test message for. All - * contacts must either be set directly on this resource or inherited from - * another resource that is an ancestor of this one. Format: - * organizations/{organization_id}, folders/{folder_id} or - * projects/{project_id} - * @param int $notificationCategory Required. The notification category to send the test message for. All - * contacts must be subscribed to this category. - * For allowed values, use constants defined on {@see \Google\Cloud\EssentialContacts\V1\NotificationCategory} - * @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 sendTestMessage($contacts, $resource, $notificationCategory, array $optionalArgs = []) - { - $request = new SendTestMessageRequest(); - $requestParamHeaders = []; - $request->setContacts($contacts); - $request->setResource($resource); - $request->setNotificationCategory($notificationCategory); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SendTestMessage', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a contact. - * Note: A contact's email address cannot be changed. - * - * Sample code: - * ``` - * $essentialContactsServiceClient = new EssentialContactsServiceClient(); - * try { - * $contact = new Contact(); - * $response = $essentialContactsServiceClient->updateContact($contact); - * } finally { - * $essentialContactsServiceClient->close(); - * } - * ``` - * - * @param Contact $contact Required. The contact resource to replace the existing saved contact. Note: - * the email address of the contact cannot be modified. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. The update mask applied to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\EssentialContacts\V1\Contact - * - * @throws ApiException if the remote call fails - */ - public function updateContact($contact, array $optionalArgs = []) - { - $request = new UpdateContactRequest(); - $requestParamHeaders = []; - $request->setContact($contact); - $requestParamHeaders['contact.name'] = $contact->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('UpdateContact', Contact::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/EssentialContacts/v1/src/V1/gapic_metadata.json b/owl-bot-staging/EssentialContacts/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 2a955b8f76f0..000000000000 --- a/owl-bot-staging/EssentialContacts/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.essentialcontacts.v1", - "libraryPackage": "Google\\Cloud\\EssentialContacts\\V1", - "services": { - "EssentialContactsService": { - "clients": { - "grpc": { - "libraryClient": "EssentialContactsServiceGapicClient", - "rpcs": { - "ComputeContacts": { - "methods": [ - "computeContacts" - ] - }, - "CreateContact": { - "methods": [ - "createContact" - ] - }, - "DeleteContact": { - "methods": [ - "deleteContact" - ] - }, - "GetContact": { - "methods": [ - "getContact" - ] - }, - "ListContacts": { - "methods": [ - "listContacts" - ] - }, - "SendTestMessage": { - "methods": [ - "sendTestMessage" - ] - }, - "UpdateContact": { - "methods": [ - "updateContact" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_client_config.json b/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_client_config.json deleted file mode 100644 index 304dacd21d0f..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_client_config.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "interfaces": { - "google.cloud.essentialcontacts.v1.EssentialContactsService": { - "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": { - "ComputeContacts": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateContact": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteContact": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetContact": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListContacts": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SendTestMessage": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateContact": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_descriptor_config.php b/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_descriptor_config.php deleted file mode 100644 index 0ea01e876bbf..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_descriptor_config.php +++ /dev/null @@ -1,28 +0,0 @@ - [ - 'google.cloud.essentialcontacts.v1.EssentialContactsService' => [ - 'ComputeContacts' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getContacts', - ], - ], - 'ListContacts' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getContacts', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_rest_client_config.php b/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_rest_client_config.php deleted file mode 100644 index 04bf88c1516f..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/src/V1/resources/essential_contacts_service_rest_client_config.php +++ /dev/null @@ -1,166 +0,0 @@ - [ - 'google.cloud.essentialcontacts.v1.EssentialContactsService' => [ - 'ComputeContacts' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/contacts:compute', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*}/contacts:compute', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*}/contacts:compute', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateContact' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/contacts', - 'body' => 'contact', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=folders/*}/contacts', - 'body' => 'contact', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*}/contacts', - 'body' => 'contact', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteContact' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/contacts/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=folders/*/contacts/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=organizations/*/contacts/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetContact' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/contacts/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/contacts/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/contacts/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListContacts' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/contacts', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*}/contacts', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*}/contacts', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SendTestMessage' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*}/contacts:sendTestMessage', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=folders/*}/contacts:sendTestMessage', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=organizations/*}/contacts:sendTestMessage', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateContact' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{contact.name=projects/*/contacts/*}', - 'body' => 'contact', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{contact.name=folders/*/contacts/*}', - 'body' => 'contact', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{contact.name=organizations/*/contacts/*}', - 'body' => 'contact', - ], - ], - 'placeholders' => [ - 'contact.name' => [ - 'getters' => [ - 'getContact', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/EssentialContacts/v1/tests/Unit/V1/EssentialContactsServiceClientTest.php b/owl-bot-staging/EssentialContacts/v1/tests/Unit/V1/EssentialContactsServiceClientTest.php deleted file mode 100644 index a21e0e6a56ba..000000000000 --- a/owl-bot-staging/EssentialContacts/v1/tests/Unit/V1/EssentialContactsServiceClientTest.php +++ /dev/null @@ -1,523 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return EssentialContactsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new EssentialContactsServiceClient($options); - } - - /** @test */ - public function computeContactsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $contactsElement = new Contact(); - $contacts = [ - $contactsElement, - ]; - $expectedResponse = new ComputeContactsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setContacts($contacts); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->computeContacts($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getContacts()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.essentialcontacts.v1.EssentialContactsService/ComputeContacts', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function computeContactsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->computeContacts($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 createContactTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $email = 'email96619420'; - $languageTag = 'languageTag-2091510221'; - $expectedResponse = new Contact(); - $expectedResponse->setName($name); - $expectedResponse->setEmail($email); - $expectedResponse->setLanguageTag($languageTag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $contact = new Contact(); - $response = $gapicClient->createContact($formattedParent, $contact); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.essentialcontacts.v1.EssentialContactsService/CreateContact', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getContact(); - $this->assertProtobufEquals($contact, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createContactExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $contact = new Contact(); - try { - $gapicClient->createContact($formattedParent, $contact); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteContactTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->contactName('[PROJECT]', '[CONTACT]'); - $gapicClient->deleteContact($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.essentialcontacts.v1.EssentialContactsService/DeleteContact', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteContactExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->contactName('[PROJECT]', '[CONTACT]'); - try { - $gapicClient->deleteContact($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 getContactTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $email = 'email96619420'; - $languageTag = 'languageTag-2091510221'; - $expectedResponse = new Contact(); - $expectedResponse->setName($name2); - $expectedResponse->setEmail($email); - $expectedResponse->setLanguageTag($languageTag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->contactName('[PROJECT]', '[CONTACT]'); - $response = $gapicClient->getContact($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.essentialcontacts.v1.EssentialContactsService/GetContact', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getContactExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->contactName('[PROJECT]', '[CONTACT]'); - try { - $gapicClient->getContact($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 listContactsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $contactsElement = new Contact(); - $contacts = [ - $contactsElement, - ]; - $expectedResponse = new ListContactsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setContacts($contacts); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listContacts($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getContacts()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.essentialcontacts.v1.EssentialContactsService/ListContacts', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listContactsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listContacts($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 sendTestMessageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedContacts = [ - $gapicClient->contactName('[PROJECT]', '[CONTACT]'), - ]; - $formattedResource = $gapicClient->projectName('[PROJECT]'); - $notificationCategory = NotificationCategory::NOTIFICATION_CATEGORY_UNSPECIFIED; - $gapicClient->sendTestMessage($formattedContacts, $formattedResource, $notificationCategory); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.essentialcontacts.v1.EssentialContactsService/SendTestMessage', $actualFuncCall); - $actualValue = $actualRequestObject->getContacts(); - $this->assertProtobufEquals($formattedContacts, $actualValue); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($formattedResource, $actualValue); - $actualValue = $actualRequestObject->getNotificationCategory(); - $this->assertProtobufEquals($notificationCategory, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function sendTestMessageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedContacts = [ - $gapicClient->contactName('[PROJECT]', '[CONTACT]'), - ]; - $formattedResource = $gapicClient->projectName('[PROJECT]'); - $notificationCategory = NotificationCategory::NOTIFICATION_CATEGORY_UNSPECIFIED; - try { - $gapicClient->sendTestMessage($formattedContacts, $formattedResource, $notificationCategory); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateContactTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $email = 'email96619420'; - $languageTag = 'languageTag-2091510221'; - $expectedResponse = new Contact(); - $expectedResponse->setName($name); - $expectedResponse->setEmail($email); - $expectedResponse->setLanguageTag($languageTag); - $transport->addResponse($expectedResponse); - // Mock request - $contact = new Contact(); - $response = $gapicClient->updateContact($contact); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.essentialcontacts.v1.EssentialContactsService/UpdateContact', $actualFuncCall); - $actualValue = $actualRequestObject->getContact(); - $this->assertProtobufEquals($contact, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateContactExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $contact = new Contact(); - try { - $gapicClient->updateContact($contact); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->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/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Channel.php b/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Channel.php deleted file mode 100644 index be4bf21242dab06d5673abb70ecdc7aab649e3b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1619 zcma)6-EPw`7^NLsH+Ogl-%#T=yAW;Wb83X#aQX#sEm0h4nmFv2lS!PF$Q)!^y z@HkxZ3|#RPT=NKA;W$o;v>~lGb?onaKgY-C#jEf*1P@?`Fd~p7V>mj4@|eI-aLF+b z;3%FTsv*oPrkGw;EypMFAv zqQLJmNd!ZI-y#tfG?ZNQRjB7piOk7McBb{c%^L*uBz*aq^{yrtaxIvE5jB??5i>Ve#{s(JlY74KJ>!X?*&U z8q(_Han8}cQc*RZDw%N$d@X@Tmy?fWr*V#!nUl%PnbkILnhYqUt}v6On%lfR zZMrgRKMlD5{VFIKfms{iY9dj)01MT%#?r5P(W-!@n2zmYwzFhC2W2dXdN9KzmA$M^ z$~&8mX)dedF zyV>3Ewp*1eRvDD~?Ovr@IB04w$8pnKG=6s>iz+U=RIB`^A255e7B0V(y1a;aTd zo}%s(!7_5cnAO}3IM(B-y=*zpTuSX3znVW@HLGZ+WLAwbSd#*=DC9ymeiXoMHQImq zZLAxD`-zM63m;z_eN1_P*wo=->P`t$eM#;v`af@>yV;cAigrgErK63~$&AuDs{PE4 zd}E>u7gaX;yLc-FdY(plUIz8NquOXi_wZ~hf0s{EZ~Di|5=~KjfsN_N)NJNp4!~cJ CbqS^b diff --git a/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/ChannelConnection.php b/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/ChannelConnection.php deleted file mode 100644 index 2e0cac216c50..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/ChannelConnection.php +++ /dev/null @@ -1,39 +0,0 @@ -internalAddGeneratedFile( - ' -Œ -1google/cloud/eventarc/v1/channel_connection.protogoogle.cloud.eventarc.v1google/api/resource.protogoogle/protobuf/timestamp.proto"§ -ChannelConnection -name ( BàA -uid ( BàA8 -channel ( B\'àAúA! -eventarc.googleapis.com/Channel4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàA -activation_token ( BàA:§êA£ -)eventarc.googleapis.com/ChannelConnectionOprojects/{project}/locations/{location}/channelConnections/{channel_connection}*channelConnections2channelConnectionBÎ -com.google.cloud.eventarc.v1BChannelConnectionProtoPZ@google.golang.org/genproto/googleapis/cloud/eventarc/v1;eventarcªGoogle.Cloud.Eventarc.V1ÊGoogle\\Cloud\\Eventarc\\V1êGoogle::Cloud::Eventarc::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Discovery.php b/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Discovery.php deleted file mode 100644 index e15c6352f9bf..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Discovery.php +++ /dev/null @@ -1,44 +0,0 @@ -internalAddGeneratedFile( - ' -ÿ -(google/cloud/eventarc/v1/discovery.protogoogle.cloud.eventarc.v1google/api/resource.proto"ñ -Provider -name ( BàA - display_name ( BàA= - event_types ( 2#.google.cloud.eventarc.v1.EventTypeBàA:xêAu - eventarc.googleapis.com/ProviderinternalAddGeneratedFile( - ' -¸< -\'google/cloud/eventarc/v1/eventarc.protogoogle.cloud.eventarc.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/eventarc/v1/channel.proto1google/cloud/eventarc/v1/channel_connection.proto(google/cloud/eventarc/v1/discovery.proto4google/cloud/eventarc/v1/google_channel_config.proto&google/cloud/eventarc/v1/trigger.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"J -GetTriggerRequest5 -name ( B\'àAúA! -eventarc.googleapis.com/Trigger"— -ListTriggersRequest7 -parent ( B\'àAúA!eventarc.googleapis.com/Trigger - page_size ( - -page_token (  -order_by (  -filter ( "y -ListTriggersResponse3 -triggers ( 2!.google.cloud.eventarc.v1.Trigger -next_page_token (  - unreachable ( "½ -CreateTriggerRequest7 -parent ( B\'àAúA!eventarc.googleapis.com/Trigger7 -trigger ( 2!.google.cloud.eventarc.v1.TriggerBàA - -trigger_id ( BàA - validate_only (BàA"® -UpdateTriggerRequest2 -trigger ( 2!.google.cloud.eventarc.v1.Trigger/ - update_mask ( 2.google.protobuf.FieldMask - allow_missing ( - validate_only (BàA"Ž -DeleteTriggerRequest5 -name ( B\'àAúA! -eventarc.googleapis.com/Trigger -etag (  - allow_missing ( - validate_only (BàA"J -GetChannelRequest5 -name ( B\'àAúA! -eventarc.googleapis.com/Channel"‡ -ListChannelsRequest7 -parent ( B\'àAúA!eventarc.googleapis.com/Channel - page_size ( - -page_token (  -order_by ( "y -ListChannelsResponse3 -channels ( 2!.google.cloud.eventarc.v1.Channel -next_page_token (  - unreachable ( "½ -CreateChannelRequest7 -parent ( B\'àAúA!eventarc.googleapis.com/Channel7 -channel ( 2!.google.cloud.eventarc.v1.ChannelBàA - -channel_id ( BàA - validate_only (BàA"— -UpdateChannelRequest2 -channel ( 2!.google.cloud.eventarc.v1.Channel/ - update_mask ( 2.google.protobuf.FieldMask - validate_only (BàA"i -DeleteChannelRequest5 -name ( B\'àAúA! -eventarc.googleapis.com/Channel - validate_only (BàA"L -GetProviderRequest6 -name ( B(àAúA" - eventarc.googleapis.com/Provider"™ -ListProvidersRequest8 -parent ( B(àAúA" eventarc.googleapis.com/Provider - page_size ( - -page_token (  -order_by (  -filter ( "| -ListProvidersResponse5 - providers ( 2".google.cloud.eventarc.v1.Provider -next_page_token (  - unreachable ( "^ -GetChannelConnectionRequest? -name ( B1àAúA+ -)eventarc.googleapis.com/ChannelConnection"‰ -ListChannelConnectionsRequestA -parent ( B1àAúA+)eventarc.googleapis.com/ChannelConnection - page_size ( - -page_token ( "˜ -ListChannelConnectionsResponseH -channel_connections ( 2+.google.cloud.eventarc.v1.ChannelConnection -next_page_token (  - unreachable ( "Õ -CreateChannelConnectionRequestA -parent ( B1àAúA+)eventarc.googleapis.com/ChannelConnectionL -channel_connection ( 2+.google.cloud.eventarc.v1.ChannelConnectionBàA" -channel_connection_id ( BàA"a -DeleteChannelConnectionRequest? -name ( B1àAúA+ -)eventarc.googleapis.com/ChannelConnection"¦ - UpdateGoogleChannelConfigRequestQ -google_channel_config ( 2-.google.cloud.eventarc.v1.GoogleChannelConfigBàA/ - update_mask ( 2.google.protobuf.FieldMask"b -GetGoogleChannelConfigRequestA -name ( B3àAúA- -+eventarc.googleapis.com/GoogleChannelConfig"€ -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Ï -Eventarc™ - -GetTrigger+.google.cloud.eventarc.v1.GetTriggerRequest!.google.cloud.eventarc.v1.Trigger";‚Óä“.,/v1/{name=projects/*/locations/*/triggers/*}ÚAname¬ - ListTriggers-.google.cloud.eventarc.v1.ListTriggersRequest..google.cloud.eventarc.v1.ListTriggersResponse"=‚Óä“.,/v1/{parent=projects/*/locations/*}/triggersÚAparentØ - CreateTrigger..google.cloud.eventarc.v1.CreateTriggerRequest.google.longrunning.Operation"x‚Óä“7",/v1/{parent=projects/*/locations/*}/triggers:triggerÚAparent,trigger,trigger_idÊA -TriggerOperationMetadataé - UpdateTrigger..google.cloud.eventarc.v1.UpdateTriggerRequest.google.longrunning.Operation"ˆ‚Óä“?24/v1/{trigger.name=projects/*/locations/*/triggers/*}:triggerÚA!trigger,update_mask,allow_missingÊA -TriggerOperationMetadataÈ - DeleteTrigger..google.cloud.eventarc.v1.DeleteTriggerRequest.google.longrunning.Operation"h‚Óä“.*,/v1/{name=projects/*/locations/*/triggers/*}ÚAname,allow_missingÊA -TriggerOperationMetadata™ - -GetChannel+.google.cloud.eventarc.v1.GetChannelRequest!.google.cloud.eventarc.v1.Channel";‚Óä“.,/v1/{name=projects/*/locations/*/channels/*}ÚAname¬ - ListChannels-.google.cloud.eventarc.v1.ListChannelsRequest..google.cloud.eventarc.v1.ListChannelsResponse"=‚Óä“.,/v1/{parent=projects/*/locations/*}/channelsÚAparentØ - CreateChannel..google.cloud.eventarc.v1.CreateChannelRequest.google.longrunning.Operation"x‚Óä“7",/v1/{parent=projects/*/locations/*}/channels:channelÚAparent,channel,channel_idÊA -ChannelOperationMetadataÚ - UpdateChannel..google.cloud.eventarc.v1.UpdateChannelRequest.google.longrunning.Operation"z‚Óä“?24/v1/{channel.name=projects/*/locations/*/channels/*}:channelÚAchannel,update_maskÊA -ChannelOperationMetadataº - DeleteChannel..google.cloud.eventarc.v1.DeleteChannelRequest.google.longrunning.Operation"Z‚Óä“.*,/v1/{name=projects/*/locations/*/channels/*}ÚAnameÊA -ChannelOperationMetadata - GetProvider,.google.cloud.eventarc.v1.GetProviderRequest".google.cloud.eventarc.v1.Provider"<‚Óä“/-/v1/{name=projects/*/locations/*/providers/*}ÚAname° - ListProviders..google.cloud.eventarc.v1.ListProvidersRequest/.google.cloud.eventarc.v1.ListProvidersResponse">‚Óä“/-/v1/{parent=projects/*/locations/*}/providersÚAparentÁ -GetChannelConnection5.google.cloud.eventarc.v1.GetChannelConnectionRequest+.google.cloud.eventarc.v1.ChannelConnection"E‚Óä“86/v1/{name=projects/*/locations/*/channelConnections/*}ÚAnameÔ -ListChannelConnections7.google.cloud.eventarc.v1.ListChannelConnectionsRequest8.google.cloud.eventarc.v1.ListChannelConnectionsResponse"G‚Óä“86/v1/{parent=projects/*/locations/*}/channelConnectionsÚAparent¢ -CreateChannelConnection8.google.cloud.eventarc.v1.CreateChannelConnectionRequest.google.longrunning.Operation"­‚Óä“L"6/v1/{parent=projects/*/locations/*}/channelConnections:channel_connectionÚA/parent,channel_connection,channel_connection_idÊA& -ChannelConnectionOperationMetadataâ -DeleteChannelConnection8.google.cloud.eventarc.v1.DeleteChannelConnectionRequest.google.longrunning.Operation"n‚Óä“8*6/v1/{name=projects/*/locations/*/channelConnections/*}ÚAnameÊA& -ChannelConnectionOperationMetadataÆ -GetGoogleChannelConfig7.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest-.google.cloud.eventarc.v1.GoogleChannelConfig"D‚Óä“75/v1/{name=projects/*/locations/*/googleChannelConfig}ÚAname— -UpdateGoogleChannelConfig:.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest-.google.cloud.eventarc.v1.GoogleChannelConfig"Ž‚Óä“d2K/v1/{google_channel_config.name=projects/*/locations/*/googleChannelConfig}:google_channel_configÚA!google_channel_config,update_maskKÊAeventarc.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÅ -com.google.cloud.eventarc.v1B EventarcProtoPZ@google.golang.org/genproto/googleapis/cloud/eventarc/v1;eventarcªGoogle.Cloud.Eventarc.V1ÊGoogle\\Cloud\\Eventarc\\V1êGoogle::Cloud::Eventarc::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php b/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php deleted file mode 100644 index c726792ee586..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php +++ /dev/null @@ -1,37 +0,0 @@ -internalAddGeneratedFile( - ' -Œ -4google/cloud/eventarc/v1/google_channel_config.protogoogle.cloud.eventarc.v1google/api/resource.protogoogle/protobuf/timestamp.proto"§ -GoogleChannelConfig -name ( BàA4 - update_time ( 2.google.protobuf.TimestampBàAB -crypto_key_name ( B)àAúA# -!cloudkms.googleapis.com/CryptoKey:‚êA -+eventarc.googleapis.com/GoogleChannelConfig;projects/{project}/locations/{location}/googleChannelConfig2googleChannelConfigBË -com.google.cloud.eventarc.v1BGoogleChannelConfigProtoPZ@google.golang.org/genproto/googleapis/cloud/eventarc/v1;eventarcªGoogle.Cloud.Eventarc.V1ÊGoogle\\Cloud\\Eventarc\\V1êGoogle::Cloud::Eventarc::V1êAx -!cloudkms.googleapis.com/CryptoKeySprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Trigger.php b/owl-bot-staging/Eventarc/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/V1/Trigger.php deleted file mode 100644 index 07272a124c34531f8c7e5fc44e9b164e06194e09..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3016 zcmb7GZEq7t5XLq*$v7l%E!7dxvKR`15?^DGs2nIgCm}#zVnNiZt)*yvUSF=c+@ALK zg3`!;puehL`ycv&&-n>_>fGM$*$@nFWGSn=nP+C6duC=IK92WdxK6fM!~~VBPkKj0 z?lBSzF1g1;(n|*eCWyxm;vi(ALCD57`DuHHY;HW;xrVL@Pld-?#OK@(nd5~#?K|v{ zMUo27Ib3z52z(zs6(m4J4_FdYkCClT`$r~epGw-@Qr_M5%)7g(y}LiJt^s%o9)rVfQwdZRMiM%lIshmzunYc z1syv9end$R;^`y4h`sJQ@3Z%NDB@SX4K&SezhAKW1a-Gu@Q|@`3;wwXH>VSvW#@Jc zCCr8qX5(;m>9R(kao`BeMXu7NtNNAFEPj7Snu4{#C2b&L&+)LT{Bix?D$Ho5S{LDL zrgghSO3QQY%4@f5U4Tj&^zE{FQnBts%@YheZ#RozpTjq`=2AoFY{EARzB3%;IUomc|47z zJ*Voq{n{^u<49(PUITQ zNkO9|=0e&v<$ir~89T-_b1q>8)sXgBnAr1*fRzt<=CkVuWxp9oag<|x3NzjwjUpD> z=T-Fz`8iH29`$h&@hGtu75eJO(bo%~B0?pT4-QA)_6&SwX$5LyiC8tL?6ad>U)Fgz zcSysO<>G3UzbP&K4vX&~zwPp1+@;oBo}B1QoU^RJ%D`L6i5tV!qMdTV7T??SKnoT8 z2lHg&9P8823Av{}J3ceVp;;36Os|XKomqWKnlt)T??7!#lGbN1M)0YHR}fDbc?NL8}CILJw0PRhlSkH>?l1bzJBAbz*p*(d6Q_sf^Y@% zMDI4lx(gM5pQ%b~&Ce%?-}-(Nty?hrii`b0$Y0rK6*)ImC!2?-!u_JHpPp&Y17I)f zomk(7xuV;wCRA}zCuvX9KqlwWQFaKo0P|`I9I$>s#ZlddSwoR^4`%e}$wl9;<3M`j zUV$Z~`dvo!$jSOBrgCpIbW7GJP!-J2CQqS+ay@|xl3`_y9i|CRJRL&~Zd8xa>IkTu z39z`%jA3OUCefTu1!6MEhP+Z`sr~?}dF2*rR`NLTMo~-FWtd0ua&EJ1M|-3FcLlEC zV4X;4dwwUsFmgoogle.cloud.eventarc.v1.Channel - */ -class Channel extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the channel. Must be unique within the - * location on the project and must be in - * `projects/{project}/locations/{location}/channels/{channel_id}` format. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. Server assigned unique identifier for the channel. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The name of the event provider (e.g. Eventarc SaaS partner) associated - * with the channel. This provider will be granted permissions to publish - * events to the channel. Format: - * `projects/{project}/locations/{location}/providers/{provider_id}`. - * - * Generated from protobuf field string provider = 7; - */ - protected $provider = ''; - /** - * Output only. The state of a Channel. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Channel.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The activation token for the channel. The token must be used - * by the provider to register the channel for publishing. - * - * Generated from protobuf field string activation_token = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $activation_token = ''; - /** - * Optional. Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt their event data. - * It must match the pattern - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string crypto_key_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $crypto_key_name = ''; - protected $transport; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the channel. Must be unique within the - * location on the project and must be in - * `projects/{project}/locations/{location}/channels/{channel_id}` format. - * @type string $uid - * Output only. Server assigned unique identifier for the channel. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last-modified time. - * @type string $provider - * The name of the event provider (e.g. Eventarc SaaS partner) associated - * with the channel. This provider will be granted permissions to publish - * events to the channel. Format: - * `projects/{project}/locations/{location}/providers/{provider_id}`. - * @type string $pubsub_topic - * Output only. The name of the Pub/Sub topic created and managed by - * Eventarc system as a transport for the event delivery. Format: - * `projects/{project}/topics/{topic_id}`. - * @type int $state - * Output only. The state of a Channel. - * @type string $activation_token - * Output only. The activation token for the channel. The token must be used - * by the provider to register the channel for publishing. - * @type string $crypto_key_name - * Optional. Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt their event data. - * It must match the pattern - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Channel::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the channel. Must be unique within the - * location on the project and must be in - * `projects/{project}/locations/{location}/channels/{channel_id}` format. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the channel. Must be unique within the - * location on the project and must be in - * `projects/{project}/locations/{location}/channels/{channel_id}` format. - * - * 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 assigned unique identifier for the channel. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server assigned unique identifier for the channel. The value - * is a UUID4 string and guaranteed to remain unchanged until the resource is - * deleted. - * - * Generated from protobuf field string uid = 2 [(.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 creation time. - * - * 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. The creation time. - * - * 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. The last-modified time. - * - * 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. The last-modified time. - * - * 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; - } - - /** - * The name of the event provider (e.g. Eventarc SaaS partner) associated - * with the channel. This provider will be granted permissions to publish - * events to the channel. Format: - * `projects/{project}/locations/{location}/providers/{provider_id}`. - * - * Generated from protobuf field string provider = 7; - * @return string - */ - public function getProvider() - { - return $this->provider; - } - - /** - * The name of the event provider (e.g. Eventarc SaaS partner) associated - * with the channel. This provider will be granted permissions to publish - * events to the channel. Format: - * `projects/{project}/locations/{location}/providers/{provider_id}`. - * - * Generated from protobuf field string provider = 7; - * @param string $var - * @return $this - */ - public function setProvider($var) - { - GPBUtil::checkString($var, True); - $this->provider = $var; - - return $this; - } - - /** - * Output only. The name of the Pub/Sub topic created and managed by - * Eventarc system as a transport for the event delivery. Format: - * `projects/{project}/topics/{topic_id}`. - * - * Generated from protobuf field string pubsub_topic = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPubsubTopic() - { - return $this->readOneof(8); - } - - public function hasPubsubTopic() - { - return $this->hasOneof(8); - } - - /** - * Output only. The name of the Pub/Sub topic created and managed by - * Eventarc system as a transport for the event delivery. Format: - * `projects/{project}/topics/{topic_id}`. - * - * Generated from protobuf field string pubsub_topic = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPubsubTopic($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Output only. The state of a Channel. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Channel.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of a Channel. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Channel.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Eventarc\V1\Channel\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The activation token for the channel. The token must be used - * by the provider to register the channel for publishing. - * - * Generated from protobuf field string activation_token = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getActivationToken() - { - return $this->activation_token; - } - - /** - * Output only. The activation token for the channel. The token must be used - * by the provider to register the channel for publishing. - * - * Generated from protobuf field string activation_token = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setActivationToken($var) - { - GPBUtil::checkString($var, True); - $this->activation_token = $var; - - return $this; - } - - /** - * Optional. Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt their event data. - * It must match the pattern - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string crypto_key_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getCryptoKeyName() - { - return $this->crypto_key_name; - } - - /** - * Optional. Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt their event data. - * It must match the pattern - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string crypto_key_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCryptoKeyName($var) - { - GPBUtil::checkString($var, True); - $this->crypto_key_name = $var; - - return $this; - } - - /** - * @return string - */ - public function getTransport() - { - return $this->whichOneof("transport"); - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel/State.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel/State.php deleted file mode 100644 index f20e5c4d3786..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel/State.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.eventarc.v1.Channel.State - */ -class State -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The PENDING state indicates that a Channel has been created successfully - * and there is a new activation token available for the subscriber to use - * to convey the Channel to the provider in order to create a Connection. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The ACTIVE state indicates that a Channel has been successfully - * connected with the event provider. - * An ACTIVE Channel is ready to receive and route events from the - * event provider. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The INACTIVE state indicates that the Channel cannot receive events - * permanently. There are two possible cases this state can happen: - * 1. The SaaS provider disconnected from this Channel. - * 2. The Channel activation token has expired but the SaaS provider - * wasn't connected. - * To re-establish a Connection with a provider, the subscriber - * should create a new Channel and give it to the provider. - * - * Generated from protobuf enum INACTIVE = 3; - */ - const INACTIVE = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::ACTIVE => 'ACTIVE', - self::INACTIVE => 'INACTIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Eventarc\V1\Channel_State::class); - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ChannelConnection.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ChannelConnection.php deleted file mode 100644 index 1478f29772d9..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ChannelConnection.php +++ /dev/null @@ -1,284 +0,0 @@ -google.cloud.eventarc.v1.ChannelConnection - */ -class ChannelConnection extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the connection. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. Server assigned ID of the resource. - * The server guarantees uniqueness and immutability until deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Required. The name of the connected subscriber Channel. - * This is a weak reference to avoid cross project and cross accounts - * references. This must be in - * `projects/{project}/location/{location}/channels/{channel_id}` format. - * - * Generated from protobuf field string channel = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $channel = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Input only. Activation token for the channel. The token will be used - * during the creation of ChannelConnection to bind the channel with the - * provider project. This field will not be stored in the provider resource. - * - * Generated from protobuf field string activation_token = 8 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $activation_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the connection. - * @type string $uid - * Output only. Server assigned ID of the resource. - * The server guarantees uniqueness and immutability until deleted. - * @type string $channel - * Required. The name of the connected subscriber Channel. - * This is a weak reference to avoid cross project and cross accounts - * references. This must be in - * `projects/{project}/location/{location}/channels/{channel_id}` format. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last-modified time. - * @type string $activation_token - * Input only. Activation token for the channel. The token will be used - * during the creation of ChannelConnection to bind the channel with the - * provider project. This field will not be stored in the provider resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\ChannelConnection::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the connection. - * - * 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 connection. - * - * 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 assigned ID of the resource. - * The server guarantees uniqueness and immutability until deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server assigned ID of the resource. - * The server guarantees uniqueness and immutability until deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Required. The name of the connected subscriber Channel. - * This is a weak reference to avoid cross project and cross accounts - * references. This must be in - * `projects/{project}/location/{location}/channels/{channel_id}` format. - * - * Generated from protobuf field string channel = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getChannel() - { - return $this->channel; - } - - /** - * Required. The name of the connected subscriber Channel. - * This is a weak reference to avoid cross project and cross accounts - * references. This must be in - * `projects/{project}/location/{location}/channels/{channel_id}` format. - * - * Generated from protobuf field string channel = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkString($var, True); - $this->channel = $var; - - return $this; - } - - /** - * Output only. The creation time. - * - * 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 creation time. - * - * 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; - } - - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.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-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.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; - } - - /** - * Input only. Activation token for the channel. The token will be used - * during the creation of ChannelConnection to bind the channel with the - * provider project. This field will not be stored in the provider resource. - * - * Generated from protobuf field string activation_token = 8 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getActivationToken() - { - return $this->activation_token; - } - - /** - * Input only. Activation token for the channel. The token will be used - * during the creation of ChannelConnection to bind the channel with the - * provider project. This field will not be stored in the provider resource. - * - * Generated from protobuf field string activation_token = 8 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setActivationToken($var) - { - GPBUtil::checkString($var, True); - $this->activation_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel_State.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel_State.php deleted file mode 100644 index f91006931d59..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Channel_State.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.eventarc.v1.CloudRun - */ -class CloudRun extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Cloud Run service being addressed. See - * https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. - * Only services located in the same project as the trigger object - * can be addressed. - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $service = ''; - /** - * Optional. The relative path on the Cloud Run service the events should be sent to. - * The value must conform to the definition of a URI path segment (section 3.3 - * of RFC2396). Examples: "/route", "route", "route/subroute". - * - * Generated from protobuf field string path = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $path = ''; - /** - * Required. The region the Cloud Run service is deployed in. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * Required. The name of the Cloud Run service being addressed. See - * https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. - * Only services located in the same project as the trigger object - * can be addressed. - * @type string $path - * Optional. The relative path on the Cloud Run service the events should be sent to. - * The value must conform to the definition of a URI path segment (section 3.3 - * of RFC2396). Examples: "/route", "route", "route/subroute". - * @type string $region - * Required. The region the Cloud Run service is deployed in. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Cloud Run service being addressed. See - * https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. - * Only services located in the same project as the trigger object - * can be addressed. - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * Required. The name of the Cloud Run service being addressed. See - * https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. - * Only services located in the same project as the trigger object - * can be addressed. - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * Optional. The relative path on the Cloud Run service the events should be sent to. - * The value must conform to the definition of a URI path segment (section 3.3 - * of RFC2396). Examples: "/route", "route", "route/subroute". - * - * Generated from protobuf field string path = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Optional. The relative path on the Cloud Run service the events should be sent to. - * The value must conform to the definition of a URI path segment (section 3.3 - * of RFC2396). Examples: "/route", "route", "route/subroute". - * - * Generated from protobuf field string path = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Required. The region the Cloud Run service is deployed in. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Required. The region the Cloud Run service is deployed in. - * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelConnectionRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelConnectionRequest.php deleted file mode 100644 index 7935f51e19a7..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelConnectionRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.eventarc.v1.CreateChannelConnectionRequest - */ -class CreateChannelConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent collection in which to add this channel connection. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Channel connection to create. - * - * Generated from protobuf field .google.cloud.eventarc.v1.ChannelConnection channel_connection = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $channel_connection = null; - /** - * Required. The user-provided ID to be assigned to the channel connection. - * - * Generated from protobuf field string channel_connection_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $channel_connection_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent collection in which to add this channel connection. - * @type \Google\Cloud\Eventarc\V1\ChannelConnection $channel_connection - * Required. Channel connection to create. - * @type string $channel_connection_id - * Required. The user-provided ID to be assigned to the channel connection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent collection in which to add this channel connection. - * - * Generated 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 collection in which to add this channel connection. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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. Channel connection to create. - * - * Generated from protobuf field .google.cloud.eventarc.v1.ChannelConnection channel_connection = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Eventarc\V1\ChannelConnection|null - */ - public function getChannelConnection() - { - return $this->channel_connection; - } - - public function hasChannelConnection() - { - return isset($this->channel_connection); - } - - public function clearChannelConnection() - { - unset($this->channel_connection); - } - - /** - * Required. Channel connection to create. - * - * Generated from protobuf field .google.cloud.eventarc.v1.ChannelConnection channel_connection = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Eventarc\V1\ChannelConnection $var - * @return $this - */ - public function setChannelConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\ChannelConnection::class); - $this->channel_connection = $var; - - return $this; - } - - /** - * Required. The user-provided ID to be assigned to the channel connection. - * - * Generated from protobuf field string channel_connection_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getChannelConnectionId() - { - return $this->channel_connection_id; - } - - /** - * Required. The user-provided ID to be assigned to the channel connection. - * - * Generated from protobuf field string channel_connection_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setChannelConnectionId($var) - { - GPBUtil::checkString($var, True); - $this->channel_connection_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelRequest.php deleted file mode 100644 index 751a74b4f102..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateChannelRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.eventarc.v1.CreateChannelRequest - */ -class CreateChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent collection in which to add this channel. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The channel to create. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $channel = null; - /** - * Required. The user-provided ID to be assigned to the channel. - * - * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $channel_id = ''; - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent collection in which to add this channel. - * @type \Google\Cloud\Eventarc\V1\Channel $channel - * Required. The channel to create. - * @type string $channel_id - * Required. The user-provided ID to be assigned to the channel. - * @type bool $validate_only - * Required. If set, validate the request and preview the review, but do not - * post it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent collection in which to add this channel. - * - * Generated 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 collection in which to add this channel. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 channel to create. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Eventarc\V1\Channel|null - */ - public function getChannel() - { - return $this->channel; - } - - public function hasChannel() - { - return isset($this->channel); - } - - public function clearChannel() - { - unset($this->channel); - } - - /** - * Required. The channel to create. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Eventarc\V1\Channel $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Channel::class); - $this->channel = $var; - - return $this; - } - - /** - * Required. The user-provided ID to be assigned to the channel. - * - * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getChannelId() - { - return $this->channel_id; - } - - /** - * Required. The user-provided ID to be assigned to the channel. - * - * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setChannelId($var) - { - GPBUtil::checkString($var, True); - $this->channel_id = $var; - - return $this; - } - - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateTriggerRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateTriggerRequest.php deleted file mode 100644 index f7e0fb54cf2b..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/CreateTriggerRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.eventarc.v1.CreateTriggerRequest - */ -class CreateTriggerRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent collection in which to add this trigger. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The trigger to create. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Trigger trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $trigger = null; - /** - * Required. The user-provided ID to be assigned to the trigger. - * - * Generated from protobuf field string trigger_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $trigger_id = ''; - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent collection in which to add this trigger. - * @type \Google\Cloud\Eventarc\V1\Trigger $trigger - * Required. The trigger to create. - * @type string $trigger_id - * Required. The user-provided ID to be assigned to the trigger. - * @type bool $validate_only - * Required. If set, validate the request and preview the review, but do not - * post it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent collection in which to add this trigger. - * - * Generated 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 collection in which to add this trigger. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 trigger to create. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Trigger trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Eventarc\V1\Trigger|null - */ - public function getTrigger() - { - return $this->trigger; - } - - public function hasTrigger() - { - return isset($this->trigger); - } - - public function clearTrigger() - { - unset($this->trigger); - } - - /** - * Required. The trigger to create. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Trigger trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Eventarc\V1\Trigger $var - * @return $this - */ - public function setTrigger($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Trigger::class); - $this->trigger = $var; - - return $this; - } - - /** - * Required. The user-provided ID to be assigned to the trigger. - * - * Generated from protobuf field string trigger_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTriggerId() - { - return $this->trigger_id; - } - - /** - * Required. The user-provided ID to be assigned to the trigger. - * - * Generated from protobuf field string trigger_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTriggerId($var) - { - GPBUtil::checkString($var, True); - $this->trigger_id = $var; - - return $this; - } - - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelConnectionRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelConnectionRequest.php deleted file mode 100644 index 05118ef90569..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelConnectionRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.eventarc.v1.DeleteChannelConnectionRequest - */ -class DeleteChannelConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the channel connection to delete. - * - * 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 name of the channel connection to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the channel connection 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 channel connection 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; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelRequest.php deleted file mode 100644 index 96942e292e99..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteChannelRequest.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.eventarc.v1.DeleteChannelRequest - */ -class DeleteChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the channel to be deleted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the channel to be deleted. - * @type bool $validate_only - * Required. If set, validate the request and preview the review, but do not - * post it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the channel 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 channel 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; - } - - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteTriggerRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteTriggerRequest.php deleted file mode 100644 index 88ac83e8d2fb..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/DeleteTriggerRequest.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.eventarc.v1.DeleteTriggerRequest - */ -class DeleteTriggerRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the trigger to be deleted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If provided, the trigger will only be deleted if the etag matches the - * current etag on the resource. - * - * Generated from protobuf field string etag = 2; - */ - protected $etag = ''; - /** - * If set to true, and the trigger is not found, the request will succeed - * but no action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 3; - */ - protected $allow_missing = false; - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the trigger to be deleted. - * @type string $etag - * If provided, the trigger will only be deleted if the etag matches the - * current etag on the resource. - * @type bool $allow_missing - * If set to true, and the trigger is not found, the request will succeed - * but no action will be taken on the server. - * @type bool $validate_only - * Required. If set, validate the request and preview the review, but do not - * post it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the trigger 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 trigger 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; - } - - /** - * If provided, the trigger will only be deleted if the etag matches the - * current etag on the resource. - * - * Generated from protobuf field string etag = 2; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * If provided, the trigger will only be deleted if the etag matches the - * current etag on the resource. - * - * Generated from protobuf field string etag = 2; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * If set to true, and the trigger is not found, the request will succeed - * but no action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 3; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the trigger is not found, the request will succeed - * but no action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 3; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Destination.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Destination.php deleted file mode 100644 index b8dd4dfddb15..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Destination.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.eventarc.v1.Destination - */ -class Destination extends \Google\Protobuf\Internal\Message -{ - protected $descriptor; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Eventarc\V1\CloudRun $cloud_run - * Cloud Run fully-managed resource that receives the events. The resource - * should be in the same project as the trigger. - * @type string $cloud_function - * The Cloud Function resource name. Only Cloud Functions V2 is supported. - * Format: `projects/{project}/locations/{location}/functions/{function}` - * @type \Google\Cloud\Eventarc\V1\GKE $gke - * A GKE service capable of receiving events. The service should be running - * in the same project as the trigger. - * @type string $workflow - * The resource name of the Workflow whose Executions are triggered by - * the events. The Workflow resource should be deployed in the same project - * as the trigger. - * Format: `projects/{project}/locations/{location}/workflows/{workflow}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); - parent::__construct($data); - } - - /** - * Cloud Run fully-managed resource that receives the events. The resource - * should be in the same project as the trigger. - * - * Generated from protobuf field .google.cloud.eventarc.v1.CloudRun cloud_run = 1; - * @return \Google\Cloud\Eventarc\V1\CloudRun|null - */ - public function getCloudRun() - { - return $this->readOneof(1); - } - - public function hasCloudRun() - { - return $this->hasOneof(1); - } - - /** - * Cloud Run fully-managed resource that receives the events. The resource - * should be in the same project as the trigger. - * - * Generated from protobuf field .google.cloud.eventarc.v1.CloudRun cloud_run = 1; - * @param \Google\Cloud\Eventarc\V1\CloudRun $var - * @return $this - */ - public function setCloudRun($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\CloudRun::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The Cloud Function resource name. Only Cloud Functions V2 is supported. - * Format: `projects/{project}/locations/{location}/functions/{function}` - * - * Generated from protobuf field string cloud_function = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getCloudFunction() - { - return $this->readOneof(2); - } - - public function hasCloudFunction() - { - return $this->hasOneof(2); - } - - /** - * The Cloud Function resource name. Only Cloud Functions V2 is supported. - * Format: `projects/{project}/locations/{location}/functions/{function}` - * - * Generated from protobuf field string cloud_function = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCloudFunction($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A GKE service capable of receiving events. The service should be running - * in the same project as the trigger. - * - * Generated from protobuf field .google.cloud.eventarc.v1.GKE gke = 3; - * @return \Google\Cloud\Eventarc\V1\GKE|null - */ - public function getGke() - { - return $this->readOneof(3); - } - - public function hasGke() - { - return $this->hasOneof(3); - } - - /** - * A GKE service capable of receiving events. The service should be running - * in the same project as the trigger. - * - * Generated from protobuf field .google.cloud.eventarc.v1.GKE gke = 3; - * @param \Google\Cloud\Eventarc\V1\GKE $var - * @return $this - */ - public function setGke($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\GKE::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The resource name of the Workflow whose Executions are triggered by - * the events. The Workflow resource should be deployed in the same project - * as the trigger. - * Format: `projects/{project}/locations/{location}/workflows/{workflow}` - * - * Generated from protobuf field string workflow = 4 [(.google.api.resource_reference) = { - * @return string - */ - public function getWorkflow() - { - return $this->readOneof(4); - } - - public function hasWorkflow() - { - return $this->hasOneof(4); - } - - /** - * The resource name of the Workflow whose Executions are triggered by - * the events. The Workflow resource should be deployed in the same project - * as the trigger. - * Format: `projects/{project}/locations/{location}/workflows/{workflow}` - * - * Generated from protobuf field string workflow = 4 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setWorkflow($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getDescriptor() - { - return $this->whichOneof("descriptor"); - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventFilter.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventFilter.php deleted file mode 100644 index f4f75630fc18..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventFilter.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.eventarc.v1.EventFilter - */ -class EventFilter extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of a CloudEvents attribute. Currently, only a subset of attributes - * are supported for filtering. - * All triggers MUST provide a filter for the 'type' attribute. - * - * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attribute = ''; - /** - * Required. The value for the attribute. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $value = ''; - /** - * Optional. The operator used for matching the events with the value of the - * filter. If not specified, only events that have an exact key-value pair - * specified in the filter are matched. The only allowed value is - * `match-path-pattern`. - * - * Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $operator = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $attribute - * Required. The name of a CloudEvents attribute. Currently, only a subset of attributes - * are supported for filtering. - * All triggers MUST provide a filter for the 'type' attribute. - * @type string $value - * Required. The value for the attribute. - * @type string $operator - * Optional. The operator used for matching the events with the value of the - * filter. If not specified, only events that have an exact key-value pair - * specified in the filter are matched. The only allowed value is - * `match-path-pattern`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of a CloudEvents attribute. Currently, only a subset of attributes - * are supported for filtering. - * All triggers MUST provide a filter for the 'type' attribute. - * - * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAttribute() - { - return $this->attribute; - } - - /** - * Required. The name of a CloudEvents attribute. Currently, only a subset of attributes - * are supported for filtering. - * All triggers MUST provide a filter for the 'type' attribute. - * - * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAttribute($var) - { - GPBUtil::checkString($var, True); - $this->attribute = $var; - - return $this; - } - - /** - * Required. The value for the attribute. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Required. The value for the attribute. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * Optional. The operator used for matching the events with the value of the - * filter. If not specified, only events that have an exact key-value pair - * specified in the filter are matched. The only allowed value is - * `match-path-pattern`. - * - * Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOperator() - { - return $this->operator; - } - - /** - * Optional. The operator used for matching the events with the value of the - * filter. If not specified, only events that have an exact key-value pair - * specified in the filter are matched. The only allowed value is - * `match-path-pattern`. - * - * Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOperator($var) - { - GPBUtil::checkString($var, True); - $this->operator = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventType.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventType.php deleted file mode 100644 index 67e92e6f24f7..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventType.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.eventarc.v1.EventType - */ -class EventType extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full name of the event type (for example, - * "google.cloud.storage.object.v1.finalized"). In the form of - * {provider-specific-prefix}.{resource}.{version}.{verb}. Types MUST be - * versioned and event schemas are guaranteed to remain backward compatible - * within one version. Note that event type versions and API versions do not - * need to match. - * - * Generated from protobuf field string type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = ''; - /** - * Output only. Human friendly description of what the event type is about. - * For example "Bucket created in Cloud Storage". - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $description = ''; - /** - * Output only. Filtering attributes for the event type. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.FilteringAttribute filtering_attributes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $filtering_attributes; - /** - * Output only. URI for the event schema. - * For example - * "https://github.com/googleapis/google-cloudevents/blob/master/proto/google/events/cloud/storage/v1/events.proto" - * - * Generated from protobuf field string event_schema_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $event_schema_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * Output only. The full name of the event type (for example, - * "google.cloud.storage.object.v1.finalized"). In the form of - * {provider-specific-prefix}.{resource}.{version}.{verb}. Types MUST be - * versioned and event schemas are guaranteed to remain backward compatible - * within one version. Note that event type versions and API versions do not - * need to match. - * @type string $description - * Output only. Human friendly description of what the event type is about. - * For example "Bucket created in Cloud Storage". - * @type array<\Google\Cloud\Eventarc\V1\FilteringAttribute>|\Google\Protobuf\Internal\RepeatedField $filtering_attributes - * Output only. Filtering attributes for the event type. - * @type string $event_schema_uri - * Output only. URI for the event schema. - * For example - * "https://github.com/googleapis/google-cloudevents/blob/master/proto/google/events/cloud/storage/v1/events.proto" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Discovery::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full name of the event type (for example, - * "google.cloud.storage.object.v1.finalized"). In the form of - * {provider-specific-prefix}.{resource}.{version}.{verb}. Types MUST be - * versioned and event schemas are guaranteed to remain backward compatible - * within one version. Note that event type versions and API versions do not - * need to match. - * - * Generated from protobuf field string type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. The full name of the event type (for example, - * "google.cloud.storage.object.v1.finalized"). In the form of - * {provider-specific-prefix}.{resource}.{version}.{verb}. Types MUST be - * versioned and event schemas are guaranteed to remain backward compatible - * within one version. Note that event type versions and API versions do not - * need to match. - * - * Generated from protobuf field string type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Output only. Human friendly description of what the event type is about. - * For example "Bucket created in Cloud Storage". - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Output only. Human friendly description of what the event type is about. - * For example "Bucket created in Cloud Storage". - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Filtering attributes for the event type. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.FilteringAttribute filtering_attributes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFilteringAttributes() - { - return $this->filtering_attributes; - } - - /** - * Output only. Filtering attributes for the event type. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.FilteringAttribute filtering_attributes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Eventarc\V1\FilteringAttribute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFilteringAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\FilteringAttribute::class); - $this->filtering_attributes = $arr; - - return $this; - } - - /** - * Output only. URI for the event schema. - * For example - * "https://github.com/googleapis/google-cloudevents/blob/master/proto/google/events/cloud/storage/v1/events.proto" - * - * Generated from protobuf field string event_schema_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEventSchemaUri() - { - return $this->event_schema_uri; - } - - /** - * Output only. URI for the event schema. - * For example - * "https://github.com/googleapis/google-cloudevents/blob/master/proto/google/events/cloud/storage/v1/events.proto" - * - * Generated from protobuf field string event_schema_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEventSchemaUri($var) - { - GPBUtil::checkString($var, True); - $this->event_schema_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventarcGrpcClient.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventarcGrpcClient.php deleted file mode 100644 index 1a94450e5981..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/EventarcGrpcClient.php +++ /dev/null @@ -1,306 +0,0 @@ -_simpleRequest('/google.cloud.eventarc.v1.Eventarc/GetTrigger', - $argument, - ['\Google\Cloud\Eventarc\V1\Trigger', 'decode'], - $metadata, $options); - } - - /** - * List triggers. - * @param \Google\Cloud\Eventarc\V1\ListTriggersRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListTriggers(\Google\Cloud\Eventarc\V1\ListTriggersRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/ListTriggers', - $argument, - ['\Google\Cloud\Eventarc\V1\ListTriggersResponse', 'decode'], - $metadata, $options); - } - - /** - * Create a new trigger in a particular project and location. - * @param \Google\Cloud\Eventarc\V1\CreateTriggerRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateTrigger(\Google\Cloud\Eventarc\V1\CreateTriggerRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/CreateTrigger', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Update a single trigger. - * @param \Google\Cloud\Eventarc\V1\UpdateTriggerRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateTrigger(\Google\Cloud\Eventarc\V1\UpdateTriggerRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/UpdateTrigger', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Delete a single trigger. - * @param \Google\Cloud\Eventarc\V1\DeleteTriggerRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteTrigger(\Google\Cloud\Eventarc\V1\DeleteTriggerRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/DeleteTrigger', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Get a single Channel. - * @param \Google\Cloud\Eventarc\V1\GetChannelRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetChannel(\Google\Cloud\Eventarc\V1\GetChannelRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/GetChannel', - $argument, - ['\Google\Cloud\Eventarc\V1\Channel', 'decode'], - $metadata, $options); - } - - /** - * List channels. - * @param \Google\Cloud\Eventarc\V1\ListChannelsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListChannels(\Google\Cloud\Eventarc\V1\ListChannelsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/ListChannels', - $argument, - ['\Google\Cloud\Eventarc\V1\ListChannelsResponse', 'decode'], - $metadata, $options); - } - - /** - * Create a new channel in a particular project and location. - * @param \Google\Cloud\Eventarc\V1\CreateChannelRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateChannel(\Google\Cloud\Eventarc\V1\CreateChannelRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/CreateChannel', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Update a single channel. - * @param \Google\Cloud\Eventarc\V1\UpdateChannelRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateChannel(\Google\Cloud\Eventarc\V1\UpdateChannelRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/UpdateChannel', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Delete a single channel. - * @param \Google\Cloud\Eventarc\V1\DeleteChannelRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteChannel(\Google\Cloud\Eventarc\V1\DeleteChannelRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/DeleteChannel', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Get a single Provider. - * @param \Google\Cloud\Eventarc\V1\GetProviderRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetProvider(\Google\Cloud\Eventarc\V1\GetProviderRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/GetProvider', - $argument, - ['\Google\Cloud\Eventarc\V1\Provider', 'decode'], - $metadata, $options); - } - - /** - * List providers. - * @param \Google\Cloud\Eventarc\V1\ListProvidersRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListProviders(\Google\Cloud\Eventarc\V1\ListProvidersRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/ListProviders', - $argument, - ['\Google\Cloud\Eventarc\V1\ListProvidersResponse', 'decode'], - $metadata, $options); - } - - /** - * Get a single ChannelConnection. - * @param \Google\Cloud\Eventarc\V1\GetChannelConnectionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetChannelConnection(\Google\Cloud\Eventarc\V1\GetChannelConnectionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/GetChannelConnection', - $argument, - ['\Google\Cloud\Eventarc\V1\ChannelConnection', 'decode'], - $metadata, $options); - } - - /** - * List channel connections. - * @param \Google\Cloud\Eventarc\V1\ListChannelConnectionsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListChannelConnections(\Google\Cloud\Eventarc\V1\ListChannelConnectionsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/ListChannelConnections', - $argument, - ['\Google\Cloud\Eventarc\V1\ListChannelConnectionsResponse', 'decode'], - $metadata, $options); - } - - /** - * Create a new ChannelConnection in a particular project and location. - * @param \Google\Cloud\Eventarc\V1\CreateChannelConnectionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateChannelConnection(\Google\Cloud\Eventarc\V1\CreateChannelConnectionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/CreateChannelConnection', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Delete a single ChannelConnection. - * @param \Google\Cloud\Eventarc\V1\DeleteChannelConnectionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteChannelConnection(\Google\Cloud\Eventarc\V1\DeleteChannelConnectionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/DeleteChannelConnection', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Get a GoogleChannelConfig - * @param \Google\Cloud\Eventarc\V1\GetGoogleChannelConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetGoogleChannelConfig(\Google\Cloud\Eventarc\V1\GetGoogleChannelConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/GetGoogleChannelConfig', - $argument, - ['\Google\Cloud\Eventarc\V1\GoogleChannelConfig', 'decode'], - $metadata, $options); - } - - /** - * Update a single GoogleChannelConfig - * @param \Google\Cloud\Eventarc\V1\UpdateGoogleChannelConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateGoogleChannelConfig(\Google\Cloud\Eventarc\V1\UpdateGoogleChannelConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.v1.Eventarc/UpdateGoogleChannelConfig', - $argument, - ['\Google\Cloud\Eventarc\V1\GoogleChannelConfig', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/FilteringAttribute.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/FilteringAttribute.php deleted file mode 100644 index ac17a5a683b0..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/FilteringAttribute.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.eventarc.v1.FilteringAttribute - */ -class FilteringAttribute extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Attribute used for filtering the event type. - * - * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $attribute = ''; - /** - * Output only. Description of the purpose of the attribute. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $description = ''; - /** - * Output only. If true, the triggers for this provider should always specify a filter - * on these attributes. Trigger creation will fail otherwise. - * - * Generated from protobuf field bool required = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $required = false; - /** - * Output only. If true, the attribute accepts matching expressions in the Eventarc - * PathPattern format. - * - * Generated from protobuf field bool path_pattern_supported = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $path_pattern_supported = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $attribute - * Output only. Attribute used for filtering the event type. - * @type string $description - * Output only. Description of the purpose of the attribute. - * @type bool $required - * Output only. If true, the triggers for this provider should always specify a filter - * on these attributes. Trigger creation will fail otherwise. - * @type bool $path_pattern_supported - * Output only. If true, the attribute accepts matching expressions in the Eventarc - * PathPattern format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Discovery::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Attribute used for filtering the event type. - * - * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAttribute() - { - return $this->attribute; - } - - /** - * Output only. Attribute used for filtering the event type. - * - * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAttribute($var) - { - GPBUtil::checkString($var, True); - $this->attribute = $var; - - return $this; - } - - /** - * Output only. Description of the purpose of the attribute. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Output only. Description of the purpose of the attribute. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. If true, the triggers for this provider should always specify a filter - * on these attributes. Trigger creation will fail otherwise. - * - * Generated from protobuf field bool required = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequired() - { - return $this->required; - } - - /** - * Output only. If true, the triggers for this provider should always specify a filter - * on these attributes. Trigger creation will fail otherwise. - * - * Generated from protobuf field bool required = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequired($var) - { - GPBUtil::checkBool($var); - $this->required = $var; - - return $this; - } - - /** - * Output only. If true, the attribute accepts matching expressions in the Eventarc - * PathPattern format. - * - * Generated from protobuf field bool path_pattern_supported = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getPathPatternSupported() - { - return $this->path_pattern_supported; - } - - /** - * Output only. If true, the attribute accepts matching expressions in the Eventarc - * PathPattern format. - * - * Generated from protobuf field bool path_pattern_supported = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setPathPatternSupported($var) - { - GPBUtil::checkBool($var); - $this->path_pattern_supported = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GKE.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GKE.php deleted file mode 100644 index 205d41d90ddc..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GKE.php +++ /dev/null @@ -1,223 +0,0 @@ -google.cloud.eventarc.v1.GKE - */ -class GKE extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the cluster the GKE service is running in. The cluster must be - * running in the same project as the trigger being created. - * - * Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = ''; - /** - * Required. The name of the Google Compute Engine in which the cluster resides, which - * can either be compute zone (for example, us-central1-a) for the zonal - * clusters or region (for example, us-central1) for regional clusters. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $location = ''; - /** - * Required. The namespace the GKE service is running in. - * - * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $namespace = ''; - /** - * Required. Name of the GKE service. - * - * Generated from protobuf field string service = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service = ''; - /** - * Optional. The relative path on the GKE service the events should be sent to. - * The value must conform to the definition of a URI path segment (section 3.3 - * of RFC2396). Examples: "/route", "route", "route/subroute". - * - * Generated from protobuf field string path = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster - * Required. The name of the cluster the GKE service is running in. The cluster must be - * running in the same project as the trigger being created. - * @type string $location - * Required. The name of the Google Compute Engine in which the cluster resides, which - * can either be compute zone (for example, us-central1-a) for the zonal - * clusters or region (for example, us-central1) for regional clusters. - * @type string $namespace - * Required. The namespace the GKE service is running in. - * @type string $service - * Required. Name of the GKE service. - * @type string $path - * Optional. The relative path on the GKE service the events should be sent to. - * The value must conform to the definition of a URI path segment (section 3.3 - * of RFC2396). Examples: "/route", "route", "route/subroute". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the cluster the GKE service is running in. The cluster must be - * running in the same project as the trigger being created. - * - * Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * Required. The name of the cluster the GKE service is running in. The cluster must be - * running in the same project as the trigger being created. - * - * Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Required. The name of the Google Compute Engine in which the cluster resides, which - * can either be compute zone (for example, us-central1-a) for the zonal - * clusters or region (for example, us-central1) for regional clusters. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Required. The name of the Google Compute Engine in which the cluster resides, which - * can either be compute zone (for example, us-central1-a) for the zonal - * clusters or region (for example, us-central1) for regional clusters. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Required. The namespace the GKE service is running in. - * - * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * Required. The namespace the GKE service is running in. - * - * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNamespace($var) - { - GPBUtil::checkString($var, True); - $this->namespace = $var; - - return $this; - } - - /** - * Required. Name of the GKE service. - * - * Generated from protobuf field string service = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * Required. Name of the GKE service. - * - * Generated from protobuf field string service = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * Optional. The relative path on the GKE service the events should be sent to. - * The value must conform to the definition of a URI path segment (section 3.3 - * of RFC2396). Examples: "/route", "route", "route/subroute". - * - * Generated from protobuf field string path = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Optional. The relative path on the GKE service the events should be sent to. - * The value must conform to the definition of a URI path segment (section 3.3 - * of RFC2396). Examples: "/route", "route", "route/subroute". - * - * Generated from protobuf field string path = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelConnectionRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelConnectionRequest.php deleted file mode 100644 index 9f7938c96631..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelConnectionRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.eventarc.v1.GetChannelConnectionRequest - */ -class GetChannelConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the channel connection to get. - * - * 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 name of the channel connection to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the channel connection 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 channel connection 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelRequest.php deleted file mode 100644 index ebde4f2d3857..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetChannelRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.eventarc.v1.GetChannelRequest - */ -class GetChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the channel to get. - * - * 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 name of the channel to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the channel 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 channel 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetGoogleChannelConfigRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetGoogleChannelConfigRequest.php deleted file mode 100644 index e21cbbf2ae1f..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetGoogleChannelConfigRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.eventarc.v1.GetGoogleChannelConfigRequest - */ -class GetGoogleChannelConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the config to get. - * - * 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 name of the config to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the config 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 config 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetProviderRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetProviderRequest.php deleted file mode 100644 index 9afe9f9ed840..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetProviderRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.eventarc.v1.GetProviderRequest - */ -class GetProviderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the provider to get. - * - * 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 name of the provider to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the provider 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 provider 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetTriggerRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetTriggerRequest.php deleted file mode 100644 index 1a6f9e0fe07a..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GetTriggerRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.eventarc.v1.GetTriggerRequest - */ -class GetTriggerRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the trigger to get. - * - * 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 name of the trigger to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the trigger 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 trigger 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php deleted file mode 100644 index e0d2872ce2b3..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/GoogleChannelConfig.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.eventarc.v1.GoogleChannelConfig - */ -class GoogleChannelConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the config. Must be in the format of, - * `projects/{project}/locations/{location}/googleChannelConfig`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt their event data. - * It must match the pattern - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string crypto_key_name = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $crypto_key_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the config. Must be in the format of, - * `projects/{project}/locations/{location}/googleChannelConfig`. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last-modified time. - * @type string $crypto_key_name - * Optional. Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt their event data. - * It must match the pattern - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\GoogleChannelConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the config. Must be in the format of, - * `projects/{project}/locations/{location}/googleChannelConfig`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the config. Must be in the format of, - * `projects/{project}/locations/{location}/googleChannelConfig`. - * - * 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 last-modified time. - * - * 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. The last-modified time. - * - * 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; - } - - /** - * Optional. Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt their event data. - * It must match the pattern - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string crypto_key_name = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getCryptoKeyName() - { - return $this->crypto_key_name; - } - - /** - * Optional. Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt their event data. - * It must match the pattern - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string crypto_key_name = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCryptoKeyName($var) - { - GPBUtil::checkString($var, True); - $this->crypto_key_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsRequest.php deleted file mode 100644 index f84598beb531..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.eventarc.v1.ListChannelConnectionsRequest - */ -class ListChannelConnectionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent collection from which to list channel connections. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of channel connections to return on each page. - * Note: The service may send fewer responses. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The page token; provide the value from the `next_page_token` field in a - * previous `ListChannelConnections` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListChannelConnetions` - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent collection from which to list channel connections. - * @type int $page_size - * The maximum number of channel connections to return on each page. - * Note: The service may send fewer responses. - * @type string $page_token - * The page token; provide the value from the `next_page_token` field in a - * previous `ListChannelConnections` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListChannelConnetions` - * match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent collection from which to list channel connections. - * - * Generated 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 collection from which to list channel connections. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 channel connections to return on each page. - * Note: The service may send fewer responses. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of channel connections to return on each page. - * Note: The service may send fewer responses. - * - * 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; provide the value from the `next_page_token` field in a - * previous `ListChannelConnections` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListChannelConnetions` - * 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; - } - - /** - * The page token; provide the value from the `next_page_token` field in a - * previous `ListChannelConnections` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListChannelConnetions` - * 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; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsResponse.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsResponse.php deleted file mode 100644 index 9659eb7acb7a..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelConnectionsResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.eventarc.v1.ListChannelConnectionsResponse - */ -class ListChannelConnectionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested channel connections, up to the number specified in - * `page_size`. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.ChannelConnection channel_connections = 1; - */ - private $channel_connections; - /** - * A page token that can be sent to `ListChannelConnections` to request the - * next page. - * If this is empty, then there are no more pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Unreachable resources, if any. - * - * 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\Eventarc\V1\ChannelConnection>|\Google\Protobuf\Internal\RepeatedField $channel_connections - * The requested channel connections, up to the number specified in - * `page_size`. - * @type string $next_page_token - * A page token that can be sent to `ListChannelConnections` to request the - * next page. - * If this is empty, then there are no more pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Unreachable resources, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * The requested channel connections, up to the number specified in - * `page_size`. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.ChannelConnection channel_connections = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChannelConnections() - { - return $this->channel_connections; - } - - /** - * The requested channel connections, up to the number specified in - * `page_size`. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.ChannelConnection channel_connections = 1; - * @param array<\Google\Cloud\Eventarc\V1\ChannelConnection>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChannelConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\ChannelConnection::class); - $this->channel_connections = $arr; - - return $this; - } - - /** - * A page token that can be sent to `ListChannelConnections` to request the - * next page. - * If this is empty, then there are no more pages. - * - * 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 sent to `ListChannelConnections` to request the - * next page. - * If this is empty, then 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; - } - - /** - * Unreachable resources, if any. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Unreachable resources, if any. - * - * 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsRequest.php deleted file mode 100644 index c57add9d02f4..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.eventarc.v1.ListChannelsRequest - */ -class ListChannelsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent collection to list channels on. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of channels to return on each page. - * Note: The service may send fewer. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The page token; provide the value from the `next_page_token` field in a - * previous `ListChannels` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListChannels` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting order is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, channel_id`. - * - * Generated from protobuf field string order_by = 4; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent collection to list channels on. - * @type int $page_size - * The maximum number of channels to return on each page. - * Note: The service may send fewer. - * @type string $page_token - * The page token; provide the value from the `next_page_token` field in a - * previous `ListChannels` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListChannels` must - * match the call that provided the page token. - * @type string $order_by - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting order is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, channel_id`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent collection to list channels on. - * - * Generated 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 collection to list channels on. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 channels to return on each page. - * Note: The service may send fewer. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of channels to return on each page. - * Note: The service may send fewer. - * - * 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; provide the value from the `next_page_token` field in a - * previous `ListChannels` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListChannels` 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; - } - - /** - * The page token; provide the value from the `next_page_token` field in a - * previous `ListChannels` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListChannels` 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; - } - - /** - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting order is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, channel_id`. - * - * Generated from protobuf field string order_by = 4; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting order is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, channel_id`. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsResponse.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsResponse.php deleted file mode 100644 index 7706916cd782..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListChannelsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.eventarc.v1.ListChannelsResponse - */ -class ListChannelsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested channels, up to the number specified in `page_size`. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.Channel channels = 1; - */ - private $channels; - /** - * A page token that can be sent to `ListChannels` to request the next page. - * If this is empty, then there are no more pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Unreachable resources, if any. - * - * 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\Eventarc\V1\Channel>|\Google\Protobuf\Internal\RepeatedField $channels - * The requested channels, up to the number specified in `page_size`. - * @type string $next_page_token - * A page token that can be sent to `ListChannels` to request the next page. - * If this is empty, then there are no more pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Unreachable resources, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * The requested channels, up to the number specified in `page_size`. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.Channel channels = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChannels() - { - return $this->channels; - } - - /** - * The requested channels, up to the number specified in `page_size`. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.Channel channels = 1; - * @param array<\Google\Cloud\Eventarc\V1\Channel>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChannels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\Channel::class); - $this->channels = $arr; - - return $this; - } - - /** - * A page token that can be sent to `ListChannels` to request the next page. - * If this is empty, then there are no more pages. - * - * 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 sent to `ListChannels` to request the next page. - * If this is empty, then 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; - } - - /** - * Unreachable resources, if any. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Unreachable resources, if any. - * - * 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersRequest.php deleted file mode 100644 index 85fb2918c235..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersRequest.php +++ /dev/null @@ -1,227 +0,0 @@ -google.cloud.eventarc.v1.ListProvidersRequest - */ -class ListProvidersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent of the provider to get. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of providers to return on each page. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The page token; provide the value from the `next_page_token` field in a - * previous `ListProviders` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProviders` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting oder is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, _id`. - * - * Generated from protobuf field string order_by = 4; - */ - protected $order_by = ''; - /** - * The filter field that the list request will filter on. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent of the provider to get. - * @type int $page_size - * The maximum number of providers to return on each page. - * @type string $page_token - * The page token; provide the value from the `next_page_token` field in a - * previous `ListProviders` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProviders` must - * match the call that provided the page token. - * @type string $order_by - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting oder is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, _id`. - * @type string $filter - * The filter field that the list request will filter on. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent of the provider to get. - * - * Generated 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 of the provider to get. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 providers to return on each page. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of providers to return on each 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; provide the value from the `next_page_token` field in a - * previous `ListProviders` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProviders` 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; - } - - /** - * The page token; provide the value from the `next_page_token` field in a - * previous `ListProviders` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProviders` 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; - } - - /** - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting oder is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, _id`. - * - * Generated from protobuf field string order_by = 4; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting oder is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, _id`. - * - * 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 filter field that the list request will filter on. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter field that the list request will filter on. - * - * 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersResponse.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersResponse.php deleted file mode 100644 index d1bf4a8f1e6b..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListProvidersResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.eventarc.v1.ListProvidersResponse - */ -class ListProvidersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested providers, up to the number specified in `page_size`. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.Provider providers = 1; - */ - private $providers; - /** - * A page token that can be sent to `ListProviders` to request the next page. - * If this is empty, then there are no more pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Unreachable resources, if any. - * - * 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\Eventarc\V1\Provider>|\Google\Protobuf\Internal\RepeatedField $providers - * The requested providers, up to the number specified in `page_size`. - * @type string $next_page_token - * A page token that can be sent to `ListProviders` to request the next page. - * If this is empty, then there are no more pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Unreachable resources, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * The requested providers, up to the number specified in `page_size`. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.Provider providers = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProviders() - { - return $this->providers; - } - - /** - * The requested providers, up to the number specified in `page_size`. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.Provider providers = 1; - * @param array<\Google\Cloud\Eventarc\V1\Provider>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProviders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\Provider::class); - $this->providers = $arr; - - return $this; - } - - /** - * A page token that can be sent to `ListProviders` to request the next page. - * If this is empty, then there are no more pages. - * - * 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 sent to `ListProviders` to request the next page. - * If this is empty, then 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; - } - - /** - * Unreachable resources, if any. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Unreachable resources, if any. - * - * 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersRequest.php deleted file mode 100644 index b77fb3ad3929..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersRequest.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.eventarc.v1.ListTriggersRequest - */ -class ListTriggersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent collection to list triggers on. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of triggers to return on each page. - * Note: The service may send fewer. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The page token; provide the value from the `next_page_token` field in a - * previous `ListTriggers` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTriggers` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting order is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, trigger_id`. - * - * Generated from protobuf field string order_by = 4; - */ - protected $order_by = ''; - /** - * Filter field. Used to filter the Triggers to be listed. Possible filters - * are described in https://google.aip.dev/160. For example, using - * "?filter=destination:gke" would list only Triggers with a gke destination. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent collection to list triggers on. - * @type int $page_size - * The maximum number of triggers to return on each page. - * Note: The service may send fewer. - * @type string $page_token - * The page token; provide the value from the `next_page_token` field in a - * previous `ListTriggers` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTriggers` must match - * the call that provided the page token. - * @type string $order_by - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting order is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, trigger_id`. - * @type string $filter - * Filter field. Used to filter the Triggers to be listed. Possible filters - * are described in https://google.aip.dev/160. For example, using - * "?filter=destination:gke" would list only Triggers with a gke destination. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent collection to list triggers on. - * - * Generated 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 collection to list triggers on. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 triggers to return on each page. - * Note: The service may send fewer. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of triggers to return on each page. - * Note: The service may send fewer. - * - * 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; provide the value from the `next_page_token` field in a - * previous `ListTriggers` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTriggers` 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; - } - - /** - * The page token; provide the value from the `next_page_token` field in a - * previous `ListTriggers` call to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTriggers` 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; - } - - /** - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting order is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, trigger_id`. - * - * Generated from protobuf field string order_by = 4; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting order is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, trigger_id`. - * - * 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; - } - - /** - * Filter field. Used to filter the Triggers to be listed. Possible filters - * are described in https://google.aip.dev/160. For example, using - * "?filter=destination:gke" would list only Triggers with a gke destination. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter field. Used to filter the Triggers to be listed. Possible filters - * are described in https://google.aip.dev/160. For example, using - * "?filter=destination:gke" would list only Triggers with a gke destination. - * - * 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersResponse.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersResponse.php deleted file mode 100644 index ee71a58af28b..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/ListTriggersResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.eventarc.v1.ListTriggersResponse - */ -class ListTriggersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested triggers, up to the number specified in `page_size`. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.Trigger triggers = 1; - */ - private $triggers; - /** - * A page token that can be sent to `ListTriggers` to request the next page. - * If this is empty, then there are no more pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Unreachable resources, if any. - * - * 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\Eventarc\V1\Trigger>|\Google\Protobuf\Internal\RepeatedField $triggers - * The requested triggers, up to the number specified in `page_size`. - * @type string $next_page_token - * A page token that can be sent to `ListTriggers` to request the next page. - * If this is empty, then there are no more pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Unreachable resources, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * The requested triggers, up to the number specified in `page_size`. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.Trigger triggers = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTriggers() - { - return $this->triggers; - } - - /** - * The requested triggers, up to the number specified in `page_size`. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.Trigger triggers = 1; - * @param array<\Google\Cloud\Eventarc\V1\Trigger>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTriggers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\Trigger::class); - $this->triggers = $arr; - - return $this; - } - - /** - * A page token that can be sent to `ListTriggers` to request the next page. - * If this is empty, then there are no more pages. - * - * 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 sent to `ListTriggers` to request the next page. - * If this is empty, then 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; - } - - /** - * Unreachable resources, if any. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Unreachable resources, if any. - * - * 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/OperationMetadata.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/OperationMetadata.php deleted file mode 100644 index 5e68aca2f8c3..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/OperationMetadata.php +++ /dev/null @@ -1,303 +0,0 @@ -google.cloud.eventarc.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\Eventarc\V1\Eventarc::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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Provider.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Provider.php deleted file mode 100644 index 2cab34dc5b9d..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Provider.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.eventarc.v1.Provider - */ -class Provider extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. In `projects/{project}/locations/{location}/providers/{provider_id}` - * format. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Human friendly name for the Provider. For example "Cloud Storage". - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. Event types for this provider. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.EventType event_types = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $event_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. In `projects/{project}/locations/{location}/providers/{provider_id}` - * format. - * @type string $display_name - * Output only. Human friendly name for the Provider. For example "Cloud Storage". - * @type array<\Google\Cloud\Eventarc\V1\EventType>|\Google\Protobuf\Internal\RepeatedField $event_types - * Output only. Event types for this provider. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Discovery::initOnce(); - parent::__construct($data); - } - - /** - * Output only. In `projects/{project}/locations/{location}/providers/{provider_id}` - * format. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. In `projects/{project}/locations/{location}/providers/{provider_id}` - * format. - * - * 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. Human friendly name for the Provider. For example "Cloud Storage". - * - * 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. Human friendly name for the Provider. For example "Cloud Storage". - * - * 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. Event types for this provider. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.EventType event_types = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEventTypes() - { - return $this->event_types; - } - - /** - * Output only. Event types for this provider. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.EventType event_types = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Eventarc\V1\EventType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEventTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\EventType::class); - $this->event_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Pubsub.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Pubsub.php deleted file mode 100644 index 438692870f62..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Pubsub.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.eventarc.v1.Pubsub - */ -class Pubsub extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The name of the Pub/Sub topic created and managed by Eventarc as - * a transport for the event delivery. Format: - * `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`. - * You can set an existing topic for triggers of the type - * `google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide - * here is not deleted by Eventarc at trigger deletion. - * - * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $topic = ''; - /** - * Output only. The name of the Pub/Sub subscription created and managed by Eventarc - * as a transport for the event delivery. Format: - * `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`. - * - * Generated from protobuf field string subscription = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $subscription = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $topic - * Optional. The name of the Pub/Sub topic created and managed by Eventarc as - * a transport for the event delivery. Format: - * `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`. - * You can set an existing topic for triggers of the type - * `google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide - * here is not deleted by Eventarc at trigger deletion. - * @type string $subscription - * Output only. The name of the Pub/Sub subscription created and managed by Eventarc - * as a transport for the event delivery. Format: - * `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The name of the Pub/Sub topic created and managed by Eventarc as - * a transport for the event delivery. Format: - * `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`. - * You can set an existing topic for triggers of the type - * `google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide - * here is not deleted by Eventarc at trigger deletion. - * - * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTopic() - { - return $this->topic; - } - - /** - * Optional. The name of the Pub/Sub topic created and managed by Eventarc as - * a transport for the event delivery. Format: - * `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`. - * You can set an existing topic for triggers of the type - * `google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide - * here is not deleted by Eventarc at trigger deletion. - * - * Generated from protobuf field string topic = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTopic($var) - { - GPBUtil::checkString($var, True); - $this->topic = $var; - - return $this; - } - - /** - * Output only. The name of the Pub/Sub subscription created and managed by Eventarc - * as a transport for the event delivery. Format: - * `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`. - * - * Generated from protobuf field string subscription = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSubscription() - { - return $this->subscription; - } - - /** - * Output only. The name of the Pub/Sub subscription created and managed by Eventarc - * as a transport for the event delivery. Format: - * `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`. - * - * Generated from protobuf field string subscription = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSubscription($var) - { - GPBUtil::checkString($var, True); - $this->subscription = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/StateCondition.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/StateCondition.php deleted file mode 100644 index 3c68f4ea51cd..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/StateCondition.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.eventarc.v1.StateCondition - */ -class StateCondition extends \Google\Protobuf\Internal\Message -{ - /** - * The canonical code of the condition. - * - * Generated from protobuf field .google.rpc.Code code = 1; - */ - protected $code = 0; - /** - * Human-readable message. - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * The canonical code of the condition. - * @type string $message - * Human-readable message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); - parent::__construct($data); - } - - /** - * The canonical code of the condition. - * - * Generated from protobuf field .google.rpc.Code code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * The canonical code of the condition. - * - * Generated from protobuf field .google.rpc.Code code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Rpc\Code::class); - $this->code = $var; - - return $this; - } - - /** - * Human-readable message. - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Human-readable 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Transport.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Transport.php deleted file mode 100644 index 0d7bd861e1e0..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Transport.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.eventarc.v1.Transport - */ -class Transport extends \Google\Protobuf\Internal\Message -{ - protected $intermediary; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Eventarc\V1\Pubsub $pubsub - * The Pub/Sub topic and subscription used by Eventarc as a transport - * intermediary. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); - parent::__construct($data); - } - - /** - * The Pub/Sub topic and subscription used by Eventarc as a transport - * intermediary. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Pubsub pubsub = 1; - * @return \Google\Cloud\Eventarc\V1\Pubsub|null - */ - public function getPubsub() - { - return $this->readOneof(1); - } - - public function hasPubsub() - { - return $this->hasOneof(1); - } - - /** - * The Pub/Sub topic and subscription used by Eventarc as a transport - * intermediary. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Pubsub pubsub = 1; - * @param \Google\Cloud\Eventarc\V1\Pubsub $var - * @return $this - */ - public function setPubsub($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Pubsub::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getIntermediary() - { - return $this->whichOneof("intermediary"); - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Trigger.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Trigger.php deleted file mode 100644 index 144b812b9f05..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/Trigger.php +++ /dev/null @@ -1,569 +0,0 @@ -google.cloud.eventarc.v1.Trigger - */ -class Trigger extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the trigger. Must be unique within the location of the - * project and must be in - * `projects/{project}/locations/{location}/triggers/{trigger}` format. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4 - * string and guaranteed to remain unchanged until the resource is deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Required. Unordered list. The list of filters that applies to event attributes. Only events that - * match all the provided filters are sent to the destination. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; - */ - private $event_filters; - /** - * Optional. The IAM service account email associated with the trigger. The - * service account represents the identity of the trigger. - * The principal who calls this API must have the `iam.serviceAccounts.actAs` - * permission in the service account. See - * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common - * for more information. - * For Cloud Run destinations, this service account is used to generate - * identity tokens when invoking the service. See - * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account - * for information on how to invoke authenticated Cloud Run services. - * To create Audit Log triggers, the service account should also - * have the `roles/eventarc.eventReceiver` IAM role. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $service_account = ''; - /** - * Required. Destination specifies where the events should be sent to. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $destination = null; - /** - * Optional. To deliver messages, Eventarc might use other GCP - * products as a transport intermediary. This field contains a reference to - * that transport intermediary. This information can be used for debugging - * purposes. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $transport = null; - /** - * Optional. User labels attached to the triggers that can be used to group resources. - * - * Generated from protobuf field map labels = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. The name of the channel associated with the trigger in - * `projects/{project}/locations/{location}/channels/{channel}` format. - * You must provide a channel to receive events from Eventarc SaaS partners. - * - * Generated from protobuf field string channel = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $channel = ''; - /** - * Output only. The reason(s) why a trigger is in FAILED state. - * - * Generated from protobuf field map conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $conditions; - /** - * Output only. This checksum is computed by the server based on the value of other - * fields, and might be sent only on create requests to ensure that the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the trigger. Must be unique within the location of the - * project and must be in - * `projects/{project}/locations/{location}/triggers/{trigger}` format. - * @type string $uid - * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4 - * string and guaranteed to remain unchanged until the resource is deleted. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last-modified time. - * @type array<\Google\Cloud\Eventarc\V1\EventFilter>|\Google\Protobuf\Internal\RepeatedField $event_filters - * Required. Unordered list. The list of filters that applies to event attributes. Only events that - * match all the provided filters are sent to the destination. - * @type string $service_account - * Optional. The IAM service account email associated with the trigger. The - * service account represents the identity of the trigger. - * The principal who calls this API must have the `iam.serviceAccounts.actAs` - * permission in the service account. See - * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common - * for more information. - * For Cloud Run destinations, this service account is used to generate - * identity tokens when invoking the service. See - * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account - * for information on how to invoke authenticated Cloud Run services. - * To create Audit Log triggers, the service account should also - * have the `roles/eventarc.eventReceiver` IAM role. - * @type \Google\Cloud\Eventarc\V1\Destination $destination - * Required. Destination specifies where the events should be sent to. - * @type \Google\Cloud\Eventarc\V1\Transport $transport - * Optional. To deliver messages, Eventarc might use other GCP - * products as a transport intermediary. This field contains a reference to - * that transport intermediary. This information can be used for debugging - * purposes. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User labels attached to the triggers that can be used to group resources. - * @type string $channel - * Optional. The name of the channel associated with the trigger in - * `projects/{project}/locations/{location}/channels/{channel}` format. - * You must provide a channel to receive events from Eventarc SaaS partners. - * @type array|\Google\Protobuf\Internal\MapField $conditions - * Output only. The reason(s) why a trigger is in FAILED state. - * @type string $etag - * Output only. This checksum is computed by the server based on the value of other - * fields, and might be sent only on create requests to ensure that the - * client has an up-to-date value before proceeding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Trigger::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the trigger. Must be unique within the location of the - * project and must be in - * `projects/{project}/locations/{location}/triggers/{trigger}` format. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the trigger. Must be unique within the location of the - * project and must be in - * `projects/{project}/locations/{location}/triggers/{trigger}` format. - * - * 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-assigned unique identifier for the trigger. The value is a UUID4 - * string and guaranteed to remain unchanged until the resource is deleted. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server-assigned unique identifier for the trigger. The value is a UUID4 - * string and guaranteed to remain unchanged until the resource is deleted. - * - * Generated from protobuf field string uid = 2 [(.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 creation time. - * - * 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. The creation time. - * - * 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. The last-modified time. - * - * 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. The last-modified time. - * - * 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; - } - - /** - * Required. Unordered list. The list of filters that applies to event attributes. Only events that - * match all the provided filters are sent to the destination. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEventFilters() - { - return $this->event_filters; - } - - /** - * Required. Unordered list. The list of filters that applies to event attributes. Only events that - * match all the provided filters are sent to the destination. - * - * Generated from protobuf field repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Eventarc\V1\EventFilter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEventFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\EventFilter::class); - $this->event_filters = $arr; - - return $this; - } - - /** - * Optional. The IAM service account email associated with the trigger. The - * service account represents the identity of the trigger. - * The principal who calls this API must have the `iam.serviceAccounts.actAs` - * permission in the service account. See - * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common - * for more information. - * For Cloud Run destinations, this service account is used to generate - * identity tokens when invoking the service. See - * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account - * for information on how to invoke authenticated Cloud Run services. - * To create Audit Log triggers, the service account should also - * have the `roles/eventarc.eventReceiver` IAM role. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Optional. The IAM service account email associated with the trigger. The - * service account represents the identity of the trigger. - * The principal who calls this API must have the `iam.serviceAccounts.actAs` - * permission in the service account. See - * https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common - * for more information. - * For Cloud Run destinations, this service account is used to generate - * identity tokens when invoking the service. See - * https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account - * for information on how to invoke authenticated Cloud Run services. - * To create Audit Log triggers, the service account should also - * have the `roles/eventarc.eventReceiver` IAM role. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Required. Destination specifies where the events should be sent to. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Eventarc\V1\Destination|null - */ - public function getDestination() - { - return $this->destination; - } - - public function hasDestination() - { - return isset($this->destination); - } - - public function clearDestination() - { - unset($this->destination); - } - - /** - * Required. Destination specifies where the events should be sent to. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Eventarc\V1\Destination $var - * @return $this - */ - public function setDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Destination::class); - $this->destination = $var; - - return $this; - } - - /** - * Optional. To deliver messages, Eventarc might use other GCP - * products as a transport intermediary. This field contains a reference to - * that transport intermediary. This information can be used for debugging - * purposes. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Eventarc\V1\Transport|null - */ - public function getTransport() - { - return $this->transport; - } - - public function hasTransport() - { - return isset($this->transport); - } - - public function clearTransport() - { - unset($this->transport); - } - - /** - * Optional. To deliver messages, Eventarc might use other GCP - * products as a transport intermediary. This field contains a reference to - * that transport intermediary. This information can be used for debugging - * purposes. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Eventarc\V1\Transport $var - * @return $this - */ - public function setTransport($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Transport::class); - $this->transport = $var; - - return $this; - } - - /** - * Optional. User labels attached to the triggers that can be used to group resources. - * - * Generated from protobuf field map labels = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User labels attached to the triggers that can be used to group resources. - * - * Generated from protobuf field map labels = 12 [(.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 name of the channel associated with the trigger in - * `projects/{project}/locations/{location}/channels/{channel}` format. - * You must provide a channel to receive events from Eventarc SaaS partners. - * - * Generated from protobuf field string channel = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getChannel() - { - return $this->channel; - } - - /** - * Optional. The name of the channel associated with the trigger in - * `projects/{project}/locations/{location}/channels/{channel}` format. - * You must provide a channel to receive events from Eventarc SaaS partners. - * - * Generated from protobuf field string channel = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkString($var, True); - $this->channel = $var; - - return $this; - } - - /** - * Output only. The reason(s) why a trigger is in FAILED state. - * - * Generated from protobuf field map conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getConditions() - { - return $this->conditions; - } - - /** - * Output only. The reason(s) why a trigger is in FAILED state. - * - * Generated from protobuf field map conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setConditions($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Eventarc\V1\StateCondition::class); - $this->conditions = $arr; - - return $this; - } - - /** - * Output only. This checksum is computed by the server based on the value of other - * fields, and might be sent only on create requests to ensure that the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. This checksum is computed by the server based on the value of other - * fields, and might be sent only on create requests to ensure that the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateChannelRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateChannelRequest.php deleted file mode 100644 index 8db95563a9b1..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateChannelRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.eventarc.v1.UpdateChannelRequest - */ -class UpdateChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The channel to be updated. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Channel channel = 1; - */ - protected $channel = null; - /** - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Eventarc\V1\Channel $channel - * The channel to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * @type bool $validate_only - * Required. If set, validate the request and preview the review, but do not - * post it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * The channel to be updated. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Channel channel = 1; - * @return \Google\Cloud\Eventarc\V1\Channel|null - */ - public function getChannel() - { - return $this->channel; - } - - public function hasChannel() - { - return isset($this->channel); - } - - public function clearChannel() - { - unset($this->channel); - } - - /** - * The channel to be updated. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Channel channel = 1; - * @param \Google\Cloud\Eventarc\V1\Channel $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Channel::class); - $this->channel = $var; - - return $this; - } - - /** - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * - * 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); - } - - /** - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * - * 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 set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateGoogleChannelConfigRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateGoogleChannelConfigRequest.php deleted file mode 100644 index f73c1d6bb610..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateGoogleChannelConfigRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest - */ -class UpdateGoogleChannelConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The config to be updated. - * - * Generated from protobuf field .google.cloud.eventarc.v1.GoogleChannelConfig google_channel_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $google_channel_config = null; - /** - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Eventarc\V1\GoogleChannelConfig $google_channel_config - * Required. The config to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * Required. The config to be updated. - * - * Generated from protobuf field .google.cloud.eventarc.v1.GoogleChannelConfig google_channel_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Eventarc\V1\GoogleChannelConfig|null - */ - public function getGoogleChannelConfig() - { - return $this->google_channel_config; - } - - public function hasGoogleChannelConfig() - { - return isset($this->google_channel_config); - } - - public function clearGoogleChannelConfig() - { - unset($this->google_channel_config); - } - - /** - * Required. The config to be updated. - * - * Generated from protobuf field .google.cloud.eventarc.v1.GoogleChannelConfig google_channel_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Eventarc\V1\GoogleChannelConfig $var - * @return $this - */ - public function setGoogleChannelConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\GoogleChannelConfig::class); - $this->google_channel_config = $var; - - return $this; - } - - /** - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * - * 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); - } - - /** - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * - * 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/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateTriggerRequest.php b/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateTriggerRequest.php deleted file mode 100644 index a0b83659f1c1..000000000000 --- a/owl-bot-staging/Eventarc/v1/proto/src/Google/Cloud/Eventarc/V1/UpdateTriggerRequest.php +++ /dev/null @@ -1,205 +0,0 @@ -google.cloud.eventarc.v1.UpdateTriggerRequest - */ -class UpdateTriggerRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The trigger to be updated. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Trigger trigger = 1; - */ - protected $trigger = null; - /** - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - /** - * If set to true, and the trigger is not found, a new trigger will be - * created. In this situation, `update_mask` is ignored. - * - * Generated from protobuf field bool allow_missing = 3; - */ - protected $allow_missing = false; - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Eventarc\V1\Trigger $trigger - * The trigger to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * @type bool $allow_missing - * If set to true, and the trigger is not found, a new trigger will be - * created. In this situation, `update_mask` is ignored. - * @type bool $validate_only - * Required. If set, validate the request and preview the review, but do not - * post it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\V1\Eventarc::initOnce(); - parent::__construct($data); - } - - /** - * The trigger to be updated. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Trigger trigger = 1; - * @return \Google\Cloud\Eventarc\V1\Trigger|null - */ - public function getTrigger() - { - return $this->trigger; - } - - public function hasTrigger() - { - return isset($this->trigger); - } - - public function clearTrigger() - { - unset($this->trigger); - } - - /** - * The trigger to be updated. - * - * Generated from protobuf field .google.cloud.eventarc.v1.Trigger trigger = 1; - * @param \Google\Cloud\Eventarc\V1\Trigger $var - * @return $this - */ - public function setTrigger($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Eventarc\V1\Trigger::class); - $this->trigger = $var; - - return $this; - } - - /** - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * - * 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); - } - - /** - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * - * 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; - } - - /** - * If set to true, and the trigger is not found, a new trigger will be - * created. In this situation, `update_mask` is ignored. - * - * Generated from protobuf field bool allow_missing = 3; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the trigger is not found, a new trigger will be - * created. In this situation, `update_mask` is ignored. - * - * Generated from protobuf field bool allow_missing = 3; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Required. If set, validate the request and preview the review, but do not - * post it. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel.php deleted file mode 100644 index 164b9f039fcb..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel.php +++ /dev/null @@ -1,95 +0,0 @@ -setName($channelName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $eventarcClient->createChannel($formattedParent, $channel, $channelId, $validateOnly); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Channel $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = EventarcClient::locationName('[PROJECT]', '[LOCATION]'); - $channelName = '[NAME]'; - $channelId = '[CHANNEL_ID]'; - $validateOnly = false; - - create_channel_sample($formattedParent, $channelName, $channelId, $validateOnly); -} -// [END eventarc_v1_generated_Eventarc_CreateChannel_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel_connection.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel_connection.php deleted file mode 100644 index 67ab2376ffde..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_channel_connection.php +++ /dev/null @@ -1,110 +0,0 @@ -setName($channelConnectionName) - ->setChannel($formattedChannelConnectionChannel); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $eventarcClient->createChannelConnection( - $formattedParent, - $channelConnection, - $channelConnectionId - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ChannelConnection $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = EventarcClient::locationName('[PROJECT]', '[LOCATION]'); - $channelConnectionName = '[NAME]'; - $formattedChannelConnectionChannel = EventarcClient::channelName( - '[PROJECT]', - '[LOCATION]', - '[CHANNEL]' - ); - $channelConnectionId = '[CHANNEL_CONNECTION_ID]'; - - create_channel_connection_sample( - $formattedParent, - $channelConnectionName, - $formattedChannelConnectionChannel, - $channelConnectionId - ); -} -// [END eventarc_v1_generated_Eventarc_CreateChannelConnection_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_trigger.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_trigger.php deleted file mode 100644 index 88f2cacdda46..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/create_trigger.php +++ /dev/null @@ -1,120 +0,0 @@ -setAttribute($triggerEventFiltersAttribute) - ->setValue($triggerEventFiltersValue); - $triggerEventFilters = [$eventFilter,]; - $triggerDestination = new Destination(); - $trigger = (new Trigger()) - ->setName($triggerName) - ->setEventFilters($triggerEventFilters) - ->setDestination($triggerDestination); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $eventarcClient->createTrigger($formattedParent, $trigger, $triggerId, $validateOnly); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Trigger $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = EventarcClient::locationName('[PROJECT]', '[LOCATION]'); - $triggerName = '[NAME]'; - $triggerEventFiltersAttribute = '[ATTRIBUTE]'; - $triggerEventFiltersValue = '[VALUE]'; - $triggerId = '[TRIGGER_ID]'; - $validateOnly = false; - - create_trigger_sample( - $formattedParent, - $triggerName, - $triggerEventFiltersAttribute, - $triggerEventFiltersValue, - $triggerId, - $validateOnly - ); -} -// [END eventarc_v1_generated_Eventarc_CreateTrigger_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel.php deleted file mode 100644 index 4a471830c008..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel.php +++ /dev/null @@ -1,81 +0,0 @@ -deleteChannel($formattedName, $validateOnly); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Channel $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EventarcClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $validateOnly = false; - - delete_channel_sample($formattedName, $validateOnly); -} -// [END eventarc_v1_generated_Eventarc_DeleteChannel_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel_connection.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel_connection.php deleted file mode 100644 index 36fb880d2413..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_channel_connection.php +++ /dev/null @@ -1,82 +0,0 @@ -deleteChannelConnection($formattedName); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ChannelConnection $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EventarcClient::channelConnectionName( - '[PROJECT]', - '[LOCATION]', - '[CHANNEL_CONNECTION]' - ); - - delete_channel_connection_sample($formattedName); -} -// [END eventarc_v1_generated_Eventarc_DeleteChannelConnection_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_trigger.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_trigger.php deleted file mode 100644 index 8f1af523b52d..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/delete_trigger.php +++ /dev/null @@ -1,81 +0,0 @@ -deleteTrigger($formattedName, $validateOnly); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Trigger $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EventarcClient::triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); - $validateOnly = false; - - delete_trigger_sample($formattedName, $validateOnly); -} -// [END eventarc_v1_generated_Eventarc_DeleteTrigger_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel.php deleted file mode 100644 index e0733ae6e8b0..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel.php +++ /dev/null @@ -1,66 +0,0 @@ -getChannel($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EventarcClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - - get_channel_sample($formattedName); -} -// [END eventarc_v1_generated_Eventarc_GetChannel_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel_connection.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel_connection.php deleted file mode 100644 index c5e2262fa0e6..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_channel_connection.php +++ /dev/null @@ -1,70 +0,0 @@ -getChannelConnection($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EventarcClient::channelConnectionName( - '[PROJECT]', - '[LOCATION]', - '[CHANNEL_CONNECTION]' - ); - - get_channel_connection_sample($formattedName); -} -// [END eventarc_v1_generated_Eventarc_GetChannelConnection_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_google_channel_config.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_google_channel_config.php deleted file mode 100644 index fe50bf3a1b4a..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_google_channel_config.php +++ /dev/null @@ -1,66 +0,0 @@ -getGoogleChannelConfig($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EventarcClient::googleChannelConfigName('[PROJECT]', '[LOCATION]'); - - get_google_channel_config_sample($formattedName); -} -// [END eventarc_v1_generated_Eventarc_GetGoogleChannelConfig_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_iam_policy.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_iam_policy.php deleted file mode 100644 index d8f6c1956bc9..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_iam_policy.php +++ /dev/null @@ -1,67 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 eventarc_v1_generated_Eventarc_GetIamPolicy_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_location.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_location.php deleted file mode 100644 index d00bf2fa6e65..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END eventarc_v1_generated_Eventarc_GetLocation_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_provider.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_provider.php deleted file mode 100644 index 79869c9e11a0..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_provider.php +++ /dev/null @@ -1,66 +0,0 @@ -getProvider($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EventarcClient::providerName('[PROJECT]', '[LOCATION]', '[PROVIDER]'); - - get_provider_sample($formattedName); -} -// [END eventarc_v1_generated_Eventarc_GetProvider_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_trigger.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_trigger.php deleted file mode 100644 index 5b7d467a9eb0..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/get_trigger.php +++ /dev/null @@ -1,66 +0,0 @@ -getTrigger($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EventarcClient::triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); - - get_trigger_sample($formattedName); -} -// [END eventarc_v1_generated_Eventarc_GetTrigger_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channel_connections.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channel_connections.php deleted file mode 100644 index 82c3f9598bf2..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channel_connections.php +++ /dev/null @@ -1,71 +0,0 @@ -listChannelConnections($formattedParent); - - /** @var ChannelConnection $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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]'); - - list_channel_connections_sample($formattedParent); -} -// [END eventarc_v1_generated_Eventarc_ListChannelConnections_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channels.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channels.php deleted file mode 100644 index 4d674a11304c..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_channels.php +++ /dev/null @@ -1,71 +0,0 @@ -listChannels($formattedParent); - - /** @var Channel $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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]'); - - list_channels_sample($formattedParent); -} -// [END eventarc_v1_generated_Eventarc_ListChannels_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_locations.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_locations.php deleted file mode 100644 index 5ed58dff959e..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @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 eventarc_v1_generated_Eventarc_ListLocations_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_providers.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_providers.php deleted file mode 100644 index d875caad0cb4..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_providers.php +++ /dev/null @@ -1,71 +0,0 @@ -listProviders($formattedParent); - - /** @var Provider $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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]'); - - list_providers_sample($formattedParent); -} -// [END eventarc_v1_generated_Eventarc_ListProviders_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_triggers.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_triggers.php deleted file mode 100644 index 7b1d7ce1aa62..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/list_triggers.php +++ /dev/null @@ -1,71 +0,0 @@ -listTriggers($formattedParent); - - /** @var Trigger $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 = EventarcClient::locationName('[PROJECT]', '[LOCATION]'); - - list_triggers_sample($formattedParent); -} -// [END eventarc_v1_generated_Eventarc_ListTriggers_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/set_iam_policy.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/set_iam_policy.php deleted file mode 100644 index a7abf762d384..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/set_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 eventarc_v1_generated_Eventarc_SetIamPolicy_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/test_iam_permissions.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/test_iam_permissions.php deleted file mode 100644 index cf61f9b20151..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/test_iam_permissions.php +++ /dev/null @@ -1,80 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 eventarc_v1_generated_Eventarc_TestIamPermissions_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_channel.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_channel.php deleted file mode 100644 index 53bd582aaf80..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_channel.php +++ /dev/null @@ -1,78 +0,0 @@ -updateChannel($validateOnly); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Channel $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $validateOnly = false; - - update_channel_sample($validateOnly); -} -// [END eventarc_v1_generated_Eventarc_UpdateChannel_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_google_channel_config.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_google_channel_config.php deleted file mode 100644 index 30fd8ab25010..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_google_channel_config.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($googleChannelConfigName); - - // Call the API and handle any network failures. - try { - /** @var GoogleChannelConfig $response */ - $response = $eventarcClient->updateGoogleChannelConfig($googleChannelConfig); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $googleChannelConfigName = '[NAME]'; - - update_google_channel_config_sample($googleChannelConfigName); -} -// [END eventarc_v1_generated_Eventarc_UpdateGoogleChannelConfig_sync] diff --git a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_trigger.php b/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_trigger.php deleted file mode 100644 index 156e628a5607..000000000000 --- a/owl-bot-staging/Eventarc/v1/samples/V1/EventarcClient/update_trigger.php +++ /dev/null @@ -1,78 +0,0 @@ -updateTrigger($validateOnly); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Trigger $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $validateOnly = false; - - update_trigger_sample($validateOnly); -} -// [END eventarc_v1_generated_Eventarc_UpdateTrigger_sync] diff --git a/owl-bot-staging/Eventarc/v1/src/V1/EventarcClient.php b/owl-bot-staging/Eventarc/v1/src/V1/EventarcClient.php deleted file mode 100644 index 8e718fa04749..000000000000 --- a/owl-bot-staging/Eventarc/v1/src/V1/EventarcClient.php +++ /dev/null @@ -1,34 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $channel = new Channel(); - * $channelId = 'channel_id'; - * $validateOnly = false; - * $operationResponse = $eventarcClient->createChannel($formattedParent, $channel, $channelId, $validateOnly); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $eventarcClient->createChannel($formattedParent, $channel, $channelId, $validateOnly); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'createChannel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $eventarcClient->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. - */ -class EventarcGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.eventarc.v1.Eventarc'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'eventarc.googleapis.com'; - - /** 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 $channelNameTemplate; - - private static $channelConnectionNameTemplate; - - private static $cryptoKeyNameTemplate; - - private static $googleChannelConfigNameTemplate; - - private static $locationNameTemplate; - - private static $providerNameTemplate; - - private static $serviceAccountNameTemplate; - - private static $triggerNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/eventarc_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/eventarc_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/eventarc_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/eventarc_rest_client_config.php', - ], - ], - ]; - } - - private static function getChannelNameTemplate() - { - if (self::$channelNameTemplate == null) { - self::$channelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/channels/{channel}'); - } - - return self::$channelNameTemplate; - } - - private static function getChannelConnectionNameTemplate() - { - if (self::$channelConnectionNameTemplate == null) { - self::$channelConnectionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/channelConnections/{channel_connection}'); - } - - return self::$channelConnectionNameTemplate; - } - - private static function getCryptoKeyNameTemplate() - { - if (self::$cryptoKeyNameTemplate == null) { - self::$cryptoKeyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}'); - } - - return self::$cryptoKeyNameTemplate; - } - - private static function getGoogleChannelConfigNameTemplate() - { - if (self::$googleChannelConfigNameTemplate == null) { - self::$googleChannelConfigNameTemplate = new PathTemplate('projects/{project}/locations/{location}/googleChannelConfig'); - } - - return self::$googleChannelConfigNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getProviderNameTemplate() - { - if (self::$providerNameTemplate == null) { - self::$providerNameTemplate = new PathTemplate('projects/{project}/locations/{location}/providers/{provider}'); - } - - return self::$providerNameTemplate; - } - - private static function getServiceAccountNameTemplate() - { - if (self::$serviceAccountNameTemplate == null) { - self::$serviceAccountNameTemplate = new PathTemplate('projects/{project}/serviceAccounts/{service_account}'); - } - - return self::$serviceAccountNameTemplate; - } - - private static function getTriggerNameTemplate() - { - if (self::$triggerNameTemplate == null) { - self::$triggerNameTemplate = new PathTemplate('projects/{project}/locations/{location}/triggers/{trigger}'); - } - - return self::$triggerNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'channel' => self::getChannelNameTemplate(), - 'channelConnection' => self::getChannelConnectionNameTemplate(), - 'cryptoKey' => self::getCryptoKeyNameTemplate(), - 'googleChannelConfig' => self::getGoogleChannelConfigNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'provider' => self::getProviderNameTemplate(), - 'serviceAccount' => self::getServiceAccountNameTemplate(), - 'trigger' => self::getTriggerNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a channel - * resource. - * - * @param string $project - * @param string $location - * @param string $channel - * - * @return string The formatted channel resource. - */ - public static function channelName($project, $location, $channel) - { - return self::getChannelNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'channel' => $channel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * channel_connection resource. - * - * @param string $project - * @param string $location - * @param string $channelConnection - * - * @return string The formatted channel_connection resource. - */ - public static function channelConnectionName($project, $location, $channelConnection) - { - return self::getChannelConnectionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'channel_connection' => $channelConnection, - ]); - } - - /** - * 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($project, $location, $keyRing, $cryptoKey) - { - return self::getCryptoKeyNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * google_channel_config resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted google_channel_config resource. - */ - public static function googleChannelConfigName($project, $location) - { - return self::getGoogleChannelConfigNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * 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($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a provider - * resource. - * - * @param string $project - * @param string $location - * @param string $provider - * - * @return string The formatted provider resource. - */ - public static function providerName($project, $location, $provider) - { - return self::getProviderNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'provider' => $provider, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * service_account resource. - * - * @param string $project - * @param string $serviceAccount - * - * @return string The formatted service_account resource. - */ - public static function serviceAccountName($project, $serviceAccount) - { - return self::getServiceAccountNameTemplate()->render([ - 'project' => $project, - 'service_account' => $serviceAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a trigger - * resource. - * - * @param string $project - * @param string $location - * @param string $trigger - * - * @return string The formatted trigger resource. - */ - public static function triggerName($project, $location, $trigger) - { - return self::getTriggerNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'trigger' => $trigger, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - channel: projects/{project}/locations/{location}/channels/{channel} - * - channelConnection: projects/{project}/locations/{location}/channelConnections/{channel_connection} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - googleChannelConfig: projects/{project}/locations/{location}/googleChannelConfig - * - location: projects/{project}/locations/{location} - * - provider: projects/{project}/locations/{location}/providers/{provider} - * - serviceAccount: projects/{project}/serviceAccounts/{service_account} - * - trigger: projects/{project}/locations/{location}/triggers/{trigger} - * - * 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"); - } - - /** - * 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; - } - - /** - * 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 'eventarc.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Create a new channel in a particular project and location. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $formattedParent = $eventarcClient->locationName('[PROJECT]', '[LOCATION]'); - * $channel = new Channel(); - * $channelId = 'channel_id'; - * $validateOnly = false; - * $operationResponse = $eventarcClient->createChannel($formattedParent, $channel, $channelId, $validateOnly); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $eventarcClient->createChannel($formattedParent, $channel, $channelId, $validateOnly); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'createChannel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent collection in which to add this channel. - * @param Channel $channel Required. The channel to create. - * @param string $channelId Required. The user-provided ID to be assigned to the channel. - * @param bool $validateOnly Required. If set, validate the request and preview the review, but do not - * post it. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createChannel($parent, $channel, $channelId, $validateOnly, array $optionalArgs = []) - { - $request = new CreateChannelRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setChannel($channel); - $request->setChannelId($channelId); - $request->setValidateOnly($validateOnly); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Create a new ChannelConnection in a particular project and location. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $formattedParent = $eventarcClient->locationName('[PROJECT]', '[LOCATION]'); - * $channelConnection = new ChannelConnection(); - * $channelConnectionId = 'channel_connection_id'; - * $operationResponse = $eventarcClient->createChannelConnection($formattedParent, $channelConnection, $channelConnectionId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $eventarcClient->createChannelConnection($formattedParent, $channelConnection, $channelConnectionId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'createChannelConnection'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent collection in which to add this channel connection. - * @param ChannelConnection $channelConnection Required. Channel connection to create. - * @param string $channelConnectionId Required. The user-provided ID to be assigned to the channel connection. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createChannelConnection($parent, $channelConnection, $channelConnectionId, array $optionalArgs = []) - { - $request = new CreateChannelConnectionRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setChannelConnection($channelConnection); - $request->setChannelConnectionId($channelConnectionId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateChannelConnection', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Create a new trigger in a particular project and location. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $formattedParent = $eventarcClient->locationName('[PROJECT]', '[LOCATION]'); - * $trigger = new Trigger(); - * $triggerId = 'trigger_id'; - * $validateOnly = false; - * $operationResponse = $eventarcClient->createTrigger($formattedParent, $trigger, $triggerId, $validateOnly); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $eventarcClient->createTrigger($formattedParent, $trigger, $triggerId, $validateOnly); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'createTrigger'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent collection in which to add this trigger. - * @param Trigger $trigger Required. The trigger to create. - * @param string $triggerId Required. The user-provided ID to be assigned to the trigger. - * @param bool $validateOnly Required. If set, validate the request and preview the review, but do not - * post it. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createTrigger($parent, $trigger, $triggerId, $validateOnly, array $optionalArgs = []) - { - $request = new CreateTriggerRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTrigger($trigger); - $request->setTriggerId($triggerId); - $request->setValidateOnly($validateOnly); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateTrigger', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Delete a single channel. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $formattedName = $eventarcClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - * $validateOnly = false; - * $operationResponse = $eventarcClient->deleteChannel($formattedName, $validateOnly); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $eventarcClient->deleteChannel($formattedName, $validateOnly); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'deleteChannel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the channel to be deleted. - * @param bool $validateOnly Required. If set, validate the request and preview the review, but do not - * post it. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteChannel($name, $validateOnly, array $optionalArgs = []) - { - $request = new DeleteChannelRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setValidateOnly($validateOnly); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Delete a single ChannelConnection. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $formattedName = $eventarcClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]'); - * $operationResponse = $eventarcClient->deleteChannelConnection($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $eventarcClient->deleteChannelConnection($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'deleteChannelConnection'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the channel connection to delete. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteChannelConnection($name, array $optionalArgs = []) - { - $request = new DeleteChannelConnectionRequest(); - $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->startOperationsCall('DeleteChannelConnection', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Delete a single trigger. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $formattedName = $eventarcClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); - * $validateOnly = false; - * $operationResponse = $eventarcClient->deleteTrigger($formattedName, $validateOnly); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $eventarcClient->deleteTrigger($formattedName, $validateOnly); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'deleteTrigger'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the trigger to be deleted. - * @param bool $validateOnly Required. If set, validate the request and preview the review, but do not - * post it. - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * If provided, the trigger will only be deleted if the etag matches the - * current etag on the resource. - * @type bool $allowMissing - * If set to true, and the trigger is not found, the request will succeed - * but no action will be taken on the server. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteTrigger($name, $validateOnly, array $optionalArgs = []) - { - $request = new DeleteTriggerRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setValidateOnly($validateOnly); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - if (isset($optionalArgs['allowMissing'])) { - $request->setAllowMissing($optionalArgs['allowMissing']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteTrigger', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Get a single Channel. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $formattedName = $eventarcClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - * $response = $eventarcClient->getChannel($formattedName); - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the channel to get. - * @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\Eventarc\V1\Channel - * - * @throws ApiException if the remote call fails - */ - public function getChannel($name, array $optionalArgs = []) - { - $request = new GetChannelRequest(); - $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('GetChannel', Channel::class, $optionalArgs, $request)->wait(); - } - - /** - * Get a single ChannelConnection. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $formattedName = $eventarcClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]'); - * $response = $eventarcClient->getChannelConnection($formattedName); - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the channel connection to get. - * @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\Eventarc\V1\ChannelConnection - * - * @throws ApiException if the remote call fails - */ - public function getChannelConnection($name, array $optionalArgs = []) - { - $request = new GetChannelConnectionRequest(); - $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('GetChannelConnection', ChannelConnection::class, $optionalArgs, $request)->wait(); - } - - /** - * Get a GoogleChannelConfig - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $formattedName = $eventarcClient->googleChannelConfigName('[PROJECT]', '[LOCATION]'); - * $response = $eventarcClient->getGoogleChannelConfig($formattedName); - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the config to get. - * @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\Eventarc\V1\GoogleChannelConfig - * - * @throws ApiException if the remote call fails - */ - public function getGoogleChannelConfig($name, array $optionalArgs = []) - { - $request = new GetGoogleChannelConfigRequest(); - $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('GetGoogleChannelConfig', GoogleChannelConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Get a single Provider. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $formattedName = $eventarcClient->providerName('[PROJECT]', '[LOCATION]', '[PROVIDER]'); - * $response = $eventarcClient->getProvider($formattedName); - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the provider to get. - * @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\Eventarc\V1\Provider - * - * @throws ApiException if the remote call fails - */ - public function getProvider($name, array $optionalArgs = []) - { - $request = new GetProviderRequest(); - $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('GetProvider', Provider::class, $optionalArgs, $request)->wait(); - } - - /** - * Get a single trigger. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $formattedName = $eventarcClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); - * $response = $eventarcClient->getTrigger($formattedName); - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the trigger to get. - * @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\Eventarc\V1\Trigger - * - * @throws ApiException if the remote call fails - */ - public function getTrigger($name, array $optionalArgs = []) - { - $request = new GetTriggerRequest(); - $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('GetTrigger', Trigger::class, $optionalArgs, $request)->wait(); - } - - /** - * List channel connections. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $formattedParent = $eventarcClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $eventarcClient->listChannelConnections($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $eventarcClient->listChannelConnections($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent collection from which to list channel connections. - * @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 listChannelConnections($parent, array $optionalArgs = []) - { - $request = new ListChannelConnectionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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('ListChannelConnections', $optionalArgs, ListChannelConnectionsResponse::class, $request); - } - - /** - * List channels. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $formattedParent = $eventarcClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $eventarcClient->listChannels($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $eventarcClient->listChannels($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent collection to list channels on. - * @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 $orderBy - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting order is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, channel_id`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listChannels($parent, array $optionalArgs = []) - { - $request = new ListChannelsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListChannels', $optionalArgs, ListChannelsResponse::class, $request); - } - - /** - * List providers. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $formattedParent = $eventarcClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $eventarcClient->listProviders($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $eventarcClient->listProviders($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent of the provider to get. - * @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 $orderBy - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting oder is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, _id`. - * @type string $filter - * The filter field that the list request will filter on. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listProviders($parent, array $optionalArgs = []) - { - $request = new ListProvidersRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListProviders', $optionalArgs, ListProvidersResponse::class, $request); - } - - /** - * List triggers. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $formattedParent = $eventarcClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $eventarcClient->listTriggers($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $eventarcClient->listTriggers($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent collection to list triggers on. - * @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 $orderBy - * The sorting order of the resources returned. Value should be a - * comma-separated list of fields. The default sorting order is ascending. To - * specify descending order for a field, append a `desc` suffix; for example: - * `name desc, trigger_id`. - * @type string $filter - * Filter field. Used to filter the Triggers to be listed. Possible filters - * are described in https://google.aip.dev/160. For example, using - * "?filter=destination:gke" would list only Triggers with a gke destination. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listTriggers($parent, array $optionalArgs = []) - { - $request = new ListTriggersRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListTriggers', $optionalArgs, ListTriggersResponse::class, $request); - } - - /** - * Update a single channel. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $validateOnly = false; - * $operationResponse = $eventarcClient->updateChannel($validateOnly); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $eventarcClient->updateChannel($validateOnly); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'updateChannel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param bool $validateOnly Required. If set, validate the request and preview the review, but do not - * post it. - * @param array $optionalArgs { - * Optional. - * - * @type Channel $channel - * The channel to be updated. - * @type FieldMask $updateMask - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateChannel($validateOnly, array $optionalArgs = []) - { - $request = new UpdateChannelRequest(); - $requestParamHeaders = []; - $request->setValidateOnly($validateOnly); - if (isset($optionalArgs['channel'])) { - $request->setChannel($optionalArgs['channel']); - } - - 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->startOperationsCall('UpdateChannel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Update a single GoogleChannelConfig - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $googleChannelConfig = new GoogleChannelConfig(); - * $response = $eventarcClient->updateGoogleChannelConfig($googleChannelConfig); - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param GoogleChannelConfig $googleChannelConfig Required. The config to be updated. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Eventarc\V1\GoogleChannelConfig - * - * @throws ApiException if the remote call fails - */ - public function updateGoogleChannelConfig($googleChannelConfig, array $optionalArgs = []) - { - $request = new UpdateGoogleChannelConfigRequest(); - $requestParamHeaders = []; - $request->setGoogleChannelConfig($googleChannelConfig); - $requestParamHeaders['google_channel_config.name'] = $googleChannelConfig->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('UpdateGoogleChannelConfig', GoogleChannelConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Update a single trigger. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $validateOnly = false; - * $operationResponse = $eventarcClient->updateTrigger($validateOnly); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $eventarcClient->updateTrigger($validateOnly); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $eventarcClient->resumeOperation($operationName, 'updateTrigger'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param bool $validateOnly Required. If set, validate the request and preview the review, but do not - * post it. - * @param array $optionalArgs { - * Optional. - * - * @type Trigger $trigger - * The trigger to be updated. - * @type FieldMask $updateMask - * The fields to be updated; only fields explicitly provided are updated. - * If no field mask is provided, all provided fields in the request are - * updated. To update all fields, provide a field mask of "*". - * @type bool $allowMissing - * If set to true, and the trigger is not found, a new trigger will be - * created. In this situation, `update_mask` is ignored. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateTrigger($validateOnly, array $optionalArgs = []) - { - $request = new UpdateTriggerRequest(); - $requestParamHeaders = []; - $request->setValidateOnly($validateOnly); - if (isset($optionalArgs['trigger'])) { - $request->setTrigger($optionalArgs['trigger']); - } - - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - if (isset($optionalArgs['allowMissing'])) { - $request->setAllowMissing($optionalArgs['allowMissing']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateTrigger', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $response = $eventarcClient->getLocation(); - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $eventarcClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $eventarcClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $resource = 'resource'; - * $response = $eventarcClient->getIamPolicy($resource); - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $eventarcClient->setIamPolicy($resource, $policy); - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - 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('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->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. - * - * Sample code: - * ``` - * $eventarcClient = new EventarcClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $eventarcClient->testIamPermissions($resource, $permissions); - * } finally { - * $eventarcClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @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\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } -} diff --git a/owl-bot-staging/Eventarc/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Eventarc/v1/src/V1/gapic_metadata.json deleted file mode 100644 index ac94c299f66f..000000000000 --- a/owl-bot-staging/Eventarc/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.eventarc.v1", - "libraryPackage": "Google\\Cloud\\Eventarc\\V1", - "services": { - "Eventarc": { - "clients": { - "grpc": { - "libraryClient": "EventarcGapicClient", - "rpcs": { - "CreateChannel": { - "methods": [ - "createChannel" - ] - }, - "CreateChannelConnection": { - "methods": [ - "createChannelConnection" - ] - }, - "CreateTrigger": { - "methods": [ - "createTrigger" - ] - }, - "DeleteChannel": { - "methods": [ - "deleteChannel" - ] - }, - "DeleteChannelConnection": { - "methods": [ - "deleteChannelConnection" - ] - }, - "DeleteTrigger": { - "methods": [ - "deleteTrigger" - ] - }, - "GetChannel": { - "methods": [ - "getChannel" - ] - }, - "GetChannelConnection": { - "methods": [ - "getChannelConnection" - ] - }, - "GetGoogleChannelConfig": { - "methods": [ - "getGoogleChannelConfig" - ] - }, - "GetProvider": { - "methods": [ - "getProvider" - ] - }, - "GetTrigger": { - "methods": [ - "getTrigger" - ] - }, - "ListChannelConnections": { - "methods": [ - "listChannelConnections" - ] - }, - "ListChannels": { - "methods": [ - "listChannels" - ] - }, - "ListProviders": { - "methods": [ - "listProviders" - ] - }, - "ListTriggers": { - "methods": [ - "listTriggers" - ] - }, - "UpdateChannel": { - "methods": [ - "updateChannel" - ] - }, - "UpdateGoogleChannelConfig": { - "methods": [ - "updateGoogleChannelConfig" - ] - }, - "UpdateTrigger": { - "methods": [ - "updateTrigger" - ] - }, - "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/Eventarc/v1/src/V1/resources/eventarc_client_config.json b/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_client_config.json deleted file mode 100644 index 31759d36a3b7..000000000000 --- a/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_client_config.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "interfaces": { - "google.cloud.eventarc.v1.Eventarc": { - "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": { - "CreateChannel": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateChannelConnection": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateTrigger": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteChannel": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteChannelConnection": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteTrigger": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetChannel": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetChannelConnection": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetGoogleChannelConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetProvider": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetTrigger": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListChannelConnections": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListChannels": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListProviders": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListTriggers": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateChannel": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateGoogleChannelConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateTrigger": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_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" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_descriptor_config.php b/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_descriptor_config.php deleted file mode 100644 index 6a9e66d1906a..000000000000 --- a/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_descriptor_config.php +++ /dev/null @@ -1,138 +0,0 @@ - [ - 'google.cloud.eventarc.v1.Eventarc' => [ - 'CreateChannel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Channel', - 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'CreateChannelConnection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Eventarc\V1\ChannelConnection', - 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'CreateTrigger' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Trigger', - 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteChannel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Channel', - 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteChannelConnection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Eventarc\V1\ChannelConnection', - 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteTrigger' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Trigger', - 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateChannel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Channel', - 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateTrigger' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Eventarc\V1\Trigger', - 'metadataReturnType' => '\Google\Cloud\Eventarc\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListChannelConnections' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getChannelConnections', - ], - ], - 'ListChannels' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getChannels', - ], - ], - 'ListProviders' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getProviders', - ], - ], - 'ListTriggers' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTriggers', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_rest_client_config.php b/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_rest_client_config.php deleted file mode 100644 index 1618910026c6..000000000000 --- a/owl-bot-staging/Eventarc/v1/src/V1/resources/eventarc_rest_client_config.php +++ /dev/null @@ -1,381 +0,0 @@ - [ - 'google.cloud.eventarc.v1.Eventarc' => [ - 'CreateChannel' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channels', - 'body' => 'channel', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'channel_id', - 'validate_only', - ], - ], - 'CreateChannelConnection' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channelConnections', - 'body' => 'channel_connection', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'channel_connection_id', - ], - ], - 'CreateTrigger' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/triggers', - 'body' => 'trigger', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'trigger_id', - 'validate_only', - ], - ], - 'DeleteChannel' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'validate_only', - ], - ], - 'DeleteChannelConnection' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channelConnections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTrigger' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/triggers/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'validate_only', - ], - ], - 'GetChannel' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetChannelConnection' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channelConnections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGoogleChannelConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/googleChannelConfig}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetProvider' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/providers/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTrigger' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/triggers/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListChannelConnections' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channelConnections', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListChannels' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channels', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListProviders' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/providers', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTriggers' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/triggers', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateChannel' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{channel.name=projects/*/locations/*/channels/*}', - 'body' => 'channel', - 'placeholders' => [ - 'channel.name' => [ - 'getters' => [ - 'getChannel', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'validate_only', - ], - ], - 'UpdateGoogleChannelConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{google_channel_config.name=projects/*/locations/*/googleChannelConfig}', - 'body' => 'google_channel_config', - 'placeholders' => [ - 'google_channel_config.name' => [ - 'getters' => [ - 'getGoogleChannelConfig', - 'getName', - ], - ], - ], - ], - 'UpdateTrigger' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{trigger.name=projects/*/locations/*/triggers/*}', - 'body' => 'trigger', - 'placeholders' => [ - 'trigger.name' => [ - 'getters' => [ - 'getTrigger', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'validate_only', - ], - ], - ], - '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.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/triggers/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/channels/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/channelConnections/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/triggers/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/channels/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/channelConnections/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/triggers/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/channels/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/channelConnections/*}: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/Eventarc/v1/tests/Unit/V1/EventarcClientTest.php b/owl-bot-staging/Eventarc/v1/tests/Unit/V1/EventarcClientTest.php deleted file mode 100644 index 02a2327e835e..000000000000 --- a/owl-bot-staging/Eventarc/v1/tests/Unit/V1/EventarcClientTest.php +++ /dev/null @@ -1,2136 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return EventarcClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new EventarcClient($options); - } - - /** @test */ - public function createChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $provider = 'provider-987494927'; - $pubsubTopic = 'pubsubTopic-338126829'; - $activationToken = 'activationToken1250030992'; - $cryptoKeyName = 'cryptoKeyName-184663511'; - $expectedResponse = new Channel(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setProvider($provider); - $expectedResponse->setPubsubTopic($pubsubTopic); - $expectedResponse->setActivationToken($activationToken); - $expectedResponse->setCryptoKeyName($cryptoKeyName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $channel = new Channel(); - $channelName = 'channelName273953326'; - $channel->setName($channelName); - $channelId = 'channelId-1930808873'; - $validateOnly = false; - $response = $gapicClient->createChannel($formattedParent, $channel, $channelId, $validateOnly); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/CreateChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getChannel(); - $this->assertProtobufEquals($channel, $actualValue); - $actualValue = $actualApiRequestObject->getChannelId(); - $this->assertProtobufEquals($channelId, $actualValue); - $actualValue = $actualApiRequestObject->getValidateOnly(); - $this->assertProtobufEquals($validateOnly, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createChannelTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $channel = new Channel(); - $channelName = 'channelName273953326'; - $channel->setName($channelName); - $channelId = 'channelId-1930808873'; - $validateOnly = false; - $response = $gapicClient->createChannel($formattedParent, $channel, $channelId, $validateOnly); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createChannelTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createChannelConnectionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createChannelConnectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $channel = 'channel738950403'; - $activationToken = 'activationToken1250030992'; - $expectedResponse = new ChannelConnection(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setChannel($channel); - $expectedResponse->setActivationToken($activationToken); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createChannelConnectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $channelConnection = new ChannelConnection(); - $channelConnectionName = 'channelConnectionName-46623124'; - $channelConnection->setName($channelConnectionName); - $channelConnectionChannel = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $channelConnection->setChannel($channelConnectionChannel); - $channelConnectionId = 'channelConnectionId-1611273248'; - $response = $gapicClient->createChannelConnection($formattedParent, $channelConnection, $channelConnectionId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/CreateChannelConnection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getChannelConnection(); - $this->assertProtobufEquals($channelConnection, $actualValue); - $actualValue = $actualApiRequestObject->getChannelConnectionId(); - $this->assertProtobufEquals($channelConnectionId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createChannelConnectionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createChannelConnectionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createChannelConnectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $channelConnection = new ChannelConnection(); - $channelConnectionName = 'channelConnectionName-46623124'; - $channelConnection->setName($channelConnectionName); - $channelConnectionChannel = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $channelConnection->setChannel($channelConnectionChannel); - $channelConnectionId = 'channelConnectionId-1611273248'; - $response = $gapicClient->createChannelConnection($formattedParent, $channelConnection, $channelConnectionId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createChannelConnectionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTriggerTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTriggerTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $serviceAccount = 'serviceAccount-1948028253'; - $channel = 'channel738950403'; - $etag = 'etag3123477'; - $expectedResponse = new Trigger(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setChannel($channel); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createTriggerTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $trigger = new Trigger(); - $triggerName = 'triggerName-681138077'; - $trigger->setName($triggerName); - $triggerEventFilters = []; - $trigger->setEventFilters($triggerEventFilters); - $triggerDestination = new Destination(); - $trigger->setDestination($triggerDestination); - $triggerId = 'triggerId1363517698'; - $validateOnly = false; - $response = $gapicClient->createTrigger($formattedParent, $trigger, $triggerId, $validateOnly); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/CreateTrigger', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTrigger(); - $this->assertProtobufEquals($trigger, $actualValue); - $actualValue = $actualApiRequestObject->getTriggerId(); - $this->assertProtobufEquals($triggerId, $actualValue); - $actualValue = $actualApiRequestObject->getValidateOnly(); - $this->assertProtobufEquals($validateOnly, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTriggerTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTriggerExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTriggerTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $trigger = new Trigger(); - $triggerName = 'triggerName-681138077'; - $trigger->setName($triggerName); - $triggerEventFilters = []; - $trigger->setEventFilters($triggerEventFilters); - $triggerDestination = new Destination(); - $trigger->setDestination($triggerDestination); - $triggerId = 'triggerId1363517698'; - $validateOnly = false; - $response = $gapicClient->createTrigger($formattedParent, $trigger, $triggerId, $validateOnly); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTriggerTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $provider = 'provider-987494927'; - $pubsubTopic = 'pubsubTopic-338126829'; - $activationToken = 'activationToken1250030992'; - $cryptoKeyName = 'cryptoKeyName-184663511'; - $expectedResponse = new Channel(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setProvider($provider); - $expectedResponse->setPubsubTopic($pubsubTopic); - $expectedResponse->setActivationToken($activationToken); - $expectedResponse->setCryptoKeyName($cryptoKeyName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $validateOnly = false; - $response = $gapicClient->deleteChannel($formattedName, $validateOnly); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeleteChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getValidateOnly(); - $this->assertProtobufEquals($validateOnly, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $validateOnly = false; - $response = $gapicClient->deleteChannel($formattedName, $validateOnly); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteChannelConnectionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteChannelConnectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $channel = 'channel738950403'; - $activationToken = 'activationToken1250030992'; - $expectedResponse = new ChannelConnection(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setChannel($channel); - $expectedResponse->setActivationToken($activationToken); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteChannelConnectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]'); - $response = $gapicClient->deleteChannelConnection($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeleteChannelConnection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteChannelConnectionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteChannelConnectionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteChannelConnectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]'); - $response = $gapicClient->deleteChannelConnection($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteChannelConnectionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTriggerTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTriggerTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $serviceAccount = 'serviceAccount-1948028253'; - $channel = 'channel738950403'; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Trigger(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setChannel($channel); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteTriggerTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); - $validateOnly = false; - $response = $gapicClient->deleteTrigger($formattedName, $validateOnly); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/DeleteTrigger', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getValidateOnly(); - $this->assertProtobufEquals($validateOnly, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTriggerTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTriggerExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTriggerTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); - $validateOnly = false; - $response = $gapicClient->deleteTrigger($formattedName, $validateOnly); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTriggerTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getChannelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $provider = 'provider-987494927'; - $pubsubTopic = 'pubsubTopic-338126829'; - $activationToken = 'activationToken1250030992'; - $cryptoKeyName = 'cryptoKeyName-184663511'; - $expectedResponse = new Channel(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setProvider($provider); - $expectedResponse->setPubsubTopic($pubsubTopic); - $expectedResponse->setActivationToken($activationToken); - $expectedResponse->setCryptoKeyName($cryptoKeyName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $response = $gapicClient->getChannel($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/GetChannel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getChannelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - try { - $gapicClient->getChannel($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 getChannelConnectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $channel = 'channel738950403'; - $activationToken = 'activationToken1250030992'; - $expectedResponse = new ChannelConnection(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setChannel($channel); - $expectedResponse->setActivationToken($activationToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]'); - $response = $gapicClient->getChannelConnection($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/GetChannelConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getChannelConnectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->channelConnectionName('[PROJECT]', '[LOCATION]', '[CHANNEL_CONNECTION]'); - try { - $gapicClient->getChannelConnection($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 getGoogleChannelConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $cryptoKeyName = 'cryptoKeyName-184663511'; - $expectedResponse = new GoogleChannelConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setCryptoKeyName($cryptoKeyName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->googleChannelConfigName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->getGoogleChannelConfig($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/GetGoogleChannelConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGoogleChannelConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->googleChannelConfigName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->getGoogleChannelConfig($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 getProviderTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Provider(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->providerName('[PROJECT]', '[LOCATION]', '[PROVIDER]'); - $response = $gapicClient->getProvider($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/GetProvider', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProviderExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->providerName('[PROJECT]', '[LOCATION]', '[PROVIDER]'); - try { - $gapicClient->getProvider($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 getTriggerTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $serviceAccount = 'serviceAccount-1948028253'; - $channel = 'channel738950403'; - $etag = 'etag3123477'; - $expectedResponse = new Trigger(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setChannel($channel); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); - $response = $gapicClient->getTrigger($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/GetTrigger', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTriggerExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->triggerName('[PROJECT]', '[LOCATION]', '[TRIGGER]'); - try { - $gapicClient->getTrigger($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 listChannelConnectionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $channelConnectionsElement = new ChannelConnection(); - $channelConnections = [ - $channelConnectionsElement, - ]; - $expectedResponse = new ListChannelConnectionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setChannelConnections($channelConnections); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listChannelConnections($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getChannelConnections()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListChannelConnections', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listChannelConnectionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listChannelConnections($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 listChannelsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $channelsElement = new Channel(); - $channels = [ - $channelsElement, - ]; - $expectedResponse = new ListChannelsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setChannels($channels); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listChannels($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getChannels()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListChannels', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listChannelsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listChannels($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 listProvidersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $providersElement = new Provider(); - $providers = [ - $providersElement, - ]; - $expectedResponse = new ListProvidersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProviders($providers); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listProviders($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProviders()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListProviders', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProvidersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listProviders($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 listTriggersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $triggersElement = new Trigger(); - $triggers = [ - $triggersElement, - ]; - $expectedResponse = new ListTriggersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTriggers($triggers); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listTriggers($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTriggers()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/ListTriggers', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTriggersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listTriggers($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 updateChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $provider = 'provider-987494927'; - $pubsubTopic = 'pubsubTopic-338126829'; - $activationToken = 'activationToken1250030992'; - $cryptoKeyName = 'cryptoKeyName-184663511'; - $expectedResponse = new Channel(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setProvider($provider); - $expectedResponse->setPubsubTopic($pubsubTopic); - $expectedResponse->setActivationToken($activationToken); - $expectedResponse->setCryptoKeyName($cryptoKeyName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $validateOnly = false; - $response = $gapicClient->updateChannel($validateOnly); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/UpdateChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getValidateOnly(); - $this->assertProtobufEquals($validateOnly, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateChannelTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $validateOnly = false; - $response = $gapicClient->updateChannel($validateOnly); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateChannelTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGoogleChannelConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $cryptoKeyName = 'cryptoKeyName-184663511'; - $expectedResponse = new GoogleChannelConfig(); - $expectedResponse->setName($name); - $expectedResponse->setCryptoKeyName($cryptoKeyName); - $transport->addResponse($expectedResponse); - // Mock request - $googleChannelConfig = new GoogleChannelConfig(); - $googleChannelConfigName = 'googleChannelConfigName-13357801'; - $googleChannelConfig->setName($googleChannelConfigName); - $response = $gapicClient->updateGoogleChannelConfig($googleChannelConfig); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/UpdateGoogleChannelConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getGoogleChannelConfig(); - $this->assertProtobufEquals($googleChannelConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGoogleChannelConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $googleChannelConfig = new GoogleChannelConfig(); - $googleChannelConfigName = 'googleChannelConfigName-13357801'; - $googleChannelConfig->setName($googleChannelConfigName); - try { - $gapicClient->updateGoogleChannelConfig($googleChannelConfig); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTriggerTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTriggerTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $serviceAccount = 'serviceAccount-1948028253'; - $channel = 'channel738950403'; - $etag = 'etag3123477'; - $expectedResponse = new Trigger(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setChannel($channel); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateTriggerTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $validateOnly = false; - $response = $gapicClient->updateTrigger($validateOnly); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.v1.Eventarc/UpdateTrigger', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getValidateOnly(); - $this->assertProtobufEquals($validateOnly, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTriggerTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateTriggerExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTriggerTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $validateOnly = false; - $response = $gapicClient->updateTrigger($validateOnly); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTriggerTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->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); - $response = $gapicClient->getLocation(); - $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); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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); - $response = $gapicClient->listLocations(); - $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); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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'; - $response = $gapicClient->getIamPolicy($resource); - $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'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $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(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $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 = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->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/EventarcPublishing/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/Publishing/V1/Publisher.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/Publishing/V1/Publisher.php deleted file mode 100644 index 4a26e15a5f22..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/proto/src/GPBMetadata/Google/Cloud/Eventarc/Publishing/V1/Publisher.php +++ /dev/null @@ -1,44 +0,0 @@ -internalAddGeneratedFile( - ' -’ - -3google/cloud/eventarc/publishing/v1/publisher.proto#google.cloud.eventarc.publishing.v1google/api/client.protogoogle/protobuf/any.proto"~ -%PublishChannelConnectionEventsRequest -channel_connection ( $ -events ( 2.google.protobuf.Any - text_events ( "( -&PublishChannelConnectionEventsResponse"b -PublishEventsRequest -channel ( $ -events ( 2.google.protobuf.Any - text_events ( " -PublishEventsResponse2Ð - Publisher˜ -PublishChannelConnectionEventsJ.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequestK.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse"]‚Óä“W"R/v1/{channel_connection=projects/*/locations/*/channelConnections/*}:publishEvents:*Ð - PublishEvents9.google.cloud.eventarc.publishing.v1.PublishEventsRequest:.google.cloud.eventarc.publishing.v1.PublishEventsResponse"H‚Óä“B"=/v1/{channel=projects/*/locations/*/channels/*}:publishEvents:*UÊA!eventarcpublishing.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÿ -\'com.google.cloud.eventarc.publishing.v1BPublisherProtoPZLgoogle.golang.org/genproto/googleapis/cloud/eventarc/publishing/v1;publisherª#Google.Cloud.Eventarc.Publishing.V1Ê#Google\\Cloud\\Eventarc\\Publishing\\V1ê\'Google::Cloud::Eventarc::Publishing::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsRequest.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsRequest.php deleted file mode 100644 index 79180267cebb..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - */ -class PublishChannelConnectionEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The channel_connection that the events are published from. For example: - * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. - * - * Generated from protobuf field string channel_connection = 1; - */ - protected $channel_connection = ''; - /** - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * - * Generated from protobuf field repeated .google.protobuf.Any events = 2; - */ - private $events; - /** - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * - * Generated from protobuf field repeated string text_events = 3; - */ - private $text_events; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $channel_connection - * The channel_connection that the events are published from. For example: - * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. - * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $events - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * @type array|\Google\Protobuf\Internal\RepeatedField $text_events - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\Publisher::initOnce(); - parent::__construct($data); - } - - /** - * The channel_connection that the events are published from. For example: - * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. - * - * Generated from protobuf field string channel_connection = 1; - * @return string - */ - public function getChannelConnection() - { - return $this->channel_connection; - } - - /** - * The channel_connection that the events are published from. For example: - * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. - * - * Generated from protobuf field string channel_connection = 1; - * @param string $var - * @return $this - */ - public function setChannelConnection($var) - { - GPBUtil::checkString($var, True); - $this->channel_connection = $var; - - return $this; - } - - /** - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * - * Generated from protobuf field repeated .google.protobuf.Any events = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEvents() - { - return $this->events; - } - - /** - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * - * Generated from protobuf field repeated .google.protobuf.Any events = 2; - * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); - $this->events = $arr; - - return $this; - } - - /** - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * - * Generated from protobuf field repeated string text_events = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTextEvents() - { - return $this->text_events; - } - - /** - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * - * Generated from protobuf field repeated string text_events = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTextEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->text_events = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsResponse.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsResponse.php deleted file mode 100644 index 6a7494facfc6..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishChannelConnectionEventsResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - */ -class PublishChannelConnectionEventsResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\Publisher::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsRequest.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsRequest.php deleted file mode 100644 index f5c6a6cfa164..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.eventarc.publishing.v1.PublishEventsRequest - */ -class PublishEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The full name of the channel to publish to. For example: - * `projects/{project}/locations/{location}/channels/{channel-id}`. - * - * Generated from protobuf field string channel = 1; - */ - protected $channel = ''; - /** - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * - * Generated from protobuf field repeated .google.protobuf.Any events = 2; - */ - private $events; - /** - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * - * Generated from protobuf field repeated string text_events = 3; - */ - private $text_events; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $channel - * The full name of the channel to publish to. For example: - * `projects/{project}/locations/{location}/channels/{channel-id}`. - * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $events - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * @type array|\Google\Protobuf\Internal\RepeatedField $text_events - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\Publisher::initOnce(); - parent::__construct($data); - } - - /** - * The full name of the channel to publish to. For example: - * `projects/{project}/locations/{location}/channels/{channel-id}`. - * - * Generated from protobuf field string channel = 1; - * @return string - */ - public function getChannel() - { - return $this->channel; - } - - /** - * The full name of the channel to publish to. For example: - * `projects/{project}/locations/{location}/channels/{channel-id}`. - * - * Generated from protobuf field string channel = 1; - * @param string $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkString($var, True); - $this->channel = $var; - - return $this; - } - - /** - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * - * Generated from protobuf field repeated .google.protobuf.Any events = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEvents() - { - return $this->events; - } - - /** - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * - * Generated from protobuf field repeated .google.protobuf.Any events = 2; - * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); - $this->events = $arr; - - return $this; - } - - /** - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * - * Generated from protobuf field repeated string text_events = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTextEvents() - { - return $this->text_events; - } - - /** - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * - * Generated from protobuf field repeated string text_events = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTextEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->text_events = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsResponse.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsResponse.php deleted file mode 100644 index 4291ac3bfd78..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublishEventsResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.eventarc.publishing.v1.PublishEventsResponse - */ -class PublishEventsResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Eventarc\Publishing\V1\Publisher::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublisherGrpcClient.php b/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublisherGrpcClient.php deleted file mode 100644 index 53e8b7edf935..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/proto/src/Google/Cloud/Eventarc/Publishing/V1/PublisherGrpcClient.php +++ /dev/null @@ -1,87 +0,0 @@ -_simpleRequest('/google.cloud.eventarc.publishing.v1.Publisher/PublishChannelConnectionEvents', - $argument, - ['\Google\Cloud\Eventarc\Publishing\V1\PublishChannelConnectionEventsResponse', 'decode'], - $metadata, $options); - } - - /** - * Publish events to a subscriber's channel. - * @param \Google\Cloud\Eventarc\Publishing\V1\PublishEventsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function PublishEvents(\Google\Cloud\Eventarc\Publishing\V1\PublishEventsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.eventarc.publishing.v1.Publisher/PublishEvents', - $argument, - ['\Google\Cloud\Eventarc\Publishing\V1\PublishEventsResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_channel_connection_events.php b/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_channel_connection_events.php deleted file mode 100644 index de210004e194..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_channel_connection_events.php +++ /dev/null @@ -1,53 +0,0 @@ -publishChannelConnectionEvents(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_sync] diff --git a/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_events.php b/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_events.php deleted file mode 100644 index 6614c3628059..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/samples/V1/PublisherClient/publish_events.php +++ /dev/null @@ -1,53 +0,0 @@ -publishEvents(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END eventarcpublishing_v1_generated_Publisher_PublishEvents_sync] diff --git a/owl-bot-staging/EventarcPublishing/v1/src/V1/Gapic/PublisherGapicClient.php b/owl-bot-staging/EventarcPublishing/v1/src/V1/Gapic/PublisherGapicClient.php deleted file mode 100644 index 3e9d13f147be..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/src/V1/Gapic/PublisherGapicClient.php +++ /dev/null @@ -1,298 +0,0 @@ -publishChannelConnectionEvents(); - * } finally { - * $publisherClient->close(); - * } - * ``` - */ -class PublisherGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.eventarc.publishing.v1.Publisher'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'eventarcpublishing.googleapis.com'; - - /** 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/publisher_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/publisher_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/publisher_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/publisher_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 'eventarcpublishing.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); - } - - /** - * Publish events to a ChannelConnection in a partner's project. - * - * Sample code: - * ``` - * $publisherClient = new PublisherClient(); - * try { - * $response = $publisherClient->publishChannelConnectionEvents(); - * } finally { - * $publisherClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $channelConnection - * The channel_connection that the events are published from. For example: - * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. - * @type Any[] $events - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * @type string[] $textEvents - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Eventarc\Publishing\V1\PublishChannelConnectionEventsResponse - * - * @throws ApiException if the remote call fails - */ - public function publishChannelConnectionEvents(array $optionalArgs = []) - { - $request = new PublishChannelConnectionEventsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['channelConnection'])) { - $request->setChannelConnection($optionalArgs['channelConnection']); - $requestParamHeaders['channel_connection'] = $optionalArgs['channelConnection']; - } - - if (isset($optionalArgs['events'])) { - $request->setEvents($optionalArgs['events']); - } - - if (isset($optionalArgs['textEvents'])) { - $request->setTextEvents($optionalArgs['textEvents']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('PublishChannelConnectionEvents', PublishChannelConnectionEventsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Publish events to a subscriber's channel. - * - * Sample code: - * ``` - * $publisherClient = new PublisherClient(); - * try { - * $response = $publisherClient->publishEvents(); - * } finally { - * $publisherClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $channel - * The full name of the channel to publish to. For example: - * `projects/{project}/locations/{location}/channels/{channel-id}`. - * @type Any[] $events - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * @type string[] $textEvents - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Eventarc\Publishing\V1\PublishEventsResponse - * - * @throws ApiException if the remote call fails - */ - public function publishEvents(array $optionalArgs = []) - { - $request = new PublishEventsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['channel'])) { - $request->setChannel($optionalArgs['channel']); - $requestParamHeaders['channel'] = $optionalArgs['channel']; - } - - if (isset($optionalArgs['events'])) { - $request->setEvents($optionalArgs['events']); - } - - if (isset($optionalArgs['textEvents'])) { - $request->setTextEvents($optionalArgs['textEvents']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('PublishEvents', PublishEventsResponse::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/EventarcPublishing/v1/src/V1/PublisherClient.php b/owl-bot-staging/EventarcPublishing/v1/src/V1/PublisherClient.php deleted file mode 100644 index c5d913b397f5..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/src/V1/PublisherClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.eventarc.publishing.v1.Publisher' => [], - ], -]; diff --git a/owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_rest_client_config.php b/owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_rest_client_config.php deleted file mode 100644 index 2c4ad8b6ef1c..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/src/V1/resources/publisher_rest_client_config.php +++ /dev/null @@ -1,33 +0,0 @@ - [ - 'google.cloud.eventarc.publishing.v1.Publisher' => [ - 'PublishChannelConnectionEvents' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{channel_connection=projects/*/locations/*/channelConnections/*}:publishEvents', - 'body' => '*', - 'placeholders' => [ - 'channel_connection' => [ - 'getters' => [ - 'getChannelConnection', - ], - ], - ], - ], - 'PublishEvents' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{channel=projects/*/locations/*/channels/*}:publishEvents', - 'body' => '*', - 'placeholders' => [ - 'channel' => [ - 'getters' => [ - 'getChannel', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/EventarcPublishing/v1/tests/Unit/V1/PublisherClientTest.php b/owl-bot-staging/EventarcPublishing/v1/tests/Unit/V1/PublisherClientTest.php deleted file mode 100644 index 22b9275862a8..000000000000 --- a/owl-bot-staging/EventarcPublishing/v1/tests/Unit/V1/PublisherClientTest.php +++ /dev/null @@ -1,166 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return PublisherClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new PublisherClient($options); - } - - /** @test */ - public function publishChannelConnectionEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new PublishChannelConnectionEventsResponse(); - $transport->addResponse($expectedResponse); - $response = $gapicClient->publishChannelConnectionEvents(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.publishing.v1.Publisher/PublishChannelConnectionEvents', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function publishChannelConnectionEventsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->publishChannelConnectionEvents(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function publishEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new PublishEventsResponse(); - $transport->addResponse($expectedResponse); - $response = $gapicClient->publishEvents(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.eventarc.publishing.v1.Publisher/PublishEvents', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function publishEventsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->publishEvents(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->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/Filestore/v1/proto/src/GPBMetadata/Google/Cloud/Filestore/V1/CloudFilestoreService.php b/owl-bot-staging/Filestore/v1/proto/src/GPBMetadata/Google/Cloud/Filestore/V1/CloudFilestoreService.php deleted file mode 100644 index 3bcf86f83f205c2d739d1425ab80e8ffb72bc1c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8126 zcmd5>O>7&-6%MH%i$hzc$5u?sPO@IRu&h{Q#M-JuTMm{#mWW8AO41G-5Lhh95w$h7 zyV+e@Q4FC#dnkG=a%j;@dTev-t;b${Ob$hTGKvC4(_4X}fPn&i^Rvq(C9O!ghx%e_ z_syI4`+aYA?tf%$Tj-j!LJVSSE@?@PJ;~iBl4YB&*)%&+qr0_5Y^iDPSbB%pDM>1n zrHyh;Di%t$tFY8DyLOXgrM79dJ0#ugnB7)-3uGPFv`PBeB7da%k5q@)&-5lqu{{tn zv>oDDT9ZgCo4Ix3YAwyx>MKlLJx|ruAA0KQj~DMD)a+=EBe7Thn<`g|o+AnVS=~lQ zZ%U4{i!ky1HpdbV1o@lDV4_*GXlsTPDP0 zS@O)=q+x;()k}s;Y(wkR3&d&Kx&^*(f@n6|Caxb``eg2=*p{l(x1>34V>Wxh$Ysg3 zyCk@~B-zC6+QvO*H&w9j|EeDnJjK%MieZ>E3Z~&?vpt`BDvny1@94yEM_cnyC!JP~ zY-`VS(;jVUg@{5L+DKj+d2?sSH0ouG)-QPJ70~dzubD>M?iz+}w0mks2$o+1%=>lC zc{=>w{@R)jP2g%f)(O^rVrv$-e}u`bWEURjqCk~a%dbb;Jac{p(R#XpUM-;?oUoPg zCB87lFd*eOeCpZa>_wqdvvj}%T3NjPXWt9F*rMg5Hbngh0iiTaSK6XT#H(9zL`42$1f8WdRo&KXB78fI#woxH z$Ihd8QvPOj!a=X@+U2 zUA@K9J%+s}ZFn+4LoTl(6xjYUx~SyyN9VXwR0?W&W9>;If~OH;e|}Oa)ryIzyn#?) zZ_rfz;UlHGdRVn!G`&$)E9G)cqN$PrPzcluaSs#^t4|CS1dYKc z7SNu>J%*Rj1f@~JyqnJ43`v8hJ5{9%xX#OHnlA4`E+L^Bw8#;Qy1s`Z7FJaa_saxfP?);e9Dj@bni4|)_wV^7JR0FX0i;u)3XiO)vwMq~p`uw3F9 zbgo)cYJ(tk8cpS)WNW336)3nEnxOUjBoU?PRVi*Nr3!sB2F6bnifctCH%{e>l}fpi znB;QRTA9h6l65rBQgs0(YNcXj01`n97_m`MDh1drj!tb>itD9E>wLeQQZ41x)j|RG zgYEgB)oLLzj-fkNODn5tHLt7{Rr+iqtA3}{>*&g180eJ^z7Hk%Bhqx8^mFlRKix5# zeB?_%_kQlDb6Q6e;YwFc~;(@!V3AU3!@1B5KUT8LWavDpS$@=iN02@p{t%o zM--J0%WGm+oJ4VN2NfWPqC8`lD2C$l-T=4JPP!ISnx09trJ{gYc!jv$GtbOSA4FVd zM!p*!GWo}7=8*-b3^J%JjpAMQf)PG*{IFj42R(cz;16|kIDh2dMbO(7en1*D;ROER ziwO04J{ax;%t~WE46_CZ@nbYoARTfrSSPSl{&fUhSkoOpi;kDZH>frsXA3Y}b>M8r zoS%SRLhO-iJ|zY#v=}8p({2%4ZS09DXc|pI*x=m8Xd@=?qnQEQ91D(31b{52d(Fe> zf4DS5Ud|fib5{-6!g_&{Sl58AYi?_e4q;PXO#bHtn&gws(7bog<2^nx)Nh0|6IUIi zy#Z#Uqv2uIKEQ0tK10!|F`ijCe$OD912zOFKuWY@oHA#DF5uWqQ`y*afx9Txig#Ib zR*Z;VBE*n*^|f+Lx6?UTtPM0tj5Y!caTf;E0?9)?Ab2|hYx`3~%iJ|OrUqvi=0LpX zzyU6#6nR**-;4_%jl_j8%RMY@C~KupDFa4(+&Dmn*(cvAkHbcBe0Nw9YOv8AD2V^q zmwyvM=Q#o8*sK2mAS|ItuAQMlJahHf3S|U?-$pUMj*=EfN=7^@=sZWjehWY7V;-3? zPw0U~{wes%iKkyv&tQ7|8{S}O;2>Rb0y;RF`gFy4w15)8qx}|)?#r(t2vfA=dj79) zd>5VXvrM3P2Ayi~>Ju1#d|ix&;F-T*7^dh4%ZD(5v(KOFngMubw-gODm7Sil{YAN=IozkV4_;|2N=_BkKsmiKFCwe8&rH;KNYL|DGuS zBEn4kP#!IeS%1)dsa)owu%1@e)mtXp?>#^ z4(a!o-0xgwiItCMdurGm1p{!wTYW2lS10oP&+v(9U~ATBPo|W$~ z*N65P4&3z4BO94Nk#DactNo*PXjc10hxBZp_uD)#=3zY({q{n6fM!I60*@3p|9%-kF`p@M*!M(V$}{wM zYLT-n6P|5hnGlAhd${+v2s#}cns8WPf`XoX$6(&ic<M!oTu@A zCd2BV=OGlpxrhU$*2^a55Bs5e)I`p%yim^5^Oxvg@1xN-N^0A6Ehn2!@9ypnyi99d zcbi`yFIXMT-7@W++#e$79U#V|ksvqQKZA*z;Y|uyn~_g*0>Ij42W~`Crrl1riNWA3 z&0kU54!Os^N6lvd|8?}z3cH?8v7J)>xR-jo_`-Wv7kAfz%WJs3ZcMVBzJJ5NcDu!| Zc>}k?^joyvJmf~0N%EW9eYB6ze*v8Wa7X|E diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup.php deleted file mode 100644 index 17f8fa60971d..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup.php +++ /dev/null @@ -1,524 +0,0 @@ -google.cloud.filestore.v1.Backup - */ -class Backup extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * A description of the backup with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Output only. The backup state. - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time when the backup was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - /** - * Output only. Capacity of the source file share when the backup was created. - * - * Generated from protobuf field int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $capacity_gb = 0; - /** - * Output only. The size of the storage used by the backup. As backups share - * storage, this number is expected to change with backup creation/deletion. - * - * Generated from protobuf field int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $storage_bytes = 0; - /** - * The resource name of the source Cloud Filestore instance, in the format - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, - * used to create this backup. - * - * Generated from protobuf field string source_instance = 8 [(.google.api.resource_reference) = { - */ - protected $source_instance = ''; - /** - * Name of the file share in the source Cloud Filestore instance that the - * backup is created from. - * - * Generated from protobuf field string source_file_share = 9; - */ - protected $source_file_share = ''; - /** - * Output only. The service tier of the source Cloud Filestore instance that - * this backup is created from. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_instance_tier = 0; - /** - * Output only. Amount of bytes that will be downloaded if the backup is - * restored. This may be different than storage bytes, since sequential - * backups of the same disk will share storage. - * - * Generated from protobuf field int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $download_bytes = 0; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - * @type string $description - * A description of the backup with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * @type int $state - * Output only. The backup state. - * @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 $capacity_gb - * Output only. Capacity of the source file share when the backup was created. - * @type int|string $storage_bytes - * Output only. The size of the storage used by the backup. As backups share - * storage, this number is expected to change with backup creation/deletion. - * @type string $source_instance - * The resource name of the source Cloud Filestore instance, in the format - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, - * used to create this backup. - * @type string $source_file_share - * Name of the file share in the source Cloud Filestore instance that the - * backup is created from. - * @type int $source_instance_tier - * Output only. The service tier of the source Cloud Filestore instance that - * this backup is created from. - * @type int|string $download_bytes - * Output only. Amount of bytes that will be downloaded if the backup is - * restored. This may be different than storage bytes, since sequential - * backups of the same disk will share storage. - * @type \Google\Protobuf\BoolValue $satisfies_pzs - * Output only. Reserved for future use. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_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 resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_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; - } - - /** - * A description of the backup with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * - * Generated from protobuf field string description = 2; - * @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 = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The backup state. - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup.State state = 3 [(.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.filestore.v1.Backup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\Backup\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time when the backup 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 when the backup 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; - } - - /** - * 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; - } - - /** - * Output only. Capacity of the source file share when the backup was created. - * - * Generated from protobuf field int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getCapacityGb() - { - return $this->capacity_gb; - } - - /** - * Output only. Capacity of the source file share when the backup was created. - * - * Generated from protobuf field int64 capacity_gb = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setCapacityGb($var) - { - GPBUtil::checkInt64($var); - $this->capacity_gb = $var; - - return $this; - } - - /** - * Output only. The size of the storage used by the backup. As backups share - * storage, this number is expected to change with backup creation/deletion. - * - * Generated from protobuf field int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getStorageBytes() - { - return $this->storage_bytes; - } - - /** - * Output only. The size of the storage used by the backup. As backups share - * storage, this number is expected to change with backup creation/deletion. - * - * Generated from protobuf field int64 storage_bytes = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setStorageBytes($var) - { - GPBUtil::checkInt64($var); - $this->storage_bytes = $var; - - return $this; - } - - /** - * The resource name of the source Cloud Filestore instance, in the format - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, - * used to create this backup. - * - * Generated from protobuf field string source_instance = 8 [(.google.api.resource_reference) = { - * @return string - */ - public function getSourceInstance() - { - return $this->source_instance; - } - - /** - * The resource name of the source Cloud Filestore instance, in the format - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, - * used to create this backup. - * - * Generated from protobuf field string source_instance = 8 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSourceInstance($var) - { - GPBUtil::checkString($var, True); - $this->source_instance = $var; - - return $this; - } - - /** - * Name of the file share in the source Cloud Filestore instance that the - * backup is created from. - * - * Generated from protobuf field string source_file_share = 9; - * @return string - */ - public function getSourceFileShare() - { - return $this->source_file_share; - } - - /** - * Name of the file share in the source Cloud Filestore instance that the - * backup is created from. - * - * Generated from protobuf field string source_file_share = 9; - * @param string $var - * @return $this - */ - public function setSourceFileShare($var) - { - GPBUtil::checkString($var, True); - $this->source_file_share = $var; - - return $this; - } - - /** - * Output only. The service tier of the source Cloud Filestore instance that - * this backup is created from. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSourceInstanceTier() - { - return $this->source_instance_tier; - } - - /** - * Output only. The service tier of the source Cloud Filestore instance that - * this backup is created from. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier source_instance_tier = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSourceInstanceTier($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\Instance\Tier::class); - $this->source_instance_tier = $var; - - return $this; - } - - /** - * Output only. Amount of bytes that will be downloaded if the backup is - * restored. This may be different than storage bytes, since sequential - * backups of the same disk will share storage. - * - * Generated from protobuf field int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getDownloadBytes() - { - return $this->download_bytes; - } - - /** - * Output only. Amount of bytes that will be downloaded if the backup is - * restored. This may be different than storage bytes, since sequential - * backups of the same disk will share storage. - * - * Generated from protobuf field int64 download_bytes = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setDownloadBytes($var) - { - GPBUtil::checkInt64($var); - $this->download_bytes = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getSatisfiesPzs() - { - return $this->satisfies_pzs; - } - - public function hasSatisfiesPzs() - { - return isset($this->satisfies_pzs); - } - - public function clearSatisfiesPzs() - { - unset($this->satisfies_pzs); - } - - /** - * Returns the unboxed value from getSatisfiesPzs() - - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool|null - */ - public function getSatisfiesPzsUnwrapped() - { - return $this->readWrapperValue("satisfies_pzs"); - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool|null $var - * @return $this - */ - public function setSatisfiesPzsUnwrapped($var) - { - $this->writeWrapperValue("satisfies_pzs", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup/State.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup/State.php deleted file mode 100644 index 4ccfe9824c2d..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup/State.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.filestore.v1.Backup.State - */ -class State -{ - /** - * State not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Backup is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Backup has been taken and the operation is being finalized. At this - * point, changes to the file share will not be reflected in the backup. - * - * Generated from protobuf enum FINALIZING = 2; - */ - const FINALIZING = 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; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::FINALIZING => 'FINALIZING', - self::READY => 'READY', - 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\Filestore\V1\Backup_State::class); - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup_State.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup_State.php deleted file mode 100644 index 59d25dc40c88..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Backup_State.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/ListInstances', - $argument, - ['\Google\Cloud\Filestore\V1\ListInstancesResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets the details of a specific instance. - * @param \Google\Cloud\Filestore\V1\GetInstanceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetInstance(\Google\Cloud\Filestore\V1\GetInstanceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/GetInstance', - $argument, - ['\Google\Cloud\Filestore\V1\Instance', 'decode'], - $metadata, $options); - } - - /** - * Creates an instance. - * When creating from a backup, the capacity of the new instance needs to be - * equal to or larger than the capacity of the backup (and also equal to or - * larger than the minimum capacity of the tier). - * @param \Google\Cloud\Filestore\V1\CreateInstanceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateInstance(\Google\Cloud\Filestore\V1\CreateInstanceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/CreateInstance', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates the settings of a specific instance. - * @param \Google\Cloud\Filestore\V1\UpdateInstanceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateInstance(\Google\Cloud\Filestore\V1\UpdateInstanceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/UpdateInstance', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Restores an existing instance's file share from a backup. - * - * The capacity of the instance needs to be equal to or larger than the - * capacity of the backup (and also equal to or larger than the minimum - * capacity of the tier). - * @param \Google\Cloud\Filestore\V1\RestoreInstanceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RestoreInstance(\Google\Cloud\Filestore\V1\RestoreInstanceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/RestoreInstance', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes an instance. - * @param \Google\Cloud\Filestore\V1\DeleteInstanceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteInstance(\Google\Cloud\Filestore\V1\DeleteInstanceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/DeleteInstance', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists all backups in a project for either a specified location or for all - * locations. - * @param \Google\Cloud\Filestore\V1\ListBackupsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListBackups(\Google\Cloud\Filestore\V1\ListBackupsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/ListBackups', - $argument, - ['\Google\Cloud\Filestore\V1\ListBackupsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets the details of a specific backup. - * @param \Google\Cloud\Filestore\V1\GetBackupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetBackup(\Google\Cloud\Filestore\V1\GetBackupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/GetBackup', - $argument, - ['\Google\Cloud\Filestore\V1\Backup', 'decode'], - $metadata, $options); - } - - /** - * Creates a backup. - * @param \Google\Cloud\Filestore\V1\CreateBackupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateBackup(\Google\Cloud\Filestore\V1\CreateBackupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/CreateBackup', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a backup. - * @param \Google\Cloud\Filestore\V1\DeleteBackupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteBackup(\Google\Cloud\Filestore\V1\DeleteBackupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/DeleteBackup', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates the settings of a specific backup. - * @param \Google\Cloud\Filestore\V1\UpdateBackupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateBackup(\Google\Cloud\Filestore\V1\UpdateBackupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.filestore.v1.CloudFilestoreManager/UpdateBackup', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateBackupRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateBackupRequest.php deleted file mode 100644 index a53ea6f1b1c3..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateBackupRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.filestore.v1.CreateBackupRequest - */ -class CreateBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backup's project and location, in the format - * `projects/{project_number}/locations/{location}`. In Cloud Filestore, - * backup locations map to GCP regions, for example **us-west1**. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A [backup resource][google.cloud.filestore.v1.Backup] - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup = null; - /** - * Required. The ID to use for the backup. - * The ID must be unique within the specified project and location. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * - * Generated from protobuf field string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The backup's project and location, in the format - * `projects/{project_number}/locations/{location}`. In Cloud Filestore, - * backup locations map to GCP regions, for example **us-west1**. - * @type \Google\Cloud\Filestore\V1\Backup $backup - * Required. A [backup resource][google.cloud.filestore.v1.Backup] - * @type string $backup_id - * Required. The ID to use for the backup. - * The ID must be unique within the specified project and location. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backup's project and location, in the format - * `projects/{project_number}/locations/{location}`. In Cloud Filestore, - * backup locations map to GCP regions, for example **us-west1**. - * - * Generated 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 backup's project and location, in the format - * `projects/{project_number}/locations/{location}`. In Cloud Filestore, - * backup locations map to GCP regions, for example **us-west1**. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 [backup resource][google.cloud.filestore.v1.Backup] - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Filestore\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][google.cloud.filestore.v1.Backup] - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Filestore\V1\Backup $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Filestore\V1\Backup::class); - $this->backup = $var; - - return $this; - } - - /** - * Required. The ID to use for the backup. - * The ID must be unique within the specified project and location. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * - * Generated from protobuf field string backup_id = 3 [(.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 project and location. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * - * Generated from protobuf field string backup_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBackupId($var) - { - GPBUtil::checkString($var, True); - $this->backup_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateInstanceRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateInstanceRequest.php deleted file mode 100644 index 1e1547b01a96..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/CreateInstanceRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.filestore.v1.CreateInstanceRequest - */ -class CreateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The instance's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Cloud Filestore, - * locations map to GCP zones, for example **us-west1-b**. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The name of the instance to create. - * The name must be unique for the specified project and location. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_id = ''; - /** - * Required. An [instance resource][google.cloud.filestore.v1.Instance] - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The instance's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Cloud Filestore, - * locations map to GCP zones, for example **us-west1-b**. - * @type string $instance_id - * Required. The name of the instance to create. - * The name must be unique for the specified project and location. - * @type \Google\Cloud\Filestore\V1\Instance $instance - * Required. An [instance resource][google.cloud.filestore.v1.Instance] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The instance's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Cloud Filestore, - * locations map to GCP zones, for example **us-west1-b**. - * - * Generated 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 instance's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Cloud Filestore, - * locations map to GCP zones, for example **us-west1-b**. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 name of the instance to create. - * The name must be unique for the specified project and location. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Required. The name of the instance to create. - * The name must be unique for the specified project and location. - * - * 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. An [instance resource][google.cloud.filestore.v1.Instance] - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Filestore\V1\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. An [instance resource][google.cloud.filestore.v1.Instance] - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Filestore\V1\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Filestore\V1\Instance::class); - $this->instance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteBackupRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteBackupRequest.php deleted file mode 100644 index a4970d744842..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteBackupRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.filestore.v1.DeleteBackupRequest - */ -class DeleteBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_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 backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/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_number}/locations/{location}/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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteInstanceRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteInstanceRequest.php deleted file mode 100644 index 9c113104ba59..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/DeleteInstanceRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.filestore.v1.DeleteInstanceRequest - */ -class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The instance resource name, in the 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 = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The instance resource name, in the 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. The instance resource name, in the 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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/FileShareConfig.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/FileShareConfig.php deleted file mode 100644 index c294377ce202..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/FileShareConfig.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.filestore.v1.FileShareConfig - */ -class FileShareConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the file share (must be 16 characters or less). - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * File share capacity in gigabytes (GB). - * Cloud Filestore defines 1 GB as 1024^3 bytes. - * - * Generated from protobuf field int64 capacity_gb = 2; - */ - protected $capacity_gb = 0; - /** - * Nfs Export Options. - * There is a limit of 10 export options per file share. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - */ - private $nfs_export_options; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the file share (must be 16 characters or less). - * @type int|string $capacity_gb - * File share capacity in gigabytes (GB). - * Cloud Filestore defines 1 GB as 1024^3 bytes. - * @type string $source_backup - * The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`, - * that this file share has been restored from. - * @type array<\Google\Cloud\Filestore\V1\NfsExportOptions>|\Google\Protobuf\Internal\RepeatedField $nfs_export_options - * Nfs Export Options. - * There is a limit of 10 export options per file share. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the file share (must be 16 characters or less). - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the file share (must be 16 characters or less). - * - * 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; - } - - /** - * File share capacity in gigabytes (GB). - * Cloud Filestore defines 1 GB as 1024^3 bytes. - * - * Generated from protobuf field int64 capacity_gb = 2; - * @return int|string - */ - public function getCapacityGb() - { - return $this->capacity_gb; - } - - /** - * File share capacity in gigabytes (GB). - * Cloud Filestore defines 1 GB as 1024^3 bytes. - * - * Generated from protobuf field int64 capacity_gb = 2; - * @param int|string $var - * @return $this - */ - public function setCapacityGb($var) - { - GPBUtil::checkInt64($var); - $this->capacity_gb = $var; - - return $this; - } - - /** - * The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`, - * that this file share has been restored from. - * - * Generated from protobuf field string source_backup = 8 [(.google.api.resource_reference) = { - * @return string - */ - public function getSourceBackup() - { - return $this->readOneof(8); - } - - public function hasSourceBackup() - { - return $this->hasOneof(8); - } - - /** - * The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`, - * that this file share has been restored from. - * - * Generated from protobuf field string source_backup = 8 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSourceBackup($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Nfs Export Options. - * There is a limit of 10 export options per file share. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNfsExportOptions() - { - return $this->nfs_export_options; - } - - /** - * Nfs Export Options. - * There is a limit of 10 export options per file share. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NfsExportOptions nfs_export_options = 7; - * @param array<\Google\Cloud\Filestore\V1\NfsExportOptions>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNfsExportOptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\NfsExportOptions::class); - $this->nfs_export_options = $arr; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetBackupRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetBackupRequest.php deleted file mode 100644 index 794be0fe7c7a..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetBackupRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.filestore.v1.GetBackupRequest - */ -class GetBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_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 backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/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_number}/locations/{location}/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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetInstanceRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetInstanceRequest.php deleted file mode 100644 index 3f65b995443a..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/GetInstanceRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.filestore.v1.GetInstanceRequest - */ -class GetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The instance resource name, in the 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 = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The instance resource name, in the 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. The instance resource name, in the 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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance.php deleted file mode 100644 index 45f5633d158f..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance.php +++ /dev/null @@ -1,470 +0,0 @@ -google.cloud.filestore.v1.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the instance, in the format - * `projects/{project}/locations/{location}/instances/{instance}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The description of the instance (2048 characters or less). - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Output only. The instance state. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Additional information about the instance state, if available. - * - * Generated from protobuf field string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. The time when the instance was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * The service tier of the instance. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier tier = 8; - */ - protected $tier = 0; - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 9; - */ - private $labels; - /** - * File system shares on the instance. - * For this version, only a single file share is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - */ - private $file_shares; - /** - * VPC networks to which the instance is connected. - * For this version, only a single network is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - */ - private $networks; - /** - * Server-specified ETag for the instance resource to prevent simultaneous - * updates from overwriting each other. - * - * Generated from protobuf field string etag = 12; - */ - protected $etag = ''; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the instance, in the format - * `projects/{project}/locations/{location}/instances/{instance}`. - * @type string $description - * The description of the instance (2048 characters or less). - * @type int $state - * Output only. The instance state. - * @type string $status_message - * Output only. Additional information about the instance state, if available. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the instance was created. - * @type int $tier - * The service tier of the instance. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Resource labels to represent user provided metadata. - * @type array<\Google\Cloud\Filestore\V1\FileShareConfig>|\Google\Protobuf\Internal\RepeatedField $file_shares - * File system shares on the instance. - * For this version, only a single file share is supported. - * @type array<\Google\Cloud\Filestore\V1\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $networks - * VPC networks to which the instance is connected. - * For this version, only a single network is supported. - * @type string $etag - * Server-specified ETag for the instance resource to prevent simultaneous - * updates from overwriting each other. - * @type \Google\Protobuf\BoolValue $satisfies_pzs - * Output only. Reserved for future use. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the instance, in the format - * `projects/{project}/locations/{location}/instances/{instance}`. - * - * 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 instance, in the format - * `projects/{project}/locations/{location}/instances/{instance}`. - * - * 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 description of the instance (2048 characters or less). - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the instance (2048 characters or less). - * - * 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 instance state. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The instance state. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\Instance\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Additional information about the instance state, if available. - * - * Generated from protobuf field string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Additional information about the instance state, if available. - * - * Generated from protobuf field string status_message = 6 [(.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 time when 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 when 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; - } - - /** - * The service tier of the instance. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier tier = 8; - * @return int - */ - public function getTier() - { - return $this->tier; - } - - /** - * The service tier of the instance. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance.Tier tier = 8; - * @param int $var - * @return $this - */ - public function setTier($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\Instance\Tier::class); - $this->tier = $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; - } - - /** - * File system shares on the instance. - * For this version, only a single file share is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileShares() - { - return $this->file_shares; - } - - /** - * File system shares on the instance. - * For this version, only a single file share is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10; - * @param array<\Google\Cloud\Filestore\V1\FileShareConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileShares($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\FileShareConfig::class); - $this->file_shares = $arr; - - return $this; - } - - /** - * VPC networks to which the instance is connected. - * For this version, only a single network is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworks() - { - return $this->networks; - } - - /** - * VPC networks to which the instance is connected. - * For this version, only a single network is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig networks = 11; - * @param array<\Google\Cloud\Filestore\V1\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\NetworkConfig::class); - $this->networks = $arr; - - return $this; - } - - /** - * Server-specified ETag for the instance resource to prevent simultaneous - * updates from overwriting each other. - * - * Generated from protobuf field string etag = 12; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Server-specified ETag for the instance resource to prevent simultaneous - * updates from overwriting each other. - * - * Generated from protobuf field string etag = 12; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getSatisfiesPzs() - { - return $this->satisfies_pzs; - } - - public function hasSatisfiesPzs() - { - return isset($this->satisfies_pzs); - } - - public function clearSatisfiesPzs() - { - unset($this->satisfies_pzs); - } - - /** - * Returns the unboxed value from getSatisfiesPzs() - - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool|null - */ - public function getSatisfiesPzsUnwrapped() - { - return $this->readWrapperValue("satisfies_pzs"); - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Output only. Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool|null $var - * @return $this - */ - public function setSatisfiesPzsUnwrapped($var) - { - $this->writeWrapperValue("satisfies_pzs", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/State.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/State.php deleted file mode 100644 index ae7b6575834d..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/State.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.filestore.v1.Instance.State - */ -class State -{ - /** - * State not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The instance is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The instance is available for use. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Work is being done on the instance. You can get further details from the - * `statusMessage` field of the `Instance` resource. - * - * Generated from protobuf enum REPAIRING = 3; - */ - const REPAIRING = 3; - /** - * The instance is shutting down. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * The instance is experiencing an issue and might be unusable. You can get - * further details from the `statusMessage` field of the `Instance` - * resource. - * - * Generated from protobuf enum ERROR = 6; - */ - const ERROR = 6; - /** - * The instance is restoring a backup to an existing file share and may be - * unusable during this time. - * - * Generated from protobuf enum RESTORING = 7; - */ - const RESTORING = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::REPAIRING => 'REPAIRING', - self::DELETING => 'DELETING', - self::ERROR => 'ERROR', - self::RESTORING => 'RESTORING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Filestore\V1\Instance_State::class); - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/Tier.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/Tier.php deleted file mode 100644 index 331a0db60080..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance/Tier.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.filestore.v1.Instance.Tier - */ -class Tier -{ - /** - * Not set. - * - * Generated from protobuf enum TIER_UNSPECIFIED = 0; - */ - const TIER_UNSPECIFIED = 0; - /** - * STANDARD tier. - * - * Generated from protobuf enum STANDARD = 1; - */ - const STANDARD = 1; - /** - * PREMIUM tier. - * - * Generated from protobuf enum PREMIUM = 2; - */ - const PREMIUM = 2; - /** - * BASIC instances offer a maximum capacity of 63.9 TB. - * BASIC_HDD is an alias for STANDARD Tier, offering economical - * performance backed by HDD. - * - * Generated from protobuf enum BASIC_HDD = 3; - */ - const BASIC_HDD = 3; - /** - * BASIC instances offer a maximum capacity of 63.9 TB. - * BASIC_SSD is an alias for PREMIUM Tier, and offers improved - * performance backed by SSD. - * - * Generated from protobuf enum BASIC_SSD = 4; - */ - const BASIC_SSD = 4; - /** - * HIGH_SCALE instances offer expanded capacity and performance scaling - * capabilities. - * - * Generated from protobuf enum HIGH_SCALE_SSD = 5; - */ - const HIGH_SCALE_SSD = 5; - - private static $valueToName = [ - self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED', - self::STANDARD => 'STANDARD', - self::PREMIUM => 'PREMIUM', - self::BASIC_HDD => 'BASIC_HDD', - self::BASIC_SSD => 'BASIC_SSD', - self::HIGH_SCALE_SSD => 'HIGH_SCALE_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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Tier::class, \Google\Cloud\Filestore\V1\Instance_Tier::class); - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance_State.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance_State.php deleted file mode 100644 index 73816c011ed8..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/Instance_State.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.filestore.v1.ListBackupsRequest - */ -class ListBackupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location for which to retrieve backup - * information, in the format - * `projects/{project_number}/locations/{location}`. In Cloud Filestore, - * backup locations map to GCP regions, for example **us-west1**. To retrieve - * backup information for all locations, use "-" for the - * `{location}` 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 = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location for which to retrieve backup - * information, in the format - * `projects/{project_number}/locations/{location}`. In Cloud Filestore, - * backup locations map to GCP regions, for example **us-west1**. To retrieve - * backup information for all locations, use "-" for the - * `{location}` 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\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location for which to retrieve backup - * information, in the format - * `projects/{project_number}/locations/{location}`. In Cloud Filestore, - * backup locations map to GCP regions, for example **us-west1**. To retrieve - * backup information for all locations, use "-" for the - * `{location}` 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. The project and location for which to retrieve backup - * information, in the format - * `projects/{project_number}/locations/{location}`. In Cloud Filestore, - * backup locations map to GCP regions, for example **us-west1**. To retrieve - * backup information for all locations, use "-" for the - * `{location}` 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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsResponse.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsResponse.php deleted file mode 100644 index 166221aae3bc..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListBackupsResponse.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.filestore.v1.ListBackupsResponse - */ -class ListBackupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of backups in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of backups from all locations. If any location is unreachable, the - * response will only return backups in reachable locations and the - * "unreachable" field will be populated with a list of unreachable - * locations. - * - * Generated from protobuf field repeated .google.cloud.filestore.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\Filestore\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $backups - * A list of backups in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of backups from all locations. If any location is unreachable, the - * response will only return backups in reachable locations and the - * "unreachable" field will be populated with a list of unreachable - * locations. - * @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\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * A list of backups in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of backups from all locations. If any location is unreachable, the - * response will only return backups in reachable locations and the - * "unreachable" field will be populated with a list of unreachable - * locations. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Backup backups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackups() - { - return $this->backups; - } - - /** - * A list of backups in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of backups from all locations. If any location is unreachable, the - * response will only return backups in reachable locations and the - * "unreachable" field will be populated with a list of unreachable - * locations. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Backup backups = 1; - * @param array<\Google\Cloud\Filestore\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesRequest.php deleted file mode 100644 index 130637c15523..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesRequest.php +++ /dev/null @@ -1,223 +0,0 @@ -google.cloud.filestore.v1.ListInstancesRequest - */ -class ListInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To - * retrieve instance information for all locations, use "-" for the - * `{location}` 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 = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To - * retrieve instance information for all locations, use "-" for the - * `{location}` 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\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To - * retrieve instance information for all locations, use "-" for the - * `{location}` 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. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To - * retrieve instance information for all locations, use "-" for the - * `{location}` 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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesResponse.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesResponse.php deleted file mode 100644 index 96c73342d44c..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/ListInstancesResponse.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.filestore.v1.ListInstancesResponse - */ -class ListInstancesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of instances in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of instances from all locations. If any location is unreachable, the - * response will only return instances in reachable locations and the - * "unreachable" field will be populated with a list of unreachable locations. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Instance instances = 1; - */ - private $instances; - /** - * 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\Filestore\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $instances - * A list of instances in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of instances from all locations. If any location is unreachable, the - * response will only return instances in reachable locations and the - * "unreachable" field will be populated with a list of unreachable locations. - * @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\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * A list of instances in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of instances from all locations. If any location is unreachable, the - * response will only return instances in reachable locations and the - * "unreachable" field will be populated with a list of unreachable locations. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Instance instances = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * A list of instances in the project for the specified location. - * If the `{location}` value in the request is "-", the response contains a - * list of instances from all locations. If any location is unreachable, the - * response will only return instances in reachable locations and the - * "unreachable" field will be populated with a list of unreachable locations. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.Instance instances = 1; - * @param array<\Google\Cloud\Filestore\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\Instance::class); - $this->instances = $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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig.php deleted file mode 100644 index e5b2a96057f5..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.filestore.v1.NetworkConfig - */ -class NetworkConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the Google Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * - * Generated from protobuf field string network = 1; - */ - protected $network = ''; - /** - * Internet protocol versions for which the instance has IP addresses - * assigned. For this version, only MODE_IPV4 is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - */ - private $modes; - /** - * A /29 CIDR block in one of the - * [internal IP address - * ranges](https://www.arin.net/reference/research/statistics/address_filters/) - * that identifies the range of IP addresses reserved for this instance. For - * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap - * with either existing subnets or assigned IP address ranges for other Cloud - * Filestore instances in the selected VPC network. - * - * Generated from protobuf field string reserved_ip_range = 4; - */ - protected $reserved_ip_range = ''; - /** - * Output only. IPv4 addresses in the format - * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or - * IPv6 addresses in the format - * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. - * - * Generated from protobuf field repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $ip_addresses; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * The name of the Google Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * @type array|\Google\Protobuf\Internal\RepeatedField $modes - * Internet protocol versions for which the instance has IP addresses - * assigned. For this version, only MODE_IPV4 is supported. - * @type string $reserved_ip_range - * A /29 CIDR block in one of the - * [internal IP address - * ranges](https://www.arin.net/reference/research/statistics/address_filters/) - * that identifies the range of IP addresses reserved for this instance. For - * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap - * with either existing subnets or assigned IP address ranges for other Cloud - * Filestore instances in the selected VPC network. - * @type array|\Google\Protobuf\Internal\RepeatedField $ip_addresses - * Output only. IPv4 addresses in the format - * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or - * IPv6 addresses in the format - * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the Google Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * - * Generated from protobuf field string network = 1; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * The name of the Google Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * - * 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; - } - - /** - * Internet protocol versions for which the instance has IP addresses - * assigned. For this version, only MODE_IPV4 is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getModes() - { - return $this->modes; - } - - /** - * Internet protocol versions for which the instance has IP addresses - * assigned. For this version, only MODE_IPV4 is supported. - * - * Generated from protobuf field repeated .google.cloud.filestore.v1.NetworkConfig.AddressMode modes = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setModes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Filestore\V1\NetworkConfig\AddressMode::class); - $this->modes = $arr; - - return $this; - } - - /** - * A /29 CIDR block in one of the - * [internal IP address - * ranges](https://www.arin.net/reference/research/statistics/address_filters/) - * that identifies the range of IP addresses reserved for this instance. For - * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap - * with either existing subnets or assigned IP address ranges for other Cloud - * Filestore instances in the selected VPC network. - * - * Generated from protobuf field string reserved_ip_range = 4; - * @return string - */ - public function getReservedIpRange() - { - return $this->reserved_ip_range; - } - - /** - * A /29 CIDR block in one of the - * [internal IP address - * ranges](https://www.arin.net/reference/research/statistics/address_filters/) - * that identifies the range of IP addresses reserved for this instance. For - * example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't overlap - * with either existing subnets or assigned IP address ranges for other Cloud - * Filestore instances in the selected VPC network. - * - * Generated from protobuf field string reserved_ip_range = 4; - * @param string $var - * @return $this - */ - public function setReservedIpRange($var) - { - GPBUtil::checkString($var, True); - $this->reserved_ip_range = $var; - - return $this; - } - - /** - * Output only. IPv4 addresses in the format - * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or - * IPv6 addresses in the format - * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. - * - * Generated from protobuf field repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpAddresses() - { - return $this->ip_addresses; - } - - /** - * Output only. IPv4 addresses in the format - * IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or - * IPv6 addresses in the format - * `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. - * - * Generated from protobuf field repeated string ip_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ip_addresses = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig/AddressMode.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig/AddressMode.php deleted file mode 100644 index c96634c724fd..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig/AddressMode.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.filestore.v1.NetworkConfig.AddressMode - */ -class AddressMode -{ - /** - * Internet protocol not set. - * - * Generated from protobuf enum ADDRESS_MODE_UNSPECIFIED = 0; - */ - const ADDRESS_MODE_UNSPECIFIED = 0; - /** - * Use the IPv4 internet protocol. - * - * Generated from protobuf enum MODE_IPV4 = 1; - */ - const MODE_IPV4 = 1; - - private static $valueToName = [ - self::ADDRESS_MODE_UNSPECIFIED => 'ADDRESS_MODE_UNSPECIFIED', - self::MODE_IPV4 => 'MODE_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(AddressMode::class, \Google\Cloud\Filestore\V1\NetworkConfig_AddressMode::class); - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig_AddressMode.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig_AddressMode.php deleted file mode 100644 index 388cc85bf747..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NetworkConfig_AddressMode.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.filestore.v1.NfsExportOptions - */ -class NfsExportOptions extends \Google\Protobuf\Internal\Message -{ - /** - * List of either an IPv4 addresses in the format - * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format - * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the - * file share. - * Overlapping IP ranges are not allowed, both within and across - * NfsExportOptions. An error will be returned. - * The limit is 64 IP ranges/addresses for each FileShareConfig among all - * NfsExportOptions. - * - * Generated from protobuf field repeated string ip_ranges = 1; - */ - private $ip_ranges; - /** - * Either READ_ONLY, for allowing only read requests on the exported - * directory, or READ_WRITE, for allowing both read and write requests. - * The default is READ_WRITE. - * - * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; - */ - protected $access_mode = 0; - /** - * Either NO_ROOT_SQUASH, for allowing root access on the exported directory, - * or ROOT_SQUASH, for not allowing root access. The default is - * NO_ROOT_SQUASH. - * - * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; - */ - protected $squash_mode = 0; - /** - * An integer representing the anonymous user id with a default value of - * 65534. - * Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * - * Generated from protobuf field int64 anon_uid = 4; - */ - protected $anon_uid = 0; - /** - * An integer representing the anonymous group id with a default value of - * 65534. - * Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * - * Generated from protobuf field int64 anon_gid = 5; - */ - protected $anon_gid = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $ip_ranges - * List of either an IPv4 addresses in the format - * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format - * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the - * file share. - * Overlapping IP ranges are not allowed, both within and across - * NfsExportOptions. An error will be returned. - * The limit is 64 IP ranges/addresses for each FileShareConfig among all - * NfsExportOptions. - * @type int $access_mode - * Either READ_ONLY, for allowing only read requests on the exported - * directory, or READ_WRITE, for allowing both read and write requests. - * The default is READ_WRITE. - * @type int $squash_mode - * Either NO_ROOT_SQUASH, for allowing root access on the exported directory, - * or ROOT_SQUASH, for not allowing root access. The default is - * NO_ROOT_SQUASH. - * @type int|string $anon_uid - * An integer representing the anonymous user id with a default value of - * 65534. - * Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * @type int|string $anon_gid - * An integer representing the anonymous group id with a default value of - * 65534. - * Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * List of either an IPv4 addresses in the format - * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format - * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the - * file share. - * Overlapping IP ranges are not allowed, both within and across - * NfsExportOptions. An error will be returned. - * The limit is 64 IP ranges/addresses for each FileShareConfig among all - * NfsExportOptions. - * - * Generated from protobuf field repeated string ip_ranges = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpRanges() - { - return $this->ip_ranges; - } - - /** - * List of either an IPv4 addresses in the format - * `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format - * `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the - * file share. - * Overlapping IP ranges are not allowed, both within and across - * NfsExportOptions. An error will be returned. - * The limit is 64 IP ranges/addresses for each FileShareConfig among all - * NfsExportOptions. - * - * Generated from protobuf field repeated string ip_ranges = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ip_ranges = $arr; - - return $this; - } - - /** - * Either READ_ONLY, for allowing only read requests on the exported - * directory, or READ_WRITE, for allowing both read and write requests. - * The default is READ_WRITE. - * - * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; - * @return int - */ - public function getAccessMode() - { - return $this->access_mode; - } - - /** - * Either READ_ONLY, for allowing only read requests on the exported - * directory, or READ_WRITE, for allowing both read and write requests. - * The default is READ_WRITE. - * - * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.AccessMode access_mode = 2; - * @param int $var - * @return $this - */ - public function setAccessMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\NfsExportOptions\AccessMode::class); - $this->access_mode = $var; - - return $this; - } - - /** - * Either NO_ROOT_SQUASH, for allowing root access on the exported directory, - * or ROOT_SQUASH, for not allowing root access. The default is - * NO_ROOT_SQUASH. - * - * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; - * @return int - */ - public function getSquashMode() - { - return $this->squash_mode; - } - - /** - * Either NO_ROOT_SQUASH, for allowing root access on the exported directory, - * or ROOT_SQUASH, for not allowing root access. The default is - * NO_ROOT_SQUASH. - * - * Generated from protobuf field .google.cloud.filestore.v1.NfsExportOptions.SquashMode squash_mode = 3; - * @param int $var - * @return $this - */ - public function setSquashMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\NfsExportOptions\SquashMode::class); - $this->squash_mode = $var; - - return $this; - } - - /** - * An integer representing the anonymous user id with a default value of - * 65534. - * Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * - * Generated from protobuf field int64 anon_uid = 4; - * @return int|string - */ - public function getAnonUid() - { - return $this->anon_uid; - } - - /** - * An integer representing the anonymous user id with a default value of - * 65534. - * Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * - * Generated from protobuf field int64 anon_uid = 4; - * @param int|string $var - * @return $this - */ - public function setAnonUid($var) - { - GPBUtil::checkInt64($var); - $this->anon_uid = $var; - - return $this; - } - - /** - * An integer representing the anonymous group id with a default value of - * 65534. - * Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * - * Generated from protobuf field int64 anon_gid = 5; - * @return int|string - */ - public function getAnonGid() - { - return $this->anon_gid; - } - - /** - * An integer representing the anonymous group id with a default value of - * 65534. - * Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be - * returned if this field is specified for other squash_mode settings. - * - * Generated from protobuf field int64 anon_gid = 5; - * @param int|string $var - * @return $this - */ - public function setAnonGid($var) - { - GPBUtil::checkInt64($var); - $this->anon_gid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/AccessMode.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/AccessMode.php deleted file mode 100644 index 22e3a736af2a..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/AccessMode.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.filestore.v1.NfsExportOptions.AccessMode - */ -class AccessMode -{ - /** - * AccessMode not set. - * - * Generated from protobuf enum ACCESS_MODE_UNSPECIFIED = 0; - */ - const ACCESS_MODE_UNSPECIFIED = 0; - /** - * The client can only read the file share. - * - * Generated from protobuf enum READ_ONLY = 1; - */ - const READ_ONLY = 1; - /** - * The client can read and write the file share (default). - * - * Generated from protobuf enum READ_WRITE = 2; - */ - const READ_WRITE = 2; - - private static $valueToName = [ - self::ACCESS_MODE_UNSPECIFIED => 'ACCESS_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(AccessMode::class, \Google\Cloud\Filestore\V1\NfsExportOptions_AccessMode::class); - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/SquashMode.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/SquashMode.php deleted file mode 100644 index 5cc43da713a5..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions/SquashMode.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.filestore.v1.NfsExportOptions.SquashMode - */ -class SquashMode -{ - /** - * SquashMode not set. - * - * Generated from protobuf enum SQUASH_MODE_UNSPECIFIED = 0; - */ - const SQUASH_MODE_UNSPECIFIED = 0; - /** - * The Root user has root access to the file share (default). - * - * Generated from protobuf enum NO_ROOT_SQUASH = 1; - */ - const NO_ROOT_SQUASH = 1; - /** - * The Root user has squashed access to the anonymous uid/gid. - * - * Generated from protobuf enum ROOT_SQUASH = 2; - */ - const ROOT_SQUASH = 2; - - private static $valueToName = [ - self::SQUASH_MODE_UNSPECIFIED => 'SQUASH_MODE_UNSPECIFIED', - self::NO_ROOT_SQUASH => 'NO_ROOT_SQUASH', - self::ROOT_SQUASH => 'ROOT_SQUASH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SquashMode::class, \Google\Cloud\Filestore\V1\NfsExportOptions_SquashMode::class); - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions_AccessMode.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions_AccessMode.php deleted file mode 100644 index a6836188b358..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/NfsExportOptions_AccessMode.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.filestore.v1.RestoreInstanceRequest - */ -class RestoreInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the instance, in the format - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Name of the file share in the Cloud Filestore instance that the - * backup is being restored to. - * - * Generated from protobuf field string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $file_share = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the instance, in the format - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - * @type string $file_share - * Required. Name of the file share in the Cloud Filestore instance that the - * backup is being restored to. - * @type string $source_backup - * The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the instance, in the format - * `projects/{project_number}/locations/{location_id}/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. The resource name of the instance, in the format - * `projects/{project_number}/locations/{location_id}/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. Name of the file share in the Cloud Filestore instance that the - * backup is being restored to. - * - * Generated from protobuf field string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFileShare() - { - return $this->file_share; - } - - /** - * Required. Name of the file share in the Cloud Filestore instance that the - * backup is being restored to. - * - * Generated from protobuf field string file_share = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFileShare($var) - { - GPBUtil::checkString($var, True); - $this->file_share = $var; - - return $this; - } - - /** - * The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - * - * Generated from protobuf field string source_backup = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getSourceBackup() - { - return $this->readOneof(3); - } - - public function hasSourceBackup() - { - return $this->hasOneof(3); - } - - /** - * The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - * - * Generated from protobuf field string source_backup = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSourceBackup($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateBackupRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateBackupRequest.php deleted file mode 100644 index 582f8824eeff..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateBackupRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.filestore.v1.UpdateBackupRequest - */ -class UpdateBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A [backup resource][google.cloud.filestore.v1.Backup] - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup = null; - /** - * 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 = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Filestore\V1\Backup $backup - * Required. A [backup resource][google.cloud.filestore.v1.Backup] - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * Required. A [backup resource][google.cloud.filestore.v1.Backup] - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Filestore\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][google.cloud.filestore.v1.Backup] - * - * Generated from protobuf field .google.cloud.filestore.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Filestore\V1\Backup $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Filestore\V1\Backup::class); - $this->backup = $var; - - return $this; - } - - /** - * 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 = 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. At least one path must be supplied in - * this field. - * - * 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/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateInstanceRequest.php b/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateInstanceRequest.php deleted file mode 100644 index 65da44057cd5..000000000000 --- a/owl-bot-staging/Filestore/v1/proto/src/Google/Cloud/Filestore/V1/UpdateInstanceRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.filestore.v1.UpdateInstanceRequest - */ -class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * 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 these - * fields: - * * "description" - * * "file_shares" - * * "labels" - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - */ - protected $update_mask = null; - /** - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 2; - */ - protected $instance = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * 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 these - * fields: - * * "description" - * * "file_shares" - * * "labels" - * @type \Google\Cloud\Filestore\V1\Instance $instance - * Only fields specified in update_mask are updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce(); - parent::__construct($data); - } - - /** - * 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 these - * fields: - * * "description" - * * "file_shares" - * * "labels" - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @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 of fields to update. At least one path must be supplied in this - * field. The elements of the repeated paths field may only include these - * fields: - * * "description" - * * "file_shares" - * * "labels" - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 2; - * @return \Google\Cloud\Filestore\V1\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.filestore.v1.Instance instance = 2; - * @param \Google\Cloud\Filestore\V1\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Filestore\V1\Instance::class); - $this->instance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_backup.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_backup.php deleted file mode 100644 index dd409551faf0..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_backup.php +++ /dev/null @@ -1,91 +0,0 @@ -createBackup($formattedParent, $backup, $backupId); - $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 = CloudFilestoreManagerClient::locationName('[PROJECT]', '[LOCATION]'); - $backupId = '[BACKUP_ID]'; - - create_backup_sample($formattedParent, $backupId); -} -// [END file_v1_generated_CloudFilestoreManager_CreateBackup_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_instance.php deleted file mode 100644 index 978c695d2468..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/create_instance.php +++ /dev/null @@ -1,89 +0,0 @@ -createInstance($formattedParent, $instanceId, $instance); - $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 = CloudFilestoreManagerClient::locationName('[PROJECT]', '[LOCATION]'); - $instanceId = '[INSTANCE_ID]'; - - create_instance_sample($formattedParent, $instanceId); -} -// [END file_v1_generated_CloudFilestoreManager_CreateInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_backup.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_backup.php deleted file mode 100644 index f82ad0fe81c6..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_backup.php +++ /dev/null @@ -1,76 +0,0 @@ -deleteBackup($formattedName); - $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 = CloudFilestoreManagerClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - - delete_backup_sample($formattedName); -} -// [END file_v1_generated_CloudFilestoreManager_DeleteBackup_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_instance.php deleted file mode 100644 index e4206d9d10c6..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/delete_instance.php +++ /dev/null @@ -1,76 +0,0 @@ -deleteInstance($formattedName); - $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 = CloudFilestoreManagerClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - delete_instance_sample($formattedName); -} -// [END file_v1_generated_CloudFilestoreManager_DeleteInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_backup.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_backup.php deleted file mode 100644 index b497fe69c69b..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_backup.php +++ /dev/null @@ -1,67 +0,0 @@ -getBackup($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudFilestoreManagerClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - - get_backup_sample($formattedName); -} -// [END file_v1_generated_CloudFilestoreManager_GetBackup_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_instance.php deleted file mode 100644 index f33a8ebc2fda..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/get_instance.php +++ /dev/null @@ -1,67 +0,0 @@ -getInstance($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudFilestoreManagerClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - get_instance_sample($formattedName); -} -// [END file_v1_generated_CloudFilestoreManager_GetInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_backups.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_backups.php deleted file mode 100644 index 8f61d16e7165..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_backups.php +++ /dev/null @@ -1,77 +0,0 @@ -listBackups($formattedParent); - - /** @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 = CloudFilestoreManagerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_backups_sample($formattedParent); -} -// [END file_v1_generated_CloudFilestoreManager_ListBackups_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_instances.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_instances.php deleted file mode 100644 index 4dc41964874b..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/list_instances.php +++ /dev/null @@ -1,76 +0,0 @@ -listInstances($formattedParent); - - /** @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 = CloudFilestoreManagerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_instances_sample($formattedParent); -} -// [END file_v1_generated_CloudFilestoreManager_ListInstances_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/restore_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/restore_instance.php deleted file mode 100644 index 8297237b9bf5..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/restore_instance.php +++ /dev/null @@ -1,86 +0,0 @@ -restoreInstance($formattedName, $fileShare); - $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 = CloudFilestoreManagerClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $fileShare = '[FILE_SHARE]'; - - restore_instance_sample($formattedName, $fileShare); -} -// [END file_v1_generated_CloudFilestoreManager_RestoreInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_backup.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_backup.php deleted file mode 100644 index 4cfa0d68ac1f..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_backup.php +++ /dev/null @@ -1,70 +0,0 @@ -updateBackup($backup, $updateMask); - $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 file_v1_generated_CloudFilestoreManager_UpdateBackup_sync] diff --git a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_instance.php b/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_instance.php deleted file mode 100644 index 9c1deabd2622..000000000000 --- a/owl-bot-staging/Filestore/v1/samples/V1/CloudFilestoreManagerClient/update_instance.php +++ /dev/null @@ -1,65 +0,0 @@ -updateInstance(); - $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 file_v1_generated_CloudFilestoreManager_UpdateInstance_sync] diff --git a/owl-bot-staging/Filestore/v1/src/V1/CloudFilestoreManagerClient.php b/owl-bot-staging/Filestore/v1/src/V1/CloudFilestoreManagerClient.php deleted file mode 100644 index 09d4053ddc3d..000000000000 --- a/owl-bot-staging/Filestore/v1/src/V1/CloudFilestoreManagerClient.php +++ /dev/null @@ -1,34 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $backup = new Backup(); - * $backupId = 'backup_id'; - * $operationResponse = $cloudFilestoreManagerClient->createBackup($formattedParent, $backup, $backupId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $cloudFilestoreManagerClient->createBackup($formattedParent, $backup, $backupId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'createBackup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $cloudFilestoreManagerClient->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. - */ -class CloudFilestoreManagerGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.filestore.v1.CloudFilestoreManager'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'file.googleapis.com'; - - /** 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 $backupNameTemplate; - - private static $instanceNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/cloud_filestore_manager_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_filestore_manager_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_filestore_manager_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/cloud_filestore_manager_rest_client_config.php', - ], - ], - ]; - } - - private static function getBackupNameTemplate() - { - if (self::$backupNameTemplate == null) { - self::$backupNameTemplate = new PathTemplate('projects/{project}/locations/{location}/backups/{backup}'); - } - - return self::$backupNameTemplate; - } - - private static function getInstanceNameTemplate() - { - if (self::$instanceNameTemplate == null) { - self::$instanceNameTemplate = new PathTemplate('projects/{project}/locations/{location}/instances/{instance}'); - } - - return self::$instanceNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'backup' => self::getBackupNameTemplate(), - 'instance' => self::getInstanceNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a backup - * resource. - * - * @param string $project - * @param string $location - * @param string $backup - * - * @return string The formatted backup resource. - */ - public static function backupName($project, $location, $backup) - { - return self::getBackupNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'backup' => $backup, - ]); - } - - /** - * 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($project, $location, $instance) - { - return self::getInstanceNameTemplate()->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($project, $location) - { - return self::getLocationNameTemplate()->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 - * - backup: projects/{project}/locations/{location}/backups/{backup} - * - 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($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"); - } - - /** - * 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; - } - - /** - * 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 'file.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a backup. - * - * Sample code: - * ``` - * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); - * try { - * $formattedParent = $cloudFilestoreManagerClient->locationName('[PROJECT]', '[LOCATION]'); - * $backup = new Backup(); - * $backupId = 'backup_id'; - * $operationResponse = $cloudFilestoreManagerClient->createBackup($formattedParent, $backup, $backupId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $cloudFilestoreManagerClient->createBackup($formattedParent, $backup, $backupId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'createBackup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $cloudFilestoreManagerClient->close(); - * } - * ``` - * - * @param string $parent Required. The backup's project and location, in the format - * `projects/{project_number}/locations/{location}`. In Cloud Filestore, - * backup locations map to GCP regions, for example **us-west1**. - * @param Backup $backup Required. A [backup resource][google.cloud.filestore.v1.Backup] - * @param string $backupId Required. The ID to use for the backup. - * The ID must be unique within the specified project and location. - * - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createBackup($parent, $backup, $backupId, array $optionalArgs = []) - { - $request = new CreateBackupRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setBackup($backup); - $request->setBackupId($backupId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateBackup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates an instance. - * When creating from a backup, the capacity of the new instance needs to be - * equal to or larger than the capacity of the backup (and also equal to or - * larger than the minimum capacity of the tier). - * - * Sample code: - * ``` - * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); - * try { - * $formattedParent = $cloudFilestoreManagerClient->locationName('[PROJECT]', '[LOCATION]'); - * $instanceId = 'instance_id'; - * $instance = new Instance(); - * $operationResponse = $cloudFilestoreManagerClient->createInstance($formattedParent, $instanceId, $instance); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $cloudFilestoreManagerClient->createInstance($formattedParent, $instanceId, $instance); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'createInstance'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $cloudFilestoreManagerClient->close(); - * } - * ``` - * - * @param string $parent Required. The instance's project and location, in the format - * `projects/{project_id}/locations/{location}`. In Cloud Filestore, - * locations map to GCP zones, for example **us-west1-b**. - * @param string $instanceId Required. The name of the instance to create. - * The name must be unique for the specified project and location. - * @param Instance $instance Required. An [instance resource][google.cloud.filestore.v1.Instance] - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createInstance($parent, $instanceId, $instance, array $optionalArgs = []) - { - $request = new CreateInstanceRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setInstanceId($instanceId); - $request->setInstance($instance); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateInstance', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a backup. - * - * Sample code: - * ``` - * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); - * try { - * $formattedName = $cloudFilestoreManagerClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - * $operationResponse = $cloudFilestoreManagerClient->deleteBackup($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $cloudFilestoreManagerClient->deleteBackup($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'deleteBackup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $cloudFilestoreManagerClient->close(); - * } - * ``` - * - * @param string $name Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteBackup($name, array $optionalArgs = []) - { - $request = new DeleteBackupRequest(); - $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->startOperationsCall('DeleteBackup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes an instance. - * - * Sample code: - * ``` - * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); - * try { - * $formattedName = $cloudFilestoreManagerClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - * $operationResponse = $cloudFilestoreManagerClient->deleteInstance($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $cloudFilestoreManagerClient->deleteInstance($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'deleteInstance'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $cloudFilestoreManagerClient->close(); - * } - * ``` - * - * @param string $name Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteInstance($name, array $optionalArgs = []) - { - $request = new DeleteInstanceRequest(); - $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->startOperationsCall('DeleteInstance', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the details of a specific backup. - * - * Sample code: - * ``` - * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); - * try { - * $formattedName = $cloudFilestoreManagerClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - * $response = $cloudFilestoreManagerClient->getBackup($formattedName); - * } finally { - * $cloudFilestoreManagerClient->close(); - * } - * ``` - * - * @param string $name Required. The backup resource name, in the format - * `projects/{project_number}/locations/{location}/backups/{backup_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\Filestore\V1\Backup - * - * @throws ApiException if the remote call fails - */ - public function getBackup($name, array $optionalArgs = []) - { - $request = new GetBackupRequest(); - $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('GetBackup', Backup::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the details of a specific instance. - * - * Sample code: - * ``` - * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); - * try { - * $formattedName = $cloudFilestoreManagerClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - * $response = $cloudFilestoreManagerClient->getInstance($formattedName); - * } finally { - * $cloudFilestoreManagerClient->close(); - * } - * ``` - * - * @param string $name Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_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\Filestore\V1\Instance - * - * @throws ApiException if the remote call fails - */ - public function getInstance($name, array $optionalArgs = []) - { - $request = new GetInstanceRequest(); - $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('GetInstance', Instance::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists all backups in a project for either a specified location or for all - * locations. - * - * Sample code: - * ``` - * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); - * try { - * $formattedParent = $cloudFilestoreManagerClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $cloudFilestoreManagerClient->listBackups($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $cloudFilestoreManagerClient->listBackups($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $cloudFilestoreManagerClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and location for which to retrieve backup - * information, in the format - * `projects/{project_number}/locations/{location}`. In Cloud Filestore, - * backup locations map to GCP regions, for example **us-west1**. To retrieve - * backup information for all locations, use "-" for the - * `{location}` value. - * @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 $orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @type string $filter - * List filter. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listBackups($parent, array $optionalArgs = []) - { - $request = new ListBackupsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListBackups', $optionalArgs, ListBackupsResponse::class, $request); - } - - /** - * Lists all instances in a project for either a specified location - * or for all locations. - * - * Sample code: - * ``` - * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); - * try { - * $formattedParent = $cloudFilestoreManagerClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $cloudFilestoreManagerClient->listInstances($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $cloudFilestoreManagerClient->listInstances($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $cloudFilestoreManagerClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud Filestore, locations map to GCP zones, for example **us-west1-b**. To - * retrieve instance information for all locations, use "-" for the - * `{location}` value. - * @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 $orderBy - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @type string $filter - * List filter. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listInstances($parent, array $optionalArgs = []) - { - $request = new ListInstancesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListInstances', $optionalArgs, ListInstancesResponse::class, $request); - } - - /** - * Restores an existing instance's file share from a backup. - * - * The capacity of the instance needs to be equal to or larger than the - * capacity of the backup (and also equal to or larger than the minimum - * capacity of the tier). - * - * Sample code: - * ``` - * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); - * try { - * $formattedName = $cloudFilestoreManagerClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - * $fileShare = 'file_share'; - * $operationResponse = $cloudFilestoreManagerClient->restoreInstance($formattedName, $fileShare); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $cloudFilestoreManagerClient->restoreInstance($formattedName, $fileShare); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'restoreInstance'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $cloudFilestoreManagerClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the instance, in the format - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - * @param string $fileShare Required. Name of the file share in the Cloud Filestore instance that the - * backup is being restored to. - * @param array $optionalArgs { - * Optional. - * - * @type string $sourceBackup - * The resource name of the backup, in the format - * `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function restoreInstance($name, $fileShare, array $optionalArgs = []) - { - $request = new RestoreInstanceRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setFileShare($fileShare); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['sourceBackup'])) { - $request->setSourceBackup($optionalArgs['sourceBackup']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('RestoreInstance', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates the settings of a specific backup. - * - * Sample code: - * ``` - * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); - * try { - * $backup = new Backup(); - * $updateMask = new FieldMask(); - * $operationResponse = $cloudFilestoreManagerClient->updateBackup($backup, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $cloudFilestoreManagerClient->updateBackup($backup, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'updateBackup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $cloudFilestoreManagerClient->close(); - * } - * ``` - * - * @param Backup $backup Required. A [backup resource][google.cloud.filestore.v1.Backup] - * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateBackup($backup, $updateMask, array $optionalArgs = []) - { - $request = new UpdateBackupRequest(); - $requestParamHeaders = []; - $request->setBackup($backup); - $request->setUpdateMask($updateMask); - $requestParamHeaders['backup.name'] = $backup->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateBackup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates the settings of a specific instance. - * - * Sample code: - * ``` - * $cloudFilestoreManagerClient = new CloudFilestoreManagerClient(); - * try { - * $operationResponse = $cloudFilestoreManagerClient->updateInstance(); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $cloudFilestoreManagerClient->updateInstance(); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $cloudFilestoreManagerClient->resumeOperation($operationName, 'updateInstance'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $cloudFilestoreManagerClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * 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 these - * fields: - * - * * "description" - * * "file_shares" - * * "labels" - * @type Instance $instance - * Only fields specified in update_mask are updated. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateInstance(array $optionalArgs = []) - { - $request = new UpdateInstanceRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - if (isset($optionalArgs['instance'])) { - $request->setInstance($optionalArgs['instance']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateInstance', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/Filestore/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Filestore/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 84e5a17dbc33..000000000000 --- a/owl-bot-staging/Filestore/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.filestore.v1", - "libraryPackage": "Google\\Cloud\\Filestore\\V1", - "services": { - "CloudFilestoreManager": { - "clients": { - "grpc": { - "libraryClient": "CloudFilestoreManagerGapicClient", - "rpcs": { - "CreateBackup": { - "methods": [ - "createBackup" - ] - }, - "CreateInstance": { - "methods": [ - "createInstance" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "DeleteInstance": { - "methods": [ - "deleteInstance" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetInstance": { - "methods": [ - "getInstance" - ] - }, - "ListBackups": { - "methods": [ - "listBackups" - ] - }, - "ListInstances": { - "methods": [ - "listInstances" - ] - }, - "RestoreInstance": { - "methods": [ - "restoreInstance" - ] - }, - "UpdateBackup": { - "methods": [ - "updateBackup" - ] - }, - "UpdateInstance": { - "methods": [ - "updateInstance" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_client_config.json b/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_client_config.json deleted file mode 100644 index 59a1225df502..000000000000 --- a/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_client_config.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "interfaces": { - "google.cloud.filestore.v1.CloudFilestoreManager": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [], - "no_retry_2_codes": [], - "no_retry_3_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": 250, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 32000, - "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": 60000000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000000, - "total_timeout_millis": 60000000 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 14400000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 14400000, - "total_timeout_millis": 14400000 - }, - "no_retry_3_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": { - "CreateBackup": { - "timeout_millis": 60000000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateInstance": { - "timeout_millis": 60000000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteBackup": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "DeleteInstance": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "GetBackup": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetInstance": { - "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" - }, - "ListInstances": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RestoreInstance": { - "timeout_millis": 60000000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateBackup": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "UpdateInstance": { - "timeout_millis": 14400000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - } - } - } - } -} diff --git a/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_descriptor_config.php b/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_descriptor_config.php deleted file mode 100644 index 2a43e65d5d6f..000000000000 --- a/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_descriptor_config.php +++ /dev/null @@ -1,98 +0,0 @@ - [ - 'google.cloud.filestore.v1.CloudFilestoreManager' => [ - 'CreateBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Filestore\V1\Backup', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'CreateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Filestore\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'RestoreInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Filestore\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Filestore\V1\Backup', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Filestore\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Common\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListBackups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBackups', - ], - ], - 'ListInstances' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInstances', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_rest_client_config.php b/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_rest_client_config.php deleted file mode 100644 index 5d5d552c22ac..000000000000 --- a/owl-bot-staging/Filestore/v1/src/V1/resources/cloud_filestore_manager_rest_client_config.php +++ /dev/null @@ -1,217 +0,0 @@ - [ - 'google.cloud.filestore.v1.CloudFilestoreManager' => [ - 'CreateBackup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backups', - 'body' => 'backup', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'backup_id', - ], - ], - 'CreateInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', - 'body' => 'instance', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'instance_id', - ], - ], - 'DeleteBackup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBackups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListInstances' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RestoreInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:restore', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateBackup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{backup.name=projects/*/locations/*/backups/*}', - 'body' => 'backup', - 'placeholders' => [ - 'backup.name' => [ - 'getters' => [ - 'getBackup', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateInstance' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{instance.name=projects/*/locations/*/instances/*}', - 'body' => 'instance', - 'placeholders' => [ - 'instance.name' => [ - 'getters' => [ - 'getInstance', - 'getName', - ], - ], - ], - ], - ], - '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.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/Filestore/v1/tests/Unit/V1/CloudFilestoreManagerClientTest.php b/owl-bot-staging/Filestore/v1/tests/Unit/V1/CloudFilestoreManagerClientTest.php deleted file mode 100644 index 37c52425a61b..000000000000 --- a/owl-bot-staging/Filestore/v1/tests/Unit/V1/CloudFilestoreManagerClientTest.php +++ /dev/null @@ -1,1233 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CloudFilestoreManagerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CloudFilestoreManagerClient($options); - } - - /** @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'; - $capacityGb = 1923585408; - $storageBytes = 2035244455; - $sourceInstance = 'sourceInstance-677426119'; - $sourceFileShare = 'sourceFileShare-1224476160'; - $downloadBytes = 971924980; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacityGb($capacityGb); - $expectedResponse->setStorageBytes($storageBytes); - $expectedResponse->setSourceInstance($sourceInstance); - $expectedResponse->setSourceFileShare($sourceFileShare); - $expectedResponse->setDownloadBytes($downloadBytes); - $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->locationName('[PROJECT]', '[LOCATION]'); - $backup = new Backup(); - $backupId = 'backupId1355353272'; - $response = $gapicClient->createBackup($formattedParent, $backup, $backupId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/CreateBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBackup(); - $this->assertProtobufEquals($backup, $actualValue); - $actualValue = $actualApiRequestObject->getBackupId(); - $this->assertProtobufEquals($backupId, $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->locationName('[PROJECT]', '[LOCATION]'); - $backup = new Backup(); - $backupId = 'backupId1355353272'; - $response = $gapicClient->createBackup($formattedParent, $backup, $backupId); - $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 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'; - $description = 'description-1724546052'; - $statusMessage = 'statusMessage-239442758'; - $etag = 'etag3123477'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setStatusMessage($statusMessage); - $expectedResponse->setEtag($etag); - $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(); - $response = $gapicClient->createInstance($formattedParent, $instanceId, $instance); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/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(); - $response = $gapicClient->createInstance($formattedParent, $instanceId, $instance); - $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 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]'); - $response = $gapicClient->deleteBackup($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/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]'); - $response = $gapicClient->deleteBackup($formattedName); - $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 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]'); - $response = $gapicClient->deleteInstance($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/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]'); - $response = $gapicClient->deleteInstance($formattedName); - $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 getBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $capacityGb = 1923585408; - $storageBytes = 2035244455; - $sourceInstance = 'sourceInstance-677426119'; - $sourceFileShare = 'sourceFileShare-1224476160'; - $downloadBytes = 971924980; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacityGb($capacityGb); - $expectedResponse->setStorageBytes($storageBytes); - $expectedResponse->setSourceInstance($sourceInstance); - $expectedResponse->setSourceFileShare($sourceFileShare); - $expectedResponse->setDownloadBytes($downloadBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $response = $gapicClient->getBackup($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/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]'); - try { - $gapicClient->getBackup($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 getInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $statusMessage = 'statusMessage-239442758'; - $etag = 'etag3123477'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setStatusMessage($statusMessage); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $response = $gapicClient->getInstance($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/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]'); - try { - $gapicClient->getInstance($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 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->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listBackups($formattedParent); - $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.filestore.v1.CloudFilestoreManager/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->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listBackups($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 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]'); - $response = $gapicClient->listInstances($formattedParent); - $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.filestore.v1.CloudFilestoreManager/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]'); - try { - $gapicClient->listInstances($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 restoreInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/restoreInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $statusMessage = 'statusMessage-239442758'; - $etag = 'etag3123477'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setStatusMessage($statusMessage); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/restoreInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $fileShare = 'fileShare2143984476'; - $response = $gapicClient->restoreInstance($formattedName, $fileShare); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/RestoreInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getFileShare(); - $this->assertProtobufEquals($fileShare, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function restoreInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/restoreInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $fileShare = 'fileShare2143984476'; - $response = $gapicClient->restoreInstance($formattedName, $fileShare); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->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'; - $capacityGb = 1923585408; - $storageBytes = 2035244455; - $sourceInstance = 'sourceInstance-677426119'; - $sourceFileShare = 'sourceFileShare-1224476160'; - $downloadBytes = 971924980; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacityGb($capacityGb); - $expectedResponse->setStorageBytes($storageBytes); - $expectedResponse->setSourceInstance($sourceInstance); - $expectedResponse->setSourceFileShare($sourceFileShare); - $expectedResponse->setDownloadBytes($downloadBytes); - $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 - $backup = new Backup(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateBackup($backup, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/UpdateBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getBackup(); - $this->assertProtobufEquals($backup, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $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 - $backup = new Backup(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateBackup($backup, $updateMask); - $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 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'; - $description = 'description-1724546052'; - $statusMessage = 'statusMessage-239442758'; - $etag = 'etag3123477'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setStatusMessage($statusMessage); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $response = $gapicClient->updateInstance(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.filestore.v1.CloudFilestoreManager/UpdateInstance', $actualApiFuncCall); - $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); - $response = $gapicClient->updateInstance(); - $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()); - } -} diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php deleted file mode 100644 index c4a191fe051b03de2a449a8ee5bcd5f008d38e30..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1722 zcma)6U2mIK7@nPMOHaDQqLu1yi*}M$imPo@j{X_xycyV_6KZu={CID9y2V=2Dj@cMn8_k-s=uYO7|Qt$*$P=Yd_q7crmA-zB_ z%?Kp{iQ#N9pQ8*0pAJQ$Ij(Vh*N=`bB~};dpmk<6Wh|yJ!6)0D{=hb2zGazs0%_v0Kf@Ta-+MG{a<5?BC?BtX4qu;eUqpQeP( zeGKc4%wiR64X&0@lqG)bj!+(CIAv3sELD~xM4JT`k>0baY(a*RKA-c$tBi?sGuxw85E&EbZ%yx$2aDXoSD@-z3UQM+kSqHUH_5E%|@m2hIf~&!m zFl^==Gd1*@&Wb({!5>?ocUKt*kIPK45sb(MBVP5tuKtqz6iZA^TwtYm4*vNZY}Gmt z?t{%jOWhW1_3jA|z;;XmCI*stIPBiz!4t4auT#_o>}}`8b8&4^v1V-!4#Npk&8*+f;444zz`Ru(wL^UTeVbM8$n zdN33HhGJ!ZEK|2tzSBBQNBoxk+1{KC$M#?C?;GM6xGqm|Zy0pt(9EJgw4anbvdpt&xnYuJP9@7{{n;11zn6!NZTwK$-wn51 O>y$jR^s^;c0`NZ^L?hq; diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php deleted file mode 100644 index 601f2cadd0171e6f1e36f84b7b6881a41d191e15..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1674 zcma)6%Wl&^6eURu?NFg$0V)-b0g4Ey*aUViEpiek3KDJ9gf5V!XyQ!VL9WLdk0YSU z2k;SWShD96*zggEHDAGdVQo!uUG8|~gbXia!3d}`x>^B|v&^ zR79Jaw*r{tPu?kFIWYslK$RLjAY;abZO^BggPhg6N2fRU-(4qf2ZR~Y52v52#eBNW zrqVgXVXjmYoK(qYQ#kAPBXRB%yD&Xx@D1=Sztr$%*=Re=YTUc zL{@hH#{yc^q8eAxg7WHW0T(LEwbE~=Xw=Y(uI>9g8nIxt2wRt*ZgJ613eVJHC)2E50GHF0S zBkO4PII$oNL#TuFXbGOius2_sWFZG@TCz#)R{`CIGtSnahV=0|VmgI)+fxq(JS0(I zauHYojewBk)|~b!>AI=S|FyW#syDmeig#N&NzHo5(;?Vz8pfv1Q**!ib5`Mby2Lw{ zxzo^v)csR@km1<2uCnbM$+k6=ZSPkH7d5{ZkMd7>BMY@-8F*&?>B=mnCTN1tU#kNj AinternalAddGeneratedFile( - ' -µ& -/google/firestore/admin/v1/firestore_admin.protogoogle.firestore.admin.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto(google/firestore/admin/v1/database.proto%google/firestore/admin/v1/field.proto%google/firestore/admin/v1/index.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"Q -ListDatabasesRequest9 -parent ( B)àAúA#!firestore.googleapis.com/Database"O -ListDatabasesResponse6 - databases ( 2#.google.firestore.admin.v1.Database"M -GetDatabaseRequest7 -name ( B)àAúA# -!firestore.googleapis.com/Database"„ -UpdateDatabaseRequest: -database ( 2#.google.firestore.admin.v1.DatabaseBàA/ - update_mask ( 2.google.protobuf.FieldMask" -UpdateDatabaseMetadata"Œ -CreateIndexRequest@ -parent ( B0àAúA* -(firestore.googleapis.com/CollectionGroup4 -index ( 2 .google.firestore.admin.v1.IndexBàA" -ListIndexesRequest@ -parent ( B0àAúA* -(firestore.googleapis.com/CollectionGroup -filter (  - page_size ( - -page_token ( "a -ListIndexesResponse1 -indexes ( 2 .google.firestore.admin.v1.Index -next_page_token ( "G -GetIndexRequest4 -name ( B&àAúA -firestore.googleapis.com/Index"J -DeleteIndexRequest4 -name ( B&àAúA -firestore.googleapis.com/Index"{ -UpdateFieldRequest4 -field ( 2 .google.firestore.admin.v1.FieldBàA/ - update_mask ( 2.google.protobuf.FieldMask"G -GetFieldRequest4 -name ( B&àAúA -firestore.googleapis.com/Field"Œ -ListFieldsRequest@ -parent ( B0àAúA* -(firestore.googleapis.com/CollectionGroup -filter (  - page_size ( - -page_token ( "_ -ListFieldsResponse0 -fields ( 2 .google.firestore.admin.v1.Field -next_page_token ( "„ -ExportDocumentsRequest7 -name ( B)àAúA# -!firestore.googleapis.com/Database -collection_ids (  -output_uri_prefix ( "ƒ -ImportDocumentsRequest7 -name ( B)àAúA# -!firestore.googleapis.com/Database -collection_ids (  -input_uri_prefix ( 2’ -FirestoreAdminÛ - CreateIndex-.google.firestore.admin.v1.CreateIndexRequest.google.longrunning.Operation"~‚Óä“G">/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes:indexÚA parent,indexÊA -IndexIndexOperationMetadata½ - ListIndexes-.google.firestore.admin.v1.ListIndexesRequest..google.firestore.admin.v1.ListIndexesResponse"O‚Óä“@>/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexesÚAparent§ -GetIndex*.google.firestore.admin.v1.GetIndexRequest .google.firestore.admin.v1.Index"M‚Óä“@>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}ÚAname£ - DeleteIndex-.google.firestore.admin.v1.DeleteIndexRequest.google.protobuf.Empty"M‚Óä“@*>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}ÚAname¦ -GetField*.google.firestore.admin.v1.GetFieldRequest .google.firestore.admin.v1.Field"L‚Óä“?=/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}ÚAnameÙ - UpdateField-.google.firestore.admin.v1.UpdateFieldRequest.google.longrunning.Operation"|‚Óä“L2C/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}:fieldÚAfieldÊA -FieldFieldOperationMetadata¹ - -ListFields,.google.firestore.admin.v1.ListFieldsRequest-.google.firestore.admin.v1.ListFieldsResponse"N‚Óä“?=/v1/{parent=projects/*/databases/*/collectionGroups/*}/fieldsÚAparentÝ -ExportDocuments1.google.firestore.admin.v1.ExportDocumentsRequest.google.longrunning.Operation"x‚Óä“6"1/v1/{name=projects/*/databases/*}:exportDocuments:*ÚAnameÊA2 -ExportDocumentsResponseExportDocumentsMetadataÛ -ImportDocuments1.google.firestore.admin.v1.ImportDocumentsRequest.google.longrunning.Operation"v‚Óä“6"1/v1/{name=projects/*/databases/*}:importDocuments:*ÚAnameÊA0 -google.protobuf.EmptyImportDocumentsMetadata“ - GetDatabase-.google.firestore.admin.v1.GetDatabaseRequest#.google.firestore.admin.v1.Database"0‚Óä“#!/v1/{name=projects/*/databases/*}ÚAname¦ - ListDatabases/.google.firestore.admin.v1.ListDatabasesRequest0.google.firestore.admin.v1.ListDatabasesResponse"2‚Óä“#!/v1/{parent=projects/*}/databasesÚAparentÛ -UpdateDatabase0.google.firestore.admin.v1.UpdateDatabaseRequest.google.longrunning.Operation"x‚Óä“62*/v1/{database.name=projects/*/databases/*}:databaseÚAdatabase,update_maskÊA" -DatabaseUpdateDatabaseMetadatavÊAfirestore.googleapis.comÒAXhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreBª -com.google.firestore.admin.v1BFirestoreAdminProtoPZ>google.golang.org/genproto/googleapis/firestore/admin/v1;admin¢GCFSªGoogle.Cloud.Firestore.Admin.V1ÊGoogle\\Cloud\\Firestore\\Admin\\V1ê#Google::Cloud::Firestore::Admin::V1êAL -!firestore.googleapis.com/Location\'projects/{project}/locations/{location}êAq -(firestore.googleapis.com/CollectionGroupEprojects/{project}/databases/{database}/collectionGroups/{collection}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php deleted file mode 100644 index 479885b112b72857c051d132d436700da382d844..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1705 zcmb7E?QY{l6m8O`+TMm$ut0?GA-k|y0k#4{2$wFniIcUo#91e;RAkAT*pqaS>oH@y z&|T$a;2-b63-FH@-~sk2m>H)@)ZJ=#{l_!od(J)g-tqbVhx9CkJ7_=>!f{R_G`&Rm z89^y$ISW~grp0VVI11T$N@K!xgnBL-x)WsgoXIBwnz4e1#6)w(<}op5l#?uHoESJd zr-^aVF=!Hz-*v?Zkl=HYr8p#LFgp5)Kt3NkE0Qp$EI|_BCLw9xMy_+&o z@gcgBGm=dZ4e*^LCp^Ki-y>PbX)5X)iBQv=lYG@WdD6bWOe^W=47E#*rum%6LzMG^ zY-UG@lf2-`fzmAr7OR#2f@WDM^*yp|zqu}GjaT)2`G79fTT!$U+ZV%Zujpm6d+_fq z`1F;gsJ&Z;>8oMuYS{Wkr}gJ9)YPoBI_$_{H!G;p-qU`B{a*{hFM}*(DQQ;4;q9+J z*KZ`!6^Z^>V#X4p9l-94k~qqm+i1JJ{|aD5(U%zQ8>q=qkmim`{Mkzrk7e|Ge^&uE zSTq17AxLq4wk+%jYK%vOFH7pYlzGjkyAt?tOLL))Imeel$dVbIivneLzI`1kOX9l< z{&1^x2sOp6y$x@=UeES|3wWS}wrG1mA~u9v|D@X)x}( zBl{YS(9m@sJ+iwK#~lhyZ$V?d4+frlJZe;14%F0SWMSipHM!0r#dx+gDeKyUn%MMC z8&$0V^`UL|#(`&#EXQkXn@^ruzrjcAD_mYhoYG7eZfB@5X~)90ej#C=8Bdq1g&`el ziZde4u9gc!cx5c>rVhD^l@oeX=MmPy(p5vBlAU75Gpjxp}}x<+W1|G^+gkVELcS zS&Wmp&iLGzlSC-WnX%UW0`omkKjt6Rok6!h{;T@&KpCyxjad=tE4$T|-RdWuf36~Y zUxoM^mb~<2Vam^{cS;`9R8gk6VlqudWtu0Q>8{fE^}UtNd{KJdhDF|Jk1DcsvIQ&v F{s(E384v&f diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php deleted file mode 100644 index eedfdef7ed93..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - ' -Å -(google/firestore/admin/v1/location.protogoogle.firestore.admin.v1" -LocationMetadataBá -com.google.firestore.admin.v1B LocationProtoPZ>google.golang.org/genproto/googleapis/firestore/admin/v1;admin¢GCFSªGoogle.Cloud.Firestore.Admin.V1ÊGoogle\\Cloud\\Firestore\\Admin\\V1ê#Google::Cloud::Firestore::Admin::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php deleted file mode 100644 index 59010ce41b55f2e0f4f2369d23500f20182254b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3272 zcmeHJUvJ|?5GP6hPPq^a>g9Sux1=Xsiw;LEJRq0$NE0Vm*CtVuR-%ez9D9?laJ-hi zK3Y&e2rmfn$RqE30X_yVNWh0+cOARwHCI}w?uk5QlbPSn{APCM_vthL#D`VXz#a}P zh8@&DL+k`2KcI}-)J6ShFu(z_>BuK84pf9{E!1pvkzO;p?{n9XMuCkrG^BLs;_`q5 zIAk=yWy={6ul!=8Onre(sHaL)0M8oX(6?-i8tvVE%q+)ZR<9uedi4aLR}lccqm3;9 z+qJ?FwGtrs77+jVQQsvt3K>VY(PI*t#3PJYF8PLMvW*6o8)EK#)pihhwulG`hn8pK zwRIF@3fsp%<(Y4zB&4<=gA>s+Jca|$a(gu#+5z!-o^5WbX+z9X3dJvL>*H$$92uas zI7Uso667{wL4+r7M<~E73cM{Dw*WX#zx8fJ7?0Dzrj zdHHaMj9I8SPMUO`H^*8UrU?28{O~TU-?%H32eGM|HjpYCNPV%f@@R}A+lSYo%#t|c zjw=0q zWef5tK>v*4usC;P=hAocuv{nDb<(I_AAbXJ@0dRm-jQ^gHuVN%Xgb(sR>;}R@v7}! zL&NmoRoN3&iB%I&7X=c`-a&zG&heB2&EL2{$}toeb1%_ST#)Xc-JX>$b0;`i`8@-L zD@65S$v&~XAvW2WAHSRY=Kk&PdKp-)O4Kd~Rm#cZiQgHz23^9Gb^s>aAHx0W=aptd zH@jc7b@Q;YkHi!@D@!rt{KlYG3M^z*@*GDwD~XR+AW6SGUU02 zak1R>CUL}2%<(z>0N$n%^CMBj3g8?_$d2KKP!` zfON~nyY~@1Y_;`+O4n#L%}%${eR-G^;7y}xbdAcMacndje5&LD+6S$w-sy;QR-CJq zW>w$Y6X%>b*NtXkKO@ea!>X{aAMO=q#Z;P-L+o)qz-T%C%koJ$MVoI)jrC)8rcteTe#$;-NDZ!5 zT^c!Rs>D^P#MPsXUlWU7Pnz^5)cRPibG`mYb~VP)G-;)2DUzm1C`~)s=+DXcK6;X> a#;36qo>0zW=n#8~YL=Fgoogle.firestore.admin.v1.CreateIndexRequest - */ -class CreateIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The composite index to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $index = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @type \Google\Cloud\Firestore\Admin\V1\Index $index - * Required. The composite index to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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 composite index to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\Index|null - */ - public function getIndex() - { - return $this->index; - } - - public function hasIndex() - { - return isset($this->index); - } - - public function clearIndex() - { - unset($this->index); - } - - /** - * Required. The composite index to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\Index $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->index = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php deleted file mode 100644 index 32df996622b5..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php +++ /dev/null @@ -1,317 +0,0 @@ -google.firestore.admin.v1.Database - */ -class Database extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The location of the database. Available databases are listed at - * https://cloud.google.com/firestore/docs/locations. - * - * Generated from protobuf field string location_id = 9; - */ - protected $location_id = ''; - /** - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; - */ - protected $type = 0; - /** - * The concurrency control mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; - */ - protected $concurrency_mode = 0; - /** - * The App Engine integration mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; - */ - protected $app_engine_integration_mode = 0; - /** - * Output only. The key_prefix for this database. This key_prefix is used, in combination - * with the project id ("~") to construct the - * application id that is returned from the Cloud Datastore APIs in Google App - * Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * - * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $key_prefix = ''; - /** - * This checksum 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 = 99; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * @type string $location_id - * The location of the database. Available databases are listed at - * https://cloud.google.com/firestore/docs/locations. - * @type int $type - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * @type int $concurrency_mode - * The concurrency control mode to use for this database. - * @type int $app_engine_integration_mode - * The App Engine integration mode to use for this database. - * @type string $key_prefix - * Output only. The key_prefix for this database. This key_prefix is used, in combination - * with the project id ("~") to construct the - * application id that is returned from the Cloud Datastore APIs in Google App - * Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * @type string $etag - * This checksum 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\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * - * 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 location of the database. Available databases are listed at - * https://cloud.google.com/firestore/docs/locations. - * - * Generated from protobuf field string location_id = 9; - * @return string - */ - public function getLocationId() - { - return $this->location_id; - } - - /** - * The location of the database. Available databases are listed at - * https://cloud.google.com/firestore/docs/locations. - * - * Generated from protobuf field string location_id = 9; - * @param string $var - * @return $this - */ - public function setLocationId($var) - { - GPBUtil::checkString($var, True); - $this->location_id = $var; - - return $this; - } - - /** - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DatabaseType::class); - $this->type = $var; - - return $this; - } - - /** - * The concurrency control mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; - * @return int - */ - public function getConcurrencyMode() - { - return $this->concurrency_mode; - } - - /** - * The concurrency control mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; - * @param int $var - * @return $this - */ - public function setConcurrencyMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\ConcurrencyMode::class); - $this->concurrency_mode = $var; - - return $this; - } - - /** - * The App Engine integration mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; - * @return int - */ - public function getAppEngineIntegrationMode() - { - return $this->app_engine_integration_mode; - } - - /** - * The App Engine integration mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; - * @param int $var - * @return $this - */ - public function setAppEngineIntegrationMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\AppEngineIntegrationMode::class); - $this->app_engine_integration_mode = $var; - - return $this; - } - - /** - * Output only. The key_prefix for this database. This key_prefix is used, in combination - * with the project id ("~") to construct the - * application id that is returned from the Cloud Datastore APIs in Google App - * Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * - * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKeyPrefix() - { - return $this->key_prefix; - } - - /** - * Output only. The key_prefix for this database. This key_prefix is used, in combination - * with the project id ("~") to construct the - * application id that is returned from the Cloud Datastore APIs in Google App - * Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * - * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKeyPrefix($var) - { - GPBUtil::checkString($var, True); - $this->key_prefix = $var; - - return $this; - } - - /** - * This checksum 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 = 99; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This checksum 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 = 99; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php deleted file mode 100644 index 1cc5467f9140..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php +++ /dev/null @@ -1,68 +0,0 @@ -google.firestore.admin.v1.Database.AppEngineIntegrationMode - */ -class AppEngineIntegrationMode -{ - /** - * Not used. - * - * Generated from protobuf enum APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0; - */ - const APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0; - /** - * If an App Engine application exists in the same region as this database, - * App Engine configuration will impact this database. This includes - * disabling of the application & database, as well as disabling writes to - * the database. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * Appengine has no affect on the ability of this database to serve - * requests. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - - private static $valueToName = [ - self::APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED => 'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED', - self::ENABLED => 'ENABLED', - 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(AppEngineIntegrationMode::class, \Google\Cloud\Firestore\Admin\V1\Database_AppEngineIntegrationMode::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php deleted file mode 100644 index 2e88fde688f8..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php +++ /dev/null @@ -1,77 +0,0 @@ -google.firestore.admin.v1.Database.ConcurrencyMode - */ -class ConcurrencyMode -{ - /** - * Not used. - * - * Generated from protobuf enum CONCURRENCY_MODE_UNSPECIFIED = 0; - */ - const CONCURRENCY_MODE_UNSPECIFIED = 0; - /** - * Use optimistic concurrency control by default. This mode is available - * for Cloud Firestore databases. - * - * Generated from protobuf enum OPTIMISTIC = 1; - */ - const OPTIMISTIC = 1; - /** - * Use pessimistic concurrency control by default. This mode is available - * for Cloud Firestore databases. - * This is the default setting for Cloud Firestore. - * - * Generated from protobuf enum PESSIMISTIC = 2; - */ - const PESSIMISTIC = 2; - /** - * Use optimistic concurrency control with entity groups by default. - * This is the only available mode for Cloud Datastore. - * This mode is also available for Cloud Firestore with Datastore Mode but - * is not recommended. - * - * Generated from protobuf enum OPTIMISTIC_WITH_ENTITY_GROUPS = 3; - */ - const OPTIMISTIC_WITH_ENTITY_GROUPS = 3; - - private static $valueToName = [ - self::CONCURRENCY_MODE_UNSPECIFIED => 'CONCURRENCY_MODE_UNSPECIFIED', - self::OPTIMISTIC => 'OPTIMISTIC', - self::PESSIMISTIC => 'PESSIMISTIC', - self::OPTIMISTIC_WITH_ENTITY_GROUPS => 'OPTIMISTIC_WITH_ENTITY_GROUPS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConcurrencyMode::class, \Google\Cloud\Firestore\Admin\V1\Database_ConcurrencyMode::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php deleted file mode 100644 index 18bfd4d8e662..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php +++ /dev/null @@ -1,67 +0,0 @@ -google.firestore.admin.v1.Database.DatabaseType - */ -class DatabaseType -{ - /** - * The default value. This value is used if the database type is omitted. - * - * Generated from protobuf enum DATABASE_TYPE_UNSPECIFIED = 0; - */ - const DATABASE_TYPE_UNSPECIFIED = 0; - /** - * Firestore Native Mode - * - * Generated from protobuf enum FIRESTORE_NATIVE = 1; - */ - const FIRESTORE_NATIVE = 1; - /** - * Firestore in Datastore Mode. - * - * Generated from protobuf enum DATASTORE_MODE = 2; - */ - const DATASTORE_MODE = 2; - - private static $valueToName = [ - self::DATABASE_TYPE_UNSPECIFIED => 'DATABASE_TYPE_UNSPECIFIED', - self::FIRESTORE_NATIVE => 'FIRESTORE_NATIVE', - self::DATASTORE_MODE => 'DATASTORE_MODE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DatabaseType::class, \Google\Cloud\Firestore\Admin\V1\Database_DatabaseType::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database_AppEngineIntegrationMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database_AppEngineIntegrationMode.php deleted file mode 100644 index 8edb982a880d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database_AppEngineIntegrationMode.php +++ /dev/null @@ -1,16 +0,0 @@ -google.firestore.admin.v1.DeleteIndexRequest - */ -class DeleteIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php deleted file mode 100644 index 376e43e23b7d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php +++ /dev/null @@ -1,316 +0,0 @@ -google.firestore.admin.v1.ExportDocumentsMetadata - */ -class ExportDocumentsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The state of the export operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - */ - protected $progress_bytes = null; - /** - * Which collection ids are being exported. - * - * Generated from protobuf field repeated string collection_ids = 6; - */ - private $collection_ids; - /** - * Where the entities are being exported to. - * - * Generated from protobuf field string output_uri_prefix = 7; - */ - protected $output_uri_prefix = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type int $operation_state - * The state of the export operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * @type array|\Google\Protobuf\Internal\RepeatedField $collection_ids - * Which collection ids are being exported. - * @type string $output_uri_prefix - * Where the entities are being exported to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * 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 time this operation started. - * - * 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 time this operation completed. Will be unset if operation still in - * progress. - * - * 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 this operation completed. Will be unset if operation still in - * progress. - * - * 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 state of the export operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The state of the export operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - - /** - * Which collection ids are being exported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * Which collection ids are being exported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * Where the entities are being exported to. - * - * Generated from protobuf field string output_uri_prefix = 7; - * @return string - */ - public function getOutputUriPrefix() - { - return $this->output_uri_prefix; - } - - /** - * Where the entities are being exported to. - * - * Generated from protobuf field string output_uri_prefix = 7; - * @param string $var - * @return $this - */ - public function setOutputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->output_uri_prefix = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php deleted file mode 100644 index 835ece05be07..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.firestore.admin.v1.ExportDocumentsRequest - */ -class ExportDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Which collection ids to export. Unspecified means all collections. - * - * Generated from protobuf field repeated string collection_ids = 2; - */ - private $collection_ids; - /** - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * - * Generated from protobuf field string output_uri_prefix = 3; - */ - protected $output_uri_prefix = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @type array|\Google\Protobuf\Internal\RepeatedField $collection_ids - * Which collection ids to export. Unspecified means all collections. - * @type string $output_uri_prefix - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_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. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_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; - } - - /** - * Which collection ids to export. Unspecified means all collections. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * Which collection ids to export. Unspecified means all collections. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * - * Generated from protobuf field string output_uri_prefix = 3; - * @return string - */ - public function getOutputUriPrefix() - { - return $this->output_uri_prefix; - } - - /** - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * - * Generated from protobuf field string output_uri_prefix = 3; - * @param string $var - * @return $this - */ - public function setOutputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->output_uri_prefix = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php deleted file mode 100644 index 2ae556c997c6..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php +++ /dev/null @@ -1,75 +0,0 @@ -google.firestore.admin.v1.ExportDocumentsResponse - */ -class ExportDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * - * Generated from protobuf field string output_uri_prefix = 1; - */ - protected $output_uri_prefix = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $output_uri_prefix - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * - * Generated from protobuf field string output_uri_prefix = 1; - * @return string - */ - public function getOutputUriPrefix() - { - return $this->output_uri_prefix; - } - - /** - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * - * Generated from protobuf field string output_uri_prefix = 1; - * @param string $var - * @return $this - */ - public function setOutputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->output_uri_prefix = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php deleted file mode 100644 index 3443f452678d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php +++ /dev/null @@ -1,261 +0,0 @@ -google.firestore.admin.v1.Field - */ -class Field extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A field name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path may be a simple field name, e.g. `address` or a path to fields - * within map_value , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths may be quoted using ` (backtick). The only character that needs - * to be escaped within a quoted field path is the backtick character itself, - * escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * (Note: Comments here are written in markdown syntax, so there is an - * additional layer of backticks to represent a code block) - * `\`address.city\`` represents a field named `address.city`, not the map key - * `city` in the field `address`. - * `\`*\`` represents a field named `*`, not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * The index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; - */ - protected $index_config = null; - /** - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; - */ - protected $ttl_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A field name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path may be a simple field name, e.g. `address` or a path to fields - * within map_value , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths may be quoted using ` (backtick). The only character that needs - * to be escaped within a quoted field path is the backtick character itself, - * escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * (Note: Comments here are written in markdown syntax, so there is an - * additional layer of backticks to represent a code block) - * `\`address.city\`` represents a field named `address.city`, not the map key - * `city` in the field `address`. - * `\`*\`` represents a field named `*`, not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * @type \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig $index_config - * The index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * @type \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig $ttl_config - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); - parent::__construct($data); - } - - /** - * Required. A field name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path may be a simple field name, e.g. `address` or a path to fields - * within map_value , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths may be quoted using ` (backtick). The only character that needs - * to be escaped within a quoted field path is the backtick character itself, - * escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * (Note: Comments here are written in markdown syntax, so there is an - * additional layer of backticks to represent a code block) - * `\`address.city\`` represents a field named `address.city`, not the map key - * `city` in the field `address`. - * `\`*\`` represents a field named `*`, not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A field name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path may be a simple field name, e.g. `address` or a path to fields - * within map_value , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths may be quoted using ` (backtick). The only character that needs - * to be escaped within a quoted field path is the backtick character itself, - * escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * (Note: Comments here are written in markdown syntax, so there is an - * additional layer of backticks to represent a code block) - * `\`address.city\`` represents a field named `address.city`, not the map key - * `city` in the field `address`. - * `\`*\`` represents a field named `*`, not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * - * 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 index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; - * @return \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig|null - */ - public function getIndexConfig() - { - return $this->index_config; - } - - public function hasIndexConfig() - { - return isset($this->index_config); - } - - public function clearIndexConfig() - { - unset($this->index_config); - } - - /** - * The index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; - * @param \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig $var - * @return $this - */ - public function setIndexConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig::class); - $this->index_config = $var; - - return $this; - } - - /** - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; - * @return \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig|null - */ - public function getTtlConfig() - { - return $this->ttl_config; - } - - public function hasTtlConfig() - { - return isset($this->ttl_config); - } - - public function clearTtlConfig() - { - unset($this->ttl_config); - } - - /** - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; - * @param \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig $var - * @return $this - */ - public function setTtlConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig::class); - $this->ttl_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php deleted file mode 100644 index 08601827331f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php +++ /dev/null @@ -1,208 +0,0 @@ -google.firestore.admin.v1.Field.IndexConfig - */ -class IndexConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The indexes supported for this field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - */ - private $indexes; - /** - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * - * Generated from protobuf field bool uses_ancestor_config = 2; - */ - protected $uses_ancestor_config = false; - /** - * Output only. Specifies the resource name of the `Field` from which this field's - * index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * - * Generated from protobuf field string ancestor_field = 3; - */ - protected $ancestor_field = ''; - /** - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * - * Generated from protobuf field bool reverting = 4; - */ - protected $reverting = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\Admin\V1\Index>|\Google\Protobuf\Internal\RepeatedField $indexes - * The indexes supported for this field. - * @type bool $uses_ancestor_config - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * @type string $ancestor_field - * Output only. Specifies the resource name of the `Field` from which this field's - * index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * @type bool $reverting - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); - parent::__construct($data); - } - - /** - * The indexes supported for this field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIndexes() - { - return $this->indexes; - } - - /** - * The indexes supported for this field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @param array<\Google\Cloud\Firestore\Admin\V1\Index>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIndexes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->indexes = $arr; - - return $this; - } - - /** - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * - * Generated from protobuf field bool uses_ancestor_config = 2; - * @return bool - */ - public function getUsesAncestorConfig() - { - return $this->uses_ancestor_config; - } - - /** - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * - * Generated from protobuf field bool uses_ancestor_config = 2; - * @param bool $var - * @return $this - */ - public function setUsesAncestorConfig($var) - { - GPBUtil::checkBool($var); - $this->uses_ancestor_config = $var; - - return $this; - } - - /** - * Output only. Specifies the resource name of the `Field` from which this field's - * index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * - * Generated from protobuf field string ancestor_field = 3; - * @return string - */ - public function getAncestorField() - { - return $this->ancestor_field; - } - - /** - * Output only. Specifies the resource name of the `Field` from which this field's - * index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * - * Generated from protobuf field string ancestor_field = 3; - * @param string $var - * @return $this - */ - public function setAncestorField($var) - { - GPBUtil::checkString($var, True); - $this->ancestor_field = $var; - - return $this; - } - - /** - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * - * Generated from protobuf field bool reverting = 4; - * @return bool - */ - public function getReverting() - { - return $this->reverting; - } - - /** - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * - * Generated from protobuf field bool reverting = 4; - * @param bool $var - * @return $this - */ - public function setReverting($var) - { - GPBUtil::checkBool($var); - $this->reverting = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IndexConfig::class, \Google\Cloud\Firestore\Admin\V1\Field_IndexConfig::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php deleted file mode 100644 index ba50384a783f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php +++ /dev/null @@ -1,74 +0,0 @@ -google.firestore.admin.v1.Field.TtlConfig - */ -class TtlConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The state of the TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. The state of the TTL configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The state of the TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig\State::class); - $this->state = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TtlConfig::class, \Google\Cloud\Firestore\Admin\V1\Field_TtlConfig::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php deleted file mode 100644 index 7722ca6e7e0a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.firestore.admin.v1.Field.TtlConfig.State - */ -class State -{ - /** - * The state is unspecified or unknown. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The TTL is being applied. There is an active long-running operation to - * track the change. Newly written documents will have TTLs applied as - * requested. Requested TTLs on existing documents are still being - * processed. When TTLs on all existing documents have been processed, the - * state will move to 'ACTIVE'. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The TTL is active for all documents. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The TTL configuration could not be enabled for all existing documents. - * Newly written documents will continue to have their TTL applied. - * The LRO returned when last attempting to enable TTL for this `Field` - * has failed, and may have more details. - * - * Generated from protobuf enum NEEDS_REPAIR = 3; - */ - const NEEDS_REPAIR = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::NEEDS_REPAIR => 'NEEDS_REPAIR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Firestore\Admin\V1\Field_TtlConfig_State::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php deleted file mode 100644 index 4f8e269b5075..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php +++ /dev/null @@ -1,368 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata - */ -class FieldOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * - * Generated from protobuf field string field = 3; - */ - protected $field = ''; - /** - * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this - * operation. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; - */ - private $index_config_deltas; - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; - */ - protected $state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; - */ - protected $progress_bytes = null; - /** - * Describes the deltas of TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; - */ - protected $ttl_config_delta = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type string $field - * The field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * @type array<\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta>|\Google\Protobuf\Internal\RepeatedField $index_config_deltas - * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this - * operation. - * @type int $state - * The state of the operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta $ttl_config_delta - * Describes the deltas of TTL configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * 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 time this operation started. - * - * 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 time this operation completed. Will be unset if operation still in - * progress. - * - * 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 this operation completed. Will be unset if operation still in - * progress. - * - * 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 field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * - * Generated from protobuf field string field = 3; - * @return string - */ - public function getField() - { - return $this->field; - } - - /** - * The field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * - * Generated from protobuf field string field = 3; - * @param string $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkString($var, True); - $this->field = $var; - - return $this; - } - - /** - * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this - * operation. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIndexConfigDeltas() - { - return $this->index_config_deltas; - } - - /** - * A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this - * operation. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; - * @param array<\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIndexConfigDeltas($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta::class); - $this->index_config_deltas = $arr; - - return $this; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - - /** - * Describes the deltas of TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; - * @return \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta|null - */ - public function getTtlConfigDelta() - { - return $this->ttl_config_delta; - } - - public function hasTtlConfigDelta() - { - return isset($this->ttl_config_delta); - } - - public function clearTtlConfigDelta() - { - unset($this->ttl_config_delta); - } - - /** - * Describes the deltas of TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; - * @param \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta $var - * @return $this - */ - public function setTtlConfigDelta($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta::class); - $this->ttl_config_delta = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php deleted file mode 100644 index 1ad9e51b4401..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php +++ /dev/null @@ -1,114 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta - */ -class IndexConfigDelta extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies how the index is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; - */ - protected $change_type = 0; - /** - * The index being changed. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; - */ - protected $index = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $change_type - * Specifies how the index is changing. - * @type \Google\Cloud\Firestore\Admin\V1\Index $index - * The index being changed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * Specifies how the index is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; - * @return int - */ - public function getChangeType() - { - return $this->change_type; - } - - /** - * Specifies how the index is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; - * @param int $var - * @return $this - */ - public function setChangeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta\ChangeType::class); - $this->change_type = $var; - - return $this; - } - - /** - * The index being changed. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; - * @return \Google\Cloud\Firestore\Admin\V1\Index|null - */ - public function getIndex() - { - return $this->index; - } - - public function hasIndex() - { - return isset($this->index); - } - - public function clearIndex() - { - unset($this->index); - } - - /** - * The index being changed. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; - * @param \Google\Cloud\Firestore\Admin\V1\Index $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->index = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IndexConfigDelta::class, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata_IndexConfigDelta::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php deleted file mode 100644 index df7d29035371..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType - */ -class ChangeType -{ - /** - * The type of change is not specified or known. - * - * Generated from protobuf enum CHANGE_TYPE_UNSPECIFIED = 0; - */ - const CHANGE_TYPE_UNSPECIFIED = 0; - /** - * The single field index is being added. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * The single field index is being removed. - * - * Generated from protobuf enum REMOVE = 2; - */ - const REMOVE = 2; - - private static $valueToName = [ - self::CHANGE_TYPE_UNSPECIFIED => 'CHANGE_TYPE_UNSPECIFIED', - self::ADD => 'ADD', - self::REMOVE => 'REMOVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ChangeType::class, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata_IndexConfigDelta_ChangeType::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php deleted file mode 100644 index 985b41237e37..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php +++ /dev/null @@ -1,70 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta - */ -class TtlConfigDelta extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies how the TTL configuration is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; - */ - protected $change_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $change_type - * Specifies how the TTL configuration is changing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * Specifies how the TTL configuration is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; - * @return int - */ - public function getChangeType() - { - return $this->change_type; - } - - /** - * Specifies how the TTL configuration is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; - * @param int $var - * @return $this - */ - public function setChangeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta\ChangeType::class); - $this->change_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TtlConfigDelta::class, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata_TtlConfigDelta::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php deleted file mode 100644 index 600dbab57322..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType - */ -class ChangeType -{ - /** - * The type of change is not specified or known. - * - * Generated from protobuf enum CHANGE_TYPE_UNSPECIFIED = 0; - */ - const CHANGE_TYPE_UNSPECIFIED = 0; - /** - * The TTL config is being added. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * The TTL config is being removed. - * - * Generated from protobuf enum REMOVE = 2; - */ - const REMOVE = 2; - - private static $valueToName = [ - self::CHANGE_TYPE_UNSPECIFIED => 'CHANGE_TYPE_UNSPECIFIED', - self::ADD => 'ADD', - self::REMOVE => 'REMOVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ChangeType::class, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata_TtlConfigDelta_ChangeType::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata_IndexConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata_IndexConfigDelta.php deleted file mode 100644 index 9aba40a35e57..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata_IndexConfigDelta.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/CreateIndex', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists composite indexes. - * @param \Google\Cloud\Firestore\Admin\V1\ListIndexesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListIndexes(\Google\Cloud\Firestore\Admin\V1\ListIndexesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/ListIndexes', - $argument, - ['\Google\Cloud\Firestore\Admin\V1\ListIndexesResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets a composite index. - * @param \Google\Cloud\Firestore\Admin\V1\GetIndexRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetIndex(\Google\Cloud\Firestore\Admin\V1\GetIndexRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/GetIndex', - $argument, - ['\Google\Cloud\Firestore\Admin\V1\Index', 'decode'], - $metadata, $options); - } - - /** - * Deletes a composite index. - * @param \Google\Cloud\Firestore\Admin\V1\DeleteIndexRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteIndex(\Google\Cloud\Firestore\Admin\V1\DeleteIndexRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/DeleteIndex', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Gets the metadata and configuration for a Field. - * @param \Google\Cloud\Firestore\Admin\V1\GetFieldRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetField(\Google\Cloud\Firestore\Admin\V1\GetFieldRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/GetField', - $argument, - ['\Google\Cloud\Firestore\Admin\V1\Field', 'decode'], - $metadata, $options); - } - - /** - * Updates a field configuration. Currently, field updates apply only to - * single field index configuration. However, calls to - * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should provide a field mask to avoid - * changing any configuration that the caller isn't aware of. The field mask - * should be specified as: `{ paths: "index_config" }`. - * - * This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to - * track the status of the field update. The metadata for - * the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. - * - * To configure the default field settings for the database, use - * the special `Field` with resource name: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. - * @param \Google\Cloud\Firestore\Admin\V1\UpdateFieldRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateField(\Google\Cloud\Firestore\Admin\V1\UpdateFieldRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/UpdateField', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists the field configuration and metadata for this database. - * - * Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields - * that have been explicitly overridden. To issue this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to - * `indexConfig.usesAncestorConfig:false` . - * @param \Google\Cloud\Firestore\Admin\V1\ListFieldsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListFields(\Google\Cloud\Firestore\Admin\V1\ListFieldsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/ListFields', - $argument, - ['\Google\Cloud\Firestore\Admin\V1\ListFieldsResponse', 'decode'], - $metadata, $options); - } - - /** - * Exports a copy of all or a subset of documents from Google Cloud Firestore - * to another storage system, such as Google Cloud Storage. Recent updates to - * documents may not be reflected in the export. The export occurs in the - * background and its progress can be monitored and managed via the - * Operation resource that is created. The output of an export may only be - * used once the associated operation is done. If an export operation is - * cancelled before completion it may leave partial data behind in Google - * Cloud Storage. - * - * For more details on export behavior and output format, refer to: - * https://cloud.google.com/firestore/docs/manage-data/export-import - * @param \Google\Cloud\Firestore\Admin\V1\ExportDocumentsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ExportDocuments(\Google\Cloud\Firestore\Admin\V1\ExportDocumentsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/ExportDocuments', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Imports documents into Google Cloud Firestore. Existing documents with the - * same name are overwritten. The import occurs in the background and its - * progress can be monitored and managed via the Operation resource that is - * created. If an ImportDocuments operation is cancelled, it is possible - * that a subset of the data has already been imported to Cloud Firestore. - * @param \Google\Cloud\Firestore\Admin\V1\ImportDocumentsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ImportDocuments(\Google\Cloud\Firestore\Admin\V1\ImportDocumentsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/ImportDocuments', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Gets information about a database. - * @param \Google\Cloud\Firestore\Admin\V1\GetDatabaseRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetDatabase(\Google\Cloud\Firestore\Admin\V1\GetDatabaseRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/GetDatabase', - $argument, - ['\Google\Cloud\Firestore\Admin\V1\Database', 'decode'], - $metadata, $options); - } - - /** - * List all the databases in the project. - * @param \Google\Cloud\Firestore\Admin\V1\ListDatabasesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListDatabases(\Google\Cloud\Firestore\Admin\V1\ListDatabasesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/ListDatabases', - $argument, - ['\Google\Cloud\Firestore\Admin\V1\ListDatabasesResponse', 'decode'], - $metadata, $options); - } - - /** - * Updates a database. - * @param \Google\Cloud\Firestore\Admin\V1\UpdateDatabaseRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateDatabase(\Google\Cloud\Firestore\Admin\V1\UpdateDatabaseRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.admin.v1.FirestoreAdmin/UpdateDatabase', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php deleted file mode 100644 index 19ba9997a9d8..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.firestore.admin.v1.GetDatabaseRequest - */ -class GetDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_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. A name of the form - * `projects/{project_id}/databases/{database_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_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. A name of the form - * `projects/{project_id}/databases/{database_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php deleted file mode 100644 index b9db90b82e7d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.firestore.admin.v1.GetFieldRequest - */ -class GetFieldRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php deleted file mode 100644 index 8e178234feb5..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.firestore.admin.v1.GetIndexRequest - */ -class GetIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php deleted file mode 100644 index cc81aaaf1dd7..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php +++ /dev/null @@ -1,316 +0,0 @@ -google.firestore.admin.v1.ImportDocumentsMetadata - */ -class ImportDocumentsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The state of the import operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - */ - protected $progress_bytes = null; - /** - * Which collection ids are being imported. - * - * Generated from protobuf field repeated string collection_ids = 6; - */ - private $collection_ids; - /** - * The location of the documents being imported. - * - * Generated from protobuf field string input_uri_prefix = 7; - */ - protected $input_uri_prefix = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type int $operation_state - * The state of the import operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * @type array|\Google\Protobuf\Internal\RepeatedField $collection_ids - * Which collection ids are being imported. - * @type string $input_uri_prefix - * The location of the documents being imported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * 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 time this operation started. - * - * 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 time this operation completed. Will be unset if operation still in - * progress. - * - * 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 this operation completed. Will be unset if operation still in - * progress. - * - * 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 state of the import operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The state of the import operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - - /** - * Which collection ids are being imported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * Which collection ids are being imported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * The location of the documents being imported. - * - * Generated from protobuf field string input_uri_prefix = 7; - * @return string - */ - public function getInputUriPrefix() - { - return $this->input_uri_prefix; - } - - /** - * The location of the documents being imported. - * - * Generated from protobuf field string input_uri_prefix = 7; - * @param string $var - * @return $this - */ - public function setInputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->input_uri_prefix = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php deleted file mode 100644 index 6eea4b3ae316..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.firestore.admin.v1.ImportDocumentsRequest - */ -class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Which collection ids to import. Unspecified means all collections included - * in the import. - * - * Generated from protobuf field repeated string collection_ids = 2; - */ - private $collection_ids; - /** - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * - * Generated from protobuf field string input_uri_prefix = 3; - */ - protected $input_uri_prefix = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @type array|\Google\Protobuf\Internal\RepeatedField $collection_ids - * Which collection ids to import. Unspecified means all collections included - * in the import. - * @type string $input_uri_prefix - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_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. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_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; - } - - /** - * Which collection ids to import. Unspecified means all collections included - * in the import. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * Which collection ids to import. Unspecified means all collections included - * in the import. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * - * Generated from protobuf field string input_uri_prefix = 3; - * @return string - */ - public function getInputUriPrefix() - { - return $this->input_uri_prefix; - } - - /** - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * - * Generated from protobuf field string input_uri_prefix = 3; - * @param string $var - * @return $this - */ - public function setInputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->input_uri_prefix = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php deleted file mode 100644 index 1ae6dafbab4f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php +++ /dev/null @@ -1,234 +0,0 @@ -google.firestore.admin.v1.Index - */ -class Index extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection id. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection id as this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; - */ - protected $query_scope = 0; - /** - * The fields supported by this index. - * For composite indexes, this is always 2 or more fields. - * The last field entry is always for the field path `__name__`. If, on - * creation, `__name__` was not specified as the last field, it will be added - * automatically with the same direction as that of the last field defined. If - * the final field in a composite index is not directional, the `__name__` - * will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; - */ - private $fields; - /** - * Output only. The serving state of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * @type int $query_scope - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection id. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection id as this index. - * @type array<\Google\Cloud\Firestore\Admin\V1\Index\IndexField>|\Google\Protobuf\Internal\RepeatedField $fields - * The fields supported by this index. - * For composite indexes, this is always 2 or more fields. - * The last field entry is always for the field path `__name__`. If, on - * creation, `__name__` was not specified as the last field, it will be added - * automatically with the same direction as that of the last field defined. If - * the final field in a composite index is not directional, the `__name__` - * will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * @type int $state - * Output only. The serving state of the index. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); - parent::__construct($data); - } - - /** - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * - * 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; - } - - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection id. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection id as this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; - * @return int - */ - public function getQueryScope() - { - return $this->query_scope; - } - - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection id. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection id as this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; - * @param int $var - * @return $this - */ - public function setQueryScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\QueryScope::class); - $this->query_scope = $var; - - return $this; - } - - /** - * The fields supported by this index. - * For composite indexes, this is always 2 or more fields. - * The last field entry is always for the field path `__name__`. If, on - * creation, `__name__` was not specified as the last field, it will be added - * automatically with the same direction as that of the last field defined. If - * the final field in a composite index is not directional, the `__name__` - * will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The fields supported by this index. - * For composite indexes, this is always 2 or more fields. - * The last field entry is always for the field path `__name__`. If, on - * creation, `__name__` was not specified as the last field, it will be added - * automatically with the same direction as that of the last field defined. If - * the final field in a composite index is not directional, the `__name__` - * will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; - * @param array<\Google\Cloud\Firestore\Admin\V1\Index\IndexField>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index\IndexField::class); - $this->fields = $arr; - - return $this; - } - - /** - * Output only. The serving state of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The serving state of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php deleted file mode 100644 index 8c8cb50ff2cb..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php +++ /dev/null @@ -1,158 +0,0 @@ -google.firestore.admin.v1.Index.IndexField - */ -class IndexField extends \Google\Protobuf\Internal\Message -{ - /** - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * - * Generated from protobuf field string field_path = 1; - */ - protected $field_path = ''; - protected $value_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_path - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * @type int $order - * Indicates that this field supports ordering by the specified order or - * comparing using =, !=, <, <=, >, >=. - * @type int $array_config - * Indicates that this field supports operations on `array_value`s. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); - parent::__construct($data); - } - - /** - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * - * Generated from protobuf field string field_path = 1; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * - * Generated from protobuf field string field_path = 1; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - - /** - * Indicates that this field supports ordering by the specified order or - * comparing using =, !=, <, <=, >, >=. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.Order order = 2; - * @return int - */ - public function getOrder() - { - return $this->readOneof(2); - } - - public function hasOrder() - { - return $this->hasOneof(2); - } - - /** - * Indicates that this field supports ordering by the specified order or - * comparing using =, !=, <, <=, >, >=. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.Order order = 2; - * @param int $var - * @return $this - */ - public function setOrder($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\Order::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Indicates that this field supports operations on `array_value`s. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; - * @return int - */ - public function getArrayConfig() - { - return $this->readOneof(3); - } - - public function hasArrayConfig() - { - return $this->hasOneof(3); - } - - /** - * Indicates that this field supports operations on `array_value`s. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; - * @param int $var - * @return $this - */ - public function setArrayConfig($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\ArrayConfig::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getValueMode() - { - return $this->whichOneof("value_mode"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IndexField::class, \Google\Cloud\Firestore\Admin\V1\Index_IndexField::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php deleted file mode 100644 index e7ba6fe94de4..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php +++ /dev/null @@ -1,57 +0,0 @@ -google.firestore.admin.v1.Index.IndexField.ArrayConfig - */ -class ArrayConfig -{ - /** - * The index does not support additional array queries. - * - * Generated from protobuf enum ARRAY_CONFIG_UNSPECIFIED = 0; - */ - const ARRAY_CONFIG_UNSPECIFIED = 0; - /** - * The index supports array containment queries. - * - * Generated from protobuf enum CONTAINS = 1; - */ - const CONTAINS = 1; - - private static $valueToName = [ - self::ARRAY_CONFIG_UNSPECIFIED => 'ARRAY_CONFIG_UNSPECIFIED', - self::CONTAINS => 'CONTAINS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ArrayConfig::class, \Google\Cloud\Firestore\Admin\V1\Index_IndexField_ArrayConfig::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php deleted file mode 100644 index d523938322b4..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php +++ /dev/null @@ -1,64 +0,0 @@ -google.firestore.admin.v1.Index.IndexField.Order - */ -class Order -{ - /** - * The ordering is unspecified. Not a valid option. - * - * Generated from protobuf enum ORDER_UNSPECIFIED = 0; - */ - const ORDER_UNSPECIFIED = 0; - /** - * The field is ordered by ascending field value. - * - * Generated from protobuf enum ASCENDING = 1; - */ - const ASCENDING = 1; - /** - * The field is ordered by descending field value. - * - * Generated from protobuf enum DESCENDING = 2; - */ - const DESCENDING = 2; - - private static $valueToName = [ - self::ORDER_UNSPECIFIED => 'ORDER_UNSPECIFIED', - self::ASCENDING => 'ASCENDING', - self::DESCENDING => 'DESCENDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Order::class, \Google\Cloud\Firestore\Admin\V1\Index_IndexField_Order::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php deleted file mode 100644 index fd15c2606d85..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php +++ /dev/null @@ -1,69 +0,0 @@ -google.firestore.admin.v1.Index.QueryScope - */ -class QueryScope -{ - /** - * The query scope is unspecified. Not a valid option. - * - * Generated from protobuf enum QUERY_SCOPE_UNSPECIFIED = 0; - */ - const QUERY_SCOPE_UNSPECIFIED = 0; - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified - * at query time, and that has the collection id specified by the index. - * - * Generated from protobuf enum COLLECTION = 1; - */ - const COLLECTION = 1; - /** - * Indexes with a collection group query scope specified allow queries - * against all collections that has the collection id specified by the - * index. - * - * Generated from protobuf enum COLLECTION_GROUP = 2; - */ - const COLLECTION_GROUP = 2; - - private static $valueToName = [ - self::QUERY_SCOPE_UNSPECIFIED => 'QUERY_SCOPE_UNSPECIFIED', - self::COLLECTION => 'COLLECTION', - self::COLLECTION_GROUP => 'COLLECTION_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(QueryScope::class, \Google\Cloud\Firestore\Admin\V1\Index_QueryScope::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php deleted file mode 100644 index d9f96475cd8e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.firestore.admin.v1.Index.State - */ -class State -{ - /** - * The state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The index is being created. - * There is an active long-running operation for the index. - * The index is updated when writing a document. - * Some index data may exist. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The index is ready to be used. - * The index is updated when writing a document. - * The index is fully populated from all stored documents it applies to. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The index was being created, but something went wrong. - * There is no active long-running operation for the index, - * and the most recently finished long-running operation failed. - * The index is not updated when writing a document. - * Some index data may exist. - * Use the google.longrunning.Operations API to determine why the operation - * that last attempted to create this index failed, then re-create the - * index. - * - * Generated from protobuf enum NEEDS_REPAIR = 3; - */ - const NEEDS_REPAIR = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::NEEDS_REPAIR => 'NEEDS_REPAIR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Firestore\Admin\V1\Index_State::class); - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php deleted file mode 100644 index cfd0255b83c4..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php +++ /dev/null @@ -1,286 +0,0 @@ -google.firestore.admin.v1.IndexOperationMetadata - */ -class IndexOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string index = 3; - */ - protected $index = ''; - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; - */ - protected $state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; - */ - protected $progress_bytes = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type string $index - * The index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * @type int $state - * The state of the operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * 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 time this operation started. - * - * 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 time this operation completed. Will be unset if operation still in - * progress. - * - * 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 this operation completed. Will be unset if operation still in - * progress. - * - * 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 index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string index = 3; - * @return string - */ - public function getIndex() - { - return $this->index; - } - - /** - * The index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string index = 3; - * @param string $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkString($var, True); - $this->index = $var; - - return $this; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_IndexField.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_IndexField.php deleted file mode 100644 index 5ab5c301b309..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index_IndexField.php +++ /dev/null @@ -1,16 +0,0 @@ -google.firestore.admin.v1.ListDatabasesRequest - */ -class ListDatabasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent name of the form - * `projects/{project_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_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. A parent name of the form - * `projects/{project_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; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php deleted file mode 100644 index 33aef88989c6..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.firestore.admin.v1.ListDatabasesResponse - */ -class ListDatabasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The databases in the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; - */ - private $databases; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\Admin\V1\Database>|\Google\Protobuf\Internal\RepeatedField $databases - * The databases in the project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The databases in the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDatabases() - { - return $this->databases; - } - - /** - * The databases in the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; - * @param array<\Google\Cloud\Firestore\Admin\V1\Database>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDatabases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Database::class); - $this->databases = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php deleted file mode 100644 index 0fef006ed9b7..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.firestore.admin.v1.ListFieldsRequest - */ -class ListFieldsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields - * that have been explicitly overridden. To issue this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with a filter that includes - * `indexConfig.usesAncestorConfig:false` . - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next - * page of results. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @type string $filter - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields - * that have been explicitly overridden. To issue this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with a filter that includes - * `indexConfig.usesAncestorConfig:false` . - * @type int $page_size - * The number of results to return. - * @type string $page_token - * A page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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 filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields - * that have been explicitly overridden. To issue this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with a filter that includes - * `indexConfig.usesAncestorConfig:false` . - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields - * that have been explicitly overridden. To issue this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with a filter that includes - * `indexConfig.usesAncestorConfig:false` . - * - * 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 number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The 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 page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next - * page of results. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], that may be used to get the next - * page of results. - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php deleted file mode 100644 index 3bd35bb3514a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.firestore.admin.v1.ListFieldsResponse - */ -class ListFieldsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested fields. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; - */ - private $fields; - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * 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\Firestore\Admin\V1\Field>|\Google\Protobuf\Internal\RepeatedField $fields - * The requested fields. - * @type string $next_page_token - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The requested fields. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The requested fields. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; - * @param array<\Google\Cloud\Firestore\Admin\V1\Field>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Field::class); - $this->fields = $arr; - - return $this; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php deleted file mode 100644 index 3d927a5c22a9..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php +++ /dev/null @@ -1,181 +0,0 @@ -google.firestore.admin.v1.ListIndexesRequest - */ -class ListIndexesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next - * page of results. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @type string $filter - * The filter to apply to list results. - * @type int $page_size - * The number of results to return. - * @type string $page_token - * A page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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 filter to apply to list results. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter to apply to list results. - * - * 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 number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The 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 page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next - * page of results. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], that may be used to get the next - * page of results. - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php deleted file mode 100644 index 217e36797b3e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.firestore.admin.v1.ListIndexesResponse - */ -class ListIndexesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested indexes. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - */ - private $indexes; - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * 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\Firestore\Admin\V1\Index>|\Google\Protobuf\Internal\RepeatedField $indexes - * The requested indexes. - * @type string $next_page_token - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The requested indexes. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIndexes() - { - return $this->indexes; - } - - /** - * The requested indexes. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @param array<\Google\Cloud\Firestore\Admin\V1\Index>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIndexes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->indexes = $arr; - - return $this; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php deleted file mode 100644 index 03ab2cf48f26..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.firestore.admin.v1.LocationMetadata - */ -class LocationMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Location::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php deleted file mode 100644 index 73244df17d28..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php +++ /dev/null @@ -1,98 +0,0 @@ -google.firestore.admin.v1.OperationState - */ -class OperationState -{ - /** - * Unspecified. - * - * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; - */ - const OPERATION_STATE_UNSPECIFIED = 0; - /** - * Request is being prepared for processing. - * - * Generated from protobuf enum INITIALIZING = 1; - */ - const INITIALIZING = 1; - /** - * Request is actively being processed. - * - * Generated from protobuf enum PROCESSING = 2; - */ - const PROCESSING = 2; - /** - * Request is in the process of being cancelled after user called - * google.longrunning.Operations.CancelOperation on the operation. - * - * Generated from protobuf enum CANCELLING = 3; - */ - const CANCELLING = 3; - /** - * Request has been processed and is in its finalization stage. - * - * Generated from protobuf enum FINALIZING = 4; - */ - const FINALIZING = 4; - /** - * Request has completed successfully. - * - * Generated from protobuf enum SUCCESSFUL = 5; - */ - const SUCCESSFUL = 5; - /** - * Request has finished being processed, but encountered an error. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - /** - * Request has finished being cancelled after user called - * google.longrunning.Operations.CancelOperation. - * - * Generated from protobuf enum CANCELLED = 7; - */ - const CANCELLED = 7; - - private static $valueToName = [ - self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', - self::INITIALIZING => 'INITIALIZING', - self::PROCESSING => 'PROCESSING', - self::CANCELLING => 'CANCELLING', - self::FINALIZING => 'FINALIZING', - self::SUCCESSFUL => 'SUCCESSFUL', - self::FAILED => 'FAILED', - self::CANCELLED => 'CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php deleted file mode 100644 index 115336419f52..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php +++ /dev/null @@ -1,103 +0,0 @@ -google.firestore.admin.v1.Progress - */ -class Progress extends \Google\Protobuf\Internal\Message -{ - /** - * The amount of work estimated. - * - * Generated from protobuf field int64 estimated_work = 1; - */ - protected $estimated_work = 0; - /** - * The amount of work completed. - * - * Generated from protobuf field int64 completed_work = 2; - */ - protected $completed_work = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $estimated_work - * The amount of work estimated. - * @type int|string $completed_work - * The amount of work completed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The amount of work estimated. - * - * Generated from protobuf field int64 estimated_work = 1; - * @return int|string - */ - public function getEstimatedWork() - { - return $this->estimated_work; - } - - /** - * The amount of work estimated. - * - * Generated from protobuf field int64 estimated_work = 1; - * @param int|string $var - * @return $this - */ - public function setEstimatedWork($var) - { - GPBUtil::checkInt64($var); - $this->estimated_work = $var; - - return $this; - } - - /** - * The amount of work completed. - * - * Generated from protobuf field int64 completed_work = 2; - * @return int|string - */ - public function getCompletedWork() - { - return $this->completed_work; - } - - /** - * The amount of work completed. - * - * Generated from protobuf field int64 completed_work = 2; - * @param int|string $var - * @return $this - */ - public function setCompletedWork($var) - { - GPBUtil::checkInt64($var); - $this->completed_work = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php deleted file mode 100644 index bc68c8671ec8..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.firestore.admin.v1.UpdateDatabaseMetadata - */ -class UpdateDatabaseMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php deleted file mode 100644 index e70a1e3eda8f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php +++ /dev/null @@ -1,121 +0,0 @@ -google.firestore.admin.v1.UpdateDatabaseRequest - */ -class UpdateDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database to update. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Database $database - * Required. The database to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database to update. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\Database|null - */ - public function getDatabase() - { - return $this->database; - } - - public function hasDatabase() - { - return isset($this->database); - } - - public function clearDatabase() - { - unset($this->database); - } - - /** - * Required. The database to update. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\Database $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database::class); - $this->database = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * 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); - } - - /** - * The list of fields to be updated. - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php deleted file mode 100644 index 37b58bf5fdd1..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.firestore.admin.v1.UpdateFieldRequest - */ -class UpdateFieldRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The field to be updated. - * - * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $field = null; - /** - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Field $field - * Required. The field to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The field to be updated. - * - * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\Field|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * Required. The field to be updated. - * - * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\Field $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field::class); - $this->field = $var; - - return $this; - } - - /** - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * - * 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 mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * - * 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/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php deleted file mode 100644 index 3c3048a00aef..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php +++ /dev/null @@ -1,88 +0,0 @@ -createIndex($formattedParent, $index); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Index $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FirestoreAdminClient::collectionGroupName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]' - ); - - create_index_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_CreateIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php deleted file mode 100644 index a53adba8e1f3..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php +++ /dev/null @@ -1,70 +0,0 @@ -deleteIndex($formattedName); - 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 = FirestoreAdminClient::indexName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]', - '[INDEX]' - ); - - delete_index_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DeleteIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php deleted file mode 100644 index 9ea7cf889d8b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php +++ /dev/null @@ -1,89 +0,0 @@ -exportDocuments($formattedName); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExportDocumentsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - export_documents_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_ExportDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php deleted file mode 100644 index d0e82348fda5..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php +++ /dev/null @@ -1,67 +0,0 @@ -getDatabase($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - get_database_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php deleted file mode 100644 index 4902ba581b2a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php +++ /dev/null @@ -1,72 +0,0 @@ -getField($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::fieldName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]', - '[FIELD]' - ); - - get_field_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetField_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php deleted file mode 100644 index 437a1688b685..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php +++ /dev/null @@ -1,72 +0,0 @@ -getIndex($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::indexName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]', - '[INDEX]' - ); - - get_index_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php deleted file mode 100644 index c60f783726a4..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php +++ /dev/null @@ -1,80 +0,0 @@ -importDocuments($formattedName); - $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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - import_documents_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_ImportDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php deleted file mode 100644 index c8f30d8ed1e9..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php +++ /dev/null @@ -1,67 +0,0 @@ -listDatabases($formattedParent); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FirestoreAdminClient::projectName('[PROJECT]'); - - list_databases_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListDatabases_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php deleted file mode 100644 index 2cb5b5c53a2a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php +++ /dev/null @@ -1,81 +0,0 @@ -listFields($formattedParent); - - /** @var Field $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 = FirestoreAdminClient::collectionGroupName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]' - ); - - list_fields_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListFields_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php deleted file mode 100644 index 58bf7a441e7f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php +++ /dev/null @@ -1,76 +0,0 @@ -listIndexes($formattedParent); - - /** @var Index $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 = FirestoreAdminClient::collectionGroupName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]' - ); - - list_indexes_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListIndexes_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php deleted file mode 100644 index d27e88d33eda..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php +++ /dev/null @@ -1,68 +0,0 @@ -updateDatabase($database); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Database $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - 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 firestore_v1_generated_FirestoreAdmin_UpdateDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php deleted file mode 100644 index 40f1a0cc5edb..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php +++ /dev/null @@ -1,118 +0,0 @@ -setName($fieldName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->updateField($field); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Field $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $fieldName = '[NAME]'; - - update_field_sample($fieldName); -} -// [END firestore_v1_generated_FirestoreAdmin_UpdateField_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/FirestoreAdminClient.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/FirestoreAdminClient.php deleted file mode 100644 index d1687b1cb13a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/FirestoreAdminClient.php +++ /dev/null @@ -1,34 +0,0 @@ -collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - * $index = new Index(); - * $operationResponse = $firestoreAdminClient->createIndex($formattedParent, $index); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->createIndex($formattedParent, $index); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'createIndex'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->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. - */ -class FirestoreAdminGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.firestore.admin.v1.FirestoreAdmin'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'firestore.googleapis.com'; - - /** 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/datastore', - ]; - - private static $collectionGroupNameTemplate; - - private static $databaseNameTemplate; - - private static $fieldNameTemplate; - - private static $indexNameTemplate; - - private static $projectNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/firestore_admin_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_admin_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_admin_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/firestore_admin_rest_client_config.php', - ], - ], - ]; - } - - private static function getCollectionGroupNameTemplate() - { - if (self::$collectionGroupNameTemplate == null) { - self::$collectionGroupNameTemplate = new PathTemplate('projects/{project}/databases/{database}/collectionGroups/{collection}'); - } - - return self::$collectionGroupNameTemplate; - } - - private static function getDatabaseNameTemplate() - { - if (self::$databaseNameTemplate == null) { - self::$databaseNameTemplate = new PathTemplate('projects/{project}/databases/{database}'); - } - - return self::$databaseNameTemplate; - } - - private static function getFieldNameTemplate() - { - if (self::$fieldNameTemplate == null) { - self::$fieldNameTemplate = new PathTemplate('projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}'); - } - - return self::$fieldNameTemplate; - } - - private static function getIndexNameTemplate() - { - if (self::$indexNameTemplate == null) { - self::$indexNameTemplate = new PathTemplate('projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}'); - } - - return self::$indexNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'collectionGroup' => self::getCollectionGroupNameTemplate(), - 'database' => self::getDatabaseNameTemplate(), - 'field' => self::getFieldNameTemplate(), - 'index' => self::getIndexNameTemplate(), - 'project' => self::getProjectNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * collection_group resource. - * - * @param string $project - * @param string $database - * @param string $collection - * - * @return string The formatted collection_group resource. - */ - public static function collectionGroupName($project, $database, $collection) - { - return self::getCollectionGroupNameTemplate()->render([ - 'project' => $project, - 'database' => $database, - 'collection' => $collection, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a database - * resource. - * - * @param string $project - * @param string $database - * - * @return string The formatted database resource. - */ - public static function databaseName($project, $database) - { - return self::getDatabaseNameTemplate()->render([ - 'project' => $project, - 'database' => $database, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a field - * resource. - * - * @param string $project - * @param string $database - * @param string $collection - * @param string $field - * - * @return string The formatted field resource. - */ - public static function fieldName($project, $database, $collection, $field) - { - return self::getFieldNameTemplate()->render([ - 'project' => $project, - 'database' => $database, - 'collection' => $collection, - 'field' => $field, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a index - * resource. - * - * @param string $project - * @param string $database - * @param string $collection - * @param string $index - * - * @return string The formatted index resource. - */ - public static function indexName($project, $database, $collection, $index) - { - return self::getIndexNameTemplate()->render([ - 'project' => $project, - 'database' => $database, - 'collection' => $collection, - 'index' => $index, - ]); - } - - /** - * 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, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - collectionGroup: projects/{project}/databases/{database}/collectionGroups/{collection} - * - database: projects/{project}/databases/{database} - * - field: projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field} - * - index: projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index} - * - 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($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"); - } - - /** - * 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; - } - - /** - * 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 'firestore.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation] - * which may be used to track the status of the creation. The metadata for - * the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedParent = $firestoreAdminClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - * $index = new Index(); - * $operationResponse = $firestoreAdminClient->createIndex($formattedParent, $index); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->createIndex($formattedParent, $index); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'createIndex'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @param Index $index Required. The composite index 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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createIndex($parent, $index, array $optionalArgs = []) - { - $request = new CreateIndexRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setIndex($index); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateIndex', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a composite index. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - * $firestoreAdminClient->deleteIndex($formattedName); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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 deleteIndex($name, array $optionalArgs = []) - { - $request = new DeleteIndexRequest(); - $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('DeleteIndex', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Exports a copy of all or a subset of documents from Google Cloud Firestore - * to another storage system, such as Google Cloud Storage. Recent updates to - * documents may not be reflected in the export. The export occurs in the - * background and its progress can be monitored and managed via the - * Operation resource that is created. The output of an export may only be - * used once the associated operation is done. If an export operation is - * cancelled before completion it may leave partial data behind in Google - * Cloud Storage. - * - * For more details on export behavior and output format, refer to: - * https://cloud.google.com/firestore/docs/manage-data/export-import - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->databaseName('[PROJECT]', '[DATABASE]'); - * $operationResponse = $firestoreAdminClient->exportDocuments($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->exportDocuments($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'exportDocuments'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type string[] $collectionIds - * Which collection ids to export. Unspecified means all collections. - * @type string $outputUriPrefix - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function exportDocuments($name, array $optionalArgs = []) - { - $request = new ExportDocumentsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['collectionIds'])) { - $request->setCollectionIds($optionalArgs['collectionIds']); - } - - if (isset($optionalArgs['outputUriPrefix'])) { - $request->setOutputUriPrefix($optionalArgs['outputUriPrefix']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ExportDocuments', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets information about a database. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->databaseName('[PROJECT]', '[DATABASE]'); - * $response = $firestoreAdminClient->getDatabase($formattedName); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_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\Firestore\Admin\V1\Database - * - * @throws ApiException if the remote call fails - */ - public function getDatabase($name, array $optionalArgs = []) - { - $request = new GetDatabaseRequest(); - $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('GetDatabase', Database::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the metadata and configuration for a Field. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); - * $response = $firestoreAdminClient->getField($formattedName); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_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\Firestore\Admin\V1\Field - * - * @throws ApiException if the remote call fails - */ - public function getField($name, array $optionalArgs = []) - { - $request = new GetFieldRequest(); - $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('GetField', Field::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a composite index. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - * $response = $firestoreAdminClient->getIndex($formattedName); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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\Firestore\Admin\V1\Index - * - * @throws ApiException if the remote call fails - */ - public function getIndex($name, array $optionalArgs = []) - { - $request = new GetIndexRequest(); - $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('GetIndex', Index::class, $optionalArgs, $request)->wait(); - } - - /** - * Imports documents into Google Cloud Firestore. Existing documents with the - * same name are overwritten. The import occurs in the background and its - * progress can be monitored and managed via the Operation resource that is - * created. If an ImportDocuments operation is cancelled, it is possible - * that a subset of the data has already been imported to Cloud Firestore. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedName = $firestoreAdminClient->databaseName('[PROJECT]', '[DATABASE]'); - * $operationResponse = $firestoreAdminClient->importDocuments($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->importDocuments($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'importDocuments'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $name Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type string[] $collectionIds - * Which collection ids to import. Unspecified means all collections included - * in the import. - * @type string $inputUriPrefix - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function importDocuments($name, array $optionalArgs = []) - { - $request = new ImportDocumentsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['collectionIds'])) { - $request->setCollectionIds($optionalArgs['collectionIds']); - } - - if (isset($optionalArgs['inputUriPrefix'])) { - $request->setInputUriPrefix($optionalArgs['inputUriPrefix']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ImportDocuments', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * List all the databases in the project. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedParent = $firestoreAdminClient->projectName('[PROJECT]'); - * $response = $firestoreAdminClient->listDatabases($formattedParent); - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. A parent name of the form - * `projects/{project_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\Firestore\Admin\V1\ListDatabasesResponse - * - * @throws ApiException if the remote call fails - */ - public function listDatabases($parent, array $optionalArgs = []) - { - $request = new ListDatabasesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ListDatabases', ListDatabasesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the field configuration and metadata for this database. - * - * Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields - * that have been explicitly overridden. To issue this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to - * `indexConfig.usesAncestorConfig:false` . - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedParent = $firestoreAdminClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - * // Iterate over pages of elements - * $pagedResponse = $firestoreAdminClient->listFields($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $firestoreAdminClient->listFields($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields - * that have been explicitly overridden. To issue this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with a filter that includes - * `indexConfig.usesAncestorConfig:false` . - * @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 listFields($parent, array $optionalArgs = []) - { - $request = new ListFieldsRequest(); - $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('ListFields', $optionalArgs, ListFieldsResponse::class, $request); - } - - /** - * Lists composite indexes. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $formattedParent = $firestoreAdminClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - * // Iterate over pages of elements - * $pagedResponse = $firestoreAdminClient->listIndexes($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $firestoreAdminClient->listIndexes($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * The filter to apply to list results. - * @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 listIndexes($parent, array $optionalArgs = []) - { - $request = new ListIndexesRequest(); - $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('ListIndexes', $optionalArgs, ListIndexesResponse::class, $request); - } - - /** - * Updates a database. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $database = new Database(); - * $operationResponse = $firestoreAdminClient->updateDatabase($database); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->updateDatabase($database); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'updateDatabase'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param Database $database Required. The database to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The list of fields to be updated. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateDatabase($database, array $optionalArgs = []) - { - $request = new UpdateDatabaseRequest(); - $requestParamHeaders = []; - $request->setDatabase($database); - $requestParamHeaders['database.name'] = $database->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->startOperationsCall('UpdateDatabase', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a field configuration. Currently, field updates apply only to - * single field index configuration. However, calls to - * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should provide a field mask to avoid - * changing any configuration that the caller isn't aware of. The field mask - * should be specified as: `{ paths: "index_config" }`. - * - * This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may be used to - * track the status of the field update. The metadata for - * the operation will be the type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. - * - * To configure the default field settings for the database, use - * the special `Field` with resource name: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. - * - * Sample code: - * ``` - * $firestoreAdminClient = new FirestoreAdminClient(); - * try { - * $field = new Field(); - * $operationResponse = $firestoreAdminClient->updateField($field); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $firestoreAdminClient->updateField($field); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $firestoreAdminClient->resumeOperation($operationName, 'updateField'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $firestoreAdminClient->close(); - * } - * ``` - * - * @param Field $field Required. The field to be updated. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateField($field, array $optionalArgs = []) - { - $request = new UpdateFieldRequest(); - $requestParamHeaders = []; - $request->setField($field); - $requestParamHeaders['field.name'] = $field->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->startOperationsCall('UpdateField', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json b/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json deleted file mode 100644 index c299566ec512..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/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.firestore.admin.v1", - "libraryPackage": "Google\\Cloud\\Firestore\\Admin\\V1", - "services": { - "FirestoreAdmin": { - "clients": { - "grpc": { - "libraryClient": "FirestoreAdminGapicClient", - "rpcs": { - "CreateIndex": { - "methods": [ - "createIndex" - ] - }, - "DeleteIndex": { - "methods": [ - "deleteIndex" - ] - }, - "ExportDocuments": { - "methods": [ - "exportDocuments" - ] - }, - "GetDatabase": { - "methods": [ - "getDatabase" - ] - }, - "GetField": { - "methods": [ - "getField" - ] - }, - "GetIndex": { - "methods": [ - "getIndex" - ] - }, - "ImportDocuments": { - "methods": [ - "importDocuments" - ] - }, - "ListDatabases": { - "methods": [ - "listDatabases" - ] - }, - "ListFields": { - "methods": [ - "listFields" - ] - }, - "ListIndexes": { - "methods": [ - "listIndexes" - ] - }, - "UpdateDatabase": { - "methods": [ - "updateDatabase" - ] - }, - "UpdateField": { - "methods": [ - "updateField" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json deleted file mode 100644 index 022aabbceef3..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "interfaces": { - "google.firestore.admin.v1.FirestoreAdmin": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "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": 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": { - "CreateIndex": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ExportDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetField": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ImportDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListDatabases": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListFields": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListIndexes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateField": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php deleted file mode 100644 index 98f97d8be1be..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php +++ /dev/null @@ -1,78 +0,0 @@ - [ - 'google.firestore.admin.v1.FirestoreAdmin' => [ - 'CreateIndex' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Index', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\IndexOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ExportDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\ExportDocumentsResponse', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\ExportDocumentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ImportDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\ImportDocumentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\UpdateDatabaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateField' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Field', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListFields' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFields', - ], - ], - 'ListIndexes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getIndexes', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php deleted file mode 100644 index 8a487f1dbd84..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php +++ /dev/null @@ -1,195 +0,0 @@ - [ - 'google.firestore.admin.v1.FirestoreAdmin' => [ - 'CreateIndex' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes', - 'body' => 'index', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteIndex' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}:exportDocuments', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDatabase' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetField' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIndex' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}:importDocuments', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDatabases' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/databases', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListFields' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListIndexes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDatabase' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{database.name=projects/*/databases/*}', - 'body' => 'database', - 'placeholders' => [ - 'database.name' => [ - 'getters' => [ - 'getDatabase', - 'getName', - ], - ], - ], - ], - 'UpdateField' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}', - 'body' => 'field', - 'placeholders' => [ - 'field.name' => [ - 'getters' => [ - 'getField', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/FirestoreAdminClientTest.php b/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/FirestoreAdminClientTest.php deleted file mode 100644 index bdc8be774300..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/FirestoreAdminClientTest.php +++ /dev/null @@ -1,1116 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FirestoreAdminClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FirestoreAdminClient($options); - } - - /** @test */ - public function createIndexTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Index(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createIndexTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $index = new Index(); - $response = $gapicClient->createIndex($formattedParent, $index); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateIndex', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getIndex(); - $this->assertProtobufEquals($index, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createIndexExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $index = new Index(); - $response = $gapicClient->createIndex($formattedParent, $index); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteIndexTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $gapicClient->deleteIndex($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteIndex', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteIndexExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - try { - $gapicClient->deleteIndex($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 exportDocumentsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $outputUriPrefix2 = 'outputUriPrefix2-377757258'; - $expectedResponse = new ExportDocumentsResponse(); - $expectedResponse->setOutputUriPrefix($outputUriPrefix2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $response = $gapicClient->exportDocuments($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ExportDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function exportDocumentsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->databaseName('[PROJECT]', '[DATABASE]'); - $response = $gapicClient->exportDocuments($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getDatabaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $response = $gapicClient->getDatabase($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetDatabase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatabaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - try { - $gapicClient->getDatabase($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 getFieldTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Field(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); - $response = $gapicClient->getField($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetField', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFieldExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); - try { - $gapicClient->getField($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 getIndexTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Index(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $response = $gapicClient->getIndex($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetIndex', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIndexExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - try { - $gapicClient->getIndex($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 importDocumentsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $response = $gapicClient->importDocuments($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ImportDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function importDocumentsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->databaseName('[PROJECT]', '[DATABASE]'); - $response = $gapicClient->importDocuments($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function listDatabasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListDatabasesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listDatabases($formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListDatabases', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatabasesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listDatabases($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 listFieldsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $fieldsElement = new Field(); - $fields = [ - $fieldsElement, - ]; - $expectedResponse = new ListFieldsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFields($fields); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $response = $gapicClient->listFields($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFields()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListFields', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFieldsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - try { - $gapicClient->listFields($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 listIndexesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $indexesElement = new Index(); - $indexes = [ - $indexesElement, - ]; - $expectedResponse = new ListIndexesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIndexes($indexes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $response = $gapicClient->listIndexes($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIndexes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListIndexes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIndexesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - try { - $gapicClient->listIndexes($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 updateDatabaseTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $database = new Database(); - $response = $gapicClient->updateDatabase($database); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/UpdateDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDatabaseExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $database = new Database(); - $response = $gapicClient->updateDatabase($database); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateFieldTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateFieldTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Field(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateFieldTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $field = new Field(); - $fieldName = 'fieldName1265009317'; - $field->setName($fieldName); - $response = $gapicClient->updateField($field); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/UpdateField', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getField(); - $this->assertProtobufEquals($field, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFieldTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateFieldExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateFieldTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $field = new Field(); - $fieldName = 'fieldName1265009317'; - $field->setName($fieldName); - $response = $gapicClient->updateField($field); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFieldTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php deleted file mode 100644 index 3b7dc874d572..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php +++ /dev/null @@ -1,33 +0,0 @@ -internalAddGeneratedFile( - ' -Þ -,google/firestore/v1/aggregation_result.protogoogle.firestore.v1"¾ -AggregationResultU -aggregate_fields ( 2;.google.firestore.v1.AggregationResult.AggregateFieldsEntryR -AggregateFieldsEntry -key ( ) -value ( 2.google.firestore.v1.Value:8BÏ -com.google.firestore.v1BAggregationResultProtoPZd%7-bhEFiQ*;qd>eEfyk0**XmsXjmyHq1@1;RkeDXTZ2PrL?9MbZQ*<@F zjCcAFUU}uC_!Lg3yJZa+wKx6w=A7@G@25L2)AJOq<2Eo5L_vuAL#)mLr-CaU@C5g> zC<1{4K1gW-!p6AO!LK_#yx%(NJ=9RiGZBD`W6t9Q8W9yB6&KLBa2gsl;LJ8;2r)7M znUVl-yW2blMM9#8*ETrsV2txloo$4Igh+|^3?6+#SYK(@PiTOpB1+#jsPrkLijstW z)VgG`j9Jk-J!l3?{QK6^5nc1Kr4anIuoSiN4)Jf9;^PRP@*`du(4gYwKvC#e-}B zOdS*X&RRmXh(Z$jDN*Ngxq_$b^J{<>x&i{uLftXWtVJ{nAE;D$yi%V#oU$BL%ThfM z;45uxxvD?co~_!WjAnv#Pwdk5;Z$=G-7Xn@HB4dcOBGo?L6{__-<>p1CarxmFMxzT zXUTBH{B+Db>BYW|wclu9N8_}_HbRExy`Tz~r;S4Ae|XMv;NjHjBQ&4WnpbND-O&>u zhQ7KIZmP1ddV=Q0>8-}d!#`K&9=fZmBXyC11w&s#0)d|3<}8{S@DQ5cE9k!7&ztl& zYsKQ3S?gBb?u@z+^MtV2<|1yyz)VjXMTn$S{Px# diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php deleted file mode 100644 index bce162030d1f23eb441ec951465f616ccbbeaa7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1931 zcmb_d(QXq*6s_$fimw9^MlB%%F}O%L2-bC~R&+y(2qA7HAd!gjfL5}`>+5CJ^~`E^ zHj-OK>L>IY`q&3PgNJ@fzoK_$XE%;;p%3+o?YZaNIrq+)xlf*^?^5`h4N#!s8pmuj zWBMJkR7ovEnXpklnV@2!oThPt%42N*h`l~KVK4R%Pwo;mler4fXOWaqg1t$sFw;_D z@2uY&%P^m!(4I{PAovusl!wR$$9u0(^D);v7+7X-P%?wl{tiHx@GN8dE(81uj6P{T zO5%`Znrr&H7iYs*#5(3l{0nK{WfPucNaT;PlU#&4mVz0=kqEK7#fqE;doPt#>nyHkpuQiWu9{|6x?65rlP;dHZlTflKN7jiw90XQcg7Uz zT!|g4+ax%zegz9URjGSJnL_RR7d2g^_$2Wpri0LYn*Mk0$t=a-CD)0F7L#lbAN?4+ zjy)TXs|FpAb-Gnaroj8~p$VPOd!~K8z<8CfytDr19Y?gbqGRgmvYx_en;QqqrrfRRjlCk7Qjn%r%_7AW!i7^>x8+F#`wzjvt1$%oX**mb<7ecF9y9cdM zAzh%MQL@pXe68)xl3&X7s*{CUCBI2h6TGt?5hh@zb1&q|MW%s23#4D+mQ=LGOb%J0_Nl+ zR4!n&G$`;Dtc@jITXgHDH#J)S4%Vwvb0MJ6C)-w}%e0C`t;p*5Om%-nLD zme*+cCaf!@2Mp=PyU?;@c(5L!9Hx?VyU?l?aJ@V?;~tMJ|58Mh>U(H$rTENYn-+Vg z#9r$4GlMHzwhhfGPaSK;vTiSAz2d3k?5zRVGZ`8QoyPzd8QTwF#l|u^ePh$gW|t(` zOr76ruv(^_^LIg9?C%mj@9+Q7eS05jaD%4Fq7Lj`DKD3O;f`x>pST+s$%Ko@lPc;( zDC~Xe6(OF+*`=YgQ?=ob`qJR}!J9wpHwSjYc+V4=kEt#k~OwpoY~ql z-kEW;*(w*%9*~e0X&1rnWd%YYt&q4OkdWYjgxDj9OD}NXfH;D65x%-PiqHqPJbgcWO>kuXc8Jh^yC}R@-V4 zH>>OG5A^#Fw)N8bo$b@G)pI&-jpX%)<20Hiw_~})^BtGuo?h<$l4bG`vdtFp+GdUD z8=J*@#5e1vZ%_}A`Kn^sNteA9>j&RSl@vMt{- zo7Ov^{i?oWHa!Bn``7Mt?3!;mwoW%Zuxn)Lyv}9PwP)K7Si7oAWj3h;!1(eV+b6DV zHp}b8tGQMiY}FS?)@hApe&p z$2d0Fx@|$e`DUv<`mtN>TKOU1suP1MmM9lrvqV}H>h&NCZUI9q1-PXsK8Jq!HFRbK zYQRVNqU??&f$Y=EnG<5C*|u^uhFVS}na_q^>`-V{ssfv0!3EWsW*2}JU@1VLSgj;4 zpge$?SYfE-)diM%lnP9s6!;be%%BB(6cu8@DRBy8OCX;dp>glo9lZ2qaK!@YEw^3E zQSRw@{Dtu=4dD&qOXzPAP|EZ15j08pcu~`}rJ3Ty-wFwwLz6Ajd$O2-N2!(5S*}kc zC|N1y9xTKQDCN7R?U{^P7bjp}`t~azXT~LFy+T!7Ofq2^DNO304ZwN(mEv)9tOi78 zc|Ngg`xTEgNe!6R_*nuSy9-a{p`KL!D4J@UE+leT{S2Cgnnkw)D^{#JvqPA61kJR~ z2B~;ZD43o}j1gjweCG+V7bmG3@I0D!+&Xb9)&0dO_C)&R5Hn+ZpG?EPKA#{aY@ko@ zF_iXpoxMuS@;u9KET&=4bgZYUXraeZUK>10@Fg@Of$D*?CLpk%k+BG%3fUF}7N0(OUMSOJkv4*D>G7K^4|+YNC}khcpEV(9s*rWYX|$WCdI2U$A-U>Msw zJzPZdndV)QqIs_prYVk;@;PN1YZ$bW-6Qk*ish+;KW~ zosrrw@PS%K&>_hVEJNWDBv#l|#>n_$n2)JrQY!=0FHWN=ULTD&(TO5ySa!%MGUa0; zc@-UUxZ6Y(8QIN74sg?VnD9)GSu{D*0O?uU3|jsWotDuQE3+J0A=@MT$NDp+|BQFg zoIFVA^A$A9M2bd2GOMnH6qC$*UVwFqb{3Y;izCmf0l_c;zgtk$s%GuU5HlB}p{JtL zj3SMX5+I~wv+h+2QC85KXx@X%NewO|q+VgoiwNUcrDYF;#Y{HfuO|y>s-`NsWS{Kd$7@3JghID%K%4cviW(H8WbjreYFaycWb^lEopbj6+1N zmk31hFq-9RS8BVa-5|za5@=3J7YNVytPvKf`+siX8WYCMIV_uOaRN){)XEv9UF%}J zq1<0*R|#=T8@!+2I(p9M4rldj*!f#5Hn1PKcgJeNI97}l)GbNrZ9YXHFph$?P%Oc( zP)!-MStDTlXaY@f-{7k#87^{h-3Wt9mT_(Xo15V~3uo^yC>_an1ovw%kZ>HOX_;>U z@PZKpZI&W^PKvcj0f{KaCmP%XW_+e1Wg*VJX*B7;kehc5nX~Ay45v7r?vZE^SFTJ8 zr9vh`(-E1m;Fm5aJ^k1$^s8KJ)}Fzy(i_mN8J{FjntO@^5Z^~wEa&OLV##Q2Ze?YF z|VuRK4AW^TzzJAO|?snDzj$BbL&<_xBSk z_!6CjKcmCuRiLjoVLt2SmUD6r#C{gFhW@;~e1QKW%6&ju_`FQTNEbyR6|9k3EswI4 zyV>}z#&moaZY4}fXdhv`HlmujXA#sMJidWf$B}Z-D**piLvzv5BvxA!T_i0Z5|1jg zwY2h8rle&5>==Q`2lwCSg=12{h0yd9e;+J}&KYAYh%S;A9G9^R>KyyqmvMtbX?biY zJuk4oa^PP}#t6aK!|KjjF`#3YfQ-5UR4frYw6-R=stc? z5V&IO$22?^Xc!vr;=fWg#b7T^&FI`O^Esv8rI0PrC>!7A#CRawIwCI~4h$X_tn=DWB#+R9eGTlZXYepGh+L8uQ`5`bI zzq7|M9DgaJpk_F^Mrc-eQHE=>tFTnG)=pab=*d-L2TB4=DIp}KW2m|UJI=HBynDfn@Kb7ywW%jZh`os}Fi2G;aRlYT!XRq`5U~@kI=yG+6sqn>f!538*_;-V$ X&kX5B&#EatF=Q+Gr+^3O0HOZ@g(A>p diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php deleted file mode 100644 index 4e07b596cc6595ffe57f294b28dcff40808ec972..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3478 zcmb_fOLN;)6t3*ZiH}pqbD`8V3<#5%rY)68+To!z6!{UyGr@LkCrlX+8pXbL#3+)` zBb~r>!;%GS)-3q}Y*?~_VZ|?C&41_&=U&OO>l$hb*~HR4-?`^}=c#-5ol^(ilIql= zuI|&JbaEm2r&MxW+qVa{DV+qP5p|`3edZV@b!ADawxnjOC)KKr-kS*Z?7$sRMH<`o z*rcVA;Zo1HU0OQdE`1SD_d@2n04)8CdX7GzQoUXNnELuq_w|0A!}|LZSpRr?7hquO zo+mwEaQF%&{Bwd6(-=seulx9K)9^IIGJHcfjW5yaJ!zzy9!2D{vZKHn_=ass4A8O$ zbnAu`>SVH;j*VXKNfSfb%yD$O->`h@TDsY&fYFbF7*S~+U0gL1&`xj{RK3sj)7EBb6BRQ`nh4diZby# zmf?QY9t3C9@|TClynN#7jze8-aJ;v&>A@+!=@!t0R?&p!-l=}}~QcwYQ*12(!CkpV`44tcVX`;hXeNe6yj zkc6$wPDx&HyF7=Ik(|#FgGokeurhM(vwT8IBK*Cj;1%0sS0cR2@3vi{fcWT?x-_5U zX53mz4>F87OYXs%?GCA{om}KsxEVK>g0~om+=ewwVAt1lKflT^e{~_c61W~3dJ9t2 z8ZzOv=L=^cWsgQ4_46qd7RgNzP2ltu(m`8@g#~Lo8jiPPcrI6S-D+B0wslsSP>S)ojo3sW#%&MM1y2(Bb)@S0><4 z-@zqv0P7=GoD*%#mdwsOOKIa(J*z3OboXMSDa?Z9G#xSEL{s@PWJ2FG|H7e#Uj*2g zGn_OaVLROQ?9Sd&#?EPwTi6hEY>=3GtKn^4Q~>`baf_IGv8Ft{+-lc4YOmGNj+)(e zt`momRYP|!snG?t>K;lOYDXKj6F5olr7KuECYrH&fvik_Iuvi3HW-P>8KC2N~_sZ8_jNRm82liXy(?~ z)lZ*kYV%<(O#o6%1r%SI7orCeKVjEN5ZeW(9$5k=NX}0*GO6{Xa5Ph4c`Y zB|a{qM3on&*L=UKPEdtS$j+rb29KAH=IH)u*h32s0A}V|1yWpMQrIuTeX$1V*b0`I z)kddQ=`~u-xe~{0RJ)a0v)X9ZG1-yvYAt?F6u(YFVd|Ya9=mjmYoTq0GyEgSdGT1+ z_zoJigw17$!bW}!>-tnHn;mSJ?>+}TZ-_keqMZCg6$(EIkePW&Iv@`0z?v)@>VLRE zt}sPtI{^`wV%_7zJ00HpK8XC7lt2s|&9@^y;>kWcaNoVl8xu#C0e6Y0xtG@gIGH@F zi&aQPE5J=i@n+|tR>spmbUO@X>V%H)^MEJWTKQ)IuHqD4=aJF}1kirSM314DYG$kKK4>{64W#uk3e!NL;J)?+v+P+QCqccVhW?``5`? zzt0c*Gv6fmQSxWvwGgT({8&+9u%aAqpQN}Ycdo|^?%UzAKl5$yx8DU^GTh!D!()KI E0JLsS7ytkO diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php deleted file mode 100644 index 65d2598ac5b82f35c019ba887817388da69aa868..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2521 zcmbtW-EJF26vj@R;t8bAR;VT_>eN)!mB?CdRW3FS5XVl4L>f17jD##Llijg1Vs~em znGFpnZ@^P<$!l=OD{##X;vqOQ>s>p-f zbxv_CxZ)lU@L4h(Qh_}l#w?)1#<+ciUmW#tr+v_S08q&j;ZX;VI3ESHF=T>D#RY9# zG#lRwrl@UnArz62%9wZ*?{`~=R1u#jGT1k;!CnR%^qX4$3Uf2HB*M}*-oPR;`6 zVX26MkB3aUEMkh0fc*eoZ{r~eBn9M6*SWuOS zXv_Gm6

24HnQe*yUl!BgdJSB#dA z=4$C>(g6Mht)}+fkjQVVO9uX6F8mM#tu9(0<8s@wdJ8W>2+!uCbK~|Nqk*4)g)k~! zA_NqNo6%Wap5sneP>)AGbR&;itEkLlJxkzA?T=-&o-sDjUqNr@dNtQ&>j+hb+6Q+k zgyR1QVdJkQwDymvEQC@UF;V9x$7SmqbVpLyCjZjm_$Mt%DrgJ+&kju=&&(V7j55J%;2?BR0c<2)S4n?Q?X0e9aHd>ux$-0NCC!OPd z=h*G%>);F|8$N)im)j zl}Vt0^sJS1yN~-hCnlQ(c0R|fXJ~z*5%w1-kt;0;sNHCc!S?{8f#}nu$ zJ$Fm3Ukm6ioF}siw}nhun9bEKeEobp(MLRhY}s6l8Y3E+up8+UiJ821!ffSf|GBul zzq@zxOY!}EbF$dG0Z)9Go#T7Q?l*tS-Ub8nIG8$X;I8?zcrS%Ij(K*R9PBv#=Gltz bgoogle.firestore.v1.AggregationResult - */ -class AggregationResult extends \Google\Protobuf\Internal\Message -{ - /** - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * - * Generated from protobuf field map aggregate_fields = 2; - */ - private $aggregate_fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $aggregate_fields - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\AggregationResult::initOnce(); - parent::__construct($data); - } - - /** - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * - * Generated from protobuf field map aggregate_fields = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAggregateFields() - { - return $this->aggregate_fields; - } - - /** - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * - * Generated from protobuf field map aggregate_fields = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAggregateFields($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->aggregate_fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php deleted file mode 100644 index a5e67239f7a8..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php +++ /dev/null @@ -1,67 +0,0 @@ -google.firestore.v1.ArrayValue - */ -class ArrayValue extends \Google\Protobuf\Internal\Message -{ - /** - * Values in the array. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $values - * Values in the array. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Values in the array. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * Values in the array. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @param array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php deleted file mode 100644 index ba65b39ece0f..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php +++ /dev/null @@ -1,289 +0,0 @@ -google.firestore.v1.BatchGetDocumentsRequest - */ -class BatchGetDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - */ - private $documents; - /** - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - */ - protected $mask = null; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type array|\Google\Protobuf\Internal\RepeatedField $documents - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * @type string $transaction - * Reads documents in a transaction. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->documents = $arr; - - return $this; - } - - /** - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * Reads documents in a transaction. - * - * Generated from protobuf field bytes transaction = 4; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(4); - } - - public function hasTransaction() - { - return $this->hasOneof(4); - } - - /** - * Reads documents in a transaction. - * - * Generated from protobuf field bytes transaction = 4; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getNewTransaction() - { - return $this->readOneof(5); - } - - public function hasNewTransaction() - { - return $this->hasOneof(5); - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setNewTransaction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(7); - } - - public function hasReadTime() - { - return $this->hasOneof(7); - } - - /** - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php deleted file mode 100644 index f0f72218700c..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php +++ /dev/null @@ -1,209 +0,0 @@ -google.firestore.v1.BatchGetDocumentsResponse - */ -class BatchGetDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. - * - * Generated from protobuf field bytes transaction = 3; - */ - protected $transaction = ''; - /** - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - protected $result; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $found - * A document that was requested. - * @type string $missing - * A document name that was requested but does not exist. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type string $transaction - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. - * @type \Google\Protobuf\Timestamp $read_time - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * A document that was requested. - * - * Generated from protobuf field .google.firestore.v1.Document found = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getFound() - { - return $this->readOneof(1); - } - - public function hasFound() - { - return $this->hasOneof(1); - } - - /** - * A document that was requested. - * - * Generated from protobuf field .google.firestore.v1.Document found = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setFound($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A document name that was requested but does not exist. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string missing = 2; - * @return string - */ - public function getMissing() - { - return $this->readOneof(2); - } - - public function hasMissing() - { - return $this->hasOneof(2); - } - - /** - * A document name that was requested but does not exist. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string missing = 2; - * @param string $var - * @return $this - */ - public function setMissing($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. - * - * Generated from protobuf field bytes transaction = 3; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. - * - * Generated from protobuf field bytes transaction = 3; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - - /** - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php deleted file mode 100644 index 7b5671ce9703..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.firestore.v1.BatchWriteRequest - */ -class BatchWriteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - */ - private $writes; - /** - * Labels associated with this batch write. - * - * Generated from protobuf field map labels = 3; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $writes - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this batch write. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWrites() - { - return $this->writes; - } - - /** - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @param array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWrites($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); - $this->writes = $arr; - - return $this; - } - - /** - * Labels associated with this batch write. - * - * Generated from protobuf field map labels = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this batch write. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php deleted file mode 100644 index 36d81e370b90..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php +++ /dev/null @@ -1,117 +0,0 @@ -google.firestore.v1.BatchWriteResponse - */ -class BatchWriteResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - */ - private $write_results; - /** - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.rpc.Status status = 2; - */ - private $status; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $write_results - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $status - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWriteResults() - { - return $this->write_results; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @param array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWriteResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); - $this->write_results = $arr; - - return $this; - } - - /** - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.rpc.Status status = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStatus() - { - return $this->status; - } - - /** - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.rpc.Status status = 2; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStatus($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->status = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php deleted file mode 100644 index eb24afae8fb1..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.firestore.v1.BeginTransactionRequest - */ -class BeginTransactionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The options for the transaction. - * Defaults to a read-write transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; - */ - protected $options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $options - * The options for the transaction. - * Defaults to a read-write transaction. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The options for the transaction. - * Defaults to a read-write transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getOptions() - { - return $this->options; - } - - public function hasOptions() - { - return isset($this->options); - } - - public function clearOptions() - { - unset($this->options); - } - - /** - * The options for the transaction. - * Defaults to a read-write transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php deleted file mode 100644 index bf88b57e22b3..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.firestore.v1.BeginTransactionResponse - */ -class BeginTransactionResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The transaction that was started. - * - * Generated from protobuf field bytes transaction = 1; - */ - protected $transaction = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $transaction - * The transaction that was started. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The transaction that was started. - * - * Generated from protobuf field bytes transaction = 1; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started. - * - * Generated from protobuf field bytes transaction = 1; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php deleted file mode 100644 index 4197ef691715..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php +++ /dev/null @@ -1,143 +0,0 @@ -google.firestore.v1.CommitRequest - */ -class CommitRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The writes to apply. - * Always executed atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - */ - private $writes; - /** - * If set, applies all writes in this transaction, and commits it. - * - * Generated from protobuf field bytes transaction = 3; - */ - protected $transaction = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $writes - * The writes to apply. - * Always executed atomically and in order. - * @type string $transaction - * If set, applies all writes in this transaction, and commits it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWrites() - { - return $this->writes; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @param array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWrites($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); - $this->writes = $arr; - - return $this; - } - - /** - * If set, applies all writes in this transaction, and commits it. - * - * Generated from protobuf field bytes transaction = 3; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * If set, applies all writes in this transaction, and commits it. - * - * Generated from protobuf field bytes transaction = 3; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php deleted file mode 100644 index aa52dc11399d..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php +++ /dev/null @@ -1,123 +0,0 @@ -google.firestore.v1.CommitResponse - */ -class CommitResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - */ - private $write_results; - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; - */ - protected $commit_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $write_results - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * @type \Google\Protobuf\Timestamp $commit_time - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWriteResults() - { - return $this->write_results; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @param array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWriteResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); - $this->write_results = $arr; - - return $this; - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitTime() - { - return $this->commit_time; - } - - public function hasCommitTime() - { - return isset($this->commit_time); - } - - public function clearCommitTime() - { - unset($this->commit_time); - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commit_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php deleted file mode 100644 index eb3c235b2d6a..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php +++ /dev/null @@ -1,243 +0,0 @@ -google.firestore.v1.CreateDocumentRequest - */ -class CreateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $collection_id = ''; - /** - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * - * Generated from protobuf field string document_id = 3; - */ - protected $document_id = ''; - /** - * Required. The document to create. `name` must not be set. - * - * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; - */ - protected $mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * @type string $collection_id - * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`. - * @type string $document_id - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * @type \Google\Cloud\Firestore\V1\Document $document - * Required. The document to create. `name` must not be set. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * - * 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. The collection ID, relative to `parent`, to list. For example: `chatrooms`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCollectionId() - { - return $this->collection_id; - } - - /** - * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCollectionId($var) - { - GPBUtil::checkString($var, True); - $this->collection_id = $var; - - return $this; - } - - /** - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * - * Generated from protobuf field string document_id = 3; - * @return string - */ - public function getDocumentId() - { - return $this->document_id; - } - - /** - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * - * Generated from protobuf field string document_id = 3; - * @param string $var - * @return $this - */ - public function setDocumentId($var) - { - GPBUtil::checkString($var, True); - $this->document_id = $var; - - return $this; - } - - /** - * Required. The document to create. `name` must not be set. - * - * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. The document to create. `name` must not be set. - * - * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php deleted file mode 100644 index 9fdaf73c3abe..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php +++ /dev/null @@ -1,113 +0,0 @@ -google.firestore.v1.Cursor - */ -class Cursor extends \Google\Protobuf\Internal\Message -{ - /** - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - */ - private $values; - /** - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * - * Generated from protobuf field bool before = 2; - */ - protected $before = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $values - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * @type bool $before - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @param array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->values = $arr; - - return $this; - } - - /** - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * - * Generated from protobuf field bool before = 2; - * @return bool - */ - public function getBefore() - { - return $this->before; - } - - /** - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * - * Generated from protobuf field bool before = 2; - * @param bool $var - * @return $this - */ - public function setBefore($var) - { - GPBUtil::checkBool($var); - $this->before = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php deleted file mode 100644 index 002abf75057a..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.firestore.v1.DeleteDocumentRequest - */ -class DeleteDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; - */ - protected $current_document = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Cloud\Firestore\V1\Precondition $current_document - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * 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; - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; - * @return \Google\Cloud\Firestore\V1\Precondition|null - */ - public function getCurrentDocument() - { - return $this->current_document; - } - - public function hasCurrentDocument() - { - return isset($this->current_document); - } - - public function clearCurrentDocument() - { - unset($this->current_document); - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; - * @param \Google\Cloud\Firestore\V1\Precondition $var - * @return $this - */ - public function setCurrentDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); - $this->current_document = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php deleted file mode 100644 index 1f6e4882c287..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php +++ /dev/null @@ -1,290 +0,0 @@ -google.firestore.v1.Document - */ -class Document extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The document's fields. - * The map keys represent field names. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The map - * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by the simple - * or quoted field names of the containing fields, delimited by `.`. For - * example, the structured field - * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be - * represented by the field path `foo.x&y`. - * Within a field path, a quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * - * Generated from protobuf field map fields = 2; - */ - private $fields; - /** - * Output only. The time at which the document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - /** - * Output only. The time at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * - * 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 string $name - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type array|\Google\Protobuf\Internal\MapField $fields - * The document's fields. - * The map keys represent field names. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The map - * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by the simple - * or quoted field names of the containing fields, delimited by `.`. For - * example, the structured field - * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be - * represented by the field path `foo.x&y`. - * Within a field path, a quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * 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 document's fields. - * The map keys represent field names. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The map - * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by the simple - * or quoted field names of the containing fields, delimited by `.`. For - * example, the structured field - * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be - * represented by the field path `foo.x&y`. - * Within a field path, a quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * - * Generated from protobuf field map fields = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The document's fields. - * The map keys represent field names. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The map - * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by the simple - * or quoted field names of the containing fields, delimited by `.`. For - * example, the structured field - * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be - * represented by the field path `foo.x&y`. - * Within a field path, a quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * - * Generated from protobuf field map fields = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->fields = $arr; - - return $this; - } - - /** - * Output only. The time at which the document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * - * 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); - } - - /** - * Output only. The time at which the document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * - * 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; - } - - /** - * Output only. The time at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * - * 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); - } - - /** - * Output only. The time at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * - * 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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php deleted file mode 100644 index ea12e6ce6664..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php +++ /dev/null @@ -1,153 +0,0 @@ -google.firestore.v1.DocumentChange - */ -class DocumentChange extends \Google\Protobuf\Internal\Message -{ - /** - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - */ - protected $document = null; - /** - * A set of target IDs of targets that match this document. - * - * Generated from protobuf field repeated int32 target_ids = 5; - */ - private $target_ids; - /** - * A set of target IDs for targets that no longer match this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - */ - private $removed_target_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $document - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * @type array|\Google\Protobuf\Internal\RepeatedField $target_ids - * A set of target IDs of targets that match this document. - * @type array|\Google\Protobuf\Internal\RepeatedField $removed_target_ids - * A set of target IDs for targets that no longer match this document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * A set of target IDs of targets that match this document. - * - * Generated from protobuf field repeated int32 target_ids = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetIds() - { - return $this->target_ids; - } - - /** - * A set of target IDs of targets that match this document. - * - * Generated from protobuf field repeated int32 target_ids = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->target_ids = $arr; - - return $this; - } - - /** - * A set of target IDs for targets that no longer match this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRemovedTargetIds() - { - return $this->removed_target_ids; - } - - /** - * A set of target IDs for targets that no longer match this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRemovedTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->removed_target_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php deleted file mode 100644 index b66a218c48f2..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php +++ /dev/null @@ -1,153 +0,0 @@ -google.firestore.v1.DocumentDelete - */ -class DocumentDelete extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the [Document][google.firestore.v1.Document] that was deleted. - * - * Generated from protobuf field string document = 1; - */ - protected $document = ''; - /** - * A set of target IDs for targets that previously matched this entity. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - */ - private $removed_target_ids; - /** - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $document - * The resource name of the [Document][google.firestore.v1.Document] that was deleted. - * @type array|\Google\Protobuf\Internal\RepeatedField $removed_target_ids - * A set of target IDs for targets that previously matched this entity. - * @type \Google\Protobuf\Timestamp $read_time - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that was deleted. - * - * Generated from protobuf field string document = 1; - * @return string - */ - public function getDocument() - { - return $this->document; - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that was deleted. - * - * Generated from protobuf field string document = 1; - * @param string $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkString($var, True); - $this->document = $var; - - return $this; - } - - /** - * A set of target IDs for targets that previously matched this entity. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRemovedTargetIds() - { - return $this->removed_target_ids; - } - - /** - * A set of target IDs for targets that previously matched this entity. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRemovedTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->removed_target_ids = $arr; - - return $this; - } - - /** - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php deleted file mode 100644 index 94c260c4f2db..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php +++ /dev/null @@ -1,75 +0,0 @@ -google.firestore.v1.DocumentMask - */ -class DocumentMask extends \Google\Protobuf\Internal\Message -{ - /** - * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field - * path syntax reference. - * - * Generated from protobuf field repeated string field_paths = 1; - */ - private $field_paths; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $field_paths - * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field - * path syntax reference. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field - * path syntax reference. - * - * Generated from protobuf field repeated string field_paths = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFieldPaths() - { - return $this->field_paths; - } - - /** - * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field - * path syntax reference. - * - * Generated from protobuf field repeated string field_paths = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFieldPaths($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->field_paths = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php deleted file mode 100644 index 28153eaf4cc1..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php +++ /dev/null @@ -1,154 +0,0 @@ -google.firestore.v1.DocumentRemove - */ -class DocumentRemove extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view. - * - * Generated from protobuf field string document = 1; - */ - protected $document = ''; - /** - * A set of target IDs for targets that previously matched this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 2; - */ - private $removed_target_ids; - /** - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $document - * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view. - * @type array|\Google\Protobuf\Internal\RepeatedField $removed_target_ids - * A set of target IDs for targets that previously matched this document. - * @type \Google\Protobuf\Timestamp $read_time - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view. - * - * Generated from protobuf field string document = 1; - * @return string - */ - public function getDocument() - { - return $this->document; - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that has gone out of view. - * - * Generated from protobuf field string document = 1; - * @param string $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkString($var, True); - $this->document = $var; - - return $this; - } - - /** - * A set of target IDs for targets that previously matched this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRemovedTargetIds() - { - return $this->removed_target_ids; - } - - /** - * A set of target IDs for targets that previously matched this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRemovedTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->removed_target_ids = $arr; - - return $this; - } - - /** - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php deleted file mode 100644 index 05828bedba2f..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php +++ /dev/null @@ -1,109 +0,0 @@ -google.firestore.v1.DocumentTransform - */ -class DocumentTransform extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the document to transform. - * - * Generated from protobuf field string document = 1; - */ - protected $document = ''; - /** - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; - */ - private $field_transforms; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $document - * The name of the document to transform. - * @type array<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform>|\Google\Protobuf\Internal\RepeatedField $field_transforms - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The name of the document to transform. - * - * Generated from protobuf field string document = 1; - * @return string - */ - public function getDocument() - { - return $this->document; - } - - /** - * The name of the document to transform. - * - * Generated from protobuf field string document = 1; - * @param string $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkString($var, True); - $this->document = $var; - - return $this; - } - - /** - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFieldTransforms() - { - return $this->field_transforms; - } - - /** - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; - * @param array<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFieldTransforms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform::class); - $this->field_transforms = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php deleted file mode 100644 index 22e3188a208b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php +++ /dev/null @@ -1,413 +0,0 @@ -google.firestore.v1.DocumentTransform.FieldTransform - */ -class FieldTransform extends \Google\Protobuf\Internal\Message -{ - /** - * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax - * reference. - * - * Generated from protobuf field string field_path = 1; - */ - protected $field_path = ''; - protected $transform_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_path - * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax - * reference. - * @type int $set_to_server_value - * Sets the field to the given server value. - * @type \Google\Cloud\Firestore\V1\Value $increment - * Adds the given value to the field's current value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If either of the given value or the current field value are doubles, - * both values will be interpreted as doubles. Double arithmetic and - * representation of double values follow IEEE 754 semantics. - * If there is positive/negative integer overflow, the field is resolved - * to the largest magnitude positive/negative integer. - * @type \Google\Cloud\Firestore\V1\Value $maximum - * Sets the field to the maximum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If a maximum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the larger operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and - * zero input value is always the stored value. - * The maximum of any numeric value x and NaN is NaN. - * @type \Google\Cloud\Firestore\V1\Value $minimum - * Sets the field to the minimum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the input value. - * If a minimum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the smaller operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and - * zero input value is always the stored value. - * The minimum of any numeric value x and NaN is NaN. - * @type \Google\Cloud\Firestore\V1\ArrayValue $append_missing_elements - * Append the given elements in order if they are not already present in - * the current field value. - * If the field is not an array, or if the field does not yet exist, it is - * first set to the empty array. - * Equivalent numbers of different types (e.g. 3L and 3.0) are - * considered equal when checking if a value is missing. - * NaN is equal to NaN, and Null is equal to Null. - * If the input contains multiple equivalent values, only the first will - * be considered. - * The corresponding transform_result will be the null value. - * @type \Google\Cloud\Firestore\V1\ArrayValue $remove_all_from_array - * Remove all of the given elements from the array in the field. - * If the field is not an array, or if the field does not yet exist, it is - * set to the empty array. - * Equivalent numbers of the different types (e.g. 3L and 3.0) are - * considered equal when deciding whether an element should be removed. - * NaN is equal to NaN, and Null is equal to Null. - * This will remove all equivalent values if there are duplicates. - * The corresponding transform_result will be the null value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax - * reference. - * - * Generated from protobuf field string field_path = 1; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax - * reference. - * - * Generated from protobuf field string field_path = 1; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - - /** - * Sets the field to the given server value. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; - * @return int - */ - public function getSetToServerValue() - { - return $this->readOneof(2); - } - - public function hasSetToServerValue() - { - return $this->hasOneof(2); - } - - /** - * Sets the field to the given server value. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; - * @param int $var - * @return $this - */ - public function setSetToServerValue($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform\ServerValue::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Adds the given value to the field's current value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If either of the given value or the current field value are doubles, - * both values will be interpreted as doubles. Double arithmetic and - * representation of double values follow IEEE 754 semantics. - * If there is positive/negative integer overflow, the field is resolved - * to the largest magnitude positive/negative integer. - * - * Generated from protobuf field .google.firestore.v1.Value increment = 3; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getIncrement() - { - return $this->readOneof(3); - } - - public function hasIncrement() - { - return $this->hasOneof(3); - } - - /** - * Adds the given value to the field's current value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If either of the given value or the current field value are doubles, - * both values will be interpreted as doubles. Double arithmetic and - * representation of double values follow IEEE 754 semantics. - * If there is positive/negative integer overflow, the field is resolved - * to the largest magnitude positive/negative integer. - * - * Generated from protobuf field .google.firestore.v1.Value increment = 3; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setIncrement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Sets the field to the maximum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If a maximum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the larger operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and - * zero input value is always the stored value. - * The maximum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value maximum = 4; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getMaximum() - { - return $this->readOneof(4); - } - - public function hasMaximum() - { - return $this->hasOneof(4); - } - - /** - * Sets the field to the maximum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If a maximum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the larger operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and - * zero input value is always the stored value. - * The maximum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value maximum = 4; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setMaximum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Sets the field to the minimum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the input value. - * If a minimum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the smaller operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and - * zero input value is always the stored value. - * The minimum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value minimum = 5; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getMinimum() - { - return $this->readOneof(5); - } - - public function hasMinimum() - { - return $this->hasOneof(5); - } - - /** - * Sets the field to the minimum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the input value. - * If a minimum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the smaller operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and - * zero input value is always the stored value. - * The minimum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value minimum = 5; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setMinimum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Append the given elements in order if they are not already present in - * the current field value. - * If the field is not an array, or if the field does not yet exist, it is - * first set to the empty array. - * Equivalent numbers of different types (e.g. 3L and 3.0) are - * considered equal when checking if a value is missing. - * NaN is equal to NaN, and Null is equal to Null. - * If the input contains multiple equivalent values, only the first will - * be considered. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue append_missing_elements = 6; - * @return \Google\Cloud\Firestore\V1\ArrayValue|null - */ - public function getAppendMissingElements() - { - return $this->readOneof(6); - } - - public function hasAppendMissingElements() - { - return $this->hasOneof(6); - } - - /** - * Append the given elements in order if they are not already present in - * the current field value. - * If the field is not an array, or if the field does not yet exist, it is - * first set to the empty array. - * Equivalent numbers of different types (e.g. 3L and 3.0) are - * considered equal when checking if a value is missing. - * NaN is equal to NaN, and Null is equal to Null. - * If the input contains multiple equivalent values, only the first will - * be considered. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue append_missing_elements = 6; - * @param \Google\Cloud\Firestore\V1\ArrayValue $var - * @return $this - */ - public function setAppendMissingElements($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Remove all of the given elements from the array in the field. - * If the field is not an array, or if the field does not yet exist, it is - * set to the empty array. - * Equivalent numbers of the different types (e.g. 3L and 3.0) are - * considered equal when deciding whether an element should be removed. - * NaN is equal to NaN, and Null is equal to Null. - * This will remove all equivalent values if there are duplicates. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue remove_all_from_array = 7; - * @return \Google\Cloud\Firestore\V1\ArrayValue|null - */ - public function getRemoveAllFromArray() - { - return $this->readOneof(7); - } - - public function hasRemoveAllFromArray() - { - return $this->hasOneof(7); - } - - /** - * Remove all of the given elements from the array in the field. - * If the field is not an array, or if the field does not yet exist, it is - * set to the empty array. - * Equivalent numbers of the different types (e.g. 3L and 3.0) are - * considered equal when deciding whether an element should be removed. - * NaN is equal to NaN, and Null is equal to Null. - * This will remove all equivalent values if there are duplicates. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue remove_all_from_array = 7; - * @param \Google\Cloud\Firestore\V1\ArrayValue $var - * @return $this - */ - public function setRemoveAllFromArray($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getTransformType() - { - return $this->whichOneof("transform_type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FieldTransform::class, \Google\Cloud\Firestore\V1\DocumentTransform_FieldTransform::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php deleted file mode 100644 index 47d3356c025d..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php +++ /dev/null @@ -1,59 +0,0 @@ -google.firestore.v1.DocumentTransform.FieldTransform.ServerValue - */ -class ServerValue -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum SERVER_VALUE_UNSPECIFIED = 0; - */ - const SERVER_VALUE_UNSPECIFIED = 0; - /** - * The time at which the server processed the request, with millisecond - * precision. If used on multiple fields (same or different documents) in - * a transaction, all the fields will get the same server timestamp. - * - * Generated from protobuf enum REQUEST_TIME = 1; - */ - const REQUEST_TIME = 1; - - private static $valueToName = [ - self::SERVER_VALUE_UNSPECIFIED => 'SERVER_VALUE_UNSPECIFIED', - self::REQUEST_TIME => 'REQUEST_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(ServerValue::class, \Google\Cloud\Firestore\V1\DocumentTransform_FieldTransform_ServerValue::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform_FieldTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform_FieldTransform.php deleted file mode 100644 index 3dcdd419d300..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform_FieldTransform.php +++ /dev/null @@ -1,16 +0,0 @@ -google.firestore.v1.ExistenceFilter - */ -class ExistenceFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The target ID to which this filter applies. - * - * Generated from protobuf field int32 target_id = 1; - */ - protected $target_id = 0; - /** - * The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * - * Generated from protobuf field int32 count = 2; - */ - protected $count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target_id - * The target ID to which this filter applies. - * @type int $count - * The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The target ID to which this filter applies. - * - * Generated from protobuf field int32 target_id = 1; - * @return int - */ - public function getTargetId() - { - return $this->target_id; - } - - /** - * The target ID to which this filter applies. - * - * Generated from protobuf field int32 target_id = 1; - * @param int $var - * @return $this - */ - public function setTargetId($var) - { - GPBUtil::checkInt32($var); - $this->target_id = $var; - - return $this; - } - - /** - * The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * - * Generated from protobuf field int32 count = 2; - * @return int - */ - public function getCount() - { - return $this->count; - } - - /** - * The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * - * Generated from protobuf field int32 count = 2; - * @param int $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt32($var); - $this->count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/FirestoreGrpcClient.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/FirestoreGrpcClient.php deleted file mode 100644 index 1ddafc4945ff..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/FirestoreGrpcClient.php +++ /dev/null @@ -1,302 +0,0 @@ -_simpleRequest('/google.firestore.v1.Firestore/GetDocument', - $argument, - ['\Google\Cloud\Firestore\V1\Document', 'decode'], - $metadata, $options); - } - - /** - * Lists documents. - * @param \Google\Cloud\Firestore\V1\ListDocumentsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListDocuments(\Google\Cloud\Firestore\V1\ListDocumentsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.v1.Firestore/ListDocuments', - $argument, - ['\Google\Cloud\Firestore\V1\ListDocumentsResponse', 'decode'], - $metadata, $options); - } - - /** - * Updates or inserts a document. - * @param \Google\Cloud\Firestore\V1\UpdateDocumentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateDocument(\Google\Cloud\Firestore\V1\UpdateDocumentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.v1.Firestore/UpdateDocument', - $argument, - ['\Google\Cloud\Firestore\V1\Document', 'decode'], - $metadata, $options); - } - - /** - * Deletes a document. - * @param \Google\Cloud\Firestore\V1\DeleteDocumentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteDocument(\Google\Cloud\Firestore\V1\DeleteDocumentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.v1.Firestore/DeleteDocument', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Gets multiple documents. - * - * Documents returned by this method are not guaranteed to be returned in the - * same order that they were requested. - * @param \Google\Cloud\Firestore\V1\BatchGetDocumentsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\ServerStreamingCall - */ - public function BatchGetDocuments(\Google\Cloud\Firestore\V1\BatchGetDocumentsRequest $argument, - $metadata = [], $options = []) { - return $this->_serverStreamRequest('/google.firestore.v1.Firestore/BatchGetDocuments', - $argument, - ['\Google\Cloud\Firestore\V1\BatchGetDocumentsResponse', 'decode'], - $metadata, $options); - } - - /** - * Starts a new transaction. - * @param \Google\Cloud\Firestore\V1\BeginTransactionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BeginTransaction(\Google\Cloud\Firestore\V1\BeginTransactionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.v1.Firestore/BeginTransaction', - $argument, - ['\Google\Cloud\Firestore\V1\BeginTransactionResponse', 'decode'], - $metadata, $options); - } - - /** - * Commits a transaction, while optionally updating documents. - * @param \Google\Cloud\Firestore\V1\CommitRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function Commit(\Google\Cloud\Firestore\V1\CommitRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.v1.Firestore/Commit', - $argument, - ['\Google\Cloud\Firestore\V1\CommitResponse', 'decode'], - $metadata, $options); - } - - /** - * Rolls back a transaction. - * @param \Google\Cloud\Firestore\V1\RollbackRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function Rollback(\Google\Cloud\Firestore\V1\RollbackRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.v1.Firestore/Rollback', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Runs a query. - * @param \Google\Cloud\Firestore\V1\RunQueryRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\ServerStreamingCall - */ - public function RunQuery(\Google\Cloud\Firestore\V1\RunQueryRequest $argument, - $metadata = [], $options = []) { - return $this->_serverStreamRequest('/google.firestore.v1.Firestore/RunQuery', - $argument, - ['\Google\Cloud\Firestore\V1\RunQueryResponse', 'decode'], - $metadata, $options); - } - - /** - * Runs an aggregation query. - * - * Rather than producing [Document][google.firestore.v1.Document] results like [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], - * this API allows running an aggregation to produce a series of - * [AggregationResult][google.firestore.v1.AggregationResult] server-side. - * - * High-Level Example: - * - * ``` - * -- Return the number of documents in table given a filter. - * SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); - * ``` - * @param \Google\Cloud\Firestore\V1\RunAggregationQueryRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\ServerStreamingCall - */ - public function RunAggregationQuery(\Google\Cloud\Firestore\V1\RunAggregationQueryRequest $argument, - $metadata = [], $options = []) { - return $this->_serverStreamRequest('/google.firestore.v1.Firestore/RunAggregationQuery', - $argument, - ['\Google\Cloud\Firestore\V1\RunAggregationQueryResponse', 'decode'], - $metadata, $options); - } - - /** - * Partitions a query by returning partition cursors that can be used to run - * the query in parallel. The returned partition cursors are split points that - * can be used by RunQuery as starting/end points for the query results. - * @param \Google\Cloud\Firestore\V1\PartitionQueryRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function PartitionQuery(\Google\Cloud\Firestore\V1\PartitionQueryRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.v1.Firestore/PartitionQuery', - $argument, - ['\Google\Cloud\Firestore\V1\PartitionQueryResponse', 'decode'], - $metadata, $options); - } - - /** - * Streams batches of document updates and deletes, in order. - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\BidiStreamingCall - */ - public function Write($metadata = [], $options = []) { - return $this->_bidiRequest('/google.firestore.v1.Firestore/Write', - ['\Google\Cloud\Firestore\V1\WriteResponse','decode'], - $metadata, $options); - } - - /** - * Listens to changes. - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\BidiStreamingCall - */ - public function Listen($metadata = [], $options = []) { - return $this->_bidiRequest('/google.firestore.v1.Firestore/Listen', - ['\Google\Cloud\Firestore\V1\ListenResponse','decode'], - $metadata, $options); - } - - /** - * Lists all the collection IDs underneath a document. - * @param \Google\Cloud\Firestore\V1\ListCollectionIdsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListCollectionIds(\Google\Cloud\Firestore\V1\ListCollectionIdsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.v1.Firestore/ListCollectionIds', - $argument, - ['\Google\Cloud\Firestore\V1\ListCollectionIdsResponse', 'decode'], - $metadata, $options); - } - - /** - * Applies a batch of write operations. - * - * The BatchWrite method does not apply the write operations atomically - * and can apply them out of order. Method does not allow more than one write - * per document. Each write succeeds or fails independently. See the - * [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the success status of each write. - * - * If you require an atomically applied set of writes, use - * [Commit][google.firestore.v1.Firestore.Commit] instead. - * @param \Google\Cloud\Firestore\V1\BatchWriteRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchWrite(\Google\Cloud\Firestore\V1\BatchWriteRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.v1.Firestore/BatchWrite', - $argument, - ['\Google\Cloud\Firestore\V1\BatchWriteResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates a new document. - * @param \Google\Cloud\Firestore\V1\CreateDocumentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateDocument(\Google\Cloud\Firestore\V1\CreateDocumentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.firestore.v1.Firestore/CreateDocument', - $argument, - ['\Google\Cloud\Firestore\V1\Document', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php deleted file mode 100644 index 2f8bc68bdd42..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php +++ /dev/null @@ -1,201 +0,0 @@ -google.firestore.v1.GetDocumentRequest - */ -class GetDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; - */ - protected $mask = null; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type string $transaction - * Reads the document in a transaction. - * @type \Google\Protobuf\Timestamp $read_time - * Reads the version of the document at the given time. - * This may not be older than 270 seconds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * 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 fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * Reads the document in a transaction. - * - * Generated from protobuf field bytes transaction = 3; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(3); - } - - public function hasTransaction() - { - return $this->hasOneof(3); - } - - /** - * Reads the document in a transaction. - * - * Generated from protobuf field bytes transaction = 3; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Reads the version of the document at the given time. - * This may not be older than 270 seconds. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(5); - } - - public function hasReadTime() - { - return $this->hasOneof(5); - } - - /** - * Reads the version of the document at the given time. - * This may not be older than 270 seconds. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php deleted file mode 100644 index 52047a9471ff..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php +++ /dev/null @@ -1,196 +0,0 @@ -google.firestore.v1.ListCollectionIdsRequest - */ -class ListCollectionIdsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type int $page_size - * The maximum number of results to return. - * @type string $page_token - * A page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * 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; - } - - /** - * 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 page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * - * 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; - } - - /** - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(4); - } - - public function hasReadTime() - { - return $this->hasOneof(4); - } - - /** - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php deleted file mode 100644 index 463aaf3628b9..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.firestore.v1.ListCollectionIdsResponse - */ -class ListCollectionIdsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The collection ids. - * - * Generated from protobuf field repeated string collection_ids = 1; - */ - private $collection_ids; - /** - * A page token that may be used to continue the list. - * - * 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\Protobuf\Internal\RepeatedField $collection_ids - * The collection ids. - * @type string $next_page_token - * A page token that may be used to continue the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The collection ids. - * - * Generated from protobuf field repeated string collection_ids = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * The collection ids. - * - * Generated from protobuf field repeated string collection_ids = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * A page token that may be used to continue the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that may be used to continue 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; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php deleted file mode 100644 index ca96eb548349..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php +++ /dev/null @@ -1,411 +0,0 @@ -google.firestore.v1.ListDocumentsRequest - */ -class ListDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` - * or `messages`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $collection_id = ''; - /** - * The maximum number of documents to return. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * The `next_page_token` value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - /** - * The order to sort results by. For example: `priority desc, name`. - * - * Generated from protobuf field string order_by = 6; - */ - protected $order_by = ''; - /** - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7; - */ - protected $mask = null; - /** - * If the list should show missing documents. A missing document is a - * document that does not exist but has sub-documents. These documents will - * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time], - * or [Document.update_time][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or - * `order_by`. - * - * Generated from protobuf field bool show_missing = 12; - */ - protected $show_missing = false; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type string $collection_id - * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` - * or `messages`. - * @type int $page_size - * The maximum number of documents to return. - * @type string $page_token - * The `next_page_token` value returned from a previous List request, if any. - * @type string $order_by - * The order to sort results by. For example: `priority desc, name`. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type string $transaction - * Reads documents in a transaction. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * @type bool $show_missing - * If the list should show missing documents. A missing document is a - * document that does not exist but has sub-documents. These documents will - * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time], - * or [Document.update_time][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or - * `order_by`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * 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. The collection ID, relative to `parent`, to list. For example: `chatrooms` - * or `messages`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCollectionId() - { - return $this->collection_id; - } - - /** - * Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` - * or `messages`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCollectionId($var) - { - GPBUtil::checkString($var, True); - $this->collection_id = $var; - - return $this; - } - - /** - * The maximum number of documents to return. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of documents 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; - } - - /** - * The `next_page_token` value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 4; - * @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 = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The order to sort results by. For example: `priority desc, name`. - * - * Generated from protobuf field string order_by = 6; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * The order to sort results by. For example: `priority desc, name`. - * - * 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 fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * Reads documents in a transaction. - * - * Generated from protobuf field bytes transaction = 8; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(8); - } - - public function hasTransaction() - { - return $this->hasOneof(8); - } - - /** - * Reads documents in a transaction. - * - * Generated from protobuf field bytes transaction = 8; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(10); - } - - public function hasReadTime() - { - return $this->hasOneof(10); - } - - /** - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * If the list should show missing documents. A missing document is a - * document that does not exist but has sub-documents. These documents will - * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time], - * or [Document.update_time][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or - * `order_by`. - * - * Generated from protobuf field bool show_missing = 12; - * @return bool - */ - public function getShowMissing() - { - return $this->show_missing; - } - - /** - * If the list should show missing documents. A missing document is a - * document that does not exist but has sub-documents. These documents will - * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time], - * or [Document.update_time][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or - * `order_by`. - * - * Generated from protobuf field bool show_missing = 12; - * @param bool $var - * @return $this - */ - public function setShowMissing($var) - { - GPBUtil::checkBool($var); - $this->show_missing = $var; - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php deleted file mode 100644 index 94f431de0962..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.firestore.v1.ListDocumentsResponse - */ -class ListDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The Documents found. - * - * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; - */ - private $documents; - /** - * The next 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\Firestore\V1\Document>|\Google\Protobuf\Internal\RepeatedField $documents - * The Documents found. - * @type string $next_page_token - * The next page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The Documents found. - * - * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The Documents found. - * - * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; - * @param array<\Google\Cloud\Firestore\V1\Document>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Document::class); - $this->documents = $arr; - - return $this; - } - - /** - * The next page token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The next 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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php deleted file mode 100644 index 8fb415f4ed4b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.firestore.v1.ListenRequest - */ -class ListenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * Labels associated with this target change. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - protected $target_change; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type \Google\Cloud\Firestore\V1\Target $add_target - * A target to add to this stream. - * @type int $remove_target - * The ID of a target to remove from this stream. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this target change. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * A target to add to this stream. - * - * Generated from protobuf field .google.firestore.v1.Target add_target = 2; - * @return \Google\Cloud\Firestore\V1\Target|null - */ - public function getAddTarget() - { - return $this->readOneof(2); - } - - public function hasAddTarget() - { - return $this->hasOneof(2); - } - - /** - * A target to add to this stream. - * - * Generated from protobuf field .google.firestore.v1.Target add_target = 2; - * @param \Google\Cloud\Firestore\V1\Target $var - * @return $this - */ - public function setAddTarget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The ID of a target to remove from this stream. - * - * Generated from protobuf field int32 remove_target = 3; - * @return int - */ - public function getRemoveTarget() - { - return $this->readOneof(3); - } - - public function hasRemoveTarget() - { - return $this->hasOneof(3); - } - - /** - * The ID of a target to remove from this stream. - * - * Generated from protobuf field int32 remove_target = 3; - * @param int $var - * @return $this - */ - public function setRemoveTarget($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Labels associated with this target change. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this target change. - * - * 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; - } - - /** - * @return string - */ - public function getTargetChange() - { - return $this->whichOneof("target_change"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php deleted file mode 100644 index 02b8e97a1509..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php +++ /dev/null @@ -1,219 +0,0 @@ -google.firestore.v1.ListenResponse - */ -class ListenResponse extends \Google\Protobuf\Internal\Message -{ - protected $response_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\TargetChange $target_change - * Targets have changed. - * @type \Google\Cloud\Firestore\V1\DocumentChange $document_change - * A [Document][google.firestore.v1.Document] has changed. - * @type \Google\Cloud\Firestore\V1\DocumentDelete $document_delete - * A [Document][google.firestore.v1.Document] has been deleted. - * @type \Google\Cloud\Firestore\V1\DocumentRemove $document_remove - * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer - * relevant to that target). - * @type \Google\Cloud\Firestore\V1\ExistenceFilter $filter - * A filter to apply to the set of documents previously returned for the - * given target. - * Returned when documents may have been removed from the given target, but - * the exact documents are unknown. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Targets have changed. - * - * Generated from protobuf field .google.firestore.v1.TargetChange target_change = 2; - * @return \Google\Cloud\Firestore\V1\TargetChange|null - */ - public function getTargetChange() - { - return $this->readOneof(2); - } - - public function hasTargetChange() - { - return $this->hasOneof(2); - } - - /** - * Targets have changed. - * - * Generated from protobuf field .google.firestore.v1.TargetChange target_change = 2; - * @param \Google\Cloud\Firestore\V1\TargetChange $var - * @return $this - */ - public function setTargetChange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TargetChange::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A [Document][google.firestore.v1.Document] has changed. - * - * Generated from protobuf field .google.firestore.v1.DocumentChange document_change = 3; - * @return \Google\Cloud\Firestore\V1\DocumentChange|null - */ - public function getDocumentChange() - { - return $this->readOneof(3); - } - - public function hasDocumentChange() - { - return $this->hasOneof(3); - } - - /** - * A [Document][google.firestore.v1.Document] has changed. - * - * Generated from protobuf field .google.firestore.v1.DocumentChange document_change = 3; - * @param \Google\Cloud\Firestore\V1\DocumentChange $var - * @return $this - */ - public function setDocumentChange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentChange::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A [Document][google.firestore.v1.Document] has been deleted. - * - * Generated from protobuf field .google.firestore.v1.DocumentDelete document_delete = 4; - * @return \Google\Cloud\Firestore\V1\DocumentDelete|null - */ - public function getDocumentDelete() - { - return $this->readOneof(4); - } - - public function hasDocumentDelete() - { - return $this->hasOneof(4); - } - - /** - * A [Document][google.firestore.v1.Document] has been deleted. - * - * Generated from protobuf field .google.firestore.v1.DocumentDelete document_delete = 4; - * @param \Google\Cloud\Firestore\V1\DocumentDelete $var - * @return $this - */ - public function setDocumentDelete($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentDelete::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer - * relevant to that target). - * - * Generated from protobuf field .google.firestore.v1.DocumentRemove document_remove = 6; - * @return \Google\Cloud\Firestore\V1\DocumentRemove|null - */ - public function getDocumentRemove() - { - return $this->readOneof(6); - } - - public function hasDocumentRemove() - { - return $this->hasOneof(6); - } - - /** - * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer - * relevant to that target). - * - * Generated from protobuf field .google.firestore.v1.DocumentRemove document_remove = 6; - * @param \Google\Cloud\Firestore\V1\DocumentRemove $var - * @return $this - */ - public function setDocumentRemove($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentRemove::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * A filter to apply to the set of documents previously returned for the - * given target. - * Returned when documents may have been removed from the given target, but - * the exact documents are unknown. - * - * Generated from protobuf field .google.firestore.v1.ExistenceFilter filter = 5; - * @return \Google\Cloud\Firestore\V1\ExistenceFilter|null - */ - public function getFilter() - { - return $this->readOneof(5); - } - - public function hasFilter() - { - return $this->hasOneof(5); - } - - /** - * A filter to apply to the set of documents previously returned for the - * given target. - * Returned when documents may have been removed from the given target, but - * the exact documents are unknown. - * - * Generated from protobuf field .google.firestore.v1.ExistenceFilter filter = 5; - * @param \Google\Cloud\Firestore\V1\ExistenceFilter $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExistenceFilter::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getResponseType() - { - return $this->whichOneof("response_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php deleted file mode 100644 index fa811000207c..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.MapValue - */ -class MapValue extends \Google\Protobuf\Internal\Message -{ - /** - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * - * Generated from protobuf field map fields = 1; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $fields - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * - * Generated from protobuf field map fields = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * - * Generated from protobuf field map fields = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php deleted file mode 100644 index 58e36b83e877..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php +++ /dev/null @@ -1,357 +0,0 @@ -google.firestore.v1.PartitionQueryRequest - */ -class PartitionQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * - * Generated from protobuf field int64 partition_count = 3; - */ - protected $partition_count = 0; - /** - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - /** - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * - * Generated from protobuf field int32 page_size = 5; - */ - protected $page_size = 0; - protected $query_type; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * A structured query. - * Query must specify collection with all descendants and be ordered by name - * ascending. Other filters, order bys, limits, offsets, and start/end - * cursors are not supported. - * @type int|string $partition_count - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * @type string $page_token - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * @type int $page_size - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * - * 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; - } - - /** - * A structured query. - * Query must specify collection with all descendants and be ordered by name - * ascending. Other filters, order bys, limits, offsets, and start/end - * cursors are not supported. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(2); - } - - /** - * A structured query. - * Query must specify collection with all descendants and be ordered by name - * ascending. Other filters, order bys, limits, offsets, and start/end - * cursors are not supported. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * - * Generated from protobuf field int64 partition_count = 3; - * @return int|string - */ - public function getPartitionCount() - { - return $this->partition_count; - } - - /** - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * - * Generated from protobuf field int64 partition_count = 3; - * @param int|string $var - * @return $this - */ - public function setPartitionCount($var) - { - GPBUtil::checkInt64($var); - $this->partition_count = $var; - - return $this; - } - - /** - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * - * 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; - } - - /** - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * - * Generated from protobuf field int32 page_size = 5; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * - * 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; - } - - /** - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(6); - } - - public function hasReadTime() - { - return $this->hasOneof(6); - } - - /** - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php deleted file mode 100644 index 5fd31af71a8c..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php +++ /dev/null @@ -1,161 +0,0 @@ -google.firestore.v1.PartitionQueryResponse - */ -class PartitionQueryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned. - * - * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; - */ - private $partitions; - /** - * A page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, 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\Firestore\V1\Cursor>|\Google\Protobuf\Internal\RepeatedField $partitions - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned. - * @type string $next_page_token - * A page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, there are no more results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned. - * - * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPartitions() - { - return $this->partitions; - } - - /** - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned. - * - * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; - * @param array<\Google\Cloud\Firestore\V1\Cursor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPartitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Cursor::class); - $this->partitions = $arr; - - return $this; - } - - /** - * A page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, 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 page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, 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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php deleted file mode 100644 index 7f7b92595750..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php +++ /dev/null @@ -1,114 +0,0 @@ -google.firestore.v1.Precondition - */ -class Precondition extends \Google\Protobuf\Internal\Message -{ - protected $condition_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $exists - * When set to `true`, the target document must exist. - * When set to `false`, the target document must not exist. - * @type \Google\Protobuf\Timestamp $update_time - * When set, the target document must exist and have been last updated at - * that time. Timestamp must be microsecond aligned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * When set to `true`, the target document must exist. - * When set to `false`, the target document must not exist. - * - * Generated from protobuf field bool exists = 1; - * @return bool - */ - public function getExists() - { - return $this->readOneof(1); - } - - public function hasExists() - { - return $this->hasOneof(1); - } - - /** - * When set to `true`, the target document must exist. - * When set to `false`, the target document must not exist. - * - * Generated from protobuf field bool exists = 1; - * @param bool $var - * @return $this - */ - public function setExists($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * When set, the target document must exist and have been last updated at - * that time. Timestamp must be microsecond aligned. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->readOneof(2); - } - - public function hasUpdateTime() - { - return $this->hasOneof(2); - } - - /** - * When set, the target document must exist and have been last updated at - * that time. Timestamp must be microsecond aligned. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getConditionType() - { - return $this->whichOneof("condition_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php deleted file mode 100644 index 219c43b1c73e..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php +++ /dev/null @@ -1,105 +0,0 @@ -google.firestore.v1.RollbackRequest - */ -class RollbackRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * Required. The transaction to roll back. - * - * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $transaction = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type string $transaction - * Required. The transaction to roll back. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Required. The transaction to roll back. - * - * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * Required. The transaction to roll back. - * - * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php deleted file mode 100644 index 6ec92486059a..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php +++ /dev/null @@ -1,252 +0,0 @@ -google.firestore.v1.RunAggregationQueryRequest - */ -class RunAggregationQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - protected $query_type; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery $structured_aggregation_query - * An aggregation query. - * @type string $transaction - * Run the aggregation within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction - * Starts a new transaction as part of the query, defaulting to read-only. - * The new transaction ID will be returned as the first response in the - * stream. - * @type \Google\Protobuf\Timestamp $read_time - * Executes the query at the given timestamp. - * Requires: - * * Cannot be more than 270 seconds in the past. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * 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; - } - - /** - * An aggregation query. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery|null - */ - public function getStructuredAggregationQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredAggregationQuery() - { - return $this->hasOneof(2); - } - - /** - * An aggregation query. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery $var - * @return $this - */ - public function setStructuredAggregationQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Run the aggregation within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 4; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(4); - } - - public function hasTransaction() - { - return $this->hasOneof(4); - } - - /** - * Run the aggregation within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 4; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Starts a new transaction as part of the query, defaulting to read-only. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getNewTransaction() - { - return $this->readOneof(5); - } - - public function hasNewTransaction() - { - return $this->hasOneof(5); - } - - /** - * Starts a new transaction as part of the query, defaulting to read-only. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setNewTransaction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Executes the query at the given timestamp. - * Requires: - * * Cannot be more than 270 seconds in the past. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(6); - } - - public function hasReadTime() - { - return $this->hasOneof(6); - } - - /** - * Executes the query at the given timestamp. - * Requires: - * * Cannot be more than 270 seconds in the past. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php deleted file mode 100644 index ca6a2a768e78..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php +++ /dev/null @@ -1,167 +0,0 @@ -google.firestore.v1.RunAggregationQueryResponse - */ -class RunAggregationQueryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A single aggregation result. - * Not present when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; - */ - protected $result = null; - /** - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * - * Generated from protobuf field bytes transaction = 2; - */ - protected $transaction = ''; - /** - * The time at which the aggregate value is valid for. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - */ - protected $read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\AggregationResult $result - * A single aggregation result. - * Not present when reporting partial progress. - * @type string $transaction - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * @type \Google\Protobuf\Timestamp $read_time - * The time at which the aggregate value is valid for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * A single aggregation result. - * Not present when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; - * @return \Google\Cloud\Firestore\V1\AggregationResult|null - */ - public function getResult() - { - return $this->result; - } - - public function hasResult() - { - return isset($this->result); - } - - public function clearResult() - { - unset($this->result); - } - - /** - * A single aggregation result. - * Not present when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; - * @param \Google\Cloud\Firestore\V1\AggregationResult $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\AggregationResult::class); - $this->result = $var; - - return $this; - } - - /** - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * - * Generated from protobuf field bytes transaction = 2; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * - * Generated from protobuf field bytes transaction = 2; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - - /** - * The time at which the aggregate value is valid for. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The time at which the aggregate value is valid for. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php deleted file mode 100644 index d92635ba5a86..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php +++ /dev/null @@ -1,252 +0,0 @@ -google.firestore.v1.RunQueryRequest - */ -class RunQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - protected $query_type; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * A structured query. - * @type string $transaction - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * 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; - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(2); - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 5; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(5); - } - - public function hasTransaction() - { - return $this->hasOneof(5); - } - - /** - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 5; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getNewTransaction() - { - return $this->readOneof(6); - } - - public function hasNewTransaction() - { - return $this->hasOneof(6); - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setNewTransaction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(7); - } - - public function hasReadTime() - { - return $this->hasOneof(7); - } - - /** - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php deleted file mode 100644 index 514b2b390210..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php +++ /dev/null @@ -1,270 +0,0 @@ -google.firestore.v1.RunQueryResponse - */ -class RunQueryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request. - * If set, no other fields will be set in this response. - * - * Generated from protobuf field bytes transaction = 2; - */ - protected $transaction = ''; - /** - * A query result, not set when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - */ - protected $document = null; - /** - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - */ - protected $read_time = null; - /** - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * - * Generated from protobuf field int32 skipped_results = 4; - */ - protected $skipped_results = 0; - protected $continuation_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $transaction - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request. - * If set, no other fields will be set in this response. - * @type \Google\Cloud\Firestore\V1\Document $document - * A query result, not set when reporting partial progress. - * @type \Google\Protobuf\Timestamp $read_time - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * @type int $skipped_results - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * @type bool $done - * If present, Firestore has completely finished the request and no more - * documents will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request. - * If set, no other fields will be set in this response. - * - * Generated from protobuf field bytes transaction = 2; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request. - * If set, no other fields will be set in this response. - * - * Generated from protobuf field bytes transaction = 2; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - - /** - * A query result, not set when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * A query result, not set when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * - * Generated from protobuf field int32 skipped_results = 4; - * @return int - */ - public function getSkippedResults() - { - return $this->skipped_results; - } - - /** - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * - * Generated from protobuf field int32 skipped_results = 4; - * @param int $var - * @return $this - */ - public function setSkippedResults($var) - { - GPBUtil::checkInt32($var); - $this->skipped_results = $var; - - return $this; - } - - /** - * If present, Firestore has completely finished the request and no more - * documents will be returned. - * - * Generated from protobuf field bool done = 6; - * @return bool - */ - public function getDone() - { - return $this->readOneof(6); - } - - public function hasDone() - { - return $this->hasOneof(6); - } - - /** - * If present, Firestore has completely finished the request and no more - * documents will be returned. - * - * Generated from protobuf field bool done = 6; - * @param bool $var - * @return $this - */ - public function setDone($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getContinuationSelector() - { - return $this->whichOneof("continuation_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php deleted file mode 100644 index 4da539844083..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php +++ /dev/null @@ -1,117 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery - */ -class StructuredAggregationQuery extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Series of aggregations to apply over the results of the `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $aggregations; - protected $query_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * Nested structured query. - * @type array<\Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation>|\Google\Protobuf\Internal\RepeatedField $aggregations - * Optional. Series of aggregations to apply over the results of the `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Nested structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(1); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(1); - } - - /** - * Nested structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. Series of aggregations to apply over the results of the `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAggregations() - { - return $this->aggregations; - } - - /** - * Optional. Series of aggregations to apply over the results of the `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAggregations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation::class); - $this->aggregations = $arr; - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php deleted file mode 100644 index a2c227df1def..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php +++ /dev/null @@ -1,216 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery.Aggregation - */ -class Aggregation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Optional name of the field to store the result of the aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. - * - * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $alias = ''; - protected $operator; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count $count - * Count aggregator. - * @type string $alias - * Optional. Optional name of the field to store the result of the aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Count aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; - * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count|null - */ - public function getCount() - { - return $this->readOneof(1); - } - - public function hasCount() - { - return $this->hasOneof(1); - } - - /** - * Count aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. Optional name of the field to store the result of the aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. - * - * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAlias() - { - return $this->alias; - } - - /** - * Optional. Optional name of the field to store the result of the aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT_UP_TO(4) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. - * - * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAlias($var) - { - GPBUtil::checkString($var, True); - $this->alias = $var; - - return $this; - } - - /** - * @return string - */ - public function getOperator() - { - return $this->whichOneof("operator"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Aggregation::class, \Google\Cloud\Firestore\V1\StructuredAggregationQuery_Aggregation::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php deleted file mode 100644 index 61869fb14bc7..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php +++ /dev/null @@ -1,163 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery.Aggregation.Count - */ -class Count extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Optional constraint on the maximum number of documents to count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $up_to = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Int64Value $up_to - * Optional. Optional constraint on the maximum number of documents to count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Optional constraint on the maximum number of documents to count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getUpTo() - { - return $this->up_to; - } - - public function hasUpTo() - { - return isset($this->up_to); - } - - public function clearUpTo() - { - unset($this->up_to); - } - - /** - * Returns the unboxed value from getUpTo() - - * Optional. Optional constraint on the maximum number of documents to count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getUpToUnwrapped() - { - return $this->readWrapperValue("up_to"); - } - - /** - * Optional. Optional constraint on the maximum number of documents to count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setUpTo($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->up_to = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. Optional constraint on the maximum number of documents to count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setUpToUnwrapped($var) - { - $this->writeWrapperValue("up_to", $var); - return $this;} - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Count::class, \Google\Cloud\Firestore\V1\StructuredAggregationQuery_Aggregation_Count::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery_Aggregation.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery_Aggregation.php deleted file mode 100644 index 39b5ca29dbb8..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery_Aggregation.php +++ /dev/null @@ -1,16 +0,0 @@ -google.firestore.v1.StructuredQuery - */ -class StructuredQuery extends \Google\Protobuf\Internal\Message -{ - /** - * The projection to return. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; - */ - protected $select = null; - /** - * The collections to query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; - */ - private $from; - /** - * The filter to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; - */ - protected $where = null; - /** - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; - */ - private $order_by; - /** - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; - */ - protected $start_at = null; - /** - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; - */ - protected $end_at = null; - /** - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field int32 offset = 6; - */ - protected $offset = 0; - /** - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - */ - protected $limit = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\Projection $select - * The projection to return. - * @type array<\Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector>|\Google\Protobuf\Internal\RepeatedField $from - * The collections to query. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\Filter $where - * The filter to apply. - * @type array<\Google\Cloud\Firestore\V1\StructuredQuery\Order>|\Google\Protobuf\Internal\RepeatedField $order_by - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * @type \Google\Cloud\Firestore\V1\Cursor $start_at - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * @type \Google\Cloud\Firestore\V1\Cursor $end_at - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * @type int $offset - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * @type \Google\Protobuf\Int32Value $limit - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The projection to return. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\Projection|null - */ - public function getSelect() - { - return $this->select; - } - - public function hasSelect() - { - return isset($this->select); - } - - public function clearSelect() - { - unset($this->select); - } - - /** - * The projection to return. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\Projection $var - * @return $this - */ - public function setSelect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\Projection::class); - $this->select = $var; - - return $this; - } - - /** - * The collections to query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFrom() - { - return $this->from; - } - - /** - * The collections to query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; - * @param array<\Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFrom($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector::class); - $this->from = $arr; - - return $this; - } - - /** - * The filter to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\Filter|null - */ - public function getWhere() - { - return $this->where; - } - - public function hasWhere() - { - return isset($this->where); - } - - public function clearWhere() - { - unset($this->where); - } - - /** - * The filter to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\Filter $var - * @return $this - */ - public function setWhere($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\Filter::class); - $this->where = $var; - - return $this; - } - - /** - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; - * @param array<\Google\Cloud\Firestore\V1\StructuredQuery\Order>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOrderBy($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\Order::class); - $this->order_by = $arr; - - return $this; - } - - /** - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; - * @return \Google\Cloud\Firestore\V1\Cursor|null - */ - public function getStartAt() - { - return $this->start_at; - } - - public function hasStartAt() - { - return isset($this->start_at); - } - - public function clearStartAt() - { - unset($this->start_at); - } - - /** - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; - * @param \Google\Cloud\Firestore\V1\Cursor $var - * @return $this - */ - public function setStartAt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Cursor::class); - $this->start_at = $var; - - return $this; - } - - /** - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; - * @return \Google\Cloud\Firestore\V1\Cursor|null - */ - public function getEndAt() - { - return $this->end_at; - } - - public function hasEndAt() - { - return isset($this->end_at); - } - - public function clearEndAt() - { - unset($this->end_at); - } - - /** - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; - * @param \Google\Cloud\Firestore\V1\Cursor $var - * @return $this - */ - public function setEndAt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Cursor::class); - $this->end_at = $var; - - return $this; - } - - /** - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field int32 offset = 6; - * @return int - */ - public function getOffset() - { - return $this->offset; - } - - /** - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field int32 offset = 6; - * @param int $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt32($var); - $this->offset = $var; - - return $this; - } - - /** - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @return \Google\Protobuf\Int32Value|null - */ - public function getLimit() - { - return $this->limit; - } - - public function hasLimit() - { - return isset($this->limit); - } - - public function clearLimit() - { - unset($this->limit); - } - - /** - * Returns the unboxed value from getLimit() - - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @return int|null - */ - public function getLimitUnwrapped() - { - return $this->readWrapperValue("limit"); - } - - /** - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setLimit($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->limit = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @param int|null $var - * @return $this - */ - public function setLimitUnwrapped($var) - { - $this->writeWrapperValue("limit", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php deleted file mode 100644 index b06253d9d6ad..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php +++ /dev/null @@ -1,116 +0,0 @@ -google.firestore.v1.StructuredQuery.CollectionSelector - */ -class CollectionSelector extends \Google\Protobuf\Internal\Message -{ - /** - * The collection ID. - * When set, selects only collections with this ID. - * - * Generated from protobuf field string collection_id = 2; - */ - protected $collection_id = ''; - /** - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * - * Generated from protobuf field bool all_descendants = 3; - */ - protected $all_descendants = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $collection_id - * The collection ID. - * When set, selects only collections with this ID. - * @type bool $all_descendants - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The collection ID. - * When set, selects only collections with this ID. - * - * Generated from protobuf field string collection_id = 2; - * @return string - */ - public function getCollectionId() - { - return $this->collection_id; - } - - /** - * The collection ID. - * When set, selects only collections with this ID. - * - * Generated from protobuf field string collection_id = 2; - * @param string $var - * @return $this - */ - public function setCollectionId($var) - { - GPBUtil::checkString($var, True); - $this->collection_id = $var; - - return $this; - } - - /** - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * - * Generated from protobuf field bool all_descendants = 3; - * @return bool - */ - public function getAllDescendants() - { - return $this->all_descendants; - } - - /** - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * - * Generated from protobuf field bool all_descendants = 3; - * @param bool $var - * @return $this - */ - public function setAllDescendants($var) - { - GPBUtil::checkBool($var); - $this->all_descendants = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CollectionSelector::class, \Google\Cloud\Firestore\V1\StructuredQuery_CollectionSelector::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php deleted file mode 100644 index f63c324d982d..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php +++ /dev/null @@ -1,112 +0,0 @@ -google.firestore.v1.StructuredQuery.CompositeFilter - */ -class CompositeFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The operator for combining multiple filters. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; - */ - protected $op = 0; - /** - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; - */ - private $filters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $op - * The operator for combining multiple filters. - * @type array<\Google\Cloud\Firestore\V1\StructuredQuery\Filter>|\Google\Protobuf\Internal\RepeatedField $filters - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The operator for combining multiple filters. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; - * @return int - */ - public function getOp() - { - return $this->op; - } - - /** - * The operator for combining multiple filters. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; - * @param int $var - * @return $this - */ - public function setOp($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter\Operator::class); - $this->op = $var; - - return $this; - } - - /** - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFilters() - { - return $this->filters; - } - - /** - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; - * @param array<\Google\Cloud\Firestore\V1\StructuredQuery\Filter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\Filter::class); - $this->filters = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CompositeFilter::class, \Google\Cloud\Firestore\V1\StructuredQuery_CompositeFilter::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php deleted file mode 100644 index ec17fb748d0f..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php +++ /dev/null @@ -1,61 +0,0 @@ -google.firestore.v1.StructuredQuery.CompositeFilter.Operator - */ -class Operator -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; - */ - const OPERATOR_UNSPECIFIED = 0; - /** - * Documents are required to satisfy all of the combined filters. - * - * Generated from protobuf enum AND = 1; - */ - const PBAND = 1; - - private static $valueToName = [ - self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', - self::PBAND => 'AND', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has 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(Operator::class, \Google\Cloud\Firestore\V1\StructuredQuery_CompositeFilter_Operator::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php deleted file mode 100644 index 70989c758cf2..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php +++ /dev/null @@ -1,64 +0,0 @@ -google.firestore.v1.StructuredQuery.Direction - */ -class Direction -{ - /** - * Unspecified. - * - * Generated from protobuf enum DIRECTION_UNSPECIFIED = 0; - */ - const DIRECTION_UNSPECIFIED = 0; - /** - * Ascending. - * - * Generated from protobuf enum ASCENDING = 1; - */ - const ASCENDING = 1; - /** - * Descending. - * - * Generated from protobuf enum DESCENDING = 2; - */ - const DESCENDING = 2; - - private static $valueToName = [ - self::DIRECTION_UNSPECIFIED => 'DIRECTION_UNSPECIFIED', - self::ASCENDING => 'ASCENDING', - self::DESCENDING => 'DESCENDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Direction::class, \Google\Cloud\Firestore\V1\StructuredQuery_Direction::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php deleted file mode 100644 index d027d09f1050..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php +++ /dev/null @@ -1,158 +0,0 @@ -google.firestore.v1.StructuredQuery.FieldFilter - */ -class FieldFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The field to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - protected $field = null; - /** - * The operator to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; - */ - protected $op = 0; - /** - * The value to compare to. - * - * Generated from protobuf field .google.firestore.v1.Value value = 3; - */ - protected $value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to filter by. - * @type int $op - * The operator to filter by. - * @type \Google\Cloud\Firestore\V1\Value $value - * The value to compare to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The field to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * The field to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->field = $var; - - return $this; - } - - /** - * The operator to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; - * @return int - */ - public function getOp() - { - return $this->op; - } - - /** - * The operator to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; - * @param int $var - * @return $this - */ - public function setOp($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter\Operator::class); - $this->op = $var; - - return $this; - } - - /** - * The value to compare to. - * - * Generated from protobuf field .google.firestore.v1.Value value = 3; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getValue() - { - return $this->value; - } - - public function hasValue() - { - return isset($this->value); - } - - public function clearValue() - { - unset($this->value); - } - - /** - * The value to compare to. - * - * Generated from protobuf field .google.firestore.v1.Value value = 3; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FieldFilter::class, \Google\Cloud\Firestore\V1\StructuredQuery_FieldFilter::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php deleted file mode 100644 index 19bf26677960..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php +++ /dev/null @@ -1,143 +0,0 @@ -google.firestore.v1.StructuredQuery.FieldFilter.Operator - */ -class Operator -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; - */ - const OPERATOR_UNSPECIFIED = 0; - /** - * The given `field` is less than the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum LESS_THAN = 1; - */ - const LESS_THAN = 1; - /** - * The given `field` is less than or equal to the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum LESS_THAN_OR_EQUAL = 2; - */ - const LESS_THAN_OR_EQUAL = 2; - /** - * The given `field` is greater than the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum GREATER_THAN = 3; - */ - const GREATER_THAN = 3; - /** - * The given `field` is greater than or equal to the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum GREATER_THAN_OR_EQUAL = 4; - */ - const GREATER_THAN_OR_EQUAL = 4; - /** - * The given `field` is equal to the given `value`. - * - * Generated from protobuf enum EQUAL = 5; - */ - const EQUAL = 5; - /** - * The given `field` is not equal to the given `value`. - * Requires: - * * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum NOT_EQUAL = 6; - */ - const NOT_EQUAL = 6; - /** - * The given `field` is an array that contains the given `value`. - * - * Generated from protobuf enum ARRAY_CONTAINS = 7; - */ - const ARRAY_CONTAINS = 7; - /** - * The given `field` is equal to at least one value in the given array. - * Requires: - * * That `value` is a non-empty `ArrayValue` with at most 10 values. - * * No other `IN` or `ARRAY_CONTAINS_ANY` or `NOT_IN`. - * - * Generated from protobuf enum IN = 8; - */ - const IN = 8; - /** - * The given `field` is an array that contains any of the values in the - * given array. - * Requires: - * * That `value` is a non-empty `ArrayValue` with at most 10 values. - * * No other `IN` or `ARRAY_CONTAINS_ANY` or `NOT_IN`. - * - * Generated from protobuf enum ARRAY_CONTAINS_ANY = 9; - */ - const ARRAY_CONTAINS_ANY = 9; - /** - * The value of the `field` is not in the given array. - * Requires: - * * That `value` is a non-empty `ArrayValue` with at most 10 values. - * * No other `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`, - * `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum NOT_IN = 10; - */ - const NOT_IN = 10; - - private static $valueToName = [ - self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', - self::LESS_THAN => 'LESS_THAN', - self::LESS_THAN_OR_EQUAL => 'LESS_THAN_OR_EQUAL', - self::GREATER_THAN => 'GREATER_THAN', - self::GREATER_THAN_OR_EQUAL => 'GREATER_THAN_OR_EQUAL', - self::EQUAL => 'EQUAL', - self::NOT_EQUAL => 'NOT_EQUAL', - self::ARRAY_CONTAINS => 'ARRAY_CONTAINS', - self::IN => 'IN', - self::ARRAY_CONTAINS_ANY => 'ARRAY_CONTAINS_ANY', - self::NOT_IN => 'NOT_IN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Operator::class, \Google\Cloud\Firestore\V1\StructuredQuery_FieldFilter_Operator::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php deleted file mode 100644 index 6c52d09050cb..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php +++ /dev/null @@ -1,78 +0,0 @@ -google.firestore.v1.StructuredQuery.FieldReference - */ -class FieldReference extends \Google\Protobuf\Internal\Message -{ - /** - * The relative path of the document being referenced. - * Requires: - * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. - * - * Generated from protobuf field string field_path = 2; - */ - protected $field_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_path - * The relative path of the document being referenced. - * Requires: - * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The relative path of the document being referenced. - * Requires: - * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. - * - * Generated from protobuf field string field_path = 2; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * The relative path of the document being referenced. - * Requires: - * * Conform to [document field name][google.firestore.v1.Document.fields] limitations. - * - * Generated from protobuf field string field_path = 2; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FieldReference::class, \Google\Cloud\Firestore\V1\StructuredQuery_FieldReference::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php deleted file mode 100644 index dc43c16b7859..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php +++ /dev/null @@ -1,144 +0,0 @@ -google.firestore.v1.StructuredQuery.Filter - */ -class Filter extends \Google\Protobuf\Internal\Message -{ - protected $filter_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter $composite_filter - * A composite filter. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter $field_filter - * A filter on a document field. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter $unary_filter - * A filter that takes exactly one argument. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * A composite filter. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter|null - */ - public function getCompositeFilter() - { - return $this->readOneof(1); - } - - public function hasCompositeFilter() - { - return $this->hasOneof(1); - } - - /** - * A composite filter. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter $var - * @return $this - */ - public function setCompositeFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A filter on a document field. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter|null - */ - public function getFieldFilter() - { - return $this->readOneof(2); - } - - public function hasFieldFilter() - { - return $this->hasOneof(2); - } - - /** - * A filter on a document field. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter $var - * @return $this - */ - public function setFieldFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A filter that takes exactly one argument. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter|null - */ - public function getUnaryFilter() - { - return $this->readOneof(3); - } - - public function hasUnaryFilter() - { - return $this->hasOneof(3); - } - - /** - * A filter that takes exactly one argument. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter $var - * @return $this - */ - public function setUnaryFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getFilterType() - { - return $this->whichOneof("filter_type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Filter::class, \Google\Cloud\Firestore\V1\StructuredQuery_Filter::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php deleted file mode 100644 index a71ebeb1b1d0..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php +++ /dev/null @@ -1,114 +0,0 @@ -google.firestore.v1.StructuredQuery.Order - */ -class Order extends \Google\Protobuf\Internal\Message -{ - /** - * The field to order by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - protected $field = null; - /** - * The direction to order by. Defaults to `ASCENDING`. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; - */ - protected $direction = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to order by. - * @type int $direction - * The direction to order by. Defaults to `ASCENDING`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The field to order by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * The field to order by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->field = $var; - - return $this; - } - - /** - * The direction to order by. Defaults to `ASCENDING`. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; - * @return int - */ - public function getDirection() - { - return $this->direction; - } - - /** - * The direction to order by. Defaults to `ASCENDING`. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; - * @param int $var - * @return $this - */ - public function setDirection($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\Direction::class); - $this->direction = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Order::class, \Google\Cloud\Firestore\V1\StructuredQuery_Order::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php deleted file mode 100644 index 36909ca38947..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php +++ /dev/null @@ -1,78 +0,0 @@ -google.firestore.v1.StructuredQuery.Projection - */ -class Projection extends \Google\Protobuf\Internal\Message -{ - /** - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Firestore\V1\StructuredQuery\FieldReference>|\Google\Protobuf\Internal\RepeatedField $fields - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - * @param array<\Google\Cloud\Firestore\V1\StructuredQuery\FieldReference>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->fields = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Projection::class, \Google\Cloud\Firestore\V1\StructuredQuery_Projection::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php deleted file mode 100644 index 4f90d0cfdd4b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php +++ /dev/null @@ -1,112 +0,0 @@ -google.firestore.v1.StructuredQuery.UnaryFilter - */ -class UnaryFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The unary operator to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - */ - protected $op = 0; - protected $operand_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $op - * The unary operator to apply. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to which to apply the operator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The unary operator to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * @return int - */ - public function getOp() - { - return $this->op; - } - - /** - * The unary operator to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * @param int $var - * @return $this - */ - public function setOp($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter\Operator::class); - $this->op = $var; - - return $this; - } - - /** - * The field to which to apply the operator. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->readOneof(2); - } - - public function hasField() - { - return $this->hasOneof(2); - } - - /** - * The field to which to apply the operator. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getOperandType() - { - return $this->whichOneof("operand_type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UnaryFilter::class, \Google\Cloud\Firestore\V1\StructuredQuery_UnaryFilter::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php deleted file mode 100644 index d8a8dffc6d00..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php +++ /dev/null @@ -1,84 +0,0 @@ -google.firestore.v1.StructuredQuery.UnaryFilter.Operator - */ -class Operator -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; - */ - const OPERATOR_UNSPECIFIED = 0; - /** - * The given `field` is equal to `NaN`. - * - * Generated from protobuf enum IS_NAN = 2; - */ - const IS_NAN = 2; - /** - * The given `field` is equal to `NULL`. - * - * Generated from protobuf enum IS_NULL = 3; - */ - const IS_NULL = 3; - /** - * The given `field` is not equal to `NaN`. - * Requires: - * * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum IS_NOT_NAN = 4; - */ - const IS_NOT_NAN = 4; - /** - * The given `field` is not equal to `NULL`. - * Requires: - * * A single `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum IS_NOT_NULL = 5; - */ - const IS_NOT_NULL = 5; - - private static $valueToName = [ - self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', - self::IS_NAN => 'IS_NAN', - self::IS_NULL => 'IS_NULL', - self::IS_NOT_NAN => 'IS_NOT_NAN', - self::IS_NOT_NULL => 'IS_NOT_NULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Operator::class, \Google\Cloud\Firestore\V1\StructuredQuery_UnaryFilter_Operator::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_CollectionSelector.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_CollectionSelector.php deleted file mode 100644 index 8e2ecf4083c8..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery_CollectionSelector.php +++ /dev/null @@ -1,16 +0,0 @@ -google.firestore.v1.Target - */ -class Target extends \Google\Protobuf\Internal\Message -{ - /** - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * - * Generated from protobuf field int32 target_id = 5; - */ - protected $target_id = 0; - /** - * If the target should be removed once it is current and consistent. - * - * Generated from protobuf field bool once = 6; - */ - protected $once = false; - protected $target_type; - protected $resume_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Target\QueryTarget $query - * A target specified by a query. - * @type \Google\Cloud\Firestore\V1\Target\DocumentsTarget $documents - * A target specified by a set of document names. - * @type string $resume_token - * A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target. - * Using a resume token with a different target is unsupported and may fail. - * @type \Google\Protobuf\Timestamp $read_time - * Start listening after a specific `read_time`. - * The client must know the state of matching documents at this time. - * @type int $target_id - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * @type bool $once - * If the target should be removed once it is current and consistent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * A target specified by a query. - * - * Generated from protobuf field .google.firestore.v1.Target.QueryTarget query = 2; - * @return \Google\Cloud\Firestore\V1\Target\QueryTarget|null - */ - public function getQuery() - { - return $this->readOneof(2); - } - - public function hasQuery() - { - return $this->hasOneof(2); - } - - /** - * A target specified by a query. - * - * Generated from protobuf field .google.firestore.v1.Target.QueryTarget query = 2; - * @param \Google\Cloud\Firestore\V1\Target\QueryTarget $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target\QueryTarget::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A target specified by a set of document names. - * - * Generated from protobuf field .google.firestore.v1.Target.DocumentsTarget documents = 3; - * @return \Google\Cloud\Firestore\V1\Target\DocumentsTarget|null - */ - public function getDocuments() - { - return $this->readOneof(3); - } - - public function hasDocuments() - { - return $this->hasOneof(3); - } - - /** - * A target specified by a set of document names. - * - * Generated from protobuf field .google.firestore.v1.Target.DocumentsTarget documents = 3; - * @param \Google\Cloud\Firestore\V1\Target\DocumentsTarget $var - * @return $this - */ - public function setDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target\DocumentsTarget::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target. - * Using a resume token with a different target is unsupported and may fail. - * - * Generated from protobuf field bytes resume_token = 4; - * @return string - */ - public function getResumeToken() - { - return $this->readOneof(4); - } - - public function hasResumeToken() - { - return $this->hasOneof(4); - } - - /** - * A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target. - * Using a resume token with a different target is unsupported and may fail. - * - * Generated from protobuf field bytes resume_token = 4; - * @param string $var - * @return $this - */ - public function setResumeToken($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Start listening after a specific `read_time`. - * The client must know the state of matching documents at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 11; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(11); - } - - public function hasReadTime() - { - return $this->hasOneof(11); - } - - /** - * Start listening after a specific `read_time`. - * The client must know the state of matching documents at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 11; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * - * Generated from protobuf field int32 target_id = 5; - * @return int - */ - public function getTargetId() - { - return $this->target_id; - } - - /** - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * - * Generated from protobuf field int32 target_id = 5; - * @param int $var - * @return $this - */ - public function setTargetId($var) - { - GPBUtil::checkInt32($var); - $this->target_id = $var; - - return $this; - } - - /** - * If the target should be removed once it is current and consistent. - * - * Generated from protobuf field bool once = 6; - * @return bool - */ - public function getOnce() - { - return $this->once; - } - - /** - * If the target should be removed once it is current and consistent. - * - * Generated from protobuf field bool once = 6; - * @param bool $var - * @return $this - */ - public function setOnce($var) - { - GPBUtil::checkBool($var); - $this->once = $var; - - return $this; - } - - /** - * @return string - */ - public function getTargetType() - { - return $this->whichOneof("target_type"); - } - - /** - * @return string - */ - public function getResumeType() - { - return $this->whichOneof("resume_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php deleted file mode 100644 index b96562c648cf..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php +++ /dev/null @@ -1,82 +0,0 @@ -google.firestore.v1.Target.DocumentsTarget - */ -class DocumentsTarget extends \Google\Protobuf\Internal\Message -{ - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - */ - private $documents; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $documents - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->documents = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DocumentsTarget::class, \Google\Cloud\Firestore\V1\Target_DocumentsTarget::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php deleted file mode 100644 index 56c02faeb030..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php +++ /dev/null @@ -1,132 +0,0 @@ -google.firestore.v1.Target.QueryTarget - */ -class QueryTarget extends \Google\Protobuf\Internal\Message -{ - /** - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1; - */ - protected $parent = ''; - protected $query_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * A structured query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * 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; - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(2); - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QueryTarget::class, \Google\Cloud\Firestore\V1\Target_QueryTarget::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php deleted file mode 100644 index 7916d0c40af0..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php +++ /dev/null @@ -1,267 +0,0 @@ -google.firestore.v1.TargetChange - */ -class TargetChange extends \Google\Protobuf\Internal\Message -{ - /** - * The type of change that occurred. - * - * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; - */ - protected $target_change_type = 0; - /** - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * - * Generated from protobuf field repeated int32 target_ids = 2; - */ - private $target_ids; - /** - * The error that resulted in this change, if applicable. - * - * Generated from protobuf field .google.rpc.Status cause = 3; - */ - protected $cause = null; - /** - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * - * Generated from protobuf field bytes resume_token = 4; - */ - protected $resume_token = ''; - /** - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - */ - protected $read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target_change_type - * The type of change that occurred. - * @type array|\Google\Protobuf\Internal\RepeatedField $target_ids - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * @type \Google\Rpc\Status $cause - * The error that resulted in this change, if applicable. - * @type string $resume_token - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * @type \Google\Protobuf\Timestamp $read_time - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The type of change that occurred. - * - * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; - * @return int - */ - public function getTargetChangeType() - { - return $this->target_change_type; - } - - /** - * The type of change that occurred. - * - * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; - * @param int $var - * @return $this - */ - public function setTargetChangeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\TargetChange\TargetChangeType::class); - $this->target_change_type = $var; - - return $this; - } - - /** - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * - * Generated from protobuf field repeated int32 target_ids = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetIds() - { - return $this->target_ids; - } - - /** - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * - * Generated from protobuf field repeated int32 target_ids = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->target_ids = $arr; - - return $this; - } - - /** - * The error that resulted in this change, if applicable. - * - * Generated from protobuf field .google.rpc.Status cause = 3; - * @return \Google\Rpc\Status|null - */ - public function getCause() - { - return $this->cause; - } - - public function hasCause() - { - return isset($this->cause); - } - - public function clearCause() - { - unset($this->cause); - } - - /** - * The error that resulted in this change, if applicable. - * - * Generated from protobuf field .google.rpc.Status cause = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setCause($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->cause = $var; - - return $this; - } - - /** - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * - * Generated from protobuf field bytes resume_token = 4; - * @return string - */ - public function getResumeToken() - { - return $this->resume_token; - } - - /** - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * - * Generated from protobuf field bytes resume_token = 4; - * @param string $var - * @return $this - */ - public function setResumeToken($var) - { - GPBUtil::checkString($var, False); - $this->resume_token = $var; - - return $this; - } - - /** - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php deleted file mode 100644 index 23694a75db2e..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php +++ /dev/null @@ -1,86 +0,0 @@ -google.firestore.v1.TargetChange.TargetChangeType - */ -class TargetChangeType -{ - /** - * No change has occurred. Used only to send an updated `resume_token`. - * - * Generated from protobuf enum NO_CHANGE = 0; - */ - const NO_CHANGE = 0; - /** - * The targets have been added. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * The targets have been removed. - * - * Generated from protobuf enum REMOVE = 2; - */ - const REMOVE = 2; - /** - * The targets reflect all changes committed before the targets were added - * to the stream. - * This will be sent after or with a `read_time` that is greater than or - * equal to the time at which the targets were added. - * Listeners can wait for this change if read-after-write semantics - * are desired. - * - * Generated from protobuf enum CURRENT = 3; - */ - const CURRENT = 3; - /** - * The targets have been reset, and a new initial state for the targets - * will be returned in subsequent changes. - * After the initial state is complete, `CURRENT` will be returned even - * if the target was previously indicated to be `CURRENT`. - * - * Generated from protobuf enum RESET = 4; - */ - const RESET = 4; - - private static $valueToName = [ - self::NO_CHANGE => 'NO_CHANGE', - self::ADD => 'ADD', - self::REMOVE => 'REMOVE', - self::CURRENT => 'CURRENT', - self::RESET => 'RESET', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TargetChangeType::class, \Google\Cloud\Firestore\V1\TargetChange_TargetChangeType::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange_TargetChangeType.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange_TargetChangeType.php deleted file mode 100644 index 32530a519a92..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange_TargetChangeType.php +++ /dev/null @@ -1,16 +0,0 @@ -google.firestore.v1.TransactionOptions - */ -class TransactionOptions extends \Google\Protobuf\Internal\Message -{ - protected $mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly $read_only - * The transaction can only be used for read operations. - * @type \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite $read_write - * The transaction can be used for both read and write operations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The transaction can only be used for read operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; - * @return \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly|null - */ - public function getReadOnly() - { - return $this->readOneof(2); - } - - public function hasReadOnly() - { - return $this->hasOneof(2); - } - - /** - * The transaction can only be used for read operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; - * @param \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly $var - * @return $this - */ - public function setReadOnly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The transaction can be used for both read and write operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; - * @return \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite|null - */ - public function getReadWrite() - { - return $this->readOneof(3); - } - - public function hasReadWrite() - { - return $this->hasOneof(3); - } - - /** - * The transaction can be used for both read and write operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; - * @param \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite $var - * @return $this - */ - public function setReadWrite($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getMode() - { - return $this->whichOneof("mode"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php deleted file mode 100644 index 4e2cb53c02a2..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php +++ /dev/null @@ -1,84 +0,0 @@ -google.firestore.v1.TransactionOptions.ReadOnly - */ -class PBReadOnly extends \Google\Protobuf\Internal\Message -{ - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents at the given time. - * This may not be older than 60 seconds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Reads documents at the given time. - * This may not be older than 60 seconds. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(2); - } - - public function hasReadTime() - { - return $this->hasOneof(2); - } - - /** - * Reads documents at the given time. - * This may not be older than 60 seconds. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PBReadOnly::class, \Google\Cloud\Firestore\V1\TransactionOptions_ReadOnly::class); - -// Adding a class alias for backwards compatibility with the "readonly" keyword. -class_alias(PBReadOnly::class, __NAMESPACE__ . '\ReadOnly'); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadOnly.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadOnly.php deleted file mode 100644 index cb227a9fbefb..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadOnly.php +++ /dev/null @@ -1,9 +0,0 @@ -google.firestore.v1.TransactionOptions.ReadWrite - */ -class ReadWrite extends \Google\Protobuf\Internal\Message -{ - /** - * An optional transaction to retry. - * - * Generated from protobuf field bytes retry_transaction = 1; - */ - protected $retry_transaction = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $retry_transaction - * An optional transaction to retry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * An optional transaction to retry. - * - * Generated from protobuf field bytes retry_transaction = 1; - * @return string - */ - public function getRetryTransaction() - { - return $this->retry_transaction; - } - - /** - * An optional transaction to retry. - * - * Generated from protobuf field bytes retry_transaction = 1; - * @param string $var - * @return $this - */ - public function setRetryTransaction($var) - { - GPBUtil::checkString($var, False); - $this->retry_transaction = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReadWrite::class, \Google\Cloud\Firestore\V1\TransactionOptions_ReadWrite::class); - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions_ReadOnly.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions_ReadOnly.php deleted file mode 100644 index 94a78fa27201..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions_ReadOnly.php +++ /dev/null @@ -1,16 +0,0 @@ -google.firestore.v1.UpdateDocumentRequest - */ -class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The updated document. - * Creates the document if it does not already exist. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; - */ - protected $update_mask = null; - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - */ - protected $mask = null; - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - */ - protected $current_document = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $document - * Required. The updated document. - * Creates the document if it does not already exist. - * @type \Google\Cloud\Firestore\V1\DocumentMask $update_mask - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type \Google\Cloud\Firestore\V1\Precondition $current_document - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The updated document. - * Creates the document if it does not already exist. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. The updated document. - * Creates the document if it does not already exist. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @return \Google\Cloud\Firestore\V1\Precondition|null - */ - public function getCurrentDocument() - { - return $this->current_document; - } - - public function hasCurrentDocument() - { - return isset($this->current_document); - } - - public function clearCurrentDocument() - { - unset($this->current_document); - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @param \Google\Cloud\Firestore\V1\Precondition $var - * @return $this - */ - public function setCurrentDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); - $this->current_document = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php deleted file mode 100644 index de439f4118f4..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php +++ /dev/null @@ -1,435 +0,0 @@ -google.firestore.v1.Value - */ -class Value extends \Google\Protobuf\Internal\Message -{ - protected $value_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $null_value - * A null value. - * @type bool $boolean_value - * A boolean value. - * @type int|string $integer_value - * An integer value. - * @type float $double_value - * A double value. - * @type \Google\Protobuf\Timestamp $timestamp_value - * A timestamp value. - * Precise only to microseconds. When stored, any additional precision is - * rounded down. - * @type string $string_value - * A string value. - * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes of the UTF-8 representation are considered by - * queries. - * @type string $bytes_value - * A bytes value. - * Must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes are considered by queries. - * @type string $reference_value - * A reference to a document. For example: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Type\LatLng $geo_point_value - * A geo point value representing a point on the surface of Earth. - * @type \Google\Cloud\Firestore\V1\ArrayValue $array_value - * An array value. - * Cannot directly contain another array value, though can contain an - * map which contains another array. - * @type \Google\Cloud\Firestore\V1\MapValue $map_value - * A map value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * A null value. - * - * Generated from protobuf field .google.protobuf.NullValue null_value = 11; - * @return int - */ - public function getNullValue() - { - return $this->readOneof(11); - } - - public function hasNullValue() - { - return $this->hasOneof(11); - } - - /** - * A null value. - * - * Generated from protobuf field .google.protobuf.NullValue null_value = 11; - * @param int $var - * @return $this - */ - public function setNullValue($var) - { - GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * A boolean value. - * - * Generated from protobuf field bool boolean_value = 1; - * @return bool - */ - public function getBooleanValue() - { - return $this->readOneof(1); - } - - public function hasBooleanValue() - { - return $this->hasOneof(1); - } - - /** - * A boolean value. - * - * Generated from protobuf field bool boolean_value = 1; - * @param bool $var - * @return $this - */ - public function setBooleanValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * An integer value. - * - * Generated from protobuf field int64 integer_value = 2; - * @return int|string - */ - public function getIntegerValue() - { - return $this->readOneof(2); - } - - public function hasIntegerValue() - { - return $this->hasOneof(2); - } - - /** - * An integer value. - * - * Generated from protobuf field int64 integer_value = 2; - * @param int|string $var - * @return $this - */ - public function setIntegerValue($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A double value. - * - * 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 double value. - * - * 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 timestamp value. - * Precise only to microseconds. When stored, any additional precision is - * rounded down. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimestampValue() - { - return $this->readOneof(10); - } - - public function hasTimestampValue() - { - return $this->hasOneof(10); - } - - /** - * A timestamp value. - * Precise only to microseconds. When stored, any additional precision is - * rounded down. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimestampValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * A string value. - * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes of the UTF-8 representation are considered by - * queries. - * - * Generated from protobuf field string string_value = 17; - * @return string - */ - public function getStringValue() - { - return $this->readOneof(17); - } - - public function hasStringValue() - { - return $this->hasOneof(17); - } - - /** - * A string value. - * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes of the UTF-8 representation are considered by - * queries. - * - * Generated from protobuf field string string_value = 17; - * @param string $var - * @return $this - */ - public function setStringValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * A bytes value. - * Must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes are considered by queries. - * - * Generated from protobuf field bytes bytes_value = 18; - * @return string - */ - public function getBytesValue() - { - return $this->readOneof(18); - } - - public function hasBytesValue() - { - return $this->hasOneof(18); - } - - /** - * A bytes value. - * Must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes are considered by queries. - * - * Generated from protobuf field bytes bytes_value = 18; - * @param string $var - * @return $this - */ - public function setBytesValue($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * A reference to a document. For example: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string reference_value = 5; - * @return string - */ - public function getReferenceValue() - { - return $this->readOneof(5); - } - - public function hasReferenceValue() - { - return $this->hasOneof(5); - } - - /** - * A reference to a document. For example: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string reference_value = 5; - * @param string $var - * @return $this - */ - public function setReferenceValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * A geo point value representing a point on the surface of Earth. - * - * Generated from protobuf field .google.type.LatLng geo_point_value = 8; - * @return \Google\Type\LatLng|null - */ - public function getGeoPointValue() - { - return $this->readOneof(8); - } - - public function hasGeoPointValue() - { - return $this->hasOneof(8); - } - - /** - * A geo point value representing a point on the surface of Earth. - * - * Generated from protobuf field .google.type.LatLng geo_point_value = 8; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setGeoPointValue($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * An array value. - * Cannot directly contain another array value, though can contain an - * map which contains another array. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue array_value = 9; - * @return \Google\Cloud\Firestore\V1\ArrayValue|null - */ - public function getArrayValue() - { - return $this->readOneof(9); - } - - public function hasArrayValue() - { - return $this->hasOneof(9); - } - - /** - * An array value. - * Cannot directly contain another array value, though can contain an - * map which contains another array. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue array_value = 9; - * @param \Google\Cloud\Firestore\V1\ArrayValue $var - * @return $this - */ - public function setArrayValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * A map value. - * - * Generated from protobuf field .google.firestore.v1.MapValue map_value = 6; - * @return \Google\Cloud\Firestore\V1\MapValue|null - */ - public function getMapValue() - { - return $this->readOneof(6); - } - - public function hasMapValue() - { - return $this->hasOneof(6); - } - - /** - * A map value. - * - * Generated from protobuf field .google.firestore.v1.MapValue map_value = 6; - * @param \Google\Cloud\Firestore\V1\MapValue $var - * @return $this - */ - public function setMapValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\MapValue::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getValueType() - { - return $this->whichOneof("value_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php deleted file mode 100644 index 67920d9f8a1a..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php +++ /dev/null @@ -1,314 +0,0 @@ -google.firestore.v1.Write - */ -class Write extends \Google\Protobuf\Internal\Message -{ - /** - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; - */ - protected $update_mask = null; - /** - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; - */ - private $update_transforms; - /** - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - */ - protected $current_document = null; - protected $operation; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $update - * A document to write. - * @type string $delete - * A document name to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Cloud\Firestore\V1\DocumentTransform $transform - * Applies a transformation to a document. - * @type \Google\Cloud\Firestore\V1\DocumentMask $update_mask - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * @type array<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform>|\Google\Protobuf\Internal\RepeatedField $update_transforms - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * @type \Google\Cloud\Firestore\V1\Precondition $current_document - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * A document to write. - * - * Generated from protobuf field .google.firestore.v1.Document update = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getUpdate() - { - return $this->readOneof(1); - } - - public function hasUpdate() - { - return $this->hasOneof(1); - } - - /** - * A document to write. - * - * Generated from protobuf field .google.firestore.v1.Document update = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setUpdate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A document name to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string delete = 2; - * @return string - */ - public function getDelete() - { - return $this->readOneof(2); - } - - public function hasDelete() - { - return $this->hasOneof(2); - } - - /** - * A document name to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string delete = 2; - * @param string $var - * @return $this - */ - public function setDelete($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Applies a transformation to a document. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform transform = 6; - * @return \Google\Cloud\Firestore\V1\DocumentTransform|null - */ - public function getTransform() - { - return $this->readOneof(6); - } - - public function hasTransform() - { - return $this->hasOneof(6); - } - - /** - * Applies a transformation to a document. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform transform = 6; - * @param \Google\Cloud\Firestore\V1\DocumentTransform $var - * @return $this - */ - public function setTransform($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentTransform::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUpdateTransforms() - { - return $this->update_transforms; - } - - /** - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; - * @param array<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUpdateTransforms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform::class); - $this->update_transforms = $arr; - - return $this; - } - - /** - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @return \Google\Cloud\Firestore\V1\Precondition|null - */ - public function getCurrentDocument() - { - return $this->current_document; - } - - public function hasCurrentDocument() - { - return isset($this->current_document); - } - - public function clearCurrentDocument() - { - unset($this->current_document); - } - - /** - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @param \Google\Cloud\Firestore\V1\Precondition $var - * @return $this - */ - public function setCurrentDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); - $this->current_document = $var; - - return $this; - } - - /** - * @return string - */ - public function getOperation() - { - return $this->whichOneof("operation"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php deleted file mode 100644 index 53ebde35c2fc..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php +++ /dev/null @@ -1,277 +0,0 @@ -google.firestore.v1.WriteRequest - */ -class WriteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * - * Generated from protobuf field string stream_id = 2; - */ - protected $stream_id = ''; - /** - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; - */ - private $writes; - /** - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has - * received responses up to this token. After sending this token, earlier - * tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * - * Generated from protobuf field bytes stream_token = 4; - */ - protected $stream_token = ''; - /** - * Labels associated with this write request. - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * @type string $stream_id - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * @type array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $writes - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * @type string $stream_token - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has - * received responses up to this token. After sending this token, earlier - * tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this write request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * - * Generated from protobuf field string stream_id = 2; - * @return string - */ - public function getStreamId() - { - return $this->stream_id; - } - - /** - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * - * Generated from protobuf field string stream_id = 2; - * @param string $var - * @return $this - */ - public function setStreamId($var) - { - GPBUtil::checkString($var, True); - $this->stream_id = $var; - - return $this; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWrites() - { - return $this->writes; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; - * @param array<\Google\Cloud\Firestore\V1\Write>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWrites($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); - $this->writes = $arr; - - return $this; - } - - /** - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has - * received responses up to this token. After sending this token, earlier - * tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * - * Generated from protobuf field bytes stream_token = 4; - * @return string - */ - public function getStreamToken() - { - return $this->stream_token; - } - - /** - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has - * received responses up to this token. After sending this token, earlier - * tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * - * Generated from protobuf field bytes stream_token = 4; - * @param string $var - * @return $this - */ - public function setStreamToken($var) - { - GPBUtil::checkString($var, False); - $this->stream_token = $var; - - return $this; - } - - /** - * Labels associated with this write request. - * - * Generated from protobuf field map labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this write request. - * - * 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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php deleted file mode 100644 index da2c8584a0fd..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php +++ /dev/null @@ -1,203 +0,0 @@ -google.firestore.v1.WriteResponse - */ -class WriteResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * - * Generated from protobuf field string stream_id = 1; - */ - protected $stream_id = ''; - /** - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * - * Generated from protobuf field bytes stream_token = 2; - */ - protected $stream_token = ''; - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; - */ - private $write_results; - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; - */ - protected $commit_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $stream_id - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * @type string $stream_token - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * @type array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $write_results - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * @type \Google\Protobuf\Timestamp $commit_time - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * - * Generated from protobuf field string stream_id = 1; - * @return string - */ - public function getStreamId() - { - return $this->stream_id; - } - - /** - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * - * Generated from protobuf field string stream_id = 1; - * @param string $var - * @return $this - */ - public function setStreamId($var) - { - GPBUtil::checkString($var, True); - $this->stream_id = $var; - - return $this; - } - - /** - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * - * Generated from protobuf field bytes stream_token = 2; - * @return string - */ - public function getStreamToken() - { - return $this->stream_token; - } - - /** - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * - * Generated from protobuf field bytes stream_token = 2; - * @param string $var - * @return $this - */ - public function setStreamToken($var) - { - GPBUtil::checkString($var, False); - $this->stream_token = $var; - - return $this; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWriteResults() - { - return $this->write_results; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; - * @param array<\Google\Cloud\Firestore\V1\WriteResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWriteResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); - $this->write_results = $arr; - - return $this; - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitTime() - { - return $this->commit_time; - } - - public function hasCommitTime() - { - return isset($this->commit_time); - } - - public function clearCommitTime() - { - unset($this->commit_time); - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commit_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php deleted file mode 100644 index 6e0830560d1a..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php +++ /dev/null @@ -1,127 +0,0 @@ -google.firestore.v1.WriteResult - */ -class WriteResult extends \Google\Protobuf\Internal\Message -{ - /** - * The last update time of the document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - */ - protected $update_time = null; - /** - * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the - * same order. - * - * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; - */ - private $transform_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $update_time - * The last update time of the document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * @type array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $transform_results - * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the - * same order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The last update time of the document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @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 document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @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 results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the - * same order. - * - * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransformResults() - { - return $this->transform_results; - } - - /** - * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the - * same order. - * - * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; - * @param array<\Google\Cloud\Firestore\V1\Value>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransformResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->transform_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php deleted file mode 100644 index cc2a363d177d..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php +++ /dev/null @@ -1,82 +0,0 @@ -batchGetDocuments($database, $documents); - - /** @var BatchGetDocumentsResponse $element */ - foreach ($stream->readAll() 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 -{ - $database = '[DATABASE]'; - $documentsElement = '[DOCUMENTS]'; - - batch_get_documents_sample($database, $documentsElement); -} -// [END firestore_v1_generated_Firestore_BatchGetDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php deleted file mode 100644 index 9e5779179479..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php +++ /dev/null @@ -1,61 +0,0 @@ -batchWrite(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END firestore_v1_generated_Firestore_BatchWrite_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php deleted file mode 100644 index 28128ebfb622..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php +++ /dev/null @@ -1,66 +0,0 @@ -beginTransaction($database); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $database = '[DATABASE]'; - - begin_transaction_sample($database); -} -// [END firestore_v1_generated_Firestore_BeginTransaction_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php deleted file mode 100644 index 491b4a012b67..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php +++ /dev/null @@ -1,70 +0,0 @@ -commit($database, $writes); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $database = '[DATABASE]'; - - commit_sample($database); -} -// [END firestore_v1_generated_Firestore_Commit_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php deleted file mode 100644 index 15f9044c5f81..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php +++ /dev/null @@ -1,76 +0,0 @@ -createDocument($parent, $collectionId, $documentId, $document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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]'; - $collectionId = '[COLLECTION_ID]'; - $documentId = '[DOCUMENT_ID]'; - - create_document_sample($parent, $collectionId, $documentId); -} -// [END firestore_v1_generated_Firestore_CreateDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php deleted file mode 100644 index 97e21d5d7c5c..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php +++ /dev/null @@ -1,64 +0,0 @@ -deleteDocument($name); - 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 -{ - $name = '[NAME]'; - - delete_document_sample($name); -} -// [END firestore_v1_generated_Firestore_DeleteDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php deleted file mode 100644 index c4faf05645f6..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php +++ /dev/null @@ -1,66 +0,0 @@ -getDocument($name); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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_document_sample($name); -} -// [END firestore_v1_generated_Firestore_GetDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php deleted file mode 100644 index c8e0d87e0faf..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php +++ /dev/null @@ -1,72 +0,0 @@ -listCollectionIds($parent); - - /** @var string $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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_collection_ids_sample($parent); -} -// [END firestore_v1_generated_Firestore_ListCollectionIds_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php deleted file mode 100644 index f40b25f8a731..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php +++ /dev/null @@ -1,78 +0,0 @@ -listDocuments($parent, $collectionId); - - /** @var Document $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]'; - $collectionId = '[COLLECTION_ID]'; - - list_documents_sample($parent, $collectionId); -} -// [END firestore_v1_generated_Firestore_ListDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php deleted file mode 100644 index 259b4d59948b..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php +++ /dev/null @@ -1,77 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var BidiStream $stream */ - $stream = $firestoreClient->listen(); - $stream->writeAll([$request,]); - - /** @var ListenResponse $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()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $database = '[DATABASE]'; - - listen_sample($database); -} -// [END firestore_v1_generated_Firestore_Listen_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php deleted file mode 100644 index b814b1872c4e..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php +++ /dev/null @@ -1,60 +0,0 @@ -partitionQuery(); - - /** @var Cursor $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 firestore_v1_generated_Firestore_PartitionQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php deleted file mode 100644 index 54bb38597023..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php +++ /dev/null @@ -1,66 +0,0 @@ -rollback($database, $transaction); - 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 -{ - $database = '[DATABASE]'; - $transaction = '...'; - - rollback_sample($database, $transaction); -} -// [END firestore_v1_generated_Firestore_Rollback_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php deleted file mode 100644 index 5f922c586b47..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php +++ /dev/null @@ -1,86 +0,0 @@ -runAggregationQuery($parent); - - /** @var RunAggregationQueryResponse $element */ - foreach ($stream->readAll() 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]'; - - run_aggregation_query_sample($parent); -} -// [END firestore_v1_generated_Firestore_RunAggregationQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php deleted file mode 100644 index 8070468dbdb0..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php +++ /dev/null @@ -1,75 +0,0 @@ -runQuery($parent); - - /** @var RunQueryResponse $element */ - foreach ($stream->readAll() 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]'; - - run_query_sample($parent); -} -// [END firestore_v1_generated_Firestore_RunQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php deleted file mode 100644 index 18e8b86c9dc0..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php +++ /dev/null @@ -1,58 +0,0 @@ -updateDocument($document, $updateMask); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END firestore_v1_generated_Firestore_UpdateDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php deleted file mode 100644 index 31b50cb0b66b..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php +++ /dev/null @@ -1,78 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var BidiStream $stream */ - $stream = $firestoreClient->write(); - $stream->writeAll([$request,]); - - /** @var WriteResponse $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()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $database = '[DATABASE]'; - - write_sample($database); -} -// [END firestore_v1_generated_Firestore_Write_sync] diff --git a/owl-bot-staging/Firestore/v1/src/V1/FirestoreClient.php b/owl-bot-staging/Firestore/v1/src/V1/FirestoreClient.php deleted file mode 100644 index 562fa636eec0..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/FirestoreClient.php +++ /dev/null @@ -1,34 +0,0 @@ -batchGetDocuments($database, $documents); - * foreach ($stream->readAll() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - */ -class FirestoreGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.firestore.v1.Firestore'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'firestore.googleapis.com'; - - /** 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/datastore', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/firestore_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/firestore_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 'firestore.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); - } - - /** - * Gets multiple documents. - * - * Documents returned by this method are not guaranteed to be returned in the - * same order that they were requested. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $database = 'database'; - * $documents = []; - * // Read all responses until the stream is complete - * $stream = $firestoreClient->batchGetDocuments($database, $documents); - * foreach ($stream->readAll() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param string[] $documents The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * @param array $optionalArgs { - * Optional. - * - * @type DocumentMask $mask - * The fields to return. If not set, returns all fields. - * - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * @type string $transaction - * Reads documents in a transaction. - * @type TransactionOptions $newTransaction - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * @type Timestamp $readTime - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\ServerStream - * - * @throws ApiException if the remote call fails - */ - public function batchGetDocuments($database, $documents, array $optionalArgs = []) - { - $request = new BatchGetDocumentsRequest(); - $requestParamHeaders = []; - $request->setDatabase($database); - $request->setDocuments($documents); - $requestParamHeaders['database'] = $database; - if (isset($optionalArgs['mask'])) { - $request->setMask($optionalArgs['mask']); - } - - if (isset($optionalArgs['transaction'])) { - $request->setTransaction($optionalArgs['transaction']); - } - - if (isset($optionalArgs['newTransaction'])) { - $request->setNewTransaction($optionalArgs['newTransaction']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BatchGetDocuments', BatchGetDocumentsResponse::class, $optionalArgs, $request, Call::SERVER_STREAMING_CALL); - } - - /** - * Applies a batch of write operations. - * - * The BatchWrite method does not apply the write operations atomically - * and can apply them out of order. Method does not allow more than one write - * per document. Each write succeeds or fails independently. See the - * [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the success status of each write. - * - * If you require an atomically applied set of writes, use - * [Commit][google.firestore.v1.Firestore.Commit] instead. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $response = $firestoreClient->batchWrite(); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type Write[] $writes - * The writes to apply. - * - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * @type array $labels - * Labels associated with this batch write. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Firestore\V1\BatchWriteResponse - * - * @throws ApiException if the remote call fails - */ - public function batchWrite(array $optionalArgs = []) - { - $request = new BatchWriteRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['database'])) { - $request->setDatabase($optionalArgs['database']); - $requestParamHeaders['database'] = $optionalArgs['database']; - } - - if (isset($optionalArgs['writes'])) { - $request->setWrites($optionalArgs['writes']); - } - - if (isset($optionalArgs['labels'])) { - $request->setLabels($optionalArgs['labels']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BatchWrite', BatchWriteResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Starts a new transaction. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $database = 'database'; - * $response = $firestoreClient->beginTransaction($database); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type TransactionOptions $options - * The options for the transaction. - * Defaults to a read-write transaction. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Firestore\V1\BeginTransactionResponse - * - * @throws ApiException if the remote call fails - */ - public function beginTransaction($database, array $optionalArgs = []) - { - $request = new BeginTransactionRequest(); - $requestParamHeaders = []; - $request->setDatabase($database); - $requestParamHeaders['database'] = $database; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BeginTransaction', BeginTransactionResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Commits a transaction, while optionally updating documents. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $database = 'database'; - * $writes = []; - * $response = $firestoreClient->commit($database, $writes); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param Write[] $writes The writes to apply. - * - * Always executed atomically and in order. - * @param array $optionalArgs { - * Optional. - * - * @type string $transaction - * If set, applies all writes in this transaction, and commits it. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Firestore\V1\CommitResponse - * - * @throws ApiException if the remote call fails - */ - public function commit($database, $writes, array $optionalArgs = []) - { - $request = new CommitRequest(); - $requestParamHeaders = []; - $request->setDatabase($database); - $request->setWrites($writes); - $requestParamHeaders['database'] = $database; - if (isset($optionalArgs['transaction'])) { - $request->setTransaction($optionalArgs['transaction']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('Commit', CommitResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a new document. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $parent = 'parent'; - * $collectionId = 'collection_id'; - * $documentId = 'document_id'; - * $document = new Document(); - * $response = $firestoreClient->createDocument($parent, $collectionId, $documentId, $document); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * @param string $collectionId Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`. - * @param string $documentId The client-assigned document ID to use for this document. - * - * Optional. If not specified, an ID will be assigned by the service. - * @param Document $document Required. The document to create. `name` must not be set. - * @param array $optionalArgs { - * Optional. - * - * @type DocumentMask $mask - * The fields to return. If not set, returns all fields. - * - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Firestore\V1\Document - * - * @throws ApiException if the remote call fails - */ - public function createDocument($parent, $collectionId, $documentId, $document, array $optionalArgs = []) - { - $request = new CreateDocumentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setCollectionId($collectionId); - $request->setDocumentId($documentId); - $request->setDocument($document); - $requestParamHeaders['parent'] = $parent; - $requestParamHeaders['collection_id'] = $collectionId; - if (isset($optionalArgs['mask'])) { - $request->setMask($optionalArgs['mask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateDocument', Document::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a document. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $name = 'name'; - * $firestoreClient->deleteDocument($name); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @param array $optionalArgs { - * Optional. - * - * @type Precondition $currentDocument - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteDocument($name, array $optionalArgs = []) - { - $request = new DeleteDocumentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['currentDocument'])) { - $request->setCurrentDocument($optionalArgs['currentDocument']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteDocument', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a single document. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $name = 'name'; - * $response = $firestoreClient->getDocument($name); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @param array $optionalArgs { - * Optional. - * - * @type DocumentMask $mask - * The fields to return. If not set, returns all fields. - * - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type string $transaction - * Reads the document in a transaction. - * @type Timestamp $readTime - * Reads the version of the document at the given time. - * This may not be older than 270 seconds. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Firestore\V1\Document - * - * @throws ApiException if the remote call fails - */ - public function getDocument($name, array $optionalArgs = []) - { - $request = new GetDocumentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['mask'])) { - $request->setMask($optionalArgs['mask']); - } - - if (isset($optionalArgs['transaction'])) { - $request->setTransaction($optionalArgs['transaction']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDocument', Document::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists all the collection IDs underneath a document. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $parent = 'parent'; - * // Iterate over pages of elements - * $pagedResponse = $firestoreClient->listCollectionIds($parent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $firestoreClient->listCollectionIds($parent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @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 Timestamp $readTime - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listCollectionIds($parent, array $optionalArgs = []) - { - $request = new ListCollectionIdsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListCollectionIds', $optionalArgs, ListCollectionIdsResponse::class, $request); - } - - /** - * Lists documents. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $parent = 'parent'; - * $collectionId = 'collection_id'; - * // Iterate over pages of elements - * $pagedResponse = $firestoreClient->listDocuments($parent, $collectionId); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $firestoreClient->listDocuments($parent, $collectionId); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @param string $collectionId Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` - * or `messages`. - * @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 $orderBy - * The order to sort results by. For example: `priority desc, name`. - * @type DocumentMask $mask - * The fields to return. If not set, returns all fields. - * - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type string $transaction - * Reads documents in a transaction. - * @type Timestamp $readTime - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * @type bool $showMissing - * If the list should show missing documents. A missing document is a - * document that does not exist but has sub-documents. These documents will - * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time], - * or [Document.update_time][google.firestore.v1.Document.update_time] set. - * - * Requests with `show_missing` may not specify `where` or - * `order_by`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listDocuments($parent, $collectionId, array $optionalArgs = []) - { - $request = new ListDocumentsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setCollectionId($collectionId); - $requestParamHeaders['parent'] = $parent; - $requestParamHeaders['collection_id'] = $collectionId; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['mask'])) { - $request->setMask($optionalArgs['mask']); - } - - if (isset($optionalArgs['transaction'])) { - $request->setTransaction($optionalArgs['transaction']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - if (isset($optionalArgs['showMissing'])) { - $request->setShowMissing($optionalArgs['showMissing']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDocuments', $optionalArgs, ListDocumentsResponse::class, $request); - } - - /** - * Listens to changes. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $database = 'database'; - * $request = new ListenRequest(); - * $request->setDatabase($database); - * // Write all requests to the server, then read all responses until the - * // stream is complete - * $requests = [ - * $request, - * ]; - * $stream = $firestoreClient->listen(); - * $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 = $firestoreClient->listen(); - * 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 { - * $firestoreClient->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 - */ - public function listen(array $optionalArgs = []) - { - return $this->startCall('Listen', ListenResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL); - } - - /** - * Partitions a query by returning partition cursors that can be used to run - * the query in parallel. The returned partition cursors are split points that - * can be used by RunQuery as starting/end points for the query results. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $firestoreClient->partitionQuery(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $firestoreClient->partitionQuery(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * @type StructuredQuery $structuredQuery - * A structured query. - * Query must specify collection with all descendants and be ordered by name - * ascending. Other filters, order bys, limits, offsets, and start/end - * cursors are not supported. - * @type int $partitionCount - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * @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 $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 Timestamp $readTime - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 partitionQuery(array $optionalArgs = []) - { - $request = new PartitionQueryRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['parent'])) { - $request->setParent($optionalArgs['parent']); - $requestParamHeaders['parent'] = $optionalArgs['parent']; - } - - if (isset($optionalArgs['structuredQuery'])) { - $request->setStructuredQuery($optionalArgs['structuredQuery']); - } - - if (isset($optionalArgs['partitionCount'])) { - $request->setPartitionCount($optionalArgs['partitionCount']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('PartitionQuery', $optionalArgs, PartitionQueryResponse::class, $request); - } - - /** - * Rolls back a transaction. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $database = 'database'; - * $transaction = '...'; - * $firestoreClient->rollback($database, $transaction); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param string $transaction Required. The transaction to roll back. - * @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 rollback($database, $transaction, array $optionalArgs = []) - { - $request = new RollbackRequest(); - $requestParamHeaders = []; - $request->setDatabase($database); - $request->setTransaction($transaction); - $requestParamHeaders['database'] = $database; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('Rollback', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Runs an aggregation query. - * - * Rather than producing [Document][google.firestore.v1.Document] results like [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], - * this API allows running an aggregation to produce a series of - * [AggregationResult][google.firestore.v1.AggregationResult] server-side. - * - * High-Level Example: - * - * ``` - * -- Return the number of documents in table given a filter. - * SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); - * ``` - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $parent = 'parent'; - * // Read all responses until the stream is complete - * $stream = $firestoreClient->runAggregationQuery($parent); - * foreach ($stream->readAll() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @param array $optionalArgs { - * Optional. - * - * @type StructuredAggregationQuery $structuredAggregationQuery - * An aggregation query. - * @type string $transaction - * Run the aggregation within an already active transaction. - * - * The value here is the opaque transaction ID to execute the query in. - * @type TransactionOptions $newTransaction - * Starts a new transaction as part of the query, defaulting to read-only. - * - * The new transaction ID will be returned as the first response in the - * stream. - * @type Timestamp $readTime - * Executes the query at the given timestamp. - * - * Requires: - * - * * Cannot be more than 270 seconds in the past. - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\ServerStream - * - * @throws ApiException if the remote call fails - */ - public function runAggregationQuery($parent, array $optionalArgs = []) - { - $request = new RunAggregationQueryRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['structuredAggregationQuery'])) { - $request->setStructuredAggregationQuery($optionalArgs['structuredAggregationQuery']); - } - - if (isset($optionalArgs['transaction'])) { - $request->setTransaction($optionalArgs['transaction']); - } - - if (isset($optionalArgs['newTransaction'])) { - $request->setNewTransaction($optionalArgs['newTransaction']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RunAggregationQuery', RunAggregationQueryResponse::class, $optionalArgs, $request, Call::SERVER_STREAMING_CALL); - } - - /** - * Runs a query. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $parent = 'parent'; - * // Read all responses until the stream is complete - * $stream = $firestoreClient->runQuery($parent); - * foreach ($stream->readAll() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @param array $optionalArgs { - * Optional. - * - * @type StructuredQuery $structuredQuery - * A structured query. - * @type string $transaction - * Run the query within an already active transaction. - * - * The value here is the opaque transaction ID to execute the query in. - * @type TransactionOptions $newTransaction - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * @type Timestamp $readTime - * Reads documents as they were at the given time. - * This may not be older than 270 seconds. - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\ServerStream - * - * @throws ApiException if the remote call fails - */ - public function runQuery($parent, array $optionalArgs = []) - { - $request = new RunQueryRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['structuredQuery'])) { - $request->setStructuredQuery($optionalArgs['structuredQuery']); - } - - if (isset($optionalArgs['transaction'])) { - $request->setTransaction($optionalArgs['transaction']); - } - - if (isset($optionalArgs['newTransaction'])) { - $request->setNewTransaction($optionalArgs['newTransaction']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RunQuery', RunQueryResponse::class, $optionalArgs, $request, Call::SERVER_STREAMING_CALL); - } - - /** - * Updates or inserts a document. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $document = new Document(); - * $updateMask = new DocumentMask(); - * $response = $firestoreClient->updateDocument($document, $updateMask); - * } finally { - * $firestoreClient->close(); - * } - * ``` - * - * @param Document $document Required. The updated document. - * Creates the document if it does not already exist. - * @param DocumentMask $updateMask The fields to update. - * None of the field paths in the mask may contain a reserved name. - * - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * @param array $optionalArgs { - * Optional. - * - * @type DocumentMask $mask - * The fields to return. If not set, returns all fields. - * - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type Precondition $currentDocument - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Firestore\V1\Document - * - * @throws ApiException if the remote call fails - */ - public function updateDocument($document, $updateMask, array $optionalArgs = []) - { - $request = new UpdateDocumentRequest(); - $requestParamHeaders = []; - $request->setDocument($document); - $request->setUpdateMask($updateMask); - $requestParamHeaders['document.name'] = $document->getName(); - if (isset($optionalArgs['mask'])) { - $request->setMask($optionalArgs['mask']); - } - - if (isset($optionalArgs['currentDocument'])) { - $request->setCurrentDocument($optionalArgs['currentDocument']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateDocument', Document::class, $optionalArgs, $request)->wait(); - } - - /** - * Streams batches of document updates and deletes, in order. - * - * Sample code: - * ``` - * $firestoreClient = new FirestoreClient(); - * try { - * $database = 'database'; - * $request = new WriteRequest(); - * $request->setDatabase($database); - * // Write all requests to the server, then read all responses until the - * // stream is complete - * $requests = [ - * $request, - * ]; - * $stream = $firestoreClient->write(); - * $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 = $firestoreClient->write(); - * 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 { - * $firestoreClient->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 - */ - public function write(array $optionalArgs = []) - { - return $this->startCall('Write', WriteResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL); - } -} diff --git a/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 16969eb8ec78..000000000000 --- a/owl-bot-staging/Firestore/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.firestore.v1", - "libraryPackage": "Google\\Cloud\\Firestore\\V1", - "services": { - "Firestore": { - "clients": { - "grpc": { - "libraryClient": "FirestoreGapicClient", - "rpcs": { - "BatchGetDocuments": { - "methods": [ - "batchGetDocuments" - ] - }, - "BatchWrite": { - "methods": [ - "batchWrite" - ] - }, - "BeginTransaction": { - "methods": [ - "beginTransaction" - ] - }, - "Commit": { - "methods": [ - "commit" - ] - }, - "CreateDocument": { - "methods": [ - "createDocument" - ] - }, - "DeleteDocument": { - "methods": [ - "deleteDocument" - ] - }, - "GetDocument": { - "methods": [ - "getDocument" - ] - }, - "ListCollectionIds": { - "methods": [ - "listCollectionIds" - ] - }, - "ListDocuments": { - "methods": [ - "listDocuments" - ] - }, - "Listen": { - "methods": [ - "listen" - ] - }, - "PartitionQuery": { - "methods": [ - "partitionQuery" - ] - }, - "Rollback": { - "methods": [ - "rollback" - ] - }, - "RunAggregationQuery": { - "methods": [ - "runAggregationQuery" - ] - }, - "RunQuery": { - "methods": [ - "runQuery" - ] - }, - "UpdateDocument": { - "methods": [ - "updateDocument" - ] - }, - "Write": { - "methods": [ - "write" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json deleted file mode 100644 index 0fb2c36f7df8..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "interfaces": { - "google.firestore.v1.Firestore": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE" - ], - "retry_policy_2_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "retry_policy_3_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "no_retry_1_codes": [], - "retry_policy_4_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "retry_policy_5_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "ABORTED" - ] - }, - "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 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 86400000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 86400000, - "total_timeout_millis": 86400000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 86400000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 86400000, - "total_timeout_millis": 86400000 - }, - "retry_policy_4_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 - }, - "retry_policy_5_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 - } - }, - "methods": { - "BatchGetDocuments": { - "timeout_millis": 300000 - }, - "BatchWrite": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "BeginTransaction": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "Commit": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "GetDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ListCollectionIds": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ListDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "Listen": { - "timeout_millis": 86400000 - }, - "PartitionQuery": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "Rollback": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "RunAggregationQuery": { - "timeout_millis": 300000 - }, - "RunQuery": { - "timeout_millis": 300000 - }, - "UpdateDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "Write": { - "timeout_millis": 86400000 - } - } - } - } -} diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php deleted file mode 100644 index b11531b780ed..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php +++ /dev/null @@ -1,63 +0,0 @@ - [ - 'google.firestore.v1.Firestore' => [ - 'BatchGetDocuments' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - ], - 'ListCollectionIds' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCollectionIds', - ], - ], - 'ListDocuments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDocuments', - ], - ], - 'Listen' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - ], - 'PartitionQuery' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPartitions', - ], - ], - 'RunAggregationQuery' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - ], - 'RunQuery' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - ], - 'Write' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php deleted file mode 100644 index 984cef14a450..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php +++ /dev/null @@ -1,272 +0,0 @@ - [ - 'google.firestore.v1.Firestore' => [ - 'BatchGetDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:batchGet', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'BatchWrite' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:batchWrite', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'BeginTransaction' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:beginTransaction', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'Commit' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:commit', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'CreateDocument' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/**}/{collection_id}', - 'body' => 'document', - 'placeholders' => [ - 'collection_id' => [ - 'getters' => [ - 'getCollectionId', - ], - ], - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'document_id', - ], - ], - 'DeleteDocument' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/documents/*/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDocument' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/documents/*/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCollectionIds' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:listCollectionIds', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDocuments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}/{collection_id}', - ], - ], - 'placeholders' => [ - 'collection_id' => [ - 'getters' => [ - 'getCollectionId', - ], - ], - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PartitionQuery' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:partitionQuery', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:partitionQuery', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'Rollback' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:rollback', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'RunAggregationQuery' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RunQuery' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:runQuery', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDocument' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{document.name=projects/*/databases/*/documents/*/**}', - 'body' => 'document', - 'placeholders' => [ - 'document.name' => [ - 'getters' => [ - 'getDocument', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Firestore/v1/tests/Unit/V1/FirestoreClientTest.php b/owl-bot-staging/Firestore/v1/tests/Unit/V1/FirestoreClientTest.php deleted file mode 100644 index f6ff9815bc72..000000000000 --- a/owl-bot-staging/Firestore/v1/tests/Unit/V1/FirestoreClientTest.php +++ /dev/null @@ -1,1219 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FirestoreClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FirestoreClient($options); - } - - /** @test */ - public function batchGetDocumentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $missing = 'missing1069449574'; - $transaction2 = '17'; - $expectedResponse = new BatchGetDocumentsResponse(); - $expectedResponse->setMissing($missing); - $expectedResponse->setTransaction($transaction2); - $transport->addResponse($expectedResponse); - $missing2 = 'missing21243859865'; - $transaction3 = '18'; - $expectedResponse2 = new BatchGetDocumentsResponse(); - $expectedResponse2->setMissing($missing2); - $expectedResponse2->setTransaction($transaction3); - $transport->addResponse($expectedResponse2); - $missing3 = 'missing31243859866'; - $transaction4 = '19'; - $expectedResponse3 = new BatchGetDocumentsResponse(); - $expectedResponse3->setMissing($missing3); - $expectedResponse3->setTransaction($transaction4); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $documents = []; - $serverStream = $gapicClient->batchGetDocuments($database, $documents); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BatchGetDocuments', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualRequestObject->getDocuments(); - $this->assertProtobufEquals($documents, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchGetDocumentsExceptionTest() - { - $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()); - // Mock request - $database = 'database1789464955'; - $documents = []; - $serverStream = $gapicClient->batchGetDocuments($database, $documents); - $results = $serverStream->readAll(); - 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()); - } - - /** @test */ - public function batchWriteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchWriteResponse(); - $transport->addResponse($expectedResponse); - $response = $gapicClient->batchWrite(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BatchWrite', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchWriteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->batchWrite(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function beginTransactionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction = '-34'; - $expectedResponse = new BeginTransactionResponse(); - $expectedResponse->setTransaction($transaction); - $transport->addResponse($expectedResponse); - // Mock request - $database = 'database1789464955'; - $response = $gapicClient->beginTransaction($database); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BeginTransaction', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function beginTransactionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $database = 'database1789464955'; - try { - $gapicClient->beginTransaction($database); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function commitTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new CommitResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $database = 'database1789464955'; - $writes = []; - $response = $gapicClient->commit($database, $writes); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Commit', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualRequestObject->getWrites(); - $this->assertProtobufEquals($writes, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function commitExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $database = 'database1789464955'; - $writes = []; - try { - $gapicClient->commit($database, $writes); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Document(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $documentId = 'documentId506676927'; - $document = new Document(); - $response = $gapicClient->createDocument($parent, $collectionId, $documentId, $document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/CreateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getCollectionId(); - $this->assertProtobufEquals($collectionId, $actualValue); - $actualValue = $actualRequestObject->getDocumentId(); - $this->assertProtobufEquals($documentId, $actualValue); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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'; - $collectionId = 'collectionId-821242276'; - $documentId = 'documentId506676927'; - $document = new Document(); - try { - $gapicClient->createDocument($parent, $collectionId, $documentId, $document); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $gapicClient->deleteDocument($name); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/DeleteDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->deleteDocument($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 getDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Document(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->getDocument($name); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/GetDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->getDocument($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 listCollectionIdsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $collectionIdsElement = 'collectionIdsElement1368994900'; - $collectionIds = [ - $collectionIdsElement, - ]; - $expectedResponse = new ListCollectionIdsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCollectionIds($collectionIds); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $response = $gapicClient->listCollectionIds($parent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCollectionIds()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/ListCollectionIds', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCollectionIdsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->listCollectionIds($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 listDocumentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $documentsElement = new Document(); - $documents = [ - $documentsElement, - ]; - $expectedResponse = new ListDocumentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDocuments($documents); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $response = $gapicClient->listDocuments($parent, $collectionId); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDocuments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/ListDocuments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getCollectionId(); - $this->assertProtobufEquals($collectionId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDocumentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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'; - $collectionId = 'collectionId-821242276'; - try { - $gapicClient->listDocuments($parent, $collectionId); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListenResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new ListenResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new ListenResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $request = new ListenRequest(); - $request->setDatabase($database); - $database2 = 'database21688906350'; - $request2 = new ListenRequest(); - $request2->setDatabase($database2); - $database3 = 'database31688906351'; - $request3 = new ListenRequest(); - $request3->setDatabase($database3); - $bidi = $gapicClient->listen(); - $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.firestore.v1.Firestore/Listen', $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 listenExceptionTest() - { - $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->listen(); - $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()); - } - - /** @test */ - public function partitionQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $partitionsElement = new Cursor(); - $partitions = [ - $partitionsElement, - ]; - $expectedResponse = new PartitionQueryResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPartitions($partitions); - $transport->addResponse($expectedResponse); - $response = $gapicClient->partitionQuery(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPartitions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/PartitionQuery', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function partitionQueryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->partitionQuery(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rollbackTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $database = 'database1789464955'; - $transaction = '-34'; - $gapicClient->rollback($database, $transaction); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Rollback', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualRequestObject->getTransaction(); - $this->assertProtobufEquals($transaction, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rollbackExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $database = 'database1789464955'; - $transaction = '-34'; - try { - $gapicClient->rollback($database, $transaction); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runAggregationQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction2 = '17'; - $expectedResponse = new RunAggregationQueryResponse(); - $expectedResponse->setTransaction($transaction2); - $transport->addResponse($expectedResponse); - $transaction3 = '18'; - $expectedResponse2 = new RunAggregationQueryResponse(); - $expectedResponse2->setTransaction($transaction3); - $transport->addResponse($expectedResponse2); - $transaction4 = '19'; - $expectedResponse3 = new RunAggregationQueryResponse(); - $expectedResponse3->setTransaction($transaction4); - $transport->addResponse($expectedResponse3); - // Mock request - $parent = 'parent-995424086'; - $serverStream = $gapicClient->runAggregationQuery($parent); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/RunAggregationQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runAggregationQueryExceptionTest() - { - $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()); - // Mock request - $parent = 'parent-995424086'; - $serverStream = $gapicClient->runAggregationQuery($parent); - $results = $serverStream->readAll(); - 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()); - } - - /** @test */ - public function runQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction2 = '17'; - $skippedResults = 880286183; - $done = true; - $expectedResponse = new RunQueryResponse(); - $expectedResponse->setTransaction($transaction2); - $expectedResponse->setSkippedResults($skippedResults); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - $transaction3 = '18'; - $skippedResults2 = 153532454; - $done2 = false; - $expectedResponse2 = new RunQueryResponse(); - $expectedResponse2->setTransaction($transaction3); - $expectedResponse2->setSkippedResults($skippedResults2); - $expectedResponse2->setDone($done2); - $transport->addResponse($expectedResponse2); - $transaction4 = '19'; - $skippedResults3 = 153532453; - $done3 = true; - $expectedResponse3 = new RunQueryResponse(); - $expectedResponse3->setTransaction($transaction4); - $expectedResponse3->setSkippedResults($skippedResults3); - $expectedResponse3->setDone($done3); - $transport->addResponse($expectedResponse3); - // Mock request - $parent = 'parent-995424086'; - $serverStream = $gapicClient->runQuery($parent); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/RunQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runQueryExceptionTest() - { - $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()); - // Mock request - $parent = 'parent-995424086'; - $serverStream = $gapicClient->runQuery($parent); - $results = $serverStream->readAll(); - 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()); - } - - /** @test */ - public function updateDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Document(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $updateMask = new DocumentMask(); - $response = $gapicClient->updateDocument($document, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/UpdateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - $updateMask = new DocumentMask(); - try { - $gapicClient->updateDocument($document, $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()); - } - - /** @test */ - public function writeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $streamId = 'streamId-315624902'; - $streamToken = '122'; - $expectedResponse = new WriteResponse(); - $expectedResponse->setStreamId($streamId); - $expectedResponse->setStreamToken($streamToken); - $transport->addResponse($expectedResponse); - $streamId2 = 'streamId21627150189'; - $streamToken2 = '-83'; - $expectedResponse2 = new WriteResponse(); - $expectedResponse2->setStreamId($streamId2); - $expectedResponse2->setStreamToken($streamToken2); - $transport->addResponse($expectedResponse2); - $streamId3 = 'streamId31627150190'; - $streamToken3 = '-82'; - $expectedResponse3 = new WriteResponse(); - $expectedResponse3->setStreamId($streamId3); - $expectedResponse3->setStreamToken($streamToken3); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $request = new WriteRequest(); - $request->setDatabase($database); - $database2 = 'database21688906350'; - $request2 = new WriteRequest(); - $request2->setDatabase($database2); - $database3 = 'database31688906351'; - $request3 = new WriteRequest(); - $request3->setDatabase($database3); - $bidi = $gapicClient->write(); - $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.firestore.v1.Firestore/Write', $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 writeExceptionTest() - { - $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->write(); - $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/Functions/v1/proto/src/GPBMetadata/Google/Cloud/Functions/V1/Functions.php b/owl-bot-staging/Functions/v1/proto/src/GPBMetadata/Google/Cloud/Functions/V1/Functions.php deleted file mode 100644 index b94b9d5fbe2f2ed585a3e54c6abc120fce22d3f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8448 zcmb_h%X8bt84o2(mR1i_kQLMPBQWeXvSN|7oL6Z(3HXv3(81ZdFTHkr=pnsjrqdic(~kdyociqx1WAda()wV5yZb%&d;E6y z!N=|WHo7TqVjH`V>p()+u7U0u5381wrOEEASOaSfc3n~u}8aMG}xP9wS3u?^pJY%kfp+xwBAToJPM7WUe@f#uCg`U&>+hVJV- zo0P#$hA`O43kEyeckd%)Si0xQ!615xWcb(a>{_NFd%o_&pIfG9Xu%zvJ5XsosRaQSh~MjKkEnxue>) zL%aYUPo;V`^;n!ln6XT3`)8xco7ifk@xIY$XeN3qoKA{!|>;?8EWp zamurj6&<_jc5K_Un>*z;$%?aiH3*h$htZC&aX?Bv{6zN-egJLVgyiz|R{MBb8r$n1 znLLu!Mk5H^JS6yP5Nagw-bP>l6x|*>v!%;yX@VAkgh(Jt>N=-2^%f~K@JDOYDB<(*{`tPSn|#jd?RU}%_Ip48 zEnH9mk`2D8d|p(&V4hjfg015#gn7XVU+fQCp!|CYEzp`Ls+%;A&XEcki^!4HS!o%~ zHF&jwK#Wb$!K+AOiKOYSv2S*<)^V-aB$<2khV%$6@mUwQ9nXX^br?GblXDyIB$(O9 zY*C^{D|s~_0Zvx}PMx;p=nX0+%Ef$w7WRF=?P6&|{H7)1$IUKVvP!)r?TQhvg#s|m<^W@>SEV}AkoZ5 zY!Qei*+dpigBsZKVi)8|h=F$nr{OeB^m!;zq+~hb8A(Sg*zTIHW4FkLb#>Pywt2B7 z$}~MT(_D|swqU|USm?@b$Ak)Syr8R8(B{~J(uCK^(qMaS>_2zhgP26!zJeB7`U}7i z5KjOJyx2t;o|4G02|f*mWii}s8=B$RHZ~x`VsBC=pQCGi!y0Zv(egA8`#!W3FLnu* zEpBASwqm<&WQ2?yP>Wm#tY1H=1`Em1OUTi#ytcm^cWvXm(dd2LE={ILOMBCEKVJ>f@ath1m_jXlx7}8 zEgPoNZuBOepsOA>01BND4cBNij4U=aN)HhLaVC9?7CFDJV|AcM#;%XcVVe?war3;a z`pyBiV{Zv%&q<%6rG{e=i$fJxq4UY_)jMcScYSkDH+&a2O%Kv((1pFKD^<{ifEQaF zy9t~YH$E79Q?pc;Dwh>sM|0s!o1s+QZV=4v&qmaEqbrOleQRjO5TnL@sh%SPXj zE}`X0wXm($b6Qm`ZRToPxm0`>jX-gqQ;S8dURCq?LMA$)yg(NQb3sN|f#oRn3uqR& zl%HzwKQIMp>}R1=&s9rmkx83?Zg6Q}LM>&r%}g;Jom75~7W+3$dJA32mNSoYRjr!a zEY#}NX9H%vi6rnqT`iPCYe0b&w4_$+g}j=n2c*%7l>J&gK=07>?SV1|1bRtK&Rqcp zc>o>lbEs=x@+JQ|N?MM=z;N=V_&n+z?vgJB>!b7nn&X*bI1QYhg}%vJzLG-GL6{*y zKoIo8;0`2N0|VAL#0+duyhHn#^4AEO590?Z8X{z^?g>ruj%)gdngz(hqG7$b@!p8k z3A0Q<$)MClLaaPR3w;C9bri4VGF#O`{h3zGZRd&u`vO>w&gUQ?o~qAkuqDgr0v{?@ z>V+}{1q9o#z?3kKktBpbA^}2&ZGrrvXhz^&4*Q^GaooVL9^j|NJ-`he7jxjtG1%$| zd-IHdor@F$E%XgQot%QA3xJXA$J|Ib)km195~@dU#LuHC`k9_V(@^mMk0=#1-&c$K zN&uM7LyX`ShHn=E)Y0P2?F7R)wxKw7R{0A!kg?>&8Mw44kZSAxK98kwIB%jE&e;Rj z1Rjlwm9R(>E8wYZhPmPi8Y{g40w0CWEVKdFQ{||M%I_j*CF5d1c_Qhm_!k{Gx=HuZ zjL0u$Nc#47>ICh;Vtl9t7kO^N_RWYqq`sWn7!?bBaF3+Wgz{_9Ym1`KLA}DPS#X?< zwUi8SEjb`@^@ee6aQcP(lQywGsD~OpAEob6->jdhyg`q-ScE<-ID5kN@1yCq?m`}N z$1~h>y4RP`Y+G+)&4ZgKYS$FWXgb8O0zH~3UxIH3|9*8{Yi(Jf2(Rk-zk=PWIu zbL5tg)dv=-kI}_`VceG&(L8=;38WSTcNp$%bNnCe`n$Ss`YOZ{Q;({RSJh#a?JfvLzZ2{2p zq9cmwIprR@ax8t%T@B8b9`C8pwckcyE5ne09hapap&OZEc`K{sw@Mk(&$L=yt#1wD zE`+85gA}%N&;jSr`EovA1gsLBkN~-4bCqKGnN}!im1>#7tLP*fFXjNJg~!hk;;qu- zQu%2qI<@ipC8(KUrMwzDMoWK+poPB7l9D4@VBbo<%kiI#Pry8G`VlpB|&yaRM1!I zt-(9B|Z*jgaW^AuXkhcW_Wcd)>o4^q z?dxAUrhNx2#@1L4jB6H;u~%?3Uf~y#kT>*^C6Q~j{X^;44f`{ozHrHxMqc&}H=_8c zq7Y_Wh4(4amz4rF?*nCnZr`}(r3{drimZLB&JvP4q;pBHB4|m};h@Dx_e6rw(^=o0 zd17d_*ppE=c*hWNTRx?>WR;K4RIcD{i@gm7I)h=-H_#r0q)=0mMuF#J)(eB)AHxeF zF~Rl}sY!W7J=^vOlR_+sQD4(Tg&({%Ns3SlUKZdH0}y|2QmDQ%u!f(jSm0!okEmwi z9Ct!x>#M&hxGD@(AZq;v)Pg<`j18$3o;*dZJayP7(hpFp8CC%@QL4jXg(!vHmg$ju zXHN=x6L;9~5~1Ji0k<8ulE-bC>ReE=XLqGPq#`&p{qX(E#2R9+*bNO6X+UTg$kpFlR3R8K(SXLm97%`EX^xl)3J2B znQ+`@5(1Of!DR1p=9m}t`+?qnn3&wm0Hd68xf5JwniwvEf?tP6uhkdh zTnE?26$JN@RdPF?d`T{zUHCjo8sb(NM%g#Hl|I^?rXITYcJNYphdrT(UfjupkZBzA P+D=!pSMeisgwTHh#Wnft diff --git a/owl-bot-staging/Functions/v1/proto/src/GPBMetadata/Google/Cloud/Functions/V1/Operations.php b/owl-bot-staging/Functions/v1/proto/src/GPBMetadata/Google/Cloud/Functions/V1/Operations.php deleted file mode 100644 index ae83f8b24c1787cc83322cddda977288ab52f68f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1278 zcma)6U2oGc6s6nPhX-TIhLlZ07#LbNL81AqEF4uxyR=opPLV#*aZWx;4w}xM*@d%IDz58;vlB z0Ua|EV{Sp%>cMWW58YO$|3bE=G~)qwU_@yYV>^gx7TTjM2?U`@YG2lD$`rSHvT|Ag z5;VpsLji`zUgHZEC`1DJ$2o)FR1AK*Wbn^xhX4dIN>kX=OyDPg^2f4aOahn+$sfQS zk`72h1VJ(RA!j*)BNV4tw$EZqg-|v0k^ootV8N-dJB-TNk6@|EQ+7xz{7xb;Pf+Z) za2jyJ1m&KDI!=UzHc?fod(&eT9T~xDq0w<>L>@uGGko)O2ssuRPY!e4ir`BB^Y3s> ztE(py$GINpy8oYDeIjo|pfS63tf9)^0*wv0qoOH)F3!Jh@N|NmJqwhFA3 z=f)~;CABVV+s~&od1$2hwkU-bIePhf4s7U1lrcK58EarsATDpjtiVcj#dr@E#DrmU zPCl(2RIPiDv@}~^;*Hl}iR15?G{>Bmt*Zx{Wos$Pl8ze&0GF7jGT;LenhO#+Z`fcp zV=~ovphTMw^Y-nTc5S_}4wi=*i9fkkfc1(ho_VcX#W_`M zxu4ye$oa-E@JxOR$~k5)tzqiL)soUYpI+r_V`_XvW0XV|<&hoXB=^!TULi)(J3b+Y fIv2ym9R6-sr|wO$J~y`Q-c8Gq#Zp{>D**licjT49 diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionRequest.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionRequest.php deleted file mode 100644 index 33ec9884a38b..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.functions.v1.CallFunctionRequest - */ -class CallFunctionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the function to be called. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Input to be passed to the function. - * - * Generated from protobuf field string data = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the function to be called. - * @type string $data - * Required. Input to be passed to the function. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the function to be called. - * - * Generated 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 function to be called. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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. Input to be passed to the function. - * - * Generated from protobuf field string data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * Required. Input to be passed to the function. - * - * Generated from protobuf field string data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkString($var, True); - $this->data = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionResponse.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionResponse.php deleted file mode 100644 index bb7004f8e9d2..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CallFunctionResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.functions.v1.CallFunctionResponse - */ -class CallFunctionResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Execution id of function invocation. - * - * Generated from protobuf field string execution_id = 1; - */ - protected $execution_id = ''; - /** - * Result populated for successful execution of synchronous function. Will - * not be populated if function does not return a result through context. - * - * Generated from protobuf field string result = 2; - */ - protected $result = ''; - /** - * Either system or user-function generated error. Set if execution - * was not successful. - * - * Generated from protobuf field string error = 3; - */ - protected $error = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $execution_id - * Execution id of function invocation. - * @type string $result - * Result populated for successful execution of synchronous function. Will - * not be populated if function does not return a result through context. - * @type string $error - * Either system or user-function generated error. Set if execution - * was not successful. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Execution id of function invocation. - * - * Generated from protobuf field string execution_id = 1; - * @return string - */ - public function getExecutionId() - { - return $this->execution_id; - } - - /** - * Execution id of function invocation. - * - * 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; - } - - /** - * Result populated for successful execution of synchronous function. Will - * not be populated if function does not return a result through context. - * - * Generated from protobuf field string result = 2; - * @return string - */ - public function getResult() - { - return $this->result; - } - - /** - * Result populated for successful execution of synchronous function. Will - * not be populated if function does not return a result through context. - * - * Generated from protobuf field string result = 2; - * @param string $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkString($var, True); - $this->result = $var; - - return $this; - } - - /** - * Either system or user-function generated error. Set if execution - * was not successful. - * - * Generated from protobuf field string error = 3; - * @return string - */ - public function getError() - { - return $this->error; - } - - /** - * Either system or user-function generated error. Set if execution - * was not successful. - * - * Generated from protobuf field string error = 3; - * @param string $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkString($var, True); - $this->error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction.php deleted file mode 100644 index 3ed5aa36e7f3..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction.php +++ /dev/null @@ -1,1587 +0,0 @@ -google.cloud.functions.v1.CloudFunction - */ -class CloudFunction extends \Google\Protobuf\Internal\Message -{ - /** - * A user-defined name of the function. Function names must be unique - * globally and match pattern `projects/*/locations/*/functions/*` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * User-provided description of a function. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Output only. Status of the function deployment. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunctionStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status = 0; - /** - * The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * For Node.js this is name of a function exported by the module specified - * in `source_location`. - * - * Generated from protobuf field string entry_point = 8; - */ - protected $entry_point = ''; - /** - * The runtime in which to run the function. Required when deploying a new - * function, optional when updating an existing function. For a complete - * list of possible choices, see the - * [`gcloud` command - * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). - * - * Generated from protobuf field string runtime = 19; - */ - protected $runtime = ''; - /** - * The function execution timeout. Execution is considered failed and - * can be terminated if the function is not completed at the end of the - * timeout period. Defaults to 60 seconds. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 9; - */ - protected $timeout = null; - /** - * The amount of memory in MB available for a function. - * Defaults to 256MB. - * - * Generated from protobuf field int32 available_memory_mb = 10; - */ - protected $available_memory_mb = 0; - /** - * The email of the function's service account. If empty, defaults to - * `{project_id}@appspot.gserviceaccount.com`. - * - * Generated from protobuf field string service_account_email = 11; - */ - protected $service_account_email = ''; - /** - * Output only. The last update timestamp of a Cloud Function. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The version identifier of the Cloud Function. Each deployment attempt - * results in a new version of a function being created. - * - * Generated from protobuf field int64 version_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $version_id = 0; - /** - * Labels associated with this Cloud Function. - * - * Generated from protobuf field map labels = 15; - */ - private $labels; - /** - * Environment variables that shall be available during function execution. - * - * Generated from protobuf field map environment_variables = 17; - */ - private $environment_variables; - /** - * Build environment variables that shall be available during build time. - * - * Generated from protobuf field map build_environment_variables = 28; - */ - private $build_environment_variables; - /** - * The VPC Network that this cloud function can connect to. It can be - * either the fully-qualified URI, or the short name of the network resource. - * If the short network name is used, the network must belong to the same - * project. Otherwise, it must belong to a project within the same - * organization. The format of this field is either - * `projects/{project}/global/networks/{network}` or `{network}`, where - * `{project}` is a project id where the network is defined, and `{network}` - * is the short name of the network. - * This field is mutually exclusive with `vpc_connector` and will be replaced - * by it. - * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for - * more information on connecting Cloud projects. - * - * Generated from protobuf field string network = 18; - */ - protected $network = ''; - /** - * The limit on the maximum number of function instances that may coexist at a - * given time. - * In some cases, such as rapid traffic surges, Cloud Functions may, for a - * short period of time, create more instances than the specified max - * instances limit. If your function cannot tolerate this temporary behavior, - * you may want to factor in a safety margin and set a lower max instances - * value than your function can tolerate. - * See the [Max - * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for - * more details. - * - * Generated from protobuf field int32 max_instances = 20; - */ - protected $max_instances = 0; - /** - * A lower bound for the number function instances that may coexist at a - * given time. - * - * Generated from protobuf field int32 min_instances = 32; - */ - protected $min_instances = 0; - /** - * The VPC Network Connector that this cloud function can connect to. It can - * be either the fully-qualified URI, or the short name of the network - * connector resource. The format of this field is - * `projects/*/locations/*/connectors/*` - * This field is mutually exclusive with `network` field and will eventually - * replace it. - * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for - * more information on connecting Cloud projects. - * - * Generated from protobuf field string vpc_connector = 22; - */ - protected $vpc_connector = ''; - /** - * The egress settings for the connector, controlling what traffic is diverted - * through it. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings vpc_connector_egress_settings = 23; - */ - protected $vpc_connector_egress_settings = 0; - /** - * The ingress settings for the function, controlling what traffic can reach - * it. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.IngressSettings ingress_settings = 24; - */ - protected $ingress_settings = 0; - /** - * Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function resources. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * If specified, you must also provide an artifact registry repository using - * the `docker_repository` field that was created with the same KMS crypto - * key. - * The following service accounts need to be granted the role 'Cloud KMS - * CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' - * on the Key/KeyRing/Project/Organization (least access preferred). - * 1. Google Cloud Functions service account - * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - - * Required to protect the function's image. - * 2. Google Storage service account - * (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - - * Required to protect the function's source code. - * If this service account does not exist, deploying a function without a - * KMS key or retrieving the service agent name provisions it. For more - * information, see - * https://cloud.google.com/storage/docs/projects#service-agents and - * https://cloud.google.com/storage/docs/getting-service-agent#gsutil. - * Google Cloud Functions delegates access to service agents to protect - * function resources in internal projects that are not accessible by the - * end user. - * - * Generated from protobuf field string kms_key_name = 25 [(.google.api.resource_reference) = { - */ - protected $kms_key_name = ''; - /** - * Name of the Cloud Build Custom Worker Pool that should be used to build the - * function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * `{project}` and `{region}` are the project id and region respectively where - * the worker pool is defined and `{workerPool}` is the short name of the - * worker pool. - * If the project id is not the same as the function, then the Cloud - * Functions Service Agent - * (`service-@gcf-admin-robot.iam.gserviceaccount.com`) must - * be granted the role Cloud Build Custom Workers Builder - * (`roles/cloudbuild.customworkers.builder`) in the project. - * - * Generated from protobuf field string build_worker_pool = 26; - */ - protected $build_worker_pool = ''; - /** - * Output only. The Cloud Build ID of the latest successful deployment of the - * function. - * - * Generated from protobuf field string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $build_id = ''; - /** - * Output only. The Cloud Build Name of the function deployment. - * `projects//locations//builds/`. - * - * Generated from protobuf field string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $build_name = ''; - /** - * Secret environment variables configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; - */ - private $secret_environment_variables; - /** - * Secret volumes configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; - */ - private $secret_volumes; - /** - * Input only. An identifier for Firebase function sources. Disclaimer: This field is only - * supported for Firebase function deployments. - * - * Generated from protobuf field string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $source_token = ''; - /** - * User managed repository created in Artifact Registry optionally with a - * customer managed encryption key. If specified, deployments will use - * Artifact Registry. If unspecified and the deployment is eligible to use - * Artifact Registry, GCF will create and use a repository named - * 'gcf-artifacts' for every deployed region. This is the repository to which - * the function docker image will be pushed after it is built by Cloud Build. - * It must match the pattern - * `projects/{project}/locations/{location}/repositories/{repository}`. - * Cross-project repositories are not supported. - * Cross-location repositories are not supported. - * Repository format must be 'DOCKER'. - * - * Generated from protobuf field string docker_repository = 34 [(.google.api.resource_reference) = { - */ - protected $docker_repository = ''; - /** - * Docker Registry to use for this deployment. - * If `docker_repository` field is specified, this field will be automatically - * set as `ARTIFACT_REGISTRY`. - * If unspecified, it currently defaults to `CONTAINER_REGISTRY`. - * This field may be overridden by the backend for eligible deployments. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.DockerRegistry docker_registry = 35; - */ - protected $docker_registry = 0; - protected $source_code; - protected $trigger; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * A user-defined name of the function. Function names must be unique - * globally and match pattern `projects/*/locations/*/functions/*` - * @type string $description - * User-provided description of a function. - * @type string $source_archive_url - * The Google Cloud Storage URL, starting with `gs://`, pointing to the zip - * archive which contains the function. - * @type \Google\Cloud\Functions\V1\SourceRepository $source_repository - * **Beta Feature** - * The source repository where a function is hosted. - * @type string $source_upload_url - * The Google Cloud Storage signed URL used for source uploading, generated - * by calling [google.cloud.functions.v1.GenerateUploadUrl]. - * The signature is validated on write methods (Create, Update) - * The signature is stripped from the Function object on read methods (Get, - * List) - * @type \Google\Cloud\Functions\V1\HttpsTrigger $https_trigger - * An HTTPS endpoint type of source that can be triggered via URL. - * @type \Google\Cloud\Functions\V1\EventTrigger $event_trigger - * A source that fires events in response to a condition in another service. - * @type int $status - * Output only. Status of the function deployment. - * @type string $entry_point - * The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * For Node.js this is name of a function exported by the module specified - * in `source_location`. - * @type string $runtime - * The runtime in which to run the function. Required when deploying a new - * function, optional when updating an existing function. For a complete - * list of possible choices, see the - * [`gcloud` command - * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). - * @type \Google\Protobuf\Duration $timeout - * The function execution timeout. Execution is considered failed and - * can be terminated if the function is not completed at the end of the - * timeout period. Defaults to 60 seconds. - * @type int $available_memory_mb - * The amount of memory in MB available for a function. - * Defaults to 256MB. - * @type string $service_account_email - * The email of the function's service account. If empty, defaults to - * `{project_id}@appspot.gserviceaccount.com`. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of a Cloud Function. - * @type int|string $version_id - * Output only. The version identifier of the Cloud Function. Each deployment attempt - * results in a new version of a function being created. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this Cloud Function. - * @type array|\Google\Protobuf\Internal\MapField $environment_variables - * Environment variables that shall be available during function execution. - * @type array|\Google\Protobuf\Internal\MapField $build_environment_variables - * Build environment variables that shall be available during build time. - * @type string $network - * The VPC Network that this cloud function can connect to. It can be - * either the fully-qualified URI, or the short name of the network resource. - * If the short network name is used, the network must belong to the same - * project. Otherwise, it must belong to a project within the same - * organization. The format of this field is either - * `projects/{project}/global/networks/{network}` or `{network}`, where - * `{project}` is a project id where the network is defined, and `{network}` - * is the short name of the network. - * This field is mutually exclusive with `vpc_connector` and will be replaced - * by it. - * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for - * more information on connecting Cloud projects. - * @type int $max_instances - * The limit on the maximum number of function instances that may coexist at a - * given time. - * In some cases, such as rapid traffic surges, Cloud Functions may, for a - * short period of time, create more instances than the specified max - * instances limit. If your function cannot tolerate this temporary behavior, - * you may want to factor in a safety margin and set a lower max instances - * value than your function can tolerate. - * See the [Max - * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for - * more details. - * @type int $min_instances - * A lower bound for the number function instances that may coexist at a - * given time. - * @type string $vpc_connector - * The VPC Network Connector that this cloud function can connect to. It can - * be either the fully-qualified URI, or the short name of the network - * connector resource. The format of this field is - * `projects/*/locations/*/connectors/*` - * This field is mutually exclusive with `network` field and will eventually - * replace it. - * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for - * more information on connecting Cloud projects. - * @type int $vpc_connector_egress_settings - * The egress settings for the connector, controlling what traffic is diverted - * through it. - * @type int $ingress_settings - * The ingress settings for the function, controlling what traffic can reach - * it. - * @type string $kms_key_name - * Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function resources. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * If specified, you must also provide an artifact registry repository using - * the `docker_repository` field that was created with the same KMS crypto - * key. - * The following service accounts need to be granted the role 'Cloud KMS - * CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' - * on the Key/KeyRing/Project/Organization (least access preferred). - * 1. Google Cloud Functions service account - * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - - * Required to protect the function's image. - * 2. Google Storage service account - * (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - - * Required to protect the function's source code. - * If this service account does not exist, deploying a function without a - * KMS key or retrieving the service agent name provisions it. For more - * information, see - * https://cloud.google.com/storage/docs/projects#service-agents and - * https://cloud.google.com/storage/docs/getting-service-agent#gsutil. - * Google Cloud Functions delegates access to service agents to protect - * function resources in internal projects that are not accessible by the - * end user. - * @type string $build_worker_pool - * Name of the Cloud Build Custom Worker Pool that should be used to build the - * function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * `{project}` and `{region}` are the project id and region respectively where - * the worker pool is defined and `{workerPool}` is the short name of the - * worker pool. - * If the project id is not the same as the function, then the Cloud - * Functions Service Agent - * (`service-@gcf-admin-robot.iam.gserviceaccount.com`) must - * be granted the role Cloud Build Custom Workers Builder - * (`roles/cloudbuild.customworkers.builder`) in the project. - * @type string $build_id - * Output only. The Cloud Build ID of the latest successful deployment of the - * function. - * @type string $build_name - * Output only. The Cloud Build Name of the function deployment. - * `projects//locations//builds/`. - * @type array<\Google\Cloud\Functions\V1\SecretEnvVar>|\Google\Protobuf\Internal\RepeatedField $secret_environment_variables - * Secret environment variables configuration. - * @type array<\Google\Cloud\Functions\V1\SecretVolume>|\Google\Protobuf\Internal\RepeatedField $secret_volumes - * Secret volumes configuration. - * @type string $source_token - * Input only. An identifier for Firebase function sources. Disclaimer: This field is only - * supported for Firebase function deployments. - * @type string $docker_repository - * User managed repository created in Artifact Registry optionally with a - * customer managed encryption key. If specified, deployments will use - * Artifact Registry. If unspecified and the deployment is eligible to use - * Artifact Registry, GCF will create and use a repository named - * 'gcf-artifacts' for every deployed region. This is the repository to which - * the function docker image will be pushed after it is built by Cloud Build. - * It must match the pattern - * `projects/{project}/locations/{location}/repositories/{repository}`. - * Cross-project repositories are not supported. - * Cross-location repositories are not supported. - * Repository format must be 'DOCKER'. - * @type int $docker_registry - * Docker Registry to use for this deployment. - * If `docker_repository` field is specified, this field will be automatically - * set as `ARTIFACT_REGISTRY`. - * If unspecified, it currently defaults to `CONTAINER_REGISTRY`. - * This field may be overridden by the backend for eligible deployments. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * A user-defined name of the function. Function names must be unique - * globally and match pattern `projects/*/locations/*/functions/*` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * A user-defined name of the function. Function names must be unique - * globally and match pattern `projects/*/locations/*/functions/*` - * - * 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; - } - - /** - * User-provided description of a function. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description of a function. - * - * 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 Google Cloud Storage URL, starting with `gs://`, pointing to the zip - * archive which contains the function. - * - * Generated from protobuf field string source_archive_url = 3; - * @return string - */ - public function getSourceArchiveUrl() - { - return $this->readOneof(3); - } - - public function hasSourceArchiveUrl() - { - return $this->hasOneof(3); - } - - /** - * The Google Cloud Storage URL, starting with `gs://`, pointing to the zip - * archive which contains the function. - * - * Generated from protobuf field string source_archive_url = 3; - * @param string $var - * @return $this - */ - public function setSourceArchiveUrl($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * **Beta Feature** - * The source repository where a function is hosted. - * - * Generated from protobuf field .google.cloud.functions.v1.SourceRepository source_repository = 4; - * @return \Google\Cloud\Functions\V1\SourceRepository|null - */ - public function getSourceRepository() - { - return $this->readOneof(4); - } - - public function hasSourceRepository() - { - return $this->hasOneof(4); - } - - /** - * **Beta Feature** - * The source repository where a function is hosted. - * - * Generated from protobuf field .google.cloud.functions.v1.SourceRepository source_repository = 4; - * @param \Google\Cloud\Functions\V1\SourceRepository $var - * @return $this - */ - public function setSourceRepository($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V1\SourceRepository::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The Google Cloud Storage signed URL used for source uploading, generated - * by calling [google.cloud.functions.v1.GenerateUploadUrl]. - * The signature is validated on write methods (Create, Update) - * The signature is stripped from the Function object on read methods (Get, - * List) - * - * Generated from protobuf field string source_upload_url = 16; - * @return string - */ - public function getSourceUploadUrl() - { - return $this->readOneof(16); - } - - public function hasSourceUploadUrl() - { - return $this->hasOneof(16); - } - - /** - * The Google Cloud Storage signed URL used for source uploading, generated - * by calling [google.cloud.functions.v1.GenerateUploadUrl]. - * The signature is validated on write methods (Create, Update) - * The signature is stripped from the Function object on read methods (Get, - * List) - * - * Generated from protobuf field string source_upload_url = 16; - * @param string $var - * @return $this - */ - public function setSourceUploadUrl($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * An HTTPS endpoint type of source that can be triggered via URL. - * - * Generated from protobuf field .google.cloud.functions.v1.HttpsTrigger https_trigger = 5; - * @return \Google\Cloud\Functions\V1\HttpsTrigger|null - */ - public function getHttpsTrigger() - { - return $this->readOneof(5); - } - - public function hasHttpsTrigger() - { - return $this->hasOneof(5); - } - - /** - * An HTTPS endpoint type of source that can be triggered via URL. - * - * Generated from protobuf field .google.cloud.functions.v1.HttpsTrigger https_trigger = 5; - * @param \Google\Cloud\Functions\V1\HttpsTrigger $var - * @return $this - */ - public function setHttpsTrigger($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V1\HttpsTrigger::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * A source that fires events in response to a condition in another service. - * - * Generated from protobuf field .google.cloud.functions.v1.EventTrigger event_trigger = 6; - * @return \Google\Cloud\Functions\V1\EventTrigger|null - */ - public function getEventTrigger() - { - return $this->readOneof(6); - } - - public function hasEventTrigger() - { - return $this->hasOneof(6); - } - - /** - * A source that fires events in response to a condition in another service. - * - * Generated from protobuf field .google.cloud.functions.v1.EventTrigger event_trigger = 6; - * @param \Google\Cloud\Functions\V1\EventTrigger $var - * @return $this - */ - public function setEventTrigger($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V1\EventTrigger::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Output only. Status of the function deployment. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunctionStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getStatus() - { - return $this->status; - } - - /** - * Output only. Status of the function deployment. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunctionStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V1\CloudFunctionStatus::class); - $this->status = $var; - - return $this; - } - - /** - * The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * For Node.js this is name of a function exported by the module specified - * in `source_location`. - * - * Generated from protobuf field string entry_point = 8; - * @return string - */ - public function getEntryPoint() - { - return $this->entry_point; - } - - /** - * The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * For Node.js this is name of a function exported by the module specified - * in `source_location`. - * - * Generated from protobuf field string entry_point = 8; - * @param string $var - * @return $this - */ - public function setEntryPoint($var) - { - GPBUtil::checkString($var, True); - $this->entry_point = $var; - - return $this; - } - - /** - * The runtime in which to run the function. Required when deploying a new - * function, optional when updating an existing function. For a complete - * list of possible choices, see the - * [`gcloud` command - * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). - * - * Generated from protobuf field string runtime = 19; - * @return string - */ - public function getRuntime() - { - return $this->runtime; - } - - /** - * The runtime in which to run the function. Required when deploying a new - * function, optional when updating an existing function. For a complete - * list of possible choices, see the - * [`gcloud` command - * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). - * - * Generated from protobuf field string runtime = 19; - * @param string $var - * @return $this - */ - public function setRuntime($var) - { - GPBUtil::checkString($var, True); - $this->runtime = $var; - - return $this; - } - - /** - * The function execution timeout. Execution is considered failed and - * can be terminated if the function is not completed at the end of the - * timeout period. Defaults to 60 seconds. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 9; - * @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 function execution timeout. Execution is considered failed and - * can be terminated if the function is not completed at the end of the - * timeout period. Defaults to 60 seconds. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 9; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * The amount of memory in MB available for a function. - * Defaults to 256MB. - * - * Generated from protobuf field int32 available_memory_mb = 10; - * @return int - */ - public function getAvailableMemoryMb() - { - return $this->available_memory_mb; - } - - /** - * The amount of memory in MB available for a function. - * Defaults to 256MB. - * - * Generated from protobuf field int32 available_memory_mb = 10; - * @param int $var - * @return $this - */ - public function setAvailableMemoryMb($var) - { - GPBUtil::checkInt32($var); - $this->available_memory_mb = $var; - - return $this; - } - - /** - * The email of the function's service account. If empty, defaults to - * `{project_id}@appspot.gserviceaccount.com`. - * - * Generated from protobuf field string service_account_email = 11; - * @return string - */ - public function getServiceAccountEmail() - { - return $this->service_account_email; - } - - /** - * The email of the function's service account. If empty, defaults to - * `{project_id}@appspot.gserviceaccount.com`. - * - * Generated from protobuf field string service_account_email = 11; - * @param string $var - * @return $this - */ - public function setServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->service_account_email = $var; - - return $this; - } - - /** - * Output only. The last update timestamp of a Cloud Function. - * - * 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 timestamp of a Cloud Function. - * - * 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 version identifier of the Cloud Function. Each deployment attempt - * results in a new version of a function being created. - * - * Generated from protobuf field int64 version_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getVersionId() - { - return $this->version_id; - } - - /** - * Output only. The version identifier of the Cloud Function. Each deployment attempt - * results in a new version of a function being created. - * - * Generated from protobuf field int64 version_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setVersionId($var) - { - GPBUtil::checkInt64($var); - $this->version_id = $var; - - return $this; - } - - /** - * Labels associated with this Cloud Function. - * - * Generated from protobuf field map labels = 15; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this Cloud Function. - * - * Generated from protobuf field map labels = 15; - * @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; - } - - /** - * Environment variables that shall be available during function execution. - * - * Generated from protobuf field map environment_variables = 17; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEnvironmentVariables() - { - return $this->environment_variables; - } - - /** - * Environment variables that shall be available during function execution. - * - * Generated from protobuf field map environment_variables = 17; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEnvironmentVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->environment_variables = $arr; - - return $this; - } - - /** - * Build environment variables that shall be available during build time. - * - * Generated from protobuf field map build_environment_variables = 28; - * @return \Google\Protobuf\Internal\MapField - */ - public function getBuildEnvironmentVariables() - { - return $this->build_environment_variables; - } - - /** - * Build environment variables that shall be available during build time. - * - * Generated from protobuf field map build_environment_variables = 28; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setBuildEnvironmentVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->build_environment_variables = $arr; - - return $this; - } - - /** - * The VPC Network that this cloud function can connect to. It can be - * either the fully-qualified URI, or the short name of the network resource. - * If the short network name is used, the network must belong to the same - * project. Otherwise, it must belong to a project within the same - * organization. The format of this field is either - * `projects/{project}/global/networks/{network}` or `{network}`, where - * `{project}` is a project id where the network is defined, and `{network}` - * is the short name of the network. - * This field is mutually exclusive with `vpc_connector` and will be replaced - * by it. - * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for - * more information on connecting Cloud projects. - * - * Generated from protobuf field string network = 18; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * The VPC Network that this cloud function can connect to. It can be - * either the fully-qualified URI, or the short name of the network resource. - * If the short network name is used, the network must belong to the same - * project. Otherwise, it must belong to a project within the same - * organization. The format of this field is either - * `projects/{project}/global/networks/{network}` or `{network}`, where - * `{project}` is a project id where the network is defined, and `{network}` - * is the short name of the network. - * This field is mutually exclusive with `vpc_connector` and will be replaced - * by it. - * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for - * more information on connecting Cloud projects. - * - * Generated from protobuf field string network = 18; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * The limit on the maximum number of function instances that may coexist at a - * given time. - * In some cases, such as rapid traffic surges, Cloud Functions may, for a - * short period of time, create more instances than the specified max - * instances limit. If your function cannot tolerate this temporary behavior, - * you may want to factor in a safety margin and set a lower max instances - * value than your function can tolerate. - * See the [Max - * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for - * more details. - * - * Generated from protobuf field int32 max_instances = 20; - * @return int - */ - public function getMaxInstances() - { - return $this->max_instances; - } - - /** - * The limit on the maximum number of function instances that may coexist at a - * given time. - * In some cases, such as rapid traffic surges, Cloud Functions may, for a - * short period of time, create more instances than the specified max - * instances limit. If your function cannot tolerate this temporary behavior, - * you may want to factor in a safety margin and set a lower max instances - * value than your function can tolerate. - * See the [Max - * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for - * more details. - * - * Generated from protobuf field int32 max_instances = 20; - * @param int $var - * @return $this - */ - public function setMaxInstances($var) - { - GPBUtil::checkInt32($var); - $this->max_instances = $var; - - return $this; - } - - /** - * A lower bound for the number function instances that may coexist at a - * given time. - * - * Generated from protobuf field int32 min_instances = 32; - * @return int - */ - public function getMinInstances() - { - return $this->min_instances; - } - - /** - * A lower bound for the number function instances that may coexist at a - * given time. - * - * Generated from protobuf field int32 min_instances = 32; - * @param int $var - * @return $this - */ - public function setMinInstances($var) - { - GPBUtil::checkInt32($var); - $this->min_instances = $var; - - return $this; - } - - /** - * The VPC Network Connector that this cloud function can connect to. It can - * be either the fully-qualified URI, or the short name of the network - * connector resource. The format of this field is - * `projects/*/locations/*/connectors/*` - * This field is mutually exclusive with `network` field and will eventually - * replace it. - * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for - * more information on connecting Cloud projects. - * - * Generated from protobuf field string vpc_connector = 22; - * @return string - */ - public function getVpcConnector() - { - return $this->vpc_connector; - } - - /** - * The VPC Network Connector that this cloud function can connect to. It can - * be either the fully-qualified URI, or the short name of the network - * connector resource. The format of this field is - * `projects/*/locations/*/connectors/*` - * This field is mutually exclusive with `network` field and will eventually - * replace it. - * See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for - * more information on connecting Cloud projects. - * - * Generated from protobuf field string vpc_connector = 22; - * @param string $var - * @return $this - */ - public function setVpcConnector($var) - { - GPBUtil::checkString($var, True); - $this->vpc_connector = $var; - - return $this; - } - - /** - * The egress settings for the connector, controlling what traffic is diverted - * through it. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings vpc_connector_egress_settings = 23; - * @return int - */ - public function getVpcConnectorEgressSettings() - { - return $this->vpc_connector_egress_settings; - } - - /** - * The egress settings for the connector, controlling what traffic is diverted - * through it. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings vpc_connector_egress_settings = 23; - * @param int $var - * @return $this - */ - public function setVpcConnectorEgressSettings($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V1\CloudFunction\VpcConnectorEgressSettings::class); - $this->vpc_connector_egress_settings = $var; - - return $this; - } - - /** - * The ingress settings for the function, controlling what traffic can reach - * it. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.IngressSettings ingress_settings = 24; - * @return int - */ - public function getIngressSettings() - { - return $this->ingress_settings; - } - - /** - * The ingress settings for the function, controlling what traffic can reach - * it. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.IngressSettings ingress_settings = 24; - * @param int $var - * @return $this - */ - public function setIngressSettings($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V1\CloudFunction\IngressSettings::class); - $this->ingress_settings = $var; - - return $this; - } - - /** - * Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function resources. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * If specified, you must also provide an artifact registry repository using - * the `docker_repository` field that was created with the same KMS crypto - * key. - * The following service accounts need to be granted the role 'Cloud KMS - * CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' - * on the Key/KeyRing/Project/Organization (least access preferred). - * 1. Google Cloud Functions service account - * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - - * Required to protect the function's image. - * 2. Google Storage service account - * (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - - * Required to protect the function's source code. - * If this service account does not exist, deploying a function without a - * KMS key or retrieving the service agent name provisions it. For more - * information, see - * https://cloud.google.com/storage/docs/projects#service-agents and - * https://cloud.google.com/storage/docs/getting-service-agent#gsutil. - * Google Cloud Functions delegates access to service agents to protect - * function resources in internal projects that are not accessible by the - * end user. - * - * Generated from protobuf field string kms_key_name = 25 [(.google.api.resource_reference) = { - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function resources. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * If specified, you must also provide an artifact registry repository using - * the `docker_repository` field that was created with the same KMS crypto - * key. - * The following service accounts need to be granted the role 'Cloud KMS - * CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' - * on the Key/KeyRing/Project/Organization (least access preferred). - * 1. Google Cloud Functions service account - * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - - * Required to protect the function's image. - * 2. Google Storage service account - * (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - - * Required to protect the function's source code. - * If this service account does not exist, deploying a function without a - * KMS key or retrieving the service agent name provisions it. For more - * information, see - * https://cloud.google.com/storage/docs/projects#service-agents and - * https://cloud.google.com/storage/docs/getting-service-agent#gsutil. - * Google Cloud Functions delegates access to service agents to protect - * function resources in internal projects that are not accessible by the - * end user. - * - * Generated from protobuf field string kms_key_name = 25 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - - /** - * Name of the Cloud Build Custom Worker Pool that should be used to build the - * function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * `{project}` and `{region}` are the project id and region respectively where - * the worker pool is defined and `{workerPool}` is the short name of the - * worker pool. - * If the project id is not the same as the function, then the Cloud - * Functions Service Agent - * (`service-@gcf-admin-robot.iam.gserviceaccount.com`) must - * be granted the role Cloud Build Custom Workers Builder - * (`roles/cloudbuild.customworkers.builder`) in the project. - * - * Generated from protobuf field string build_worker_pool = 26; - * @return string - */ - public function getBuildWorkerPool() - { - return $this->build_worker_pool; - } - - /** - * Name of the Cloud Build Custom Worker Pool that should be used to build the - * function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * `{project}` and `{region}` are the project id and region respectively where - * the worker pool is defined and `{workerPool}` is the short name of the - * worker pool. - * If the project id is not the same as the function, then the Cloud - * Functions Service Agent - * (`service-@gcf-admin-robot.iam.gserviceaccount.com`) must - * be granted the role Cloud Build Custom Workers Builder - * (`roles/cloudbuild.customworkers.builder`) in the project. - * - * Generated from protobuf field string build_worker_pool = 26; - * @param string $var - * @return $this - */ - public function setBuildWorkerPool($var) - { - GPBUtil::checkString($var, True); - $this->build_worker_pool = $var; - - return $this; - } - - /** - * Output only. The Cloud Build ID of the latest successful deployment of the - * function. - * - * Generated from protobuf field string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getBuildId() - { - return $this->build_id; - } - - /** - * Output only. The Cloud Build ID of the latest successful deployment of the - * function. - * - * Generated from protobuf field string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setBuildId($var) - { - GPBUtil::checkString($var, True); - $this->build_id = $var; - - return $this; - } - - /** - * Output only. The Cloud Build Name of the function deployment. - * `projects//locations//builds/`. - * - * Generated from protobuf field string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getBuildName() - { - return $this->build_name; - } - - /** - * Output only. The Cloud Build Name of the function deployment. - * `projects//locations//builds/`. - * - * Generated from protobuf field string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setBuildName($var) - { - GPBUtil::checkString($var, True); - $this->build_name = $var; - - return $this; - } - - /** - * Secret environment variables configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecretEnvironmentVariables() - { - return $this->secret_environment_variables; - } - - /** - * Secret environment variables configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; - * @param array<\Google\Cloud\Functions\V1\SecretEnvVar>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecretEnvironmentVariables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V1\SecretEnvVar::class); - $this->secret_environment_variables = $arr; - - return $this; - } - - /** - * Secret volumes configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecretVolumes() - { - return $this->secret_volumes; - } - - /** - * Secret volumes configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; - * @param array<\Google\Cloud\Functions\V1\SecretVolume>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecretVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V1\SecretVolume::class); - $this->secret_volumes = $arr; - - return $this; - } - - /** - * Input only. An identifier for Firebase function sources. Disclaimer: This field is only - * supported for Firebase function deployments. - * - * Generated from protobuf field string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getSourceToken() - { - return $this->source_token; - } - - /** - * Input only. An identifier for Firebase function sources. Disclaimer: This field is only - * supported for Firebase function deployments. - * - * Generated from protobuf field string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSourceToken($var) - { - GPBUtil::checkString($var, True); - $this->source_token = $var; - - return $this; - } - - /** - * User managed repository created in Artifact Registry optionally with a - * customer managed encryption key. If specified, deployments will use - * Artifact Registry. If unspecified and the deployment is eligible to use - * Artifact Registry, GCF will create and use a repository named - * 'gcf-artifacts' for every deployed region. This is the repository to which - * the function docker image will be pushed after it is built by Cloud Build. - * It must match the pattern - * `projects/{project}/locations/{location}/repositories/{repository}`. - * Cross-project repositories are not supported. - * Cross-location repositories are not supported. - * Repository format must be 'DOCKER'. - * - * Generated from protobuf field string docker_repository = 34 [(.google.api.resource_reference) = { - * @return string - */ - public function getDockerRepository() - { - return $this->docker_repository; - } - - /** - * User managed repository created in Artifact Registry optionally with a - * customer managed encryption key. If specified, deployments will use - * Artifact Registry. If unspecified and the deployment is eligible to use - * Artifact Registry, GCF will create and use a repository named - * 'gcf-artifacts' for every deployed region. This is the repository to which - * the function docker image will be pushed after it is built by Cloud Build. - * It must match the pattern - * `projects/{project}/locations/{location}/repositories/{repository}`. - * Cross-project repositories are not supported. - * Cross-location repositories are not supported. - * Repository format must be 'DOCKER'. - * - * Generated from protobuf field string docker_repository = 34 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDockerRepository($var) - { - GPBUtil::checkString($var, True); - $this->docker_repository = $var; - - return $this; - } - - /** - * Docker Registry to use for this deployment. - * If `docker_repository` field is specified, this field will be automatically - * set as `ARTIFACT_REGISTRY`. - * If unspecified, it currently defaults to `CONTAINER_REGISTRY`. - * This field may be overridden by the backend for eligible deployments. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.DockerRegistry docker_registry = 35; - * @return int - */ - public function getDockerRegistry() - { - return $this->docker_registry; - } - - /** - * Docker Registry to use for this deployment. - * If `docker_repository` field is specified, this field will be automatically - * set as `ARTIFACT_REGISTRY`. - * If unspecified, it currently defaults to `CONTAINER_REGISTRY`. - * This field may be overridden by the backend for eligible deployments. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunction.DockerRegistry docker_registry = 35; - * @param int $var - * @return $this - */ - public function setDockerRegistry($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V1\CloudFunction\DockerRegistry::class); - $this->docker_registry = $var; - - return $this; - } - - /** - * @return string - */ - public function getSourceCode() - { - return $this->whichOneof("source_code"); - } - - /** - * @return string - */ - public function getTrigger() - { - return $this->whichOneof("trigger"); - } - -} - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/DockerRegistry.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/DockerRegistry.php deleted file mode 100644 index 0dc3a8279ff9..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/DockerRegistry.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.functions.v1.CloudFunction.DockerRegistry - */ -class DockerRegistry -{ - /** - * Unspecified. - * - * Generated from protobuf enum DOCKER_REGISTRY_UNSPECIFIED = 0; - */ - const DOCKER_REGISTRY_UNSPECIFIED = 0; - /** - * Docker images will be stored in multi-regional Container Registry - * repositories named `gcf`. - * - * Generated from protobuf enum CONTAINER_REGISTRY = 1; - */ - const CONTAINER_REGISTRY = 1; - /** - * Docker images will be stored in regional Artifact Registry repositories. - * By default, GCF will create and use repositories named `gcf-artifacts` - * in every region in which a function is deployed. But the repository to - * use can also be specified by the user using the `docker_repository` - * field. - * - * Generated from protobuf enum ARTIFACT_REGISTRY = 2; - */ - const ARTIFACT_REGISTRY = 2; - - private static $valueToName = [ - self::DOCKER_REGISTRY_UNSPECIFIED => 'DOCKER_REGISTRY_UNSPECIFIED', - self::CONTAINER_REGISTRY => 'CONTAINER_REGISTRY', - self::ARTIFACT_REGISTRY => 'ARTIFACT_REGISTRY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DockerRegistry::class, \Google\Cloud\Functions\V1\CloudFunction_DockerRegistry::class); - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/IngressSettings.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/IngressSettings.php deleted file mode 100644 index f01e9ad97124..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/IngressSettings.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.functions.v1.CloudFunction.IngressSettings - */ -class IngressSettings -{ - /** - * Unspecified. - * - * Generated from protobuf enum INGRESS_SETTINGS_UNSPECIFIED = 0; - */ - const INGRESS_SETTINGS_UNSPECIFIED = 0; - /** - * Allow HTTP traffic from public and private sources. - * - * Generated from protobuf enum ALLOW_ALL = 1; - */ - const ALLOW_ALL = 1; - /** - * Allow HTTP traffic from only private VPC sources. - * - * Generated from protobuf enum ALLOW_INTERNAL_ONLY = 2; - */ - const ALLOW_INTERNAL_ONLY = 2; - /** - * Allow HTTP traffic from private VPC sources and through GCLB. - * - * Generated from protobuf enum ALLOW_INTERNAL_AND_GCLB = 3; - */ - const ALLOW_INTERNAL_AND_GCLB = 3; - - private static $valueToName = [ - self::INGRESS_SETTINGS_UNSPECIFIED => 'INGRESS_SETTINGS_UNSPECIFIED', - self::ALLOW_ALL => 'ALLOW_ALL', - self::ALLOW_INTERNAL_ONLY => 'ALLOW_INTERNAL_ONLY', - self::ALLOW_INTERNAL_AND_GCLB => 'ALLOW_INTERNAL_AND_GCLB', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IngressSettings::class, \Google\Cloud\Functions\V1\CloudFunction_IngressSettings::class); - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/VpcConnectorEgressSettings.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/VpcConnectorEgressSettings.php deleted file mode 100644 index a357c173fb54..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction/VpcConnectorEgressSettings.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings - */ -class VpcConnectorEgressSettings -{ - /** - * Unspecified. - * - * Generated from protobuf enum VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0; - */ - const VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0; - /** - * Use the VPC Access Connector only for private IP space from RFC1918. - * - * Generated from protobuf enum PRIVATE_RANGES_ONLY = 1; - */ - const PRIVATE_RANGES_ONLY = 1; - /** - * Force the use of VPC Access Connector for all egress traffic from the - * function. - * - * Generated from protobuf enum ALL_TRAFFIC = 2; - */ - const ALL_TRAFFIC = 2; - - private static $valueToName = [ - self::VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED => 'VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED', - self::PRIVATE_RANGES_ONLY => 'PRIVATE_RANGES_ONLY', - self::ALL_TRAFFIC => 'ALL_TRAFFIC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VpcConnectorEgressSettings::class, \Google\Cloud\Functions\V1\CloudFunction_VpcConnectorEgressSettings::class); - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunctionStatus.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunctionStatus.php deleted file mode 100644 index 50cab779a116..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunctionStatus.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.functions.v1.CloudFunctionStatus - */ -class CloudFunctionStatus -{ - /** - * Not specified. Invalid state. - * - * Generated from protobuf enum CLOUD_FUNCTION_STATUS_UNSPECIFIED = 0; - */ - const CLOUD_FUNCTION_STATUS_UNSPECIFIED = 0; - /** - * Function has been successfully deployed and is serving. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Function deployment failed and the function isn’t serving. - * - * Generated from protobuf enum OFFLINE = 2; - */ - const OFFLINE = 2; - /** - * Function is being created or updated. - * - * Generated from protobuf enum DEPLOY_IN_PROGRESS = 3; - */ - const DEPLOY_IN_PROGRESS = 3; - /** - * Function is being deleted. - * - * Generated from protobuf enum DELETE_IN_PROGRESS = 4; - */ - const DELETE_IN_PROGRESS = 4; - /** - * Function deployment failed and the function serving state is undefined. - * The function should be updated or deleted to move it out of this state. - * - * Generated from protobuf enum UNKNOWN = 5; - */ - const UNKNOWN = 5; - - private static $valueToName = [ - self::CLOUD_FUNCTION_STATUS_UNSPECIFIED => 'CLOUD_FUNCTION_STATUS_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::OFFLINE => 'OFFLINE', - self::DEPLOY_IN_PROGRESS => 'DEPLOY_IN_PROGRESS', - self::DELETE_IN_PROGRESS => 'DELETE_IN_PROGRESS', - self::UNKNOWN => 'UNKNOWN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction_DockerRegistry.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction_DockerRegistry.php deleted file mode 100644 index d3019bde7b2a..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CloudFunction_DockerRegistry.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/ListFunctions', - $argument, - ['\Google\Cloud\Functions\V1\ListFunctionsResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns a function with the given name from the requested project. - * @param \Google\Cloud\Functions\V1\GetFunctionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetFunction(\Google\Cloud\Functions\V1\GetFunctionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/GetFunction', - $argument, - ['\Google\Cloud\Functions\V1\CloudFunction', 'decode'], - $metadata, $options); - } - - /** - * Creates a new function. If a function with the given name already exists in - * the specified project, the long running operation will return - * `ALREADY_EXISTS` error. - * @param \Google\Cloud\Functions\V1\CreateFunctionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateFunction(\Google\Cloud\Functions\V1\CreateFunctionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/CreateFunction', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates existing function. - * @param \Google\Cloud\Functions\V1\UpdateFunctionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateFunction(\Google\Cloud\Functions\V1\UpdateFunctionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/UpdateFunction', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a function with the given name from the specified project. If the - * given function is used by some trigger, the trigger will be updated to - * remove this function. - * @param \Google\Cloud\Functions\V1\DeleteFunctionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteFunction(\Google\Cloud\Functions\V1\DeleteFunctionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/DeleteFunction', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Synchronously invokes a deployed Cloud Function. To be used for testing - * purposes as very limited traffic is allowed. For more information on - * the actual limits, refer to - * [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits). - * @param \Google\Cloud\Functions\V1\CallFunctionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CallFunction(\Google\Cloud\Functions\V1\CallFunctionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/CallFunction', - $argument, - ['\Google\Cloud\Functions\V1\CallFunctionResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns a signed URL for uploading a function source code. - * For more information about the signed URL usage see: - * https://cloud.google.com/storage/docs/access-control/signed-urls. - * Once the function source code upload is complete, the used signed - * URL should be provided in CreateFunction or UpdateFunction request - * as a reference to the function source code. - * - * When uploading source code to the generated signed URL, please follow - * these restrictions: - * - * * Source file type should be a zip file. - * * Source file size should not exceed 100MB limit. - * * No credentials should be attached - the signed URLs provide access to the - * target bucket using internal service identity; if credentials were - * attached, the identity from the credentials would be used, but that - * identity does not have permissions to upload files to the URL. - * - * When making a HTTP PUT request, these two headers need to be specified: - * - * * `content-type: application/zip` - * * `x-goog-content-length-range: 0,104857600` - * - * And this header SHOULD NOT be specified: - * - * * `Authorization: Bearer YOUR_TOKEN` - * @param \Google\Cloud\Functions\V1\GenerateUploadUrlRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GenerateUploadUrl(\Google\Cloud\Functions\V1\GenerateUploadUrlRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/GenerateUploadUrl', - $argument, - ['\Google\Cloud\Functions\V1\GenerateUploadUrlResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns a signed URL for downloading deployed function source code. - * The URL is only valid for a limited period and should be used within - * minutes after generation. - * For more information about the signed URL usage see: - * https://cloud.google.com/storage/docs/access-control/signed-urls - * @param \Google\Cloud\Functions\V1\GenerateDownloadUrlRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GenerateDownloadUrl(\Google\Cloud\Functions\V1\GenerateDownloadUrlRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/GenerateDownloadUrl', - $argument, - ['\Google\Cloud\Functions\V1\GenerateDownloadUrlResponse', 'decode'], - $metadata, $options); - } - - /** - * Sets the IAM access control policy on the specified function. - * Replaces any existing policy. - * @param \Google\Cloud\Iam\V1\SetIamPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SetIamPolicy(\Google\Cloud\Iam\V1\SetIamPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/SetIamPolicy', - $argument, - ['\Google\Cloud\Iam\V1\Policy', 'decode'], - $metadata, $options); - } - - /** - * Gets the IAM access control policy for a function. - * Returns an empty policy if the function exists and does not have a policy - * set. - * @param \Google\Cloud\Iam\V1\GetIamPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetIamPolicy(\Google\Cloud\Iam\V1\GetIamPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/GetIamPolicy', - $argument, - ['\Google\Cloud\Iam\V1\Policy', 'decode'], - $metadata, $options); - } - - /** - * Tests the specified permissions against the IAM access control policy - * for a function. - * If the function does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * @param \Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function TestIamPermissions(\Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v1.CloudFunctionsService/TestIamPermissions', - $argument, - ['\Google\Cloud\Iam\V1\TestIamPermissionsResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CreateFunctionRequest.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CreateFunctionRequest.php deleted file mode 100644 index ddbc488e8b39..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/CreateFunctionRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.functions.v1.CreateFunctionRequest - */ -class CreateFunctionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location in which the function should be created, specified - * in the format `projects/*/locations/*` - * - * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $location = ''; - /** - * Required. Function to be created. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunction function = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $function = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $location - * Required. The project and location in which the function should be created, specified - * in the format `projects/*/locations/*` - * @type \Google\Cloud\Functions\V1\CloudFunction $function - * Required. Function to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location in which the function should be created, specified - * in the format `projects/*/locations/*` - * - * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Required. The project and location in which the function should be created, specified - * in the format `projects/*/locations/*` - * - * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Required. Function to be created. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunction function = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Functions\V1\CloudFunction|null - */ - public function getFunction() - { - return $this->function; - } - - public function hasFunction() - { - return isset($this->function); - } - - public function clearFunction() - { - unset($this->function); - } - - /** - * Required. Function to be created. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunction function = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Functions\V1\CloudFunction $var - * @return $this - */ - public function setFunction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V1\CloudFunction::class); - $this->function = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/DeleteFunctionRequest.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/DeleteFunctionRequest.php deleted file mode 100644 index 9fa98e38b5ea..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/DeleteFunctionRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.functions.v1.DeleteFunctionRequest - */ -class DeleteFunctionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the function which should be deleted. - * - * 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 name of the function which should be deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the function which should 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 function which should 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/Functions/v1/proto/src/Google/Cloud/Functions/V1/EventTrigger.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/EventTrigger.php deleted file mode 100644 index a85d3f80fc84..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/EventTrigger.php +++ /dev/null @@ -1,292 +0,0 @@ -google.cloud.functions.v1.EventTrigger - */ -class EventTrigger extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The type of event to observe. For example: - * `providers/cloud.storage/eventTypes/object.change` and - * `providers/cloud.pubsub/eventTypes/topic.publish`. - * Event types match pattern `providers/*/eventTypes/*.*`. - * The pattern contains: - * 1. namespace: For example, `cloud.storage` and - * `google.firebase.analytics`. - * 2. resource type: The type of resource on which event occurs. For - * example, the Google Cloud Storage API includes the type `object`. - * 3. action: The action that generates the event. For example, action for - * a Google Cloud Storage Object is 'change'. - * These parts are lower case. - * - * Generated from protobuf field string event_type = 1; - */ - protected $event_type = ''; - /** - * Required. The resource(s) from which to observe events, for example, - * `projects/_/buckets/myBucket`. - * Not all syntactically correct values are accepted by all services. For - * example: - * 1. The authorization model must support it. Google Cloud Functions - * only allows EventTriggers to be deployed that observe resources in the - * same project as the `CloudFunction`. - * 2. The resource type must match the pattern expected for an - * `event_type`. For example, an `EventTrigger` that has an - * `event_type` of "google.pubsub.topic.publish" should have a resource - * that matches Google Cloud Pub/Sub topics. - * Additionally, some services may support short names when creating an - * `EventTrigger`. These will always be returned in the normalized "long" - * format. - * See each *service's* documentation for supported formats. - * - * Generated from protobuf field string resource = 2; - */ - protected $resource = ''; - /** - * The hostname of the service that should be observed. - * If no string is provided, the default service implementing the API will - * be used. For example, `storage.googleapis.com` is the default for all - * event types in the `google.storage` namespace. - * - * Generated from protobuf field string service = 3; - */ - protected $service = ''; - /** - * Specifies policy for failed executions. - * - * Generated from protobuf field .google.cloud.functions.v1.FailurePolicy failure_policy = 5; - */ - protected $failure_policy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $event_type - * Required. The type of event to observe. For example: - * `providers/cloud.storage/eventTypes/object.change` and - * `providers/cloud.pubsub/eventTypes/topic.publish`. - * Event types match pattern `providers/*/eventTypes/*.*`. - * The pattern contains: - * 1. namespace: For example, `cloud.storage` and - * `google.firebase.analytics`. - * 2. resource type: The type of resource on which event occurs. For - * example, the Google Cloud Storage API includes the type `object`. - * 3. action: The action that generates the event. For example, action for - * a Google Cloud Storage Object is 'change'. - * These parts are lower case. - * @type string $resource - * Required. The resource(s) from which to observe events, for example, - * `projects/_/buckets/myBucket`. - * Not all syntactically correct values are accepted by all services. For - * example: - * 1. The authorization model must support it. Google Cloud Functions - * only allows EventTriggers to be deployed that observe resources in the - * same project as the `CloudFunction`. - * 2. The resource type must match the pattern expected for an - * `event_type`. For example, an `EventTrigger` that has an - * `event_type` of "google.pubsub.topic.publish" should have a resource - * that matches Google Cloud Pub/Sub topics. - * Additionally, some services may support short names when creating an - * `EventTrigger`. These will always be returned in the normalized "long" - * format. - * See each *service's* documentation for supported formats. - * @type string $service - * The hostname of the service that should be observed. - * If no string is provided, the default service implementing the API will - * be used. For example, `storage.googleapis.com` is the default for all - * event types in the `google.storage` namespace. - * @type \Google\Cloud\Functions\V1\FailurePolicy $failure_policy - * Specifies policy for failed executions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The type of event to observe. For example: - * `providers/cloud.storage/eventTypes/object.change` and - * `providers/cloud.pubsub/eventTypes/topic.publish`. - * Event types match pattern `providers/*/eventTypes/*.*`. - * The pattern contains: - * 1. namespace: For example, `cloud.storage` and - * `google.firebase.analytics`. - * 2. resource type: The type of resource on which event occurs. For - * example, the Google Cloud Storage API includes the type `object`. - * 3. action: The action that generates the event. For example, action for - * a Google Cloud Storage Object is 'change'. - * These parts are lower case. - * - * Generated from protobuf field string event_type = 1; - * @return string - */ - public function getEventType() - { - return $this->event_type; - } - - /** - * Required. The type of event to observe. For example: - * `providers/cloud.storage/eventTypes/object.change` and - * `providers/cloud.pubsub/eventTypes/topic.publish`. - * Event types match pattern `providers/*/eventTypes/*.*`. - * The pattern contains: - * 1. namespace: For example, `cloud.storage` and - * `google.firebase.analytics`. - * 2. resource type: The type of resource on which event occurs. For - * example, the Google Cloud Storage API includes the type `object`. - * 3. action: The action that generates the event. For example, action for - * a Google Cloud Storage Object is 'change'. - * These parts are lower case. - * - * Generated from protobuf field string event_type = 1; - * @param string $var - * @return $this - */ - public function setEventType($var) - { - GPBUtil::checkString($var, True); - $this->event_type = $var; - - return $this; - } - - /** - * Required. The resource(s) from which to observe events, for example, - * `projects/_/buckets/myBucket`. - * Not all syntactically correct values are accepted by all services. For - * example: - * 1. The authorization model must support it. Google Cloud Functions - * only allows EventTriggers to be deployed that observe resources in the - * same project as the `CloudFunction`. - * 2. The resource type must match the pattern expected for an - * `event_type`. For example, an `EventTrigger` that has an - * `event_type` of "google.pubsub.topic.publish" should have a resource - * that matches Google Cloud Pub/Sub topics. - * Additionally, some services may support short names when creating an - * `EventTrigger`. These will always be returned in the normalized "long" - * format. - * See each *service's* documentation for supported formats. - * - * Generated from protobuf field string resource = 2; - * @return string - */ - public function getResource() - { - return $this->resource; - } - - /** - * Required. The resource(s) from which to observe events, for example, - * `projects/_/buckets/myBucket`. - * Not all syntactically correct values are accepted by all services. For - * example: - * 1. The authorization model must support it. Google Cloud Functions - * only allows EventTriggers to be deployed that observe resources in the - * same project as the `CloudFunction`. - * 2. The resource type must match the pattern expected for an - * `event_type`. For example, an `EventTrigger` that has an - * `event_type` of "google.pubsub.topic.publish" should have a resource - * that matches Google Cloud Pub/Sub topics. - * Additionally, some services may support short names when creating an - * `EventTrigger`. These will always be returned in the normalized "long" - * format. - * See each *service's* documentation for supported formats. - * - * Generated from protobuf field string resource = 2; - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->resource = $var; - - return $this; - } - - /** - * The hostname of the service that should be observed. - * If no string is provided, the default service implementing the API will - * be used. For example, `storage.googleapis.com` is the default for all - * event types in the `google.storage` namespace. - * - * Generated from protobuf field string service = 3; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * The hostname of the service that should be observed. - * If no string is provided, the default service implementing the API will - * be used. For example, `storage.googleapis.com` is the default for all - * event types in the `google.storage` namespace. - * - * Generated from protobuf field string service = 3; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * Specifies policy for failed executions. - * - * Generated from protobuf field .google.cloud.functions.v1.FailurePolicy failure_policy = 5; - * @return \Google\Cloud\Functions\V1\FailurePolicy|null - */ - public function getFailurePolicy() - { - return $this->failure_policy; - } - - public function hasFailurePolicy() - { - return isset($this->failure_policy); - } - - public function clearFailurePolicy() - { - unset($this->failure_policy); - } - - /** - * Specifies policy for failed executions. - * - * Generated from protobuf field .google.cloud.functions.v1.FailurePolicy failure_policy = 5; - * @param \Google\Cloud\Functions\V1\FailurePolicy $var - * @return $this - */ - public function setFailurePolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V1\FailurePolicy::class); - $this->failure_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy.php deleted file mode 100644 index f81b50f6d779..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.functions.v1.FailurePolicy - */ -class FailurePolicy extends \Google\Protobuf\Internal\Message -{ - protected $action; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Functions\V1\FailurePolicy\Retry $retry - * If specified, then the function will be retried in case of a failure. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * If specified, then the function will be retried in case of a failure. - * - * Generated from protobuf field .google.cloud.functions.v1.FailurePolicy.Retry retry = 1; - * @return \Google\Cloud\Functions\V1\FailurePolicy\Retry|null - */ - public function getRetry() - { - return $this->readOneof(1); - } - - public function hasRetry() - { - return $this->hasOneof(1); - } - - /** - * If specified, then the function will be retried in case of a failure. - * - * Generated from protobuf field .google.cloud.functions.v1.FailurePolicy.Retry retry = 1; - * @param \Google\Cloud\Functions\V1\FailurePolicy\Retry $var - * @return $this - */ - public function setRetry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V1\FailurePolicy\Retry::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getAction() - { - return $this->whichOneof("action"); - } - -} - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy/Retry.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy/Retry.php deleted file mode 100644 index a2188ed7d6ef..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy/Retry.php +++ /dev/null @@ -1,40 +0,0 @@ -google.cloud.functions.v1.FailurePolicy.Retry - */ -class Retry extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Retry::class, \Google\Cloud\Functions\V1\FailurePolicy_Retry::class); - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy_Retry.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy_Retry.php deleted file mode 100644 index 4064ee7a8756..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/FailurePolicy_Retry.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.functions.v1.GenerateDownloadUrlRequest - */ -class GenerateDownloadUrlRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of function for which source code Google Cloud Storage signed - * URL should be generated. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The optional version of function. If not set, default, current version - * is used. - * - * Generated from protobuf field uint64 version_id = 2; - */ - protected $version_id = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of function for which source code Google Cloud Storage signed - * URL should be generated. - * @type int|string $version_id - * The optional version of function. If not set, default, current version - * is used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The name of function for which source code Google Cloud Storage signed - * URL should be generated. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of function for which source code Google Cloud Storage signed - * URL should be generated. - * - * 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 optional version of function. If not set, default, current version - * is used. - * - * Generated from protobuf field uint64 version_id = 2; - * @return int|string - */ - public function getVersionId() - { - return $this->version_id; - } - - /** - * The optional version of function. If not set, default, current version - * is used. - * - * Generated from protobuf field uint64 version_id = 2; - * @param int|string $var - * @return $this - */ - public function setVersionId($var) - { - GPBUtil::checkUint64($var); - $this->version_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateDownloadUrlResponse.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateDownloadUrlResponse.php deleted file mode 100644 index 54d5d55e458f..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateDownloadUrlResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.functions.v1.GenerateDownloadUrlResponse - */ -class GenerateDownloadUrlResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The generated Google Cloud Storage signed URL that should be used for - * function source code download. - * - * Generated from protobuf field string download_url = 1; - */ - protected $download_url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $download_url - * The generated Google Cloud Storage signed URL that should be used for - * function source code download. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The generated Google Cloud Storage signed URL that should be used for - * function source code download. - * - * Generated from protobuf field string download_url = 1; - * @return string - */ - public function getDownloadUrl() - { - return $this->download_url; - } - - /** - * The generated Google Cloud Storage signed URL that should be used for - * function source code download. - * - * Generated from protobuf field string download_url = 1; - * @param string $var - * @return $this - */ - public function setDownloadUrl($var) - { - GPBUtil::checkString($var, True); - $this->download_url = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlRequest.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlRequest.php deleted file mode 100644 index 7e5b33b51dff..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.functions.v1.GenerateUploadUrlRequest - */ -class GenerateUploadUrlRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The project and location in which the Google Cloud Storage signed URL - * should be generated, specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1; - */ - protected $parent = ''; - /** - * Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function source code objects in staging Cloud Storage - * buckets. When you generate an upload url and upload your source code, it - * gets copied to a staging Cloud Storage bucket in an internal regional - * project. The source code is then copied to a versioned directory in the - * sources bucket in the consumer project during the function deployment. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * The Google Cloud Functions service account - * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter - * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the - * Key/KeyRing/Project/Organization (least access preferred). GCF will - * delegate access to the Google Storage service account in the internal - * project. - * - * Generated from protobuf field string kms_key_name = 2 [(.google.api.resource_reference) = { - */ - protected $kms_key_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The project and location in which the Google Cloud Storage signed URL - * should be generated, specified in the format `projects/*/locations/*`. - * @type string $kms_key_name - * Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function source code objects in staging Cloud Storage - * buckets. When you generate an upload url and upload your source code, it - * gets copied to a staging Cloud Storage bucket in an internal regional - * project. The source code is then copied to a versioned directory in the - * sources bucket in the consumer project during the function deployment. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * The Google Cloud Functions service account - * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter - * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the - * Key/KeyRing/Project/Organization (least access preferred). GCF will - * delegate access to the Google Storage service account in the internal - * project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The project and location in which the Google Cloud Storage signed URL - * should be generated, specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The project and location in which the Google Cloud Storage signed URL - * should be generated, specified in the format `projects/*/locations/*`. - * - * 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; - } - - /** - * Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function source code objects in staging Cloud Storage - * buckets. When you generate an upload url and upload your source code, it - * gets copied to a staging Cloud Storage bucket in an internal regional - * project. The source code is then copied to a versioned directory in the - * sources bucket in the consumer project during the function deployment. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * The Google Cloud Functions service account - * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter - * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the - * Key/KeyRing/Project/Organization (least access preferred). GCF will - * delegate access to the Google Storage service account in the internal - * project. - * - * Generated from protobuf field string kms_key_name = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function source code objects in staging Cloud Storage - * buckets. When you generate an upload url and upload your source code, it - * gets copied to a staging Cloud Storage bucket in an internal regional - * project. The source code is then copied to a versioned directory in the - * sources bucket in the consumer project during the function deployment. - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * The Google Cloud Functions service account - * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter - * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the - * Key/KeyRing/Project/Organization (least access preferred). GCF will - * delegate access to the Google Storage service account in the internal - * project. - * - * Generated from protobuf field string kms_key_name = 2 [(.google.api.resource_reference) = { - * @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/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlResponse.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlResponse.php deleted file mode 100644 index 41557ee9aa0e..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GenerateUploadUrlResponse.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.functions.v1.GenerateUploadUrlResponse - */ -class GenerateUploadUrlResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The generated Google Cloud Storage signed URL that should be used for a - * function source code upload. The uploaded file should be a zip archive - * which contains a function. - * - * Generated from protobuf field string upload_url = 1; - */ - protected $upload_url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $upload_url - * The generated Google Cloud Storage signed URL that should be used for a - * function source code upload. The uploaded file should be a zip archive - * which contains a function. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The generated Google Cloud Storage signed URL that should be used for a - * function source code upload. The uploaded file should be a zip archive - * which contains a function. - * - * Generated from protobuf field string upload_url = 1; - * @return string - */ - public function getUploadUrl() - { - return $this->upload_url; - } - - /** - * The generated Google Cloud Storage signed URL that should be used for a - * function source code upload. The uploaded file should be a zip archive - * which contains a function. - * - * Generated from protobuf field string upload_url = 1; - * @param string $var - * @return $this - */ - public function setUploadUrl($var) - { - GPBUtil::checkString($var, True); - $this->upload_url = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GetFunctionRequest.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GetFunctionRequest.php deleted file mode 100644 index f0452c1f7158..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/GetFunctionRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.functions.v1.GetFunctionRequest - */ -class GetFunctionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the function which details should be obtained. - * - * 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 name of the function which details should be obtained. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the function which details should be obtained. - * - * Generated 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 function which details should be obtained. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger.php deleted file mode 100644 index 24ca96c54a24..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.functions.v1.HttpsTrigger - */ -class HttpsTrigger extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The deployed url for the function. - * - * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $url = ''; - /** - * The security level for the function. - * - * Generated from protobuf field .google.cloud.functions.v1.HttpsTrigger.SecurityLevel security_level = 2; - */ - protected $security_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * Output only. The deployed url for the function. - * @type int $security_level - * The security level for the function. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The deployed url for the function. - * - * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Output only. The deployed url for the function. - * - * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * The security level for the function. - * - * Generated from protobuf field .google.cloud.functions.v1.HttpsTrigger.SecurityLevel security_level = 2; - * @return int - */ - public function getSecurityLevel() - { - return $this->security_level; - } - - /** - * The security level for the function. - * - * Generated from protobuf field .google.cloud.functions.v1.HttpsTrigger.SecurityLevel security_level = 2; - * @param int $var - * @return $this - */ - public function setSecurityLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V1\HttpsTrigger\SecurityLevel::class); - $this->security_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger/SecurityLevel.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger/SecurityLevel.php deleted file mode 100644 index 26f38ca940f8..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger/SecurityLevel.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.functions.v1.HttpsTrigger.SecurityLevel - */ -class SecurityLevel -{ - /** - * Unspecified. - * - * Generated from protobuf enum SECURITY_LEVEL_UNSPECIFIED = 0; - */ - const SECURITY_LEVEL_UNSPECIFIED = 0; - /** - * Requests for a URL that match this handler that do not use HTTPS are - * automatically redirected to the HTTPS URL with the same path. Query - * parameters are reserved for the redirect. - * - * Generated from protobuf enum SECURE_ALWAYS = 1; - */ - const SECURE_ALWAYS = 1; - /** - * Both HTTP and HTTPS requests with URLs that match the handler succeed - * without redirects. The application can examine the request to determine - * which protocol was used and respond accordingly. - * - * Generated from protobuf enum SECURE_OPTIONAL = 2; - */ - const SECURE_OPTIONAL = 2; - - private static $valueToName = [ - self::SECURITY_LEVEL_UNSPECIFIED => 'SECURITY_LEVEL_UNSPECIFIED', - self::SECURE_ALWAYS => 'SECURE_ALWAYS', - self::SECURE_OPTIONAL => 'SECURE_OPTIONAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SecurityLevel::class, \Google\Cloud\Functions\V1\HttpsTrigger_SecurityLevel::class); - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger_SecurityLevel.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger_SecurityLevel.php deleted file mode 100644 index 8ddba09d0955..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/HttpsTrigger_SecurityLevel.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.functions.v1.ListFunctionsRequest - */ -class ListFunctionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The project and location from which the function should be listed, - * specified in the format `projects/*/locations/*` - * If you want to list functions in all locations, use "-" in place of a - * location. When listing functions in all locations, if one or more - * location(s) are unreachable, the response will contain functions from all - * reachable locations along with the names of any unreachable locations. - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of functions to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last - * `ListFunctionsResponse`; indicates that - * this is a continuation of a prior `ListFunctions` call, and that the - * system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The project and location from which the function should be listed, - * specified in the format `projects/*/locations/*` - * If you want to list functions in all locations, use "-" in place of a - * location. When listing functions in all locations, if one or more - * location(s) are unreachable, the response will contain functions from all - * reachable locations along with the names of any unreachable locations. - * @type int $page_size - * Maximum number of functions to return per call. - * @type string $page_token - * The value returned by the last - * `ListFunctionsResponse`; indicates that - * this is a continuation of a prior `ListFunctions` call, and that the - * system should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The project and location from which the function should be listed, - * specified in the format `projects/*/locations/*` - * If you want to list functions in all locations, use "-" in place of a - * location. When listing functions in all locations, if one or more - * location(s) are unreachable, the response will contain functions from all - * reachable locations along with the names of any unreachable locations. - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The project and location from which the function should be listed, - * specified in the format `projects/*/locations/*` - * If you want to list functions in all locations, use "-" in place of a - * location. When listing functions in all locations, if one or more - * location(s) are unreachable, the response will contain functions from all - * reachable locations along with the names of any unreachable locations. - * - * Generated from protobuf field string parent = 1 [(.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 functions to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of functions 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 - * `ListFunctionsResponse`; indicates that - * this is a continuation of a prior `ListFunctions` 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 - * `ListFunctionsResponse`; indicates that - * this is a continuation of a prior `ListFunctions` 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/Functions/v1/proto/src/Google/Cloud/Functions/V1/ListFunctionsResponse.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/ListFunctionsResponse.php deleted file mode 100644 index 354f44b97f4e..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/ListFunctionsResponse.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.functions.v1.ListFunctionsResponse - */ -class ListFunctionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The functions that match the request. - * - * Generated from protobuf field repeated .google.cloud.functions.v1.CloudFunction functions = 1; - */ - private $functions; - /** - * If not empty, indicates that there may be more functions that match - * the request; this value should be passed in a new - * [google.cloud.functions.v1.ListFunctionsRequest][google.cloud.functions.v1.ListFunctionsRequest] - * to get more functions. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. The response does not include any - * functions from these locations. - * - * 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\Functions\V1\CloudFunction>|\Google\Protobuf\Internal\RepeatedField $functions - * The functions that match the request. - * @type string $next_page_token - * If not empty, indicates that there may be more functions that match - * the request; this value should be passed in a new - * [google.cloud.functions.v1.ListFunctionsRequest][google.cloud.functions.v1.ListFunctionsRequest] - * to get more functions. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. The response does not include any - * functions from these locations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The functions that match the request. - * - * Generated from protobuf field repeated .google.cloud.functions.v1.CloudFunction functions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFunctions() - { - return $this->functions; - } - - /** - * The functions that match the request. - * - * Generated from protobuf field repeated .google.cloud.functions.v1.CloudFunction functions = 1; - * @param array<\Google\Cloud\Functions\V1\CloudFunction>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFunctions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V1\CloudFunction::class); - $this->functions = $arr; - - return $this; - } - - /** - * If not empty, indicates that there may be more functions that match - * the request; this value should be passed in a new - * [google.cloud.functions.v1.ListFunctionsRequest][google.cloud.functions.v1.ListFunctionsRequest] - * to get more functions. - * - * 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 functions that match - * the request; this value should be passed in a new - * [google.cloud.functions.v1.ListFunctionsRequest][google.cloud.functions.v1.ListFunctionsRequest] - * to get more functions. - * - * 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. The response does not include any - * functions from these locations. - * - * 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. The response does not include any - * functions from these locations. - * - * 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/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationMetadataV1.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationMetadataV1.php deleted file mode 100644 index 0f72c0be190f..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationMetadataV1.php +++ /dev/null @@ -1,349 +0,0 @@ -google.cloud.functions.v1.OperationMetadataV1 - */ -class OperationMetadataV1 extends \Google\Protobuf\Internal\Message -{ - /** - * Target of the operation - for example - * `projects/project-1/locations/region-1/functions/function-1` - * - * Generated from protobuf field string target = 1; - */ - protected $target = ''; - /** - * Type of operation. - * - * Generated from protobuf field .google.cloud.functions.v1.OperationType type = 2; - */ - protected $type = 0; - /** - * The original request that started the operation. - * - * Generated from protobuf field .google.protobuf.Any request = 3; - */ - protected $request = null; - /** - * Version id of the function created or updated by an API call. - * This field is only populated for Create and Update operations. - * - * Generated from protobuf field int64 version_id = 4; - */ - protected $version_id = 0; - /** - * The last update timestamp of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5; - */ - protected $update_time = null; - /** - * The Cloud Build ID of the function created or updated by an API call. - * This field is only populated for Create and Update operations. - * - * Generated from protobuf field string build_id = 6; - */ - protected $build_id = ''; - /** - * An identifier for Firebase function sources. Disclaimer: This field is only - * supported for Firebase function deployments. - * - * Generated from protobuf field string source_token = 7; - */ - protected $source_token = ''; - /** - * The Cloud Build Name of the function deployment. - * This field is only populated for Create and Update operations. - * `projects//locations//builds/`. - * - * Generated from protobuf field string build_name = 8; - */ - protected $build_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $target - * Target of the operation - for example - * `projects/project-1/locations/region-1/functions/function-1` - * @type int $type - * Type of operation. - * @type \Google\Protobuf\Any $request - * The original request that started the operation. - * @type int|string $version_id - * Version id of the function created or updated by an API call. - * This field is only populated for Create and Update operations. - * @type \Google\Protobuf\Timestamp $update_time - * The last update timestamp of the operation. - * @type string $build_id - * The Cloud Build ID of the function created or updated by an API call. - * This field is only populated for Create and Update operations. - * @type string $source_token - * An identifier for Firebase function sources. Disclaimer: This field is only - * supported for Firebase function deployments. - * @type string $build_name - * The Cloud Build Name of the function deployment. - * This field is only populated for Create and Update operations. - * `projects//locations//builds/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Operations::initOnce(); - parent::__construct($data); - } - - /** - * Target of the operation - for example - * `projects/project-1/locations/region-1/functions/function-1` - * - * Generated from protobuf field string target = 1; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Target of the operation - for example - * `projects/project-1/locations/region-1/functions/function-1` - * - * Generated from protobuf field string target = 1; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Type of operation. - * - * Generated from protobuf field .google.cloud.functions.v1.OperationType type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Type of operation. - * - * Generated from protobuf field .google.cloud.functions.v1.OperationType type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V1\OperationType::class); - $this->type = $var; - - return $this; - } - - /** - * The original request that started the operation. - * - * Generated from protobuf field .google.protobuf.Any request = 3; - * @return \Google\Protobuf\Any|null - */ - public function getRequest() - { - return $this->request; - } - - public function hasRequest() - { - return isset($this->request); - } - - public function clearRequest() - { - unset($this->request); - } - - /** - * The original request that started the operation. - * - * Generated from protobuf field .google.protobuf.Any request = 3; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setRequest($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->request = $var; - - return $this; - } - - /** - * Version id of the function created or updated by an API call. - * This field is only populated for Create and Update operations. - * - * Generated from protobuf field int64 version_id = 4; - * @return int|string - */ - public function getVersionId() - { - return $this->version_id; - } - - /** - * Version id of the function created or updated by an API call. - * This field is only populated for Create and Update operations. - * - * 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; - } - - /** - * The last update timestamp of the operation. - * - * 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 last update timestamp of the operation. - * - * 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; - } - - /** - * The Cloud Build ID of the function created or updated by an API call. - * This field is only populated for Create and Update operations. - * - * Generated from protobuf field string build_id = 6; - * @return string - */ - public function getBuildId() - { - return $this->build_id; - } - - /** - * The Cloud Build ID of the function created or updated by an API call. - * This field is only populated for Create and Update operations. - * - * Generated from protobuf field string build_id = 6; - * @param string $var - * @return $this - */ - public function setBuildId($var) - { - GPBUtil::checkString($var, True); - $this->build_id = $var; - - return $this; - } - - /** - * An identifier for Firebase function sources. Disclaimer: This field is only - * supported for Firebase function deployments. - * - * Generated from protobuf field string source_token = 7; - * @return string - */ - public function getSourceToken() - { - return $this->source_token; - } - - /** - * An identifier for Firebase function sources. Disclaimer: This field is only - * supported for Firebase function deployments. - * - * Generated from protobuf field string source_token = 7; - * @param string $var - * @return $this - */ - public function setSourceToken($var) - { - GPBUtil::checkString($var, True); - $this->source_token = $var; - - return $this; - } - - /** - * The Cloud Build Name of the function deployment. - * This field is only populated for Create and Update operations. - * `projects//locations//builds/`. - * - * Generated from protobuf field string build_name = 8; - * @return string - */ - public function getBuildName() - { - return $this->build_name; - } - - /** - * The Cloud Build Name of the function deployment. - * This field is only populated for Create and Update operations. - * `projects//locations//builds/`. - * - * Generated from protobuf field string build_name = 8; - * @param string $var - * @return $this - */ - public function setBuildName($var) - { - GPBUtil::checkString($var, True); - $this->build_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationType.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationType.php deleted file mode 100644 index 665dca661df7..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/OperationType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.functions.v1.OperationType - */ -class OperationType -{ - /** - * Unknown operation type. - * - * Generated from protobuf enum OPERATION_UNSPECIFIED = 0; - */ - const OPERATION_UNSPECIFIED = 0; - /** - * Triggered by CreateFunction call - * - * Generated from protobuf enum CREATE_FUNCTION = 1; - */ - const CREATE_FUNCTION = 1; - /** - * Triggered by UpdateFunction call - * - * Generated from protobuf enum UPDATE_FUNCTION = 2; - */ - const UPDATE_FUNCTION = 2; - /** - * Triggered by DeleteFunction call. - * - * Generated from protobuf enum DELETE_FUNCTION = 3; - */ - const DELETE_FUNCTION = 3; - - private static $valueToName = [ - self::OPERATION_UNSPECIFIED => 'OPERATION_UNSPECIFIED', - self::CREATE_FUNCTION => 'CREATE_FUNCTION', - self::UPDATE_FUNCTION => 'UPDATE_FUNCTION', - self::DELETE_FUNCTION => 'DELETE_FUNCTION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretEnvVar.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretEnvVar.php deleted file mode 100644 index c47df271d7a9..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretEnvVar.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.functions.v1.SecretEnvVar - */ -class SecretEnvVar extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the environment variable. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * Project identifier (preferrably project number but can also be the project - * ID) of the project that contains the secret. If not set, it will be - * populated with the function's project assuming that the secret exists in - * the same project as of the function. - * - * Generated from protobuf field string project_id = 2; - */ - protected $project_id = ''; - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - */ - protected $secret = ''; - /** - * Version of the secret (version number or the string 'latest'). It is - * recommended to use a numeric version for secret environment variables as - * any updates to the secret value is not reflected until new instances start. - * - * Generated from protobuf field string version = 4; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Name of the environment variable. - * @type string $project_id - * Project identifier (preferrably project number but can also be the project - * ID) of the project that contains the secret. If not set, it will be - * populated with the function's project assuming that the secret exists in - * the same project as of the function. - * @type string $secret - * Name of the secret in secret manager (not the full resource name). - * @type string $version - * Version of the secret (version number or the string 'latest'). It is - * recommended to use a numeric version for secret environment variables as - * any updates to the secret value is not reflected until new instances start. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Name of the environment variable. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Name of the environment variable. - * - * 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; - } - - /** - * Project identifier (preferrably project number but can also be the project - * ID) of the project that contains the secret. If not set, it will be - * populated with the function's project assuming that the secret exists in - * the same project as of the function. - * - * Generated from protobuf field string project_id = 2; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Project identifier (preferrably project number but can also be the project - * ID) of the project that contains the secret. If not set, it will be - * populated with the function's project assuming that the secret exists in - * the same project as of the function. - * - * 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; - } - - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - * @return string - */ - public function getSecret() - { - return $this->secret; - } - - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - * @param string $var - * @return $this - */ - public function setSecret($var) - { - GPBUtil::checkString($var, True); - $this->secret = $var; - - return $this; - } - - /** - * Version of the secret (version number or the string 'latest'). It is - * recommended to use a numeric version for secret environment variables as - * any updates to the secret value is not reflected until new instances start. - * - * Generated from protobuf field string version = 4; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of the secret (version number or the string 'latest'). It is - * recommended to use a numeric version for secret environment variables as - * any updates to the secret value is not reflected until new instances start. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume.php deleted file mode 100644 index 66e6c00d8ac1..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.functions.v1.SecretVolume - */ -class SecretVolume extends \Google\Protobuf\Internal\Message -{ - /** - * The path within the container to mount the secret volume. For example, - * setting the mount_path as `/etc/secrets` would mount the secret value files - * under the `/etc/secrets` directory. This directory will also be completely - * shadowed and unavailable to mount any other secrets. - * Recommended mount paths: /etc/secrets - * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log - * - * Generated from protobuf field string mount_path = 1; - */ - protected $mount_path = ''; - /** - * Project identifier (preferrably project number but can also be the project - * ID) of the project that contains the secret. If not set, it will be - * populated with the function's project assuming that the secret exists in - * the same project as of the function. - * - * Generated from protobuf field string project_id = 2; - */ - protected $project_id = ''; - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - */ - protected $secret = ''; - /** - * List of secret versions to mount for this secret. If empty, the `latest` - * version of the secret will be made available in a file named after the - * secret under the mount point. - * - * Generated from protobuf field repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; - */ - private $versions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mount_path - * The path within the container to mount the secret volume. For example, - * setting the mount_path as `/etc/secrets` would mount the secret value files - * under the `/etc/secrets` directory. This directory will also be completely - * shadowed and unavailable to mount any other secrets. - * Recommended mount paths: /etc/secrets - * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log - * @type string $project_id - * Project identifier (preferrably project number but can also be the project - * ID) of the project that contains the secret. If not set, it will be - * populated with the function's project assuming that the secret exists in - * the same project as of the function. - * @type string $secret - * Name of the secret in secret manager (not the full resource name). - * @type array<\Google\Cloud\Functions\V1\SecretVolume\SecretVersion>|\Google\Protobuf\Internal\RepeatedField $versions - * List of secret versions to mount for this secret. If empty, the `latest` - * version of the secret will be made available in a file named after the - * secret under the mount point. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The path within the container to mount the secret volume. For example, - * setting the mount_path as `/etc/secrets` would mount the secret value files - * under the `/etc/secrets` directory. This directory will also be completely - * shadowed and unavailable to mount any other secrets. - * Recommended mount paths: /etc/secrets - * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log - * - * Generated from protobuf field string mount_path = 1; - * @return string - */ - public function getMountPath() - { - return $this->mount_path; - } - - /** - * The path within the container to mount the secret volume. For example, - * setting the mount_path as `/etc/secrets` would mount the secret value files - * under the `/etc/secrets` directory. This directory will also be completely - * shadowed and unavailable to mount any other secrets. - * Recommended mount paths: /etc/secrets - * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log - * - * Generated from protobuf field string mount_path = 1; - * @param string $var - * @return $this - */ - public function setMountPath($var) - { - GPBUtil::checkString($var, True); - $this->mount_path = $var; - - return $this; - } - - /** - * Project identifier (preferrably project number but can also be the project - * ID) of the project that contains the secret. If not set, it will be - * populated with the function's project assuming that the secret exists in - * the same project as of the function. - * - * Generated from protobuf field string project_id = 2; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Project identifier (preferrably project number but can also be the project - * ID) of the project that contains the secret. If not set, it will be - * populated with the function's project assuming that the secret exists in - * the same project as of the function. - * - * 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; - } - - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - * @return string - */ - public function getSecret() - { - return $this->secret; - } - - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - * @param string $var - * @return $this - */ - public function setSecret($var) - { - GPBUtil::checkString($var, True); - $this->secret = $var; - - return $this; - } - - /** - * List of secret versions to mount for this secret. If empty, the `latest` - * version of the secret will be made available in a file named after the - * secret under the mount point. - * - * Generated from protobuf field repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVersions() - { - return $this->versions; - } - - /** - * List of secret versions to mount for this secret. If empty, the `latest` - * version of the secret will be made available in a file named after the - * secret under the mount point. - * - * Generated from protobuf field repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; - * @param array<\Google\Cloud\Functions\V1\SecretVolume\SecretVersion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V1\SecretVolume\SecretVersion::class); - $this->versions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume/SecretVersion.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume/SecretVersion.php deleted file mode 100644 index 02ed3c23ded0..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume/SecretVersion.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.functions.v1.SecretVolume.SecretVersion - */ -class SecretVersion extends \Google\Protobuf\Internal\Message -{ - /** - * Version of the secret (version number or the string 'latest'). It is - * preferrable to use `latest` version with secret volumes as secret value - * changes are reflected immediately. - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - /** - * Relative path of the file under the mount path where the secret value for - * this version will be fetched and made available. For example, setting the - * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the - * secret value file at `/etc/secrets/secret_foo`. - * - * Generated from protobuf field string path = 2; - */ - protected $path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Version of the secret (version number or the string 'latest'). It is - * preferrable to use `latest` version with secret volumes as secret value - * changes are reflected immediately. - * @type string $path - * Relative path of the file under the mount path where the secret value for - * this version will be fetched and made available. For example, setting the - * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the - * secret value file at `/etc/secrets/secret_foo`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Version of the secret (version number or the string 'latest'). It is - * preferrable to use `latest` version with secret volumes as secret value - * changes are reflected immediately. - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of the secret (version number or the string 'latest'). It is - * preferrable to use `latest` version with secret volumes as secret value - * changes are reflected immediately. - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Relative path of the file under the mount path where the secret value for - * this version will be fetched and made available. For example, setting the - * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the - * secret value file at `/etc/secrets/secret_foo`. - * - * Generated from protobuf field string path = 2; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Relative path of the file under the mount path where the secret value for - * this version will be fetched and made available. For example, setting the - * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the - * secret value file at `/etc/secrets/secret_foo`. - * - * 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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SecretVersion::class, \Google\Cloud\Functions\V1\SecretVolume_SecretVersion::class); - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume_SecretVersion.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume_SecretVersion.php deleted file mode 100644 index 6a33ad16f375..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/SecretVolume_SecretVersion.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.functions.v1.SourceRepository - */ -class SourceRepository extends \Google\Protobuf\Internal\Message -{ - /** - * The URL pointing to the hosted repository where the function is defined. - * There are supported Cloud Source Repository URLs in the following - * formats: - * To refer to a specific commit: - * `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` - * To refer to a moveable alias (branch): - * `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` - * In particular, to refer to HEAD use `master` moveable alias. - * To refer to a specific fixed alias (tag): - * `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` - * You may omit `paths/*` if you want to use the main directory. - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - /** - * Output only. The URL pointing to the hosted repository where the function - * were defined at the time of deployment. It always points to a specific - * commit in the format described above. - * - * Generated from protobuf field string deployed_url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $deployed_url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * The URL pointing to the hosted repository where the function is defined. - * There are supported Cloud Source Repository URLs in the following - * formats: - * To refer to a specific commit: - * `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` - * To refer to a moveable alias (branch): - * `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` - * In particular, to refer to HEAD use `master` moveable alias. - * To refer to a specific fixed alias (tag): - * `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` - * You may omit `paths/*` if you want to use the main directory. - * @type string $deployed_url - * Output only. The URL pointing to the hosted repository where the function - * were defined at the time of deployment. It always points to a specific - * commit in the format described above. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The URL pointing to the hosted repository where the function is defined. - * There are supported Cloud Source Repository URLs in the following - * formats: - * To refer to a specific commit: - * `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` - * To refer to a moveable alias (branch): - * `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` - * In particular, to refer to HEAD use `master` moveable alias. - * To refer to a specific fixed alias (tag): - * `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` - * You may omit `paths/*` if you want to use the main directory. - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The URL pointing to the hosted repository where the function is defined. - * There are supported Cloud Source Repository URLs in the following - * formats: - * To refer to a specific commit: - * `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` - * To refer to a moveable alias (branch): - * `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` - * In particular, to refer to HEAD use `master` moveable alias. - * To refer to a specific fixed alias (tag): - * `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` - * You may omit `paths/*` if you want to use the main directory. - * - * 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; - } - - /** - * Output only. The URL pointing to the hosted repository where the function - * were defined at the time of deployment. It always points to a specific - * commit in the format described above. - * - * Generated from protobuf field string deployed_url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDeployedUrl() - { - return $this->deployed_url; - } - - /** - * Output only. The URL pointing to the hosted repository where the function - * were defined at the time of deployment. It always points to a specific - * commit in the format described above. - * - * Generated from protobuf field string deployed_url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDeployedUrl($var) - { - GPBUtil::checkString($var, True); - $this->deployed_url = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/UpdateFunctionRequest.php b/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/UpdateFunctionRequest.php deleted file mode 100644 index 9d09690f55e7..000000000000 --- a/owl-bot-staging/Functions/v1/proto/src/Google/Cloud/Functions/V1/UpdateFunctionRequest.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.functions.v1.UpdateFunctionRequest - */ -class UpdateFunctionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. New version of the function. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunction function = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $function = null; - /** - * Required. The list of fields in `CloudFunction` that have to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Functions\V1\CloudFunction $function - * Required. New version of the function. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields in `CloudFunction` that have to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. New version of the function. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunction function = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Functions\V1\CloudFunction|null - */ - public function getFunction() - { - return $this->function; - } - - public function hasFunction() - { - return isset($this->function); - } - - public function clearFunction() - { - unset($this->function); - } - - /** - * Required. New version of the function. - * - * Generated from protobuf field .google.cloud.functions.v1.CloudFunction function = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Functions\V1\CloudFunction $var - * @return $this - */ - public function setFunction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V1\CloudFunction::class); - $this->function = $var; - - return $this; - } - - /** - * Required. The list of fields in `CloudFunction` that have to be updated. - * - * 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); - } - - /** - * Required. The list of fields in `CloudFunction` that have to be updated. - * - * 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/Functions/v1/samples/V1/CloudFunctionsServiceClient/call_function.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/call_function.php deleted file mode 100644 index edc277de9f19..000000000000 --- a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/call_function.php +++ /dev/null @@ -1,75 +0,0 @@ -callFunction($formattedName, $data); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudFunctionsServiceClient::cloudFunctionName( - '[PROJECT]', - '[LOCATION]', - '[FUNCTION]' - ); - $data = '[DATA]'; - - call_function_sample($formattedName, $data); -} -// [END cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/create_function.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/create_function.php deleted file mode 100644 index 198807c62088..000000000000 --- a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/create_function.php +++ /dev/null @@ -1,84 +0,0 @@ -createFunction($formattedLocation, $function); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CloudFunction $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedLocation = CloudFunctionsServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - create_function_sample($formattedLocation); -} -// [END cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/delete_function.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/delete_function.php deleted file mode 100644 index 2d0db28addc4..000000000000 --- a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/delete_function.php +++ /dev/null @@ -1,81 +0,0 @@ -deleteFunction($formattedName); - $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 = CloudFunctionsServiceClient::cloudFunctionName( - '[PROJECT]', - '[LOCATION]', - '[FUNCTION]' - ); - - delete_function_sample($formattedName); -} -// [END cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_download_url.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_download_url.php deleted file mode 100644 index baf1afdab994..000000000000 --- a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_download_url.php +++ /dev/null @@ -1,57 +0,0 @@ -generateDownloadUrl(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_upload_url.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_upload_url.php deleted file mode 100644 index 971a3299a9ca..000000000000 --- a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/generate_upload_url.php +++ /dev/null @@ -1,77 +0,0 @@ -generateUploadUrl(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_function.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_function.php deleted file mode 100644 index 3d4ea2574eee..000000000000 --- a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_function.php +++ /dev/null @@ -1,70 +0,0 @@ -getFunction($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudFunctionsServiceClient::cloudFunctionName( - '[PROJECT]', - '[LOCATION]', - '[FUNCTION]' - ); - - get_function_sample($formattedName); -} -// [END cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_iam_policy.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_iam_policy.php deleted file mode 100644 index cd081bf965fc..000000000000 --- a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/get_iam_policy.php +++ /dev/null @@ -1,68 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/list_functions.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/list_functions.php deleted file mode 100644 index 4c88d8657e18..000000000000 --- a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/list_functions.php +++ /dev/null @@ -1,58 +0,0 @@ -listFunctions(); - - /** @var CloudFunction $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 cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/set_iam_policy.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/set_iam_policy.php deleted file mode 100644 index f86b825bf887..000000000000 --- a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/set_iam_policy.php +++ /dev/null @@ -1,70 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/test_iam_permissions.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/test_iam_permissions.php deleted file mode 100644 index b7dff5dfed0b..000000000000 --- a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,77 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/update_function.php b/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/update_function.php deleted file mode 100644 index 9f8ea1e1fd6c..000000000000 --- a/owl-bot-staging/Functions/v1/samples/V1/CloudFunctionsServiceClient/update_function.php +++ /dev/null @@ -1,68 +0,0 @@ -updateFunction($function); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CloudFunction $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - 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 cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_sync] diff --git a/owl-bot-staging/Functions/v1/src/V1/CloudFunctionsServiceClient.php b/owl-bot-staging/Functions/v1/src/V1/CloudFunctionsServiceClient.php deleted file mode 100644 index 2760531c5365..000000000000 --- a/owl-bot-staging/Functions/v1/src/V1/CloudFunctionsServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ -cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - * $data = 'data'; - * $response = $cloudFunctionsServiceClient->callFunction($formattedName, $data); - * } finally { - * $cloudFunctionsServiceClient->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. - */ -class CloudFunctionsServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.functions.v1.CloudFunctionsService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'cloudfunctions.googleapis.com'; - - /** 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 $cloudFunctionNameTemplate; - - private static $cryptoKeyNameTemplate; - - private static $locationNameTemplate; - - private static $repositoryNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/cloud_functions_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_functions_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_functions_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/cloud_functions_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getCloudFunctionNameTemplate() - { - if (self::$cloudFunctionNameTemplate == null) { - self::$cloudFunctionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/functions/{function}'); - } - - return self::$cloudFunctionNameTemplate; - } - - private static function getCryptoKeyNameTemplate() - { - if (self::$cryptoKeyNameTemplate == null) { - self::$cryptoKeyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}'); - } - - return self::$cryptoKeyNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getRepositoryNameTemplate() - { - if (self::$repositoryNameTemplate == null) { - self::$repositoryNameTemplate = new PathTemplate('projects/{project}/locations/{location}/repositories/{repository}'); - } - - return self::$repositoryNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'cloudFunction' => self::getCloudFunctionNameTemplate(), - 'cryptoKey' => self::getCryptoKeyNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'repository' => self::getRepositoryNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * cloud_function resource. - * - * @param string $project - * @param string $location - * @param string $function - * - * @return string The formatted cloud_function resource. - */ - public static function cloudFunctionName($project, $location, $function) - { - return self::getCloudFunctionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'function' => $function, - ]); - } - - /** - * 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($project, $location, $keyRing, $cryptoKey) - { - return self::getCryptoKeyNameTemplate()->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($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a repository - * resource. - * - * @param string $project - * @param string $location - * @param string $repository - * - * @return string The formatted repository resource. - */ - public static function repositoryName($project, $location, $repository) - { - return self::getRepositoryNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'repository' => $repository, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cloudFunction: projects/{project}/locations/{location}/functions/{function} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - location: projects/{project}/locations/{location} - * - repository: projects/{project}/locations/{location}/repositories/{repository} - * - * 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"); - } - - /** - * 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; - } - - /** - * 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 'cloudfunctions.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Synchronously invokes a deployed Cloud Function. To be used for testing - * purposes as very limited traffic is allowed. For more information on - * the actual limits, refer to - * [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits). - * - * Sample code: - * ``` - * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); - * try { - * $formattedName = $cloudFunctionsServiceClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - * $data = 'data'; - * $response = $cloudFunctionsServiceClient->callFunction($formattedName, $data); - * } finally { - * $cloudFunctionsServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the function to be called. - * @param string $data Required. Input to be passed to the function. - * @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\Functions\V1\CallFunctionResponse - * - * @throws ApiException if the remote call fails - */ - public function callFunction($name, $data, array $optionalArgs = []) - { - $request = new CallFunctionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setData($data); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CallFunction', CallFunctionResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a new function. If a function with the given name already exists in - * the specified project, the long running operation will return - * `ALREADY_EXISTS` error. - * - * Sample code: - * ``` - * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); - * try { - * $formattedLocation = $cloudFunctionsServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $function = new CloudFunction(); - * $operationResponse = $cloudFunctionsServiceClient->createFunction($formattedLocation, $function); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $cloudFunctionsServiceClient->createFunction($formattedLocation, $function); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $cloudFunctionsServiceClient->resumeOperation($operationName, 'createFunction'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $cloudFunctionsServiceClient->close(); - * } - * ``` - * - * @param string $location Required. The project and location in which the function should be created, specified - * in the format `projects/*/locations/*` - * @param CloudFunction $function Required. Function to be created. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createFunction($location, $function, array $optionalArgs = []) - { - $request = new CreateFunctionRequest(); - $requestParamHeaders = []; - $request->setLocation($location); - $request->setFunction($function); - $requestParamHeaders['location'] = $location; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateFunction', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a function with the given name from the specified project. If the - * given function is used by some trigger, the trigger will be updated to - * remove this function. - * - * Sample code: - * ``` - * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); - * try { - * $formattedName = $cloudFunctionsServiceClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - * $operationResponse = $cloudFunctionsServiceClient->deleteFunction($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $cloudFunctionsServiceClient->deleteFunction($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $cloudFunctionsServiceClient->resumeOperation($operationName, 'deleteFunction'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $cloudFunctionsServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the function which should be deleted. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteFunction($name, array $optionalArgs = []) - { - $request = new DeleteFunctionRequest(); - $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->startOperationsCall('DeleteFunction', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Returns a signed URL for downloading deployed function source code. - * The URL is only valid for a limited period and should be used within - * minutes after generation. - * For more information about the signed URL usage see: - * https://cloud.google.com/storage/docs/access-control/signed-urls - * - * Sample code: - * ``` - * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); - * try { - * $response = $cloudFunctionsServiceClient->generateDownloadUrl(); - * } finally { - * $cloudFunctionsServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The name of function for which source code Google Cloud Storage signed - * URL should be generated. - * @type int $versionId - * The optional version of function. If not set, default, current version - * is used. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Functions\V1\GenerateDownloadUrlResponse - * - * @throws ApiException if the remote call fails - */ - public function generateDownloadUrl(array $optionalArgs = []) - { - $request = new GenerateDownloadUrlRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['versionId'])) { - $request->setVersionId($optionalArgs['versionId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateDownloadUrl', GenerateDownloadUrlResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns a signed URL for uploading a function source code. - * For more information about the signed URL usage see: - * https://cloud.google.com/storage/docs/access-control/signed-urls. - * Once the function source code upload is complete, the used signed - * URL should be provided in CreateFunction or UpdateFunction request - * as a reference to the function source code. - * - * When uploading source code to the generated signed URL, please follow - * these restrictions: - * - * * Source file type should be a zip file. - * * Source file size should not exceed 100MB limit. - * * No credentials should be attached - the signed URLs provide access to the - * target bucket using internal service identity; if credentials were - * attached, the identity from the credentials would be used, but that - * identity does not have permissions to upload files to the URL. - * - * When making a HTTP PUT request, these two headers need to be specified: - * - * * `content-type: application/zip` - * * `x-goog-content-length-range: 0,104857600` - * - * And this header SHOULD NOT be specified: - * - * * `Authorization: Bearer YOUR_TOKEN` - * - * Sample code: - * ``` - * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); - * try { - * $response = $cloudFunctionsServiceClient->generateUploadUrl(); - * } finally { - * $cloudFunctionsServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $parent - * The project and location in which the Google Cloud Storage signed URL - * should be generated, specified in the format `projects/*/locations/*`. - * @type string $kmsKeyName - * Resource name of a KMS crypto key (managed by the user) used to - * encrypt/decrypt function source code objects in staging Cloud Storage - * buckets. When you generate an upload url and upload your source code, it - * gets copied to a staging Cloud Storage bucket in an internal regional - * project. The source code is then copied to a versioned directory in the - * sources bucket in the consumer project during the function deployment. - * - * It must match the pattern - * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * The Google Cloud Functions service account - * (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter - * (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the - * Key/KeyRing/Project/Organization (least access preferred). GCF will - * delegate access to the Google Storage service account in the internal - * project. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Functions\V1\GenerateUploadUrlResponse - * - * @throws ApiException if the remote call fails - */ - public function generateUploadUrl(array $optionalArgs = []) - { - $request = new GenerateUploadUrlRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['parent'])) { - $request->setParent($optionalArgs['parent']); - $requestParamHeaders['parent'] = $optionalArgs['parent']; - } - - if (isset($optionalArgs['kmsKeyName'])) { - $request->setKmsKeyName($optionalArgs['kmsKeyName']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateUploadUrl', GenerateUploadUrlResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns a function with the given name from the requested project. - * - * Sample code: - * ``` - * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); - * try { - * $formattedName = $cloudFunctionsServiceClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - * $response = $cloudFunctionsServiceClient->getFunction($formattedName); - * } finally { - * $cloudFunctionsServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the function which details should be obtained. - * @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\Functions\V1\CloudFunction - * - * @throws ApiException if the remote call fails - */ - public function getFunction($name, array $optionalArgs = []) - { - $request = new GetFunctionRequest(); - $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('GetFunction', CloudFunction::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the IAM access control policy for a function. - * Returns an empty policy if the function exists and does not have a policy - * set. - * - * Sample code: - * ``` - * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); - * try { - * $resource = 'resource'; - * $response = $cloudFunctionsServiceClient->getIamPolicy($resource); - * } finally { - * $cloudFunctionsServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns a list of functions that belong to the requested project. - * - * Sample code: - * ``` - * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $cloudFunctionsServiceClient->listFunctions(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $cloudFunctionsServiceClient->listFunctions(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $cloudFunctionsServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $parent - * The project and location from which the function should be listed, - * specified in the format `projects/*/locations/*` - * If you want to list functions in all locations, use "-" in place of a - * location. When listing functions in all locations, if one or more - * location(s) are unreachable, the response will contain functions from all - * reachable locations along with the names of any unreachable locations. - * @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 listFunctions(array $optionalArgs = []) - { - $request = new ListFunctionsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['parent'])) { - $request->setParent($optionalArgs['parent']); - $requestParamHeaders['parent'] = $optionalArgs['parent']; - } - - 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('ListFunctions', $optionalArgs, ListFunctionsResponse::class, $request); - } - - /** - * Sets the IAM access control policy on the specified function. - * Replaces any existing policy. - * - * Sample code: - * ``` - * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $cloudFunctionsServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $cloudFunctionsServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - 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('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Tests the specified permissions against the IAM access control policy - * for a function. - * If the function does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * Sample code: - * ``` - * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $cloudFunctionsServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $cloudFunctionsServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @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\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates existing function. - * - * Sample code: - * ``` - * $cloudFunctionsServiceClient = new CloudFunctionsServiceClient(); - * try { - * $function = new CloudFunction(); - * $operationResponse = $cloudFunctionsServiceClient->updateFunction($function); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $cloudFunctionsServiceClient->updateFunction($function); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $cloudFunctionsServiceClient->resumeOperation($operationName, 'updateFunction'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $cloudFunctionsServiceClient->close(); - * } - * ``` - * - * @param CloudFunction $function Required. New version of the function. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Required. The list of fields in `CloudFunction` that have to be updated. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateFunction($function, array $optionalArgs = []) - { - $request = new UpdateFunctionRequest(); - $requestParamHeaders = []; - $request->setFunction($function); - $requestParamHeaders['function.name'] = $function->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->startOperationsCall('UpdateFunction', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/Functions/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Functions/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 0571f724aa05..000000000000 --- a/owl-bot-staging/Functions/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.functions.v1", - "libraryPackage": "Google\\Cloud\\Functions\\V1", - "services": { - "CloudFunctionsService": { - "clients": { - "grpc": { - "libraryClient": "CloudFunctionsServiceGapicClient", - "rpcs": { - "CallFunction": { - "methods": [ - "callFunction" - ] - }, - "CreateFunction": { - "methods": [ - "createFunction" - ] - }, - "DeleteFunction": { - "methods": [ - "deleteFunction" - ] - }, - "GenerateDownloadUrl": { - "methods": [ - "generateDownloadUrl" - ] - }, - "GenerateUploadUrl": { - "methods": [ - "generateUploadUrl" - ] - }, - "GetFunction": { - "methods": [ - "getFunction" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "ListFunctions": { - "methods": [ - "listFunctions" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateFunction": { - "methods": [ - "updateFunction" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_client_config.json b/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_client_config.json deleted file mode 100644 index ef89754d42df..000000000000 --- a/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_client_config.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "interfaces": { - "google.cloud.functions.v1.CloudFunctionsService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "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": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - }, - "no_retry_1_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": { - "CallFunction": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateFunction": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteFunction": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GenerateDownloadUrl": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GenerateUploadUrl": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetFunction": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListFunctions": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateFunction": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_descriptor_config.php b/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_descriptor_config.php deleted file mode 100644 index d908323e3be1..000000000000 --- a/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_descriptor_config.php +++ /dev/null @@ -1,48 +0,0 @@ - [ - 'google.cloud.functions.v1.CloudFunctionsService' => [ - 'CreateFunction' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Functions\V1\CloudFunction', - 'metadataReturnType' => '\Google\Cloud\Functions\V1\OperationMetadataV1', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteFunction' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Functions\V1\OperationMetadataV1', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateFunction' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Functions\V1\CloudFunction', - 'metadataReturnType' => '\Google\Cloud\Functions\V1\OperationMetadataV1', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListFunctions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFunctions', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_rest_client_config.php b/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_rest_client_config.php deleted file mode 100644 index 4ccbce38fd50..000000000000 --- a/owl-bot-staging/Functions/v1/src/V1/resources/cloud_functions_service_rest_client_config.php +++ /dev/null @@ -1,168 +0,0 @@ - [ - 'google.cloud.functions.v1.CloudFunctionsService' => [ - 'CallFunction' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/functions/*}:call', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateFunction' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{location=projects/*/locations/*}/functions', - 'body' => 'function', - 'placeholders' => [ - 'location' => [ - 'getters' => [ - 'getLocation', - ], - ], - ], - ], - 'DeleteFunction' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/functions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateDownloadUrl' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/functions/*}:generateDownloadUrl', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateUploadUrl' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/functions:generateUploadUrl', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetFunction' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/functions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/functions/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'ListFunctions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/functions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/functions/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/functions/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateFunction' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{function.name=projects/*/locations/*/functions/*}', - 'body' => 'function', - 'placeholders' => [ - 'function.name' => [ - 'getters' => [ - 'getFunction', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/operations', - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Functions/v1/tests/Unit/V1/CloudFunctionsServiceClientTest.php b/owl-bot-staging/Functions/v1/tests/Unit/V1/CloudFunctionsServiceClientTest.php deleted file mode 100644 index 49b419f2fcfc..000000000000 --- a/owl-bot-staging/Functions/v1/tests/Unit/V1/CloudFunctionsServiceClientTest.php +++ /dev/null @@ -1,1021 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CloudFunctionsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CloudFunctionsServiceClient($options); - } - - /** @test */ - public function callFunctionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $executionId = 'executionId-1217171550'; - $result = 'result-934426595'; - $error = 'error96784904'; - $expectedResponse = new CallFunctionResponse(); - $expectedResponse->setExecutionId($executionId); - $expectedResponse->setResult($result); - $expectedResponse->setError($error); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - $data = 'data3076010'; - $response = $gapicClient->callFunction($formattedName, $data); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/CallFunction', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getData(); - $this->assertProtobufEquals($data, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function callFunctionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - $data = 'data3076010'; - try { - $gapicClient->callFunction($formattedName, $data); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createFunctionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $sourceArchiveUrl = 'sourceArchiveUrl-289007026'; - $entryPoint = 'entryPoint-799136893'; - $runtime = 'runtime1550962648'; - $availableMemoryMb = 1964533661; - $serviceAccountEmail = 'serviceAccountEmail-1300473088'; - $versionId = 670497310; - $network = 'network1843485230'; - $maxInstances = 330682013; - $minInstances = 1491624145; - $vpcConnector = 'vpcConnector1732864119'; - $kmsKeyName = 'kmsKeyName2094986649'; - $buildWorkerPool = 'buildWorkerPool1575447532'; - $buildId = 'buildId-1430655860'; - $buildName = 'buildName-470597188'; - $sourceToken = 'sourceToken1671283925'; - $dockerRepository = 'dockerRepository-1273385271'; - $expectedResponse = new CloudFunction(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setSourceArchiveUrl($sourceArchiveUrl); - $expectedResponse->setEntryPoint($entryPoint); - $expectedResponse->setRuntime($runtime); - $expectedResponse->setAvailableMemoryMb($availableMemoryMb); - $expectedResponse->setServiceAccountEmail($serviceAccountEmail); - $expectedResponse->setVersionId($versionId); - $expectedResponse->setNetwork($network); - $expectedResponse->setMaxInstances($maxInstances); - $expectedResponse->setMinInstances($minInstances); - $expectedResponse->setVpcConnector($vpcConnector); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setBuildWorkerPool($buildWorkerPool); - $expectedResponse->setBuildId($buildId); - $expectedResponse->setBuildName($buildName); - $expectedResponse->setSourceToken($sourceToken); - $expectedResponse->setDockerRepository($dockerRepository); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createFunctionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $function = new CloudFunction(); - $response = $gapicClient->createFunction($formattedLocation, $function); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/CreateFunction', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getLocation(); - $this->assertProtobufEquals($formattedLocation, $actualValue); - $actualValue = $actualApiRequestObject->getFunction(); - $this->assertProtobufEquals($function, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createFunctionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createFunctionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $function = new CloudFunction(); - $response = $gapicClient->createFunction($formattedLocation, $function); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createFunctionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteFunctionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteFunctionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - $response = $gapicClient->deleteFunction($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/DeleteFunction', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFunctionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteFunctionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - $response = $gapicClient->deleteFunction($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFunctionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateDownloadUrlTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $downloadUrl = 'downloadUrl1109408056'; - $expectedResponse = new GenerateDownloadUrlResponse(); - $expectedResponse->setDownloadUrl($downloadUrl); - $transport->addResponse($expectedResponse); - $response = $gapicClient->generateDownloadUrl(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/GenerateDownloadUrl', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateDownloadUrlExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->generateDownloadUrl(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateUploadUrlTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $uploadUrl = 'uploadUrl-242738639'; - $expectedResponse = new GenerateUploadUrlResponse(); - $expectedResponse->setUploadUrl($uploadUrl); - $transport->addResponse($expectedResponse); - $response = $gapicClient->generateUploadUrl(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/GenerateUploadUrl', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateUploadUrlExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->generateUploadUrl(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFunctionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $sourceArchiveUrl = 'sourceArchiveUrl-289007026'; - $entryPoint = 'entryPoint-799136893'; - $runtime = 'runtime1550962648'; - $availableMemoryMb = 1964533661; - $serviceAccountEmail = 'serviceAccountEmail-1300473088'; - $versionId = 670497310; - $network = 'network1843485230'; - $maxInstances = 330682013; - $minInstances = 1491624145; - $vpcConnector = 'vpcConnector1732864119'; - $kmsKeyName = 'kmsKeyName2094986649'; - $buildWorkerPool = 'buildWorkerPool1575447532'; - $buildId = 'buildId-1430655860'; - $buildName = 'buildName-470597188'; - $sourceToken = 'sourceToken1671283925'; - $dockerRepository = 'dockerRepository-1273385271'; - $expectedResponse = new CloudFunction(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setSourceArchiveUrl($sourceArchiveUrl); - $expectedResponse->setEntryPoint($entryPoint); - $expectedResponse->setRuntime($runtime); - $expectedResponse->setAvailableMemoryMb($availableMemoryMb); - $expectedResponse->setServiceAccountEmail($serviceAccountEmail); - $expectedResponse->setVersionId($versionId); - $expectedResponse->setNetwork($network); - $expectedResponse->setMaxInstances($maxInstances); - $expectedResponse->setMinInstances($minInstances); - $expectedResponse->setVpcConnector($vpcConnector); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setBuildWorkerPool($buildWorkerPool); - $expectedResponse->setBuildId($buildId); - $expectedResponse->setBuildName($buildName); - $expectedResponse->setSourceToken($sourceToken); - $expectedResponse->setDockerRepository($dockerRepository); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - $response = $gapicClient->getFunction($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/GetFunction', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFunctionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cloudFunctionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - try { - $gapicClient->getFunction($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 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'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/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'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFunctionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $functionsElement = new CloudFunction(); - $functions = [ - $functionsElement, - ]; - $expectedResponse = new ListFunctionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFunctions($functions); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listFunctions(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFunctions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/ListFunctions', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFunctionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->listFunctions(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/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(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/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 = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateFunctionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $sourceArchiveUrl = 'sourceArchiveUrl-289007026'; - $entryPoint = 'entryPoint-799136893'; - $runtime = 'runtime1550962648'; - $availableMemoryMb = 1964533661; - $serviceAccountEmail = 'serviceAccountEmail-1300473088'; - $versionId = 670497310; - $network = 'network1843485230'; - $maxInstances = 330682013; - $minInstances = 1491624145; - $vpcConnector = 'vpcConnector1732864119'; - $kmsKeyName = 'kmsKeyName2094986649'; - $buildWorkerPool = 'buildWorkerPool1575447532'; - $buildId = 'buildId-1430655860'; - $buildName = 'buildName-470597188'; - $sourceToken = 'sourceToken1671283925'; - $dockerRepository = 'dockerRepository-1273385271'; - $expectedResponse = new CloudFunction(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setSourceArchiveUrl($sourceArchiveUrl); - $expectedResponse->setEntryPoint($entryPoint); - $expectedResponse->setRuntime($runtime); - $expectedResponse->setAvailableMemoryMb($availableMemoryMb); - $expectedResponse->setServiceAccountEmail($serviceAccountEmail); - $expectedResponse->setVersionId($versionId); - $expectedResponse->setNetwork($network); - $expectedResponse->setMaxInstances($maxInstances); - $expectedResponse->setMinInstances($minInstances); - $expectedResponse->setVpcConnector($vpcConnector); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setBuildWorkerPool($buildWorkerPool); - $expectedResponse->setBuildId($buildId); - $expectedResponse->setBuildName($buildName); - $expectedResponse->setSourceToken($sourceToken); - $expectedResponse->setDockerRepository($dockerRepository); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateFunctionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $function = new CloudFunction(); - $response = $gapicClient->updateFunction($function); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v1.CloudFunctionsService/UpdateFunction', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getFunction(); - $this->assertProtobufEquals($function, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFunctionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateFunctionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $function = new CloudFunction(); - $response = $gapicClient->updateFunction($function); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFunctionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Functions/v2/proto/src/GPBMetadata/Google/Cloud/Functions/V2/Functions.php b/owl-bot-staging/Functions/v2/proto/src/GPBMetadata/Google/Cloud/Functions/V2/Functions.php deleted file mode 100644 index 6d4a316f9ddca3f0a417ca237f166b0b0b52d925..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10714 zcmcIq&2!t<5f3Fx7MC(jKU*;^+YJr7wyfA>LMLt_e}WXGu%<|cq~toI4hoSFg%|=@ z0Fq zGnHyHqs*6@7m(DodrnKA%XDnJW9qq^`6!84BK*ZTlw8TvWzQ$rEThNS8M5+ z#adxW_q4X=X{(Ej!D^8*SY7ZLtghs50kllbbu+G!OrG$#7M} zGCV^wjUV7i?qt?A)76oB?^<8J3?-;qEq&%{hV!IrFLiA^`JId}QjIDD6|q{fJl(N0 zb9G*KTaMB7Y^R1x=jJ-P7pRcFnYk*qrRuo!nA|m1Wy`Xu7Et4JbGv8SWpNN;(KK|+I~>h|p_}c3zM*XywsSbrx-Q&h zXd%nC)p2^3WmuinYL`0c;SL$tPPVp(mo=bbXI;|V$FD%!G|N5=>{fpIwBVw34UAT5ejb<8Z-qXr zQyZ&m!pLHQV490gSsK82%4ycN_~fUL;1d^M6E!bZ_|gR{ zJYT(hf%K)W%cNtO*i4+M zE*#Uh@GPq57@dypq{kS8)hiJk6iU$K>&YD$qd7@Wk0W6+e>H;6S8BFF2@0cM$)n^w zNc6gxwsn=7A$^qXKJ7E{ZIlf{fK%OraZ_8GYZA>oNY3X zilaiP7+J2?(cN^MF^W7l6MKmhFgd2LLn6#I0i%!gZQ(1&U~Ee>dpbAt+{gzp>3cB7 zc#tVL(P+v|MP05mYD%%RP*UboZxDcSx!5eND5)5IUXV*=d_O{tL401Rm8*|RmBrL3 z`sBpCQdXMuuOlP@N0%!PD%FRT)Y#k)zm}iDWu}GQSmo}C!RBVM{N{XxklU!ZRtR0o}%7OsUtabyO{C?4ew* zQ1y+F2{=-!EL2mYQW1_dun?m+G#C^iNf=-2wI1u9uqgg*uTh1G*hL$4INqW0Oe1$x z`fUuLu6J$0VhR##j%KwsRF*~Pn)pX=5CRjP*5U7H#L{=C5S`eYn}(;l8yX8kz7m9O zRHH5AI0117x8USFjiBeX4Tr^G963!I7V6wn9lfJJWkEGj0GM#}EyG1wrC-EgTu4}; zk-$!^@{-CnN#r9_NLWoM`fW%sfdm68QX>D&2s`g;=%Y6Z6EMyRrO#rJ;$qbt82a?rMK1Blav(URKV(01(tq&1QOvKd=ti42Is~ptX{#i_Cme@Z?Pz3pM)lY z2xR2ckr9xvw8xEz1p*VRv#oY*Eau$1$-BOG(mb_ah)^rn9eDsJxI$HQ9ic`{l+-A1 zzm$4c^E}nwg~Suvd8|7qm2GmrEL?pdUxrHuAMhcgpa7PrFcm79>Xzmh+M0<8cbp~M z`w;?#v>Yy^D?SUJ%9r3o+r}t$(A&GVYoKp#GnbDS@?XiZ7xFcj)f~@Q*IFLNgW;lv z2Mt2~kyB3Jf-|9_J+Rly68zsLFo*Qj*BfwDRA}KJ5_6ApFpah!6hn}b({P-+h26tk zpd&D7yDa03ku;>VEzQ8%XVTKONsoGr<`1GBq~;?`&4max_X!-K=xHFE+EZ+eT#p7O zA`bLk<`83qelx7WZ<8q67(s}!)ooFLVqxyIMV7)qc_Ci{2|sDA78cb(WgtM|>&d5Z zzK?;bcQA}y)Q#sMoOhYEllkJ%XI$yF0`3aq)ex*m9a6}$pFItoWd4Jp*_SwjfM*Iu zdyat!0}aK4>O4#duTb&uRFA5@iFRd(GEOeTH#E~kNT#i?8!gqgR1>j^OY=ET;OP|d znjlMX4*dhWJazvNJ23>NVf5(n=;`Dhg_DfmmTmU1%BD{a%VC8PAg~FFOqvAeeZ8RS z!E}VduEW)pT2U=lD;1^KtkzX!v92^4YC~yKfYca(0jJ?)tzKH8*sCsA7L|rtt&|@j zC^!xYxm;G8b$MZ-R7{OXPvQ8WAv16eSw^u(q=sCo4^{jZnc{Bz&r+qS)GKnC?>0it z!s&qza%Em!ES3uhL~4kk!e;5qItV&KfPfbc1SZ^WqGn)a!SYWlJu4b<>8}))F_ywk z$YqncU03rq1gsc_^CC?!sPbWRL|}jEm1=+vf^|e&hl@2gr!S~bWoz8 z-4;tGF;am^)G~t&IK|?%FPXm)VVAHXvvo>avneS(ZH%C1TN@fCUz34`IMXcFQG_%H zX|~AMOKXq_u_NaoU00g*M{2EFE)@q6`FS|g_jSIi;yh4g?=W`W1k(4JzaPQqNHF<@ za^Hlw=Ak*)df0<KOsdemj2XJ zL$U<8wr4rIhF*oZ1vNi96Q_;RR1sf#y3fGZ(1!yWy2@045ia-*=^m(17ELRegP;{< zx*1M#?i`4|*Tt}ywpz?Tq@SXc%WOU|C}nsn>UM|ODi;hr=v+!jx_9Ui%nYSvn3~s3 zeXp)w&qzenL8;>$q6d{e zfoXrsdHabqaF*B8(hWGfFK=-m?6%ut%iSa4sOKb&t~zha&LS&#PX8kYN5%8NB$S@oaJ#0q&BqXQY#7JRlMVwrJTWEn zw_kBz90PT9nzEi~4jtILJZB7!Uui=;^!Qc!5lo7saQ3wPELWPPB}K(q+~VLY4)NeT zPLj&i+LBUfVm-nEl3cERB=eb3L21f3iW`TKMHz>1NdTPC)s-Rw%lXt84tSFDO0l}M zRBALz)e62Fm;O8gCxV*?|F()?EIHTNb!nxHdmoMNaxQlsPA zILSgvti$zu@*u_yr+f!M$jWZMvUqz!-a)uZE$k0nGybZ5rnk&i(%(nfwxgpq{|yGeA@oQ4sQ&3PA9f5q zU8Z&C2owDjq$)DHX#b!X=f`rrSz5qpG2*4gQUgI2chSOfsZ2-4IOA+6^_5alK`+HW zn)TA+qEbg!MULW&TCbMN1-bYD9Twk;CA)9OrOHbN))*udvSIwxso%3Ms#H;H^(yO< zP!60`V;IzMT8)Ct-bd^fx)H%HNU5xp>eUL3v4JyUye%pf^<920`j}6RGqHR`R|{P*U&?1W(KR2u1rLbgp35JDbnxw*??~kB zgVzMI1{wQTsF!|B7^#>3r9{7vR>{@Jp_I$l^or+n&b;--y)&i{*M{u9Hp z*N0OhHPgRzNX`6&YbH1QN|E?no`)%6?4Twon_X}Fa6a%n1}A(_7(izd)pPGz?VtBO zKSK7Ye)|xK;Qls?n|bLT^N*q9rXzlz6UaOlni82L+ILE2cBBPKK2(aupUm)|9EDiYLw$}TuQ0YH*$A=13;kofEJF)0iO^oie}~DR zCD(>Ai6antkZz|xelDM9F5rjjV4M4eoZaxet~-~@J$dp(oF=$a(t6$o|IyTSMCIPP z?Q9nQdlb&&o#MdhFPrS_$RvMK0nX870CVB z$mn8m;cMAG%*6|lgL?Xs+vwn$$I$WSI{0gQ=WF@V%WvIo4!aGzxx)?E|B<&bbUf+ql9-15W2;z{-Q+J8R>})U$6~34Zx? cjsG|>^jkvOpBSxuen-ew^56UIzz)Fw09RVLLI3~& diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/BuildConfig.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/BuildConfig.php deleted file mode 100644 index 54c9603ba859..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/BuildConfig.php +++ /dev/null @@ -1,442 +0,0 @@ -google.cloud.functions.v2.BuildConfig - */ -class BuildConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The Cloud Build name of the latest successful deployment of the - * function. - * - * Generated from protobuf field string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $build = ''; - /** - * The runtime in which to run the function. Required when deploying a new - * function, optional when updating an existing function. For a complete - * list of possible choices, see the - * [`gcloud` command - * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). - * - * Generated from protobuf field string runtime = 2; - */ - protected $runtime = ''; - /** - * The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * For Node.js this is name of a function exported by the module specified - * in `source_location`. - * - * Generated from protobuf field string entry_point = 3; - */ - protected $entry_point = ''; - /** - * The location of the function source code. - * - * Generated from protobuf field .google.cloud.functions.v2.Source source = 4; - */ - protected $source = null; - /** - * Output only. A permanent fixed identifier for source. - * - * Generated from protobuf field .google.cloud.functions.v2.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_provenance = null; - /** - * Name of the Cloud Build Custom Worker Pool that should be used to build the - * function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * {project} and {region} are the project id and region respectively where the - * worker pool is defined and {workerPool} is the short name of the worker - * pool. - * If the project id is not the same as the function, then the Cloud - * Functions Service Agent - * (service-@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role Cloud Build Custom Workers Builder - * (roles/cloudbuild.customworkers.builder) in the project. - * - * Generated from protobuf field string worker_pool = 5 [(.google.api.resource_reference) = { - */ - protected $worker_pool = ''; - /** - * User-provided build-time environment variables for the function - * - * Generated from protobuf field map environment_variables = 6; - */ - private $environment_variables; - /** - * Optional. User managed repository created in Artifact Registry optionally with a - * customer managed encryption key. This is the repository to which the - * function docker image will be pushed after it is built by Cloud Build. - * If unspecified, GCF will create and use a repository named 'gcf-artifacts' - * for every deployed region. - * It must match the pattern - * `projects/{project}/locations/{location}/repositories/{repository}`. - * Cross-project repositories are not supported. - * Cross-location repositories are not supported. - * Repository format must be 'DOCKER'. - * - * Generated from protobuf field string docker_repository = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $docker_repository = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $build - * Output only. The Cloud Build name of the latest successful deployment of the - * function. - * @type string $runtime - * The runtime in which to run the function. Required when deploying a new - * function, optional when updating an existing function. For a complete - * list of possible choices, see the - * [`gcloud` command - * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). - * @type string $entry_point - * The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * For Node.js this is name of a function exported by the module specified - * in `source_location`. - * @type \Google\Cloud\Functions\V2\Source $source - * The location of the function source code. - * @type \Google\Cloud\Functions\V2\SourceProvenance $source_provenance - * Output only. A permanent fixed identifier for source. - * @type string $worker_pool - * Name of the Cloud Build Custom Worker Pool that should be used to build the - * function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * {project} and {region} are the project id and region respectively where the - * worker pool is defined and {workerPool} is the short name of the worker - * pool. - * If the project id is not the same as the function, then the Cloud - * Functions Service Agent - * (service-@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role Cloud Build Custom Workers Builder - * (roles/cloudbuild.customworkers.builder) in the project. - * @type array|\Google\Protobuf\Internal\MapField $environment_variables - * User-provided build-time environment variables for the function - * @type string $docker_repository - * Optional. User managed repository created in Artifact Registry optionally with a - * customer managed encryption key. This is the repository to which the - * function docker image will be pushed after it is built by Cloud Build. - * If unspecified, GCF will create and use a repository named 'gcf-artifacts' - * for every deployed region. - * It must match the pattern - * `projects/{project}/locations/{location}/repositories/{repository}`. - * Cross-project repositories are not supported. - * Cross-location repositories are not supported. - * Repository format must be 'DOCKER'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The Cloud Build name of the latest successful deployment of the - * function. - * - * Generated from protobuf field string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getBuild() - { - return $this->build; - } - - /** - * Output only. The Cloud Build name of the latest successful deployment of the - * function. - * - * Generated from protobuf field string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBuild($var) - { - GPBUtil::checkString($var, True); - $this->build = $var; - - return $this; - } - - /** - * The runtime in which to run the function. Required when deploying a new - * function, optional when updating an existing function. For a complete - * list of possible choices, see the - * [`gcloud` command - * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). - * - * Generated from protobuf field string runtime = 2; - * @return string - */ - public function getRuntime() - { - return $this->runtime; - } - - /** - * The runtime in which to run the function. Required when deploying a new - * function, optional when updating an existing function. For a complete - * list of possible choices, see the - * [`gcloud` command - * reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). - * - * Generated from protobuf field string runtime = 2; - * @param string $var - * @return $this - */ - public function setRuntime($var) - { - GPBUtil::checkString($var, True); - $this->runtime = $var; - - return $this; - } - - /** - * The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * For Node.js this is name of a function exported by the module specified - * in `source_location`. - * - * Generated from protobuf field string entry_point = 3; - * @return string - */ - public function getEntryPoint() - { - return $this->entry_point; - } - - /** - * The name of the function (as defined in source code) that will be - * executed. Defaults to the resource name suffix, if not specified. For - * backward compatibility, if function with given name is not found, then the - * system will try to use function named "function". - * For Node.js this is name of a function exported by the module specified - * in `source_location`. - * - * Generated from protobuf field string entry_point = 3; - * @param string $var - * @return $this - */ - public function setEntryPoint($var) - { - GPBUtil::checkString($var, True); - $this->entry_point = $var; - - return $this; - } - - /** - * The location of the function source code. - * - * Generated from protobuf field .google.cloud.functions.v2.Source source = 4; - * @return \Google\Cloud\Functions\V2\Source|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * The location of the function source code. - * - * Generated from protobuf field .google.cloud.functions.v2.Source source = 4; - * @param \Google\Cloud\Functions\V2\Source $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\Source::class); - $this->source = $var; - - return $this; - } - - /** - * Output only. A permanent fixed identifier for source. - * - * Generated from protobuf field .google.cloud.functions.v2.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Functions\V2\SourceProvenance|null - */ - public function getSourceProvenance() - { - return $this->source_provenance; - } - - public function hasSourceProvenance() - { - return isset($this->source_provenance); - } - - public function clearSourceProvenance() - { - unset($this->source_provenance); - } - - /** - * Output only. A permanent fixed identifier for source. - * - * Generated from protobuf field .google.cloud.functions.v2.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Functions\V2\SourceProvenance $var - * @return $this - */ - public function setSourceProvenance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\SourceProvenance::class); - $this->source_provenance = $var; - - return $this; - } - - /** - * Name of the Cloud Build Custom Worker Pool that should be used to build the - * function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * {project} and {region} are the project id and region respectively where the - * worker pool is defined and {workerPool} is the short name of the worker - * pool. - * If the project id is not the same as the function, then the Cloud - * Functions Service Agent - * (service-@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role Cloud Build Custom Workers Builder - * (roles/cloudbuild.customworkers.builder) in the project. - * - * Generated from protobuf field string worker_pool = 5 [(.google.api.resource_reference) = { - * @return string - */ - public function getWorkerPool() - { - return $this->worker_pool; - } - - /** - * Name of the Cloud Build Custom Worker Pool that should be used to build the - * function. The format of this field is - * `projects/{project}/locations/{region}/workerPools/{workerPool}` where - * {project} and {region} are the project id and region respectively where the - * worker pool is defined and {workerPool} is the short name of the worker - * pool. - * If the project id is not the same as the function, then the Cloud - * Functions Service Agent - * (service-@gcf-admin-robot.iam.gserviceaccount.com) must be - * granted the role Cloud Build Custom Workers Builder - * (roles/cloudbuild.customworkers.builder) in the project. - * - * Generated from protobuf field string worker_pool = 5 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setWorkerPool($var) - { - GPBUtil::checkString($var, True); - $this->worker_pool = $var; - - return $this; - } - - /** - * User-provided build-time environment variables for the function - * - * Generated from protobuf field map environment_variables = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEnvironmentVariables() - { - return $this->environment_variables; - } - - /** - * User-provided build-time environment variables for the function - * - * Generated from protobuf field map environment_variables = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEnvironmentVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->environment_variables = $arr; - - return $this; - } - - /** - * Optional. User managed repository created in Artifact Registry optionally with a - * customer managed encryption key. This is the repository to which the - * function docker image will be pushed after it is built by Cloud Build. - * If unspecified, GCF will create and use a repository named 'gcf-artifacts' - * for every deployed region. - * It must match the pattern - * `projects/{project}/locations/{location}/repositories/{repository}`. - * Cross-project repositories are not supported. - * Cross-location repositories are not supported. - * Repository format must be 'DOCKER'. - * - * Generated from protobuf field string docker_repository = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getDockerRepository() - { - return $this->docker_repository; - } - - /** - * Optional. User managed repository created in Artifact Registry optionally with a - * customer managed encryption key. This is the repository to which the - * function docker image will be pushed after it is built by Cloud Build. - * If unspecified, GCF will create and use a repository named 'gcf-artifacts' - * for every deployed region. - * It must match the pattern - * `projects/{project}/locations/{location}/repositories/{repository}`. - * Cross-project repositories are not supported. - * Cross-location repositories are not supported. - * Repository format must be 'DOCKER'. - * - * Generated from protobuf field string docker_repository = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDockerRepository($var) - { - GPBUtil::checkString($var, True); - $this->docker_repository = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/CreateFunctionRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/CreateFunctionRequest.php deleted file mode 100644 index 5b43acc2c855..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/CreateFunctionRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.functions.v2.CreateFunctionRequest - */ -class CreateFunctionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location in which the function should be created, specified - * in the format `projects/*/locations/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Function to be created. - * - * Generated from protobuf field .google.cloud.functions.v2.Function function = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $function = null; - /** - * The ID to use for the function, which will become the final component of - * the function's resource name. - * This value should be 4-63 characters, and valid characters - * are /[a-z][0-9]-/. - * - * Generated from protobuf field string function_id = 3; - */ - protected $function_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location in which the function should be created, specified - * in the format `projects/*/locations/*` - * @type \Google\Cloud\Functions\V2\PBFunction $function - * Required. Function to be created. - * @type string $function_id - * The ID to use for the function, which will become the final component of - * the function's resource name. - * This value should be 4-63 characters, and valid characters - * are /[a-z][0-9]-/. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location in which the function should be created, 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 in which the function should be created, 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; - } - - /** - * Required. Function to be created. - * - * Generated from protobuf field .google.cloud.functions.v2.Function function = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Functions\V2\PBFunction|null - */ - public function getFunction() - { - return $this->function; - } - - public function hasFunction() - { - return isset($this->function); - } - - public function clearFunction() - { - unset($this->function); - } - - /** - * Required. Function to be created. - * - * Generated from protobuf field .google.cloud.functions.v2.Function function = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Functions\V2\PBFunction $var - * @return $this - */ - public function setFunction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\PBFunction::class); - $this->function = $var; - - return $this; - } - - /** - * The ID to use for the function, which will become the final component of - * the function's resource name. - * This value should be 4-63 characters, and valid characters - * are /[a-z][0-9]-/. - * - * Generated from protobuf field string function_id = 3; - * @return string - */ - public function getFunctionId() - { - return $this->function_id; - } - - /** - * The ID to use for the function, which will become the final component of - * the function's resource name. - * This value should be 4-63 characters, and valid characters - * are /[a-z][0-9]-/. - * - * Generated from protobuf field string function_id = 3; - * @param string $var - * @return $this - */ - public function setFunctionId($var) - { - GPBUtil::checkString($var, True); - $this->function_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/DeleteFunctionRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/DeleteFunctionRequest.php deleted file mode 100644 index dded725ad3ae..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/DeleteFunctionRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.functions.v2.DeleteFunctionRequest - */ -class DeleteFunctionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the function which should be deleted. - * - * 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 name of the function which should be deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the function which should 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 function which should 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/Functions/v2/proto/src/Google/Cloud/Functions/V2/Environment.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Environment.php deleted file mode 100644 index a1fd8153a794..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Environment.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.functions.v2.Environment - */ -class Environment -{ - /** - * Unspecified - * - * Generated from protobuf enum ENVIRONMENT_UNSPECIFIED = 0; - */ - const ENVIRONMENT_UNSPECIFIED = 0; - /** - * Gen 1 - * - * Generated from protobuf enum GEN_1 = 1; - */ - const GEN_1 = 1; - /** - * Gen 2 - * - * Generated from protobuf enum GEN_2 = 2; - */ - const GEN_2 = 2; - - private static $valueToName = [ - self::ENVIRONMENT_UNSPECIFIED => 'ENVIRONMENT_UNSPECIFIED', - self::GEN_1 => 'GEN_1', - self::GEN_2 => 'GEN_2', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventFilter.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventFilter.php deleted file mode 100644 index 15ec540f1dd6..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventFilter.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.functions.v2.EventFilter - */ -class EventFilter extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of a CloudEvents attribute. - * - * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $attribute = ''; - /** - * Required. The value for the attribute. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $value = ''; - /** - * Optional. The operator used for matching the events with the value of the - * filter. If not specified, only events that have an exact key-value pair - * specified in the filter are matched. The only allowed value is - * `match-path-pattern`. - * - * Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $operator = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $attribute - * Required. The name of a CloudEvents attribute. - * @type string $value - * Required. The value for the attribute. - * @type string $operator - * Optional. The operator used for matching the events with the value of the - * filter. If not specified, only events that have an exact key-value pair - * specified in the filter are matched. The only allowed value is - * `match-path-pattern`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of a CloudEvents attribute. - * - * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAttribute() - { - return $this->attribute; - } - - /** - * Required. The name of a CloudEvents attribute. - * - * Generated from protobuf field string attribute = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAttribute($var) - { - GPBUtil::checkString($var, True); - $this->attribute = $var; - - return $this; - } - - /** - * Required. The value for the attribute. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Required. The value for the attribute. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * Optional. The operator used for matching the events with the value of the - * filter. If not specified, only events that have an exact key-value pair - * specified in the filter are matched. The only allowed value is - * `match-path-pattern`. - * - * Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOperator() - { - return $this->operator; - } - - /** - * Optional. The operator used for matching the events with the value of the - * filter. If not specified, only events that have an exact key-value pair - * specified in the filter are matched. The only allowed value is - * `match-path-pattern`. - * - * Generated from protobuf field string operator = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOperator($var) - { - GPBUtil::checkString($var, True); - $this->operator = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger.php deleted file mode 100644 index dba1a3fd15bf..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger.php +++ /dev/null @@ -1,374 +0,0 @@ -google.cloud.functions.v2.EventTrigger - */ -class EventTrigger extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the Eventarc trigger. The format of this field is - * `projects/{project}/locations/{region}/triggers/{trigger}`. - * - * Generated from protobuf field string trigger = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $trigger = ''; - /** - * The region that the trigger will be in. The trigger will only receive - * events originating in this region. It can be the same - * region as the function, a different region or multi-region, or the global - * region. If not provided, defaults to the same region as the function. - * - * Generated from protobuf field string trigger_region = 2; - */ - protected $trigger_region = ''; - /** - * Required. The type of event to observe. For example: - * `google.cloud.audit.log.v1.written` or - * `google.cloud.pubsub.topic.v1.messagePublished`. - * - * Generated from protobuf field string event_type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event_type = ''; - /** - * Criteria used to filter events. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.EventFilter event_filters = 4; - */ - private $event_filters; - /** - * Optional. The name of a Pub/Sub topic in the same project that will be used - * as the transport topic for the event delivery. Format: - * `projects/{project}/topics/{topic}`. - * This is only valid for events of type - * `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here - * will not be deleted at function deletion. - * - * Generated from protobuf field string pubsub_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $pubsub_topic = ''; - /** - * Optional. The email of the trigger's service account. The service account must have - * permission to invoke Cloud Run services, the permission is - * `run.routes.invoke`. - * If empty, defaults to the Compute Engine default service account: - * `{project_number}-compute@developer.gserviceaccount.com`. - * - * Generated from protobuf field string service_account_email = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_account_email = ''; - /** - * Optional. If unset, then defaults to ignoring failures (i.e. not retrying them). - * - * Generated from protobuf field .google.cloud.functions.v2.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $retry_policy = 0; - /** - * Optional. The name of the channel associated with the trigger in - * `projects/{project}/locations/{location}/channels/{channel}` format. - * You must provide a channel to receive events from Eventarc SaaS partners. - * - * Generated from protobuf field string channel = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $channel = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $trigger - * Output only. The resource name of the Eventarc trigger. The format of this field is - * `projects/{project}/locations/{region}/triggers/{trigger}`. - * @type string $trigger_region - * The region that the trigger will be in. The trigger will only receive - * events originating in this region. It can be the same - * region as the function, a different region or multi-region, or the global - * region. If not provided, defaults to the same region as the function. - * @type string $event_type - * Required. The type of event to observe. For example: - * `google.cloud.audit.log.v1.written` or - * `google.cloud.pubsub.topic.v1.messagePublished`. - * @type array<\Google\Cloud\Functions\V2\EventFilter>|\Google\Protobuf\Internal\RepeatedField $event_filters - * Criteria used to filter events. - * @type string $pubsub_topic - * Optional. The name of a Pub/Sub topic in the same project that will be used - * as the transport topic for the event delivery. Format: - * `projects/{project}/topics/{topic}`. - * This is only valid for events of type - * `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here - * will not be deleted at function deletion. - * @type string $service_account_email - * Optional. The email of the trigger's service account. The service account must have - * permission to invoke Cloud Run services, the permission is - * `run.routes.invoke`. - * If empty, defaults to the Compute Engine default service account: - * `{project_number}-compute@developer.gserviceaccount.com`. - * @type int $retry_policy - * Optional. If unset, then defaults to ignoring failures (i.e. not retrying them). - * @type string $channel - * Optional. The name of the channel associated with the trigger in - * `projects/{project}/locations/{location}/channels/{channel}` format. - * You must provide a channel to receive events from Eventarc SaaS partners. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the Eventarc trigger. The format of this field is - * `projects/{project}/locations/{region}/triggers/{trigger}`. - * - * Generated from protobuf field string trigger = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getTrigger() - { - return $this->trigger; - } - - /** - * Output only. The resource name of the Eventarc trigger. The format of this field is - * `projects/{project}/locations/{region}/triggers/{trigger}`. - * - * Generated from protobuf field string trigger = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTrigger($var) - { - GPBUtil::checkString($var, True); - $this->trigger = $var; - - return $this; - } - - /** - * The region that the trigger will be in. The trigger will only receive - * events originating in this region. It can be the same - * region as the function, a different region or multi-region, or the global - * region. If not provided, defaults to the same region as the function. - * - * Generated from protobuf field string trigger_region = 2; - * @return string - */ - public function getTriggerRegion() - { - return $this->trigger_region; - } - - /** - * The region that the trigger will be in. The trigger will only receive - * events originating in this region. It can be the same - * region as the function, a different region or multi-region, or the global - * region. If not provided, defaults to the same region as the function. - * - * Generated from protobuf field string trigger_region = 2; - * @param string $var - * @return $this - */ - public function setTriggerRegion($var) - { - GPBUtil::checkString($var, True); - $this->trigger_region = $var; - - return $this; - } - - /** - * Required. The type of event to observe. For example: - * `google.cloud.audit.log.v1.written` or - * `google.cloud.pubsub.topic.v1.messagePublished`. - * - * Generated from protobuf field string event_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEventType() - { - return $this->event_type; - } - - /** - * Required. The type of event to observe. For example: - * `google.cloud.audit.log.v1.written` or - * `google.cloud.pubsub.topic.v1.messagePublished`. - * - * Generated from protobuf field string event_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEventType($var) - { - GPBUtil::checkString($var, True); - $this->event_type = $var; - - return $this; - } - - /** - * Criteria used to filter events. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.EventFilter event_filters = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEventFilters() - { - return $this->event_filters; - } - - /** - * Criteria used to filter events. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.EventFilter event_filters = 4; - * @param array<\Google\Cloud\Functions\V2\EventFilter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEventFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\EventFilter::class); - $this->event_filters = $arr; - - return $this; - } - - /** - * Optional. The name of a Pub/Sub topic in the same project that will be used - * as the transport topic for the event delivery. Format: - * `projects/{project}/topics/{topic}`. - * This is only valid for events of type - * `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here - * will not be deleted at function deletion. - * - * Generated from protobuf field string pubsub_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getPubsubTopic() - { - return $this->pubsub_topic; - } - - /** - * Optional. The name of a Pub/Sub topic in the same project that will be used - * as the transport topic for the event delivery. Format: - * `projects/{project}/topics/{topic}`. - * This is only valid for events of type - * `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here - * will not be deleted at function deletion. - * - * Generated from protobuf field string pubsub_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPubsubTopic($var) - { - GPBUtil::checkString($var, True); - $this->pubsub_topic = $var; - - return $this; - } - - /** - * Optional. The email of the trigger's service account. The service account must have - * permission to invoke Cloud Run services, the permission is - * `run.routes.invoke`. - * If empty, defaults to the Compute Engine default service account: - * `{project_number}-compute@developer.gserviceaccount.com`. - * - * Generated from protobuf field string service_account_email = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServiceAccountEmail() - { - return $this->service_account_email; - } - - /** - * Optional. The email of the trigger's service account. The service account must have - * permission to invoke Cloud Run services, the permission is - * `run.routes.invoke`. - * If empty, defaults to the Compute Engine default service account: - * `{project_number}-compute@developer.gserviceaccount.com`. - * - * Generated from protobuf field string service_account_email = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->service_account_email = $var; - - return $this; - } - - /** - * Optional. If unset, then defaults to ignoring failures (i.e. not retrying them). - * - * Generated from protobuf field .google.cloud.functions.v2.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getRetryPolicy() - { - return $this->retry_policy; - } - - /** - * Optional. If unset, then defaults to ignoring failures (i.e. not retrying them). - * - * Generated from protobuf field .google.cloud.functions.v2.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setRetryPolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\EventTrigger\RetryPolicy::class); - $this->retry_policy = $var; - - return $this; - } - - /** - * Optional. The name of the channel associated with the trigger in - * `projects/{project}/locations/{location}/channels/{channel}` format. - * You must provide a channel to receive events from Eventarc SaaS partners. - * - * Generated from protobuf field string channel = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getChannel() - { - return $this->channel; - } - - /** - * Optional. The name of the channel associated with the trigger in - * `projects/{project}/locations/{location}/channels/{channel}` format. - * You must provide a channel to receive events from Eventarc SaaS partners. - * - * Generated from protobuf field string channel = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkString($var, True); - $this->channel = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger/RetryPolicy.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger/RetryPolicy.php deleted file mode 100644 index fe9035ebeee4..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger/RetryPolicy.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.functions.v2.EventTrigger.RetryPolicy - */ -class RetryPolicy -{ - /** - * Not specified. - * - * Generated from protobuf enum RETRY_POLICY_UNSPECIFIED = 0; - */ - const RETRY_POLICY_UNSPECIFIED = 0; - /** - * Do not retry. - * - * Generated from protobuf enum RETRY_POLICY_DO_NOT_RETRY = 1; - */ - const RETRY_POLICY_DO_NOT_RETRY = 1; - /** - * Retry on any failure, retry up to 7 days with an exponential backoff - * (capped at 10 seconds). - * - * Generated from protobuf enum RETRY_POLICY_RETRY = 2; - */ - const RETRY_POLICY_RETRY = 2; - - private static $valueToName = [ - self::RETRY_POLICY_UNSPECIFIED => 'RETRY_POLICY_UNSPECIFIED', - self::RETRY_POLICY_DO_NOT_RETRY => 'RETRY_POLICY_DO_NOT_RETRY', - self::RETRY_POLICY_RETRY => 'RETRY_POLICY_RETRY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RetryPolicy::class, \Google\Cloud\Functions\V2\EventTrigger_RetryPolicy::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger_RetryPolicy.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger_RetryPolicy.php deleted file mode 100644 index 9151d76491e1..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/EventTrigger_RetryPolicy.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.functions.v2.FunctionService/GetFunction', - $argument, - ['\Google\Cloud\Functions\V2\PBFunction', 'decode'], - $metadata, $options); - } - - /** - * Returns a list of functions that belong to the requested project. - * @param \Google\Cloud\Functions\V2\ListFunctionsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListFunctions(\Google\Cloud\Functions\V2\ListFunctionsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v2.FunctionService/ListFunctions', - $argument, - ['\Google\Cloud\Functions\V2\ListFunctionsResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates a new function. If a function with the given name already exists in - * the specified project, the long running operation will return - * `ALREADY_EXISTS` error. - * @param \Google\Cloud\Functions\V2\CreateFunctionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateFunction(\Google\Cloud\Functions\V2\CreateFunctionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v2.FunctionService/CreateFunction', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates existing function. - * @param \Google\Cloud\Functions\V2\UpdateFunctionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateFunction(\Google\Cloud\Functions\V2\UpdateFunctionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v2.FunctionService/UpdateFunction', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a function with the given name from the specified project. If the - * given function is used by some trigger, the trigger will be updated to - * remove this function. - * @param \Google\Cloud\Functions\V2\DeleteFunctionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteFunction(\Google\Cloud\Functions\V2\DeleteFunctionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v2.FunctionService/DeleteFunction', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Returns a signed URL for uploading a function source code. - * For more information about the signed URL usage see: - * https://cloud.google.com/storage/docs/access-control/signed-urls. - * Once the function source code upload is complete, the used signed - * URL should be provided in CreateFunction or UpdateFunction request - * as a reference to the function source code. - * - * When uploading source code to the generated signed URL, please follow - * these restrictions: - * - * * Source file type should be a zip file. - * * No credentials should be attached - the signed URLs provide access to the - * target bucket using internal service identity; if credentials were - * attached, the identity from the credentials would be used, but that - * identity does not have permissions to upload files to the URL. - * - * When making a HTTP PUT request, these two headers need to be specified: - * - * * `content-type: application/zip` - * - * And this header SHOULD NOT be specified: - * - * * `Authorization: Bearer YOUR_TOKEN` - * @param \Google\Cloud\Functions\V2\GenerateUploadUrlRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GenerateUploadUrl(\Google\Cloud\Functions\V2\GenerateUploadUrlRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v2.FunctionService/GenerateUploadUrl', - $argument, - ['\Google\Cloud\Functions\V2\GenerateUploadUrlResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns a signed URL for downloading deployed function source code. - * The URL is only valid for a limited period and should be used within - * 30 minutes of generation. - * For more information about the signed URL usage see: - * https://cloud.google.com/storage/docs/access-control/signed-urls - * @param \Google\Cloud\Functions\V2\GenerateDownloadUrlRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GenerateDownloadUrl(\Google\Cloud\Functions\V2\GenerateDownloadUrlRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v2.FunctionService/GenerateDownloadUrl', - $argument, - ['\Google\Cloud\Functions\V2\GenerateDownloadUrlResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns a list of runtimes that are supported for the requested project. - * @param \Google\Cloud\Functions\V2\ListRuntimesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListRuntimes(\Google\Cloud\Functions\V2\ListRuntimesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.functions.v2.FunctionService/ListRuntimes', - $argument, - ['\Google\Cloud\Functions\V2\ListRuntimesResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Function_State.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Function_State.php deleted file mode 100644 index 1534eb8d1b1d..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Function_State.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.functions.v2.GenerateDownloadUrlRequest - */ -class GenerateDownloadUrlRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of function for which source code Google Cloud Storage signed - * URL should be generated. - * - * 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 name of function for which source code Google Cloud Storage signed - * URL should be generated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of function for which source code Google Cloud Storage signed - * URL should be generated. - * - * Generated 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 function for which source code Google Cloud Storage signed - * URL should be generated. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlResponse.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlResponse.php deleted file mode 100644 index c49cbe0ed3f5..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateDownloadUrlResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.functions.v2.GenerateDownloadUrlResponse - */ -class GenerateDownloadUrlResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The generated Google Cloud Storage signed URL that should be used for - * function source code download. - * - * Generated from protobuf field string download_url = 1; - */ - protected $download_url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $download_url - * The generated Google Cloud Storage signed URL that should be used for - * function source code download. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The generated Google Cloud Storage signed URL that should be used for - * function source code download. - * - * Generated from protobuf field string download_url = 1; - * @return string - */ - public function getDownloadUrl() - { - return $this->download_url; - } - - /** - * The generated Google Cloud Storage signed URL that should be used for - * function source code download. - * - * Generated from protobuf field string download_url = 1; - * @param string $var - * @return $this - */ - public function setDownloadUrl($var) - { - GPBUtil::checkString($var, True); - $this->download_url = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlRequest.php deleted file mode 100644 index c21ddc7808a2..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.functions.v2.GenerateUploadUrlRequest - */ -class GenerateUploadUrlRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location in which the Google Cloud Storage signed URL - * should be generated, specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location in which the Google Cloud Storage signed URL - * should be generated, specified in the format `projects/*/locations/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location in which the Google Cloud Storage signed URL - * should be generated, 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 in which the Google Cloud Storage signed URL - * should be generated, 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; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlResponse.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlResponse.php deleted file mode 100644 index ec4ee0a82cfa..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GenerateUploadUrlResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.functions.v2.GenerateUploadUrlResponse - */ -class GenerateUploadUrlResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The generated Google Cloud Storage signed URL that should be used for a - * function source code upload. The uploaded file should be a zip archive - * which contains a function. - * - * Generated from protobuf field string upload_url = 1; - */ - protected $upload_url = ''; - /** - * The location of the source code in the upload bucket. - * Once the archive is uploaded using the `upload_url` use this field to - * set the `function.build_config.source.storage_source` - * during CreateFunction and UpdateFunction. - * Generation defaults to 0, as Cloud Storage provides a new generation only - * upon uploading a new object or version of an object. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource storage_source = 2; - */ - protected $storage_source = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $upload_url - * The generated Google Cloud Storage signed URL that should be used for a - * function source code upload. The uploaded file should be a zip archive - * which contains a function. - * @type \Google\Cloud\Functions\V2\StorageSource $storage_source - * The location of the source code in the upload bucket. - * Once the archive is uploaded using the `upload_url` use this field to - * set the `function.build_config.source.storage_source` - * during CreateFunction and UpdateFunction. - * Generation defaults to 0, as Cloud Storage provides a new generation only - * upon uploading a new object or version of an object. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The generated Google Cloud Storage signed URL that should be used for a - * function source code upload. The uploaded file should be a zip archive - * which contains a function. - * - * Generated from protobuf field string upload_url = 1; - * @return string - */ - public function getUploadUrl() - { - return $this->upload_url; - } - - /** - * The generated Google Cloud Storage signed URL that should be used for a - * function source code upload. The uploaded file should be a zip archive - * which contains a function. - * - * Generated from protobuf field string upload_url = 1; - * @param string $var - * @return $this - */ - public function setUploadUrl($var) - { - GPBUtil::checkString($var, True); - $this->upload_url = $var; - - return $this; - } - - /** - * The location of the source code in the upload bucket. - * Once the archive is uploaded using the `upload_url` use this field to - * set the `function.build_config.source.storage_source` - * during CreateFunction and UpdateFunction. - * Generation defaults to 0, as Cloud Storage provides a new generation only - * upon uploading a new object or version of an object. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource storage_source = 2; - * @return \Google\Cloud\Functions\V2\StorageSource|null - */ - public function getStorageSource() - { - return $this->storage_source; - } - - public function hasStorageSource() - { - return isset($this->storage_source); - } - - public function clearStorageSource() - { - unset($this->storage_source); - } - - /** - * The location of the source code in the upload bucket. - * Once the archive is uploaded using the `upload_url` use this field to - * set the `function.build_config.source.storage_source` - * during CreateFunction and UpdateFunction. - * Generation defaults to 0, as Cloud Storage provides a new generation only - * upon uploading a new object or version of an object. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource storage_source = 2; - * @param \Google\Cloud\Functions\V2\StorageSource $var - * @return $this - */ - public function setStorageSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\StorageSource::class); - $this->storage_source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GetFunctionRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GetFunctionRequest.php deleted file mode 100644 index 06f63b7331af..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/GetFunctionRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.functions.v2.GetFunctionRequest - */ -class GetFunctionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the function which details should be obtained. - * - * 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 name of the function which details should be obtained. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the function which details should be obtained. - * - * Generated 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 function which details should be obtained. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsRequest.php deleted file mode 100644 index dcc1a6056520..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.functions.v2.ListFunctionsRequest - */ -class ListFunctionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the function should be listed, - * specified in the format `projects/*/locations/*` - * If you want to list functions in all locations, use "-" in place of a - * location. When listing functions in all locations, if one or more - * location(s) are unreachable, the response will contain functions from all - * reachable locations along with the names of any unreachable locations. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of functions to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last - * `ListFunctionsResponse`; indicates that - * this is a continuation of a prior `ListFunctions` call, and that the - * system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter for Functions that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * The sorting order of the resources returned. Value should be a comma - * separated list of fields. The default sorting oder is ascending. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the function should be listed, - * specified in the format `projects/*/locations/*` - * If you want to list functions in all locations, use "-" in place of a - * location. When listing functions in all locations, if one or more - * location(s) are unreachable, the response will contain functions from all - * reachable locations along with the names of any unreachable locations. - * @type int $page_size - * Maximum number of functions to return per call. - * @type string $page_token - * The value returned by the last - * `ListFunctionsResponse`; indicates that - * this is a continuation of a prior `ListFunctions` call, and that the - * system should return the next page of data. - * @type string $filter - * The filter for Functions that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * @type string $order_by - * The sorting order of the resources returned. Value should be a comma - * separated list of fields. The default sorting oder is ascending. - * See https://google.aip.dev/132#ordering. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the function should be listed, - * specified in the format `projects/*/locations/*` - * If you want to list functions in all locations, use "-" in place of a - * location. When listing functions in all locations, if one or more - * location(s) are unreachable, the response will contain functions from all - * reachable locations along with the names of any unreachable 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 function should be listed, - * specified in the format `projects/*/locations/*` - * If you want to list functions in all locations, use "-" in place of a - * location. When listing functions in all locations, if one or more - * location(s) are unreachable, the response will contain functions from all - * reachable locations along with the names of any unreachable 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 functions to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of functions 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 - * `ListFunctionsResponse`; indicates that - * this is a continuation of a prior `ListFunctions` 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 - * `ListFunctionsResponse`; indicates that - * this is a continuation of a prior `ListFunctions` 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; - } - - /** - * The filter for Functions that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter for Functions that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * - * 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; - } - - /** - * The sorting order of the resources returned. Value should be a comma - * separated list of fields. The default sorting oder is ascending. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * The sorting order of the resources returned. Value should be a comma - * separated list of fields. The default sorting oder is ascending. - * See https://google.aip.dev/132#ordering. - * - * 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/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsResponse.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsResponse.php deleted file mode 100644 index edfa21aa7abe..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListFunctionsResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.functions.v2.ListFunctionsResponse - */ -class ListFunctionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The functions that match the request. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.Function functions = 1; - */ - private $functions; - /** - * A token, which 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. The response does not include any - * functions from these locations. - * - * 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\Functions\V2\PBFunction>|\Google\Protobuf\Internal\RepeatedField $functions - * The functions that match the request. - * @type string $next_page_token - * A token, which 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. The response does not include any - * functions from these locations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The functions that match the request. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.Function functions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFunctions() - { - return $this->functions; - } - - /** - * The functions that match the request. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.Function functions = 1; - * @param array<\Google\Cloud\Functions\V2\PBFunction>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFunctions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\PBFunction::class); - $this->functions = $arr; - - return $this; - } - - /** - * A token, which 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, which 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. The response does not include any - * functions from these locations. - * - * 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. The response does not include any - * functions from these locations. - * - * 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/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesRequest.php deleted file mode 100644 index 314ecc916c6c..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesRequest.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.functions.v2.ListRuntimesRequest - */ -class ListRuntimesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the runtimes 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 = ''; - /** - * The filter for Runtimes that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the runtimes should be listed, - * specified in the format `projects/*/locations/*` - * @type string $filter - * The filter for Runtimes that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the runtimes 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 runtimes 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; - } - - /** - * The filter for Runtimes that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter for Runtimes that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse.php deleted file mode 100644 index b833f9d472e1..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.functions.v2.ListRuntimesResponse - */ -class ListRuntimesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The runtimes that match the request. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.ListRuntimesResponse.Runtime runtimes = 1; - */ - private $runtimes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Functions\V2\ListRuntimesResponse\Runtime>|\Google\Protobuf\Internal\RepeatedField $runtimes - * The runtimes that match the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The runtimes that match the request. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.ListRuntimesResponse.Runtime runtimes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRuntimes() - { - return $this->runtimes; - } - - /** - * The runtimes that match the request. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.ListRuntimesResponse.Runtime runtimes = 1; - * @param array<\Google\Cloud\Functions\V2\ListRuntimesResponse\Runtime>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRuntimes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\ListRuntimesResponse\Runtime::class); - $this->runtimes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/Runtime.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/Runtime.php deleted file mode 100644 index 3a6de70b406f..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/Runtime.php +++ /dev/null @@ -1,207 +0,0 @@ -google.cloud.functions.v2.ListRuntimesResponse.Runtime - */ -class Runtime extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the runtime, e.g., 'go113', 'nodejs12', etc. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The user facing name, eg 'Go 1.13', 'Node.js 12', etc. - * - * Generated from protobuf field string display_name = 5; - */ - protected $display_name = ''; - /** - * The stage of life this runtime is in, e.g., BETA, GA, etc. - * - * Generated from protobuf field .google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage stage = 2; - */ - protected $stage = 0; - /** - * Warning messages, e.g., a deprecation warning. - * - * Generated from protobuf field repeated string warnings = 3; - */ - private $warnings; - /** - * The environment for the runtime. - * - * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 4; - */ - protected $environment = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the runtime, e.g., 'go113', 'nodejs12', etc. - * @type string $display_name - * The user facing name, eg 'Go 1.13', 'Node.js 12', etc. - * @type int $stage - * The stage of life this runtime is in, e.g., BETA, GA, etc. - * @type array|\Google\Protobuf\Internal\RepeatedField $warnings - * Warning messages, e.g., a deprecation warning. - * @type int $environment - * The environment for the runtime. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The name of the runtime, e.g., 'go113', 'nodejs12', etc. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the runtime, e.g., 'go113', 'nodejs12', etc. - * - * 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 user facing name, eg 'Go 1.13', 'Node.js 12', etc. - * - * Generated from protobuf field string display_name = 5; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The user facing name, eg 'Go 1.13', 'Node.js 12', etc. - * - * 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 stage of life this runtime is in, e.g., BETA, GA, etc. - * - * Generated from protobuf field .google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage stage = 2; - * @return int - */ - public function getStage() - { - return $this->stage; - } - - /** - * The stage of life this runtime is in, e.g., BETA, GA, etc. - * - * Generated from protobuf field .google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage stage = 2; - * @param int $var - * @return $this - */ - public function setStage($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\ListRuntimesResponse\RuntimeStage::class); - $this->stage = $var; - - return $this; - } - - /** - * Warning messages, e.g., a deprecation warning. - * - * Generated from protobuf field repeated string warnings = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWarnings() - { - return $this->warnings; - } - - /** - * Warning messages, e.g., a deprecation warning. - * - * Generated from protobuf field repeated string warnings = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWarnings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->warnings = $arr; - - return $this; - } - - /** - * The environment for the runtime. - * - * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 4; - * @return int - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * The environment for the runtime. - * - * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 4; - * @param int $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\Environment::class); - $this->environment = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Runtime::class, \Google\Cloud\Functions\V2\ListRuntimesResponse_Runtime::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/RuntimeStage.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/RuntimeStage.php deleted file mode 100644 index 60d76ac6285e..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse/RuntimeStage.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage - */ -class RuntimeStage -{ - /** - * Not specified. - * - * Generated from protobuf enum RUNTIME_STAGE_UNSPECIFIED = 0; - */ - const RUNTIME_STAGE_UNSPECIFIED = 0; - /** - * The runtime is in development. - * - * Generated from protobuf enum DEVELOPMENT = 1; - */ - const DEVELOPMENT = 1; - /** - * The runtime is in the Alpha stage. - * - * Generated from protobuf enum ALPHA = 2; - */ - const ALPHA = 2; - /** - * The runtime is in the Beta stage. - * - * Generated from protobuf enum BETA = 3; - */ - const BETA = 3; - /** - * The runtime is generally available. - * - * Generated from protobuf enum GA = 4; - */ - const GA = 4; - /** - * The runtime is deprecated. - * - * Generated from protobuf enum DEPRECATED = 5; - */ - const DEPRECATED = 5; - /** - * The runtime is no longer supported. - * - * Generated from protobuf enum DECOMMISSIONED = 6; - */ - const DECOMMISSIONED = 6; - - private static $valueToName = [ - self::RUNTIME_STAGE_UNSPECIFIED => 'RUNTIME_STAGE_UNSPECIFIED', - self::DEVELOPMENT => 'DEVELOPMENT', - self::ALPHA => 'ALPHA', - self::BETA => 'BETA', - self::GA => 'GA', - self::DEPRECATED => 'DEPRECATED', - self::DECOMMISSIONED => 'DECOMMISSIONED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RuntimeStage::class, \Google\Cloud\Functions\V2\ListRuntimesResponse_RuntimeStage::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse_Runtime.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse_Runtime.php deleted file mode 100644 index 3cbf643acd9d..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ListRuntimesResponse_Runtime.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.functions.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_detail = 5; - */ - protected $status_detail = ''; - /** - * 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; - */ - protected $cancel_requested = false; - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 7; - */ - protected $api_version = ''; - /** - * The original request that started the operation. - * - * Generated from protobuf field .google.protobuf.Any request_resource = 8; - */ - protected $request_resource = null; - /** - * Mechanism for reporting in-progress stages - * - * Generated from protobuf field repeated .google.cloud.functions.v2.Stage stages = 9; - */ - private $stages; - - /** - * 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_detail - * Human-readable status of the operation, if any. - * @type bool $cancel_requested - * 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 \Google\Protobuf\Any $request_resource - * The original request that started the operation. - * @type array<\Google\Cloud\Functions\V2\Stage>|\Google\Protobuf\Internal\RepeatedField $stages - * Mechanism for reporting in-progress stages - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::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_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; - } - - /** - * 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; - * @return bool - */ - public function getCancelRequested() - { - return $this->cancel_requested; - } - - /** - * 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; - * @param bool $var - * @return $this - */ - public function setCancelRequested($var) - { - GPBUtil::checkBool($var); - $this->cancel_requested = $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; - } - - /** - * The original request that started the operation. - * - * Generated from protobuf field .google.protobuf.Any request_resource = 8; - * @return \Google\Protobuf\Any|null - */ - public function getRequestResource() - { - return $this->request_resource; - } - - public function hasRequestResource() - { - return isset($this->request_resource); - } - - public function clearRequestResource() - { - unset($this->request_resource); - } - - /** - * The original request that started the operation. - * - * Generated from protobuf field .google.protobuf.Any request_resource = 8; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setRequestResource($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->request_resource = $var; - - return $this; - } - - /** - * Mechanism for reporting in-progress stages - * - * Generated from protobuf field repeated .google.cloud.functions.v2.Stage stages = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStages() - { - return $this->stages; - } - - /** - * Mechanism for reporting in-progress stages - * - * Generated from protobuf field repeated .google.cloud.functions.v2.Stage stages = 9; - * @param array<\Google\Cloud\Functions\V2\Stage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\Stage::class); - $this->stages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction.php deleted file mode 100644 index 2a7245aa57aa..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction.php +++ /dev/null @@ -1,430 +0,0 @@ -google.cloud.functions.v2.Function - */ -class PBFunction extends \Google\Protobuf\Internal\Message -{ - /** - * A user-defined name of the function. Function names must be unique - * globally and match pattern `projects/*/locations/*/functions/*` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Describe whether the function is gen1 or gen2. - * - * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 10; - */ - protected $environment = 0; - /** - * User-provided description of a function. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Describes the Build step of the function that builds a container from the - * given source. - * - * Generated from protobuf field .google.cloud.functions.v2.BuildConfig build_config = 3; - */ - protected $build_config = null; - /** - * Describes the Service being deployed. Currently deploys services to Cloud - * Run (fully managed). - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig service_config = 4; - */ - protected $service_config = null; - /** - * An Eventarc trigger managed by Google Cloud Functions that fires events in - * response to a condition in another service. - * - * Generated from protobuf field .google.cloud.functions.v2.EventTrigger event_trigger = 5; - */ - protected $event_trigger = null; - /** - * Output only. State of the function. - * - * Generated from protobuf field .google.cloud.functions.v2.Function.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The last update timestamp of a Cloud Function. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels associated with this Cloud Function. - * - * Generated from protobuf field map labels = 8; - */ - private $labels; - /** - * Output only. State Messages for this Cloud Function. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $state_messages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * A user-defined name of the function. Function names must be unique - * globally and match pattern `projects/*/locations/*/functions/*` - * @type int $environment - * Describe whether the function is gen1 or gen2. - * @type string $description - * User-provided description of a function. - * @type \Google\Cloud\Functions\V2\BuildConfig $build_config - * Describes the Build step of the function that builds a container from the - * given source. - * @type \Google\Cloud\Functions\V2\ServiceConfig $service_config - * Describes the Service being deployed. Currently deploys services to Cloud - * Run (fully managed). - * @type \Google\Cloud\Functions\V2\EventTrigger $event_trigger - * An Eventarc trigger managed by Google Cloud Functions that fires events in - * response to a condition in another service. - * @type int $state - * Output only. State of the function. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of a Cloud Function. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this Cloud Function. - * @type array<\Google\Cloud\Functions\V2\StateMessage>|\Google\Protobuf\Internal\RepeatedField $state_messages - * Output only. State Messages for this Cloud Function. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * A user-defined name of the function. Function names must be unique - * globally and match pattern `projects/*/locations/*/functions/*` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * A user-defined name of the function. Function names must be unique - * globally and match pattern `projects/*/locations/*/functions/*` - * - * 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; - } - - /** - * Describe whether the function is gen1 or gen2. - * - * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 10; - * @return int - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * Describe whether the function is gen1 or gen2. - * - * Generated from protobuf field .google.cloud.functions.v2.Environment environment = 10; - * @param int $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\Environment::class); - $this->environment = $var; - - return $this; - } - - /** - * User-provided description of a function. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description of a function. - * - * 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; - } - - /** - * Describes the Build step of the function that builds a container from the - * given source. - * - * Generated from protobuf field .google.cloud.functions.v2.BuildConfig build_config = 3; - * @return \Google\Cloud\Functions\V2\BuildConfig|null - */ - public function getBuildConfig() - { - return $this->build_config; - } - - public function hasBuildConfig() - { - return isset($this->build_config); - } - - public function clearBuildConfig() - { - unset($this->build_config); - } - - /** - * Describes the Build step of the function that builds a container from the - * given source. - * - * Generated from protobuf field .google.cloud.functions.v2.BuildConfig build_config = 3; - * @param \Google\Cloud\Functions\V2\BuildConfig $var - * @return $this - */ - public function setBuildConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\BuildConfig::class); - $this->build_config = $var; - - return $this; - } - - /** - * Describes the Service being deployed. Currently deploys services to Cloud - * Run (fully managed). - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig service_config = 4; - * @return \Google\Cloud\Functions\V2\ServiceConfig|null - */ - public function getServiceConfig() - { - return $this->service_config; - } - - public function hasServiceConfig() - { - return isset($this->service_config); - } - - public function clearServiceConfig() - { - unset($this->service_config); - } - - /** - * Describes the Service being deployed. Currently deploys services to Cloud - * Run (fully managed). - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig service_config = 4; - * @param \Google\Cloud\Functions\V2\ServiceConfig $var - * @return $this - */ - public function setServiceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\ServiceConfig::class); - $this->service_config = $var; - - return $this; - } - - /** - * An Eventarc trigger managed by Google Cloud Functions that fires events in - * response to a condition in another service. - * - * Generated from protobuf field .google.cloud.functions.v2.EventTrigger event_trigger = 5; - * @return \Google\Cloud\Functions\V2\EventTrigger|null - */ - public function getEventTrigger() - { - return $this->event_trigger; - } - - public function hasEventTrigger() - { - return isset($this->event_trigger); - } - - public function clearEventTrigger() - { - unset($this->event_trigger); - } - - /** - * An Eventarc trigger managed by Google Cloud Functions that fires events in - * response to a condition in another service. - * - * Generated from protobuf field .google.cloud.functions.v2.EventTrigger event_trigger = 5; - * @param \Google\Cloud\Functions\V2\EventTrigger $var - * @return $this - */ - public function setEventTrigger($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\EventTrigger::class); - $this->event_trigger = $var; - - return $this; - } - - /** - * Output only. State of the function. - * - * Generated from protobuf field .google.cloud.functions.v2.Function.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the function. - * - * Generated from protobuf field .google.cloud.functions.v2.Function.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\PBFunction\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The last update timestamp of a Cloud Function. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.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 timestamp of a Cloud Function. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.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 associated with this Cloud Function. - * - * Generated from protobuf field map labels = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this Cloud Function. - * - * 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. State Messages for this Cloud Function. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStateMessages() - { - return $this->state_messages; - } - - /** - * Output only. State Messages for this Cloud Function. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Functions\V2\StateMessage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStateMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\StateMessage::class); - $this->state_messages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction/State.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction/State.php deleted file mode 100644 index f6e8c8a0e5cd..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/PBFunction/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.functions.v2.Function.State - */ -class State -{ - /** - * Not specified. Invalid state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Function has been successfully deployed and is serving. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Function deployment failed and the function is not serving. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * Function is being created or updated. - * - * Generated from protobuf enum DEPLOYING = 3; - */ - const DEPLOYING = 3; - /** - * Function is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * Function deployment failed and the function serving state is undefined. - * The function should be updated or deleted to move it out of this state. - * - * Generated from protobuf enum UNKNOWN = 5; - */ - const UNKNOWN = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::FAILED => 'FAILED', - self::DEPLOYING => 'DEPLOYING', - self::DELETING => 'DELETING', - self::UNKNOWN => 'UNKNOWN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Functions\V2\Function_State::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/RepoSource.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/RepoSource.php deleted file mode 100644 index 5326f62530e6..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/RepoSource.php +++ /dev/null @@ -1,309 +0,0 @@ -google.cloud.functions.v2.RepoSource - */ -class RepoSource extends \Google\Protobuf\Internal\Message -{ - /** - * ID of the project that owns the Cloud Source Repository. If omitted, the - * project ID requesting the build is assumed. - * - * Generated from protobuf field string project_id = 1; - */ - protected $project_id = ''; - /** - * Name of the Cloud Source Repository. - * - * Generated from protobuf field string repo_name = 2; - */ - protected $repo_name = ''; - /** - * Directory, relative to the source root, in which to run the build. - * This must be a relative path. If a step's `dir` is specified and is an - * absolute path, this value is ignored for that step's execution. - * eg. helloworld (no leading slash allowed) - * - * Generated from protobuf field string dir = 6; - */ - protected $dir = ''; - /** - * Only trigger a build if the revision regex does NOT match the revision - * regex. - * - * Generated from protobuf field bool invert_regex = 7; - */ - protected $invert_regex = false; - protected $revision; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $branch_name - * Regex matching branches to build. - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * @type string $tag_name - * Regex matching tags to build. - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * @type string $commit_sha - * Explicit commit SHA to build. - * @type string $project_id - * ID of the project that owns the Cloud Source Repository. If omitted, the - * project ID requesting the build is assumed. - * @type string $repo_name - * Name of the Cloud Source Repository. - * @type string $dir - * Directory, relative to the source root, in which to run the build. - * This must be a relative path. If a step's `dir` is specified and is an - * absolute path, this value is ignored for that step's execution. - * eg. helloworld (no leading slash allowed) - * @type bool $invert_regex - * Only trigger a build if the revision regex does NOT match the revision - * regex. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Regex matching branches to build. - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * - * Generated from protobuf field string branch_name = 3; - * @return string - */ - public function getBranchName() - { - return $this->readOneof(3); - } - - public function hasBranchName() - { - return $this->hasOneof(3); - } - - /** - * Regex matching branches to build. - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * - * Generated from protobuf field string branch_name = 3; - * @param string $var - * @return $this - */ - public function setBranchName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Regex matching tags to build. - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * - * Generated from protobuf field string tag_name = 4; - * @return string - */ - public function getTagName() - { - return $this->readOneof(4); - } - - public function hasTagName() - { - return $this->hasOneof(4); - } - - /** - * Regex matching tags to build. - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * - * Generated from protobuf field string tag_name = 4; - * @param string $var - * @return $this - */ - public function setTagName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Explicit commit SHA to build. - * - * Generated from protobuf field string commit_sha = 5; - * @return string - */ - public function getCommitSha() - { - return $this->readOneof(5); - } - - public function hasCommitSha() - { - return $this->hasOneof(5); - } - - /** - * Explicit commit SHA to build. - * - * Generated from protobuf field string commit_sha = 5; - * @param string $var - * @return $this - */ - public function setCommitSha($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * ID of the project that owns the Cloud Source Repository. If omitted, the - * project ID requesting the build is assumed. - * - * Generated from protobuf field string project_id = 1; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * ID of the project that owns the Cloud Source Repository. If omitted, the - * project ID requesting the build is assumed. - * - * Generated from protobuf field string project_id = 1; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Name of the Cloud Source Repository. - * - * Generated from protobuf field string repo_name = 2; - * @return string - */ - public function getRepoName() - { - return $this->repo_name; - } - - /** - * Name of the Cloud Source Repository. - * - * Generated from protobuf field string repo_name = 2; - * @param string $var - * @return $this - */ - public function setRepoName($var) - { - GPBUtil::checkString($var, True); - $this->repo_name = $var; - - return $this; - } - - /** - * Directory, relative to the source root, in which to run the build. - * This must be a relative path. If a step's `dir` is specified and is an - * absolute path, this value is ignored for that step's execution. - * eg. helloworld (no leading slash allowed) - * - * Generated from protobuf field string dir = 6; - * @return string - */ - public function getDir() - { - return $this->dir; - } - - /** - * Directory, relative to the source root, in which to run the build. - * This must be a relative path. If a step's `dir` is specified and is an - * absolute path, this value is ignored for that step's execution. - * eg. helloworld (no leading slash allowed) - * - * Generated from protobuf field string dir = 6; - * @param string $var - * @return $this - */ - public function setDir($var) - { - GPBUtil::checkString($var, True); - $this->dir = $var; - - return $this; - } - - /** - * Only trigger a build if the revision regex does NOT match the revision - * regex. - * - * Generated from protobuf field bool invert_regex = 7; - * @return bool - */ - public function getInvertRegex() - { - return $this->invert_regex; - } - - /** - * Only trigger a build if the revision regex does NOT match the revision - * regex. - * - * Generated from protobuf field bool invert_regex = 7; - * @param bool $var - * @return $this - */ - public function setInvertRegex($var) - { - GPBUtil::checkBool($var); - $this->invert_regex = $var; - - return $this; - } - - /** - * @return string - */ - public function getRevision() - { - return $this->whichOneof("revision"); - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretEnvVar.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretEnvVar.php deleted file mode 100644 index d14b7f6d187b..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretEnvVar.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.functions.v2.SecretEnvVar - */ -class SecretEnvVar extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the environment variable. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * Project identifier (preferably project number but can also be the - * project ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * - * Generated from protobuf field string project_id = 2; - */ - protected $project_id = ''; - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - */ - protected $secret = ''; - /** - * Version of the secret (version number or the string 'latest'). It is - * recommended to use a numeric version for secret environment variables as - * any updates to the secret value is not reflected until new instances - * start. - * - * Generated from protobuf field string version = 4; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Name of the environment variable. - * @type string $project_id - * Project identifier (preferably project number but can also be the - * project ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * @type string $secret - * Name of the secret in secret manager (not the full resource name). - * @type string $version - * Version of the secret (version number or the string 'latest'). It is - * recommended to use a numeric version for secret environment variables as - * any updates to the secret value is not reflected until new instances - * start. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Name of the environment variable. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Name of the environment variable. - * - * 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; - } - - /** - * Project identifier (preferably project number but can also be the - * project ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * - * Generated from protobuf field string project_id = 2; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Project identifier (preferably project number but can also be the - * project ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * - * 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; - } - - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - * @return string - */ - public function getSecret() - { - return $this->secret; - } - - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - * @param string $var - * @return $this - */ - public function setSecret($var) - { - GPBUtil::checkString($var, True); - $this->secret = $var; - - return $this; - } - - /** - * Version of the secret (version number or the string 'latest'). It is - * recommended to use a numeric version for secret environment variables as - * any updates to the secret value is not reflected until new instances - * start. - * - * Generated from protobuf field string version = 4; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of the secret (version number or the string 'latest'). It is - * recommended to use a numeric version for secret environment variables as - * any updates to the secret value is not reflected until new instances - * start. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume.php deleted file mode 100644 index 505db9251bf8..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.functions.v2.SecretVolume - */ -class SecretVolume extends \Google\Protobuf\Internal\Message -{ - /** - * The path within the container to mount the secret volume. For example, - * setting the mount_path as `/etc/secrets` would mount the secret value files - * under the `/etc/secrets` directory. This directory will also be completely - * shadowed and unavailable to mount any other secrets. - * Recommended mount path: /etc/secrets - * - * Generated from protobuf field string mount_path = 1; - */ - protected $mount_path = ''; - /** - * Project identifier (preferably project number but can also be the project - * ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * - * Generated from protobuf field string project_id = 2; - */ - protected $project_id = ''; - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - */ - protected $secret = ''; - /** - * List of secret versions to mount for this secret. If empty, the `latest` - * version of the secret will be made available in a file named after the - * secret under the mount point. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4; - */ - private $versions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mount_path - * The path within the container to mount the secret volume. For example, - * setting the mount_path as `/etc/secrets` would mount the secret value files - * under the `/etc/secrets` directory. This directory will also be completely - * shadowed and unavailable to mount any other secrets. - * Recommended mount path: /etc/secrets - * @type string $project_id - * Project identifier (preferably project number but can also be the project - * ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * @type string $secret - * Name of the secret in secret manager (not the full resource name). - * @type array<\Google\Cloud\Functions\V2\SecretVolume\SecretVersion>|\Google\Protobuf\Internal\RepeatedField $versions - * List of secret versions to mount for this secret. If empty, the `latest` - * version of the secret will be made available in a file named after the - * secret under the mount point. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * The path within the container to mount the secret volume. For example, - * setting the mount_path as `/etc/secrets` would mount the secret value files - * under the `/etc/secrets` directory. This directory will also be completely - * shadowed and unavailable to mount any other secrets. - * Recommended mount path: /etc/secrets - * - * Generated from protobuf field string mount_path = 1; - * @return string - */ - public function getMountPath() - { - return $this->mount_path; - } - - /** - * The path within the container to mount the secret volume. For example, - * setting the mount_path as `/etc/secrets` would mount the secret value files - * under the `/etc/secrets` directory. This directory will also be completely - * shadowed and unavailable to mount any other secrets. - * Recommended mount path: /etc/secrets - * - * Generated from protobuf field string mount_path = 1; - * @param string $var - * @return $this - */ - public function setMountPath($var) - { - GPBUtil::checkString($var, True); - $this->mount_path = $var; - - return $this; - } - - /** - * Project identifier (preferably project number but can also be the project - * ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * - * Generated from protobuf field string project_id = 2; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Project identifier (preferably project number but can also be the project - * ID) of the project that contains the secret. If not set, it is - * assumed that the secret is in the same project as the function. - * - * 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; - } - - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - * @return string - */ - public function getSecret() - { - return $this->secret; - } - - /** - * Name of the secret in secret manager (not the full resource name). - * - * Generated from protobuf field string secret = 3; - * @param string $var - * @return $this - */ - public function setSecret($var) - { - GPBUtil::checkString($var, True); - $this->secret = $var; - - return $this; - } - - /** - * List of secret versions to mount for this secret. If empty, the `latest` - * version of the secret will be made available in a file named after the - * secret under the mount point. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVersions() - { - return $this->versions; - } - - /** - * List of secret versions to mount for this secret. If empty, the `latest` - * version of the secret will be made available in a file named after the - * secret under the mount point. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4; - * @param array<\Google\Cloud\Functions\V2\SecretVolume\SecretVersion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\SecretVolume\SecretVersion::class); - $this->versions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume/SecretVersion.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume/SecretVersion.php deleted file mode 100644 index fe99c1e3ddd3..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume/SecretVersion.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.functions.v2.SecretVolume.SecretVersion - */ -class SecretVersion extends \Google\Protobuf\Internal\Message -{ - /** - * Version of the secret (version number or the string 'latest'). It is - * preferable to use `latest` version with secret volumes as secret value - * changes are reflected immediately. - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - /** - * Relative path of the file under the mount path where the secret value for - * this version will be fetched and made available. For example, setting the - * mount_path as '/etc/secrets' and path as `secret_foo` would mount the - * secret value file at `/etc/secrets/secret_foo`. - * - * Generated from protobuf field string path = 2; - */ - protected $path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * Version of the secret (version number or the string 'latest'). It is - * preferable to use `latest` version with secret volumes as secret value - * changes are reflected immediately. - * @type string $path - * Relative path of the file under the mount path where the secret value for - * this version will be fetched and made available. For example, setting the - * mount_path as '/etc/secrets' and path as `secret_foo` would mount the - * secret value file at `/etc/secrets/secret_foo`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Version of the secret (version number or the string 'latest'). It is - * preferable to use `latest` version with secret volumes as secret value - * changes are reflected immediately. - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of the secret (version number or the string 'latest'). It is - * preferable to use `latest` version with secret volumes as secret value - * changes are reflected immediately. - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Relative path of the file under the mount path where the secret value for - * this version will be fetched and made available. For example, setting the - * mount_path as '/etc/secrets' and path as `secret_foo` would mount the - * secret value file at `/etc/secrets/secret_foo`. - * - * Generated from protobuf field string path = 2; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Relative path of the file under the mount path where the secret value for - * this version will be fetched and made available. For example, setting the - * mount_path as '/etc/secrets' and path as `secret_foo` would mount the - * secret value file at `/etc/secrets/secret_foo`. - * - * 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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SecretVersion::class, \Google\Cloud\Functions\V2\SecretVolume_SecretVersion::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume_SecretVersion.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume_SecretVersion.php deleted file mode 100644 index 250534c263c5..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SecretVolume_SecretVersion.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.functions.v2.ServiceConfig - */ -class ServiceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of the service associated with a Function. - * The format of this field is - * `projects/{project}/locations/{region}/services/{service}` - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $service = ''; - /** - * The function execution timeout. Execution is considered failed and - * can be terminated if the function is not completed at the end of the - * timeout period. Defaults to 60 seconds. - * - * Generated from protobuf field int32 timeout_seconds = 2; - */ - protected $timeout_seconds = 0; - /** - * The amount of memory available for a function. - * Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is - * supplied the value is interpreted as bytes. - * See - * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go - * a full description. - * - * Generated from protobuf field string available_memory = 13; - */ - protected $available_memory = ''; - /** - * Environment variables that shall be available during function execution. - * - * Generated from protobuf field map environment_variables = 4; - */ - private $environment_variables; - /** - * The limit on the maximum number of function instances that may coexist at a - * given time. - * In some cases, such as rapid traffic surges, Cloud Functions may, for a - * short period of time, create more instances than the specified max - * instances limit. If your function cannot tolerate this temporary behavior, - * you may want to factor in a safety margin and set a lower max instances - * value than your function can tolerate. - * See the [Max - * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for - * more details. - * - * Generated from protobuf field int32 max_instance_count = 5; - */ - protected $max_instance_count = 0; - /** - * The limit on the minimum number of function instances that may coexist at a - * given time. - * Function instances are kept in idle state for a short period after they - * finished executing the request to reduce cold start time for subsequent - * requests. Setting a minimum instance count will ensure that the given - * number of instances are kept running in idle state always. This can help - * with cold start times when jump in incoming request count occurs after the - * idle instance would have been stopped in the default case. - * - * Generated from protobuf field int32 min_instance_count = 12; - */ - protected $min_instance_count = 0; - /** - * The Serverless VPC Access connector that this cloud function can connect - * to. The format of this field is `projects/*/locations/*/connectors/*`. - * - * Generated from protobuf field string vpc_connector = 6 [(.google.api.resource_reference) = { - */ - protected $vpc_connector = ''; - /** - * The egress settings for the connector, controlling what traffic is diverted - * through it. - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7; - */ - protected $vpc_connector_egress_settings = 0; - /** - * The ingress settings for the function, controlling what traffic can reach - * it. - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.IngressSettings ingress_settings = 8; - */ - protected $ingress_settings = 0; - /** - * Output only. URI of the Service deployed. - * - * Generated from protobuf field string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uri = ''; - /** - * The email of the service's service account. If empty, defaults to - * `{project_number}-compute@developer.gserviceaccount.com`. - * - * Generated from protobuf field string service_account_email = 10; - */ - protected $service_account_email = ''; - /** - * Whether 100% of traffic is routed to the latest revision. - * On CreateFunction and UpdateFunction, when set to true, the revision being - * deployed will serve 100% of traffic, ignoring any traffic split settings, - * if any. On GetFunction, true will be returned if the latest revision is - * serving 100% of traffic. - * - * Generated from protobuf field bool all_traffic_on_latest_revision = 16; - */ - protected $all_traffic_on_latest_revision = false; - /** - * Secret environment variables configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17; - */ - private $secret_environment_variables; - /** - * Secret volumes configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19; - */ - private $secret_volumes; - /** - * Output only. The name of service revision. - * - * Generated from protobuf field string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * Output only. Name of the service associated with a Function. - * The format of this field is - * `projects/{project}/locations/{region}/services/{service}` - * @type int $timeout_seconds - * The function execution timeout. Execution is considered failed and - * can be terminated if the function is not completed at the end of the - * timeout period. Defaults to 60 seconds. - * @type string $available_memory - * The amount of memory available for a function. - * Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is - * supplied the value is interpreted as bytes. - * See - * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go - * a full description. - * @type array|\Google\Protobuf\Internal\MapField $environment_variables - * Environment variables that shall be available during function execution. - * @type int $max_instance_count - * The limit on the maximum number of function instances that may coexist at a - * given time. - * In some cases, such as rapid traffic surges, Cloud Functions may, for a - * short period of time, create more instances than the specified max - * instances limit. If your function cannot tolerate this temporary behavior, - * you may want to factor in a safety margin and set a lower max instances - * value than your function can tolerate. - * See the [Max - * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for - * more details. - * @type int $min_instance_count - * The limit on the minimum number of function instances that may coexist at a - * given time. - * Function instances are kept in idle state for a short period after they - * finished executing the request to reduce cold start time for subsequent - * requests. Setting a minimum instance count will ensure that the given - * number of instances are kept running in idle state always. This can help - * with cold start times when jump in incoming request count occurs after the - * idle instance would have been stopped in the default case. - * @type string $vpc_connector - * The Serverless VPC Access connector that this cloud function can connect - * to. The format of this field is `projects/*/locations/*/connectors/*`. - * @type int $vpc_connector_egress_settings - * The egress settings for the connector, controlling what traffic is diverted - * through it. - * @type int $ingress_settings - * The ingress settings for the function, controlling what traffic can reach - * it. - * @type string $uri - * Output only. URI of the Service deployed. - * @type string $service_account_email - * The email of the service's service account. If empty, defaults to - * `{project_number}-compute@developer.gserviceaccount.com`. - * @type bool $all_traffic_on_latest_revision - * Whether 100% of traffic is routed to the latest revision. - * On CreateFunction and UpdateFunction, when set to true, the revision being - * deployed will serve 100% of traffic, ignoring any traffic split settings, - * if any. On GetFunction, true will be returned if the latest revision is - * serving 100% of traffic. - * @type array<\Google\Cloud\Functions\V2\SecretEnvVar>|\Google\Protobuf\Internal\RepeatedField $secret_environment_variables - * Secret environment variables configuration. - * @type array<\Google\Cloud\Functions\V2\SecretVolume>|\Google\Protobuf\Internal\RepeatedField $secret_volumes - * Secret volumes configuration. - * @type string $revision - * Output only. The name of service revision. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of the service associated with a Function. - * The format of this field is - * `projects/{project}/locations/{region}/services/{service}` - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * Output only. Name of the service associated with a Function. - * The format of this field is - * `projects/{project}/locations/{region}/services/{service}` - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * The function execution timeout. Execution is considered failed and - * can be terminated if the function is not completed at the end of the - * timeout period. Defaults to 60 seconds. - * - * Generated from protobuf field int32 timeout_seconds = 2; - * @return int - */ - public function getTimeoutSeconds() - { - return $this->timeout_seconds; - } - - /** - * The function execution timeout. Execution is considered failed and - * can be terminated if the function is not completed at the end of the - * timeout period. Defaults to 60 seconds. - * - * Generated from protobuf field int32 timeout_seconds = 2; - * @param int $var - * @return $this - */ - public function setTimeoutSeconds($var) - { - GPBUtil::checkInt32($var); - $this->timeout_seconds = $var; - - return $this; - } - - /** - * The amount of memory available for a function. - * Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is - * supplied the value is interpreted as bytes. - * See - * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go - * a full description. - * - * Generated from protobuf field string available_memory = 13; - * @return string - */ - public function getAvailableMemory() - { - return $this->available_memory; - } - - /** - * The amount of memory available for a function. - * Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is - * supplied the value is interpreted as bytes. - * See - * https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go - * a full description. - * - * Generated from protobuf field string available_memory = 13; - * @param string $var - * @return $this - */ - public function setAvailableMemory($var) - { - GPBUtil::checkString($var, True); - $this->available_memory = $var; - - return $this; - } - - /** - * Environment variables that shall be available during function execution. - * - * Generated from protobuf field map environment_variables = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEnvironmentVariables() - { - return $this->environment_variables; - } - - /** - * Environment variables that shall be available during function execution. - * - * Generated from protobuf field map environment_variables = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEnvironmentVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->environment_variables = $arr; - - return $this; - } - - /** - * The limit on the maximum number of function instances that may coexist at a - * given time. - * In some cases, such as rapid traffic surges, Cloud Functions may, for a - * short period of time, create more instances than the specified max - * instances limit. If your function cannot tolerate this temporary behavior, - * you may want to factor in a safety margin and set a lower max instances - * value than your function can tolerate. - * See the [Max - * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for - * more details. - * - * Generated from protobuf field int32 max_instance_count = 5; - * @return int - */ - public function getMaxInstanceCount() - { - return $this->max_instance_count; - } - - /** - * The limit on the maximum number of function instances that may coexist at a - * given time. - * In some cases, such as rapid traffic surges, Cloud Functions may, for a - * short period of time, create more instances than the specified max - * instances limit. If your function cannot tolerate this temporary behavior, - * you may want to factor in a safety margin and set a lower max instances - * value than your function can tolerate. - * See the [Max - * Instances](https://cloud.google.com/functions/docs/max-instances) Guide for - * more details. - * - * Generated from protobuf field int32 max_instance_count = 5; - * @param int $var - * @return $this - */ - public function setMaxInstanceCount($var) - { - GPBUtil::checkInt32($var); - $this->max_instance_count = $var; - - return $this; - } - - /** - * The limit on the minimum number of function instances that may coexist at a - * given time. - * Function instances are kept in idle state for a short period after they - * finished executing the request to reduce cold start time for subsequent - * requests. Setting a minimum instance count will ensure that the given - * number of instances are kept running in idle state always. This can help - * with cold start times when jump in incoming request count occurs after the - * idle instance would have been stopped in the default case. - * - * Generated from protobuf field int32 min_instance_count = 12; - * @return int - */ - public function getMinInstanceCount() - { - return $this->min_instance_count; - } - - /** - * The limit on the minimum number of function instances that may coexist at a - * given time. - * Function instances are kept in idle state for a short period after they - * finished executing the request to reduce cold start time for subsequent - * requests. Setting a minimum instance count will ensure that the given - * number of instances are kept running in idle state always. This can help - * with cold start times when jump in incoming request count occurs after the - * idle instance would have been stopped in the default case. - * - * Generated from protobuf field int32 min_instance_count = 12; - * @param int $var - * @return $this - */ - public function setMinInstanceCount($var) - { - GPBUtil::checkInt32($var); - $this->min_instance_count = $var; - - return $this; - } - - /** - * The Serverless VPC Access connector that this cloud function can connect - * to. The format of this field is `projects/*/locations/*/connectors/*`. - * - * Generated from protobuf field string vpc_connector = 6 [(.google.api.resource_reference) = { - * @return string - */ - public function getVpcConnector() - { - return $this->vpc_connector; - } - - /** - * The Serverless VPC Access connector that this cloud function can connect - * to. The format of this field is `projects/*/locations/*/connectors/*`. - * - * Generated from protobuf field string vpc_connector = 6 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVpcConnector($var) - { - GPBUtil::checkString($var, True); - $this->vpc_connector = $var; - - return $this; - } - - /** - * The egress settings for the connector, controlling what traffic is diverted - * through it. - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7; - * @return int - */ - public function getVpcConnectorEgressSettings() - { - return $this->vpc_connector_egress_settings; - } - - /** - * The egress settings for the connector, controlling what traffic is diverted - * through it. - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7; - * @param int $var - * @return $this - */ - public function setVpcConnectorEgressSettings($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\ServiceConfig\VpcConnectorEgressSettings::class); - $this->vpc_connector_egress_settings = $var; - - return $this; - } - - /** - * The ingress settings for the function, controlling what traffic can reach - * it. - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.IngressSettings ingress_settings = 8; - * @return int - */ - public function getIngressSettings() - { - return $this->ingress_settings; - } - - /** - * The ingress settings for the function, controlling what traffic can reach - * it. - * - * Generated from protobuf field .google.cloud.functions.v2.ServiceConfig.IngressSettings ingress_settings = 8; - * @param int $var - * @return $this - */ - public function setIngressSettings($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\ServiceConfig\IngressSettings::class); - $this->ingress_settings = $var; - - return $this; - } - - /** - * Output only. URI of the Service deployed. - * - * Generated from protobuf field string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Output only. URI of the Service deployed. - * - * Generated from protobuf field string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * The email of the service's service account. If empty, defaults to - * `{project_number}-compute@developer.gserviceaccount.com`. - * - * Generated from protobuf field string service_account_email = 10; - * @return string - */ - public function getServiceAccountEmail() - { - return $this->service_account_email; - } - - /** - * The email of the service's service account. If empty, defaults to - * `{project_number}-compute@developer.gserviceaccount.com`. - * - * Generated from protobuf field string service_account_email = 10; - * @param string $var - * @return $this - */ - public function setServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->service_account_email = $var; - - return $this; - } - - /** - * Whether 100% of traffic is routed to the latest revision. - * On CreateFunction and UpdateFunction, when set to true, the revision being - * deployed will serve 100% of traffic, ignoring any traffic split settings, - * if any. On GetFunction, true will be returned if the latest revision is - * serving 100% of traffic. - * - * Generated from protobuf field bool all_traffic_on_latest_revision = 16; - * @return bool - */ - public function getAllTrafficOnLatestRevision() - { - return $this->all_traffic_on_latest_revision; - } - - /** - * Whether 100% of traffic is routed to the latest revision. - * On CreateFunction and UpdateFunction, when set to true, the revision being - * deployed will serve 100% of traffic, ignoring any traffic split settings, - * if any. On GetFunction, true will be returned if the latest revision is - * serving 100% of traffic. - * - * Generated from protobuf field bool all_traffic_on_latest_revision = 16; - * @param bool $var - * @return $this - */ - public function setAllTrafficOnLatestRevision($var) - { - GPBUtil::checkBool($var); - $this->all_traffic_on_latest_revision = $var; - - return $this; - } - - /** - * Secret environment variables configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecretEnvironmentVariables() - { - return $this->secret_environment_variables; - } - - /** - * Secret environment variables configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17; - * @param array<\Google\Cloud\Functions\V2\SecretEnvVar>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecretEnvironmentVariables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\SecretEnvVar::class); - $this->secret_environment_variables = $arr; - - return $this; - } - - /** - * Secret volumes configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecretVolumes() - { - return $this->secret_volumes; - } - - /** - * Secret volumes configuration. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19; - * @param array<\Google\Cloud\Functions\V2\SecretVolume>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecretVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\SecretVolume::class); - $this->secret_volumes = $arr; - - return $this; - } - - /** - * Output only. The name of service revision. - * - * Generated from protobuf field string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRevision() - { - return $this->revision; - } - - /** - * Output only. The name of service revision. - * - * Generated from protobuf field string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRevision($var) - { - GPBUtil::checkString($var, True); - $this->revision = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/IngressSettings.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/IngressSettings.php deleted file mode 100644 index 0dfd22d07834..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/IngressSettings.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.functions.v2.ServiceConfig.IngressSettings - */ -class IngressSettings -{ - /** - * Unspecified. - * - * Generated from protobuf enum INGRESS_SETTINGS_UNSPECIFIED = 0; - */ - const INGRESS_SETTINGS_UNSPECIFIED = 0; - /** - * Allow HTTP traffic from public and private sources. - * - * Generated from protobuf enum ALLOW_ALL = 1; - */ - const ALLOW_ALL = 1; - /** - * Allow HTTP traffic from only private VPC sources. - * - * Generated from protobuf enum ALLOW_INTERNAL_ONLY = 2; - */ - const ALLOW_INTERNAL_ONLY = 2; - /** - * Allow HTTP traffic from private VPC sources and through GCLB. - * - * Generated from protobuf enum ALLOW_INTERNAL_AND_GCLB = 3; - */ - const ALLOW_INTERNAL_AND_GCLB = 3; - - private static $valueToName = [ - self::INGRESS_SETTINGS_UNSPECIFIED => 'INGRESS_SETTINGS_UNSPECIFIED', - self::ALLOW_ALL => 'ALLOW_ALL', - self::ALLOW_INTERNAL_ONLY => 'ALLOW_INTERNAL_ONLY', - self::ALLOW_INTERNAL_AND_GCLB => 'ALLOW_INTERNAL_AND_GCLB', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IngressSettings::class, \Google\Cloud\Functions\V2\ServiceConfig_IngressSettings::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/VpcConnectorEgressSettings.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/VpcConnectorEgressSettings.php deleted file mode 100644 index 77a3f98e3ae3..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig/VpcConnectorEgressSettings.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings - */ -class VpcConnectorEgressSettings -{ - /** - * Unspecified. - * - * Generated from protobuf enum VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0; - */ - const VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0; - /** - * Use the VPC Access Connector only for private IP space from RFC1918. - * - * Generated from protobuf enum PRIVATE_RANGES_ONLY = 1; - */ - const PRIVATE_RANGES_ONLY = 1; - /** - * Force the use of VPC Access Connector for all egress traffic from the - * function. - * - * Generated from protobuf enum ALL_TRAFFIC = 2; - */ - const ALL_TRAFFIC = 2; - - private static $valueToName = [ - self::VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED => 'VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED', - self::PRIVATE_RANGES_ONLY => 'PRIVATE_RANGES_ONLY', - self::ALL_TRAFFIC => 'ALL_TRAFFIC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VpcConnectorEgressSettings::class, \Google\Cloud\Functions\V2\ServiceConfig_VpcConnectorEgressSettings::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig_IngressSettings.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig_IngressSettings.php deleted file mode 100644 index 445083fb01da..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/ServiceConfig_IngressSettings.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.functions.v2.Source - */ -class Source extends \Google\Protobuf\Internal\Message -{ - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Functions\V2\StorageSource $storage_source - * If provided, get the source from this location in Google Cloud Storage. - * @type \Google\Cloud\Functions\V2\RepoSource $repo_source - * If provided, get the source from this location in a Cloud Source - * Repository. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * If provided, get the source from this location in Google Cloud Storage. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource storage_source = 1; - * @return \Google\Cloud\Functions\V2\StorageSource|null - */ - public function getStorageSource() - { - return $this->readOneof(1); - } - - public function hasStorageSource() - { - return $this->hasOneof(1); - } - - /** - * If provided, get the source from this location in Google Cloud Storage. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource storage_source = 1; - * @param \Google\Cloud\Functions\V2\StorageSource $var - * @return $this - */ - public function setStorageSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\StorageSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * If provided, get the source from this location in a Cloud Source - * Repository. - * - * Generated from protobuf field .google.cloud.functions.v2.RepoSource repo_source = 2; - * @return \Google\Cloud\Functions\V2\RepoSource|null - */ - public function getRepoSource() - { - return $this->readOneof(2); - } - - public function hasRepoSource() - { - return $this->hasOneof(2); - } - - /** - * If provided, get the source from this location in a Cloud Source - * Repository. - * - * Generated from protobuf field .google.cloud.functions.v2.RepoSource repo_source = 2; - * @param \Google\Cloud\Functions\V2\RepoSource $var - * @return $this - */ - public function setRepoSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\RepoSource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SourceProvenance.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SourceProvenance.php deleted file mode 100644 index f49a857e6dae..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/SourceProvenance.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.functions.v2.SourceProvenance - */ -class SourceProvenance extends \Google\Protobuf\Internal\Message -{ - /** - * A copy of the build's `source.storage_source`, if exists, with any - * generations resolved. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource resolved_storage_source = 1; - */ - protected $resolved_storage_source = null; - /** - * A copy of the build's `source.repo_source`, if exists, with any - * revisions resolved. - * - * Generated from protobuf field .google.cloud.functions.v2.RepoSource resolved_repo_source = 2; - */ - protected $resolved_repo_source = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Functions\V2\StorageSource $resolved_storage_source - * A copy of the build's `source.storage_source`, if exists, with any - * generations resolved. - * @type \Google\Cloud\Functions\V2\RepoSource $resolved_repo_source - * A copy of the build's `source.repo_source`, if exists, with any - * revisions resolved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * A copy of the build's `source.storage_source`, if exists, with any - * generations resolved. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource resolved_storage_source = 1; - * @return \Google\Cloud\Functions\V2\StorageSource|null - */ - public function getResolvedStorageSource() - { - return $this->resolved_storage_source; - } - - public function hasResolvedStorageSource() - { - return isset($this->resolved_storage_source); - } - - public function clearResolvedStorageSource() - { - unset($this->resolved_storage_source); - } - - /** - * A copy of the build's `source.storage_source`, if exists, with any - * generations resolved. - * - * Generated from protobuf field .google.cloud.functions.v2.StorageSource resolved_storage_source = 1; - * @param \Google\Cloud\Functions\V2\StorageSource $var - * @return $this - */ - public function setResolvedStorageSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\StorageSource::class); - $this->resolved_storage_source = $var; - - return $this; - } - - /** - * A copy of the build's `source.repo_source`, if exists, with any - * revisions resolved. - * - * Generated from protobuf field .google.cloud.functions.v2.RepoSource resolved_repo_source = 2; - * @return \Google\Cloud\Functions\V2\RepoSource|null - */ - public function getResolvedRepoSource() - { - return $this->resolved_repo_source; - } - - public function hasResolvedRepoSource() - { - return isset($this->resolved_repo_source); - } - - public function clearResolvedRepoSource() - { - unset($this->resolved_repo_source); - } - - /** - * A copy of the build's `source.repo_source`, if exists, with any - * revisions resolved. - * - * Generated from protobuf field .google.cloud.functions.v2.RepoSource resolved_repo_source = 2; - * @param \Google\Cloud\Functions\V2\RepoSource $var - * @return $this - */ - public function setResolvedRepoSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\RepoSource::class); - $this->resolved_repo_source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage.php deleted file mode 100644 index e965c5a3023b..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.functions.v2.Stage - */ -class Stage extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the Stage. This will be unique for each Stage. - * - * Generated from protobuf field .google.cloud.functions.v2.Stage.Name name = 1; - */ - protected $name = 0; - /** - * Message describing the Stage - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - /** - * Current state of the Stage - * - * Generated from protobuf field .google.cloud.functions.v2.Stage.State state = 3; - */ - protected $state = 0; - /** - * Resource of the Stage - * - * Generated from protobuf field string resource = 4; - */ - protected $resource = ''; - /** - * Link to the current Stage resource - * - * Generated from protobuf field string resource_uri = 5; - */ - protected $resource_uri = ''; - /** - * State messages from the current Stage. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 6; - */ - private $state_messages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $name - * Name of the Stage. This will be unique for each Stage. - * @type string $message - * Message describing the Stage - * @type int $state - * Current state of the Stage - * @type string $resource - * Resource of the Stage - * @type string $resource_uri - * Link to the current Stage resource - * @type array<\Google\Cloud\Functions\V2\StateMessage>|\Google\Protobuf\Internal\RepeatedField $state_messages - * State messages from the current Stage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Name of the Stage. This will be unique for each Stage. - * - * Generated from protobuf field .google.cloud.functions.v2.Stage.Name name = 1; - * @return int - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the Stage. This will be unique for each Stage. - * - * Generated from protobuf field .google.cloud.functions.v2.Stage.Name name = 1; - * @param int $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\Stage\Name::class); - $this->name = $var; - - return $this; - } - - /** - * Message describing the Stage - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Message describing the Stage - * - * 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; - } - - /** - * Current state of the Stage - * - * Generated from protobuf field .google.cloud.functions.v2.Stage.State state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Current state of the Stage - * - * Generated from protobuf field .google.cloud.functions.v2.Stage.State state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\Stage\State::class); - $this->state = $var; - - return $this; - } - - /** - * Resource of the Stage - * - * Generated from protobuf field string resource = 4; - * @return string - */ - public function getResource() - { - return $this->resource; - } - - /** - * Resource of the Stage - * - * Generated from protobuf field string resource = 4; - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->resource = $var; - - return $this; - } - - /** - * Link to the current Stage resource - * - * Generated from protobuf field string resource_uri = 5; - * @return string - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * Link to the current Stage resource - * - * Generated from protobuf field string resource_uri = 5; - * @param string $var - * @return $this - */ - public function setResourceUri($var) - { - GPBUtil::checkString($var, True); - $this->resource_uri = $var; - - return $this; - } - - /** - * State messages from the current Stage. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStateMessages() - { - return $this->state_messages; - } - - /** - * State messages from the current Stage. - * - * Generated from protobuf field repeated .google.cloud.functions.v2.StateMessage state_messages = 6; - * @param array<\Google\Cloud\Functions\V2\StateMessage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStateMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Functions\V2\StateMessage::class); - $this->state_messages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/Name.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/Name.php deleted file mode 100644 index 6dbaa6f06046..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/Name.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.functions.v2.Stage.Name - */ -class Name -{ - /** - * Not specified. Invalid name. - * - * Generated from protobuf enum NAME_UNSPECIFIED = 0; - */ - const NAME_UNSPECIFIED = 0; - /** - * Artifact Regsitry Stage - * - * Generated from protobuf enum ARTIFACT_REGISTRY = 1; - */ - const ARTIFACT_REGISTRY = 1; - /** - * Build Stage - * - * Generated from protobuf enum BUILD = 2; - */ - const BUILD = 2; - /** - * Service Stage - * - * Generated from protobuf enum SERVICE = 3; - */ - const SERVICE = 3; - /** - * Trigger Stage - * - * Generated from protobuf enum TRIGGER = 4; - */ - const TRIGGER = 4; - /** - * Service Rollback Stage - * - * Generated from protobuf enum SERVICE_ROLLBACK = 5; - */ - const SERVICE_ROLLBACK = 5; - /** - * Trigger Rollback Stage - * - * Generated from protobuf enum TRIGGER_ROLLBACK = 6; - */ - const TRIGGER_ROLLBACK = 6; - - private static $valueToName = [ - self::NAME_UNSPECIFIED => 'NAME_UNSPECIFIED', - self::ARTIFACT_REGISTRY => 'ARTIFACT_REGISTRY', - self::BUILD => 'BUILD', - self::SERVICE => 'SERVICE', - self::TRIGGER => 'TRIGGER', - self::SERVICE_ROLLBACK => 'SERVICE_ROLLBACK', - self::TRIGGER_ROLLBACK => 'TRIGGER_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(Name::class, \Google\Cloud\Functions\V2\Stage_Name::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/State.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/State.php deleted file mode 100644 index 5a0be65fc0dc..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.functions.v2.Stage.State - */ -class State -{ - /** - * Not specified. Invalid state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Stage has not started. - * - * Generated from protobuf enum NOT_STARTED = 1; - */ - const NOT_STARTED = 1; - /** - * Stage is in progress. - * - * Generated from protobuf enum IN_PROGRESS = 2; - */ - const IN_PROGRESS = 2; - /** - * Stage has completed. - * - * Generated from protobuf enum COMPLETE = 3; - */ - const COMPLETE = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::NOT_STARTED => 'NOT_STARTED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::COMPLETE => 'COMPLETE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Functions\V2\Stage_State::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage_Name.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage_Name.php deleted file mode 100644 index 813cd25229e0..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/Stage_Name.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.functions.v2.StateMessage - */ -class StateMessage extends \Google\Protobuf\Internal\Message -{ - /** - * Severity of the state message. - * - * Generated from protobuf field .google.cloud.functions.v2.StateMessage.Severity severity = 1; - */ - protected $severity = 0; - /** - * One-word CamelCase type of the state message. - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - /** - * The message. - * - * Generated from protobuf field string message = 3; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $severity - * Severity of the state message. - * @type string $type - * One-word CamelCase type of the state message. - * @type string $message - * The message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Severity of the state message. - * - * Generated from protobuf field .google.cloud.functions.v2.StateMessage.Severity severity = 1; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Severity of the state message. - * - * Generated from protobuf field .google.cloud.functions.v2.StateMessage.Severity severity = 1; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Functions\V2\StateMessage\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * One-word CamelCase type of the state message. - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * One-word CamelCase type of the state message. - * - * Generated from protobuf field string type = 2; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * The message. - * - * Generated from protobuf field string message = 3; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The message. - * - * Generated from protobuf field string message = 3; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage/Severity.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage/Severity.php deleted file mode 100644 index d201473a95e0..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage/Severity.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.functions.v2.StateMessage.Severity - */ -class Severity -{ - /** - * Not specified. Invalid severity. - * - * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; - */ - const SEVERITY_UNSPECIFIED = 0; - /** - * ERROR-level severity. - * - * Generated from protobuf enum ERROR = 1; - */ - const ERROR = 1; - /** - * WARNING-level severity. - * - * Generated from protobuf enum WARNING = 2; - */ - const WARNING = 2; - /** - * INFO-level severity. - * - * 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\Functions\V2\StateMessage_Severity::class); - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage_Severity.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage_Severity.php deleted file mode 100644 index 1cddc6326e1d..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/StateMessage_Severity.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.functions.v2.StorageSource - */ -class StorageSource extends \Google\Protobuf\Internal\Message -{ - /** - * Google Cloud Storage bucket containing the source (see - * [Bucket Name - * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * - * Generated from protobuf field string bucket = 1; - */ - protected $bucket = ''; - /** - * Google Cloud Storage object containing the source. - * This object must be a gzipped archive file (`.tar.gz`) containing source to - * build. - * - * Generated from protobuf field string object = 2; - */ - protected $object = ''; - /** - * Google Cloud Storage generation for the object. If the generation is - * omitted, the latest generation will be used. - * - * Generated from protobuf field int64 generation = 3; - */ - protected $generation = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket - * Google Cloud Storage bucket containing the source (see - * [Bucket Name - * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * @type string $object - * Google Cloud Storage object containing the source. - * This object must be a gzipped archive file (`.tar.gz`) containing source to - * build. - * @type int|string $generation - * Google Cloud Storage generation for the object. If the generation is - * omitted, the latest generation will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Google Cloud Storage bucket containing the source (see - * [Bucket Name - * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * - * Generated from protobuf field string bucket = 1; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Google Cloud Storage bucket containing the source (see - * [Bucket Name - * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * - * 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; - } - - /** - * Google Cloud Storage object containing the source. - * This object must be a gzipped archive file (`.tar.gz`) containing source to - * build. - * - * Generated from protobuf field string object = 2; - * @return string - */ - public function getObject() - { - return $this->object; - } - - /** - * Google Cloud Storage object containing the source. - * This object must be a gzipped archive file (`.tar.gz`) containing source to - * build. - * - * Generated from protobuf field string object = 2; - * @param string $var - * @return $this - */ - public function setObject($var) - { - GPBUtil::checkString($var, True); - $this->object = $var; - - return $this; - } - - /** - * Google Cloud Storage generation for the object. If the generation is - * omitted, the latest generation will be used. - * - * Generated from protobuf field int64 generation = 3; - * @return int|string - */ - public function getGeneration() - { - return $this->generation; - } - - /** - * Google Cloud Storage generation for the object. If the generation is - * omitted, the latest generation will be used. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/UpdateFunctionRequest.php b/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/UpdateFunctionRequest.php deleted file mode 100644 index 8b7d70695b0e..000000000000 --- a/owl-bot-staging/Functions/v2/proto/src/Google/Cloud/Functions/V2/UpdateFunctionRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.functions.v2.UpdateFunctionRequest - */ -class UpdateFunctionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. New version of the function. - * - * Generated from protobuf field .google.cloud.functions.v2.Function function = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $function = null; - /** - * The list of fields to be updated. - * If no field mask is provided, all provided fields in the request will be - * updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Functions\V2\PBFunction $function - * Required. New version of the function. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * If no field mask is provided, all provided fields in the request will be - * updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Functions\V2\Functions::initOnce(); - parent::__construct($data); - } - - /** - * Required. New version of the function. - * - * Generated from protobuf field .google.cloud.functions.v2.Function function = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Functions\V2\PBFunction|null - */ - public function getFunction() - { - return $this->function; - } - - public function hasFunction() - { - return isset($this->function); - } - - public function clearFunction() - { - unset($this->function); - } - - /** - * Required. New version of the function. - * - * Generated from protobuf field .google.cloud.functions.v2.Function function = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Functions\V2\PBFunction $var - * @return $this - */ - public function setFunction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Functions\V2\PBFunction::class); - $this->function = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * If no field mask is provided, all provided fields in the request will be - * updated. - * - * 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); - } - - /** - * The list of fields to be updated. - * If no field mask is provided, all provided fields in the request will be - * updated. - * - * 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/Functions/v2/samples/V2/FunctionServiceClient/create_function.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/create_function.php deleted file mode 100644 index 89b713ed4e72..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/create_function.php +++ /dev/null @@ -1,84 +0,0 @@ -createFunction($formattedParent, $function); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PBFunction $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FunctionServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - create_function_sample($formattedParent); -} -// [END cloudfunctions_v2_generated_FunctionService_CreateFunction_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/delete_function.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/delete_function.php deleted file mode 100644 index 437039d61657..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/delete_function.php +++ /dev/null @@ -1,77 +0,0 @@ -deleteFunction($formattedName); - $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 = FunctionServiceClient::functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - - delete_function_sample($formattedName); -} -// [END cloudfunctions_v2_generated_FunctionService_DeleteFunction_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_download_url.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_download_url.php deleted file mode 100644 index 439e4416c015..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_download_url.php +++ /dev/null @@ -1,71 +0,0 @@ -generateDownloadUrl($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FunctionServiceClient::functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - - generate_download_url_sample($formattedName); -} -// [END cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_upload_url.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_upload_url.php deleted file mode 100644 index b27f37e9e539..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/generate_upload_url.php +++ /dev/null @@ -1,89 +0,0 @@ -generateUploadUrl($formattedParent); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FunctionServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - generate_upload_url_sample($formattedParent); -} -// [END cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_function.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_function.php deleted file mode 100644 index 01c816215e87..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_function.php +++ /dev/null @@ -1,66 +0,0 @@ -getFunction($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FunctionServiceClient::functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - - get_function_sample($formattedName); -} -// [END cloudfunctions_v2_generated_FunctionService_GetFunction_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_iam_policy.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_iam_policy.php deleted file mode 100644 index 1250bde096bf..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/get_iam_policy.php +++ /dev/null @@ -1,67 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 cloudfunctions_v2_generated_FunctionService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_functions.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_functions.php deleted file mode 100644 index a32f9c9ef44b..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_functions.php +++ /dev/null @@ -1,76 +0,0 @@ -listFunctions($formattedParent); - - /** @var PBFunction $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 = FunctionServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_functions_sample($formattedParent); -} -// [END cloudfunctions_v2_generated_FunctionService_ListFunctions_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_locations.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_locations.php deleted file mode 100644 index a1116d3741c6..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @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 cloudfunctions_v2_generated_FunctionService_ListLocations_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_runtimes.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_runtimes.php deleted file mode 100644 index fb54f55b4649..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/list_runtimes.php +++ /dev/null @@ -1,67 +0,0 @@ -listRuntimes($formattedParent); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FunctionServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_runtimes_sample($formattedParent); -} -// [END cloudfunctions_v2_generated_FunctionService_ListRuntimes_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/set_iam_policy.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/set_iam_policy.php deleted file mode 100644 index b4ccd1f305cc..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/set_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 cloudfunctions_v2_generated_FunctionService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/test_iam_permissions.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/test_iam_permissions.php deleted file mode 100644 index 6d7889f66e03..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,80 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 cloudfunctions_v2_generated_FunctionService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/update_function.php b/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/update_function.php deleted file mode 100644 index 492d333a975e..000000000000 --- a/owl-bot-staging/Functions/v2/samples/V2/FunctionServiceClient/update_function.php +++ /dev/null @@ -1,68 +0,0 @@ -updateFunction($function); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PBFunction $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - 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 cloudfunctions_v2_generated_FunctionService_UpdateFunction_sync] diff --git a/owl-bot-staging/Functions/v2/src/V2/FunctionServiceClient.php b/owl-bot-staging/Functions/v2/src/V2/FunctionServiceClient.php deleted file mode 100644 index c054325b54d3..000000000000 --- a/owl-bot-staging/Functions/v2/src/V2/FunctionServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $function = new PBFunction(); - * $operationResponse = $functionServiceClient->createFunction($formattedParent, $function); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $functionServiceClient->createFunction($formattedParent, $function); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $functionServiceClient->resumeOperation($operationName, 'createFunction'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $functionServiceClient->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. - */ -class FunctionServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.functions.v2.FunctionService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'cloudfunctions.googleapis.com'; - - /** 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 $functionNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/function_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/function_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/function_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/function_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getFunctionNameTemplate() - { - if (self::$functionNameTemplate == null) { - self::$functionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/functions/{function}'); - } - - return self::$functionNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'function' => self::getFunctionNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * 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 location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->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 - * - function: projects/{project}/locations/{location}/functions/{function} - * - 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($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"); - } - - /** - * 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; - } - - /** - * 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 'cloudfunctions.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a new function. If a function with the given name already exists in - * the specified project, the long running operation will return - * `ALREADY_EXISTS` error. - * - * Sample code: - * ``` - * $functionServiceClient = new FunctionServiceClient(); - * try { - * $formattedParent = $functionServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $function = new PBFunction(); - * $operationResponse = $functionServiceClient->createFunction($formattedParent, $function); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $functionServiceClient->createFunction($formattedParent, $function); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $functionServiceClient->resumeOperation($operationName, 'createFunction'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $functionServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and location in which the function should be created, specified - * in the format `projects/*/locations/*` - * @param PBFunction $function Required. Function to be created. - * @param array $optionalArgs { - * Optional. - * - * @type string $functionId - * The ID to use for the function, which will become the final component of - * the function's resource name. - * - * This value should be 4-63 characters, and valid characters - * are /[a-z][0-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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createFunction($parent, $function, array $optionalArgs = []) - { - $request = new CreateFunctionRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setFunction($function); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['functionId'])) { - $request->setFunctionId($optionalArgs['functionId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateFunction', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a function with the given name from the specified project. If the - * given function is used by some trigger, the trigger will be updated to - * remove this function. - * - * Sample code: - * ``` - * $functionServiceClient = new FunctionServiceClient(); - * try { - * $formattedName = $functionServiceClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - * $operationResponse = $functionServiceClient->deleteFunction($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $functionServiceClient->deleteFunction($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $functionServiceClient->resumeOperation($operationName, 'deleteFunction'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $functionServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the function which should be deleted. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteFunction($name, array $optionalArgs = []) - { - $request = new DeleteFunctionRequest(); - $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->startOperationsCall('DeleteFunction', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Returns a signed URL for downloading deployed function source code. - * The URL is only valid for a limited period and should be used within - * 30 minutes of generation. - * For more information about the signed URL usage see: - * https://cloud.google.com/storage/docs/access-control/signed-urls - * - * Sample code: - * ``` - * $functionServiceClient = new FunctionServiceClient(); - * try { - * $formattedName = $functionServiceClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - * $response = $functionServiceClient->generateDownloadUrl($formattedName); - * } finally { - * $functionServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of function for which source code Google Cloud Storage signed - * URL should be generated. - * @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\Functions\V2\GenerateDownloadUrlResponse - * - * @throws ApiException if the remote call fails - */ - public function generateDownloadUrl($name, array $optionalArgs = []) - { - $request = new GenerateDownloadUrlRequest(); - $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('GenerateDownloadUrl', GenerateDownloadUrlResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns a signed URL for uploading a function source code. - * For more information about the signed URL usage see: - * https://cloud.google.com/storage/docs/access-control/signed-urls. - * Once the function source code upload is complete, the used signed - * URL should be provided in CreateFunction or UpdateFunction request - * as a reference to the function source code. - * - * When uploading source code to the generated signed URL, please follow - * these restrictions: - * - * * Source file type should be a zip file. - * * No credentials should be attached - the signed URLs provide access to the - * target bucket using internal service identity; if credentials were - * attached, the identity from the credentials would be used, but that - * identity does not have permissions to upload files to the URL. - * - * When making a HTTP PUT request, these two headers need to be specified: - * - * * `content-type: application/zip` - * - * And this header SHOULD NOT be specified: - * - * * `Authorization: Bearer YOUR_TOKEN` - * - * Sample code: - * ``` - * $functionServiceClient = new FunctionServiceClient(); - * try { - * $formattedParent = $functionServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $functionServiceClient->generateUploadUrl($formattedParent); - * } finally { - * $functionServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and location in which the Google Cloud Storage signed URL - * should be generated, specified in the format `projects/*/locations/*`. - * @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\Functions\V2\GenerateUploadUrlResponse - * - * @throws ApiException if the remote call fails - */ - public function generateUploadUrl($parent, array $optionalArgs = []) - { - $request = new GenerateUploadUrlRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateUploadUrl', GenerateUploadUrlResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns a function with the given name from the requested project. - * - * Sample code: - * ``` - * $functionServiceClient = new FunctionServiceClient(); - * try { - * $formattedName = $functionServiceClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - * $response = $functionServiceClient->getFunction($formattedName); - * } finally { - * $functionServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the function which details should be obtained. - * @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\Functions\V2\PBFunction - * - * @throws ApiException if the remote call fails - */ - public function getFunction($name, array $optionalArgs = []) - { - $request = new GetFunctionRequest(); - $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('GetFunction', PBFunction::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns a list of functions that belong to the requested project. - * - * Sample code: - * ``` - * $functionServiceClient = new FunctionServiceClient(); - * try { - * $formattedParent = $functionServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $functionServiceClient->listFunctions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $functionServiceClient->listFunctions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $functionServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and location from which the function should be listed, - * specified in the format `projects/*/locations/*` - * If you want to list functions in all locations, use "-" in place of a - * location. When listing functions in all locations, if one or more - * location(s) are unreachable, the response will contain functions from all - * reachable locations along with the names of any unreachable locations. - * @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 - * The filter for Functions that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * @type string $orderBy - * The sorting order of the resources returned. Value should be a comma - * separated list of fields. The default sorting oder is ascending. - * See https://google.aip.dev/132#ordering. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listFunctions($parent, array $optionalArgs = []) - { - $request = new ListFunctionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListFunctions', $optionalArgs, ListFunctionsResponse::class, $request); - } - - /** - * Returns a list of runtimes that are supported for the requested project. - * - * Sample code: - * ``` - * $functionServiceClient = new FunctionServiceClient(); - * try { - * $formattedParent = $functionServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $functionServiceClient->listRuntimes($formattedParent); - * } finally { - * $functionServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and location from which the runtimes should be listed, - * specified in the format `projects/*/locations/*` - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * The filter for Runtimes that match the filter expression, - * following the syntax outlined in https://google.aip.dev/160. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Functions\V2\ListRuntimesResponse - * - * @throws ApiException if the remote call fails - */ - public function listRuntimes($parent, array $optionalArgs = []) - { - $request = new ListRuntimesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ListRuntimes', ListRuntimesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates existing function. - * - * Sample code: - * ``` - * $functionServiceClient = new FunctionServiceClient(); - * try { - * $function = new PBFunction(); - * $operationResponse = $functionServiceClient->updateFunction($function); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $functionServiceClient->updateFunction($function); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $functionServiceClient->resumeOperation($operationName, 'updateFunction'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $functionServiceClient->close(); - * } - * ``` - * - * @param PBFunction $function Required. New version of the function. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The list of fields to be updated. - * If no field mask is provided, all provided fields in the request will be - * updated. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateFunction($function, array $optionalArgs = []) - { - $request = new UpdateFunctionRequest(); - $requestParamHeaders = []; - $request->setFunction($function); - $requestParamHeaders['function.name'] = $function->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->startOperationsCall('UpdateFunction', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $functionServiceClient = new FunctionServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $functionServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $functionServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $functionServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $functionServiceClient = new FunctionServiceClient(); - * try { - * $resource = 'resource'; - * $response = $functionServiceClient->getIamPolicy($resource); - * } finally { - * $functionServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $functionServiceClient = new FunctionServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $functionServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $functionServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - 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('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->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. - * - * Sample code: - * ``` - * $functionServiceClient = new FunctionServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $functionServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $functionServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @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\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } -} diff --git a/owl-bot-staging/Functions/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Functions/v2/src/V2/gapic_metadata.json deleted file mode 100644 index 9e109ca2916e..000000000000 --- a/owl-bot-staging/Functions/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.functions.v2", - "libraryPackage": "Google\\Cloud\\Functions\\V2", - "services": { - "FunctionService": { - "clients": { - "grpc": { - "libraryClient": "FunctionServiceGapicClient", - "rpcs": { - "CreateFunction": { - "methods": [ - "createFunction" - ] - }, - "DeleteFunction": { - "methods": [ - "deleteFunction" - ] - }, - "GenerateDownloadUrl": { - "methods": [ - "generateDownloadUrl" - ] - }, - "GenerateUploadUrl": { - "methods": [ - "generateUploadUrl" - ] - }, - "GetFunction": { - "methods": [ - "getFunction" - ] - }, - "ListFunctions": { - "methods": [ - "listFunctions" - ] - }, - "ListRuntimes": { - "methods": [ - "listRuntimes" - ] - }, - "UpdateFunction": { - "methods": [ - "updateFunction" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Functions/v2/src/V2/resources/function_service_client_config.json b/owl-bot-staging/Functions/v2/src/V2/resources/function_service_client_config.json deleted file mode 100644 index bfc64e4b21e5..000000000000 --- a/owl-bot-staging/Functions/v2/src/V2/resources/function_service_client_config.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "interfaces": { - "google.cloud.functions.v2.FunctionService": { - "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": { - "CreateFunction": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteFunction": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GenerateDownloadUrl": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GenerateUploadUrl": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetFunction": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListFunctions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListRuntimes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateFunction": { - "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" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Functions/v2/src/V2/resources/function_service_descriptor_config.php b/owl-bot-staging/Functions/v2/src/V2/resources/function_service_descriptor_config.php deleted file mode 100644 index a73efd804546..000000000000 --- a/owl-bot-staging/Functions/v2/src/V2/resources/function_service_descriptor_config.php +++ /dev/null @@ -1,58 +0,0 @@ - [ - 'google.cloud.functions.v2.FunctionService' => [ - 'CreateFunction' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Functions\V2\PBFunction', - 'metadataReturnType' => '\Google\Cloud\Functions\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteFunction' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Functions\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateFunction' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Functions\V2\PBFunction', - 'metadataReturnType' => '\Google\Cloud\Functions\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListFunctions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFunctions', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Functions/v2/src/V2/resources/function_service_rest_client_config.php b/owl-bot-staging/Functions/v2/src/V2/resources/function_service_rest_client_config.php deleted file mode 100644 index 07539b7883bc..000000000000 --- a/owl-bot-staging/Functions/v2/src/V2/resources/function_service_rest_client_config.php +++ /dev/null @@ -1,176 +0,0 @@ - [ - 'google.cloud.functions.v2.FunctionService' => [ - 'CreateFunction' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/functions', - 'body' => 'function', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteFunction' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/functions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateDownloadUrl' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/functions/*}:generateDownloadUrl', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateUploadUrl' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/functions:generateUploadUrl', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetFunction' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/functions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListFunctions' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/functions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRuntimes' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/runtimes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateFunction' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{function.name=projects/*/locations/*/functions/*}', - 'body' => 'function', - 'placeholders' => [ - 'function.name' => [ - 'getters' => [ - 'getFunction', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/functions/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/functions/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/functions/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - '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/Functions/v2/tests/Unit/V2/FunctionServiceClientTest.php b/owl-bot-staging/Functions/v2/tests/Unit/V2/FunctionServiceClientTest.php deleted file mode 100644 index 5583e58d58f7..000000000000 --- a/owl-bot-staging/Functions/v2/tests/Unit/V2/FunctionServiceClientTest.php +++ /dev/null @@ -1,997 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FunctionServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FunctionServiceClient($options); - } - - /** @test */ - public function createFunctionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new PBFunction(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createFunctionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $function = new PBFunction(); - $response = $gapicClient->createFunction($formattedParent, $function); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v2.FunctionService/CreateFunction', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getFunction(); - $this->assertProtobufEquals($function, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createFunctionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createFunctionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $function = new PBFunction(); - $response = $gapicClient->createFunction($formattedParent, $function); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createFunctionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteFunctionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteFunctionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - $response = $gapicClient->deleteFunction($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v2.FunctionService/DeleteFunction', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFunctionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteFunctionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - $response = $gapicClient->deleteFunction($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFunctionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateDownloadUrlTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $downloadUrl = 'downloadUrl1109408056'; - $expectedResponse = new GenerateDownloadUrlResponse(); - $expectedResponse->setDownloadUrl($downloadUrl); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - $response = $gapicClient->generateDownloadUrl($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v2.FunctionService/GenerateDownloadUrl', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateDownloadUrlExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - try { - $gapicClient->generateDownloadUrl($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 generateUploadUrlTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $uploadUrl = 'uploadUrl-242738639'; - $expectedResponse = new GenerateUploadUrlResponse(); - $expectedResponse->setUploadUrl($uploadUrl); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->generateUploadUrl($formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v2.FunctionService/GenerateUploadUrl', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateUploadUrlExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->generateUploadUrl($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 getFunctionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new PBFunction(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - $response = $gapicClient->getFunction($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v2.FunctionService/GetFunction', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFunctionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->functionName('[PROJECT]', '[LOCATION]', '[FUNCTION]'); - try { - $gapicClient->getFunction($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 listFunctionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $functionsElement = new PBFunction(); - $functions = [ - $functionsElement, - ]; - $expectedResponse = new ListFunctionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFunctions($functions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listFunctions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFunctions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v2.FunctionService/ListFunctions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFunctionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listFunctions($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 listRuntimesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListRuntimesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listRuntimes($formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v2.FunctionService/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]'); - try { - $gapicClient->listRuntimes($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 updateFunctionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new PBFunction(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateFunctionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $function = new PBFunction(); - $response = $gapicClient->updateFunction($function); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.functions.v2.FunctionService/UpdateFunction', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getFunction(); - $this->assertProtobufEquals($function, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFunctionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateFunctionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateFunctionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $function = new PBFunction(); - $response = $gapicClient->updateFunction($function); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFunctionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->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); - $response = $gapicClient->listLocations(); - $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); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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'; - $response = $gapicClient->getIamPolicy($resource); - $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'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $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(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $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 = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->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/GSuiteAddOns/v1/proto/src/GPBMetadata/Google/Cloud/Gsuiteaddons/V1/Gsuiteaddons.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/GPBMetadata/Google/Cloud/Gsuiteaddons/V1/Gsuiteaddons.php deleted file mode 100644 index 2c63a7362f35..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/GPBMetadata/Google/Cloud/Gsuiteaddons/V1/Gsuiteaddons.php +++ /dev/null @@ -1,116 +0,0 @@ -internalAddGeneratedFile( - ' -ž% -/google/cloud/gsuiteaddons/v1/gsuiteaddons.protogoogle.cloud.gsuiteaddons.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto>google/apps/script/type/calendar/calendar_addon_manifest.proto6google/apps/script/type/docs/docs_addon_manifest.proto8google/apps/script/type/drive/drive_addon_manifest.proto8google/apps/script/type/gmail/gmail_addon_manifest.proto-google/apps/script/type/script_manifest.proto:google/apps/script/type/sheets/sheets_addon_manifest.proto:google/apps/script/type/slides/slides_addon_manifest.protogoogle/protobuf/empty.protogoogle/protobuf/wrappers.proto"Z -GetAuthorizationRequest? -name ( B1àAúA+ -)gsuiteaddons.googleapis.com/Authorization"§ - Authorization -name (  -service_account_email (  -oauth_client_id ( :PêAM -)gsuiteaddons.googleapis.com/Authorization projects/{project}/authorization"½ -CreateDeploymentRequestC -parent ( B3àAúA- -+cloudresourcemanager.googleapis.com/Project - deployment_id ( BàAA - -deployment ( 2(.google.cloud.gsuiteaddons.v1.DeploymentBàA"] -ReplaceDeploymentRequestA - -deployment ( 2(.google.cloud.gsuiteaddons.v1.DeploymentBàA"T -GetDeploymentRequest< -name ( B.àAúA( -&gsuiteaddons.googleapis.com/Deployment"„ -ListDeploymentsRequestC -parent ( B3àAúA- -+cloudresourcemanager.googleapis.com/Project - page_size ( - -page_token ( "q -ListDeploymentsResponse= - deployments ( 2(.google.cloud.gsuiteaddons.v1.Deployment -next_page_token ( "e -DeleteDeploymentRequest< -name ( B.àAúA( -&gsuiteaddons.googleapis.com/Deployment -etag ( "X -InstallDeploymentRequest< -name ( B.àAúA( -&gsuiteaddons.googleapis.com/Deployment"Z -UninstallDeploymentRequest< -name ( B.àAúA( -&gsuiteaddons.googleapis.com/Deployment"Z -GetInstallStatusRequest? -name ( B1àAúA+ -)gsuiteaddons.googleapis.com/InstallStatus"· - InstallStatus -name ( - - installed ( 2.google.protobuf.BoolValue:iêAf -)gsuiteaddons.googleapis.com/InstallStatus9projects/{project}/deployments/{deployment}/installStatus"Ï - -Deployment -name (  - oauth_scopes ( 5 -add_ons ( 2$.google.cloud.gsuiteaddons.v1.AddOns -etag ( :XêAU -&gsuiteaddons.googleapis.com/Deployment+projects/{project}/deployments/{deployment}"š -AddOns< -common ( 2,.google.apps.script.type.CommonAddOnManifest@ -gmail ( 21.google.apps.script.type.gmail.GmailAddOnManifest@ -drive ( 21.google.apps.script.type.drive.DriveAddOnManifestI -calendar ( 27.google.apps.script.type.calendar.CalendarAddOnManifest= -docs ( 2/.google.apps.script.type.docs.DocsAddOnManifestC -sheets ( 23.google.apps.script.type.sheets.SheetsAddOnManifestC -slides - ( 23.google.apps.script.type.slides.SlidesAddOnManifest: - http_options ( 2$.google.apps.script.type.HttpOptions2¤ - GSuiteAddOnsª -GetAuthorization5.google.cloud.gsuiteaddons.v1.GetAuthorizationRequest+.google.cloud.gsuiteaddons.v1.Authorization"2‚Óä“%#/v1/{name=projects/*/authorization}ÚAnameÎ -CreateDeployment5.google.cloud.gsuiteaddons.v1.CreateDeploymentRequest(.google.cloud.gsuiteaddons.v1.Deployment"Y‚Óä“1"#/v1/{parent=projects/*}/deployments: -deploymentÚAparent,deployment,deployment_idÆ -ReplaceDeployment6.google.cloud.gsuiteaddons.v1.ReplaceDeploymentRequest(.google.cloud.gsuiteaddons.v1.Deployment"O‚Óä“<./v1/{deployment.name=projects/*/deployments/*}: -deploymentÚA -deployment¡ - GetDeployment2.google.cloud.gsuiteaddons.v1.GetDeploymentRequest(.google.cloud.gsuiteaddons.v1.Deployment"2‚Óä“%#/v1/{name=projects/*/deployments/*}ÚAname´ -ListDeployments4.google.cloud.gsuiteaddons.v1.ListDeploymentsRequest5.google.cloud.gsuiteaddons.v1.ListDeploymentsResponse"4‚Óä“%#/v1/{parent=projects/*}/deploymentsÚAparent• -DeleteDeployment5.google.cloud.gsuiteaddons.v1.DeleteDeploymentRequest.google.protobuf.Empty"2‚Óä“%*#/v1/{name=projects/*/deployments/*}ÚAname¢ -InstallDeployment6.google.cloud.gsuiteaddons.v1.InstallDeploymentRequest.google.protobuf.Empty"=‚Óä“0"+/v1/{name=projects/*/deployments/*}:install:*ÚAname¨ -UninstallDeployment8.google.cloud.gsuiteaddons.v1.UninstallDeploymentRequest.google.protobuf.Empty"?‚Óä“2"-/v1/{name=projects/*/deployments/*}:uninstall:*ÚAname¸ -GetInstallStatus5.google.cloud.gsuiteaddons.v1.GetInstallStatusRequest+.google.cloud.gsuiteaddons.v1.InstallStatus"@‚Óä“31/v1/{name=projects/*/deployments/*/installStatus}ÚAnameOÊAgsuiteaddons.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBá - com.google.cloud.gsuiteaddons.v1BGSuiteAddOnsProtoPZHgoogle.golang.org/genproto/googleapis/cloud/gsuiteaddons/v1;gsuiteaddonsªGoogle.Cloud.GSuiteAddOns.V1ÊGoogle\\Cloud\\GSuiteAddOns\\V1êGoogle::Cloud::GSuiteAddOns::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/AddOns.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/AddOns.php deleted file mode 100644 index e03bb68d1fd1..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/AddOns.php +++ /dev/null @@ -1,385 +0,0 @@ -google.cloud.gsuiteaddons.v1.AddOns - */ -class AddOns extends \Google\Protobuf\Internal\Message -{ - /** - * Configuration that is common across all Google Workspace Add-ons. - * - * Generated from protobuf field .google.apps.script.type.CommonAddOnManifest common = 1; - */ - protected $common = null; - /** - * Gmail add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.gmail.GmailAddOnManifest gmail = 2; - */ - protected $gmail = null; - /** - * Drive add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.drive.DriveAddOnManifest drive = 5; - */ - protected $drive = null; - /** - * Calendar add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.calendar.CalendarAddOnManifest calendar = 6; - */ - protected $calendar = null; - /** - * Docs add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.docs.DocsAddOnManifest docs = 7; - */ - protected $docs = null; - /** - * Sheets add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.sheets.SheetsAddOnManifest sheets = 8; - */ - protected $sheets = null; - /** - * Slides add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.slides.SlidesAddOnManifest slides = 10; - */ - protected $slides = null; - /** - * Options for sending requests to add-on HTTP endpoints - * - * Generated from protobuf field .google.apps.script.type.HttpOptions http_options = 15; - */ - protected $http_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Script\Type\CommonAddOnManifest $common - * Configuration that is common across all Google Workspace Add-ons. - * @type \Google\Apps\Script\Type\Gmail\GmailAddOnManifest $gmail - * Gmail add-on configuration. - * @type \Google\Apps\Script\Type\Drive\DriveAddOnManifest $drive - * Drive add-on configuration. - * @type \Google\Apps\Script\Type\Calendar\CalendarAddOnManifest $calendar - * Calendar add-on configuration. - * @type \Google\Apps\Script\Type\Docs\DocsAddOnManifest $docs - * Docs add-on configuration. - * @type \Google\Apps\Script\Type\Sheets\SheetsAddOnManifest $sheets - * Sheets add-on configuration. - * @type \Google\Apps\Script\Type\Slides\SlidesAddOnManifest $slides - * Slides add-on configuration. - * @type \Google\Apps\Script\Type\HttpOptions $http_options - * Options for sending requests to add-on HTTP endpoints - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Configuration that is common across all Google Workspace Add-ons. - * - * Generated from protobuf field .google.apps.script.type.CommonAddOnManifest common = 1; - * @return \Google\Apps\Script\Type\CommonAddOnManifest|null - */ - public function getCommon() - { - return $this->common; - } - - public function hasCommon() - { - return isset($this->common); - } - - public function clearCommon() - { - unset($this->common); - } - - /** - * Configuration that is common across all Google Workspace Add-ons. - * - * Generated from protobuf field .google.apps.script.type.CommonAddOnManifest common = 1; - * @param \Google\Apps\Script\Type\CommonAddOnManifest $var - * @return $this - */ - public function setCommon($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\CommonAddOnManifest::class); - $this->common = $var; - - return $this; - } - - /** - * Gmail add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.gmail.GmailAddOnManifest gmail = 2; - * @return \Google\Apps\Script\Type\Gmail\GmailAddOnManifest|null - */ - public function getGmail() - { - return $this->gmail; - } - - public function hasGmail() - { - return isset($this->gmail); - } - - public function clearGmail() - { - unset($this->gmail); - } - - /** - * Gmail add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.gmail.GmailAddOnManifest gmail = 2; - * @param \Google\Apps\Script\Type\Gmail\GmailAddOnManifest $var - * @return $this - */ - public function setGmail($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Gmail\GmailAddOnManifest::class); - $this->gmail = $var; - - return $this; - } - - /** - * Drive add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.drive.DriveAddOnManifest drive = 5; - * @return \Google\Apps\Script\Type\Drive\DriveAddOnManifest|null - */ - public function getDrive() - { - return $this->drive; - } - - public function hasDrive() - { - return isset($this->drive); - } - - public function clearDrive() - { - unset($this->drive); - } - - /** - * Drive add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.drive.DriveAddOnManifest drive = 5; - * @param \Google\Apps\Script\Type\Drive\DriveAddOnManifest $var - * @return $this - */ - public function setDrive($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Drive\DriveAddOnManifest::class); - $this->drive = $var; - - return $this; - } - - /** - * Calendar add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.calendar.CalendarAddOnManifest calendar = 6; - * @return \Google\Apps\Script\Type\Calendar\CalendarAddOnManifest|null - */ - public function getCalendar() - { - return $this->calendar; - } - - public function hasCalendar() - { - return isset($this->calendar); - } - - public function clearCalendar() - { - unset($this->calendar); - } - - /** - * Calendar add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.calendar.CalendarAddOnManifest calendar = 6; - * @param \Google\Apps\Script\Type\Calendar\CalendarAddOnManifest $var - * @return $this - */ - public function setCalendar($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Calendar\CalendarAddOnManifest::class); - $this->calendar = $var; - - return $this; - } - - /** - * Docs add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.docs.DocsAddOnManifest docs = 7; - * @return \Google\Apps\Script\Type\Docs\DocsAddOnManifest|null - */ - public function getDocs() - { - return $this->docs; - } - - public function hasDocs() - { - return isset($this->docs); - } - - public function clearDocs() - { - unset($this->docs); - } - - /** - * Docs add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.docs.DocsAddOnManifest docs = 7; - * @param \Google\Apps\Script\Type\Docs\DocsAddOnManifest $var - * @return $this - */ - public function setDocs($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Docs\DocsAddOnManifest::class); - $this->docs = $var; - - return $this; - } - - /** - * Sheets add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.sheets.SheetsAddOnManifest sheets = 8; - * @return \Google\Apps\Script\Type\Sheets\SheetsAddOnManifest|null - */ - public function getSheets() - { - return $this->sheets; - } - - public function hasSheets() - { - return isset($this->sheets); - } - - public function clearSheets() - { - unset($this->sheets); - } - - /** - * Sheets add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.sheets.SheetsAddOnManifest sheets = 8; - * @param \Google\Apps\Script\Type\Sheets\SheetsAddOnManifest $var - * @return $this - */ - public function setSheets($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Sheets\SheetsAddOnManifest::class); - $this->sheets = $var; - - return $this; - } - - /** - * Slides add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.slides.SlidesAddOnManifest slides = 10; - * @return \Google\Apps\Script\Type\Slides\SlidesAddOnManifest|null - */ - public function getSlides() - { - return $this->slides; - } - - public function hasSlides() - { - return isset($this->slides); - } - - public function clearSlides() - { - unset($this->slides); - } - - /** - * Slides add-on configuration. - * - * Generated from protobuf field .google.apps.script.type.slides.SlidesAddOnManifest slides = 10; - * @param \Google\Apps\Script\Type\Slides\SlidesAddOnManifest $var - * @return $this - */ - public function setSlides($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\Slides\SlidesAddOnManifest::class); - $this->slides = $var; - - return $this; - } - - /** - * Options for sending requests to add-on HTTP endpoints - * - * Generated from protobuf field .google.apps.script.type.HttpOptions http_options = 15; - * @return \Google\Apps\Script\Type\HttpOptions|null - */ - public function getHttpOptions() - { - return $this->http_options; - } - - public function hasHttpOptions() - { - return isset($this->http_options); - } - - public function clearHttpOptions() - { - unset($this->http_options); - } - - /** - * Options for sending requests to add-on HTTP endpoints - * - * Generated from protobuf field .google.apps.script.type.HttpOptions http_options = 15; - * @param \Google\Apps\Script\Type\HttpOptions $var - * @return $this - */ - public function setHttpOptions($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Script\Type\HttpOptions::class); - $this->http_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Authorization.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Authorization.php deleted file mode 100644 index 904cb85121ea..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Authorization.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.gsuiteaddons.v1.Authorization - */ -class Authorization extends \Google\Protobuf\Internal\Message -{ - /** - * The canonical full name of this resource. - * Example: `projects/123/authorization` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The email address of the service account used to authenticate requests to - * add-on callback endpoints. - * - * Generated from protobuf field string service_account_email = 2; - */ - protected $service_account_email = ''; - /** - * The OAuth client ID used to obtain OAuth access tokens for a user on the - * add-on's behalf. - * - * Generated from protobuf field string oauth_client_id = 3; - */ - protected $oauth_client_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The canonical full name of this resource. - * Example: `projects/123/authorization` - * @type string $service_account_email - * The email address of the service account used to authenticate requests to - * add-on callback endpoints. - * @type string $oauth_client_id - * The OAuth client ID used to obtain OAuth access tokens for a user on the - * add-on's behalf. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * The canonical full name of this resource. - * Example: `projects/123/authorization` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The canonical full name of this resource. - * Example: `projects/123/authorization` - * - * 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 email address of the service account used to authenticate requests to - * add-on callback endpoints. - * - * Generated from protobuf field string service_account_email = 2; - * @return string - */ - public function getServiceAccountEmail() - { - return $this->service_account_email; - } - - /** - * The email address of the service account used to authenticate requests to - * add-on callback endpoints. - * - * Generated from protobuf field string service_account_email = 2; - * @param string $var - * @return $this - */ - public function setServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->service_account_email = $var; - - return $this; - } - - /** - * The OAuth client ID used to obtain OAuth access tokens for a user on the - * add-on's behalf. - * - * Generated from protobuf field string oauth_client_id = 3; - * @return string - */ - public function getOauthClientId() - { - return $this->oauth_client_id; - } - - /** - * The OAuth client ID used to obtain OAuth access tokens for a user on the - * add-on's behalf. - * - * Generated from protobuf field string oauth_client_id = 3; - * @param string $var - * @return $this - */ - public function setOauthClientId($var) - { - GPBUtil::checkString($var, True); - $this->oauth_client_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/CreateDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/CreateDeploymentRequest.php deleted file mode 100644 index 5dcdd273d80a..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/CreateDeploymentRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.gsuiteaddons.v1.CreateDeploymentRequest - */ -class CreateDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the project in which to create the deployment. - * Example: `projects/my_project`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The id to use for this deployment. The full name of the created - * resource will be `projects//deployments/`. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $deployment_id = ''; - /** - * Required. The deployment to create (deployment.name cannot be set). - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $deployment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the project in which to create the deployment. - * Example: `projects/my_project`. - * @type string $deployment_id - * Required. The id to use for this deployment. The full name of the created - * resource will be `projects//deployments/`. - * @type \Google\Cloud\GSuiteAddOns\V1\Deployment $deployment - * Required. The deployment to create (deployment.name cannot be set). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the project in which to create the deployment. - * Example: `projects/my_project`. - * - * Generated 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 project in which to create the deployment. - * Example: `projects/my_project`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 this deployment. The full name of the created - * resource will be `projects//deployments/`. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDeploymentId() - { - return $this->deployment_id; - } - - /** - * Required. The id to use for this deployment. The full name of the created - * resource will be `projects//deployments/`. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDeploymentId($var) - { - GPBUtil::checkString($var, True); - $this->deployment_id = $var; - - return $this; - } - - /** - * Required. The deployment to create (deployment.name cannot be set). - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GSuiteAddOns\V1\Deployment|null - */ - public function getDeployment() - { - return $this->deployment; - } - - public function hasDeployment() - { - return isset($this->deployment); - } - - public function clearDeployment() - { - unset($this->deployment); - } - - /** - * Required. The deployment to create (deployment.name cannot be set). - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GSuiteAddOns\V1\Deployment $var - * @return $this - */ - public function setDeployment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GSuiteAddOns\V1\Deployment::class); - $this->deployment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/DeleteDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/DeleteDeploymentRequest.php deleted file mode 100644 index bd45cf7ec24a..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/DeleteDeploymentRequest.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gsuiteaddons.v1.DeleteDeploymentRequest - */ -class DeleteDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the deployment to delete. - * Example: `projects/my_project/deployments/my_deployment`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The etag of the deployment to delete. - * If this is provided, it must match the server's etag. - * - * Generated from protobuf field string etag = 2; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the deployment to delete. - * Example: `projects/my_project/deployments/my_deployment`. - * @type string $etag - * The etag of the deployment to delete. - * If this is provided, it must match the server's etag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the deployment to delete. - * Example: `projects/my_project/deployments/my_deployment`. - * - * Generated 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 full resource name of the deployment to delete. - * Example: `projects/my_project/deployments/my_deployment`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 etag of the deployment to delete. - * If this is provided, it must match the server's etag. - * - * Generated from protobuf field string etag = 2; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The etag of the deployment to delete. - * If this is provided, it must match the server's etag. - * - * Generated from protobuf field string etag = 2; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Deployment.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Deployment.php deleted file mode 100644 index 4eb8c8fefa1d..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/Deployment.php +++ /dev/null @@ -1,195 +0,0 @@ -google.cloud.gsuiteaddons.v1.Deployment - */ -class Deployment extends \Google\Protobuf\Internal\Message -{ - /** - * The deployment resource name. - * Example: projects/123/deployments/my_deployment. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The list of Google OAuth scopes for which to request consent from the end - * user before executing an add-on endpoint. - * - * Generated from protobuf field repeated string oauth_scopes = 2; - */ - private $oauth_scopes; - /** - * The Google Workspace Add-on configuration. - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.AddOns add_ons = 3; - */ - protected $add_ons = null; - /** - * This value is computed by the server based on the version of the - * deployment in storage, 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; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The deployment resource name. - * Example: projects/123/deployments/my_deployment. - * @type array|\Google\Protobuf\Internal\RepeatedField $oauth_scopes - * The list of Google OAuth scopes for which to request consent from the end - * user before executing an add-on endpoint. - * @type \Google\Cloud\GSuiteAddOns\V1\AddOns $add_ons - * The Google Workspace Add-on configuration. - * @type string $etag - * This value is computed by the server based on the version of the - * deployment in storage, 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\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * The deployment resource name. - * Example: projects/123/deployments/my_deployment. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The deployment resource name. - * Example: projects/123/deployments/my_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; - } - - /** - * The list of Google OAuth scopes for which to request consent from the end - * user before executing an add-on endpoint. - * - * Generated from protobuf field repeated string oauth_scopes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOauthScopes() - { - return $this->oauth_scopes; - } - - /** - * The list of Google OAuth scopes for which to request consent from the end - * user before executing an add-on endpoint. - * - * Generated from protobuf field repeated string oauth_scopes = 2; - * @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; - } - - /** - * The Google Workspace Add-on configuration. - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.AddOns add_ons = 3; - * @return \Google\Cloud\GSuiteAddOns\V1\AddOns|null - */ - public function getAddOns() - { - return $this->add_ons; - } - - public function hasAddOns() - { - return isset($this->add_ons); - } - - public function clearAddOns() - { - unset($this->add_ons); - } - - /** - * The Google Workspace Add-on configuration. - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.AddOns add_ons = 3; - * @param \Google\Cloud\GSuiteAddOns\V1\AddOns $var - * @return $this - */ - public function setAddOns($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GSuiteAddOns\V1\AddOns::class); - $this->add_ons = $var; - - return $this; - } - - /** - * This value is computed by the server based on the version of the - * deployment in storage, 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; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This value is computed by the server based on the version of the - * deployment in storage, 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; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GSuiteAddOnsGrpcClient.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GSuiteAddOnsGrpcClient.php deleted file mode 100644 index 49592e751e79..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GSuiteAddOnsGrpcClient.php +++ /dev/null @@ -1,201 +0,0 @@ -_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/GetAuthorization', - $argument, - ['\Google\Cloud\GSuiteAddOns\V1\Authorization', 'decode'], - $metadata, $options); - } - - /** - * Creates a deployment with the specified name and configuration. - * @param \Google\Cloud\GSuiteAddOns\V1\CreateDeploymentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateDeployment(\Google\Cloud\GSuiteAddOns\V1\CreateDeploymentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/CreateDeployment', - $argument, - ['\Google\Cloud\GSuiteAddOns\V1\Deployment', 'decode'], - $metadata, $options); - } - - /** - * Creates or replaces a deployment with the specified name. - * @param \Google\Cloud\GSuiteAddOns\V1\ReplaceDeploymentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ReplaceDeployment(\Google\Cloud\GSuiteAddOns\V1\ReplaceDeploymentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/ReplaceDeployment', - $argument, - ['\Google\Cloud\GSuiteAddOns\V1\Deployment', 'decode'], - $metadata, $options); - } - - /** - * Gets the deployment with the specified name. - * @param \Google\Cloud\GSuiteAddOns\V1\GetDeploymentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetDeployment(\Google\Cloud\GSuiteAddOns\V1\GetDeploymentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/GetDeployment', - $argument, - ['\Google\Cloud\GSuiteAddOns\V1\Deployment', 'decode'], - $metadata, $options); - } - - /** - * Lists all deployments in a particular project. - * @param \Google\Cloud\GSuiteAddOns\V1\ListDeploymentsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListDeployments(\Google\Cloud\GSuiteAddOns\V1\ListDeploymentsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/ListDeployments', - $argument, - ['\Google\Cloud\GSuiteAddOns\V1\ListDeploymentsResponse', 'decode'], - $metadata, $options); - } - - /** - * Deletes the deployment with the given name. - * @param \Google\Cloud\GSuiteAddOns\V1\DeleteDeploymentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteDeployment(\Google\Cloud\GSuiteAddOns\V1\DeleteDeploymentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/DeleteDeployment', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Installs a deployment in developer mode. - * See: - * https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons. - * @param \Google\Cloud\GSuiteAddOns\V1\InstallDeploymentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function InstallDeployment(\Google\Cloud\GSuiteAddOns\V1\InstallDeploymentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/InstallDeployment', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Uninstalls a developer mode deployment. - * See: - * https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons. - * @param \Google\Cloud\GSuiteAddOns\V1\UninstallDeploymentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UninstallDeployment(\Google\Cloud\GSuiteAddOns\V1\UninstallDeploymentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/UninstallDeployment', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Fetches the install status of a developer mode deployment. - * @param \Google\Cloud\GSuiteAddOns\V1\GetInstallStatusRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetInstallStatus(\Google\Cloud\GSuiteAddOns\V1\GetInstallStatusRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/GetInstallStatus', - $argument, - ['\Google\Cloud\GSuiteAddOns\V1\InstallStatus', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetAuthorizationRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetAuthorizationRequest.php deleted file mode 100644 index 5d97c9470fa7..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetAuthorizationRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.gsuiteaddons.v1.GetAuthorizationRequest - */ -class GetAuthorizationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the project for which to get the Google Workspace Add-ons - * authorization information. - * Example: `projects/my_project/authorization`. - * - * Generated from protobuf field string name = 2 [(.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 project for which to get the Google Workspace Add-ons - * authorization information. - * Example: `projects/my_project/authorization`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the project for which to get the Google Workspace Add-ons - * authorization information. - * Example: `projects/my_project/authorization`. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the project for which to get the Google Workspace Add-ons - * authorization information. - * Example: `projects/my_project/authorization`. - * - * Generated from protobuf field string name = 2 [(.google.api.field_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/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetDeploymentRequest.php deleted file mode 100644 index 0ac235205729..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetDeploymentRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gsuiteaddons.v1.GetDeploymentRequest - */ -class GetDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the deployment to get. - * Example: `projects/my_project/deployments/my_deployment`. - * - * 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 full resource name of the deployment to get. - * Example: `projects/my_project/deployments/my_deployment`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the deployment to get. - * Example: `projects/my_project/deployments/my_deployment`. - * - * Generated 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 full resource name of the deployment to get. - * Example: `projects/my_project/deployments/my_deployment`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetInstallStatusRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetInstallStatusRequest.php deleted file mode 100644 index d1821b4cbb93..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/GetInstallStatusRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gsuiteaddons.v1.GetInstallStatusRequest - */ -class GetInstallStatusRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the deployment. - * Example: `projects/my_project/deployments/my_deployment/installStatus`. - * - * 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 full resource name of the deployment. - * Example: `projects/my_project/deployments/my_deployment/installStatus`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the deployment. - * Example: `projects/my_project/deployments/my_deployment/installStatus`. - * - * Generated 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 full resource name of the deployment. - * Example: `projects/my_project/deployments/my_deployment/installStatus`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallDeploymentRequest.php deleted file mode 100644 index 357413474442..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallDeploymentRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gsuiteaddons.v1.InstallDeploymentRequest - */ -class InstallDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * - * 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 full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * - * Generated 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 full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallStatus.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallStatus.php deleted file mode 100644 index d3636bd3028c..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/InstallStatus.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.gsuiteaddons.v1.InstallStatus - */ -class InstallStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The canonical full resource name of the deployment install status. - * Example: `projects/123/deployments/my_deployment/installStatus`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * True if the deployment is installed for the user - * - * Generated from protobuf field .google.protobuf.BoolValue installed = 2; - */ - protected $installed = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The canonical full resource name of the deployment install status. - * Example: `projects/123/deployments/my_deployment/installStatus`. - * @type \Google\Protobuf\BoolValue $installed - * True if the deployment is installed for the user - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * The canonical full resource name of the deployment install status. - * Example: `projects/123/deployments/my_deployment/installStatus`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The canonical full resource name of the deployment install status. - * Example: `projects/123/deployments/my_deployment/installStatus`. - * - * 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; - } - - /** - * True if the deployment is installed for the user - * - * Generated from protobuf field .google.protobuf.BoolValue installed = 2; - * @return \Google\Protobuf\BoolValue|null - */ - public function getInstalled() - { - return $this->installed; - } - - public function hasInstalled() - { - return isset($this->installed); - } - - public function clearInstalled() - { - unset($this->installed); - } - - /** - * Returns the unboxed value from getInstalled() - - * True if the deployment is installed for the user - * - * Generated from protobuf field .google.protobuf.BoolValue installed = 2; - * @return bool|null - */ - public function getInstalledUnwrapped() - { - return $this->readWrapperValue("installed"); - } - - /** - * True if the deployment is installed for the user - * - * Generated from protobuf field .google.protobuf.BoolValue installed = 2; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setInstalled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->installed = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * True if the deployment is installed for the user - * - * Generated from protobuf field .google.protobuf.BoolValue installed = 2; - * @param bool|null $var - * @return $this - */ - public function setInstalledUnwrapped($var) - { - $this->writeWrapperValue("installed", $var); - return $this;} - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsRequest.php deleted file mode 100644 index 3f57c4a53c3f..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsRequest.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.gsuiteaddons.v1.ListDeploymentsRequest - */ -class ListDeploymentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the project in which to create the deployment. - * Example: `projects/my_project`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of deployments to return. The service may return fewer - * than this value. - * If unspecified, at most 1000 deployments 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 `ListDeployments` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDeployments` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the project in which to create the deployment. - * Example: `projects/my_project`. - * @type int $page_size - * The maximum number of deployments to return. The service may return fewer - * than this value. - * If unspecified, at most 1000 deployments 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 `ListDeployments` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDeployments` must - * match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the project in which to create the deployment. - * Example: `projects/my_project`. - * - * Generated 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 project in which to create the deployment. - * Example: `projects/my_project`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 deployments to return. The service may return fewer - * than this value. - * If unspecified, at most 1000 deployments 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 deployments to return. The service may return fewer - * than this value. - * If unspecified, at most 1000 deployments 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 `ListDeployments` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDeployments` 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 `ListDeployments` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDeployments` 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; - } - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsResponse.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsResponse.php deleted file mode 100644 index 4a2b06a63091..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ListDeploymentsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.gsuiteaddons.v1.ListDeploymentsResponse - */ -class ListDeploymentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of deployments for the given project. - * - * Generated from protobuf field repeated .google.cloud.gsuiteaddons.v1.Deployment deployments = 1; - */ - private $deployments; - /** - * A token, which 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 = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GSuiteAddOns\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $deployments - * The list of deployments for the given project. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * The list of deployments for the given project. - * - * Generated from protobuf field repeated .google.cloud.gsuiteaddons.v1.Deployment deployments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeployments() - { - return $this->deployments; - } - - /** - * The list of deployments for the given project. - * - * Generated from protobuf field repeated .google.cloud.gsuiteaddons.v1.Deployment deployments = 1; - * @param array<\Google\Cloud\GSuiteAddOns\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeployments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GSuiteAddOns\V1\Deployment::class); - $this->deployments = $arr; - - return $this; - } - - /** - * A token, which 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, which 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; - } - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ReplaceDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ReplaceDeploymentRequest.php deleted file mode 100644 index d882de2fdaee..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/ReplaceDeploymentRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.gsuiteaddons.v1.ReplaceDeploymentRequest - */ -class ReplaceDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The deployment to create or replace. - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $deployment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GSuiteAddOns\V1\Deployment $deployment - * Required. The deployment to create or replace. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. The deployment to create or replace. - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GSuiteAddOns\V1\Deployment|null - */ - public function getDeployment() - { - return $this->deployment; - } - - public function hasDeployment() - { - return isset($this->deployment); - } - - public function clearDeployment() - { - unset($this->deployment); - } - - /** - * Required. The deployment to create or replace. - * - * Generated from protobuf field .google.cloud.gsuiteaddons.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GSuiteAddOns\V1\Deployment $var - * @return $this - */ - public function setDeployment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GSuiteAddOns\V1\Deployment::class); - $this->deployment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/UninstallDeploymentRequest.php b/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/UninstallDeploymentRequest.php deleted file mode 100644 index 1245770faf7f..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/proto/src/Google/Cloud/GSuiteAddOns/V1/UninstallDeploymentRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gsuiteaddons.v1.UninstallDeploymentRequest - */ -class UninstallDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * - * 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 full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * - * Generated 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 full resource name of the deployment to install. - * Example: `projects/my_project/deployments/my_deployment`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/create_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/create_deployment.php deleted file mode 100644 index f2adc0c41f3d..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/create_deployment.php +++ /dev/null @@ -1,74 +0,0 @@ -/deployments/`. - */ -function create_deployment_sample(string $formattedParent, string $deploymentId): void -{ - // Create a client. - $gSuiteAddOnsClient = new GSuiteAddOnsClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $deployment = new Deployment(); - - // Call the API and handle any network failures. - try { - /** @var Deployment $response */ - $response = $gSuiteAddOnsClient->createDeployment($formattedParent, $deploymentId, $deployment); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = GSuiteAddOnsClient::projectName('[PROJECT]'); - $deploymentId = '[DEPLOYMENT_ID]'; - - create_deployment_sample($formattedParent, $deploymentId); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_CreateDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/delete_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/delete_deployment.php deleted file mode 100644 index ba4dd15cf4f2..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/delete_deployment.php +++ /dev/null @@ -1,66 +0,0 @@ -deleteDeployment($formattedName); - 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 = GSuiteAddOnsClient::deploymentName('[PROJECT]', '[DEPLOYMENT]'); - - delete_deployment_sample($formattedName); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_DeleteDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_authorization.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_authorization.php deleted file mode 100644 index 5b1bbd12a79b..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_authorization.php +++ /dev/null @@ -1,69 +0,0 @@ -getAuthorization($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GSuiteAddOnsClient::authorizationName('[PROJECT]'); - - get_authorization_sample($formattedName); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_GetAuthorization_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_deployment.php deleted file mode 100644 index 6372bbb3ed1b..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_deployment.php +++ /dev/null @@ -1,68 +0,0 @@ -getDeployment($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GSuiteAddOnsClient::deploymentName('[PROJECT]', '[DEPLOYMENT]'); - - get_deployment_sample($formattedName); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_GetDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_install_status.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_install_status.php deleted file mode 100644 index 56b1b64fb3c4..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/get_install_status.php +++ /dev/null @@ -1,68 +0,0 @@ -getInstallStatus($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GSuiteAddOnsClient::installStatusName('[PROJECT]', '[DEPLOYMENT]'); - - get_install_status_sample($formattedName); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_GetInstallStatus_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/install_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/install_deployment.php deleted file mode 100644 index d3aa7a62c546..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/install_deployment.php +++ /dev/null @@ -1,68 +0,0 @@ -installDeployment($formattedName); - 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 = GSuiteAddOnsClient::deploymentName('[PROJECT]', '[DEPLOYMENT]'); - - install_deployment_sample($formattedName); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_InstallDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/list_deployments.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/list_deployments.php deleted file mode 100644 index 7e14f45199b8..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/list_deployments.php +++ /dev/null @@ -1,73 +0,0 @@ -listDeployments($formattedParent); - - /** @var Deployment $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 = GSuiteAddOnsClient::projectName('[PROJECT]'); - - list_deployments_sample($formattedParent); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_ListDeployments_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/replace_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/replace_deployment.php deleted file mode 100644 index 936118667ee3..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/replace_deployment.php +++ /dev/null @@ -1,56 +0,0 @@ -replaceDeployment($deployment); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_ReplaceDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/uninstall_deployment.php b/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/uninstall_deployment.php deleted file mode 100644 index 6ce7ea0c67b3..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/samples/V1/GSuiteAddOnsClient/uninstall_deployment.php +++ /dev/null @@ -1,68 +0,0 @@ -uninstallDeployment($formattedName); - 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 = GSuiteAddOnsClient::deploymentName('[PROJECT]', '[DEPLOYMENT]'); - - uninstall_deployment_sample($formattedName); -} -// [END gsuiteaddons_v1_generated_GSuiteAddOns_UninstallDeployment_sync] diff --git a/owl-bot-staging/GSuiteAddOns/v1/src/V1/GSuiteAddOnsClient.php b/owl-bot-staging/GSuiteAddOns/v1/src/V1/GSuiteAddOnsClient.php deleted file mode 100644 index 6d79879fbeec..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/src/V1/GSuiteAddOnsClient.php +++ /dev/null @@ -1,34 +0,0 @@ -projectName('[PROJECT]'); - * $deploymentId = 'deployment_id'; - * $deployment = new Deployment(); - * $response = $gSuiteAddOnsClient->createDeployment($formattedParent, $deploymentId, $deployment); - * } finally { - * $gSuiteAddOnsClient->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. - */ -class GSuiteAddOnsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.gsuiteaddons.v1.GSuiteAddOns'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'gsuiteaddons.googleapis.com'; - - /** 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 $authorizationNameTemplate; - - private static $deploymentNameTemplate; - - private static $installStatusNameTemplate; - - private static $projectNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/g_suite_add_ons_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/g_suite_add_ons_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/g_suite_add_ons_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/g_suite_add_ons_rest_client_config.php', - ], - ], - ]; - } - - private static function getAuthorizationNameTemplate() - { - if (self::$authorizationNameTemplate == null) { - self::$authorizationNameTemplate = new PathTemplate('projects/{project}/authorization'); - } - - return self::$authorizationNameTemplate; - } - - private static function getDeploymentNameTemplate() - { - if (self::$deploymentNameTemplate == null) { - self::$deploymentNameTemplate = new PathTemplate('projects/{project}/deployments/{deployment}'); - } - - return self::$deploymentNameTemplate; - } - - private static function getInstallStatusNameTemplate() - { - if (self::$installStatusNameTemplate == null) { - self::$installStatusNameTemplate = new PathTemplate('projects/{project}/deployments/{deployment}/installStatus'); - } - - return self::$installStatusNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'authorization' => self::getAuthorizationNameTemplate(), - 'deployment' => self::getDeploymentNameTemplate(), - 'installStatus' => self::getInstallStatusNameTemplate(), - 'project' => self::getProjectNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * authorization resource. - * - * @param string $project - * - * @return string The formatted authorization resource. - */ - public static function authorizationName($project) - { - return self::getAuthorizationNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a deployment - * resource. - * - * @param string $project - * @param string $deployment - * - * @return string The formatted deployment resource. - */ - public static function deploymentName($project, $deployment) - { - return self::getDeploymentNameTemplate()->render([ - 'project' => $project, - 'deployment' => $deployment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * install_status resource. - * - * @param string $project - * @param string $deployment - * - * @return string The formatted install_status resource. - */ - public static function installStatusName($project, $deployment) - { - return self::getInstallStatusNameTemplate()->render([ - 'project' => $project, - 'deployment' => $deployment, - ]); - } - - /** - * 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, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - authorization: projects/{project}/authorization - * - deployment: projects/{project}/deployments/{deployment} - * - installStatus: projects/{project}/deployments/{deployment}/installStatus - * - 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($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 'gsuiteaddons.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 deployment with the specified name and configuration. - * - * Sample code: - * ``` - * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); - * try { - * $formattedParent = $gSuiteAddOnsClient->projectName('[PROJECT]'); - * $deploymentId = 'deployment_id'; - * $deployment = new Deployment(); - * $response = $gSuiteAddOnsClient->createDeployment($formattedParent, $deploymentId, $deployment); - * } finally { - * $gSuiteAddOnsClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the project in which to create the deployment. - * - * Example: `projects/my_project`. - * @param string $deploymentId Required. The id to use for this deployment. The full name of the created - * resource will be `projects//deployments/`. - * @param Deployment $deployment Required. The deployment to create (deployment.name cannot be set). - * @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\GSuiteAddOns\V1\Deployment - * - * @throws ApiException if the remote call fails - */ - public function createDeployment($parent, $deploymentId, $deployment, array $optionalArgs = []) - { - $request = new CreateDeploymentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDeploymentId($deploymentId); - $request->setDeployment($deployment); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateDeployment', Deployment::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the deployment with the given name. - * - * Sample code: - * ``` - * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); - * try { - * $formattedName = $gSuiteAddOnsClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - * $gSuiteAddOnsClient->deleteDeployment($formattedName); - * } finally { - * $gSuiteAddOnsClient->close(); - * } - * ``` - * - * @param string $name Required. The full resource name of the deployment to delete. - * - * Example: `projects/my_project/deployments/my_deployment`. - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * The etag of the deployment to delete. - * If this is provided, it must match the server's etag. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteDeployment($name, array $optionalArgs = []) - { - $request = new DeleteDeploymentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteDeployment', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the authorization information for deployments in a given project. - * - * Sample code: - * ``` - * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); - * try { - * $formattedName = $gSuiteAddOnsClient->authorizationName('[PROJECT]'); - * $response = $gSuiteAddOnsClient->getAuthorization($formattedName); - * } finally { - * $gSuiteAddOnsClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the project for which to get the Google Workspace Add-ons - * authorization information. - * - * Example: `projects/my_project/authorization`. - * @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\GSuiteAddOns\V1\Authorization - * - * @throws ApiException if the remote call fails - */ - public function getAuthorization($name, array $optionalArgs = []) - { - $request = new GetAuthorizationRequest(); - $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('GetAuthorization', Authorization::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the deployment with the specified name. - * - * Sample code: - * ``` - * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); - * try { - * $formattedName = $gSuiteAddOnsClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - * $response = $gSuiteAddOnsClient->getDeployment($formattedName); - * } finally { - * $gSuiteAddOnsClient->close(); - * } - * ``` - * - * @param string $name Required. The full resource name of the deployment to get. - * - * Example: `projects/my_project/deployments/my_deployment`. - * @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\GSuiteAddOns\V1\Deployment - * - * @throws ApiException if the remote call fails - */ - public function getDeployment($name, array $optionalArgs = []) - { - $request = new GetDeploymentRequest(); - $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('GetDeployment', Deployment::class, $optionalArgs, $request)->wait(); - } - - /** - * Fetches the install status of a developer mode deployment. - * - * Sample code: - * ``` - * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); - * try { - * $formattedName = $gSuiteAddOnsClient->installStatusName('[PROJECT]', '[DEPLOYMENT]'); - * $response = $gSuiteAddOnsClient->getInstallStatus($formattedName); - * } finally { - * $gSuiteAddOnsClient->close(); - * } - * ``` - * - * @param string $name Required. The full resource name of the deployment. - * - * Example: `projects/my_project/deployments/my_deployment/installStatus`. - * @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\GSuiteAddOns\V1\InstallStatus - * - * @throws ApiException if the remote call fails - */ - public function getInstallStatus($name, array $optionalArgs = []) - { - $request = new GetInstallStatusRequest(); - $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('GetInstallStatus', InstallStatus::class, $optionalArgs, $request)->wait(); - } - - /** - * Installs a deployment in developer mode. - * See: - * https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons. - * - * Sample code: - * ``` - * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); - * try { - * $formattedName = $gSuiteAddOnsClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - * $gSuiteAddOnsClient->installDeployment($formattedName); - * } finally { - * $gSuiteAddOnsClient->close(); - * } - * ``` - * - * @param string $name Required. The full resource name of the deployment to install. - * - * Example: `projects/my_project/deployments/my_deployment`. - * @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 installDeployment($name, array $optionalArgs = []) - { - $request = new InstallDeploymentRequest(); - $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('InstallDeployment', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists all deployments in a particular project. - * - * Sample code: - * ``` - * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); - * try { - * $formattedParent = $gSuiteAddOnsClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $gSuiteAddOnsClient->listDeployments($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $gSuiteAddOnsClient->listDeployments($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $gSuiteAddOnsClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the project in which to create the deployment. - * - * Example: `projects/my_project`. - * @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 listDeployments($parent, array $optionalArgs = []) - { - $request = new ListDeploymentsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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('ListDeployments', $optionalArgs, ListDeploymentsResponse::class, $request); - } - - /** - * Creates or replaces a deployment with the specified name. - * - * Sample code: - * ``` - * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); - * try { - * $deployment = new Deployment(); - * $response = $gSuiteAddOnsClient->replaceDeployment($deployment); - * } finally { - * $gSuiteAddOnsClient->close(); - * } - * ``` - * - * @param Deployment $deployment Required. The deployment to create or replace. - * @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\GSuiteAddOns\V1\Deployment - * - * @throws ApiException if the remote call fails - */ - public function replaceDeployment($deployment, array $optionalArgs = []) - { - $request = new ReplaceDeploymentRequest(); - $requestParamHeaders = []; - $request->setDeployment($deployment); - $requestParamHeaders['deployment.name'] = $deployment->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ReplaceDeployment', Deployment::class, $optionalArgs, $request)->wait(); - } - - /** - * Uninstalls a developer mode deployment. - * See: - * https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons. - * - * Sample code: - * ``` - * $gSuiteAddOnsClient = new GSuiteAddOnsClient(); - * try { - * $formattedName = $gSuiteAddOnsClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - * $gSuiteAddOnsClient->uninstallDeployment($formattedName); - * } finally { - * $gSuiteAddOnsClient->close(); - * } - * ``` - * - * @param string $name Required. The full resource name of the deployment to install. - * - * Example: `projects/my_project/deployments/my_deployment`. - * @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 uninstallDeployment($name, array $optionalArgs = []) - { - $request = new UninstallDeploymentRequest(); - $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('UninstallDeployment', GPBEmpty::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/GSuiteAddOns/v1/src/V1/gapic_metadata.json b/owl-bot-staging/GSuiteAddOns/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 7e5b8ce080e6..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.gsuiteaddons.v1", - "libraryPackage": "Google\\Cloud\\GSuiteAddOns\\V1", - "services": { - "GSuiteAddOns": { - "clients": { - "grpc": { - "libraryClient": "GSuiteAddOnsGapicClient", - "rpcs": { - "CreateDeployment": { - "methods": [ - "createDeployment" - ] - }, - "DeleteDeployment": { - "methods": [ - "deleteDeployment" - ] - }, - "GetAuthorization": { - "methods": [ - "getAuthorization" - ] - }, - "GetDeployment": { - "methods": [ - "getDeployment" - ] - }, - "GetInstallStatus": { - "methods": [ - "getInstallStatus" - ] - }, - "InstallDeployment": { - "methods": [ - "installDeployment" - ] - }, - "ListDeployments": { - "methods": [ - "listDeployments" - ] - }, - "ReplaceDeployment": { - "methods": [ - "replaceDeployment" - ] - }, - "UninstallDeployment": { - "methods": [ - "uninstallDeployment" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_client_config.json b/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_client_config.json deleted file mode 100644 index 72ccdb04dcea..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_client_config.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "interfaces": { - "google.cloud.gsuiteaddons.v1.GSuiteAddOns": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "UNKNOWN" - ], - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 10000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 10000, - "total_timeout_millis": 10000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 10000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 10000, - "total_timeout_millis": 10000 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 - } - }, - "methods": { - "CreateDeployment": { - "timeout_millis": 10000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteDeployment": { - "timeout_millis": 10000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetAuthorization": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "GetDeployment": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetInstallStatus": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "InstallDeployment": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDeployments": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ReplaceDeployment": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UninstallDeployment": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_descriptor_config.php b/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_descriptor_config.php deleted file mode 100644 index 1060fd869fce..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_descriptor_config.php +++ /dev/null @@ -1,18 +0,0 @@ - [ - 'google.cloud.gsuiteaddons.v1.GSuiteAddOns' => [ - 'ListDeployments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDeployments', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_rest_client_config.php b/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_rest_client_config.php deleted file mode 100644 index 38e022bdead8..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/src/V1/resources/g_suite_add_ons_rest_client_config.php +++ /dev/null @@ -1,116 +0,0 @@ - [ - 'google.cloud.gsuiteaddons.v1.GSuiteAddOns' => [ - 'CreateDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/deployments', - 'body' => 'deployment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'deployment_id', - ], - ], - 'DeleteDeployment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/deployments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAuthorization' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/authorization}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDeployment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/deployments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInstallStatus' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/deployments/*/installStatus}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'InstallDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/deployments/*}:install', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDeployments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/deployments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ReplaceDeployment' => [ - 'method' => 'put', - 'uriTemplate' => '/v1/{deployment.name=projects/*/deployments/*}', - 'body' => 'deployment', - 'placeholders' => [ - 'deployment.name' => [ - 'getters' => [ - 'getDeployment', - 'getName', - ], - ], - ], - ], - 'UninstallDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/deployments/*}:uninstall', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/GSuiteAddOns/v1/tests/Unit/V1/GSuiteAddOnsClientTest.php b/owl-bot-staging/GSuiteAddOns/v1/tests/Unit/V1/GSuiteAddOnsClientTest.php deleted file mode 100644 index 4041c03a9c5d..000000000000 --- a/owl-bot-staging/GSuiteAddOns/v1/tests/Unit/V1/GSuiteAddOnsClientTest.php +++ /dev/null @@ -1,622 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GSuiteAddOnsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GSuiteAddOnsClient($options); - } - - /** @test */ - public function createDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $deploymentId = 'deploymentId51250389'; - $deployment = new Deployment(); - $response = $gapicClient->createDeployment($formattedParent, $deploymentId, $deployment); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/CreateDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDeploymentId(); - $this->assertProtobufEquals($deploymentId, $actualValue); - $actualValue = $actualRequestObject->getDeployment(); - $this->assertProtobufEquals($deployment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $deploymentId = 'deploymentId51250389'; - $deployment = new Deployment(); - try { - $gapicClient->createDeployment($formattedParent, $deploymentId, $deployment); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - $gapicClient->deleteDeployment($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/DeleteDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - try { - $gapicClient->deleteDeployment($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 getAuthorizationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $serviceAccountEmail = 'serviceAccountEmail-1300473088'; - $oauthClientId = 'oauthClientId-1137123737'; - $expectedResponse = new Authorization(); - $expectedResponse->setName($name2); - $expectedResponse->setServiceAccountEmail($serviceAccountEmail); - $expectedResponse->setOauthClientId($oauthClientId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->authorizationName('[PROJECT]'); - $response = $gapicClient->getAuthorization($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/GetAuthorization', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAuthorizationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->authorizationName('[PROJECT]'); - try { - $gapicClient->getAuthorization($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 getDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $etag = 'etag3123477'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name2); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - $response = $gapicClient->getDeployment($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/GetDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - try { - $gapicClient->getDeployment($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 getInstallStatusTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new InstallStatus(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->installStatusName('[PROJECT]', '[DEPLOYMENT]'); - $response = $gapicClient->getInstallStatus($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/GetInstallStatus', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstallStatusExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->installStatusName('[PROJECT]', '[DEPLOYMENT]'); - try { - $gapicClient->getInstallStatus($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 installDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - $gapicClient->installDeployment($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/InstallDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function installDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - try { - $gapicClient->installDeployment($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 listDeploymentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $deploymentsElement = new Deployment(); - $deployments = [ - $deploymentsElement, - ]; - $expectedResponse = new ListDeploymentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDeployments($deployments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listDeployments($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDeployments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/ListDeployments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDeploymentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listDeployments($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 replaceDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $deployment = new Deployment(); - $response = $gapicClient->replaceDeployment($deployment); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/ReplaceDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getDeployment(); - $this->assertProtobufEquals($deployment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function replaceDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $deployment = new Deployment(); - try { - $gapicClient->replaceDeployment($deployment); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function uninstallDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - $gapicClient->uninstallDeployment($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gsuiteaddons.v1.GSuiteAddOns/UninstallDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function uninstallDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[DEPLOYMENT]'); - try { - $gapicClient->uninstallDeployment($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()); - } -} diff --git a/owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/Common.php b/owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/Common.php deleted file mode 100644 index 6faa739885f74f716d45175e54bd921fa175708b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3371 zcmb_fU2fY(5UwoSu|}0^Z)`_l(1w*$!~qftc8fMpehNpD4FQQ{NJ<|HHN=Ws$xJDd z<&Ock$U{-|6g@*9dWPPjK!Kj1XXxxMDN?qCxIz44b9d&OpKoS%{P=6{)Pr61m^sX+ zAv4wCxf-4_)$`rZHC$UAMxzn)Rl}Wlmd$)kRT~|(-RY~%MyvlRss?W48?2^|U3YA= zs$sj4Ssl}f<&3Lm`&Cq&xQ-_90314DfkzFd9-lmW!9r@%kPeQ8>Y&b52ggEn@Xh`s z0K=w1pw! z9mimM_f(0=W$$<{M*BofoH^kMz~BchCuF`u?LmVDhHrVH>z|-#tu|)iG;RE3?_O+{ z!&xJBPx@G^U2^h?8u}5-T31z{g^}+(5`J@lH`Bicb5eEaS%V{s+2%8LO3y6Uuhr71 zQjmG7)4&=LGLHFp2i3lXG=_BI&DRyVeDKtYGk0j3(?lI%5$#Pwv^`Op_(1o$V{1#LA+^kg}>7M<%OIxqb0IOx%|OmA~?^+3|P-U^I#F#eC#k2fBhk3FOYs@jF%F@+TuET0beJrPP9u*1_XA_psm_IBp zr$@J7otIP;=$QS0j#+snz1)QzpZyRaEzHynisfzFBA)Up3av@dG8Cz2=?ENPq~&X= zI^IMMMr)kXq0P!`YCdt~JJ@iO-00GNxq#QjgQrO@E)b$!%4K@e69F`x&_5S0DLQOT z#WRI{XxyX8fd7hNJdK3*(wm)5KRG$Wk6aG4nY~Pbo`JK_vY)l)8-C zlc@{qu!`knPoxWl${#sc>lvrajBG|U0IV!Oyke)3`~RoOu#qs|C_t!fy9VFX(>oqxp4@~@pNUzN zx#E%L$p)-Vf%ra=SANaGjTysfhIs-r+|BJ04sx{wehk}^jTBN6BUhcl02KTWVL{2A zX;_vPlDS=2ebmN92Z N7m{+7egkg+{saD8DL4QC diff --git a/owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerClusters.php b/owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerClusters.php deleted file mode 100644 index 3e65307f2926ae04321cf5626b0c2549127b025b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4910 zcmds5-EJF26s~`g*2n$Jq)kl<$>OA~1C6a1D!^@_w&NI6*RgCTNR_44dOdcQtarD& z>p+Nd2NG|<1HdJ(z%y{e4dSL;A@K-Yab|YCc5Sbkv=Ku1#;ch#XU_S~|2+7_*fU^7 zC{m4@l1rk-ws9>17t;@P9wECS6H3eDk8H!5Hq#$f=3zhALP}nRr-o~Sr-Zy2M z5xTnGRcT6A^?p0mm3oTSO&x5oFDhEpJfNm1t9{F+rj_K}0W{pR3`wR!v6_2AZK*BU zQnSbzHS>&7v&b1WcQ@_>$f{&n0L-%5{|aXt z3VM<)^^ECfxe3=lR$PN++ilN2TjB8$oz~YL}Ef{Txp-VJ~EFLuIcc~6Duh>JRT#99vjYnY*;BW}y-v;5WvSQhj zu~VbZ`iLAUz^oyeRI_6NA&`jV?mf>2|IVh!I_g1L_$o5BlFmJ-h?PVUQxojS0z?d{ zivf=@7Yib%nOx|3Hb8Cw@O4|?r&=t;uizW=Fxyd7jH6h1xOg2d=w=%eM(Z#(GhBWI z;RA(!8JoqW%jtDjnsL076H@KsAudMz`v5HY;b0lMW>HdvYfRj9a0r&6UhWX_XPzy6g*;)m}im@!0?;@Cp5myez2YQ5_h^u>MZMtf~=Iw5s!xhJGjW0_$Yx69r^w#9Mh@KanLvtm#vw z7F8|YghbQ#d@&ktOOj=NuAtfGA*sR@*|P->T^*ex7EOO}Vt!+`98>_->G6iC?M_%Y zq;Y#jCUbj~oB368`{Fu8NA-z9XrCTBh9j3?=0H;WPB$CL1V0R9z6<=7{U&hQ=Btj? z^$YY@D|O_49j8=X#$grv&eYN1^B89YN$ueZ|3Bsf^o#Ru>d5u2gm!Y zOO7m@(Xh&ryRbYVtw>E%H$@ynEF3L{b3%yVoPbasC^#w%=Y$Yhg&Sj_bGJ~d^AkJO>UOPxlmW5?i!R|{7dd(RK?MJnKci975Lt$s6Rc{5{C2TYdWv_2 z$qFn_k!GhdLNvp;3?#vSR4DJLxs@%Ik;^QJ!8P|9eB%*aC~)WeJG*dwB7w2ViX>pQ zn0-xCNf6!YbsdISG=ONGzJfQ!IPE?Y0<5t$1R-r6abuLg6?CM@DG>El1uz|#lL z)QJSDq;-?J*-dq+#(UM&a3CFjc)H)^FGsCePWav(Z^XarJh6internalAddGeneratedFile( - ' -· -9google/cloud/gaming/v1/game_server_clusters_service.protogoogle.cloud.gaming.v1google/api/client.proto1google/cloud/gaming/v1/game_server_clusters.proto#google/longrunning/operations.proto2Š -GameServerClustersServiceÙ -ListGameServerClusters5.google.cloud.gaming.v1.ListGameServerClustersRequest6.google.cloud.gaming.v1.ListGameServerClustersResponse"P‚Óä“A?/v1/{parent=projects/*/locations/*/realms/*}/gameServerClustersÚAparentÆ -GetGameServerCluster3.google.cloud.gaming.v1.GetGameServerClusterRequest).google.cloud.gaming.v1.GameServerCluster"N‚Óä“A?/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}ÚAname¬ -CreateGameServerCluster6.google.cloud.gaming.v1.CreateGameServerClusterRequest.google.longrunning.Operation"¹‚Óä“V"?/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters:game_server_clusterÚA1parent,game_server_cluster,game_server_cluster_idÊA& -GameServerClusterOperationMetadata‹ -PreviewCreateGameServerCluster=.google.cloud.gaming.v1.PreviewCreateGameServerClusterRequest>.google.cloud.gaming.v1.PreviewCreateGameServerClusterResponse"j‚Óä“d"M/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters:previewCreate:game_server_clusterí -DeleteGameServerCluster6.google.cloud.gaming.v1.DeleteGameServerClusterRequest.google.longrunning.Operation"{‚Óä“A*?/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadataö -PreviewDeleteGameServerCluster=.google.cloud.gaming.v1.PreviewDeleteGameServerClusterRequest>.google.cloud.gaming.v1.PreviewDeleteGameServerClusterResponse"U‚Óä“O*M/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewDelete® -UpdateGameServerCluster6.google.cloud.gaming.v1.UpdateGameServerClusterRequest.google.longrunning.Operation"»‚Óä“j2S/v1/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}:game_server_clusterÚAgame_server_cluster,update_maskÊA& -GameServerClusterOperationMetadataŸ -PreviewUpdateGameServerCluster=.google.cloud.gaming.v1.PreviewUpdateGameServerClusterRequest>.google.cloud.gaming.v1.PreviewUpdateGameServerClusterResponse"~‚Óä“x2a/v1/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewUpdate:game_server_clusterOÊAgameservices.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB\\ -com.google.cloud.gaming.v1PZinternalAddGeneratedFile( - ' -Ž -0google/cloud/gaming/v1/game_server_configs.protogoogle.cloud.gaming.v1google/api/resource.proto#google/cloud/gaming/v1/common.protogoogle/protobuf/timestamp.proto"Á -ListGameServerConfigsRequestD -parent ( B4àAúA.,gameservices.googleapis.com/GameServerConfig - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"” -ListGameServerConfigsResponseE -game_server_configs ( 2(.google.cloud.gaming.v1.GameServerConfig -next_page_token (  - unreachable ( "` -GetGameServerConfigRequestB -name ( B4àAúA. -,gameservices.googleapis.com/GameServerConfig"È -CreateGameServerConfigRequestD -parent ( B4àAúA.,gameservices.googleapis.com/GameServerConfig - config_id ( BàAI -game_server_config ( 2(.google.cloud.gaming.v1.GameServerConfigBàA"c -DeleteGameServerConfigRequestB -name ( B4àAúA. -,gameservices.googleapis.com/GameServerConfig"µ - ScalingConfig -name ( BàA" -fleet_autoscaler_spec ( BàA8 - selectors ( 2%.google.cloud.gaming.v1.LabelSelector3 - schedules ( 2 .google.cloud.gaming.v1.Schedule"/ - FleetConfig - -fleet_spec (  -name ( "¤ -GameServerConfig -name ( 4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàAD -labels ( 24.google.cloud.gaming.v1.GameServerConfig.LabelsEntry: - fleet_configs ( 2#.google.cloud.gaming.v1.FleetConfig> -scaling_configs ( 2%.google.cloud.gaming.v1.ScalingConfig - description ( - - LabelsEntry -key (  -value ( :8:êA‹ -,gameservices.googleapis.com/GameServerConfig[projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}B\\ -com.google.cloud.gaming.v1PZinternalAddGeneratedFile( - ' -Æ - -8google/cloud/gaming/v1/game_server_configs_service.protogoogle.cloud.gaming.v1google/api/client.proto0google/cloud/gaming/v1/game_server_configs.proto#google/longrunning/operations.proto2› -GameServerConfigsServiceÚ -ListGameServerConfigs4.google.cloud.gaming.v1.ListGameServerConfigsRequest5.google.cloud.gaming.v1.ListGameServerConfigsResponse"T‚Óä“EC/v1/{parent=projects/*/locations/*/gameServerDeployments/*}/configsÚAparentÇ -GetGameServerConfig2.google.cloud.gaming.v1.GetGameServerConfigRequest(.google.cloud.gaming.v1.GameServerConfig"R‚Óä“EC/v1/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}ÚAname” -CreateGameServerConfig5.google.cloud.gaming.v1.CreateGameServerConfigRequest.google.longrunning.Operation"£‚Óä“Y"C/v1/{parent=projects/*/locations/*/gameServerDeployments/*}/configs:game_server_configÚAparent,game_server_configÊA% -GameServerConfigOperationMetadataï -DeleteGameServerConfig5.google.cloud.gaming.v1.DeleteGameServerConfigRequest.google.longrunning.Operation"‚Óä“E*C/v1/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadataOÊAgameservices.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB\\ -com.google.cloud.gaming.v1PZX}>mGp1ojA7W1fMFC3w?{Q0~Y;-oej=hD;AERf0tR@U_KMf z;p`iV?t#^Gc#LFeuWYm9yMhJ2B^6eD7t7ZyZBxo#4g*5tftC8UDgh#J>dU^s$ai>s z0b@5}p$MW?60KHSD0;BUlk&CXT4|0ot+Mv9THWL114~359K7AKA{3p-zo-0`26lU2 z^$g_ZLRMd7$h{hFI$ah-)oMSgzL8O?YnWtp-&#Yds?P`QcHr;-)*hV7>nBdUbqL*c zM#UtYc9^ZJQh4KimLzP>^LqJNq}nd`5S92|g}=_jox>Ehc~)yxR4Y_;D^$9-isut+ zPRQ&iL0I=e@zRKksO<>GL?~@B)jCvqc2j1!(I&7GiMJ9nJqeK_q6JES8elzUvB>P8 zHT<$e_?eGjGIS#9(t=?b<>}hp=W`SP&CQxODHN2g%v_8s`YMVgu8@~@mPPX{OovX3 z`k$JwFhRzS*K*J24D%d-Iv2qf`h}djMg4FZCYy{?Lluto4_}9=Ao7SmHnt1Ld&i|; z47fNZmN*Rj7|kbePP&~zK@?rCoS(g(L^7PNN@hgo;FOPFi^hQaGOlU!G~_#egpRxE zY;Yv^bLHvMCcL>sERaE0Db|Z{Oj6*BNW+1VE(LI9)J*{=8Wl%<;opS*JjE+;TzE%U zN=2CIkB3Tn$u}0u(NW4a zJxrA59V%LNuOblzX@0htHblxIl^!Q+Y<@MMJjUG@>uniMMEXS4cz*VFYJP|wGy82# ztLii#&fA-CVG)J9*=*?@3$~ny@PS;^vvB`vFlOl&RnZl>wMBk#e_}EN`^`6{h52@do4vHS&<#!tDg$893f` zct?jjU7fgVRKGL+o%{CS#BF{=UG@dKBDQyuuU(r5E^V(gzU-a!b5||WdzM~%$Lnpt zyQLouDD*?05Bw%;t`2LUB!sKTU)mykL-88v{Z)M#xACTRxxEiCoy5+>a9u;wd@x9YC_xn sO?>$EeUHkD-r*aQO7Qm8-V5iteqjzgNaY}7ZpLF&N$Mx#F6;vQ4^WJ1F8}}l diff --git a/owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerDeploymentsService.php b/owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerDeploymentsService.php deleted file mode 100644 index 581042f333f1..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/GPBMetadata/Google/Cloud/Gaming/V1/GameServerDeploymentsService.php +++ /dev/null @@ -1,45 +0,0 @@ -internalAddGeneratedFile( - ' -› -internalAddGeneratedFile( - ' -« -#google/cloud/gaming/v1/realms.protogoogle.cloud.gaming.v1google/api/resource.proto#google/cloud/gaming/v1/common.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"« -ListRealmsRequest9 -parent ( B)àAúA#!gameservices.googleapis.com/Realm - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"q -ListRealmsResponse- -realms ( 2.google.cloud.gaming.v1.Realm -next_page_token (  - unreachable ( "J -GetRealmRequest7 -name ( B)àAúA# -!gameservices.googleapis.com/Realm"™ -CreateRealmRequest9 -parent ( B)àAúA#!gameservices.googleapis.com/Realm -realm_id ( BàA1 -realm ( 2.google.cloud.gaming.v1.RealmBàA"M -DeleteRealmRequest7 -name ( B)àAúA# -!gameservices.googleapis.com/Realm"} -UpdateRealmRequest1 -realm ( 2.google.cloud.gaming.v1.RealmBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"» -PreviewRealmUpdateRequest1 -realm ( 2.google.cloud.gaming.v1.RealmBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA5 - preview_time ( 2.google.protobuf.TimestampBàA"e -PreviewRealmUpdateResponse -etag ( 9 - target_state ( 2#.google.cloud.gaming.v1.TargetState"† -Realm -name ( 4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàA9 -labels ( 2).google.cloud.gaming.v1.Realm.LabelsEntry - time_zone ( BàA -etag (  - description ( - - LabelsEntry -key (  -value ( :8:^êA[ -!gameservices.googleapis.com/Realm6projects/{project}/locations/{location}/realms/{realm}B\\ -com.google.cloud.gaming.v1PZinternalAddGeneratedFile( - ' -Ì -+google/cloud/gaming/v1/realms_service.protogoogle.cloud.gaming.v1google/api/client.proto#google/cloud/gaming/v1/realms.proto#google/longrunning/operations.proto2» - RealmsService  - -ListRealms).google.cloud.gaming.v1.ListRealmsRequest*.google.cloud.gaming.v1.ListRealmsResponse";‚Óä“,*/v1/{parent=projects/*/locations/*}/realmsÚAparent -GetRealm\'.google.cloud.gaming.v1.GetRealmRequest.google.cloud.gaming.v1.Realm"9‚Óä“,*/v1/{name=projects/*/locations/*/realms/*}ÚAnameÈ - CreateRealm*.google.cloud.gaming.v1.CreateRealmRequest.google.longrunning.Operation"n‚Óä“3"*/v1/{parent=projects/*/locations/*}/realms:realmÚAparent,realm,realm_idÊA -RealmOperationMetadataÀ - DeleteRealm*.google.cloud.gaming.v1.DeleteRealmRequest.google.longrunning.Operation"f‚Óä“,**/v1/{name=projects/*/locations/*/realms/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadataÊ - UpdateRealm*.google.cloud.gaming.v1.UpdateRealmRequest.google.longrunning.Operation"p‚Óä“920/v1/{realm.name=projects/*/locations/*/realms/*}:realmÚArealm,update_maskÊA -RealmOperationMetadataÊ -PreviewRealmUpdate1.google.cloud.gaming.v1.PreviewRealmUpdateRequest2.google.cloud.gaming.v1.PreviewRealmUpdateResponse"M‚Óä“G2>/v1/{realm.name=projects/*/locations/*/realms/*}:previewUpdate:realmOÊAgameservices.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB\\ -com.google.cloud.gaming.v1PZgoogle.cloud.gaming.v1.CreateGameServerClusterRequest - */ -class CreateGameServerClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/realms/{realm-id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID of the game server cluster resource to be created. - * - * Generated from protobuf field string game_server_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $game_server_cluster_id = ''; - /** - * Required. The game server cluster resource to be created. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $game_server_cluster = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/realms/{realm-id}`. - * @type string $game_server_cluster_id - * Required. The ID of the game server cluster resource to be created. - * @type \Google\Cloud\Gaming\V1\GameServerCluster $game_server_cluster - * Required. The game server cluster resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/realms/{realm-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 parent resource name, in the following form: - * `projects/{project}/locations/{location}/realms/{realm-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 of the game server cluster resource to be created. - * - * Generated from protobuf field string game_server_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGameServerClusterId() - { - return $this->game_server_cluster_id; - } - - /** - * Required. The ID of the game server cluster resource to be created. - * - * Generated from protobuf field string game_server_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGameServerClusterId($var) - { - GPBUtil::checkString($var, True); - $this->game_server_cluster_id = $var; - - return $this; - } - - /** - * Required. The game server cluster resource to be created. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Gaming\V1\GameServerCluster|null - */ - public function getGameServerCluster() - { - return $this->game_server_cluster; - } - - public function hasGameServerCluster() - { - return isset($this->game_server_cluster); - } - - public function clearGameServerCluster() - { - unset($this->game_server_cluster); - } - - /** - * Required. The game server cluster resource to be created. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Gaming\V1\GameServerCluster $var - * @return $this - */ - public function setGameServerCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerCluster::class); - $this->game_server_cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerConfigRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerConfigRequest.php deleted file mode 100644 index ca9312fdc389..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerConfigRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.gaming.v1.CreateGameServerConfigRequest - */ -class CreateGameServerConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID of the game server config resource to be created. - * - * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $config_id = ''; - /** - * Required. The game server config resource to be created. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerConfig game_server_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $game_server_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`. - * @type string $config_id - * Required. The ID of the game server config resource to be created. - * @type \Google\Cloud\Gaming\V1\GameServerConfig $game_server_config - * Required. The game server config resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`. - * - * Generated 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 following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 game server config resource to be created. - * - * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getConfigId() - { - return $this->config_id; - } - - /** - * Required. The ID of the game server config resource to be created. - * - * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setConfigId($var) - { - GPBUtil::checkString($var, True); - $this->config_id = $var; - - return $this; - } - - /** - * Required. The game server config resource to be created. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerConfig game_server_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Gaming\V1\GameServerConfig|null - */ - public function getGameServerConfig() - { - return $this->game_server_config; - } - - public function hasGameServerConfig() - { - return isset($this->game_server_config); - } - - public function clearGameServerConfig() - { - unset($this->game_server_config); - } - - /** - * Required. The game server config resource to be created. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerConfig game_server_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Gaming\V1\GameServerConfig $var - * @return $this - */ - public function setGameServerConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerConfig::class); - $this->game_server_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerDeploymentRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerDeploymentRequest.php deleted file mode 100644 index 7c7a1103b5ef..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateGameServerDeploymentRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.gaming.v1.CreateGameServerDeploymentRequest - */ -class CreateGameServerDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, in the following 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 ID of the game server delpoyment resource to be created. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $deployment_id = ''; - /** - * Required. The game server delpoyment resource to be created. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeployment game_server_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $game_server_deployment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}`. - * @type string $deployment_id - * Required. The ID of the game server delpoyment resource to be created. - * @type \Google\Cloud\Gaming\V1\GameServerDeployment $game_server_deployment - * Required. The game server delpoyment resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, in the following 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 following 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 ID of the game server delpoyment resource to be created. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDeploymentId() - { - return $this->deployment_id; - } - - /** - * Required. The ID of the game server delpoyment resource to be created. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDeploymentId($var) - { - GPBUtil::checkString($var, True); - $this->deployment_id = $var; - - return $this; - } - - /** - * Required. The game server delpoyment resource to be created. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeployment game_server_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Gaming\V1\GameServerDeployment|null - */ - public function getGameServerDeployment() - { - return $this->game_server_deployment; - } - - public function hasGameServerDeployment() - { - return isset($this->game_server_deployment); - } - - public function clearGameServerDeployment() - { - unset($this->game_server_deployment); - } - - /** - * Required. The game server delpoyment resource to be created. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeployment game_server_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Gaming\V1\GameServerDeployment $var - * @return $this - */ - public function setGameServerDeployment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerDeployment::class); - $this->game_server_deployment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateRealmRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateRealmRequest.php deleted file mode 100644 index 29c2bceae3fe..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/CreateRealmRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.gaming.v1.CreateRealmRequest - */ -class CreateRealmRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, in the following 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 ID of the realm resource to be created. - * - * Generated from protobuf field string realm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $realm_id = ''; - /** - * Required. The realm resource to be created. - * - * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $realm = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}`. - * @type string $realm_id - * Required. The ID of the realm resource to be created. - * @type \Google\Cloud\Gaming\V1\Realm $realm - * Required. The realm resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, in the following 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 following 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 ID of the realm resource to be created. - * - * Generated from protobuf field string realm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRealmId() - { - return $this->realm_id; - } - - /** - * Required. The ID of the realm resource to be created. - * - * Generated from protobuf field string realm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRealmId($var) - { - GPBUtil::checkString($var, True); - $this->realm_id = $var; - - return $this; - } - - /** - * Required. The realm resource to be created. - * - * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Gaming\V1\Realm|null - */ - public function getRealm() - { - return $this->realm; - } - - public function hasRealm() - { - return isset($this->realm); - } - - public function clearRealm() - { - unset($this->realm); - } - - /** - * Required. The realm resource to be created. - * - * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Gaming\V1\Realm $var - * @return $this - */ - public function setRealm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\Realm::class); - $this->realm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerClusterRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerClusterRequest.php deleted file mode 100644 index ddb1ebcd6406..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerClusterRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gaming.v1.DeleteGameServerClusterRequest - */ -class DeleteGameServerClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the game server cluster to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`. - * - * 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 name of the game server cluster to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the game server cluster to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerClusters/{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 game server cluster to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerClusters/{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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerConfigRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerConfigRequest.php deleted file mode 100644 index a980d33d11aa..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerConfigRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gaming.v1.DeleteGameServerConfigRequest - */ -class DeleteGameServerConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the game server config to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. - * - * 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 name of the game server config to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the game server config to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. - * - * Generated 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 game server config to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerDeploymentRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerDeploymentRequest.php deleted file mode 100644 index f58374f87100..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteGameServerDeploymentRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gaming.v1.DeleteGameServerDeploymentRequest - */ -class DeleteGameServerDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the game server delpoyment to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * - * 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 name of the game server delpoyment to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the game server delpoyment to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * - * Generated 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 game server delpoyment to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteRealmRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteRealmRequest.php deleted file mode 100644 index 067f4143976c..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeleteRealmRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gaming.v1.DeleteRealmRequest - */ -class DeleteRealmRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the realm to delete, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. - * - * 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 name of the realm to delete, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the realm to delete, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. - * - * Generated 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 realm to delete, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails.php deleted file mode 100644 index 67c811c9f883..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.gaming.v1.DeployedFleetDetails - */ -class DeployedFleetDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Information about the Agones fleet. - * - * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet deployed_fleet = 1; - */ - protected $deployed_fleet = null; - /** - * Information about the Agones autoscaler for that fleet. - * - * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleetAutoscaler deployed_autoscaler = 2; - */ - protected $deployed_autoscaler = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet $deployed_fleet - * Information about the Agones fleet. - * @type \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleetAutoscaler $deployed_autoscaler - * Information about the Agones autoscaler for that fleet. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Information about the Agones fleet. - * - * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet deployed_fleet = 1; - * @return \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet|null - */ - public function getDeployedFleet() - { - return $this->deployed_fleet; - } - - public function hasDeployedFleet() - { - return isset($this->deployed_fleet); - } - - public function clearDeployedFleet() - { - unset($this->deployed_fleet); - } - - /** - * Information about the Agones fleet. - * - * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet deployed_fleet = 1; - * @param \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet $var - * @return $this - */ - public function setDeployedFleet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet::class); - $this->deployed_fleet = $var; - - return $this; - } - - /** - * Information about the Agones autoscaler for that fleet. - * - * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleetAutoscaler deployed_autoscaler = 2; - * @return \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleetAutoscaler|null - */ - public function getDeployedAutoscaler() - { - return $this->deployed_autoscaler; - } - - public function hasDeployedAutoscaler() - { - return isset($this->deployed_autoscaler); - } - - public function clearDeployedAutoscaler() - { - unset($this->deployed_autoscaler); - } - - /** - * Information about the Agones autoscaler for that fleet. - * - * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleetAutoscaler deployed_autoscaler = 2; - * @param \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleetAutoscaler $var - * @return $this - */ - public function setDeployedAutoscaler($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleetAutoscaler::class); - $this->deployed_autoscaler = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet.php deleted file mode 100644 index 1846f588feac..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet - */ -class DeployedFleet extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the Agones fleet. - * - * Generated from protobuf field string fleet = 1; - */ - protected $fleet = ''; - /** - * The fleet spec retrieved from the Agones fleet. - * - * Generated from protobuf field string fleet_spec = 2; - */ - protected $fleet_spec = ''; - /** - * The source spec that is used to create the Agones fleet. - * The GameServerConfig resource may no longer exist in the system. - * - * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 3; - */ - protected $spec_source = null; - /** - * The current status of the Agones fleet. - * Includes count of game servers in various states. - * - * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet.DeployedFleetStatus status = 5; - */ - protected $status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $fleet - * The name of the Agones fleet. - * @type string $fleet_spec - * The fleet spec retrieved from the Agones fleet. - * @type \Google\Cloud\Gaming\V1\SpecSource $spec_source - * The source spec that is used to create the Agones fleet. - * The GameServerConfig resource may no longer exist in the system. - * @type \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet\DeployedFleetStatus $status - * The current status of the Agones fleet. - * Includes count of game servers in various states. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The name of the Agones fleet. - * - * Generated from protobuf field string fleet = 1; - * @return string - */ - public function getFleet() - { - return $this->fleet; - } - - /** - * The name of the Agones fleet. - * - * Generated from protobuf field string fleet = 1; - * @param string $var - * @return $this - */ - public function setFleet($var) - { - GPBUtil::checkString($var, True); - $this->fleet = $var; - - return $this; - } - - /** - * The fleet spec retrieved from the Agones fleet. - * - * Generated from protobuf field string fleet_spec = 2; - * @return string - */ - public function getFleetSpec() - { - return $this->fleet_spec; - } - - /** - * The fleet spec retrieved from the Agones fleet. - * - * Generated from protobuf field string fleet_spec = 2; - * @param string $var - * @return $this - */ - public function setFleetSpec($var) - { - GPBUtil::checkString($var, True); - $this->fleet_spec = $var; - - return $this; - } - - /** - * The source spec that is used to create the Agones fleet. - * The GameServerConfig resource may no longer exist in the system. - * - * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 3; - * @return \Google\Cloud\Gaming\V1\SpecSource|null - */ - public function getSpecSource() - { - return $this->spec_source; - } - - public function hasSpecSource() - { - return isset($this->spec_source); - } - - public function clearSpecSource() - { - unset($this->spec_source); - } - - /** - * The source spec that is used to create the Agones fleet. - * The GameServerConfig resource may no longer exist in the system. - * - * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 3; - * @param \Google\Cloud\Gaming\V1\SpecSource $var - * @return $this - */ - public function setSpecSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\SpecSource::class); - $this->spec_source = $var; - - return $this; - } - - /** - * The current status of the Agones fleet. - * Includes count of game servers in various states. - * - * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet.DeployedFleetStatus status = 5; - * @return \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet\DeployedFleetStatus|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * The current status of the Agones fleet. - * Includes count of game servers in various states. - * - * Generated from protobuf field .google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet.DeployedFleetStatus status = 5; - * @param \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet\DeployedFleetStatus $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\DeployedFleetDetails\DeployedFleet\DeployedFleetStatus::class); - $this->status = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DeployedFleet::class, \Google\Cloud\Gaming\V1\DeployedFleetDetails_DeployedFleet::class); - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet/DeployedFleetStatus.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet/DeployedFleetStatus.php deleted file mode 100644 index 0f470fb218fb..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleet/DeployedFleetStatus.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleet.DeployedFleetStatus - */ -class DeployedFleetStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The number of GameServer replicas in the READY state in this fleet. - * - * Generated from protobuf field int64 ready_replicas = 1; - */ - protected $ready_replicas = 0; - /** - * The number of GameServer replicas in the ALLOCATED state in this fleet. - * - * Generated from protobuf field int64 allocated_replicas = 2; - */ - protected $allocated_replicas = 0; - /** - * The number of GameServer replicas in the RESERVED state in this fleet. - * Reserved instances won't be deleted on scale down, but won't cause - * an autoscaler to scale up. - * - * Generated from protobuf field int64 reserved_replicas = 3; - */ - protected $reserved_replicas = 0; - /** - * The total number of current GameServer replicas in this fleet. - * - * Generated from protobuf field int64 replicas = 4; - */ - protected $replicas = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $ready_replicas - * The number of GameServer replicas in the READY state in this fleet. - * @type int|string $allocated_replicas - * The number of GameServer replicas in the ALLOCATED state in this fleet. - * @type int|string $reserved_replicas - * The number of GameServer replicas in the RESERVED state in this fleet. - * Reserved instances won't be deleted on scale down, but won't cause - * an autoscaler to scale up. - * @type int|string $replicas - * The total number of current GameServer replicas in this fleet. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The number of GameServer replicas in the READY state in this fleet. - * - * Generated from protobuf field int64 ready_replicas = 1; - * @return int|string - */ - public function getReadyReplicas() - { - return $this->ready_replicas; - } - - /** - * The number of GameServer replicas in the READY state in this fleet. - * - * Generated from protobuf field int64 ready_replicas = 1; - * @param int|string $var - * @return $this - */ - public function setReadyReplicas($var) - { - GPBUtil::checkInt64($var); - $this->ready_replicas = $var; - - return $this; - } - - /** - * The number of GameServer replicas in the ALLOCATED state in this fleet. - * - * Generated from protobuf field int64 allocated_replicas = 2; - * @return int|string - */ - public function getAllocatedReplicas() - { - return $this->allocated_replicas; - } - - /** - * The number of GameServer replicas in the ALLOCATED state in this fleet. - * - * Generated from protobuf field int64 allocated_replicas = 2; - * @param int|string $var - * @return $this - */ - public function setAllocatedReplicas($var) - { - GPBUtil::checkInt64($var); - $this->allocated_replicas = $var; - - return $this; - } - - /** - * The number of GameServer replicas in the RESERVED state in this fleet. - * Reserved instances won't be deleted on scale down, but won't cause - * an autoscaler to scale up. - * - * Generated from protobuf field int64 reserved_replicas = 3; - * @return int|string - */ - public function getReservedReplicas() - { - return $this->reserved_replicas; - } - - /** - * The number of GameServer replicas in the RESERVED state in this fleet. - * Reserved instances won't be deleted on scale down, but won't cause - * an autoscaler to scale up. - * - * Generated from protobuf field int64 reserved_replicas = 3; - * @param int|string $var - * @return $this - */ - public function setReservedReplicas($var) - { - GPBUtil::checkInt64($var); - $this->reserved_replicas = $var; - - return $this; - } - - /** - * The total number of current GameServer replicas in this fleet. - * - * Generated from protobuf field int64 replicas = 4; - * @return int|string - */ - public function getReplicas() - { - return $this->replicas; - } - - /** - * The total number of current GameServer replicas in this fleet. - * - * Generated from protobuf field int64 replicas = 4; - * @param int|string $var - * @return $this - */ - public function setReplicas($var) - { - GPBUtil::checkInt64($var); - $this->replicas = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DeployedFleetStatus::class, \Google\Cloud\Gaming\V1\DeployedFleetDetails_DeployedFleet_DeployedFleetStatus::class); - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleetAutoscaler.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleetAutoscaler.php deleted file mode 100644 index 5c58ffbbe14e..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails/DeployedFleetAutoscaler.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleetAutoscaler - */ -class DeployedFleetAutoscaler extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the Agones autoscaler. - * - * Generated from protobuf field string autoscaler = 1; - */ - protected $autoscaler = ''; - /** - * The source spec that is used to create the autoscaler. - * The GameServerConfig resource may no longer exist in the system. - * - * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 4; - */ - protected $spec_source = null; - /** - * The autoscaler spec retrieved from Agones. - * - * Generated from protobuf field string fleet_autoscaler_spec = 3; - */ - protected $fleet_autoscaler_spec = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $autoscaler - * The name of the Agones autoscaler. - * @type \Google\Cloud\Gaming\V1\SpecSource $spec_source - * The source spec that is used to create the autoscaler. - * The GameServerConfig resource may no longer exist in the system. - * @type string $fleet_autoscaler_spec - * The autoscaler spec retrieved from Agones. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The name of the Agones autoscaler. - * - * Generated from protobuf field string autoscaler = 1; - * @return string - */ - public function getAutoscaler() - { - return $this->autoscaler; - } - - /** - * The name of the Agones autoscaler. - * - * Generated from protobuf field string autoscaler = 1; - * @param string $var - * @return $this - */ - public function setAutoscaler($var) - { - GPBUtil::checkString($var, True); - $this->autoscaler = $var; - - return $this; - } - - /** - * The source spec that is used to create the autoscaler. - * The GameServerConfig resource may no longer exist in the system. - * - * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 4; - * @return \Google\Cloud\Gaming\V1\SpecSource|null - */ - public function getSpecSource() - { - return $this->spec_source; - } - - public function hasSpecSource() - { - return isset($this->spec_source); - } - - public function clearSpecSource() - { - unset($this->spec_source); - } - - /** - * The source spec that is used to create the autoscaler. - * The GameServerConfig resource may no longer exist in the system. - * - * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 4; - * @param \Google\Cloud\Gaming\V1\SpecSource $var - * @return $this - */ - public function setSpecSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\SpecSource::class); - $this->spec_source = $var; - - return $this; - } - - /** - * The autoscaler spec retrieved from Agones. - * - * Generated from protobuf field string fleet_autoscaler_spec = 3; - * @return string - */ - public function getFleetAutoscalerSpec() - { - return $this->fleet_autoscaler_spec; - } - - /** - * The autoscaler spec retrieved from Agones. - * - * Generated from protobuf field string fleet_autoscaler_spec = 3; - * @param string $var - * @return $this - */ - public function setFleetAutoscalerSpec($var) - { - GPBUtil::checkString($var, True); - $this->fleet_autoscaler_spec = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DeployedFleetAutoscaler::class, \Google\Cloud\Gaming\V1\DeployedFleetDetails_DeployedFleetAutoscaler::class); - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails_DeployedFleet.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails_DeployedFleet.php deleted file mode 100644 index 451c5ebeaa20..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/DeployedFleetDetails_DeployedFleet.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.gaming.v1.FetchDeploymentStateRequest - */ -class FetchDeploymentStateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the game server delpoyment, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * - * 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. The name of the game server delpoyment, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the game server delpoyment, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * - * 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 game server delpoyment, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * - * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse.php deleted file mode 100644 index 0f8fbc2454da..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.gaming.v1.FetchDeploymentStateResponse - */ -class FetchDeploymentStateResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The state of the game server deployment in each game server cluster. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.FetchDeploymentStateResponse.DeployedClusterState cluster_state = 1; - */ - private $cluster_state; - /** - * List of locations that could not be reached. - * - * Generated from protobuf field repeated string unavailable = 2; - */ - private $unavailable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Gaming\V1\FetchDeploymentStateResponse\DeployedClusterState>|\Google\Protobuf\Internal\RepeatedField $cluster_state - * The state of the game server deployment in each game server cluster. - * @type array|\Google\Protobuf\Internal\RepeatedField $unavailable - * List of locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * The state of the game server deployment in each game server cluster. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.FetchDeploymentStateResponse.DeployedClusterState cluster_state = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClusterState() - { - return $this->cluster_state; - } - - /** - * The state of the game server deployment in each game server cluster. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.FetchDeploymentStateResponse.DeployedClusterState cluster_state = 1; - * @param array<\Google\Cloud\Gaming\V1\FetchDeploymentStateResponse\DeployedClusterState>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClusterState($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\FetchDeploymentStateResponse\DeployedClusterState::class); - $this->cluster_state = $arr; - - return $this; - } - - /** - * List of locations that could not be reached. - * - * Generated from protobuf field repeated string unavailable = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnavailable() - { - return $this->unavailable; - } - - /** - * List of locations that could not be reached. - * - * Generated from protobuf field repeated string unavailable = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnavailable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unavailable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse/DeployedClusterState.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse/DeployedClusterState.php deleted file mode 100644 index 396153c3ae72..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse/DeployedClusterState.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.gaming.v1.FetchDeploymentStateResponse.DeployedClusterState - */ -class DeployedClusterState extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the cluster. - * - * Generated from protobuf field string cluster = 1; - */ - protected $cluster = ''; - /** - * The details about the Agones fleets and autoscalers created in the - * game server cluster. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.DeployedFleetDetails fleet_details = 2; - */ - private $fleet_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster - * The name of the cluster. - * @type array<\Google\Cloud\Gaming\V1\DeployedFleetDetails>|\Google\Protobuf\Internal\RepeatedField $fleet_details - * The details about the Agones fleets and autoscalers created in the - * game server cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * The name of the cluster. - * - * Generated from protobuf field string cluster = 1; - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * The name of the cluster. - * - * 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; - } - - /** - * The details about the Agones fleets and autoscalers created in the - * game server cluster. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.DeployedFleetDetails fleet_details = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFleetDetails() - { - return $this->fleet_details; - } - - /** - * The details about the Agones fleets and autoscalers created in the - * game server cluster. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.DeployedFleetDetails fleet_details = 2; - * @param array<\Google\Cloud\Gaming\V1\DeployedFleetDetails>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFleetDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\DeployedFleetDetails::class); - $this->fleet_details = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DeployedClusterState::class, \Google\Cloud\Gaming\V1\FetchDeploymentStateResponse_DeployedClusterState::class); - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse_DeployedClusterState.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse_DeployedClusterState.php deleted file mode 100644 index 22dbef9a7a4d..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/FetchDeploymentStateResponse_DeployedClusterState.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.gaming.v1.FleetConfig - */ -class FleetConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Agones fleet spec. Example spec: - * `https://agones.dev/site/docs/reference/fleet/`. - * - * Generated from protobuf field string fleet_spec = 1; - */ - protected $fleet_spec = ''; - /** - * The name of the FleetConfig. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $fleet_spec - * Agones fleet spec. Example spec: - * `https://agones.dev/site/docs/reference/fleet/`. - * @type string $name - * The name of the FleetConfig. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); - parent::__construct($data); - } - - /** - * Agones fleet spec. Example spec: - * `https://agones.dev/site/docs/reference/fleet/`. - * - * Generated from protobuf field string fleet_spec = 1; - * @return string - */ - public function getFleetSpec() - { - return $this->fleet_spec; - } - - /** - * Agones fleet spec. Example spec: - * `https://agones.dev/site/docs/reference/fleet/`. - * - * Generated from protobuf field string fleet_spec = 1; - * @param string $var - * @return $this - */ - public function setFleetSpec($var) - { - GPBUtil::checkString($var, True); - $this->fleet_spec = $var; - - return $this; - } - - /** - * The name of the FleetConfig. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the FleetConfig. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerCluster.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerCluster.php deleted file mode 100644 index 7605b425d3de..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerCluster.php +++ /dev/null @@ -1,369 +0,0 @@ -google.cloud.gaming.v1.GameServerCluster - */ -class GameServerCluster extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the game server cluster, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. - * For example, - * `projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The labels associated with this game server cluster. Each label is a - * key-value pair. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * The game server cluster connection information. This information is used to - * manage game server clusters. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterConnectionInfo connection_info = 5; - */ - protected $connection_info = null; - /** - * ETag of the resource. - * - * Generated from protobuf field string etag = 6; - */ - protected $etag = ''; - /** - * Human readable description of the cluster. - * - * Generated from protobuf field string description = 7; - */ - protected $description = ''; - /** - * Output only. The state of the Kubernetes cluster, this will be available if - * 'view' is set to `FULL` in the relevant List/Get/Preview request. - * - * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState cluster_state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_state = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the game server cluster, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. - * For example, - * `projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last-modified time. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The labels associated with this game server cluster. Each label is a - * key-value pair. - * @type \Google\Cloud\Gaming\V1\GameServerClusterConnectionInfo $connection_info - * The game server cluster connection information. This information is used to - * manage game server clusters. - * @type string $etag - * ETag of the resource. - * @type string $description - * Human readable description of the cluster. - * @type \Google\Cloud\Gaming\V1\KubernetesClusterState $cluster_state - * Output only. The state of the Kubernetes cluster, this will be available if - * 'view' is set to `FULL` in the relevant List/Get/Preview request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the game server cluster, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. - * For example, - * `projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the game server cluster, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. - * For example, - * `projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster`. - * - * 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 creation time. - * - * 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 creation time. - * - * 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 last-modified time. - * - * 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 last-modified time. - * - * 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; - } - - /** - * The labels associated with this game server cluster. Each label is a - * key-value pair. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The labels associated with this game server cluster. Each label is a - * key-value pair. - * - * 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; - } - - /** - * The game server cluster connection information. This information is used to - * manage game server clusters. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterConnectionInfo connection_info = 5; - * @return \Google\Cloud\Gaming\V1\GameServerClusterConnectionInfo|null - */ - public function getConnectionInfo() - { - return $this->connection_info; - } - - public function hasConnectionInfo() - { - return isset($this->connection_info); - } - - public function clearConnectionInfo() - { - unset($this->connection_info); - } - - /** - * The game server cluster connection information. This information is used to - * manage game server clusters. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterConnectionInfo connection_info = 5; - * @param \Google\Cloud\Gaming\V1\GameServerClusterConnectionInfo $var - * @return $this - */ - public function setConnectionInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerClusterConnectionInfo::class); - $this->connection_info = $var; - - return $this; - } - - /** - * ETag of the resource. - * - * Generated from protobuf field string etag = 6; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * ETag of the resource. - * - * Generated from protobuf field string etag = 6; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Human readable description of the cluster. - * - * Generated from protobuf field string description = 7; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Human readable description of the cluster. - * - * 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 state of the Kubernetes cluster, this will be available if - * 'view' is set to `FULL` in the relevant List/Get/Preview request. - * - * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState cluster_state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Gaming\V1\KubernetesClusterState|null - */ - public function getClusterState() - { - return $this->cluster_state; - } - - public function hasClusterState() - { - return isset($this->cluster_state); - } - - public function clearClusterState() - { - unset($this->cluster_state); - } - - /** - * Output only. The state of the Kubernetes cluster, this will be available if - * 'view' is set to `FULL` in the relevant List/Get/Preview request. - * - * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState cluster_state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Gaming\V1\KubernetesClusterState $var - * @return $this - */ - public function setClusterState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\KubernetesClusterState::class); - $this->cluster_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterConnectionInfo.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterConnectionInfo.php deleted file mode 100644 index 910ba19f936f..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterConnectionInfo.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.gaming.v1.GameServerClusterConnectionInfo - */ -class GameServerClusterConnectionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Namespace designated on the game server cluster where the Agones game - * server instances will be created. Existence of the namespace will be - * validated during creation. - * - * Generated from protobuf field string namespace = 5; - */ - protected $namespace = ''; - protected $cluster_reference; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Gaming\V1\GkeClusterReference $gke_cluster_reference - * Reference to the GKE cluster where the game servers are installed. - * @type string $namespace - * Namespace designated on the game server cluster where the Agones game - * server instances will be created. Existence of the namespace will be - * validated during creation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * Reference to the GKE cluster where the game servers are installed. - * - * Generated from protobuf field .google.cloud.gaming.v1.GkeClusterReference gke_cluster_reference = 7; - * @return \Google\Cloud\Gaming\V1\GkeClusterReference|null - */ - public function getGkeClusterReference() - { - return $this->readOneof(7); - } - - public function hasGkeClusterReference() - { - return $this->hasOneof(7); - } - - /** - * Reference to the GKE cluster where the game servers are installed. - * - * Generated from protobuf field .google.cloud.gaming.v1.GkeClusterReference gke_cluster_reference = 7; - * @param \Google\Cloud\Gaming\V1\GkeClusterReference $var - * @return $this - */ - public function setGkeClusterReference($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GkeClusterReference::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Namespace designated on the game server cluster where the Agones game - * server instances will be created. Existence of the namespace will be - * validated during creation. - * - * Generated from protobuf field string namespace = 5; - * @return string - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * Namespace designated on the game server cluster where the Agones game - * server instances will be created. Existence of the namespace will be - * validated during creation. - * - * Generated from protobuf field string namespace = 5; - * @param string $var - * @return $this - */ - public function setNamespace($var) - { - GPBUtil::checkString($var, True); - $this->namespace = $var; - - return $this; - } - - /** - * @return string - */ - public function getClusterReference() - { - return $this->whichOneof("cluster_reference"); - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterView.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterView.php deleted file mode 100644 index 5efedb2bbc4f..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClusterView.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.gaming.v1.GameServerClusterView - */ -class GameServerClusterView -{ - /** - * The default / unset value. - * The API will default to the BASIC view. - * - * Generated from protobuf enum GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED = 0; - */ - const GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED = 0; - /** - * Include basic information of a GameServerCluster resource and omit - * `cluster_state`. This is the default value (for ListGameServerClusters, - * GetGameServerCluster and PreviewCreateGameServerCluster). - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Include everything. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - - private static $valueToName = [ - self::GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED => 'GAME_SERVER_CLUSTER_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClustersServiceGrpcClient.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClustersServiceGrpcClient.php deleted file mode 100644 index b3f0ee2d9358..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerClustersServiceGrpcClient.php +++ /dev/null @@ -1,157 +0,0 @@ -_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/ListGameServerClusters', - $argument, - ['\Google\Cloud\Gaming\V1\ListGameServerClustersResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets details of a single game server cluster. - * @param \Google\Cloud\Gaming\V1\GetGameServerClusterRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetGameServerCluster(\Google\Cloud\Gaming\V1\GetGameServerClusterRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/GetGameServerCluster', - $argument, - ['\Google\Cloud\Gaming\V1\GameServerCluster', 'decode'], - $metadata, $options); - } - - /** - * Creates a new game server cluster in a given project and location. - * @param \Google\Cloud\Gaming\V1\CreateGameServerClusterRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateGameServerCluster(\Google\Cloud\Gaming\V1\CreateGameServerClusterRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/CreateGameServerCluster', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Previews creation of a new game server cluster in a given project and - * location. - * @param \Google\Cloud\Gaming\V1\PreviewCreateGameServerClusterRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function PreviewCreateGameServerCluster(\Google\Cloud\Gaming\V1\PreviewCreateGameServerClusterRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/PreviewCreateGameServerCluster', - $argument, - ['\Google\Cloud\Gaming\V1\PreviewCreateGameServerClusterResponse', 'decode'], - $metadata, $options); - } - - /** - * Deletes a single game server cluster. - * @param \Google\Cloud\Gaming\V1\DeleteGameServerClusterRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteGameServerCluster(\Google\Cloud\Gaming\V1\DeleteGameServerClusterRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/DeleteGameServerCluster', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Previews deletion of a single game server cluster. - * @param \Google\Cloud\Gaming\V1\PreviewDeleteGameServerClusterRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function PreviewDeleteGameServerCluster(\Google\Cloud\Gaming\V1\PreviewDeleteGameServerClusterRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/PreviewDeleteGameServerCluster', - $argument, - ['\Google\Cloud\Gaming\V1\PreviewDeleteGameServerClusterResponse', 'decode'], - $metadata, $options); - } - - /** - * Patches a single game server cluster. - * @param \Google\Cloud\Gaming\V1\UpdateGameServerClusterRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateGameServerCluster(\Google\Cloud\Gaming\V1\UpdateGameServerClusterRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/UpdateGameServerCluster', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Previews updating a GameServerCluster. - * @param \Google\Cloud\Gaming\V1\PreviewUpdateGameServerClusterRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function PreviewUpdateGameServerCluster(\Google\Cloud\Gaming\V1\PreviewUpdateGameServerClusterRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerClustersService/PreviewUpdateGameServerCluster', - $argument, - ['\Google\Cloud\Gaming\V1\PreviewUpdateGameServerClusterResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfig.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfig.php deleted file mode 100644 index 02b28dc880dd..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfig.php +++ /dev/null @@ -1,311 +0,0 @@ -google.cloud.gaming.v1.GameServerConfig - */ -class GameServerConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the game server config, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. - * For example, - * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The labels associated with this game server config. Each label is a - * key-value pair. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * FleetConfig contains a list of Agones fleet specs. Only one FleetConfig - * is allowed. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.FleetConfig fleet_configs = 5; - */ - private $fleet_configs; - /** - * The autoscaling settings. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.ScalingConfig scaling_configs = 6; - */ - private $scaling_configs; - /** - * The description of the game server config. - * - * Generated from protobuf field string description = 7; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the game server config, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. - * For example, - * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last-modified time. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The labels associated with this game server config. Each label is a - * key-value pair. - * @type array<\Google\Cloud\Gaming\V1\FleetConfig>|\Google\Protobuf\Internal\RepeatedField $fleet_configs - * FleetConfig contains a list of Agones fleet specs. Only one FleetConfig - * is allowed. - * @type array<\Google\Cloud\Gaming\V1\ScalingConfig>|\Google\Protobuf\Internal\RepeatedField $scaling_configs - * The autoscaling settings. - * @type string $description - * The description of the game server config. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the game server config, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. - * For example, - * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the game server config, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. - * For example, - * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. - * - * 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; - } - - /** - * Output only. The creation time. - * - * 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 creation time. - * - * 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 last-modified time. - * - * 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 last-modified time. - * - * 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; - } - - /** - * The labels associated with this game server config. Each label is a - * key-value pair. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The labels associated with this game server config. Each label is a - * key-value pair. - * - * 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; - } - - /** - * FleetConfig contains a list of Agones fleet specs. Only one FleetConfig - * is allowed. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.FleetConfig fleet_configs = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFleetConfigs() - { - return $this->fleet_configs; - } - - /** - * FleetConfig contains a list of Agones fleet specs. Only one FleetConfig - * is allowed. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.FleetConfig fleet_configs = 5; - * @param array<\Google\Cloud\Gaming\V1\FleetConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFleetConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\FleetConfig::class); - $this->fleet_configs = $arr; - - return $this; - } - - /** - * The autoscaling settings. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.ScalingConfig scaling_configs = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScalingConfigs() - { - return $this->scaling_configs; - } - - /** - * The autoscaling settings. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.ScalingConfig scaling_configs = 6; - * @param array<\Google\Cloud\Gaming\V1\ScalingConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScalingConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\ScalingConfig::class); - $this->scaling_configs = $arr; - - return $this; - } - - /** - * The description of the game server config. - * - * Generated from protobuf field string description = 7; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the game server config. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigOverride.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigOverride.php deleted file mode 100644 index 14b12c3d3403..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigOverride.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.gaming.v1.GameServerConfigOverride - */ -class GameServerConfigOverride extends \Google\Protobuf\Internal\Message -{ - protected $selector; - protected $change; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Gaming\V1\RealmSelector $realms_selector - * Selector for choosing applicable realms. - * @type string $config_version - * The game server config for this override. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Selector for choosing applicable realms. - * - * Generated from protobuf field .google.cloud.gaming.v1.RealmSelector realms_selector = 1; - * @return \Google\Cloud\Gaming\V1\RealmSelector|null - */ - public function getRealmsSelector() - { - return $this->readOneof(1); - } - - public function hasRealmsSelector() - { - return $this->hasOneof(1); - } - - /** - * Selector for choosing applicable realms. - * - * Generated from protobuf field .google.cloud.gaming.v1.RealmSelector realms_selector = 1; - * @param \Google\Cloud\Gaming\V1\RealmSelector $var - * @return $this - */ - public function setRealmsSelector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\RealmSelector::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The game server config for this override. - * - * Generated from protobuf field string config_version = 100; - * @return string - */ - public function getConfigVersion() - { - return $this->readOneof(100); - } - - public function hasConfigVersion() - { - return $this->hasOneof(100); - } - - /** - * The game server config for this override. - * - * Generated from protobuf field string config_version = 100; - * @param string $var - * @return $this - */ - public function setConfigVersion($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * @return string - */ - public function getSelector() - { - return $this->whichOneof("selector"); - } - - /** - * @return string - */ - public function getChange() - { - return $this->whichOneof("change"); - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigsServiceGrpcClient.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigsServiceGrpcClient.php deleted file mode 100644 index e8ffca94ef24..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerConfigsServiceGrpcClient.php +++ /dev/null @@ -1,99 +0,0 @@ -_simpleRequest('/google.cloud.gaming.v1.GameServerConfigsService/ListGameServerConfigs', - $argument, - ['\Google\Cloud\Gaming\V1\ListGameServerConfigsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets details of a single game server config. - * @param \Google\Cloud\Gaming\V1\GetGameServerConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetGameServerConfig(\Google\Cloud\Gaming\V1\GetGameServerConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerConfigsService/GetGameServerConfig', - $argument, - ['\Google\Cloud\Gaming\V1\GameServerConfig', 'decode'], - $metadata, $options); - } - - /** - * Creates a new game server config in a given project, location, and game - * server deployment. Game server configs are immutable, and are not applied - * until referenced in the game server deployment rollout resource. - * @param \Google\Cloud\Gaming\V1\CreateGameServerConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateGameServerConfig(\Google\Cloud\Gaming\V1\CreateGameServerConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerConfigsService/CreateGameServerConfig', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a single game server config. The deletion will fail if the game - * server config is referenced in a game server deployment rollout. - * @param \Google\Cloud\Gaming\V1\DeleteGameServerConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteGameServerConfig(\Google\Cloud\Gaming\V1\DeleteGameServerConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerConfigsService/DeleteGameServerConfig', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeployment.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeployment.php deleted file mode 100644 index c4eaf5178cbf..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeployment.php +++ /dev/null @@ -1,273 +0,0 @@ -google.cloud.gaming.v1.GameServerDeployment - */ -class GameServerDeployment extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the game server deployment, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * For example, - * `projects/my-project/locations/global/gameServerDeployments/my-deployment`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The labels associated with this game server deployment. Each label is a - * key-value pair. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * ETag of the resource. - * - * Generated from protobuf field string etag = 7; - */ - protected $etag = ''; - /** - * Human readable description of the game server delpoyment. - * - * Generated from protobuf field string description = 8; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the game server deployment, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * For example, - * `projects/my-project/locations/global/gameServerDeployments/my-deployment`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last-modified time. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The labels associated with this game server deployment. Each label is a - * key-value pair. - * @type string $etag - * ETag of the resource. - * @type string $description - * Human readable description of the game server delpoyment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the game server deployment, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * For example, - * `projects/my-project/locations/global/gameServerDeployments/my-deployment`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the game server deployment, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * For example, - * `projects/my-project/locations/global/gameServerDeployments/my-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; - } - - /** - * Output only. The creation time. - * - * 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 creation time. - * - * 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 last-modified time. - * - * 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 last-modified time. - * - * 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; - } - - /** - * The labels associated with this game server deployment. Each label is a - * key-value pair. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The labels associated with this game server deployment. Each label is a - * key-value pair. - * - * 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; - } - - /** - * ETag of the resource. - * - * Generated from protobuf field string etag = 7; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * ETag of the resource. - * - * Generated from protobuf field string etag = 7; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Human readable description of the game server delpoyment. - * - * Generated from protobuf field string description = 8; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Human readable description of the game server delpoyment. - * - * Generated from protobuf field string description = 8; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentRollout.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentRollout.php deleted file mode 100644 index 97d7ee92c7c2..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentRollout.php +++ /dev/null @@ -1,290 +0,0 @@ -google.cloud.gaming.v1.GameServerDeploymentRollout - */ -class GameServerDeploymentRollout extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the game server deployment rollout, in the following - * form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. - * For example, - * `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The default game server config is applied to all realms unless overridden - * in the rollout. For example, - * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. - * - * Generated from protobuf field string default_game_server_config = 4; - */ - protected $default_game_server_config = ''; - /** - * Contains the game server config rollout overrides. Overrides are processed - * in the order they are listed. Once a match is found for a realm, the rest - * of the list is not processed. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerConfigOverride game_server_config_overrides = 5; - */ - private $game_server_config_overrides; - /** - * ETag of the resource. - * - * Generated from protobuf field string etag = 6; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the game server deployment rollout, in the following - * form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. - * For example, - * `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last-modified time. - * @type string $default_game_server_config - * The default game server config is applied to all realms unless overridden - * in the rollout. For example, - * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. - * @type array<\Google\Cloud\Gaming\V1\GameServerConfigOverride>|\Google\Protobuf\Internal\RepeatedField $game_server_config_overrides - * Contains the game server config rollout overrides. Overrides are processed - * in the order they are listed. Once a match is found for a realm, the rest - * of the list is not processed. - * @type string $etag - * ETag of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the game server deployment rollout, in the following - * form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. - * For example, - * `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the game server deployment rollout, in the following - * form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. - * For example, - * `projects/my-project/locations/global/gameServerDeployments/my-deployment/rollout`. - * - * 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; - } - - /** - * Output only. The creation time. - * - * 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 creation time. - * - * 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 last-modified time. - * - * 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 last-modified time. - * - * 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; - } - - /** - * The default game server config is applied to all realms unless overridden - * in the rollout. For example, - * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. - * - * Generated from protobuf field string default_game_server_config = 4; - * @return string - */ - public function getDefaultGameServerConfig() - { - return $this->default_game_server_config; - } - - /** - * The default game server config is applied to all realms unless overridden - * in the rollout. For example, - * `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`. - * - * Generated from protobuf field string default_game_server_config = 4; - * @param string $var - * @return $this - */ - public function setDefaultGameServerConfig($var) - { - GPBUtil::checkString($var, True); - $this->default_game_server_config = $var; - - return $this; - } - - /** - * Contains the game server config rollout overrides. Overrides are processed - * in the order they are listed. Once a match is found for a realm, the rest - * of the list is not processed. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerConfigOverride game_server_config_overrides = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGameServerConfigOverrides() - { - return $this->game_server_config_overrides; - } - - /** - * Contains the game server config rollout overrides. Overrides are processed - * in the order they are listed. Once a match is found for a realm, the rest - * of the list is not processed. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerConfigOverride game_server_config_overrides = 5; - * @param array<\Google\Cloud\Gaming\V1\GameServerConfigOverride>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGameServerConfigOverrides($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\GameServerConfigOverride::class); - $this->game_server_config_overrides = $arr; - - return $this; - } - - /** - * ETag of the resource. - * - * Generated from protobuf field string etag = 6; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * ETag of the resource. - * - * Generated from protobuf field string etag = 6; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentsServiceGrpcClient.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentsServiceGrpcClient.php deleted file mode 100644 index 161da3237e3c..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GameServerDeploymentsServiceGrpcClient.php +++ /dev/null @@ -1,179 +0,0 @@ -_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/ListGameServerDeployments', - $argument, - ['\Google\Cloud\Gaming\V1\ListGameServerDeploymentsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets details of a single game server deployment. - * @param \Google\Cloud\Gaming\V1\GetGameServerDeploymentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetGameServerDeployment(\Google\Cloud\Gaming\V1\GetGameServerDeploymentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/GetGameServerDeployment', - $argument, - ['\Google\Cloud\Gaming\V1\GameServerDeployment', 'decode'], - $metadata, $options); - } - - /** - * Creates a new game server deployment in a given project and location. - * @param \Google\Cloud\Gaming\V1\CreateGameServerDeploymentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateGameServerDeployment(\Google\Cloud\Gaming\V1\CreateGameServerDeploymentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/CreateGameServerDeployment', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a single game server deployment. - * @param \Google\Cloud\Gaming\V1\DeleteGameServerDeploymentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteGameServerDeployment(\Google\Cloud\Gaming\V1\DeleteGameServerDeploymentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/DeleteGameServerDeployment', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Patches a game server deployment. - * @param \Google\Cloud\Gaming\V1\UpdateGameServerDeploymentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateGameServerDeployment(\Google\Cloud\Gaming\V1\UpdateGameServerDeploymentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/UpdateGameServerDeployment', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Gets details a single game server deployment rollout. - * @param \Google\Cloud\Gaming\V1\GetGameServerDeploymentRolloutRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetGameServerDeploymentRollout(\Google\Cloud\Gaming\V1\GetGameServerDeploymentRolloutRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/GetGameServerDeploymentRollout', - $argument, - ['\Google\Cloud\Gaming\V1\GameServerDeploymentRollout', 'decode'], - $metadata, $options); - } - - /** - * Patches a single game server deployment rollout. - * The method will not return an error if the update does not affect any - * existing realms. For example - if the default_game_server_config is changed - * but all existing realms use the override, that is valid. Similarly, if a - * non existing realm is explicitly called out in game_server_config_overrides - * field, that will also not result in an error. - * @param \Google\Cloud\Gaming\V1\UpdateGameServerDeploymentRolloutRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateGameServerDeploymentRollout(\Google\Cloud\Gaming\V1\UpdateGameServerDeploymentRolloutRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/UpdateGameServerDeploymentRollout', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Previews the game server deployment rollout. This API does not mutate the - * rollout resource. - * @param \Google\Cloud\Gaming\V1\PreviewGameServerDeploymentRolloutRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function PreviewGameServerDeploymentRollout(\Google\Cloud\Gaming\V1\PreviewGameServerDeploymentRolloutRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/PreviewGameServerDeploymentRollout', - $argument, - ['\Google\Cloud\Gaming\V1\PreviewGameServerDeploymentRolloutResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves information about the current state of the game server - * deployment. Gathers all the Agones fleets and Agones autoscalers, - * including fleets running an older version of the game server deployment. - * @param \Google\Cloud\Gaming\V1\FetchDeploymentStateRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function FetchDeploymentState(\Google\Cloud\Gaming\V1\FetchDeploymentStateRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.GameServerDeploymentsService/FetchDeploymentState', - $argument, - ['\Google\Cloud\Gaming\V1\FetchDeploymentStateResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerClusterRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerClusterRequest.php deleted file mode 100644 index eafb6d4e2783..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerClusterRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.gaming.v1.GetGameServerClusterRequest - */ -class GetGameServerClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the game server cluster to retrieve, in the following form: - * `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. View for the returned GameServerCluster objects. When `FULL` is - * specified, the `cluster_state` field is also returned in the - * GameServerCluster object, which includes the state of the referenced - * Kubernetes cluster such as versions and provider info. The default/unset - * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does - * not return the `cluster_state` field. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the game server cluster to retrieve, in the following form: - * `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`. - * @type int $view - * Optional. View for the returned GameServerCluster objects. When `FULL` is - * specified, the `cluster_state` field is also returned in the - * GameServerCluster object, which includes the state of the referenced - * Kubernetes cluster such as versions and provider info. The default/unset - * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does - * not return the `cluster_state` field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the game server cluster to retrieve, in the following form: - * `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{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 game server cluster to retrieve, in the following form: - * `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{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. View for the returned GameServerCluster objects. When `FULL` is - * specified, the `cluster_state` field is also returned in the - * GameServerCluster object, which includes the state of the referenced - * Kubernetes cluster such as versions and provider info. The default/unset - * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does - * not return the `cluster_state` field. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. View for the returned GameServerCluster objects. When `FULL` is - * specified, the `cluster_state` field is also returned in the - * GameServerCluster object, which includes the state of the referenced - * Kubernetes cluster such as versions and provider info. The default/unset - * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does - * not return the `cluster_state` field. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Gaming\V1\GameServerClusterView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerConfigRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerConfigRequest.php deleted file mode 100644 index 8ef282eb2219..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerConfigRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gaming.v1.GetGameServerConfigRequest - */ -class GetGameServerConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the game server config to retrieve, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. - * - * 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 name of the game server config to retrieve, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the game server config to retrieve, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. - * - * Generated 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 game server config to retrieve, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRequest.php deleted file mode 100644 index e04ee5d9259c..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gaming.v1.GetGameServerDeploymentRequest - */ -class GetGameServerDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the game server delpoyment to retrieve, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * - * 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 name of the game server delpoyment to retrieve, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the game server delpoyment to retrieve, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * - * Generated 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 game server delpoyment to retrieve, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRolloutRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRolloutRequest.php deleted file mode 100644 index 94863ef2ecff..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetGameServerDeploymentRolloutRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.gaming.v1.GetGameServerDeploymentRolloutRequest - */ -class GetGameServerDeploymentRolloutRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the game server delpoyment to retrieve, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. - * - * 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 name of the game server delpoyment to retrieve, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the game server delpoyment to retrieve, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. - * - * Generated 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 game server delpoyment to retrieve, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetRealmRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetRealmRequest.php deleted file mode 100644 index 2b70220dc1f9..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GetRealmRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gaming.v1.GetRealmRequest - */ -class GetRealmRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the realm to retrieve, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. - * - * 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 name of the realm to retrieve, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the realm to retrieve, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. - * - * Generated 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 realm to retrieve, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GkeClusterReference.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GkeClusterReference.php deleted file mode 100644 index 840bdbbe75ac..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/GkeClusterReference.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.gaming.v1.GkeClusterReference - */ -class GkeClusterReference extends \Google\Protobuf\Internal\Message -{ - /** - * The full or partial name of a GKE cluster, using one of the following - * forms: - * * `projects/{project}/locations/{location}/clusters/{cluster}` - * * `locations/{location}/clusters/{cluster}` - * * `{cluster}` - * If project and location are not specified, the project and location of the - * GameServerCluster resource are used to generate the full name of the - * GKE cluster. - * - * Generated from protobuf field string cluster = 1; - */ - protected $cluster = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster - * The full or partial name of a GKE cluster, using one of the following - * forms: - * * `projects/{project}/locations/{location}/clusters/{cluster}` - * * `locations/{location}/clusters/{cluster}` - * * `{cluster}` - * If project and location are not specified, the project and location of the - * GameServerCluster resource are used to generate the full name of the - * GKE cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * The full or partial name of a GKE cluster, using one of the following - * forms: - * * `projects/{project}/locations/{location}/clusters/{cluster}` - * * `locations/{location}/clusters/{cluster}` - * * `{cluster}` - * If project and location are not specified, the project and location of the - * GameServerCluster resource are used to generate the full name of the - * GKE cluster. - * - * Generated from protobuf field string cluster = 1; - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * The full or partial name of a GKE cluster, using one of the following - * forms: - * * `projects/{project}/locations/{location}/clusters/{cluster}` - * * `locations/{location}/clusters/{cluster}` - * * `{cluster}` - * If project and location are not specified, the project and location of the - * GameServerCluster resource are used to generate the full name of the - * GKE cluster. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState.php deleted file mode 100644 index 5bf297caf838..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.gaming.v1.KubernetesClusterState - */ -class KubernetesClusterState extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The version of Agones currently installed in the registered Kubernetes - * cluster. - * - * Generated from protobuf field string agones_version_installed = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $agones_version_installed = ''; - /** - * Output only. The version of Kubernetes that is currently used in the registered - * Kubernetes cluster (as detected by the Cloud Game Servers service). - * - * Generated from protobuf field string kubernetes_version_installed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kubernetes_version_installed = ''; - /** - * Output only. The state for the installed versions of Agones/Kubernetes. - * - * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState.InstallationState installation_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $installation_state = 0; - /** - * Output only. The detailed error message for the installed versions of Agones/Kubernetes. - * - * Generated from protobuf field string version_installed_error_message = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $version_installed_error_message = ''; - /** - * Output only. The cloud provider type reported by the first node's providerID in the list - * of nodes on the Kubernetes endpoint. On Kubernetes platforms that support - * zero-node clusters (like GKE-on-GCP), the provider type will be empty. - * - * Generated from protobuf field string provider = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $provider = ''; - /** - * Output only. The version of Agones that is targeted to be installed in the cluster. - * - * Generated from protobuf field string agones_version_targeted = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $agones_version_targeted = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $agones_version_installed - * Output only. The version of Agones currently installed in the registered Kubernetes - * cluster. - * @type string $kubernetes_version_installed - * Output only. The version of Kubernetes that is currently used in the registered - * Kubernetes cluster (as detected by the Cloud Game Servers service). - * @type int $installation_state - * Output only. The state for the installed versions of Agones/Kubernetes. - * @type string $version_installed_error_message - * Output only. The detailed error message for the installed versions of Agones/Kubernetes. - * @type string $provider - * Output only. The cloud provider type reported by the first node's providerID in the list - * of nodes on the Kubernetes endpoint. On Kubernetes platforms that support - * zero-node clusters (like GKE-on-GCP), the provider type will be empty. - * @type string $agones_version_targeted - * Output only. The version of Agones that is targeted to be installed in the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The version of Agones currently installed in the registered Kubernetes - * cluster. - * - * Generated from protobuf field string agones_version_installed = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAgonesVersionInstalled() - { - return $this->agones_version_installed; - } - - /** - * Output only. The version of Agones currently installed in the registered Kubernetes - * cluster. - * - * Generated from protobuf field string agones_version_installed = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAgonesVersionInstalled($var) - { - GPBUtil::checkString($var, True); - $this->agones_version_installed = $var; - - return $this; - } - - /** - * Output only. The version of Kubernetes that is currently used in the registered - * Kubernetes cluster (as detected by the Cloud Game Servers service). - * - * Generated from protobuf field string kubernetes_version_installed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKubernetesVersionInstalled() - { - return $this->kubernetes_version_installed; - } - - /** - * Output only. The version of Kubernetes that is currently used in the registered - * Kubernetes cluster (as detected by the Cloud Game Servers service). - * - * Generated from protobuf field string kubernetes_version_installed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKubernetesVersionInstalled($var) - { - GPBUtil::checkString($var, True); - $this->kubernetes_version_installed = $var; - - return $this; - } - - /** - * Output only. The state for the installed versions of Agones/Kubernetes. - * - * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState.InstallationState installation_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getInstallationState() - { - return $this->installation_state; - } - - /** - * Output only. The state for the installed versions of Agones/Kubernetes. - * - * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState.InstallationState installation_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setInstallationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Gaming\V1\KubernetesClusterState\InstallationState::class); - $this->installation_state = $var; - - return $this; - } - - /** - * Output only. The detailed error message for the installed versions of Agones/Kubernetes. - * - * Generated from protobuf field string version_installed_error_message = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVersionInstalledErrorMessage() - { - return $this->version_installed_error_message; - } - - /** - * Output only. The detailed error message for the installed versions of Agones/Kubernetes. - * - * Generated from protobuf field string version_installed_error_message = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVersionInstalledErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->version_installed_error_message = $var; - - return $this; - } - - /** - * Output only. The cloud provider type reported by the first node's providerID in the list - * of nodes on the Kubernetes endpoint. On Kubernetes platforms that support - * zero-node clusters (like GKE-on-GCP), the provider type will be empty. - * - * Generated from protobuf field string provider = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getProvider() - { - return $this->provider; - } - - /** - * Output only. The cloud provider type reported by the first node's providerID in the list - * of nodes on the Kubernetes endpoint. On Kubernetes platforms that support - * zero-node clusters (like GKE-on-GCP), the provider type will be empty. - * - * Generated from protobuf field string provider = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setProvider($var) - { - GPBUtil::checkString($var, True); - $this->provider = $var; - - return $this; - } - - /** - * Output only. The version of Agones that is targeted to be installed in the cluster. - * - * Generated from protobuf field string agones_version_targeted = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAgonesVersionTargeted() - { - return $this->agones_version_targeted; - } - - /** - * Output only. The version of Agones that is targeted to be installed in the cluster. - * - * Generated from protobuf field string agones_version_targeted = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAgonesVersionTargeted($var) - { - GPBUtil::checkString($var, True); - $this->agones_version_targeted = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState/InstallationState.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState/InstallationState.php deleted file mode 100644 index b3d990d8f9f4..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState/InstallationState.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.gaming.v1.KubernetesClusterState.InstallationState - */ -class InstallationState -{ - /** - * The default value. This value is used if the state is omitted. - * - * Generated from protobuf enum INSTALLATION_STATE_UNSPECIFIED = 0; - */ - const INSTALLATION_STATE_UNSPECIFIED = 0; - /** - * The combination of Agones and Kubernetes versions is supported by Google - * Cloud Game Servers. - * - * Generated from protobuf enum AGONES_KUBERNETES_VERSION_SUPPORTED = 1; - */ - const AGONES_KUBERNETES_VERSION_SUPPORTED = 1; - /** - * The installed version of Agones is not supported by Google Cloud Game - * Servers. - * - * Generated from protobuf enum AGONES_VERSION_UNSUPPORTED = 2; - */ - const AGONES_VERSION_UNSUPPORTED = 2; - /** - * The installed version of Agones is supported by Google Cloud Game - * Servers, but the installed version of Kubernetes is not recommended or - * supported by the version of Agones. - * - * Generated from protobuf enum AGONES_KUBERNETES_VERSION_UNSUPPORTED = 3; - */ - const AGONES_KUBERNETES_VERSION_UNSUPPORTED = 3; - /** - * The installed version of Agones is not recognized because the Agones - * controller's image name does not have a version string reported as - * {major}.{minor}(.{patch}). - * - * Generated from protobuf enum AGONES_VERSION_UNRECOGNIZED = 4; - */ - const AGONES_VERSION_UNRECOGNIZED = 4; - /** - * The server version of Kubernetes cluster is not recognized because the - * API server didn't return parsable version info on path/version. - * - * Generated from protobuf enum KUBERNETES_VERSION_UNRECOGNIZED = 5; - */ - const KUBERNETES_VERSION_UNRECOGNIZED = 5; - /** - * Failed to read or verify the version of Agones or Kubernetes. See - * version_installed_error_message for details. - * - * Generated from protobuf enum VERSION_VERIFICATION_FAILED = 6; - */ - const VERSION_VERIFICATION_FAILED = 6; - /** - * Agones is not installed. - * - * Generated from protobuf enum AGONES_NOT_INSTALLED = 7; - */ - const AGONES_NOT_INSTALLED = 7; - - private static $valueToName = [ - self::INSTALLATION_STATE_UNSPECIFIED => 'INSTALLATION_STATE_UNSPECIFIED', - self::AGONES_KUBERNETES_VERSION_SUPPORTED => 'AGONES_KUBERNETES_VERSION_SUPPORTED', - self::AGONES_VERSION_UNSUPPORTED => 'AGONES_VERSION_UNSUPPORTED', - self::AGONES_KUBERNETES_VERSION_UNSUPPORTED => 'AGONES_KUBERNETES_VERSION_UNSUPPORTED', - self::AGONES_VERSION_UNRECOGNIZED => 'AGONES_VERSION_UNRECOGNIZED', - self::KUBERNETES_VERSION_UNRECOGNIZED => 'KUBERNETES_VERSION_UNRECOGNIZED', - self::VERSION_VERIFICATION_FAILED => 'VERSION_VERIFICATION_FAILED', - self::AGONES_NOT_INSTALLED => 'AGONES_NOT_INSTALLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InstallationState::class, \Google\Cloud\Gaming\V1\KubernetesClusterState_InstallationState::class); - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState_InstallationState.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState_InstallationState.php deleted file mode 100644 index cd6b02cddd86..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/KubernetesClusterState_InstallationState.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.gaming.v1.LabelSelector - */ -class LabelSelector extends \Google\Protobuf\Internal\Message -{ - /** - * Resource labels for this selector. - * - * 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 - * Resource labels for this selector. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Resource labels for this selector. - * - * Generated from protobuf field map labels = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Resource labels for this selector. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersRequest.php deleted file mode 100644 index 68f9961f30f0..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersRequest.php +++ /dev/null @@ -1,281 +0,0 @@ -google.cloud.gaming.v1.ListGameServerClustersRequest - */ -class ListGameServerClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, in the following form: - * "projects/{project}/locations/{location}/realms/{realm}". - * - * 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, the server - * will pick an appropriate default. The server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListGameServerClustersResponse.next_page_token] to - * determine if there are more GameServerClusters left to be queried. - * - * 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 filter to apply to list results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. View for the returned GameServerCluster objects. When `FULL` is - * specified, the `cluster_state` field is also returned in the - * GameServerCluster object, which includes the state of the referenced - * Kubernetes cluster such as versions and provider info. The default/unset - * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does - * not return the `cluster_state` field. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, in the following form: - * "projects/{project}/locations/{location}/realms/{realm}". - * @type int $page_size - * Optional. The maximum number of items to return. If unspecified, the server - * will pick an appropriate default. The server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListGameServerClustersResponse.next_page_token] to - * determine if there are more GameServerClusters left to be queried. - * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, if any. - * @type string $filter - * Optional. The filter to apply to list results. - * @type string $order_by - * Optional. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * @type int $view - * Optional. View for the returned GameServerCluster objects. When `FULL` is - * specified, the `cluster_state` field is also returned in the - * GameServerCluster object, which includes the state of the referenced - * Kubernetes cluster such as versions and provider info. The default/unset - * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does - * not return the `cluster_state` field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, in the following form: - * "projects/{project}/locations/{location}/realms/{realm}". - * - * Generated 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 following form: - * "projects/{project}/locations/{location}/realms/{realm}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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, the server - * will pick an appropriate default. The server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListGameServerClustersResponse.next_page_token] to - * determine if there are more GameServerClusters left to be queried. - * - * 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, the server - * will pick an appropriate default. The server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListGameServerClustersResponse.next_page_token] to - * determine if there are more GameServerClusters left to be queried. - * - * 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 filter to apply to list results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter to apply to list 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. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * 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 following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * 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. View for the returned GameServerCluster objects. When `FULL` is - * specified, the `cluster_state` field is also returned in the - * GameServerCluster object, which includes the state of the referenced - * Kubernetes cluster such as versions and provider info. The default/unset - * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does - * not return the `cluster_state` field. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. View for the returned GameServerCluster objects. When `FULL` is - * specified, the `cluster_state` field is also returned in the - * GameServerCluster object, which includes the state of the referenced - * Kubernetes cluster such as versions and provider info. The default/unset - * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does - * not return the `cluster_state` field. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Gaming\V1\GameServerClusterView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersResponse.php deleted file mode 100644 index e1747c6e8bc0..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerClustersResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.gaming.v1.ListGameServerClustersResponse - */ -class ListGameServerClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of game server clusters. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerCluster game_server_clusters = 1; - */ - private $game_server_clusters; - /** - * 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 = ''; - /** - * List of locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 4; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Gaming\V1\GameServerCluster>|\Google\Protobuf\Internal\RepeatedField $game_server_clusters - * The list of game server clusters. - * @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 - * List of locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * The list of game server clusters. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerCluster game_server_clusters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGameServerClusters() - { - return $this->game_server_clusters; - } - - /** - * The list of game server clusters. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerCluster game_server_clusters = 1; - * @param array<\Google\Cloud\Gaming\V1\GameServerCluster>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGameServerClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\GameServerCluster::class); - $this->game_server_clusters = $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; - } - - /** - * List of locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 4; - * @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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsRequest.php deleted file mode 100644 index c2a457b0d92e..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsRequest.php +++ /dev/null @@ -1,227 +0,0 @@ -google.cloud.gaming.v1.ListGameServerConfigsRequest - */ -class ListGameServerConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`. - * - * 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, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListGameServerConfigsResponse.next_page_token] to - * determine if there are more GameServerConfigs left to be queried. - * - * 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 filter to apply to list results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`. - * @type int $page_size - * Optional. The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListGameServerConfigsResponse.next_page_token] to - * determine if there are more GameServerConfigs left to be queried. - * @type string $page_token - * Optional. The next_page_token value returned from a previous list request, if any. - * @type string $filter - * Optional. The filter to apply to list results. - * @type string $order_by - * Optional. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`. - * - * Generated 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 following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListGameServerConfigsResponse.next_page_token] to - * determine if there are more GameServerConfigs left to be queried. - * - * 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, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListGameServerConfigsResponse.next_page_token] to - * determine if there are more GameServerConfigs left to be queried. - * - * 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 filter to apply to list results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter to apply to list 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. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * 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 following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsResponse.php deleted file mode 100644 index fd617826cae9..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerConfigsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.gaming.v1.ListGameServerConfigsResponse - */ -class ListGameServerConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of game server configs. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerConfig game_server_configs = 1; - */ - private $game_server_configs; - /** - * 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 = ''; - /** - * List of locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 4; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Gaming\V1\GameServerConfig>|\Google\Protobuf\Internal\RepeatedField $game_server_configs - * The list of game server configs. - * @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 - * List of locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); - parent::__construct($data); - } - - /** - * The list of game server configs. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerConfig game_server_configs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGameServerConfigs() - { - return $this->game_server_configs; - } - - /** - * The list of game server configs. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerConfig game_server_configs = 1; - * @param array<\Google\Cloud\Gaming\V1\GameServerConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGameServerConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\GameServerConfig::class); - $this->game_server_configs = $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; - } - - /** - * List of locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 4; - * @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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsRequest.php deleted file mode 100644 index 22f09037364d..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.gaming.v1.ListGameServerDeploymentsRequest - */ -class ListGameServerDeploymentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, in the following form: - * `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, the server - * will pick an appropriate default. The server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListGameServerDeploymentsResponse.next_page_token] to - * determine if there are more GameServerDeployments left to be queried. - * - * 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 filter to apply to list results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}`. - * @type int $page_size - * Optional. The maximum number of items to return. If unspecified, the server - * will pick an appropriate default. The server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListGameServerDeploymentsResponse.next_page_token] to - * determine if there are more GameServerDeployments left to be queried. - * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @type string $filter - * Optional. The filter to apply to list results. - * @type string $order_by - * Optional. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, in the following 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 following 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; - } - - /** - * Optional. The maximum number of items to return. If unspecified, the server - * will pick an appropriate default. The server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListGameServerDeploymentsResponse.next_page_token] to - * determine if there are more GameServerDeployments left to be queried. - * - * 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, the server - * will pick an appropriate default. The server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListGameServerDeploymentsResponse.next_page_token] to - * determine if there are more GameServerDeployments left to be queried. - * - * 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 filter to apply to list results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter to apply to list 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. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * 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 following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsResponse.php deleted file mode 100644 index 9ec8a5850b74..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListGameServerDeploymentsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.gaming.v1.ListGameServerDeploymentsResponse - */ -class ListGameServerDeploymentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of game server deployments. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerDeployment game_server_deployments = 1; - */ - private $game_server_deployments; - /** - * 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 = ''; - /** - * List of locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 4; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Gaming\V1\GameServerDeployment>|\Google\Protobuf\Internal\RepeatedField $game_server_deployments - * The list of game server deployments. - * @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 - * List of locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * The list of game server deployments. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerDeployment game_server_deployments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGameServerDeployments() - { - return $this->game_server_deployments; - } - - /** - * The list of game server deployments. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.GameServerDeployment game_server_deployments = 1; - * @param array<\Google\Cloud\Gaming\V1\GameServerDeployment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGameServerDeployments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\GameServerDeployment::class); - $this->game_server_deployments = $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; - } - - /** - * List of locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 4; - * @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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsRequest.php deleted file mode 100644 index c20090ff6fb6..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.gaming.v1.ListRealmsRequest - */ -class ListRealmsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, in the following form: - * `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, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListRealmsResponse.next_page_token] to - * determine if there are more realms left to be queried. - * - * 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 filter to apply to list results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}`. - * @type int $page_size - * Optional. The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListRealmsResponse.next_page_token] to - * determine if there are more realms left to be queried. - * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @type string $filter - * Optional. The filter to apply to list results. - * @type string $order_by - * Optional. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, in the following 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 following 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; - } - - /** - * Optional. The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListRealmsResponse.next_page_token] to - * determine if there are more realms left to be queried. - * - * 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, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.gaming.v1.ListRealmsResponse.next_page_token] to - * determine if there are more realms left to be queried. - * - * 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 filter to apply to list results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter to apply to list 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. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * 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 following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsResponse.php deleted file mode 100644 index 6239ac7fda3f..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ListRealmsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.gaming.v1.ListRealmsResponse - */ -class ListRealmsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of realms. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.Realm realms = 1; - */ - private $realms; - /** - * 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 = ''; - /** - * 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\Gaming\V1\Realm>|\Google\Protobuf\Internal\RepeatedField $realms - * The list of realms. - * @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 - * List of locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); - parent::__construct($data); - } - - /** - * The list of realms. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.Realm realms = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRealms() - { - return $this->realms; - } - - /** - * The list of realms. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.Realm realms = 1; - * @param array<\Google\Cloud\Gaming\V1\Realm>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRealms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\Realm::class); - $this->realms = $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; - } - - /** - * 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; - } - - /** - * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationMetadata.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationMetadata.php deleted file mode 100644 index fccc59db35e0..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationMetadata.php +++ /dev/null @@ -1,383 +0,0 @@ -google.cloud.gaming.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 = ''; - /** - * Output only. List of Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - /** - * Output only. Operation status for Game Services API operations. Operation status is in - * the form of key-value pairs where keys are resource IDs and the values show - * the status of the operation. In case of failures, the value includes an - * error code and error message. - * - * Generated from protobuf field map operation_status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $operation_status; - - /** - * 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. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. List of Locations that could not be reached. - * @type array|\Google\Protobuf\Internal\MapField $operation_status - * Output only. Operation status for Game Services API operations. Operation status is in - * the form of key-value pairs where keys are resource IDs and the values show - * the status of the operation. In case of failures, the value includes an - * error code and error message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\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; - } - - /** - * Output only. List of Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. List of Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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; - } - - /** - * Output only. Operation status for Game Services API operations. Operation status is in - * the form of key-value pairs where keys are resource IDs and the values show - * the status of the operation. In case of failures, the value includes an - * error code and error message. - * - * Generated from protobuf field map operation_status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getOperationStatus() - { - return $this->operation_status; - } - - /** - * Output only. Operation status for Game Services API operations. Operation status is in - * the form of key-value pairs where keys are resource IDs and the values show - * the status of the operation. In case of failures, the value includes an - * error code and error message. - * - * Generated from protobuf field map operation_status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setOperationStatus($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\OperationStatus::class); - $this->operation_status = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus.php deleted file mode 100644 index 4b9bfb4f79ce..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.gaming.v1.OperationStatus - */ -class OperationStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Whether the operation is done or still in progress. - * - * Generated from protobuf field bool done = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $done = false; - /** - * The error code in case of failures. - * - * Generated from protobuf field .google.cloud.gaming.v1.OperationStatus.ErrorCode error_code = 2; - */ - protected $error_code = 0; - /** - * The human-readable error message. - * - * Generated from protobuf field string error_message = 3; - */ - protected $error_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $done - * Output only. Whether the operation is done or still in progress. - * @type int $error_code - * The error code in case of failures. - * @type string $error_message - * The human-readable error message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Whether the operation is done or still in progress. - * - * Generated from protobuf field bool done = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getDone() - { - return $this->done; - } - - /** - * Output only. Whether the operation is done or still in progress. - * - * Generated from protobuf field bool done = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setDone($var) - { - GPBUtil::checkBool($var); - $this->done = $var; - - return $this; - } - - /** - * The error code in case of failures. - * - * Generated from protobuf field .google.cloud.gaming.v1.OperationStatus.ErrorCode error_code = 2; - * @return int - */ - public function getErrorCode() - { - return $this->error_code; - } - - /** - * The error code in case of failures. - * - * Generated from protobuf field .google.cloud.gaming.v1.OperationStatus.ErrorCode error_code = 2; - * @param int $var - * @return $this - */ - public function setErrorCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Gaming\V1\OperationStatus\ErrorCode::class); - $this->error_code = $var; - - return $this; - } - - /** - * The human-readable error message. - * - * Generated from protobuf field string error_message = 3; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * The human-readable error message. - * - * Generated from protobuf field string error_message = 3; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus/ErrorCode.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus/ErrorCode.php deleted file mode 100644 index 80dd9072d84a..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus/ErrorCode.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.gaming.v1.OperationStatus.ErrorCode - */ -class ErrorCode -{ - /** - * Generated from protobuf enum ERROR_CODE_UNSPECIFIED = 0; - */ - const ERROR_CODE_UNSPECIFIED = 0; - /** - * Generated from protobuf enum INTERNAL_ERROR = 1; - */ - const INTERNAL_ERROR = 1; - /** - * Generated from protobuf enum PERMISSION_DENIED = 2; - */ - const PERMISSION_DENIED = 2; - /** - * Generated from protobuf enum CLUSTER_CONNECTION = 3; - */ - const CLUSTER_CONNECTION = 3; - - private static $valueToName = [ - self::ERROR_CODE_UNSPECIFIED => 'ERROR_CODE_UNSPECIFIED', - self::INTERNAL_ERROR => 'INTERNAL_ERROR', - self::PERMISSION_DENIED => 'PERMISSION_DENIED', - self::CLUSTER_CONNECTION => 'CLUSTER_CONNECTION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ErrorCode::class, \Google\Cloud\Gaming\V1\OperationStatus_ErrorCode::class); - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus_ErrorCode.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus_ErrorCode.php deleted file mode 100644 index 8ffb98e421f9..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/OperationStatus_ErrorCode.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.gaming.v1.PreviewCreateGameServerClusterRequest - */ -class PreviewCreateGameServerClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID of the game server cluster resource to be created. - * - * Generated from protobuf field string game_server_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $game_server_cluster_id = ''; - /** - * Required. The game server cluster resource to be created. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $game_server_cluster = null; - /** - * Optional. The target timestamp to compute the preview. - * - * Generated from protobuf field .google.protobuf.Timestamp preview_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $preview_time = null; - /** - * Optional. This field is deprecated, preview will always return - * KubernetesClusterState. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. - * @type string $game_server_cluster_id - * Required. The ID of the game server cluster resource to be created. - * @type \Google\Cloud\Gaming\V1\GameServerCluster $game_server_cluster - * Required. The game server cluster resource to be created. - * @type \Google\Protobuf\Timestamp $preview_time - * Optional. The target timestamp to compute the preview. - * @type int $view - * Optional. This field is deprecated, preview will always return - * KubernetesClusterState. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. - * - * Generated 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 following form: - * `projects/{project}/locations/{location}/realms/{realm}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 game server cluster resource to be created. - * - * Generated from protobuf field string game_server_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGameServerClusterId() - { - return $this->game_server_cluster_id; - } - - /** - * Required. The ID of the game server cluster resource to be created. - * - * Generated from protobuf field string game_server_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGameServerClusterId($var) - { - GPBUtil::checkString($var, True); - $this->game_server_cluster_id = $var; - - return $this; - } - - /** - * Required. The game server cluster resource to be created. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Gaming\V1\GameServerCluster|null - */ - public function getGameServerCluster() - { - return $this->game_server_cluster; - } - - public function hasGameServerCluster() - { - return isset($this->game_server_cluster); - } - - public function clearGameServerCluster() - { - unset($this->game_server_cluster); - } - - /** - * Required. The game server cluster resource to be created. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Gaming\V1\GameServerCluster $var - * @return $this - */ - public function setGameServerCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerCluster::class); - $this->game_server_cluster = $var; - - return $this; - } - - /** - * Optional. The target timestamp to compute the preview. - * - * Generated from protobuf field .google.protobuf.Timestamp preview_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPreviewTime() - { - return $this->preview_time; - } - - public function hasPreviewTime() - { - return isset($this->preview_time); - } - - public function clearPreviewTime() - { - unset($this->preview_time); - } - - /** - * Optional. The target timestamp to compute the preview. - * - * Generated from protobuf field .google.protobuf.Timestamp preview_time = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPreviewTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->preview_time = $var; - - return $this; - } - - /** - * Optional. This field is deprecated, preview will always return - * KubernetesClusterState. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return int - * @deprecated - */ - public function getView() - { - @trigger_error('view is deprecated.', E_USER_DEPRECATED); - return $this->view; - } - - /** - * Optional. This field is deprecated, preview will always return - * KubernetesClusterState. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerClusterView view = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - * @deprecated - */ - public function setView($var) - { - @trigger_error('view is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkEnum($var, \Google\Cloud\Gaming\V1\GameServerClusterView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewCreateGameServerClusterResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewCreateGameServerClusterResponse.php deleted file mode 100644 index 1d14622447e3..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewCreateGameServerClusterResponse.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.gaming.v1.PreviewCreateGameServerClusterResponse - */ -class PreviewCreateGameServerClusterResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The ETag of the game server cluster. - * - * Generated from protobuf field string etag = 2; - */ - protected $etag = ''; - /** - * The target state. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; - */ - protected $target_state = null; - /** - * Output only. The state of the Kubernetes cluster in preview, this will be available if - * 'view' is set to `FULL` in the relevant List/Get/Preview request. - * - * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState cluster_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_state = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $etag - * The ETag of the game server cluster. - * @type \Google\Cloud\Gaming\V1\TargetState $target_state - * The target state. - * @type \Google\Cloud\Gaming\V1\KubernetesClusterState $cluster_state - * Output only. The state of the Kubernetes cluster in preview, this will be available if - * 'view' is set to `FULL` in the relevant List/Get/Preview request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * The ETag of the game server cluster. - * - * Generated from protobuf field string etag = 2; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The ETag of the game server cluster. - * - * Generated from protobuf field string etag = 2; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * The target state. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; - * @return \Google\Cloud\Gaming\V1\TargetState|null - */ - public function getTargetState() - { - return $this->target_state; - } - - public function hasTargetState() - { - return isset($this->target_state); - } - - public function clearTargetState() - { - unset($this->target_state); - } - - /** - * The target state. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; - * @param \Google\Cloud\Gaming\V1\TargetState $var - * @return $this - */ - public function setTargetState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\TargetState::class); - $this->target_state = $var; - - return $this; - } - - /** - * Output only. The state of the Kubernetes cluster in preview, this will be available if - * 'view' is set to `FULL` in the relevant List/Get/Preview request. - * - * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState cluster_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Gaming\V1\KubernetesClusterState|null - */ - public function getClusterState() - { - return $this->cluster_state; - } - - public function hasClusterState() - { - return isset($this->cluster_state); - } - - public function clearClusterState() - { - unset($this->cluster_state); - } - - /** - * Output only. The state of the Kubernetes cluster in preview, this will be available if - * 'view' is set to `FULL` in the relevant List/Get/Preview request. - * - * Generated from protobuf field .google.cloud.gaming.v1.KubernetesClusterState cluster_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Gaming\V1\KubernetesClusterState $var - * @return $this - */ - public function setClusterState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\KubernetesClusterState::class); - $this->cluster_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterRequest.php deleted file mode 100644 index 7fff9d6dbd17..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.gaming.v1.PreviewDeleteGameServerClusterRequest - */ -class PreviewDeleteGameServerClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the game server cluster to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The target timestamp to compute the preview. - * - * Generated from protobuf field .google.protobuf.Timestamp preview_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $preview_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the game server cluster to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`. - * @type \Google\Protobuf\Timestamp $preview_time - * Optional. The target timestamp to compute the preview. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the game server cluster to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerClusters/{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 game server cluster to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerClusters/{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. The target timestamp to compute the preview. - * - * Generated from protobuf field .google.protobuf.Timestamp preview_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPreviewTime() - { - return $this->preview_time; - } - - public function hasPreviewTime() - { - return isset($this->preview_time); - } - - public function clearPreviewTime() - { - unset($this->preview_time); - } - - /** - * Optional. The target timestamp to compute the preview. - * - * Generated from protobuf field .google.protobuf.Timestamp preview_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPreviewTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->preview_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterResponse.php deleted file mode 100644 index c640460cc14e..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewDeleteGameServerClusterResponse.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.gaming.v1.PreviewDeleteGameServerClusterResponse - */ -class PreviewDeleteGameServerClusterResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The ETag of the game server cluster. - * - * Generated from protobuf field string etag = 2; - */ - protected $etag = ''; - /** - * The target state. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; - */ - protected $target_state = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $etag - * The ETag of the game server cluster. - * @type \Google\Cloud\Gaming\V1\TargetState $target_state - * The target state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * The ETag of the game server cluster. - * - * Generated from protobuf field string etag = 2; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The ETag of the game server cluster. - * - * Generated from protobuf field string etag = 2; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * The target state. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; - * @return \Google\Cloud\Gaming\V1\TargetState|null - */ - public function getTargetState() - { - return $this->target_state; - } - - public function hasTargetState() - { - return isset($this->target_state); - } - - public function clearTargetState() - { - unset($this->target_state); - } - - /** - * The target state. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; - * @param \Google\Cloud\Gaming\V1\TargetState $var - * @return $this - */ - public function setTargetState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\TargetState::class); - $this->target_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutRequest.php deleted file mode 100644 index f832098d5e61..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutRequest.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.gaming.v1.PreviewGameServerDeploymentRolloutRequest - */ -class PreviewGameServerDeploymentRolloutRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The game server deployment rollout to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeploymentRollout rollout = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $rollout = null; - /** - * Optional. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Optional. The target timestamp to compute the preview. Defaults to the immediately - * after the proposed rollout completes. - * - * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $preview_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Gaming\V1\GameServerDeploymentRollout $rollout - * Required. The game server deployment rollout to be updated. - * Only fields specified in update_mask are updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @type \Google\Protobuf\Timestamp $preview_time - * Optional. The target timestamp to compute the preview. Defaults to the immediately - * after the proposed rollout completes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The game server deployment rollout to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeploymentRollout rollout = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Gaming\V1\GameServerDeploymentRollout|null - */ - public function getRollout() - { - return $this->rollout; - } - - public function hasRollout() - { - return isset($this->rollout); - } - - public function clearRollout() - { - unset($this->rollout); - } - - /** - * Required. The game server deployment rollout to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeploymentRollout rollout = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Gaming\V1\GameServerDeploymentRollout $var - * @return $this - */ - public function setRollout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerDeploymentRollout::class); - $this->rollout = $var; - - return $this; - } - - /** - * Optional. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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; - } - - /** - * Optional. The target timestamp to compute the preview. Defaults to the immediately - * after the proposed rollout completes. - * - * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPreviewTime() - { - return $this->preview_time; - } - - public function hasPreviewTime() - { - return isset($this->preview_time); - } - - public function clearPreviewTime() - { - unset($this->preview_time); - } - - /** - * Optional. The target timestamp to compute the preview. Defaults to the immediately - * after the proposed rollout completes. - * - * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPreviewTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->preview_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutResponse.php deleted file mode 100644 index db7ed288e165..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewGameServerDeploymentRolloutResponse.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.gaming.v1.PreviewGameServerDeploymentRolloutResponse - */ -class PreviewGameServerDeploymentRolloutResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Locations that could not be reached on this request. - * - * Generated from protobuf field repeated string unavailable = 2; - */ - private $unavailable; - /** - * ETag of the game server deployment. - * - * Generated from protobuf field string etag = 3; - */ - protected $etag = ''; - /** - * The target state. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 4; - */ - protected $target_state = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $unavailable - * Locations that could not be reached on this request. - * @type string $etag - * ETag of the game server deployment. - * @type \Google\Cloud\Gaming\V1\TargetState $target_state - * The target state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Locations that could not be reached on this request. - * - * Generated from protobuf field repeated string unavailable = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnavailable() - { - return $this->unavailable; - } - - /** - * Locations that could not be reached on this request. - * - * Generated from protobuf field repeated string unavailable = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnavailable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unavailable = $arr; - - return $this; - } - - /** - * ETag of the game server deployment. - * - * Generated from protobuf field string etag = 3; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * ETag of the game server deployment. - * - * Generated from protobuf field string etag = 3; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * The target state. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 4; - * @return \Google\Cloud\Gaming\V1\TargetState|null - */ - public function getTargetState() - { - return $this->target_state; - } - - public function hasTargetState() - { - return isset($this->target_state); - } - - public function clearTargetState() - { - unset($this->target_state); - } - - /** - * The target state. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 4; - * @param \Google\Cloud\Gaming\V1\TargetState $var - * @return $this - */ - public function setTargetState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\TargetState::class); - $this->target_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateRequest.php deleted file mode 100644 index 3a42b331a426..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateRequest.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.gaming.v1.PreviewRealmUpdateRequest - */ -class PreviewRealmUpdateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The realm to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $realm = null; - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. The target timestamp to compute the preview. - * - * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $preview_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Gaming\V1\Realm $realm - * Required. The realm to be updated. - * Only fields specified in update_mask are updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @type \Google\Protobuf\Timestamp $preview_time - * Optional. The target timestamp to compute the preview. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); - parent::__construct($data); - } - - /** - * Required. The realm to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Gaming\V1\Realm|null - */ - public function getRealm() - { - return $this->realm; - } - - public function hasRealm() - { - return isset($this->realm); - } - - public function clearRealm() - { - unset($this->realm); - } - - /** - * Required. The realm to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Gaming\V1\Realm $var - * @return $this - */ - public function setRealm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\Realm::class); - $this->realm = $var; - - return $this; - } - - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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 update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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. The target timestamp to compute the preview. - * - * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPreviewTime() - { - return $this->preview_time; - } - - public function hasPreviewTime() - { - return isset($this->preview_time); - } - - public function clearPreviewTime() - { - unset($this->preview_time); - } - - /** - * Optional. The target timestamp to compute the preview. - * - * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPreviewTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->preview_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateResponse.php deleted file mode 100644 index 54be6afca495..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewRealmUpdateResponse.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.gaming.v1.PreviewRealmUpdateResponse - */ -class PreviewRealmUpdateResponse extends \Google\Protobuf\Internal\Message -{ - /** - * ETag of the realm. - * - * Generated from protobuf field string etag = 2; - */ - protected $etag = ''; - /** - * The target state. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; - */ - protected $target_state = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $etag - * ETag of the realm. - * @type \Google\Cloud\Gaming\V1\TargetState $target_state - * The target state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); - parent::__construct($data); - } - - /** - * ETag of the realm. - * - * Generated from protobuf field string etag = 2; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * ETag of the realm. - * - * Generated from protobuf field string etag = 2; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * The target state. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; - * @return \Google\Cloud\Gaming\V1\TargetState|null - */ - public function getTargetState() - { - return $this->target_state; - } - - public function hasTargetState() - { - return isset($this->target_state); - } - - public function clearTargetState() - { - unset($this->target_state); - } - - /** - * The target state. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; - * @param \Google\Cloud\Gaming\V1\TargetState $var - * @return $this - */ - public function setTargetState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\TargetState::class); - $this->target_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterRequest.php deleted file mode 100644 index e62448b13902..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterRequest.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.gaming.v1.PreviewUpdateGameServerClusterRequest - */ -class PreviewUpdateGameServerClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The game server cluster to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $game_server_cluster = null; - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. The target timestamp to compute the preview. - * - * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $preview_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Gaming\V1\GameServerCluster $game_server_cluster - * Required. The game server cluster to be updated. - * Only fields specified in update_mask are updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @type \Google\Protobuf\Timestamp $preview_time - * Optional. The target timestamp to compute the preview. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The game server cluster to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Gaming\V1\GameServerCluster|null - */ - public function getGameServerCluster() - { - return $this->game_server_cluster; - } - - public function hasGameServerCluster() - { - return isset($this->game_server_cluster); - } - - public function clearGameServerCluster() - { - unset($this->game_server_cluster); - } - - /** - * Required. The game server cluster to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Gaming\V1\GameServerCluster $var - * @return $this - */ - public function setGameServerCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerCluster::class); - $this->game_server_cluster = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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. The target timestamp to compute the preview. - * - * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPreviewTime() - { - return $this->preview_time; - } - - public function hasPreviewTime() - { - return isset($this->preview_time); - } - - public function clearPreviewTime() - { - unset($this->preview_time); - } - - /** - * Optional. The target timestamp to compute the preview. - * - * Generated from protobuf field .google.protobuf.Timestamp preview_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPreviewTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->preview_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterResponse.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterResponse.php deleted file mode 100644 index d8f4bb1541c3..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/PreviewUpdateGameServerClusterResponse.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.gaming.v1.PreviewUpdateGameServerClusterResponse - */ -class PreviewUpdateGameServerClusterResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The ETag of the game server cluster. - * - * Generated from protobuf field string etag = 2; - */ - protected $etag = ''; - /** - * The target state. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; - */ - protected $target_state = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $etag - * The ETag of the game server cluster. - * @type \Google\Cloud\Gaming\V1\TargetState $target_state - * The target state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * The ETag of the game server cluster. - * - * Generated from protobuf field string etag = 2; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The ETag of the game server cluster. - * - * Generated from protobuf field string etag = 2; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * The target state. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; - * @return \Google\Cloud\Gaming\V1\TargetState|null - */ - public function getTargetState() - { - return $this->target_state; - } - - public function hasTargetState() - { - return isset($this->target_state); - } - - public function clearTargetState() - { - unset($this->target_state); - } - - /** - * The target state. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetState target_state = 3; - * @param \Google\Cloud\Gaming\V1\TargetState $var - * @return $this - */ - public function setTargetState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\TargetState::class); - $this->target_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Realm.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Realm.php deleted file mode 100644 index 69c976834791..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Realm.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.gaming.v1.Realm - */ -class Realm extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the realm, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. For - * example, `projects/my-project/locations/{location}/realms/my-realm`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last-modified time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The labels associated with this realm. Each label is a key-value pair. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Required. Time zone where all policies targeting this realm are evaluated. The value - * of this field must be from the IANA time zone database: - * https://www.iana.org/time-zones. - * - * Generated from protobuf field string time_zone = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $time_zone = ''; - /** - * ETag of the resource. - * - * Generated from protobuf field string etag = 7; - */ - protected $etag = ''; - /** - * Human readable description of the realm. - * - * Generated from protobuf field string description = 8; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the realm, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. For - * example, `projects/my-project/locations/{location}/realms/my-realm`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last-modified time. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The labels associated with this realm. Each label is a key-value pair. - * @type string $time_zone - * Required. Time zone where all policies targeting this realm are evaluated. The value - * of this field must be from the IANA time zone database: - * https://www.iana.org/time-zones. - * @type string $etag - * ETag of the resource. - * @type string $description - * Human readable description of the realm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the realm, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. For - * example, `projects/my-project/locations/{location}/realms/my-realm`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the realm, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. For - * example, `projects/my-project/locations/{location}/realms/my-realm`. - * - * 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; - } - - /** - * Output only. The creation time. - * - * 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 creation time. - * - * 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 last-modified time. - * - * 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 last-modified time. - * - * 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; - } - - /** - * The labels associated with this realm. Each label is a key-value pair. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The labels associated with this realm. Each label is a key-value pair. - * - * 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; - } - - /** - * Required. Time zone where all policies targeting this realm are evaluated. The value - * of this field must be from the IANA time zone database: - * https://www.iana.org/time-zones. - * - * Generated from protobuf field string time_zone = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTimeZone() - { - return $this->time_zone; - } - - /** - * Required. Time zone where all policies targeting this realm are evaluated. The value - * of this field must be from the IANA time zone database: - * https://www.iana.org/time-zones. - * - * Generated from protobuf field string time_zone = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkString($var, True); - $this->time_zone = $var; - - return $this; - } - - /** - * ETag of the resource. - * - * Generated from protobuf field string etag = 7; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * ETag of the resource. - * - * Generated from protobuf field string etag = 7; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Human readable description of the realm. - * - * Generated from protobuf field string description = 8; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Human readable description of the realm. - * - * Generated from protobuf field string description = 8; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmSelector.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmSelector.php deleted file mode 100644 index 062ffb20f315..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmSelector.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gaming.v1.RealmSelector - */ -class RealmSelector extends \Google\Protobuf\Internal\Message -{ - /** - * List of realms to match. - * - * Generated from protobuf field repeated string realms = 1; - */ - private $realms; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $realms - * List of realms to match. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * List of realms to match. - * - * Generated from protobuf field repeated string realms = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRealms() - { - return $this->realms; - } - - /** - * List of realms to match. - * - * Generated from protobuf field repeated string realms = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRealms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->realms = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmsServiceGrpcClient.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmsServiceGrpcClient.php deleted file mode 100644 index 19a0749215a5..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/RealmsServiceGrpcClient.php +++ /dev/null @@ -1,126 +0,0 @@ -_simpleRequest('/google.cloud.gaming.v1.RealmsService/ListRealms', - $argument, - ['\Google\Cloud\Gaming\V1\ListRealmsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets details of a single realm. - * @param \Google\Cloud\Gaming\V1\GetRealmRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetRealm(\Google\Cloud\Gaming\V1\GetRealmRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.RealmsService/GetRealm', - $argument, - ['\Google\Cloud\Gaming\V1\Realm', 'decode'], - $metadata, $options); - } - - /** - * Creates a new realm in a given project and location. - * @param \Google\Cloud\Gaming\V1\CreateRealmRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateRealm(\Google\Cloud\Gaming\V1\CreateRealmRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.RealmsService/CreateRealm', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a single realm. - * @param \Google\Cloud\Gaming\V1\DeleteRealmRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteRealm(\Google\Cloud\Gaming\V1\DeleteRealmRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.RealmsService/DeleteRealm', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Patches a single realm. - * @param \Google\Cloud\Gaming\V1\UpdateRealmRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateRealm(\Google\Cloud\Gaming\V1\UpdateRealmRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.RealmsService/UpdateRealm', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Previews patches to a single realm. - * @param \Google\Cloud\Gaming\V1\PreviewRealmUpdateRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function PreviewRealmUpdate(\Google\Cloud\Gaming\V1\PreviewRealmUpdateRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gaming.v1.RealmsService/PreviewRealmUpdate', - $argument, - ['\Google\Cloud\Gaming\V1\PreviewRealmUpdateResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ScalingConfig.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ScalingConfig.php deleted file mode 100644 index b211fac9b3b6..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/ScalingConfig.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.gaming.v1.ScalingConfig - */ -class ScalingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Scaling Config - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. Agones fleet autoscaler spec. Example spec: - * https://agones.dev/site/docs/reference/fleetautoscaler/ - * - * Generated from protobuf field string fleet_autoscaler_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $fleet_autoscaler_spec = ''; - /** - * Labels used to identify the game server clusters to which this Agones - * scaling config applies. A game server cluster is subject to this Agones - * scaling config if its labels match any of the selector entries. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.LabelSelector selectors = 4; - */ - private $selectors; - /** - * The schedules to which this Scaling Config applies. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.Schedule schedules = 5; - */ - private $schedules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Scaling Config - * @type string $fleet_autoscaler_spec - * Required. Agones fleet autoscaler spec. Example spec: - * https://agones.dev/site/docs/reference/fleetautoscaler/ - * @type array<\Google\Cloud\Gaming\V1\LabelSelector>|\Google\Protobuf\Internal\RepeatedField $selectors - * Labels used to identify the game server clusters to which this Agones - * scaling config applies. A game server cluster is subject to this Agones - * scaling config if its labels match any of the selector entries. - * @type array<\Google\Cloud\Gaming\V1\Schedule>|\Google\Protobuf\Internal\RepeatedField $schedules - * The schedules to which this Scaling Config applies. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerConfigs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Scaling Config - * - * 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 Scaling Config - * - * 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. Agones fleet autoscaler spec. Example spec: - * https://agones.dev/site/docs/reference/fleetautoscaler/ - * - * Generated from protobuf field string fleet_autoscaler_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFleetAutoscalerSpec() - { - return $this->fleet_autoscaler_spec; - } - - /** - * Required. Agones fleet autoscaler spec. Example spec: - * https://agones.dev/site/docs/reference/fleetautoscaler/ - * - * Generated from protobuf field string fleet_autoscaler_spec = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFleetAutoscalerSpec($var) - { - GPBUtil::checkString($var, True); - $this->fleet_autoscaler_spec = $var; - - return $this; - } - - /** - * Labels used to identify the game server clusters to which this Agones - * scaling config applies. A game server cluster is subject to this Agones - * scaling config if its labels match any of the selector entries. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.LabelSelector selectors = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSelectors() - { - return $this->selectors; - } - - /** - * Labels used to identify the game server clusters to which this Agones - * scaling config applies. A game server cluster is subject to this Agones - * scaling config if its labels match any of the selector entries. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.LabelSelector selectors = 4; - * @param array<\Google\Cloud\Gaming\V1\LabelSelector>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSelectors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\LabelSelector::class); - $this->selectors = $arr; - - return $this; - } - - /** - * The schedules to which this Scaling Config applies. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.Schedule schedules = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSchedules() - { - return $this->schedules; - } - - /** - * The schedules to which this Scaling Config applies. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.Schedule schedules = 5; - * @param array<\Google\Cloud\Gaming\V1\Schedule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSchedules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\Schedule::class); - $this->schedules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Schedule.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Schedule.php deleted file mode 100644 index 20928aea9944..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/Schedule.php +++ /dev/null @@ -1,219 +0,0 @@ -google.cloud.gaming.v1.Schedule - */ -class Schedule extends \Google\Protobuf\Internal\Message -{ - /** - * The start time of the event. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The end time of the event. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The duration for the cron job event. The duration of the event is effective - * after the cron job's start time. - * - * Generated from protobuf field .google.protobuf.Duration cron_job_duration = 3; - */ - protected $cron_job_duration = null; - /** - * The cron definition of the scheduled event. See - * https://en.wikipedia.org/wiki/Cron. Cron spec specifies the local time as - * defined by the realm. - * - * Generated from protobuf field string cron_spec = 4; - */ - protected $cron_spec = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The start time of the event. - * @type \Google\Protobuf\Timestamp $end_time - * The end time of the event. - * @type \Google\Protobuf\Duration $cron_job_duration - * The duration for the cron job event. The duration of the event is effective - * after the cron job's start time. - * @type string $cron_spec - * The cron definition of the scheduled event. See - * https://en.wikipedia.org/wiki/Cron. Cron spec specifies the local time as - * defined by the realm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The start time of the event. - * - * 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 start time of the event. - * - * 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 end time of the event. - * - * 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 end time of the event. - * - * 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 duration for the cron job event. The duration of the event is effective - * after the cron job's start time. - * - * Generated from protobuf field .google.protobuf.Duration cron_job_duration = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getCronJobDuration() - { - return $this->cron_job_duration; - } - - public function hasCronJobDuration() - { - return isset($this->cron_job_duration); - } - - public function clearCronJobDuration() - { - unset($this->cron_job_duration); - } - - /** - * The duration for the cron job event. The duration of the event is effective - * after the cron job's start time. - * - * Generated from protobuf field .google.protobuf.Duration cron_job_duration = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setCronJobDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->cron_job_duration = $var; - - return $this; - } - - /** - * The cron definition of the scheduled event. See - * https://en.wikipedia.org/wiki/Cron. Cron spec specifies the local time as - * defined by the realm. - * - * Generated from protobuf field string cron_spec = 4; - * @return string - */ - public function getCronSpec() - { - return $this->cron_spec; - } - - /** - * The cron definition of the scheduled event. See - * https://en.wikipedia.org/wiki/Cron. Cron spec specifies the local time as - * defined by the realm. - * - * Generated from protobuf field string cron_spec = 4; - * @param string $var - * @return $this - */ - public function setCronSpec($var) - { - GPBUtil::checkString($var, True); - $this->cron_spec = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/SpecSource.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/SpecSource.php deleted file mode 100644 index 4a91da42f36a..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/SpecSource.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gaming.v1.SpecSource - */ -class SpecSource extends \Google\Protobuf\Internal\Message -{ - /** - * The game server config resource. Uses the form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}/configs/{config_id}`. - * - * Generated from protobuf field string game_server_config_name = 1; - */ - protected $game_server_config_name = ''; - /** - * The name of the Agones leet config or Agones scaling config used to derive - * the Agones fleet or Agones autoscaler spec. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $game_server_config_name - * The game server config resource. Uses the form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}/configs/{config_id}`. - * @type string $name - * The name of the Agones leet config or Agones scaling config used to derive - * the Agones fleet or Agones autoscaler spec. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The game server config resource. Uses the form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}/configs/{config_id}`. - * - * Generated from protobuf field string game_server_config_name = 1; - * @return string - */ - public function getGameServerConfigName() - { - return $this->game_server_config_name; - } - - /** - * The game server config resource. Uses the form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}/configs/{config_id}`. - * - * Generated from protobuf field string game_server_config_name = 1; - * @param string $var - * @return $this - */ - public function setGameServerConfigName($var) - { - GPBUtil::checkString($var, True); - $this->game_server_config_name = $var; - - return $this; - } - - /** - * The name of the Agones leet config or Agones scaling config used to derive - * the Agones fleet or Agones autoscaler spec. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the Agones leet config or Agones scaling config used to derive - * the Agones fleet or Agones autoscaler spec. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails.php deleted file mode 100644 index f3fb6e45dc2e..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.gaming.v1.TargetDetails - */ -class TargetDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The game server cluster name. Uses the form: - * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. - * - * Generated from protobuf field string game_server_cluster_name = 1; - */ - protected $game_server_cluster_name = ''; - /** - * The game server deployment name. Uses the form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}`. - * - * Generated from protobuf field string game_server_deployment_name = 2; - */ - protected $game_server_deployment_name = ''; - /** - * Agones fleet details for game server clusters and game server deployments. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails fleet_details = 3; - */ - private $fleet_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $game_server_cluster_name - * The game server cluster name. Uses the form: - * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. - * @type string $game_server_deployment_name - * The game server deployment name. Uses the form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}`. - * @type array<\Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails>|\Google\Protobuf\Internal\RepeatedField $fleet_details - * Agones fleet details for game server clusters and game server deployments. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The game server cluster name. Uses the form: - * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. - * - * Generated from protobuf field string game_server_cluster_name = 1; - * @return string - */ - public function getGameServerClusterName() - { - return $this->game_server_cluster_name; - } - - /** - * The game server cluster name. Uses the form: - * `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`. - * - * Generated from protobuf field string game_server_cluster_name = 1; - * @param string $var - * @return $this - */ - public function setGameServerClusterName($var) - { - GPBUtil::checkString($var, True); - $this->game_server_cluster_name = $var; - - return $this; - } - - /** - * The game server deployment name. Uses the form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}`. - * - * Generated from protobuf field string game_server_deployment_name = 2; - * @return string - */ - public function getGameServerDeploymentName() - { - return $this->game_server_deployment_name; - } - - /** - * The game server deployment name. Uses the form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}`. - * - * Generated from protobuf field string game_server_deployment_name = 2; - * @param string $var - * @return $this - */ - public function setGameServerDeploymentName($var) - { - GPBUtil::checkString($var, True); - $this->game_server_deployment_name = $var; - - return $this; - } - - /** - * Agones fleet details for game server clusters and game server deployments. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails fleet_details = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFleetDetails() - { - return $this->fleet_details; - } - - /** - * Agones fleet details for game server clusters and game server deployments. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails fleet_details = 3; - * @param array<\Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFleetDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails::class); - $this->fleet_details = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails.php deleted file mode 100644 index 514d4fd81306..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.gaming.v1.TargetDetails.TargetFleetDetails - */ -class TargetFleetDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Reference to target Agones fleet. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleet fleet = 1; - */ - protected $fleet = null; - /** - * Reference to target Agones fleet autoscaling policy. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleetAutoscaler autoscaler = 2; - */ - protected $autoscaler = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleet $fleet - * Reference to target Agones fleet. - * @type \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleetAutoscaler $autoscaler - * Reference to target Agones fleet autoscaling policy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Reference to target Agones fleet. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleet fleet = 1; - * @return \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleet|null - */ - public function getFleet() - { - return $this->fleet; - } - - public function hasFleet() - { - return isset($this->fleet); - } - - public function clearFleet() - { - unset($this->fleet); - } - - /** - * Reference to target Agones fleet. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleet fleet = 1; - * @param \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleet $var - * @return $this - */ - public function setFleet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleet::class); - $this->fleet = $var; - - return $this; - } - - /** - * Reference to target Agones fleet autoscaling policy. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleetAutoscaler autoscaler = 2; - * @return \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleetAutoscaler|null - */ - public function getAutoscaler() - { - return $this->autoscaler; - } - - public function hasAutoscaler() - { - return isset($this->autoscaler); - } - - public function clearAutoscaler() - { - unset($this->autoscaler); - } - - /** - * Reference to target Agones fleet autoscaling policy. - * - * Generated from protobuf field .google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleetAutoscaler autoscaler = 2; - * @param \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleetAutoscaler $var - * @return $this - */ - public function setAutoscaler($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\TargetDetails\TargetFleetDetails\TargetFleetAutoscaler::class); - $this->autoscaler = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TargetFleetDetails::class, \Google\Cloud\Gaming\V1\TargetDetails_TargetFleetDetails::class); - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleet.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleet.php deleted file mode 100644 index a16791a16363..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleet.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleet - */ -class TargetFleet extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the Agones fleet. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Encapsulates the source of the Agones fleet spec. - * The Agones fleet spec source. - * - * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 2; - */ - protected $spec_source = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the Agones fleet. - * @type \Google\Cloud\Gaming\V1\SpecSource $spec_source - * Encapsulates the source of the Agones fleet spec. - * The Agones fleet spec source. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The name of the Agones fleet. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the Agones fleet. - * - * 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; - } - - /** - * Encapsulates the source of the Agones fleet spec. - * The Agones fleet spec source. - * - * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 2; - * @return \Google\Cloud\Gaming\V1\SpecSource|null - */ - public function getSpecSource() - { - return $this->spec_source; - } - - public function hasSpecSource() - { - return isset($this->spec_source); - } - - public function clearSpecSource() - { - unset($this->spec_source); - } - - /** - * Encapsulates the source of the Agones fleet spec. - * The Agones fleet spec source. - * - * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 2; - * @param \Google\Cloud\Gaming\V1\SpecSource $var - * @return $this - */ - public function setSpecSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\SpecSource::class); - $this->spec_source = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TargetFleet::class, \Google\Cloud\Gaming\V1\TargetDetails_TargetFleetDetails_TargetFleet::class); - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleetAutoscaler.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleetAutoscaler.php deleted file mode 100644 index 1e0f88f4cf71..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails/TargetFleetDetails/TargetFleetAutoscaler.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.gaming.v1.TargetDetails.TargetFleetDetails.TargetFleetAutoscaler - */ -class TargetFleetAutoscaler extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the Agones autoscaler. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Encapsulates the source of the Agones fleet spec. - * Details about the Agones autoscaler spec. - * - * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 2; - */ - protected $spec_source = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the Agones autoscaler. - * @type \Google\Cloud\Gaming\V1\SpecSource $spec_source - * Encapsulates the source of the Agones fleet spec. - * Details about the Agones autoscaler spec. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The name of the Agones autoscaler. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the Agones autoscaler. - * - * 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; - } - - /** - * Encapsulates the source of the Agones fleet spec. - * Details about the Agones autoscaler spec. - * - * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 2; - * @return \Google\Cloud\Gaming\V1\SpecSource|null - */ - public function getSpecSource() - { - return $this->spec_source; - } - - public function hasSpecSource() - { - return isset($this->spec_source); - } - - public function clearSpecSource() - { - unset($this->spec_source); - } - - /** - * Encapsulates the source of the Agones fleet spec. - * Details about the Agones autoscaler spec. - * - * Generated from protobuf field .google.cloud.gaming.v1.SpecSource spec_source = 2; - * @param \Google\Cloud\Gaming\V1\SpecSource $var - * @return $this - */ - public function setSpecSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\SpecSource::class); - $this->spec_source = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TargetFleetAutoscaler::class, \Google\Cloud\Gaming\V1\TargetDetails_TargetFleetDetails_TargetFleetAutoscaler::class); - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails_TargetFleetDetails.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails_TargetFleetDetails.php deleted file mode 100644 index 9cae71b46a0a..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/TargetDetails_TargetFleetDetails.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.gaming.v1.TargetState - */ -class TargetState extends \Google\Protobuf\Internal\Message -{ - /** - * Details about Agones fleets. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.TargetDetails details = 1; - */ - private $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Gaming\V1\TargetDetails>|\Google\Protobuf\Internal\RepeatedField $details - * Details about Agones fleets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Details about Agones fleets. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.TargetDetails details = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDetails() - { - return $this->details; - } - - /** - * Details about Agones fleets. - * - * Generated from protobuf field repeated .google.cloud.gaming.v1.TargetDetails details = 1; - * @param array<\Google\Cloud\Gaming\V1\TargetDetails>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Gaming\V1\TargetDetails::class); - $this->details = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerClusterRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerClusterRequest.php deleted file mode 100644 index 8767bae25f04..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerClusterRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.gaming.v1.UpdateGameServerClusterRequest - */ -class UpdateGameServerClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The game server cluster to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $game_server_cluster = null; - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Gaming\V1\GameServerCluster $game_server_cluster - * Required. The game server cluster to be updated. - * Only fields specified in update_mask are updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerClusters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The game server cluster to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Gaming\V1\GameServerCluster|null - */ - public function getGameServerCluster() - { - return $this->game_server_cluster; - } - - public function hasGameServerCluster() - { - return isset($this->game_server_cluster); - } - - public function clearGameServerCluster() - { - unset($this->game_server_cluster); - } - - /** - * Required. The game server cluster to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerCluster game_server_cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Gaming\V1\GameServerCluster $var - * @return $this - */ - public function setGameServerCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerCluster::class); - $this->game_server_cluster = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRequest.php deleted file mode 100644 index 4febc4c1d9c5..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRequest.php +++ /dev/null @@ -1,134 +0,0 @@ -google.cloud.gaming.v1.UpdateGameServerDeploymentRequest - */ -class UpdateGameServerDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The game server delpoyment to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeployment game_server_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $game_server_deployment = null; - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Gaming\V1\GameServerDeployment $game_server_deployment - * Required. The game server delpoyment to be updated. - * Only fields specified in update_mask are updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The game server delpoyment to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeployment game_server_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Gaming\V1\GameServerDeployment|null - */ - public function getGameServerDeployment() - { - return $this->game_server_deployment; - } - - public function hasGameServerDeployment() - { - return isset($this->game_server_deployment); - } - - public function clearGameServerDeployment() - { - unset($this->game_server_deployment); - } - - /** - * Required. The game server delpoyment to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeployment game_server_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Gaming\V1\GameServerDeployment $var - * @return $this - */ - public function setGameServerDeployment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerDeployment::class); - $this->game_server_deployment = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRolloutRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRolloutRequest.php deleted file mode 100644 index eb1657eb299b..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateGameServerDeploymentRolloutRequest.php +++ /dev/null @@ -1,134 +0,0 @@ -google.cloud.gaming.v1.UpdateGameServerDeploymentRolloutRequest - */ -class UpdateGameServerDeploymentRolloutRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The game server delpoyment rollout to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeploymentRollout rollout = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $rollout = null; - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Gaming\V1\GameServerDeploymentRollout $rollout - * Required. The game server delpoyment rollout to be updated. - * Only fields specified in update_mask are updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The game server delpoyment rollout to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeploymentRollout rollout = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Gaming\V1\GameServerDeploymentRollout|null - */ - public function getRollout() - { - return $this->rollout; - } - - public function hasRollout() - { - return isset($this->rollout); - } - - public function clearRollout() - { - unset($this->rollout); - } - - /** - * Required. The game server delpoyment rollout to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.GameServerDeploymentRollout rollout = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Gaming\V1\GameServerDeploymentRollout $var - * @return $this - */ - public function setRollout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\GameServerDeploymentRollout::class); - $this->rollout = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateRealmRequest.php b/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateRealmRequest.php deleted file mode 100644 index 0eda8f0b8597..000000000000 --- a/owl-bot-staging/Gaming/v1/proto/src/Google/Cloud/Gaming/V1/UpdateRealmRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.gaming.v1.UpdateRealmRequest - */ -class UpdateRealmRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The realm to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $realm = null; - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Gaming\V1\Realm $realm - * Required. The realm to be updated. - * Only fields specified in update_mask are updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce(); - parent::__construct($data); - } - - /** - * Required. The realm to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Gaming\V1\Realm|null - */ - public function getRealm() - { - return $this->realm; - } - - public function hasRealm() - { - return isset($this->realm); - } - - public function clearRealm() - { - unset($this->realm); - } - - /** - * Required. The realm to be updated. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.gaming.v1.Realm realm = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Gaming\V1\Realm $var - * @return $this - */ - public function setRealm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\Realm::class); - $this->realm = $var; - - return $this; - } - - /** - * Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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 update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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/Gaming/v1/samples/V1/GameServerClustersServiceClient/create_game_server_cluster.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/create_game_server_cluster.php deleted file mode 100644 index 8728444aeef9..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/create_game_server_cluster.php +++ /dev/null @@ -1,97 +0,0 @@ -setName($gameServerClusterName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $gameServerClustersServiceClient->createGameServerCluster( - $formattedParent, - $gameServerClusterId, - $gameServerCluster - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var GameServerCluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = GameServerClustersServiceClient::realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - $gameServerClusterId = '[GAME_SERVER_CLUSTER_ID]'; - $gameServerClusterName = '[NAME]'; - - create_game_server_cluster_sample($formattedParent, $gameServerClusterId, $gameServerClusterName); -} -// [END gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/delete_game_server_cluster.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/delete_game_server_cluster.php deleted file mode 100644 index 320f95750c72..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/delete_game_server_cluster.php +++ /dev/null @@ -1,81 +0,0 @@ -deleteGameServerCluster($formattedName); - $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 = GameServerClustersServiceClient::gameServerClusterName( - '[PROJECT]', - '[LOCATION]', - '[REALM]', - '[CLUSTER]' - ); - - delete_game_server_cluster_sample($formattedName); -} -// [END gameservices_v1_generated_GameServerClustersService_DeleteGameServerCluster_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/get_game_server_cluster.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/get_game_server_cluster.php deleted file mode 100644 index ccd812d8d561..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/get_game_server_cluster.php +++ /dev/null @@ -1,72 +0,0 @@ -getGameServerCluster($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GameServerClustersServiceClient::gameServerClusterName( - '[PROJECT]', - '[LOCATION]', - '[REALM]', - '[CLUSTER]' - ); - - get_game_server_cluster_sample($formattedName); -} -// [END gameservices_v1_generated_GameServerClustersService_GetGameServerCluster_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/list_game_server_clusters.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/list_game_server_clusters.php deleted file mode 100644 index 45808814017c..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/list_game_server_clusters.php +++ /dev/null @@ -1,72 +0,0 @@ -listGameServerClusters($formattedParent); - - /** @var GameServerCluster $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 = GameServerClustersServiceClient::realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - - list_game_server_clusters_sample($formattedParent); -} -// [END gameservices_v1_generated_GameServerClustersService_ListGameServerClusters_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_create_game_server_cluster.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_create_game_server_cluster.php deleted file mode 100644 index 237ec5d2a79c..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_create_game_server_cluster.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($gameServerClusterName); - - // Call the API and handle any network failures. - try { - /** @var PreviewCreateGameServerClusterResponse $response */ - $response = $gameServerClustersServiceClient->previewCreateGameServerCluster( - $formattedParent, - $gameServerClusterId, - $gameServerCluster - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = GameServerClustersServiceClient::realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - $gameServerClusterId = '[GAME_SERVER_CLUSTER_ID]'; - $gameServerClusterName = '[NAME]'; - - preview_create_game_server_cluster_sample( - $formattedParent, - $gameServerClusterId, - $gameServerClusterName - ); -} -// [END gameservices_v1_generated_GameServerClustersService_PreviewCreateGameServerCluster_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_delete_game_server_cluster.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_delete_game_server_cluster.php deleted file mode 100644 index 48903ec144b9..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_delete_game_server_cluster.php +++ /dev/null @@ -1,72 +0,0 @@ -previewDeleteGameServerCluster($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GameServerClustersServiceClient::gameServerClusterName( - '[PROJECT]', - '[LOCATION]', - '[REALM]', - '[CLUSTER]' - ); - - preview_delete_game_server_cluster_sample($formattedName); -} -// [END gameservices_v1_generated_GameServerClustersService_PreviewDeleteGameServerCluster_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_update_game_server_cluster.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_update_game_server_cluster.php deleted file mode 100644 index 2e19dc8cbf08..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/preview_update_game_server_cluster.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($gameServerClusterName); - $updateMask = new FieldMask(); - - // Call the API and handle any network failures. - try { - /** @var PreviewUpdateGameServerClusterResponse $response */ - $response = $gameServerClustersServiceClient->previewUpdateGameServerCluster( - $gameServerCluster, - $updateMask - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $gameServerClusterName = '[NAME]'; - - preview_update_game_server_cluster_sample($gameServerClusterName); -} -// [END gameservices_v1_generated_GameServerClustersService_PreviewUpdateGameServerCluster_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/update_game_server_cluster.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/update_game_server_cluster.php deleted file mode 100644 index 493611403880..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerClustersServiceClient/update_game_server_cluster.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($gameServerClusterName); - $updateMask = new FieldMask(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $gameServerClustersServiceClient->updateGameServerCluster( - $gameServerCluster, - $updateMask - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var GameServerCluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $gameServerClusterName = '[NAME]'; - - update_game_server_cluster_sample($gameServerClusterName); -} -// [END gameservices_v1_generated_GameServerClustersService_UpdateGameServerCluster_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/create_game_server_config.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/create_game_server_config.php deleted file mode 100644 index 1343ed5bcad6..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/create_game_server_config.php +++ /dev/null @@ -1,94 +0,0 @@ -createGameServerConfig( - $formattedParent, - $configId, - $gameServerConfig - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var GameServerConfig $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = GameServerConfigsServiceClient::gameServerDeploymentName( - '[PROJECT]', - '[LOCATION]', - '[DEPLOYMENT]' - ); - $configId = '[CONFIG_ID]'; - - create_game_server_config_sample($formattedParent, $configId); -} -// [END gameservices_v1_generated_GameServerConfigsService_CreateGameServerConfig_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/delete_game_server_config.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/delete_game_server_config.php deleted file mode 100644 index 57d5cf71d6d4..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/delete_game_server_config.php +++ /dev/null @@ -1,82 +0,0 @@ -deleteGameServerConfig($formattedName); - $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 = GameServerConfigsServiceClient::gameServerConfigName( - '[PROJECT]', - '[LOCATION]', - '[DEPLOYMENT]', - '[CONFIG]' - ); - - delete_game_server_config_sample($formattedName); -} -// [END gameservices_v1_generated_GameServerConfigsService_DeleteGameServerConfig_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/get_game_server_config.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/get_game_server_config.php deleted file mode 100644 index bfebeb5bfc83..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/get_game_server_config.php +++ /dev/null @@ -1,72 +0,0 @@ -getGameServerConfig($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GameServerConfigsServiceClient::gameServerConfigName( - '[PROJECT]', - '[LOCATION]', - '[DEPLOYMENT]', - '[CONFIG]' - ); - - get_game_server_config_sample($formattedName); -} -// [END gameservices_v1_generated_GameServerConfigsService_GetGameServerConfig_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/list_game_server_configs.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/list_game_server_configs.php deleted file mode 100644 index d1528119fbce..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerConfigsServiceClient/list_game_server_configs.php +++ /dev/null @@ -1,77 +0,0 @@ -listGameServerConfigs($formattedParent); - - /** @var GameServerConfig $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 = GameServerConfigsServiceClient::gameServerDeploymentName( - '[PROJECT]', - '[LOCATION]', - '[DEPLOYMENT]' - ); - - list_game_server_configs_sample($formattedParent); -} -// [END gameservices_v1_generated_GameServerConfigsService_ListGameServerConfigs_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/create_game_server_deployment.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/create_game_server_deployment.php deleted file mode 100644 index e543e6ae7a98..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/create_game_server_deployment.php +++ /dev/null @@ -1,88 +0,0 @@ -createGameServerDeployment( - $formattedParent, - $deploymentId, - $gameServerDeployment - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var GameServerDeployment $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = GameServerDeploymentsServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $deploymentId = '[DEPLOYMENT_ID]'; - - create_game_server_deployment_sample($formattedParent, $deploymentId); -} -// [END gameservices_v1_generated_GameServerDeploymentsService_CreateGameServerDeployment_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/delete_game_server_deployment.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/delete_game_server_deployment.php deleted file mode 100644 index f0c5dd2b9ce4..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/delete_game_server_deployment.php +++ /dev/null @@ -1,80 +0,0 @@ -deleteGameServerDeployment($formattedName); - $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 = GameServerDeploymentsServiceClient::gameServerDeploymentName( - '[PROJECT]', - '[LOCATION]', - '[DEPLOYMENT]' - ); - - delete_game_server_deployment_sample($formattedName); -} -// [END gameservices_v1_generated_GameServerDeploymentsService_DeleteGameServerDeployment_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/fetch_deployment_state.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/fetch_deployment_state.php deleted file mode 100644 index 8d54743451b1..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/fetch_deployment_state.php +++ /dev/null @@ -1,68 +0,0 @@ -fetchDeploymentState($name); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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]'; - - fetch_deployment_state_sample($name); -} -// [END gameservices_v1_generated_GameServerDeploymentsService_FetchDeploymentState_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment.php deleted file mode 100644 index 40e01c3cce9b..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment.php +++ /dev/null @@ -1,71 +0,0 @@ -getGameServerDeployment($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GameServerDeploymentsServiceClient::gameServerDeploymentName( - '[PROJECT]', - '[LOCATION]', - '[DEPLOYMENT]' - ); - - get_game_server_deployment_sample($formattedName); -} -// [END gameservices_v1_generated_GameServerDeploymentsService_GetGameServerDeployment_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment_rollout.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment_rollout.php deleted file mode 100644 index 59b6ed3c3e8c..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/get_game_server_deployment_rollout.php +++ /dev/null @@ -1,71 +0,0 @@ -getGameServerDeploymentRollout($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GameServerDeploymentsServiceClient::gameServerDeploymentName( - '[PROJECT]', - '[LOCATION]', - '[DEPLOYMENT]' - ); - - get_game_server_deployment_rollout_sample($formattedName); -} -// [END gameservices_v1_generated_GameServerDeploymentsService_GetGameServerDeploymentRollout_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/list_game_server_deployments.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/list_game_server_deployments.php deleted file mode 100644 index 30597f29a4f0..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/list_game_server_deployments.php +++ /dev/null @@ -1,72 +0,0 @@ -listGameServerDeployments($formattedParent); - - /** @var GameServerDeployment $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 = GameServerDeploymentsServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_game_server_deployments_sample($formattedParent); -} -// [END gameservices_v1_generated_GameServerDeploymentsService_ListGameServerDeployments_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/preview_game_server_deployment_rollout.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/preview_game_server_deployment_rollout.php deleted file mode 100644 index bb2109b12c93..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/preview_game_server_deployment_rollout.php +++ /dev/null @@ -1,58 +0,0 @@ -previewGameServerDeploymentRollout($rollout); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END gameservices_v1_generated_GameServerDeploymentsService_PreviewGameServerDeploymentRollout_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment.php deleted file mode 100644 index 41e09054c003..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment.php +++ /dev/null @@ -1,73 +0,0 @@ -updateGameServerDeployment( - $gameServerDeployment, - $updateMask - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var GameServerDeployment $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - 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 gameservices_v1_generated_GameServerDeploymentsService_UpdateGameServerDeployment_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment_rollout.php b/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment_rollout.php deleted file mode 100644 index 926ca55f7e40..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/GameServerDeploymentsServiceClient/update_game_server_deployment_rollout.php +++ /dev/null @@ -1,79 +0,0 @@ -updateGameServerDeploymentRollout( - $rollout, - $updateMask - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var GameServerDeployment $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - 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 gameservices_v1_generated_GameServerDeploymentsService_UpdateGameServerDeploymentRollout_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/create_realm.php b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/create_realm.php deleted file mode 100644 index 0164fbbf3c49..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/create_realm.php +++ /dev/null @@ -1,92 +0,0 @@ -setTimeZone($realmTimeZone); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $realmsServiceClient->createRealm($formattedParent, $realmId, $realm); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Realm $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = RealmsServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $realmId = '[REALM_ID]'; - $realmTimeZone = '[TIME_ZONE]'; - - create_realm_sample($formattedParent, $realmId, $realmTimeZone); -} -// [END gameservices_v1_generated_RealmsService_CreateRealm_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/delete_realm.php b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/delete_realm.php deleted file mode 100644 index b22cb14c6b1c..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/delete_realm.php +++ /dev/null @@ -1,76 +0,0 @@ -deleteRealm($formattedName); - $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 = RealmsServiceClient::realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - - delete_realm_sample($formattedName); -} -// [END gameservices_v1_generated_RealmsService_DeleteRealm_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/get_realm.php b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/get_realm.php deleted file mode 100644 index a894cc9dc6ae..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/get_realm.php +++ /dev/null @@ -1,67 +0,0 @@ -getRealm($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = RealmsServiceClient::realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - - get_realm_sample($formattedName); -} -// [END gameservices_v1_generated_RealmsService_GetRealm_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/list_realms.php b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/list_realms.php deleted file mode 100644 index 704e8a4dde3e..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/list_realms.php +++ /dev/null @@ -1,72 +0,0 @@ -listRealms($formattedParent); - - /** @var Realm $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 = RealmsServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_realms_sample($formattedParent); -} -// [END gameservices_v1_generated_RealmsService_ListRealms_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/preview_realm_update.php b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/preview_realm_update.php deleted file mode 100644 index 3ed3c4b353ff..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/preview_realm_update.php +++ /dev/null @@ -1,74 +0,0 @@ -setTimeZone($realmTimeZone); - $updateMask = new FieldMask(); - - // Call the API and handle any network failures. - try { - /** @var PreviewRealmUpdateResponse $response */ - $response = $realmsServiceClient->previewRealmUpdate($realm, $updateMask); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $realmTimeZone = '[TIME_ZONE]'; - - preview_realm_update_sample($realmTimeZone); -} -// [END gameservices_v1_generated_RealmsService_PreviewRealmUpdate_sync] diff --git a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/update_realm.php b/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/update_realm.php deleted file mode 100644 index 1c88d6d58cfb..000000000000 --- a/owl-bot-staging/Gaming/v1/samples/V1/RealmsServiceClient/update_realm.php +++ /dev/null @@ -1,85 +0,0 @@ -setTimeZone($realmTimeZone); - $updateMask = new FieldMask(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $realmsServiceClient->updateRealm($realm, $updateMask); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Realm $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $realmTimeZone = '[TIME_ZONE]'; - - update_realm_sample($realmTimeZone); -} -// [END gameservices_v1_generated_RealmsService_UpdateRealm_sync] diff --git a/owl-bot-staging/Gaming/v1/src/V1/GameServerClustersServiceClient.php b/owl-bot-staging/Gaming/v1/src/V1/GameServerClustersServiceClient.php deleted file mode 100644 index bde9fd013e32..000000000000 --- a/owl-bot-staging/Gaming/v1/src/V1/GameServerClustersServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ -realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - * $gameServerClusterId = 'game_server_cluster_id'; - * $gameServerCluster = new GameServerCluster(); - * $operationResponse = $gameServerClustersServiceClient->createGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gameServerClustersServiceClient->createGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gameServerClustersServiceClient->resumeOperation($operationName, 'createGameServerCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gameServerClustersServiceClient->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. - */ -class GameServerClustersServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.gaming.v1.GameServerClustersService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'gameservices.googleapis.com'; - - /** 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 $gameServerClusterNameTemplate; - - private static $realmNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/game_server_clusters_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/game_server_clusters_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/game_server_clusters_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/game_server_clusters_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getGameServerClusterNameTemplate() - { - if (self::$gameServerClusterNameTemplate == null) { - self::$gameServerClusterNameTemplate = new PathTemplate('projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}'); - } - - return self::$gameServerClusterNameTemplate; - } - - private static function getRealmNameTemplate() - { - if (self::$realmNameTemplate == null) { - self::$realmNameTemplate = new PathTemplate('projects/{project}/locations/{location}/realms/{realm}'); - } - - return self::$realmNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'gameServerCluster' => self::getGameServerClusterNameTemplate(), - 'realm' => self::getRealmNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * game_server_cluster resource. - * - * @param string $project - * @param string $location - * @param string $realm - * @param string $cluster - * - * @return string The formatted game_server_cluster resource. - */ - public static function gameServerClusterName($project, $location, $realm, $cluster) - { - return self::getGameServerClusterNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'realm' => $realm, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a realm - * resource. - * - * @param string $project - * @param string $location - * @param string $realm - * - * @return string The formatted realm resource. - */ - public static function realmName($project, $location, $realm) - { - return self::getRealmNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'realm' => $realm, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - gameServerCluster: projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster} - * - realm: projects/{project}/locations/{location}/realms/{realm} - * - * 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"); - } - - /** - * 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; - } - - /** - * 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 'gameservices.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a new game server cluster in a given project and location. - * - * Sample code: - * ``` - * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); - * try { - * $formattedParent = $gameServerClustersServiceClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - * $gameServerClusterId = 'game_server_cluster_id'; - * $gameServerCluster = new GameServerCluster(); - * $operationResponse = $gameServerClustersServiceClient->createGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gameServerClustersServiceClient->createGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gameServerClustersServiceClient->resumeOperation($operationName, 'createGameServerCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gameServerClustersServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/realms/{realm-id}`. - * @param string $gameServerClusterId Required. The ID of the game server cluster resource to be created. - * @param GameServerCluster $gameServerCluster Required. The game server cluster resource to be created. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createGameServerCluster($parent, $gameServerClusterId, $gameServerCluster, array $optionalArgs = []) - { - $request = new CreateGameServerClusterRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setGameServerClusterId($gameServerClusterId); - $request->setGameServerCluster($gameServerCluster); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateGameServerCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a single game server cluster. - * - * Sample code: - * ``` - * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); - * try { - * $formattedName = $gameServerClustersServiceClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); - * $operationResponse = $gameServerClustersServiceClient->deleteGameServerCluster($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gameServerClustersServiceClient->deleteGameServerCluster($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gameServerClustersServiceClient->resumeOperation($operationName, 'deleteGameServerCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gameServerClustersServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the game server cluster to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteGameServerCluster($name, array $optionalArgs = []) - { - $request = new DeleteGameServerClusterRequest(); - $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->startOperationsCall('DeleteGameServerCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets details of a single game server cluster. - * - * Sample code: - * ``` - * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); - * try { - * $formattedName = $gameServerClustersServiceClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); - * $response = $gameServerClustersServiceClient->getGameServerCluster($formattedName); - * } finally { - * $gameServerClustersServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the game server cluster to retrieve, in the following form: - * `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Optional. View for the returned GameServerCluster objects. When `FULL` is - * specified, the `cluster_state` field is also returned in the - * GameServerCluster object, which includes the state of the referenced - * Kubernetes cluster such as versions and provider info. The default/unset - * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does - * not return the `cluster_state` field. - * For allowed values, use constants defined on {@see \Google\Cloud\Gaming\V1\GameServerClusterView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Gaming\V1\GameServerCluster - * - * @throws ApiException if the remote call fails - */ - public function getGameServerCluster($name, array $optionalArgs = []) - { - $request = new GetGameServerClusterRequest(); - $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('GetGameServerCluster', GameServerCluster::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists game server clusters in a given project and location. - * - * Sample code: - * ``` - * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); - * try { - * $formattedParent = $gameServerClustersServiceClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - * // Iterate over pages of elements - * $pagedResponse = $gameServerClustersServiceClient->listGameServerClusters($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $gameServerClustersServiceClient->listGameServerClusters($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $gameServerClustersServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name, in the following form: - * "projects/{project}/locations/{location}/realms/{realm}". - * @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 - * Optional. The filter to apply to list results. - * @type string $orderBy - * Optional. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * @type int $view - * Optional. View for the returned GameServerCluster objects. When `FULL` is - * specified, the `cluster_state` field is also returned in the - * GameServerCluster object, which includes the state of the referenced - * Kubernetes cluster such as versions and provider info. The default/unset - * value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does - * not return the `cluster_state` field. - * For allowed values, use constants defined on {@see \Google\Cloud\Gaming\V1\GameServerClusterView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listGameServerClusters($parent, array $optionalArgs = []) - { - $request = new ListGameServerClustersRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - 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('ListGameServerClusters', $optionalArgs, ListGameServerClustersResponse::class, $request); - } - - /** - * Previews creation of a new game server cluster in a given project and - * location. - * - * Sample code: - * ``` - * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); - * try { - * $formattedParent = $gameServerClustersServiceClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - * $gameServerClusterId = 'game_server_cluster_id'; - * $gameServerCluster = new GameServerCluster(); - * $response = $gameServerClustersServiceClient->previewCreateGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); - * } finally { - * $gameServerClustersServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. - * @param string $gameServerClusterId Required. The ID of the game server cluster resource to be created. - * @param GameServerCluster $gameServerCluster Required. The game server cluster resource to be created. - * @param array $optionalArgs { - * Optional. - * - * @type Timestamp $previewTime - * Optional. The target timestamp to compute the preview. - * @type int $view - * Optional. This field is deprecated, preview will always return - * KubernetesClusterState. - * For allowed values, use constants defined on {@see \Google\Cloud\Gaming\V1\GameServerClusterView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Gaming\V1\PreviewCreateGameServerClusterResponse - * - * @throws ApiException if the remote call fails - */ - public function previewCreateGameServerCluster($parent, $gameServerClusterId, $gameServerCluster, array $optionalArgs = []) - { - $request = new PreviewCreateGameServerClusterRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setGameServerClusterId($gameServerClusterId); - $request->setGameServerCluster($gameServerCluster); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['previewTime'])) { - $request->setPreviewTime($optionalArgs['previewTime']); - } - - 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('PreviewCreateGameServerCluster', PreviewCreateGameServerClusterResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Previews deletion of a single game server cluster. - * - * Sample code: - * ``` - * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); - * try { - * $formattedName = $gameServerClustersServiceClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); - * $response = $gameServerClustersServiceClient->previewDeleteGameServerCluster($formattedName); - * } finally { - * $gameServerClustersServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the game server cluster to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerClusters/{cluster}`. - * @param array $optionalArgs { - * Optional. - * - * @type Timestamp $previewTime - * Optional. The target timestamp to compute the preview. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Gaming\V1\PreviewDeleteGameServerClusterResponse - * - * @throws ApiException if the remote call fails - */ - public function previewDeleteGameServerCluster($name, array $optionalArgs = []) - { - $request = new PreviewDeleteGameServerClusterRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['previewTime'])) { - $request->setPreviewTime($optionalArgs['previewTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('PreviewDeleteGameServerCluster', PreviewDeleteGameServerClusterResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Previews updating a GameServerCluster. - * - * Sample code: - * ``` - * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); - * try { - * $gameServerCluster = new GameServerCluster(); - * $updateMask = new FieldMask(); - * $response = $gameServerClustersServiceClient->previewUpdateGameServerCluster($gameServerCluster, $updateMask); - * } finally { - * $gameServerClustersServiceClient->close(); - * } - * ``` - * - * @param GameServerCluster $gameServerCluster Required. The game server cluster to be updated. - * Only fields specified in update_mask are updated. - * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @param array $optionalArgs { - * Optional. - * - * @type Timestamp $previewTime - * Optional. The target timestamp to compute the preview. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Gaming\V1\PreviewUpdateGameServerClusterResponse - * - * @throws ApiException if the remote call fails - */ - public function previewUpdateGameServerCluster($gameServerCluster, $updateMask, array $optionalArgs = []) - { - $request = new PreviewUpdateGameServerClusterRequest(); - $requestParamHeaders = []; - $request->setGameServerCluster($gameServerCluster); - $request->setUpdateMask($updateMask); - $requestParamHeaders['game_server_cluster.name'] = $gameServerCluster->getName(); - if (isset($optionalArgs['previewTime'])) { - $request->setPreviewTime($optionalArgs['previewTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('PreviewUpdateGameServerCluster', PreviewUpdateGameServerClusterResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Patches a single game server cluster. - * - * Sample code: - * ``` - * $gameServerClustersServiceClient = new GameServerClustersServiceClient(); - * try { - * $gameServerCluster = new GameServerCluster(); - * $updateMask = new FieldMask(); - * $operationResponse = $gameServerClustersServiceClient->updateGameServerCluster($gameServerCluster, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gameServerClustersServiceClient->updateGameServerCluster($gameServerCluster, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gameServerClustersServiceClient->resumeOperation($operationName, 'updateGameServerCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gameServerClustersServiceClient->close(); - * } - * ``` - * - * @param GameServerCluster $gameServerCluster Required. The game server cluster to be updated. - * Only fields specified in update_mask are updated. - * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateGameServerCluster($gameServerCluster, $updateMask, array $optionalArgs = []) - { - $request = new UpdateGameServerClusterRequest(); - $requestParamHeaders = []; - $request->setGameServerCluster($gameServerCluster); - $request->setUpdateMask($updateMask); - $requestParamHeaders['game_server_cluster.name'] = $gameServerCluster->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateGameServerCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerConfigsServiceGapicClient.php b/owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerConfigsServiceGapicClient.php deleted file mode 100644 index 738292e74e85..000000000000 --- a/owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerConfigsServiceGapicClient.php +++ /dev/null @@ -1,603 +0,0 @@ -gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - * $configId = 'config_id'; - * $gameServerConfig = new GameServerConfig(); - * $operationResponse = $gameServerConfigsServiceClient->createGameServerConfig($formattedParent, $configId, $gameServerConfig); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gameServerConfigsServiceClient->createGameServerConfig($formattedParent, $configId, $gameServerConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gameServerConfigsServiceClient->resumeOperation($operationName, 'createGameServerConfig'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gameServerConfigsServiceClient->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. - */ -class GameServerConfigsServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.gaming.v1.GameServerConfigsService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'gameservices.googleapis.com'; - - /** 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 $gameServerConfigNameTemplate; - - private static $gameServerDeploymentNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/game_server_configs_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/game_server_configs_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/game_server_configs_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/game_server_configs_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getGameServerConfigNameTemplate() - { - if (self::$gameServerConfigNameTemplate == null) { - self::$gameServerConfigNameTemplate = new PathTemplate('projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}'); - } - - return self::$gameServerConfigNameTemplate; - } - - private static function getGameServerDeploymentNameTemplate() - { - if (self::$gameServerDeploymentNameTemplate == null) { - self::$gameServerDeploymentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/gameServerDeployments/{deployment}'); - } - - return self::$gameServerDeploymentNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'gameServerConfig' => self::getGameServerConfigNameTemplate(), - 'gameServerDeployment' => self::getGameServerDeploymentNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * game_server_config resource. - * - * @param string $project - * @param string $location - * @param string $deployment - * @param string $config - * - * @return string The formatted game_server_config resource. - */ - public static function gameServerConfigName($project, $location, $deployment, $config) - { - return self::getGameServerConfigNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'deployment' => $deployment, - 'config' => $config, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * game_server_deployment resource. - * - * @param string $project - * @param string $location - * @param string $deployment - * - * @return string The formatted game_server_deployment resource. - */ - public static function gameServerDeploymentName($project, $location, $deployment) - { - return self::getGameServerDeploymentNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'deployment' => $deployment, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - gameServerConfig: projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config} - * - gameServerDeployment: projects/{project}/locations/{location}/gameServerDeployments/{deployment} - * - * 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"); - } - - /** - * 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; - } - - /** - * 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 'gameservices.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a new game server config in a given project, location, and game - * server deployment. Game server configs are immutable, and are not applied - * until referenced in the game server deployment rollout resource. - * - * Sample code: - * ``` - * $gameServerConfigsServiceClient = new GameServerConfigsServiceClient(); - * try { - * $formattedParent = $gameServerConfigsServiceClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - * $configId = 'config_id'; - * $gameServerConfig = new GameServerConfig(); - * $operationResponse = $gameServerConfigsServiceClient->createGameServerConfig($formattedParent, $configId, $gameServerConfig); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gameServerConfigsServiceClient->createGameServerConfig($formattedParent, $configId, $gameServerConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gameServerConfigsServiceClient->resumeOperation($operationName, 'createGameServerConfig'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gameServerConfigsServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`. - * @param string $configId Required. The ID of the game server config resource to be created. - * @param GameServerConfig $gameServerConfig Required. The game server config resource to be created. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createGameServerConfig($parent, $configId, $gameServerConfig, array $optionalArgs = []) - { - $request = new CreateGameServerConfigRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setConfigId($configId); - $request->setGameServerConfig($gameServerConfig); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateGameServerConfig', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a single game server config. The deletion will fail if the game - * server config is referenced in a game server deployment rollout. - * - * Sample code: - * ``` - * $gameServerConfigsServiceClient = new GameServerConfigsServiceClient(); - * try { - * $formattedName = $gameServerConfigsServiceClient->gameServerConfigName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[CONFIG]'); - * $operationResponse = $gameServerConfigsServiceClient->deleteGameServerConfig($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gameServerConfigsServiceClient->deleteGameServerConfig($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gameServerConfigsServiceClient->resumeOperation($operationName, 'deleteGameServerConfig'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gameServerConfigsServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the game server config to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteGameServerConfig($name, array $optionalArgs = []) - { - $request = new DeleteGameServerConfigRequest(); - $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->startOperationsCall('DeleteGameServerConfig', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets details of a single game server config. - * - * Sample code: - * ``` - * $gameServerConfigsServiceClient = new GameServerConfigsServiceClient(); - * try { - * $formattedName = $gameServerConfigsServiceClient->gameServerConfigName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[CONFIG]'); - * $response = $gameServerConfigsServiceClient->getGameServerConfig($formattedName); - * } finally { - * $gameServerConfigsServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the game server config to retrieve, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`. - * @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\Gaming\V1\GameServerConfig - * - * @throws ApiException if the remote call fails - */ - public function getGameServerConfig($name, array $optionalArgs = []) - { - $request = new GetGameServerConfigRequest(); - $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('GetGameServerConfig', GameServerConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists game server configs in a given project, location, and game server - * deployment. - * - * Sample code: - * ``` - * $gameServerConfigsServiceClient = new GameServerConfigsServiceClient(); - * try { - * $formattedParent = $gameServerConfigsServiceClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - * // Iterate over pages of elements - * $pagedResponse = $gameServerConfigsServiceClient->listGameServerConfigs($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $gameServerConfigsServiceClient->listGameServerConfigs($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $gameServerConfigsServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`. - * @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 - * Optional. The filter to apply to list results. - * @type string $orderBy - * Optional. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listGameServerConfigs($parent, array $optionalArgs = []) - { - $request = new ListGameServerConfigsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListGameServerConfigs', $optionalArgs, ListGameServerConfigsResponse::class, $request); - } -} diff --git a/owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerDeploymentsServiceGapicClient.php b/owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerDeploymentsServiceGapicClient.php deleted file mode 100644 index 6cf0119962c1..000000000000 --- a/owl-bot-staging/Gaming/v1/src/V1/Gapic/GameServerDeploymentsServiceGapicClient.php +++ /dev/null @@ -1,921 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $deploymentId = 'deployment_id'; - * $gameServerDeployment = new GameServerDeployment(); - * $operationResponse = $gameServerDeploymentsServiceClient->createGameServerDeployment($formattedParent, $deploymentId, $gameServerDeployment); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gameServerDeploymentsServiceClient->createGameServerDeployment($formattedParent, $deploymentId, $gameServerDeployment); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gameServerDeploymentsServiceClient->resumeOperation($operationName, 'createGameServerDeployment'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gameServerDeploymentsServiceClient->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. - */ -class GameServerDeploymentsServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.gaming.v1.GameServerDeploymentsService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'gameservices.googleapis.com'; - - /** 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 $gameServerDeploymentNameTemplate; - - private static $gameServerDeploymentRolloutNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/game_server_deployments_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/game_server_deployments_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/game_server_deployments_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/game_server_deployments_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getGameServerDeploymentNameTemplate() - { - if (self::$gameServerDeploymentNameTemplate == null) { - self::$gameServerDeploymentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/gameServerDeployments/{deployment}'); - } - - return self::$gameServerDeploymentNameTemplate; - } - - private static function getGameServerDeploymentRolloutNameTemplate() - { - if (self::$gameServerDeploymentRolloutNameTemplate == null) { - self::$gameServerDeploymentRolloutNameTemplate = new PathTemplate('projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout'); - } - - return self::$gameServerDeploymentRolloutNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'gameServerDeployment' => self::getGameServerDeploymentNameTemplate(), - 'gameServerDeploymentRollout' => self::getGameServerDeploymentRolloutNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * game_server_deployment resource. - * - * @param string $project - * @param string $location - * @param string $deployment - * - * @return string The formatted game_server_deployment resource. - */ - public static function gameServerDeploymentName($project, $location, $deployment) - { - return self::getGameServerDeploymentNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'deployment' => $deployment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * game_server_deployment_rollout resource. - * - * @param string $project - * @param string $location - * @param string $deployment - * - * @return string The formatted game_server_deployment_rollout resource. - */ - public static function gameServerDeploymentRolloutName($project, $location, $deployment) - { - return self::getGameServerDeploymentRolloutNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'deployment' => $deployment, - ]); - } - - /** - * 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($project, $location) - { - return self::getLocationNameTemplate()->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 - * - gameServerDeployment: projects/{project}/locations/{location}/gameServerDeployments/{deployment} - * - gameServerDeploymentRollout: projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout - * - 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($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"); - } - - /** - * 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; - } - - /** - * 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 'gameservices.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a new game server deployment in a given project and location. - * - * Sample code: - * ``` - * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); - * try { - * $formattedParent = $gameServerDeploymentsServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $deploymentId = 'deployment_id'; - * $gameServerDeployment = new GameServerDeployment(); - * $operationResponse = $gameServerDeploymentsServiceClient->createGameServerDeployment($formattedParent, $deploymentId, $gameServerDeployment); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gameServerDeploymentsServiceClient->createGameServerDeployment($formattedParent, $deploymentId, $gameServerDeployment); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gameServerDeploymentsServiceClient->resumeOperation($operationName, 'createGameServerDeployment'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gameServerDeploymentsServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}`. - * @param string $deploymentId Required. The ID of the game server delpoyment resource to be created. - * @param GameServerDeployment $gameServerDeployment Required. The game server delpoyment resource to be created. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createGameServerDeployment($parent, $deploymentId, $gameServerDeployment, array $optionalArgs = []) - { - $request = new CreateGameServerDeploymentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDeploymentId($deploymentId); - $request->setGameServerDeployment($gameServerDeployment); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateGameServerDeployment', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a single game server deployment. - * - * Sample code: - * ``` - * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); - * try { - * $formattedName = $gameServerDeploymentsServiceClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - * $operationResponse = $gameServerDeploymentsServiceClient->deleteGameServerDeployment($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gameServerDeploymentsServiceClient->deleteGameServerDeployment($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gameServerDeploymentsServiceClient->resumeOperation($operationName, 'deleteGameServerDeployment'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gameServerDeploymentsServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the game server delpoyment to delete, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteGameServerDeployment($name, array $optionalArgs = []) - { - $request = new DeleteGameServerDeploymentRequest(); - $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->startOperationsCall('DeleteGameServerDeployment', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Retrieves information about the current state of the game server - * deployment. Gathers all the Agones fleets and Agones autoscalers, - * including fleets running an older version of the game server deployment. - * - * Sample code: - * ``` - * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); - * try { - * $name = 'name'; - * $response = $gameServerDeploymentsServiceClient->fetchDeploymentState($name); - * } finally { - * $gameServerDeploymentsServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the game server delpoyment, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * @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\Gaming\V1\FetchDeploymentStateResponse - * - * @throws ApiException if the remote call fails - */ - public function fetchDeploymentState($name, array $optionalArgs = []) - { - $request = new FetchDeploymentStateRequest(); - $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('FetchDeploymentState', FetchDeploymentStateResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets details of a single game server deployment. - * - * Sample code: - * ``` - * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); - * try { - * $formattedName = $gameServerDeploymentsServiceClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - * $response = $gameServerDeploymentsServiceClient->getGameServerDeployment($formattedName); - * } finally { - * $gameServerDeploymentsServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the game server delpoyment to retrieve, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`. - * @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\Gaming\V1\GameServerDeployment - * - * @throws ApiException if the remote call fails - */ - public function getGameServerDeployment($name, array $optionalArgs = []) - { - $request = new GetGameServerDeploymentRequest(); - $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('GetGameServerDeployment', GameServerDeployment::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets details a single game server deployment rollout. - * - * Sample code: - * ``` - * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); - * try { - * $formattedName = $gameServerDeploymentsServiceClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - * $response = $gameServerDeploymentsServiceClient->getGameServerDeploymentRollout($formattedName); - * } finally { - * $gameServerDeploymentsServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the game server delpoyment to retrieve, in the following form: - * `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`. - * @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\Gaming\V1\GameServerDeploymentRollout - * - * @throws ApiException if the remote call fails - */ - public function getGameServerDeploymentRollout($name, array $optionalArgs = []) - { - $request = new GetGameServerDeploymentRolloutRequest(); - $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('GetGameServerDeploymentRollout', GameServerDeploymentRollout::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists game server deployments in a given project and location. - * - * Sample code: - * ``` - * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); - * try { - * $formattedParent = $gameServerDeploymentsServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $gameServerDeploymentsServiceClient->listGameServerDeployments($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $gameServerDeploymentsServiceClient->listGameServerDeployments($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $gameServerDeploymentsServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}`. - * @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 - * Optional. The filter to apply to list results. - * @type string $orderBy - * Optional. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listGameServerDeployments($parent, array $optionalArgs = []) - { - $request = new ListGameServerDeploymentsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListGameServerDeployments', $optionalArgs, ListGameServerDeploymentsResponse::class, $request); - } - - /** - * Previews the game server deployment rollout. This API does not mutate the - * rollout resource. - * - * Sample code: - * ``` - * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); - * try { - * $rollout = new GameServerDeploymentRollout(); - * $response = $gameServerDeploymentsServiceClient->previewGameServerDeploymentRollout($rollout); - * } finally { - * $gameServerDeploymentsServiceClient->close(); - * } - * ``` - * - * @param GameServerDeploymentRollout $rollout Required. The game server deployment rollout to be updated. - * Only fields specified in update_mask are updated. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @type Timestamp $previewTime - * Optional. The target timestamp to compute the preview. Defaults to the immediately - * after the proposed rollout completes. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Gaming\V1\PreviewGameServerDeploymentRolloutResponse - * - * @throws ApiException if the remote call fails - */ - public function previewGameServerDeploymentRollout($rollout, array $optionalArgs = []) - { - $request = new PreviewGameServerDeploymentRolloutRequest(); - $requestParamHeaders = []; - $request->setRollout($rollout); - $requestParamHeaders['rollout.name'] = $rollout->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - if (isset($optionalArgs['previewTime'])) { - $request->setPreviewTime($optionalArgs['previewTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('PreviewGameServerDeploymentRollout', PreviewGameServerDeploymentRolloutResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Patches a game server deployment. - * - * Sample code: - * ``` - * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); - * try { - * $gameServerDeployment = new GameServerDeployment(); - * $updateMask = new FieldMask(); - * $operationResponse = $gameServerDeploymentsServiceClient->updateGameServerDeployment($gameServerDeployment, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gameServerDeploymentsServiceClient->updateGameServerDeployment($gameServerDeployment, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gameServerDeploymentsServiceClient->resumeOperation($operationName, 'updateGameServerDeployment'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gameServerDeploymentsServiceClient->close(); - * } - * ``` - * - * @param GameServerDeployment $gameServerDeployment Required. The game server delpoyment to be updated. - * Only fields specified in update_mask are updated. - * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateGameServerDeployment($gameServerDeployment, $updateMask, array $optionalArgs = []) - { - $request = new UpdateGameServerDeploymentRequest(); - $requestParamHeaders = []; - $request->setGameServerDeployment($gameServerDeployment); - $request->setUpdateMask($updateMask); - $requestParamHeaders['game_server_deployment.name'] = $gameServerDeployment->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateGameServerDeployment', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Patches a single game server deployment rollout. - * The method will not return an error if the update does not affect any - * existing realms. For example - if the default_game_server_config is changed - * but all existing realms use the override, that is valid. Similarly, if a - * non existing realm is explicitly called out in game_server_config_overrides - * field, that will also not result in an error. - * - * Sample code: - * ``` - * $gameServerDeploymentsServiceClient = new GameServerDeploymentsServiceClient(); - * try { - * $rollout = new GameServerDeploymentRollout(); - * $updateMask = new FieldMask(); - * $operationResponse = $gameServerDeploymentsServiceClient->updateGameServerDeploymentRollout($rollout, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gameServerDeploymentsServiceClient->updateGameServerDeploymentRollout($rollout, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gameServerDeploymentsServiceClient->resumeOperation($operationName, 'updateGameServerDeploymentRollout'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gameServerDeploymentsServiceClient->close(); - * } - * ``` - * - * @param GameServerDeploymentRollout $rollout Required. The game server delpoyment rollout to be updated. - * Only fields specified in update_mask are updated. - * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateGameServerDeploymentRollout($rollout, $updateMask, array $optionalArgs = []) - { - $request = new UpdateGameServerDeploymentRolloutRequest(); - $requestParamHeaders = []; - $request->setRollout($rollout); - $request->setUpdateMask($updateMask); - $requestParamHeaders['rollout.name'] = $rollout->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateGameServerDeploymentRollout', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/Gaming/v1/src/V1/Gapic/RealmsServiceGapicClient.php b/owl-bot-staging/Gaming/v1/src/V1/Gapic/RealmsServiceGapicClient.php deleted file mode 100644 index d66da8009071..000000000000 --- a/owl-bot-staging/Gaming/v1/src/V1/Gapic/RealmsServiceGapicClient.php +++ /dev/null @@ -1,722 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $realmId = 'realm_id'; - * $realm = new Realm(); - * $operationResponse = $realmsServiceClient->createRealm($formattedParent, $realmId, $realm); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $realmsServiceClient->createRealm($formattedParent, $realmId, $realm); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $realmsServiceClient->resumeOperation($operationName, 'createRealm'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $realmsServiceClient->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. - */ -class RealmsServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.gaming.v1.RealmsService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'gameservices.googleapis.com'; - - /** 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 $locationNameTemplate; - - private static $realmNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/realms_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/realms_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/realms_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/realms_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getRealmNameTemplate() - { - if (self::$realmNameTemplate == null) { - self::$realmNameTemplate = new PathTemplate('projects/{project}/locations/{location}/realms/{realm}'); - } - - return self::$realmNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'location' => self::getLocationNameTemplate(), - 'realm' => self::getRealmNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * 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($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a realm - * resource. - * - * @param string $project - * @param string $location - * @param string $realm - * - * @return string The formatted realm resource. - */ - public static function realmName($project, $location, $realm) - { - return self::getRealmNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'realm' => $realm, - ]); - } - - /** - * 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} - * - realm: projects/{project}/locations/{location}/realms/{realm} - * - * 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"); - } - - /** - * 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; - } - - /** - * 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 'gameservices.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a new realm in a given project and location. - * - * Sample code: - * ``` - * $realmsServiceClient = new RealmsServiceClient(); - * try { - * $formattedParent = $realmsServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $realmId = 'realm_id'; - * $realm = new Realm(); - * $operationResponse = $realmsServiceClient->createRealm($formattedParent, $realmId, $realm); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $realmsServiceClient->createRealm($formattedParent, $realmId, $realm); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $realmsServiceClient->resumeOperation($operationName, 'createRealm'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $realmsServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}`. - * @param string $realmId Required. The ID of the realm resource to be created. - * @param Realm $realm Required. The realm resource to be created. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createRealm($parent, $realmId, $realm, array $optionalArgs = []) - { - $request = new CreateRealmRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setRealmId($realmId); - $request->setRealm($realm); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateRealm', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a single realm. - * - * Sample code: - * ``` - * $realmsServiceClient = new RealmsServiceClient(); - * try { - * $formattedName = $realmsServiceClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - * $operationResponse = $realmsServiceClient->deleteRealm($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $realmsServiceClient->deleteRealm($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $realmsServiceClient->resumeOperation($operationName, 'deleteRealm'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $realmsServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the realm to delete, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteRealm($name, array $optionalArgs = []) - { - $request = new DeleteRealmRequest(); - $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->startOperationsCall('DeleteRealm', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets details of a single realm. - * - * Sample code: - * ``` - * $realmsServiceClient = new RealmsServiceClient(); - * try { - * $formattedName = $realmsServiceClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - * $response = $realmsServiceClient->getRealm($formattedName); - * } finally { - * $realmsServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the realm to retrieve, in the following form: - * `projects/{project}/locations/{location}/realms/{realm}`. - * @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\Gaming\V1\Realm - * - * @throws ApiException if the remote call fails - */ - public function getRealm($name, array $optionalArgs = []) - { - $request = new GetRealmRequest(); - $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('GetRealm', Realm::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists realms in a given project and location. - * - * Sample code: - * ``` - * $realmsServiceClient = new RealmsServiceClient(); - * try { - * $formattedParent = $realmsServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $realmsServiceClient->listRealms($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $realmsServiceClient->listRealms($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $realmsServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}`. - * @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 - * Optional. The filter to apply to list results. - * @type string $orderBy - * Optional. Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listRealms($parent, array $optionalArgs = []) - { - $request = new ListRealmsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListRealms', $optionalArgs, ListRealmsResponse::class, $request); - } - - /** - * Previews patches to a single realm. - * - * Sample code: - * ``` - * $realmsServiceClient = new RealmsServiceClient(); - * try { - * $realm = new Realm(); - * $updateMask = new FieldMask(); - * $response = $realmsServiceClient->previewRealmUpdate($realm, $updateMask); - * } finally { - * $realmsServiceClient->close(); - * } - * ``` - * - * @param Realm $realm Required. The realm to be updated. - * Only fields specified in update_mask are updated. - * @param FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @param array $optionalArgs { - * Optional. - * - * @type Timestamp $previewTime - * Optional. The target timestamp to compute the preview. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Gaming\V1\PreviewRealmUpdateResponse - * - * @throws ApiException if the remote call fails - */ - public function previewRealmUpdate($realm, $updateMask, array $optionalArgs = []) - { - $request = new PreviewRealmUpdateRequest(); - $requestParamHeaders = []; - $request->setRealm($realm); - $request->setUpdateMask($updateMask); - $requestParamHeaders['realm.name'] = $realm->getName(); - if (isset($optionalArgs['previewTime'])) { - $request->setPreviewTime($optionalArgs['previewTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('PreviewRealmUpdate', PreviewRealmUpdateResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Patches a single realm. - * - * Sample code: - * ``` - * $realmsServiceClient = new RealmsServiceClient(); - * try { - * $realm = new Realm(); - * $updateMask = new FieldMask(); - * $operationResponse = $realmsServiceClient->updateRealm($realm, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $realmsServiceClient->updateRealm($realm, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $realmsServiceClient->resumeOperation($operationName, 'updateRealm'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $realmsServiceClient->close(); - * } - * ``` - * - * @param Realm $realm Required. The realm to be updated. - * Only fields specified in update_mask are updated. - * @param FieldMask $updateMask Required. The update mask applies to the resource. For the `FieldMask` - * definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateRealm($realm, $updateMask, array $optionalArgs = []) - { - $request = new UpdateRealmRequest(); - $requestParamHeaders = []; - $request->setRealm($realm); - $request->setUpdateMask($updateMask); - $requestParamHeaders['realm.name'] = $realm->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateRealm', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/Gaming/v1/src/V1/RealmsServiceClient.php b/owl-bot-staging/Gaming/v1/src/V1/RealmsServiceClient.php deleted file mode 100644 index 0eed2256ef9f..000000000000 --- a/owl-bot-staging/Gaming/v1/src/V1/RealmsServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.gaming.v1.GameServerClustersService' => [ - 'CreateGameServerCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Gaming\V1\GameServerCluster', - 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteGameServerCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateGameServerCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Gaming\V1\GameServerCluster', - 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListGameServerClusters' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGameServerClusters', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_clusters_service_rest_client_config.php b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_clusters_service_rest_client_config.php deleted file mode 100644 index 71744f4afe82..000000000000 --- a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_clusters_service_rest_client_config.php +++ /dev/null @@ -1,217 +0,0 @@ - [ - 'google.cloud.gaming.v1.GameServerClustersService' => [ - 'CreateGameServerCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters', - 'body' => 'game_server_cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'game_server_cluster_id', - ], - ], - 'DeleteGameServerCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGameServerCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListGameServerClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PreviewCreateGameServerCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/realms/*}/gameServerClusters:previewCreate', - 'body' => 'game_server_cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PreviewDeleteGameServerCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewDelete', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'PreviewUpdateGameServerCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}:previewUpdate', - 'body' => 'game_server_cluster', - 'placeholders' => [ - 'game_server_cluster.name' => [ - 'getters' => [ - 'getGameServerCluster', - 'getName', - ], - ], - ], - ], - 'UpdateGameServerCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{game_server_cluster.name=projects/*/locations/*/realms/*/gameServerClusters/*}', - 'body' => 'game_server_cluster', - 'placeholders' => [ - 'game_server_cluster.name' => [ - 'getters' => [ - 'getGameServerCluster', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - '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.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}: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/Gaming/v1/src/V1/resources/game_server_configs_service_client_config.json b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_client_config.json deleted file mode 100644 index 22173ad16e96..000000000000 --- a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_client_config.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "interfaces": { - "google.cloud.gaming.v1.GameServerConfigsService": { - "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": { - "CreateGameServerConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteGameServerConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetGameServerConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListGameServerConfigs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_descriptor_config.php b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_descriptor_config.php deleted file mode 100644 index 387d7108151e..000000000000 --- a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_descriptor_config.php +++ /dev/null @@ -1,38 +0,0 @@ - [ - 'google.cloud.gaming.v1.GameServerConfigsService' => [ - 'CreateGameServerConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Gaming\V1\GameServerConfig', - 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteGameServerConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListGameServerConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGameServerConfigs', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_rest_client_config.php b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_rest_client_config.php deleted file mode 100644 index 105c41262ae0..000000000000 --- a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_configs_service_rest_client_config.php +++ /dev/null @@ -1,165 +0,0 @@ - [ - 'google.cloud.gaming.v1.GameServerConfigsService' => [ - 'CreateGameServerConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/gameServerDeployments/*}/configs', - 'body' => 'game_server_config', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'config_id', - ], - ], - 'DeleteGameServerConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGameServerConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/gameServerDeployments/*/configs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListGameServerConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/gameServerDeployments/*}/configs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - '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.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}: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/Gaming/v1/src/V1/resources/game_server_deployments_service_client_config.json b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_client_config.json deleted file mode 100644 index 2a3e3208f33c..000000000000 --- a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_client_config.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "interfaces": { - "google.cloud.gaming.v1.GameServerDeploymentsService": { - "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": { - "CreateGameServerDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteGameServerDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "FetchDeploymentState": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetGameServerDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetGameServerDeploymentRollout": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListGameServerDeployments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "PreviewGameServerDeploymentRollout": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateGameServerDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateGameServerDeploymentRollout": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_descriptor_config.php b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_descriptor_config.php deleted file mode 100644 index cb7573d4faa7..000000000000 --- a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_descriptor_config.php +++ /dev/null @@ -1,58 +0,0 @@ - [ - 'google.cloud.gaming.v1.GameServerDeploymentsService' => [ - 'CreateGameServerDeployment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Gaming\V1\GameServerDeployment', - 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteGameServerDeployment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateGameServerDeployment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Gaming\V1\GameServerDeployment', - 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateGameServerDeploymentRollout' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Gaming\V1\GameServerDeployment', - 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListGameServerDeployments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGameServerDeployments', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_rest_client_config.php b/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_rest_client_config.php deleted file mode 100644 index 8924ef153b6a..000000000000 --- a/owl-bot-staging/Gaming/v1/src/V1/resources/game_server_deployments_service_rest_client_config.php +++ /dev/null @@ -1,233 +0,0 @@ - [ - 'google.cloud.gaming.v1.GameServerDeploymentsService' => [ - 'CreateGameServerDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/gameServerDeployments', - 'body' => 'game_server_deployment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'deployment_id', - ], - ], - 'DeleteGameServerDeployment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/gameServerDeployments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'FetchDeploymentState' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/gameServerDeployments/*}:fetchDeploymentState', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGameServerDeployment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/gameServerDeployments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGameServerDeploymentRollout' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/gameServerDeployments/*}/rollout', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListGameServerDeployments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/gameServerDeployments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PreviewGameServerDeploymentRollout' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{rollout.name=projects/*/locations/*/gameServerDeployments/*}/rollout:preview', - 'body' => 'rollout', - 'placeholders' => [ - 'rollout.name' => [ - 'getters' => [ - 'getRollout', - 'getName', - ], - ], - ], - ], - 'UpdateGameServerDeployment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{game_server_deployment.name=projects/*/locations/*/gameServerDeployments/*}', - 'body' => 'game_server_deployment', - 'placeholders' => [ - 'game_server_deployment.name' => [ - 'getters' => [ - 'getGameServerDeployment', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateGameServerDeploymentRollout' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{rollout.name=projects/*/locations/*/gameServerDeployments/*}/rollout', - 'body' => 'rollout', - 'placeholders' => [ - 'rollout.name' => [ - 'getters' => [ - 'getRollout', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - '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.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}: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/Gaming/v1/src/V1/resources/realms_service_client_config.json b/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_client_config.json deleted file mode 100644 index 829b592b0664..000000000000 --- a/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_client_config.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "interfaces": { - "google.cloud.gaming.v1.RealmsService": { - "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": { - "CreateRealm": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteRealm": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetRealm": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListRealms": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "PreviewRealmUpdate": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateRealm": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_descriptor_config.php b/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_descriptor_config.php deleted file mode 100644 index 777d5d79104e..000000000000 --- a/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_descriptor_config.php +++ /dev/null @@ -1,48 +0,0 @@ - [ - 'google.cloud.gaming.v1.RealmsService' => [ - 'CreateRealm' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Gaming\V1\Realm', - 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteRealm' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateRealm' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Gaming\V1\Realm', - 'metadataReturnType' => '\Google\Cloud\Gaming\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListRealms' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRealms', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_rest_client_config.php b/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_rest_client_config.php deleted file mode 100644 index 564af8d59c6c..000000000000 --- a/owl-bot-staging/Gaming/v1/src/V1/resources/realms_service_rest_client_config.php +++ /dev/null @@ -1,194 +0,0 @@ - [ - 'google.cloud.gaming.v1.RealmsService' => [ - 'CreateRealm' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/realms', - 'body' => 'realm', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'realm_id', - ], - ], - 'DeleteRealm' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/realms/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRealm' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/realms/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListRealms' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/realms', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PreviewRealmUpdate' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{realm.name=projects/*/locations/*/realms/*}:previewUpdate', - 'body' => 'realm', - 'placeholders' => [ - 'realm.name' => [ - 'getters' => [ - 'getRealm', - 'getName', - ], - ], - ], - ], - 'UpdateRealm' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{realm.name=projects/*/locations/*/realms/*}', - 'body' => 'realm', - 'placeholders' => [ - 'realm.name' => [ - 'getters' => [ - 'getRealm', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - '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.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gameServerDeployments/*}: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/Gaming/v1/tests/Unit/V1/GameServerClustersServiceClientTest.php b/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerClustersServiceClientTest.php deleted file mode 100644 index 609e417fbfe4..000000000000 --- a/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerClustersServiceClientTest.php +++ /dev/null @@ -1,786 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GameServerClustersServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GameServerClustersServiceClient($options); - } - - /** @test */ - public function createGameServerClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGameServerClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new GameServerCluster(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createGameServerClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - $gameServerClusterId = 'gameServerClusterId-858763025'; - $gameServerCluster = new GameServerCluster(); - $gameServerClusterName = 'gameServerClusterName-525342064'; - $gameServerCluster->setName($gameServerClusterName); - $response = $gapicClient->createGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/CreateGameServerCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getGameServerClusterId(); - $this->assertProtobufEquals($gameServerClusterId, $actualValue); - $actualValue = $actualApiRequestObject->getGameServerCluster(); - $this->assertProtobufEquals($gameServerCluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGameServerClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGameServerClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGameServerClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - $gameServerClusterId = 'gameServerClusterId-858763025'; - $gameServerCluster = new GameServerCluster(); - $gameServerClusterName = 'gameServerClusterName-525342064'; - $gameServerCluster->setName($gameServerClusterName); - $response = $gapicClient->createGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGameServerClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGameServerClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGameServerClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteGameServerClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); - $response = $gapicClient->deleteGameServerCluster($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/DeleteGameServerCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGameServerClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGameServerClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGameServerClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); - $response = $gapicClient->deleteGameServerCluster($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGameServerClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getGameServerClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new GameServerCluster(); - $expectedResponse->setName($name2); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); - $response = $gapicClient->getGameServerCluster($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/GetGameServerCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGameServerClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); - try { - $gapicClient->getGameServerCluster($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 listGameServerClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $gameServerClustersElement = new GameServerCluster(); - $gameServerClusters = [ - $gameServerClustersElement, - ]; - $expectedResponse = new ListGameServerClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGameServerClusters($gameServerClusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - $response = $gapicClient->listGameServerClusters($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGameServerClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/ListGameServerClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGameServerClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - try { - $gapicClient->listGameServerClusters($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 previewCreateGameServerClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $etag = 'etag3123477'; - $expectedResponse = new PreviewCreateGameServerClusterResponse(); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - $gameServerClusterId = 'gameServerClusterId-858763025'; - $gameServerCluster = new GameServerCluster(); - $gameServerClusterName = 'gameServerClusterName-525342064'; - $gameServerCluster->setName($gameServerClusterName); - $response = $gapicClient->previewCreateGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/PreviewCreateGameServerCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getGameServerClusterId(); - $this->assertProtobufEquals($gameServerClusterId, $actualValue); - $actualValue = $actualRequestObject->getGameServerCluster(); - $this->assertProtobufEquals($gameServerCluster, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function previewCreateGameServerClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - $gameServerClusterId = 'gameServerClusterId-858763025'; - $gameServerCluster = new GameServerCluster(); - $gameServerClusterName = 'gameServerClusterName-525342064'; - $gameServerCluster->setName($gameServerClusterName); - try { - $gapicClient->previewCreateGameServerCluster($formattedParent, $gameServerClusterId, $gameServerCluster); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function previewDeleteGameServerClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $etag = 'etag3123477'; - $expectedResponse = new PreviewDeleteGameServerClusterResponse(); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); - $response = $gapicClient->previewDeleteGameServerCluster($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/PreviewDeleteGameServerCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function previewDeleteGameServerClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->gameServerClusterName('[PROJECT]', '[LOCATION]', '[REALM]', '[CLUSTER]'); - try { - $gapicClient->previewDeleteGameServerCluster($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 previewUpdateGameServerClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $etag = 'etag3123477'; - $expectedResponse = new PreviewUpdateGameServerClusterResponse(); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $gameServerCluster = new GameServerCluster(); - $gameServerClusterName = 'gameServerClusterName-525342064'; - $gameServerCluster->setName($gameServerClusterName); - $updateMask = new FieldMask(); - $response = $gapicClient->previewUpdateGameServerCluster($gameServerCluster, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/PreviewUpdateGameServerCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getGameServerCluster(); - $this->assertProtobufEquals($gameServerCluster, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function previewUpdateGameServerClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $gameServerCluster = new GameServerCluster(); - $gameServerClusterName = 'gameServerClusterName-525342064'; - $gameServerCluster->setName($gameServerClusterName); - $updateMask = new FieldMask(); - try { - $gapicClient->previewUpdateGameServerCluster($gameServerCluster, $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()); - } - - /** @test */ - public function updateGameServerClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGameServerClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new GameServerCluster(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateGameServerClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $gameServerCluster = new GameServerCluster(); - $gameServerClusterName = 'gameServerClusterName-525342064'; - $gameServerCluster->setName($gameServerClusterName); - $updateMask = new FieldMask(); - $response = $gapicClient->updateGameServerCluster($gameServerCluster, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerClustersService/UpdateGameServerCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGameServerCluster(); - $this->assertProtobufEquals($gameServerCluster, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGameServerClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGameServerClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGameServerClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $gameServerCluster = new GameServerCluster(); - $gameServerClusterName = 'gameServerClusterName-525342064'; - $gameServerCluster->setName($gameServerClusterName); - $updateMask = new FieldMask(); - $response = $gapicClient->updateGameServerCluster($gameServerCluster, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGameServerClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerConfigsServiceClientTest.php b/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerConfigsServiceClientTest.php deleted file mode 100644 index 6ed70f77b915..000000000000 --- a/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerConfigsServiceClientTest.php +++ /dev/null @@ -1,443 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GameServerConfigsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GameServerConfigsServiceClient($options); - } - - /** @test */ - public function createGameServerConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGameServerConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new GameServerConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createGameServerConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $configId = 'configId-804450504'; - $gameServerConfig = new GameServerConfig(); - $response = $gapicClient->createGameServerConfig($formattedParent, $configId, $gameServerConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerConfigsService/CreateGameServerConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getConfigId(); - $this->assertProtobufEquals($configId, $actualValue); - $actualValue = $actualApiRequestObject->getGameServerConfig(); - $this->assertProtobufEquals($gameServerConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGameServerConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGameServerConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGameServerConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $configId = 'configId-804450504'; - $gameServerConfig = new GameServerConfig(); - $response = $gapicClient->createGameServerConfig($formattedParent, $configId, $gameServerConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGameServerConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGameServerConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGameServerConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteGameServerConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->gameServerConfigName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[CONFIG]'); - $response = $gapicClient->deleteGameServerConfig($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerConfigsService/DeleteGameServerConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGameServerConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGameServerConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGameServerConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->gameServerConfigName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[CONFIG]'); - $response = $gapicClient->deleteGameServerConfig($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGameServerConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getGameServerConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new GameServerConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->gameServerConfigName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[CONFIG]'); - $response = $gapicClient->getGameServerConfig($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerConfigsService/GetGameServerConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGameServerConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->gameServerConfigName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]', '[CONFIG]'); - try { - $gapicClient->getGameServerConfig($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 listGameServerConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $gameServerConfigsElement = new GameServerConfig(); - $gameServerConfigs = [ - $gameServerConfigsElement, - ]; - $expectedResponse = new ListGameServerConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGameServerConfigs($gameServerConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $response = $gapicClient->listGameServerConfigs($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGameServerConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerConfigsService/ListGameServerConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGameServerConfigsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - try { - $gapicClient->listGameServerConfigs($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()); - } -} diff --git a/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerDeploymentsServiceClientTest.php b/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerDeploymentsServiceClientTest.php deleted file mode 100644 index 6c6ff369ce81..000000000000 --- a/owl-bot-staging/Gaming/v1/tests/Unit/V1/GameServerDeploymentsServiceClientTest.php +++ /dev/null @@ -1,887 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GameServerDeploymentsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GameServerDeploymentsServiceClient($options); - } - - /** @test */ - public function createGameServerDeploymentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGameServerDeploymentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new GameServerDeployment(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createGameServerDeploymentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $deploymentId = 'deploymentId51250389'; - $gameServerDeployment = new GameServerDeployment(); - $response = $gapicClient->createGameServerDeployment($formattedParent, $deploymentId, $gameServerDeployment); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/CreateGameServerDeployment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDeploymentId(); - $this->assertProtobufEquals($deploymentId, $actualValue); - $actualValue = $actualApiRequestObject->getGameServerDeployment(); - $this->assertProtobufEquals($gameServerDeployment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGameServerDeploymentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGameServerDeploymentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGameServerDeploymentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $deploymentId = 'deploymentId51250389'; - $gameServerDeployment = new GameServerDeployment(); - $response = $gapicClient->createGameServerDeployment($formattedParent, $deploymentId, $gameServerDeployment); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGameServerDeploymentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGameServerDeploymentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGameServerDeploymentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteGameServerDeploymentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $response = $gapicClient->deleteGameServerDeployment($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/DeleteGameServerDeployment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGameServerDeploymentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGameServerDeploymentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGameServerDeploymentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $response = $gapicClient->deleteGameServerDeployment($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGameServerDeploymentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function fetchDeploymentStateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new FetchDeploymentStateResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->fetchDeploymentState($name); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/FetchDeploymentState', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchDeploymentStateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->fetchDeploymentState($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 getGameServerDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new GameServerDeployment(); - $expectedResponse->setName($name2); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $response = $gapicClient->getGameServerDeployment($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/GetGameServerDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGameServerDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - try { - $gapicClient->getGameServerDeployment($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 getGameServerDeploymentRolloutTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $defaultGameServerConfig = 'defaultGameServerConfig-1758159633'; - $etag = 'etag3123477'; - $expectedResponse = new GameServerDeploymentRollout(); - $expectedResponse->setName($name2); - $expectedResponse->setDefaultGameServerConfig($defaultGameServerConfig); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - $response = $gapicClient->getGameServerDeploymentRollout($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/GetGameServerDeploymentRollout', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGameServerDeploymentRolloutExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->gameServerDeploymentName('[PROJECT]', '[LOCATION]', '[DEPLOYMENT]'); - try { - $gapicClient->getGameServerDeploymentRollout($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 listGameServerDeploymentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $gameServerDeploymentsElement = new GameServerDeployment(); - $gameServerDeployments = [ - $gameServerDeploymentsElement, - ]; - $expectedResponse = new ListGameServerDeploymentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGameServerDeployments($gameServerDeployments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listGameServerDeployments($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGameServerDeployments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/ListGameServerDeployments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGameServerDeploymentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listGameServerDeployments($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 previewGameServerDeploymentRolloutTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $etag = 'etag3123477'; - $expectedResponse = new PreviewGameServerDeploymentRolloutResponse(); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $rollout = new GameServerDeploymentRollout(); - $response = $gapicClient->previewGameServerDeploymentRollout($rollout); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/PreviewGameServerDeploymentRollout', $actualFuncCall); - $actualValue = $actualRequestObject->getRollout(); - $this->assertProtobufEquals($rollout, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function previewGameServerDeploymentRolloutExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $rollout = new GameServerDeploymentRollout(); - try { - $gapicClient->previewGameServerDeploymentRollout($rollout); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGameServerDeploymentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGameServerDeploymentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new GameServerDeployment(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateGameServerDeploymentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $gameServerDeployment = new GameServerDeployment(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateGameServerDeployment($gameServerDeployment, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/UpdateGameServerDeployment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGameServerDeployment(); - $this->assertProtobufEquals($gameServerDeployment, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGameServerDeploymentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGameServerDeploymentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGameServerDeploymentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $gameServerDeployment = new GameServerDeployment(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateGameServerDeployment($gameServerDeployment, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGameServerDeploymentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGameServerDeploymentRolloutTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGameServerDeploymentRolloutTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new GameServerDeployment(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateGameServerDeploymentRolloutTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $rollout = new GameServerDeploymentRollout(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateGameServerDeploymentRollout($rollout, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.GameServerDeploymentsService/UpdateGameServerDeploymentRollout', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRollout(); - $this->assertProtobufEquals($rollout, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGameServerDeploymentRolloutTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGameServerDeploymentRolloutExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGameServerDeploymentRolloutTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $rollout = new GameServerDeploymentRollout(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateGameServerDeploymentRollout($rollout, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGameServerDeploymentRolloutTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Gaming/v1/tests/Unit/V1/RealmsServiceClientTest.php b/owl-bot-staging/Gaming/v1/tests/Unit/V1/RealmsServiceClientTest.php deleted file mode 100644 index 26fce1c09a50..000000000000 --- a/owl-bot-staging/Gaming/v1/tests/Unit/V1/RealmsServiceClientTest.php +++ /dev/null @@ -1,658 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return RealmsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new RealmsServiceClient($options); - } - - /** @test */ - public function createRealmTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createRealmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $timeZone = 'timeZone36848094'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new Realm(); - $expectedResponse->setName($name); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createRealmTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $realmId = 'realmId-859416373'; - $realm = new Realm(); - $realmTimeZone = 'realmTimeZone1648425928'; - $realm->setTimeZone($realmTimeZone); - $response = $gapicClient->createRealm($formattedParent, $realmId, $realm); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.RealmsService/CreateRealm', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRealmId(); - $this->assertProtobufEquals($realmId, $actualValue); - $actualValue = $actualApiRequestObject->getRealm(); - $this->assertProtobufEquals($realm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRealmTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createRealmExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createRealmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $realmId = 'realmId-859416373'; - $realm = new Realm(); - $realmTimeZone = 'realmTimeZone1648425928'; - $realm->setTimeZone($realmTimeZone); - $response = $gapicClient->createRealm($formattedParent, $realmId, $realm); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRealmTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRealmTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRealmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteRealmTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - $response = $gapicClient->deleteRealm($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.RealmsService/DeleteRealm', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRealmTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRealmExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRealmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - $response = $gapicClient->deleteRealm($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRealmTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getRealmTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $timeZone = 'timeZone36848094'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new Realm(); - $expectedResponse->setName($name2); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - $response = $gapicClient->getRealm($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.RealmsService/GetRealm', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRealmExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->realmName('[PROJECT]', '[LOCATION]', '[REALM]'); - try { - $gapicClient->getRealm($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 listRealmsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $realmsElement = new Realm(); - $realms = [ - $realmsElement, - ]; - $expectedResponse = new ListRealmsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRealms($realms); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listRealms($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRealms()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.RealmsService/ListRealms', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRealmsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listRealms($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 previewRealmUpdateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $etag = 'etag3123477'; - $expectedResponse = new PreviewRealmUpdateResponse(); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $realm = new Realm(); - $realmTimeZone = 'realmTimeZone1648425928'; - $realm->setTimeZone($realmTimeZone); - $updateMask = new FieldMask(); - $response = $gapicClient->previewRealmUpdate($realm, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.RealmsService/PreviewRealmUpdate', $actualFuncCall); - $actualValue = $actualRequestObject->getRealm(); - $this->assertProtobufEquals($realm, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function previewRealmUpdateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $realm = new Realm(); - $realmTimeZone = 'realmTimeZone1648425928'; - $realm->setTimeZone($realmTimeZone); - $updateMask = new FieldMask(); - try { - $gapicClient->previewRealmUpdate($realm, $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()); - } - - /** @test */ - public function updateRealmTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateRealmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $timeZone = 'timeZone36848094'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new Realm(); - $expectedResponse->setName($name); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateRealmTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $realm = new Realm(); - $realmTimeZone = 'realmTimeZone1648425928'; - $realm->setTimeZone($realmTimeZone); - $updateMask = new FieldMask(); - $response = $gapicClient->updateRealm($realm, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gaming.v1.RealmsService/UpdateRealm', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRealm(); - $this->assertProtobufEquals($realm, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRealmTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateRealmExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateRealmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $realm = new Realm(); - $realmTimeZone = 'realmTimeZone1648425928'; - $realm->setTimeZone($realmTimeZone); - $updateMask = new FieldMask(); - $response = $gapicClient->updateRealm($realm, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRealmTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Backup.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Backup.php deleted file mode 100644 index 24e87b17b19ea4bd4807a4aab5e5b04ea092e530..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2893 zcma)8;Zoa15Dqvdum<9YkO-%lC~4A=PLYPR)5(a^);7ZNBn1x;esnyek)^Xyk#!oK z#Kg_;D1CvxL8nj9K1F}$DZ08l$(}&K{$tJU?zem2?R~dD{1lx;@TJxwA&H%Ycv^3y zB_~9SVwzBw23jxe_erd|bQt*oiFHle+1K{=k2Gtiee@VZ8BJrCnA(8SK|l;Qps8mJ zPD#&kPt(Xa+cd^6nMHS7d35)9a|^%?9LBT; z$Ab@`;V(*if$wT8aT5G{>NDF9{ls?y|99NOw$^t7MlkfEZ$Ay)#HXQ_1?-0|S%0Ak z%*^*`L~+mCT3$~lqX8-Cw!?(Pp%Zj>2y~WFuFXJpTx$GzT~~`c?He8*of-|F&RzI;jb!uHC+cP zYr;?GovIg|s-JDvq{(n1--snUqHk+gpyS;@3Z&m7Sq1NQ>>MM>_bD8n{JjKoqL-CB za5K9N>WntCzR)QBS1&15D5buq&W=~UgNhpyyqk80q?XW9d0ErtCh|0TL8rjMs5HWx zC8KUm7qtR&Lnlm~KrLgyynxzfT?p@33G4cxi1o^i;d}TxxW=A@kmjj>XCq8 zB>{C$ZO<7o^%kO+m7n4Mq=meX{8-jIKW)7gyfKa+3fKh>y9J6|oJ54_5G`0Hp&O5) zOe5@5GEyr%aQ%u+TSdSdG7_9Ugk>iP>_Y39x`;4>(APJVHmoq@#6`iK^jYGmo?Ve@ zFBeb7^B`0QRtqR6icl3%5^2cPWe)cBG+-Ww%@H5NU6+O#tIR&5K{_PJZsMr7iybHr zp<1{wg6)|wwK_I;&>W-;71JI{fmiSFayG9hNA^xrMCLDp;ByPgnT`@wL73&2-RIZi z9A^F^dJPtNw2k+O(NJAM5P9Feho$UkdBn7G4L}` z@ksjq!0z#f(w<23ph#2uV-{|I!mx51Zpq^kN~B=o(^q)-BxYG+E=CH06^ZP|UT$Nk zN0}zPzWzKu$ttCy8GFYf4HI&)3Kf*(9AC|ZYXRF_#S0ZCCv;p@rch|9y@Gq9b1pzt zpp;!;uCB@wl+T%rO*5Z+6^Zmzq3XjHbl~8|trkIZHYX}0A1AGmBLsenM2l;hwpy&!g zFh1m;=W-(J1Wt&q@>G$EFt-$|=Z$4pln%_L5o!E00}nCf=g+%Q5!H0E(Wx`@YeT+N z1BwX-I*kX$fQ0m1Gj{s%tTjGX`g diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/BackupPlan.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/BackupPlan.php deleted file mode 100644 index fcbd35996867fc186bd73e3c18e44f557290ddb5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2426 zcmb7G-ESL35GQt>I^%qli>h7?s7pUxO7G+V61p^iounozG**f7fKFKJyR~ydCAE;zu(OKW@cw!d>x%c@PKq!$YPo@pY$gr zJz*q@MJhbONk1D5SWG-IiUQ7Ji;%rT^7`jVWU8hMM>dTDJJu5A4P1YGy$hTa)IrrTH(PL(PjBPHRuHnPohwZPhKE$jp^h=$i8&DvNN; zH0s7;s7@5H>RqWNN$!{uUFbCIk!GjvyhjTS6(+Gjj5tE7xlG#8`! zPGR=LG@ck8*wD9B;+-%*RPJ2F`B&zo+MjZ@ofW^Xk=4Y}CE5z*?7eEe3DrV?+py-vSlB{G)yfhQ z(JVoTq^Q<^E5Yi&vM^zta^5QzLmo%<+xLt;*i0}+mEMJ8$y3{U^bWyZ&z4MrEU(~p z!9t@5yAC&o2opU%pDe=TD@G*y05*dVN5E&jvEbQ=p*krwtbRb7(Mf-K8Jf`Vt!ointernalAddGeneratedFile( - ' - -&google/cloud/gkebackup/v1/common.protogoogle.cloud.gkebackup.v1" - -Namespaces - -namespaces ( "1 -NamespacedName - namespace (  -name ( "V -NamespacedNamesC -namespaced_names ( 2).google.cloud.gkebackup.v1.NamespacedName"W - EncryptionKeyF -gcp_kms_encryption_key ( B&úA# -!cloudkms.googleapis.com/CryptoKeyBÉ -com.google.cloud.gkebackup.v1B CommonProtoPZBgoogle.golang.org/genproto/googleapis/cloud/gkebackup/v1;gkebackupªGoogle.Cloud.GkeBackup.V1ÊGoogle\\Cloud\\GkeBackup\\V1êGoogle::Cloud::GkeBackup::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Gkebackup.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Gkebackup.php deleted file mode 100644 index a4a6316d1d48..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Gkebackup.php +++ /dev/null @@ -1,228 +0,0 @@ -internalAddGeneratedFile( - ' -éO -)google/cloud/gkebackup/v1/gkebackup.protogoogle.cloud.gkebackup.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/gkebackup/v1/backup.proto+google/cloud/gkebackup/v1/backup_plan.proto\'google/cloud/gkebackup/v1/restore.proto,google/cloud/gkebackup/v1/restore_plan.proto&google/cloud/gkebackup/v1/volume.proto#google/longrunning/operations.proto google/protobuf/field_mask.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àA"² -CreateBackupPlanRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location? - backup_plan ( 2%.google.cloud.gkebackup.v1.BackupPlanBàA -backup_plan_id ( BàA"œ -ListBackupPlansRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size ( - -page_token (  -filter (  -order_by ( "„ -ListBackupPlansResponse; - backup_plans ( 2%.google.cloud.gkebackup.v1.BackupPlan -next_page_token (  - unreachable ( "Q -GetBackupPlanRequest9 -name ( B+àAúA% -#gkebackup.googleapis.com/BackupPlan"‹ -UpdateBackupPlanRequest? - backup_plan ( 2%.google.cloud.gkebackup.v1.BackupPlanBàA/ - update_mask ( 2.google.protobuf.FieldMask"b -DeleteBackupPlanRequest9 -name ( B+àAúA% -#gkebackup.googleapis.com/BackupPlan -etag ( "˜ -CreateBackupRequest; -parent ( B+àAúA% -#gkebackup.googleapis.com/BackupPlan1 -backup ( 2!.google.cloud.gkebackup.v1.Backup - backup_id ( "š -ListBackupsRequest; -parent ( B+àAúA% -#gkebackup.googleapis.com/BackupPlan - page_size ( - -page_token (  -filter (  -order_by ( "b -ListBackupsResponse2 -backups ( 2!.google.cloud.gkebackup.v1.Backup -next_page_token ( "I -GetBackupRequest5 -name ( B\'àAúA! -gkebackup.googleapis.com/Backup"~ -UpdateBackupRequest6 -backup ( 2!.google.cloud.gkebackup.v1.BackupBàA/ - update_mask ( 2.google.protobuf.FieldMask"i -DeleteBackupRequest5 -name ( B\'àAúA! -gkebackup.googleapis.com/Backup -etag (  -force ("œ -ListVolumeBackupsRequest7 -parent ( B\'àAúA! -gkebackup.googleapis.com/Backup - page_size ( - -page_token (  -filter (  -order_by ( "u -ListVolumeBackupsResponse? -volume_backups ( 2\'.google.cloud.gkebackup.v1.VolumeBackup -next_page_token ( "U -GetVolumeBackupRequest; -name ( B-àAúA\' -%gkebackup.googleapis.com/VolumeBackup"¶ -CreateRestorePlanRequest9 -parent ( B)àAúA# -!locations.googleapis.com/LocationA - restore_plan ( 2&.google.cloud.gkebackup.v1.RestorePlanBàA -restore_plan_id ( BàA" -ListRestorePlansRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size ( - -page_token (  -filter (  -order_by ( "‡ -ListRestorePlansResponse= - restore_plans ( 2&.google.cloud.gkebackup.v1.RestorePlan -next_page_token (  - unreachable ( "S -GetRestorePlanRequest: -name ( B,àAúA& -$gkebackup.googleapis.com/RestorePlan"Ž -UpdateRestorePlanRequestA - restore_plan ( 2&.google.cloud.gkebackup.v1.RestorePlanBàA/ - update_mask ( 2.google.protobuf.FieldMask"s -DeleteRestorePlanRequest: -name ( B,àAúA& -$gkebackup.googleapis.com/RestorePlan -etag (  -force ("§ -CreateRestoreRequest< -parent ( B,àAúA& -$gkebackup.googleapis.com/RestorePlan8 -restore ( 2".google.cloud.gkebackup.v1.RestoreBàA - -restore_id ( BàA"œ -ListRestoresRequest< -parent ( B,àAúA& -$gkebackup.googleapis.com/RestorePlan - page_size ( - -page_token (  -filter (  -order_by ( "z -ListRestoresResponse4 -restores ( 2".google.cloud.gkebackup.v1.Restore -next_page_token (  - unreachable ( "K -GetRestoreRequest6 -name ( B(àAúA" - gkebackup.googleapis.com/Restore" -UpdateRestoreRequest8 -restore ( 2".google.cloud.gkebackup.v1.RestoreBàA/ - update_mask ( 2.google.protobuf.FieldMask"k -DeleteRestoreRequest6 -name ( B(àAúA" - gkebackup.googleapis.com/Restore -etag (  -force ("ž -ListVolumeRestoresRequest8 -parent ( B(àAúA" - gkebackup.googleapis.com/Restore - page_size ( - -page_token (  -filter (  -order_by ( "x -ListVolumeRestoresResponseA -volume_restores ( 2(.google.cloud.gkebackup.v1.VolumeRestore -next_page_token ( "W -GetVolumeRestoreRequest< -name ( B.àAúA( -&gkebackup.googleapis.com/VolumeRestore2Å( - BackupForGKEò -CreateBackupPlan2.google.cloud.gkebackup.v1.CreateBackupPlanRequest.google.longrunning.Operation"Š‚Óä“>"//v1/{parent=projects/*/locations/*}/backupPlans: backup_planÚA!parent,backup_plan,backup_plan_idÊA - -BackupPlanOperationMetadataº -ListBackupPlans1.google.cloud.gkebackup.v1.ListBackupPlansRequest2.google.cloud.gkebackup.v1.ListBackupPlansResponse"@‚Óä“1//v1/{parent=projects/*/locations/*}/backupPlansÚAparent§ - GetBackupPlan/.google.cloud.gkebackup.v1.GetBackupPlanRequest%.google.cloud.gkebackup.v1.BackupPlan">‚Óä“1//v1/{name=projects/*/locations/*/backupPlans/*}ÚAnameô -UpdateBackupPlan2.google.cloud.gkebackup.v1.UpdateBackupPlanRequest.google.longrunning.Operation"Œ‚Óä“J2;/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}: backup_planÚAbackup_plan,update_maskÊA - -BackupPlanOperationMetadataÒ -DeleteBackupPlan2.google.cloud.gkebackup.v1.DeleteBackupPlanRequest.google.longrunning.Operation"k‚Óä“1*//v1/{name=projects/*/locations/*/backupPlans/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadataá - CreateBackup..google.cloud.gkebackup.v1.CreateBackupRequest.google.longrunning.Operation"‚Óä“C"9/v1/{parent=projects/*/locations/*/backupPlans/*}/backups:backupÚAparent,backup,backup_idÊA -BackupOperationMetadata¸ - ListBackups-.google.cloud.gkebackup.v1.ListBackupsRequest..google.cloud.gkebackup.v1.ListBackupsResponse"J‚Óä“;9/v1/{parent=projects/*/locations/*/backupPlans/*}/backupsÚAparent¥ - GetBackup+.google.cloud.gkebackup.v1.GetBackupRequest!.google.cloud.gkebackup.v1.Backup"H‚Óä“;9/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}ÚAnameã - UpdateBackup..google.cloud.gkebackup.v1.UpdateBackupRequest.google.longrunning.Operation"ƒ‚Óä“J2@/v1/{backup.name=projects/*/locations/*/backupPlans/*/backups/*}:backupÚAbackup,update_maskÊA -BackupOperationMetadataÔ - DeleteBackup..google.cloud.gkebackup.v1.DeleteBackupRequest.google.longrunning.Operation"u‚Óä“;*9/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadataÚ -ListVolumeBackups3.google.cloud.gkebackup.v1.ListVolumeBackupsRequest4.google.cloud.gkebackup.v1.ListVolumeBackupsResponse"Z‚Óä“KI/v1/{parent=projects/*/locations/*/backupPlans/*/backups/*}/volumeBackupsÚAparentÇ -GetVolumeBackup1.google.cloud.gkebackup.v1.GetVolumeBackupRequest\'.google.cloud.gkebackup.v1.VolumeBackup"X‚Óä“KI/v1/{name=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}ÚAnameù -CreateRestorePlan3.google.cloud.gkebackup.v1.CreateRestorePlanRequest.google.longrunning.Operation"‚Óä“@"0/v1/{parent=projects/*/locations/*}/restorePlans: restore_planÚA#parent,restore_plan,restore_plan_idÊA - RestorePlanOperationMetadata¾ -ListRestorePlans2.google.cloud.gkebackup.v1.ListRestorePlansRequest3.google.cloud.gkebackup.v1.ListRestorePlansResponse"A‚Óä“20/v1/{parent=projects/*/locations/*}/restorePlansÚAparent« -GetRestorePlan0.google.cloud.gkebackup.v1.GetRestorePlanRequest&.google.cloud.gkebackup.v1.RestorePlan"?‚Óä“20/v1/{name=projects/*/locations/*/restorePlans/*}ÚAnameû -UpdateRestorePlan3.google.cloud.gkebackup.v1.UpdateRestorePlanRequest.google.longrunning.Operation"‘‚Óä“M2=/v1/{restore_plan.name=projects/*/locations/*/restorePlans/*}: restore_planÚArestore_plan,update_maskÊA - RestorePlanOperationMetadataÕ -DeleteRestorePlan3.google.cloud.gkebackup.v1.DeleteRestorePlanRequest.google.longrunning.Operation"l‚Óä“2*0/v1/{name=projects/*/locations/*/restorePlans/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadataé - CreateRestore/.google.cloud.gkebackup.v1.CreateRestoreRequest.google.longrunning.Operation"‡‚Óä“F";/v1/{parent=projects/*/locations/*/restorePlans/*}/restores:restoreÚAparent,restore,restore_idÊA -RestoreOperationMetadata½ - ListRestores..google.cloud.gkebackup.v1.ListRestoresRequest/.google.cloud.gkebackup.v1.ListRestoresResponse"L‚Óä“=;/v1/{parent=projects/*/locations/*/restorePlans/*}/restoresÚAparentª - -GetRestore,.google.cloud.gkebackup.v1.GetRestoreRequest".google.cloud.gkebackup.v1.Restore"J‚Óä“=;/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}ÚAnameë - UpdateRestore/.google.cloud.gkebackup.v1.UpdateRestoreRequest.google.longrunning.Operation"‰‚Óä“N2C/v1/{restore.name=projects/*/locations/*/restorePlans/*/restores/*}:restoreÚArestore,update_maskÊA -RestoreOperationMetadataØ - DeleteRestore/.google.cloud.gkebackup.v1.DeleteRestoreRequest.google.longrunning.Operation"w‚Óä“=*;/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}ÚAnameÊA* -google.protobuf.EmptyOperationMetadataà -ListVolumeRestores4.google.cloud.gkebackup.v1.ListVolumeRestoresRequest5.google.cloud.gkebackup.v1.ListVolumeRestoresResponse"]‚Óä“NL/v1/{parent=projects/*/locations/*/restorePlans/*/restores/*}/volumeRestoresÚAparentÍ -GetVolumeRestore2.google.cloud.gkebackup.v1.GetVolumeRestoreRequest(.google.cloud.gkebackup.v1.VolumeRestore"[‚Óä“NL/v1/{name=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}ÚAnameLÊAgkebackup.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¨ -com.google.cloud.gkebackup.v1BGKEBackupProtoPZBgoogle.golang.org/genproto/googleapis/cloud/gkebackup/v1;gkebackupªGoogle.Cloud.GkeBackup.V1ÊGoogle\\Cloud\\GkeBackup\\V1êGoogle::Cloud::GkeBackup::V1êA^ - container.googleapis.com/Cluster:projects/{project}/locations/{location}/clusters/{cluster}êAx -!cloudkms.googleapis.com/CryptoKeySprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Restore.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Restore.php deleted file mode 100644 index 4e7b68cb45e39ded178cf9af48dcbaf0ae25ac0c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3776 zcmbVPTXWM!6vj45$Z--JadX@PBHk=KrhB58C< z3rwaD{WBe2`agK-U*MUaz)O2}SCUOG;F6cfyXSo8obOzA_wkSJt_v$-mDt471JW0F zUW&mk5nay-9K*51op3N9o@hAxu4xfZ62(eGtT#HMTB&tzpsMeLo z`^DiN+0l)?&@CRU6+Pkyjz=Vh31I8{#CLUrh}C9kiv)UK5A1(EK2BvPAuP}-y;y|~2g1X0L2cc~Qrelj# zp1lds+hbSbXc+c1gMFOgmSz;rxW9z`_* zIZYKQ<=LB9>v(>8WoLiiu_rg2FxoM(5CVPQJz1A!;=xlh;$7+Y6Ph=$6ju{sC{1_Z z%@yd~nXm|jB`zqjYL${|l@8Vl(NCP1Kq^Y6Gf6}mbtv3!UE=iP7e)b2j(z; zjs>wAhkiVPQbcT-$#Wu}!nCFD5X;ZciWy{1`n`V!1BZ4EQ%BcoYH0?YLGFi$6|MdBRIvG6{d*;|m0Ytu(q#!w$A3hf|2j}TMb z@<(Ficg#Yc#9|90u@$&HLL2DVT(QvkkAw~!E5w#PYA`nv!eYjOKFlxT5-;Y$1IUh3 znT5*3^Q+PGFy>fu9X#eZUkmF$eZFovnzYSQRY9c4N|WITE;b$SEoy-cH`ZBb zB#3R%xwEjoF|n6Mg(CqrH zPZ&?a^AY7aTuM-M*F|P|@v&K&UB5R8PM;wnSQi98-0=f52x$dtUT6^?XDS_v4?lqv zMI04Zdkmt52n88ttDY0O&rQ28TxK(ym)4N3M$LW+<}nL=eGdhB(-$20>PP{7L~j!= zCgC$Qjq3V{Nqt_Q*yqH*!apg<9gRR(g2h1h@G3W+DQaU@sDlt~joVLuseR!p@-@c)@*Fn%D)_$tt)Un-XGW5Xf?L9l2U%&ZQ{sfLfy8iMIz6X zdSz49#)W7Qg?b~F7&DA>yHU?&mj6t_)gxIyGB&<}`{m7UyQ8+K&y8-YtZL;(eFNR@ zoa}ubE>gGDpKEP8E%D*YSL;aP7-vYu5798rczcbBR^u2 zwi=bA#}k@jhm5KrEiv2Z!bQl@gGg)ClPGfO(hA&22Ez%nkqxWTTjUBa38zinternalAddGeneratedFile( - ' -ý -,google/cloud/gkebackup/v1/restore_plan.protogoogle.cloud.gkebackup.v1google/api/resource.proto\'google/cloud/gkebackup/v1/restore.protogoogle/protobuf/timestamp.proto"ó - RestorePlan -name ( BàA -uid ( BàA4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàA - description ( C - backup_plan ( B.àAàAúA% -#gkebackup.googleapis.com/BackupPlan< -cluster ( B+àAàAúA" - container.googleapis.com/ClusterE -restore_config ( 2(.google.cloud.gkebackup.v1.RestoreConfigBàAB -labels ( 22.google.cloud.gkebackup.v1.RestorePlan.LabelsEntry -etag - ( BàA- - LabelsEntry -key (  -value ( :8:nêAk -$gkebackup.googleapis.com/RestorePlanCprojects/{project}/locations/{location}/restorePlans/{restore_plan}BÎ -com.google.cloud.gkebackup.v1BRestorePlanProtoPZBgoogle.golang.org/genproto/googleapis/cloud/gkebackup/v1;gkebackupªGoogle.Cloud.GkeBackup.V1ÊGoogle\\Cloud\\GkeBackup\\V1êGoogle::Cloud::GkeBackup::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Volume.php b/owl-bot-staging/GkeBackup/v1/proto/src/GPBMetadata/Google/Cloud/Gkebackup/V1/Volume.php deleted file mode 100644 index 08232b698d26dfd7e7221744f2a300fa5dec6024..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2979 zcmd6p&u`;I6vs)^cDIwZv<9@m-h4kZ@2hXZ%Mg8nYs4p! zosb^xUgPAF;4li3zzICu9rgPp!cH&@U5`XE#+4>+G)=5m>gH20je}9-5ET!CVBitO z@q$rL8C;RB?OcsQWqhcN18+1WGINQLZx2Zv+77`rqjW|RyJshMr^c*1Woq52rPiH` z!()UT&yHh!!MvbX2*WQNbv@U?abhR%x97%|>${0-d+v|0hZEely_kUM{M`P?cM>=7 zF*RuV4%t7z+$Wv87Y4BB6P(6l&@?~_I(0uGk#BpQ3W=S_4U-@;V5+JPNRlOw_Us>s zWvM&2kN0_usyY|s2~MIBnOz;@h$N%PKW1@L2a~MTxg}d#=ys|u@p>h4X^-6?Qq}3M zrcUlMZ4q&H3tP<}Pp2FVhk?KN!dXU57j%%=!|--nb`sCOc17N`UN1{?6@<8-C5EQy z8Tx4(eYTharN?}p%#JF%Kh!qa9gn zC0$I;lFI#n)hGnMgw^t5RwabEFsyLw6jzwhLAum@*5pP?bdR?9%1_bz9D9r31Jhv>Ru-#E^1EU+CsUvvj;YBUoxJt3eWhR}=a z;7Z5Tr0XPRl9H`<0?u2<`NW$PX3 z5qhsy)-6MCwd-wDZvV_oTRjZ#udqo0I75!9acB|?yx!2my zIrQn2L9S=OFP7mzl-aFHA*lQZ;v}*1O0*`57dY?&1U~eo&56PlXLvU47V-<>D;>#t zC*o-;F%Y49%-$Fw*~#udt7wCV09Pd_i~Rps1oDu}g{>yR+oHjiHXCj%mv0%H?QISF$RQa~4gu#`ebq1`-^7Y^V)3MtSx zD4c@13z_A*pwUYoqDO*0^E=}vJ9k3Ydn@RGsg~Y0n=OhMBW{XVeg?7SHxOGlum^Gw4U_@#A^IdxrkBVq)#!1Si9ePe*I3mlv$966T@ii}$QOry zrDGjYlG2)#k9MFaeZBOAo2n|aRn=@*RWA;^t1OTg&$1%rb6)Gsl!o-(aGhJqLN=2Z JZxb{@=wJNCuO$Eg diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup.php deleted file mode 100644 index 62ff711d0ae5..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup.php +++ /dev/null @@ -1,1170 +0,0 @@ -google.cloud.gkebackup.v1.Backup - */ -class Backup extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The fully qualified name of the Backup. - * projects/*/locations/*/backupPlans/*/backups/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Server generated global unique identifier of - * [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The timestamp when this Backup 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 this Backup resource 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. This flag indicates whether this Backup resource was created manually - * by a user or via a schedule in the BackupPlan. A value of True means that - * the Backup was created manually. - * - * Generated from protobuf field bool manual = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $manual = false; - /** - * A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 6; - */ - private $labels; - /** - * Minimum age for this Backup (in days). If this field is set to a non-zero - * value, the Backup will be "locked" against deletion (either manual or - * automatic deletion) for the number of days provided (measured from the - * creation time of the Backup). MUST be an integer value between 0-90 - * (inclusive). - * Defaults to parent BackupPlan's - * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days] - * setting and may only be increased - * (either at creation time or in a subsequent update). - * - * Generated from protobuf field int32 delete_lock_days = 7; - */ - protected $delete_lock_days = 0; - /** - * Output only. The time at which an existing delete lock will expire for this backup - * (calculated from create_time + [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]). - * - * Generated from protobuf field .google.protobuf.Timestamp delete_lock_expire_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_lock_expire_time = null; - /** - * The age (in days) after which this Backup will be automatically deleted. - * Must be an integer value >= 0: - * - If 0, no automatic deletion will occur for this Backup. - * - If not 0, this must be >= [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]. - * Once a Backup is created, this value may only be increased. - * Defaults to the parent BackupPlan's - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] value. - * - * Generated from protobuf field int32 retain_days = 9; - */ - protected $retain_days = 0; - /** - * Output only. The time at which this Backup will be automatically deleted (calculated - * from create_time + [retain_days][google.cloud.gkebackup.v1.Backup.retain_days]). - * - * Generated from protobuf field .google.protobuf.Timestamp retain_expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $retain_expire_time = null; - /** - * Output only. The customer managed encryption key that was used to encrypt the Backup's - * artifacts. Inherited from the parent BackupPlan's - * [encryption_key][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.encryption_key] value. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $encryption_key = null; - /** - * Output only. Whether or not the Backup contains volume data. Controlled by the parent - * BackupPlan's - * [include_volume_data][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_volume_data] value. - * - * Generated from protobuf field bool contains_volume_data = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $contains_volume_data = false; - /** - * Output only. Whether or not the Backup contains Kubernetes Secrets. Controlled by the - * parent BackupPlan's - * [include_secrets][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_secrets] value. - * - * Generated from protobuf field bool contains_secrets = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $contains_secrets = false; - /** - * Output only. Information about the GKE cluster from which this Backup was created. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.ClusterMetadata cluster_metadata = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_metadata = null; - /** - * Output only. Current state of the Backup - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.State state = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Human-readable description of why the backup is in the current `state`. - * - * Generated from protobuf field string state_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_reason = ''; - /** - * Output only. Completion time of the Backup - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $complete_time = null; - /** - * Output only. The total number of Kubernetes resources included in the Backup. - * - * Generated from protobuf field int32 resource_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resource_count = 0; - /** - * Output only. The total number of volume backups contained in the Backup. - * - * Generated from protobuf field int32 volume_count = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $volume_count = 0; - /** - * Output only. The total size of the Backup in bytes = config backup size + sum(volume - * backup sizes) - * - * Generated from protobuf field int64 size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_bytes = 0; - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a backup from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform backup updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackup`, - * and systems are expected to put that etag in the request to - * `UpdateBackup` or `DeleteBackup` to ensure that their change will be - * applied to the same version of the resource. - * - * Generated from protobuf field string etag = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - /** - * User specified descriptive string for this Backup. - * - * Generated from protobuf field string description = 25; - */ - protected $description = ''; - /** - * Output only. The total number of Kubernetes Pods contained in the Backup. - * - * Generated from protobuf field int32 pod_count = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $pod_count = 0; - /** - * Output only. The size of the config backup in bytes. - * - * Generated from protobuf field int64 config_backup_size_bytes = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $config_backup_size_bytes = 0; - protected $backup_scope; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The fully qualified name of the Backup. - * projects/*/locations/*/backupPlans/*/backups/* - * @type string $uid - * Output only. Server generated global unique identifier of - * [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when this Backup resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when this Backup resource was last updated. - * @type bool $manual - * Output only. This flag indicates whether this Backup resource was created manually - * by a user or via a schedule in the BackupPlan. A value of True means that - * the Backup was created manually. - * @type array|\Google\Protobuf\Internal\MapField $labels - * A set of custom labels supplied by user. - * @type int $delete_lock_days - * Minimum age for this Backup (in days). If this field is set to a non-zero - * value, the Backup will be "locked" against deletion (either manual or - * automatic deletion) for the number of days provided (measured from the - * creation time of the Backup). MUST be an integer value between 0-90 - * (inclusive). - * Defaults to parent BackupPlan's - * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days] - * setting and may only be increased - * (either at creation time or in a subsequent update). - * @type \Google\Protobuf\Timestamp $delete_lock_expire_time - * Output only. The time at which an existing delete lock will expire for this backup - * (calculated from create_time + [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]). - * @type int $retain_days - * The age (in days) after which this Backup will be automatically deleted. - * Must be an integer value >= 0: - * - If 0, no automatic deletion will occur for this Backup. - * - If not 0, this must be >= [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]. - * Once a Backup is created, this value may only be increased. - * Defaults to the parent BackupPlan's - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] value. - * @type \Google\Protobuf\Timestamp $retain_expire_time - * Output only. The time at which this Backup will be automatically deleted (calculated - * from create_time + [retain_days][google.cloud.gkebackup.v1.Backup.retain_days]). - * @type \Google\Cloud\GkeBackup\V1\EncryptionKey $encryption_key - * Output only. The customer managed encryption key that was used to encrypt the Backup's - * artifacts. Inherited from the parent BackupPlan's - * [encryption_key][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.encryption_key] value. - * @type bool $all_namespaces - * Output only. If True, all namespaces were included in the Backup. - * @type \Google\Cloud\GkeBackup\V1\Namespaces $selected_namespaces - * Output only. If set, the list of namespaces that were included in the Backup. - * @type \Google\Cloud\GkeBackup\V1\NamespacedNames $selected_applications - * Output only. If set, the list of ProtectedApplications whose resources were included - * in the Backup. - * @type bool $contains_volume_data - * Output only. Whether or not the Backup contains volume data. Controlled by the parent - * BackupPlan's - * [include_volume_data][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_volume_data] value. - * @type bool $contains_secrets - * Output only. Whether or not the Backup contains Kubernetes Secrets. Controlled by the - * parent BackupPlan's - * [include_secrets][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_secrets] value. - * @type \Google\Cloud\GkeBackup\V1\Backup\ClusterMetadata $cluster_metadata - * Output only. Information about the GKE cluster from which this Backup was created. - * @type int $state - * Output only. Current state of the Backup - * @type string $state_reason - * Output only. Human-readable description of why the backup is in the current `state`. - * @type \Google\Protobuf\Timestamp $complete_time - * Output only. Completion time of the Backup - * @type int $resource_count - * Output only. The total number of Kubernetes resources included in the Backup. - * @type int $volume_count - * Output only. The total number of volume backups contained in the Backup. - * @type int|string $size_bytes - * Output only. The total size of the Backup in bytes = config backup size + sum(volume - * backup sizes) - * @type string $etag - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a backup from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform backup updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackup`, - * and systems are expected to put that etag in the request to - * `UpdateBackup` or `DeleteBackup` to ensure that their change will be - * applied to the same version of the resource. - * @type string $description - * User specified descriptive string for this Backup. - * @type int $pod_count - * Output only. The total number of Kubernetes Pods contained in the Backup. - * @type int|string $config_backup_size_bytes - * Output only. The size of the config backup in bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The fully qualified name of the Backup. - * projects/*/locations/*/backupPlans/*/backups/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The fully qualified name of the Backup. - * projects/*/locations/*/backupPlans/*/backups/* - * - * 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. Server generated global unique identifier of - * [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server generated global unique identifier of - * [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) - * - * Generated from protobuf field string uid = 2 [(.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 timestamp when this Backup 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 this Backup 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 this Backup resource 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 this Backup resource 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. This flag indicates whether this Backup resource was created manually - * by a user or via a schedule in the BackupPlan. A value of True means that - * the Backup was created manually. - * - * Generated from protobuf field bool manual = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getManual() - { - return $this->manual; - } - - /** - * Output only. This flag indicates whether this Backup resource was created manually - * by a user or via a schedule in the BackupPlan. A value of True means that - * the Backup was created manually. - * - * Generated from protobuf field bool manual = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setManual($var) - { - GPBUtil::checkBool($var); - $this->manual = $var; - - return $this; - } - - /** - * A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * A set of custom labels supplied by user. - * - * 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; - } - - /** - * Minimum age for this Backup (in days). If this field is set to a non-zero - * value, the Backup will be "locked" against deletion (either manual or - * automatic deletion) for the number of days provided (measured from the - * creation time of the Backup). MUST be an integer value between 0-90 - * (inclusive). - * Defaults to parent BackupPlan's - * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days] - * setting and may only be increased - * (either at creation time or in a subsequent update). - * - * Generated from protobuf field int32 delete_lock_days = 7; - * @return int - */ - public function getDeleteLockDays() - { - return $this->delete_lock_days; - } - - /** - * Minimum age for this Backup (in days). If this field is set to a non-zero - * value, the Backup will be "locked" against deletion (either manual or - * automatic deletion) for the number of days provided (measured from the - * creation time of the Backup). MUST be an integer value between 0-90 - * (inclusive). - * Defaults to parent BackupPlan's - * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days] - * setting and may only be increased - * (either at creation time or in a subsequent update). - * - * Generated from protobuf field int32 delete_lock_days = 7; - * @param int $var - * @return $this - */ - public function setDeleteLockDays($var) - { - GPBUtil::checkInt32($var); - $this->delete_lock_days = $var; - - return $this; - } - - /** - * Output only. The time at which an existing delete lock will expire for this backup - * (calculated from create_time + [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]). - * - * Generated from protobuf field .google.protobuf.Timestamp delete_lock_expire_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteLockExpireTime() - { - return $this->delete_lock_expire_time; - } - - public function hasDeleteLockExpireTime() - { - return isset($this->delete_lock_expire_time); - } - - public function clearDeleteLockExpireTime() - { - unset($this->delete_lock_expire_time); - } - - /** - * Output only. The time at which an existing delete lock will expire for this backup - * (calculated from create_time + [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]). - * - * Generated from protobuf field .google.protobuf.Timestamp delete_lock_expire_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteLockExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_lock_expire_time = $var; - - return $this; - } - - /** - * The age (in days) after which this Backup will be automatically deleted. - * Must be an integer value >= 0: - * - If 0, no automatic deletion will occur for this Backup. - * - If not 0, this must be >= [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]. - * Once a Backup is created, this value may only be increased. - * Defaults to the parent BackupPlan's - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] value. - * - * Generated from protobuf field int32 retain_days = 9; - * @return int - */ - public function getRetainDays() - { - return $this->retain_days; - } - - /** - * The age (in days) after which this Backup will be automatically deleted. - * Must be an integer value >= 0: - * - If 0, no automatic deletion will occur for this Backup. - * - If not 0, this must be >= [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]. - * Once a Backup is created, this value may only be increased. - * Defaults to the parent BackupPlan's - * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] value. - * - * Generated from protobuf field int32 retain_days = 9; - * @param int $var - * @return $this - */ - public function setRetainDays($var) - { - GPBUtil::checkInt32($var); - $this->retain_days = $var; - - return $this; - } - - /** - * Output only. The time at which this Backup will be automatically deleted (calculated - * from create_time + [retain_days][google.cloud.gkebackup.v1.Backup.retain_days]). - * - * Generated from protobuf field .google.protobuf.Timestamp retain_expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRetainExpireTime() - { - return $this->retain_expire_time; - } - - public function hasRetainExpireTime() - { - return isset($this->retain_expire_time); - } - - public function clearRetainExpireTime() - { - unset($this->retain_expire_time); - } - - /** - * Output only. The time at which this Backup will be automatically deleted (calculated - * from create_time + [retain_days][google.cloud.gkebackup.v1.Backup.retain_days]). - * - * Generated from protobuf field .google.protobuf.Timestamp retain_expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRetainExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->retain_expire_time = $var; - - return $this; - } - - /** - * Output only. The customer managed encryption key that was used to encrypt the Backup's - * artifacts. Inherited from the parent BackupPlan's - * [encryption_key][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.encryption_key] value. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeBackup\V1\EncryptionKey|null - */ - public function getEncryptionKey() - { - return $this->encryption_key; - } - - public function hasEncryptionKey() - { - return isset($this->encryption_key); - } - - public function clearEncryptionKey() - { - unset($this->encryption_key); - } - - /** - * Output only. The customer managed encryption key that was used to encrypt the Backup's - * artifacts. Inherited from the parent BackupPlan's - * [encryption_key][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.encryption_key] value. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeBackup\V1\EncryptionKey $var - * @return $this - */ - public function setEncryptionKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\EncryptionKey::class); - $this->encryption_key = $var; - - return $this; - } - - /** - * Output only. If True, all namespaces were included in the Backup. - * - * Generated from protobuf field bool all_namespaces = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getAllNamespaces() - { - return $this->readOneof(12); - } - - public function hasAllNamespaces() - { - return $this->hasOneof(12); - } - - /** - * Output only. If True, all namespaces were included in the Backup. - * - * Generated from protobuf field bool all_namespaces = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setAllNamespaces($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Output only. If set, the list of namespaces that were included in the Backup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeBackup\V1\Namespaces|null - */ - public function getSelectedNamespaces() - { - return $this->readOneof(13); - } - - public function hasSelectedNamespaces() - { - return $this->hasOneof(13); - } - - /** - * Output only. If set, the list of namespaces that were included in the Backup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeBackup\V1\Namespaces $var - * @return $this - */ - public function setSelectedNamespaces($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Namespaces::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Output only. If set, the list of ProtectedApplications whose resources were included - * in the Backup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeBackup\V1\NamespacedNames|null - */ - public function getSelectedApplications() - { - return $this->readOneof(14); - } - - public function hasSelectedApplications() - { - return $this->hasOneof(14); - } - - /** - * Output only. If set, the list of ProtectedApplications whose resources were included - * in the Backup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeBackup\V1\NamespacedNames $var - * @return $this - */ - public function setSelectedApplications($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedNames::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Output only. Whether or not the Backup contains volume data. Controlled by the parent - * BackupPlan's - * [include_volume_data][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_volume_data] value. - * - * Generated from protobuf field bool contains_volume_data = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getContainsVolumeData() - { - return $this->contains_volume_data; - } - - /** - * Output only. Whether or not the Backup contains volume data. Controlled by the parent - * BackupPlan's - * [include_volume_data][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_volume_data] value. - * - * Generated from protobuf field bool contains_volume_data = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setContainsVolumeData($var) - { - GPBUtil::checkBool($var); - $this->contains_volume_data = $var; - - return $this; - } - - /** - * Output only. Whether or not the Backup contains Kubernetes Secrets. Controlled by the - * parent BackupPlan's - * [include_secrets][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_secrets] value. - * - * Generated from protobuf field bool contains_secrets = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getContainsSecrets() - { - return $this->contains_secrets; - } - - /** - * Output only. Whether or not the Backup contains Kubernetes Secrets. Controlled by the - * parent BackupPlan's - * [include_secrets][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_secrets] value. - * - * Generated from protobuf field bool contains_secrets = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setContainsSecrets($var) - { - GPBUtil::checkBool($var); - $this->contains_secrets = $var; - - return $this; - } - - /** - * Output only. Information about the GKE cluster from which this Backup was created. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.ClusterMetadata cluster_metadata = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeBackup\V1\Backup\ClusterMetadata|null - */ - public function getClusterMetadata() - { - return $this->cluster_metadata; - } - - public function hasClusterMetadata() - { - return isset($this->cluster_metadata); - } - - public function clearClusterMetadata() - { - unset($this->cluster_metadata); - } - - /** - * Output only. Information about the GKE cluster from which this Backup was created. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.ClusterMetadata cluster_metadata = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeBackup\V1\Backup\ClusterMetadata $var - * @return $this - */ - public function setClusterMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Backup\ClusterMetadata::class); - $this->cluster_metadata = $var; - - return $this; - } - - /** - * Output only. Current state of the Backup - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.State state = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the Backup - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup.State state = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\Backup\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Human-readable description of why the backup is in the current `state`. - * - * Generated from protobuf field string state_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateReason() - { - return $this->state_reason; - } - - /** - * Output only. Human-readable description of why the backup is in the current `state`. - * - * Generated from protobuf field string state_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateReason($var) - { - GPBUtil::checkString($var, True); - $this->state_reason = $var; - - return $this; - } - - /** - * Output only. Completion time of the Backup - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 20 [(.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. Completion time of the Backup - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 20 [(.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 total number of Kubernetes resources included in the Backup. - * - * Generated from protobuf field int32 resource_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getResourceCount() - { - return $this->resource_count; - } - - /** - * Output only. The total number of Kubernetes resources included in the Backup. - * - * Generated from protobuf field int32 resource_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setResourceCount($var) - { - GPBUtil::checkInt32($var); - $this->resource_count = $var; - - return $this; - } - - /** - * Output only. The total number of volume backups contained in the Backup. - * - * Generated from protobuf field int32 volume_count = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVolumeCount() - { - return $this->volume_count; - } - - /** - * Output only. The total number of volume backups contained in the Backup. - * - * Generated from protobuf field int32 volume_count = 22 [(.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. The total size of the Backup in bytes = config backup size + sum(volume - * backup sizes) - * - * Generated from protobuf field int64 size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Output only. The total size of the Backup in bytes = config backup size + sum(volume - * backup sizes) - * - * Generated from protobuf field int64 size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->size_bytes = $var; - - return $this; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a backup from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform backup updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackup`, - * and systems are expected to put that etag in the request to - * `UpdateBackup` or `DeleteBackup` to ensure that their change will be - * applied to the same version of the resource. - * - * Generated from protobuf field string etag = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a backup from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform backup updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackup`, - * and systems are expected to put that etag in the request to - * `UpdateBackup` or `DeleteBackup` to ensure that their change will be - * applied to the same version of the resource. - * - * Generated from protobuf field string etag = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * User specified descriptive string for this Backup. - * - * Generated from protobuf field string description = 25; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User specified descriptive string for this Backup. - * - * Generated from protobuf field string description = 25; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The total number of Kubernetes Pods contained in the Backup. - * - * Generated from protobuf field int32 pod_count = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPodCount() - { - return $this->pod_count; - } - - /** - * Output only. The total number of Kubernetes Pods contained in the Backup. - * - * Generated from protobuf field int32 pod_count = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPodCount($var) - { - GPBUtil::checkInt32($var); - $this->pod_count = $var; - - return $this; - } - - /** - * Output only. The size of the config backup in bytes. - * - * Generated from protobuf field int64 config_backup_size_bytes = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getConfigBackupSizeBytes() - { - return $this->config_backup_size_bytes; - } - - /** - * Output only. The size of the config backup in bytes. - * - * Generated from protobuf field int64 config_backup_size_bytes = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setConfigBackupSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->config_backup_size_bytes = $var; - - return $this; - } - - /** - * @return string - */ - public function getBackupScope() - { - return $this->whichOneof("backup_scope"); - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/ClusterMetadata.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/ClusterMetadata.php deleted file mode 100644 index 7f7fbdbae16b..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/ClusterMetadata.php +++ /dev/null @@ -1,233 +0,0 @@ -google.cloud.gkebackup.v1.Backup.ClusterMetadata - */ -class ClusterMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The source cluster from which this Backup was created. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * This is inherited from the parent BackupPlan's - * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. - * - * Generated from protobuf field string cluster = 1; - */ - protected $cluster = ''; - /** - * The Kubernetes server version of the source cluster. - * - * Generated from protobuf field string k8s_version = 2; - */ - protected $k8s_version = ''; - /** - * A list of the Backup for GKE CRD versions found in the cluster. - * - * Generated from protobuf field map backup_crd_versions = 3; - */ - private $backup_crd_versions; - protected $platform_version; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster - * The source cluster from which this Backup was created. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * This is inherited from the parent BackupPlan's - * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. - * @type string $k8s_version - * The Kubernetes server version of the source cluster. - * @type array|\Google\Protobuf\Internal\MapField $backup_crd_versions - * A list of the Backup for GKE CRD versions found in the cluster. - * @type string $gke_version - * GKE version - * @type string $anthos_version - * Anthos version - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * The source cluster from which this Backup was created. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * This is inherited from the parent BackupPlan's - * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. - * - * Generated from protobuf field string cluster = 1; - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * The source cluster from which this Backup was created. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * This is inherited from the parent BackupPlan's - * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. - * - * 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; - } - - /** - * The Kubernetes server version of the source cluster. - * - * Generated from protobuf field string k8s_version = 2; - * @return string - */ - public function getK8SVersion() - { - return $this->k8s_version; - } - - /** - * The Kubernetes server version of the source cluster. - * - * Generated from protobuf field string k8s_version = 2; - * @param string $var - * @return $this - */ - public function setK8SVersion($var) - { - GPBUtil::checkString($var, True); - $this->k8s_version = $var; - - return $this; - } - - /** - * A list of the Backup for GKE CRD versions found in the cluster. - * - * Generated from protobuf field map backup_crd_versions = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getBackupCrdVersions() - { - return $this->backup_crd_versions; - } - - /** - * A list of the Backup for GKE CRD versions found in the cluster. - * - * Generated from protobuf field map backup_crd_versions = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setBackupCrdVersions($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->backup_crd_versions = $arr; - - return $this; - } - - /** - * GKE version - * - * Generated from protobuf field string gke_version = 4; - * @return string - */ - public function getGkeVersion() - { - return $this->readOneof(4); - } - - public function hasGkeVersion() - { - return $this->hasOneof(4); - } - - /** - * GKE version - * - * Generated from protobuf field string gke_version = 4; - * @param string $var - * @return $this - */ - public function setGkeVersion($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Anthos version - * - * Generated from protobuf field string anthos_version = 5; - * @return string - */ - public function getAnthosVersion() - { - return $this->readOneof(5); - } - - public function hasAnthosVersion() - { - return $this->hasOneof(5); - } - - /** - * Anthos version - * - * Generated from protobuf field string anthos_version = 5; - * @param string $var - * @return $this - */ - public function setAnthosVersion($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getPlatformVersion() - { - return $this->whichOneof("platform_version"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClusterMetadata::class, \Google\Cloud\GkeBackup\V1\Backup_ClusterMetadata::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/State.php deleted file mode 100644 index d3f3a57ba825..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Backup/State.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.gkebackup.v1.Backup.State - */ -class State -{ - /** - * The Backup resource is in the process of being created. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The Backup resource has been created and the associated BackupJob - * Kubernetes resource has been injected into the source cluster. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The gkebackup agent in the cluster has begun executing the backup - * operation. - * - * Generated from protobuf enum IN_PROGRESS = 2; - */ - const IN_PROGRESS = 2; - /** - * The backup operation has completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * The backup operation has failed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * This Backup resource (and its associated artifacts) is in the process - * of being deleted. - * - * Generated from protobuf enum DELETING = 5; - */ - const DELETING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::IN_PROGRESS => 'IN_PROGRESS', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - 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\GkeBackup\V1\Backup_State::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupForGKEGrpcClient.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupForGKEGrpcClient.php deleted file mode 100644 index 3e4636e07576..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupForGKEGrpcClient.php +++ /dev/null @@ -1,396 +0,0 @@ -_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/CreateBackupPlan', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists BackupPlans in a given location. - * @param \Google\Cloud\GkeBackup\V1\ListBackupPlansRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListBackupPlans(\Google\Cloud\GkeBackup\V1\ListBackupPlansRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/ListBackupPlans', - $argument, - ['\Google\Cloud\GkeBackup\V1\ListBackupPlansResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieve the details of a single BackupPlan. - * @param \Google\Cloud\GkeBackup\V1\GetBackupPlanRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetBackupPlan(\Google\Cloud\GkeBackup\V1\GetBackupPlanRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/GetBackupPlan', - $argument, - ['\Google\Cloud\GkeBackup\V1\BackupPlan', 'decode'], - $metadata, $options); - } - - /** - * Update a BackupPlan. - * @param \Google\Cloud\GkeBackup\V1\UpdateBackupPlanRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateBackupPlan(\Google\Cloud\GkeBackup\V1\UpdateBackupPlanRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/UpdateBackupPlan', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes an existing BackupPlan. - * @param \Google\Cloud\GkeBackup\V1\DeleteBackupPlanRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteBackupPlan(\Google\Cloud\GkeBackup\V1\DeleteBackupPlanRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/DeleteBackupPlan', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Creates a Backup for the given BackupPlan. - * @param \Google\Cloud\GkeBackup\V1\CreateBackupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateBackup(\Google\Cloud\GkeBackup\V1\CreateBackupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/CreateBackup', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists the Backups for a given BackupPlan. - * @param \Google\Cloud\GkeBackup\V1\ListBackupsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListBackups(\Google\Cloud\GkeBackup\V1\ListBackupsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/ListBackups', - $argument, - ['\Google\Cloud\GkeBackup\V1\ListBackupsResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieve the details of a single Backup. - * @param \Google\Cloud\GkeBackup\V1\GetBackupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetBackup(\Google\Cloud\GkeBackup\V1\GetBackupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/GetBackup', - $argument, - ['\Google\Cloud\GkeBackup\V1\Backup', 'decode'], - $metadata, $options); - } - - /** - * Update a Backup. - * @param \Google\Cloud\GkeBackup\V1\UpdateBackupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateBackup(\Google\Cloud\GkeBackup\V1\UpdateBackupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/UpdateBackup', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes an existing Backup. - * @param \Google\Cloud\GkeBackup\V1\DeleteBackupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteBackup(\Google\Cloud\GkeBackup\V1\DeleteBackupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/DeleteBackup', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists the VolumeBackups for a given Backup. - * @param \Google\Cloud\GkeBackup\V1\ListVolumeBackupsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListVolumeBackups(\Google\Cloud\GkeBackup\V1\ListVolumeBackupsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/ListVolumeBackups', - $argument, - ['\Google\Cloud\GkeBackup\V1\ListVolumeBackupsResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieve the details of a single VolumeBackup. - * @param \Google\Cloud\GkeBackup\V1\GetVolumeBackupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetVolumeBackup(\Google\Cloud\GkeBackup\V1\GetVolumeBackupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/GetVolumeBackup', - $argument, - ['\Google\Cloud\GkeBackup\V1\VolumeBackup', 'decode'], - $metadata, $options); - } - - /** - * Creates a new RestorePlan in a given location. - * @param \Google\Cloud\GkeBackup\V1\CreateRestorePlanRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateRestorePlan(\Google\Cloud\GkeBackup\V1\CreateRestorePlanRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/CreateRestorePlan', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists RestorePlans in a given location. - * @param \Google\Cloud\GkeBackup\V1\ListRestorePlansRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListRestorePlans(\Google\Cloud\GkeBackup\V1\ListRestorePlansRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/ListRestorePlans', - $argument, - ['\Google\Cloud\GkeBackup\V1\ListRestorePlansResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieve the details of a single RestorePlan. - * @param \Google\Cloud\GkeBackup\V1\GetRestorePlanRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetRestorePlan(\Google\Cloud\GkeBackup\V1\GetRestorePlanRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/GetRestorePlan', - $argument, - ['\Google\Cloud\GkeBackup\V1\RestorePlan', 'decode'], - $metadata, $options); - } - - /** - * Update a RestorePlan. - * @param \Google\Cloud\GkeBackup\V1\UpdateRestorePlanRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateRestorePlan(\Google\Cloud\GkeBackup\V1\UpdateRestorePlanRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/UpdateRestorePlan', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes an existing RestorePlan. - * @param \Google\Cloud\GkeBackup\V1\DeleteRestorePlanRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteRestorePlan(\Google\Cloud\GkeBackup\V1\DeleteRestorePlanRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/DeleteRestorePlan', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Creates a new Restore for the given RestorePlan. - * @param \Google\Cloud\GkeBackup\V1\CreateRestoreRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateRestore(\Google\Cloud\GkeBackup\V1\CreateRestoreRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/CreateRestore', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists the Restores for a given RestorePlan. - * @param \Google\Cloud\GkeBackup\V1\ListRestoresRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListRestores(\Google\Cloud\GkeBackup\V1\ListRestoresRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/ListRestores', - $argument, - ['\Google\Cloud\GkeBackup\V1\ListRestoresResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves the details of a single Restore. - * @param \Google\Cloud\GkeBackup\V1\GetRestoreRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetRestore(\Google\Cloud\GkeBackup\V1\GetRestoreRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/GetRestore', - $argument, - ['\Google\Cloud\GkeBackup\V1\Restore', 'decode'], - $metadata, $options); - } - - /** - * Update a Restore. - * @param \Google\Cloud\GkeBackup\V1\UpdateRestoreRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateRestore(\Google\Cloud\GkeBackup\V1\UpdateRestoreRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/UpdateRestore', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes an existing Restore. - * @param \Google\Cloud\GkeBackup\V1\DeleteRestoreRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteRestore(\Google\Cloud\GkeBackup\V1\DeleteRestoreRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/DeleteRestore', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Lists the VolumeRestores for a given Restore. - * @param \Google\Cloud\GkeBackup\V1\ListVolumeRestoresRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListVolumeRestores(\Google\Cloud\GkeBackup\V1\ListVolumeRestoresRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/ListVolumeRestores', - $argument, - ['\Google\Cloud\GkeBackup\V1\ListVolumeRestoresResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieve the details of a single VolumeRestore. - * @param \Google\Cloud\GkeBackup\V1\GetVolumeRestoreRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetVolumeRestore(\Google\Cloud\GkeBackup\V1\GetVolumeRestoreRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkebackup.v1.BackupForGKE/GetVolumeRestore', - $argument, - ['\Google\Cloud\GkeBackup\V1\VolumeRestore', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan.php deleted file mode 100644 index cc832b5239e8..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan.php +++ /dev/null @@ -1,605 +0,0 @@ -google.cloud.gkebackup.v1.BackupPlan - */ -class BackupPlan extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full name of the BackupPlan resource. - * Format: projects/*/locations/*/backupPlans/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The timestamp when this BackupPlan 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 this BackupPlan resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User specified descriptive string for this BackupPlan. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Required. Immutable. The source cluster from which Backups will be created via - * this BackupPlan. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * - * Generated from protobuf field string cluster = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $cluster = ''; - /** - * RetentionPolicy governs lifecycle of Backups created under this plan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy retention_policy = 7; - */ - protected $retention_policy = null; - /** - * A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 8; - */ - private $labels; - /** - * Defines a schedule for automatic Backup creation via this BackupPlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.Schedule backup_schedule = 9; - */ - protected $backup_schedule = null; - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a backup plan from overwriting each other. - * It is strongly suggested that systems make use of the 'etag' in the - * read-modify-write cycle to perform BackupPlan updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackupPlan`, - * and systems are expected to put that etag in the request to - * `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change - * will be applied to the same version of the resource. - * - * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - /** - * This flag indicates whether this BackupPlan has been deactivated. - * Setting this field to True locks the BackupPlan such that no further - * updates will be allowed (except deletes), including the deactivated field - * itself. It also prevents any new Backups from being created via this - * BackupPlan (including scheduled Backups). - * Default: False - * - * Generated from protobuf field bool deactivated = 11; - */ - protected $deactivated = false; - /** - * Defines the configuration of Backups created via this BackupPlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.BackupConfig backup_config = 12; - */ - protected $backup_config = null; - /** - * Output only. The number of Kubernetes Pods backed up in the - * last successful Backup created via this BackupPlan. - * - * Generated from protobuf field int32 protected_pod_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $protected_pod_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The full name of the BackupPlan resource. - * Format: projects/*/locations/*/backupPlans/* - * @type string $uid - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when this BackupPlan resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when this BackupPlan resource was last - * updated. - * @type string $description - * User specified descriptive string for this BackupPlan. - * @type string $cluster - * Required. Immutable. The source cluster from which Backups will be created via - * this BackupPlan. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * @type \Google\Cloud\GkeBackup\V1\BackupPlan\RetentionPolicy $retention_policy - * RetentionPolicy governs lifecycle of Backups created under this plan. - * @type array|\Google\Protobuf\Internal\MapField $labels - * A set of custom labels supplied by user. - * @type \Google\Cloud\GkeBackup\V1\BackupPlan\Schedule $backup_schedule - * Defines a schedule for automatic Backup creation via this BackupPlan. - * @type string $etag - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a backup plan from overwriting each other. - * It is strongly suggested that systems make use of the 'etag' in the - * read-modify-write cycle to perform BackupPlan updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackupPlan`, - * and systems are expected to put that etag in the request to - * `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change - * will be applied to the same version of the resource. - * @type bool $deactivated - * This flag indicates whether this BackupPlan has been deactivated. - * Setting this field to True locks the BackupPlan such that no further - * updates will be allowed (except deletes), including the deactivated field - * itself. It also prevents any new Backups from being created via this - * BackupPlan (including scheduled Backups). - * Default: False - * @type \Google\Cloud\GkeBackup\V1\BackupPlan\BackupConfig $backup_config - * Defines the configuration of Backups created via this BackupPlan. - * @type int $protected_pod_count - * Output only. The number of Kubernetes Pods backed up in the - * last successful Backup created via this BackupPlan. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full name of the BackupPlan resource. - * Format: projects/*/locations/*/backupPlans/* - * - * 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 BackupPlan resource. - * Format: projects/*/locations/*/backupPlans/* - * - * 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. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.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 timestamp when this BackupPlan 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 this BackupPlan 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 this BackupPlan resource 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 this BackupPlan resource 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; - } - - /** - * User specified descriptive string for this BackupPlan. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User specified descriptive string for this BackupPlan. - * - * 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. Immutable. The source cluster from which Backups will be created via - * this BackupPlan. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * - * Generated from protobuf field string cluster = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * Required. Immutable. The source cluster from which Backups will be created via - * this BackupPlan. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * - * Generated from protobuf field string cluster = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * RetentionPolicy governs lifecycle of Backups created under this plan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy retention_policy = 7; - * @return \Google\Cloud\GkeBackup\V1\BackupPlan\RetentionPolicy|null - */ - public function getRetentionPolicy() - { - return $this->retention_policy; - } - - public function hasRetentionPolicy() - { - return isset($this->retention_policy); - } - - public function clearRetentionPolicy() - { - unset($this->retention_policy); - } - - /** - * RetentionPolicy governs lifecycle of Backups created under this plan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy retention_policy = 7; - * @param \Google\Cloud\GkeBackup\V1\BackupPlan\RetentionPolicy $var - * @return $this - */ - public function setRetentionPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\BackupPlan\RetentionPolicy::class); - $this->retention_policy = $var; - - return $this; - } - - /** - * A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * A set of custom labels supplied by user. - * - * 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; - } - - /** - * Defines a schedule for automatic Backup creation via this BackupPlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.Schedule backup_schedule = 9; - * @return \Google\Cloud\GkeBackup\V1\BackupPlan\Schedule|null - */ - public function getBackupSchedule() - { - return $this->backup_schedule; - } - - public function hasBackupSchedule() - { - return isset($this->backup_schedule); - } - - public function clearBackupSchedule() - { - unset($this->backup_schedule); - } - - /** - * Defines a schedule for automatic Backup creation via this BackupPlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.Schedule backup_schedule = 9; - * @param \Google\Cloud\GkeBackup\V1\BackupPlan\Schedule $var - * @return $this - */ - public function setBackupSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\BackupPlan\Schedule::class); - $this->backup_schedule = $var; - - return $this; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a backup plan from overwriting each other. - * It is strongly suggested that systems make use of the 'etag' in the - * read-modify-write cycle to perform BackupPlan updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackupPlan`, - * and systems are expected to put that etag in the request to - * `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change - * will be applied to the same version of the resource. - * - * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a backup plan from overwriting each other. - * It is strongly suggested that systems make use of the 'etag' in the - * read-modify-write cycle to perform BackupPlan updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetBackupPlan`, - * and systems are expected to put that etag in the request to - * `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change - * will be applied to the same version of the resource. - * - * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * This flag indicates whether this BackupPlan has been deactivated. - * Setting this field to True locks the BackupPlan such that no further - * updates will be allowed (except deletes), including the deactivated field - * itself. It also prevents any new Backups from being created via this - * BackupPlan (including scheduled Backups). - * Default: False - * - * Generated from protobuf field bool deactivated = 11; - * @return bool - */ - public function getDeactivated() - { - return $this->deactivated; - } - - /** - * This flag indicates whether this BackupPlan has been deactivated. - * Setting this field to True locks the BackupPlan such that no further - * updates will be allowed (except deletes), including the deactivated field - * itself. It also prevents any new Backups from being created via this - * BackupPlan (including scheduled Backups). - * Default: False - * - * Generated from protobuf field bool deactivated = 11; - * @param bool $var - * @return $this - */ - public function setDeactivated($var) - { - GPBUtil::checkBool($var); - $this->deactivated = $var; - - return $this; - } - - /** - * Defines the configuration of Backups created via this BackupPlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.BackupConfig backup_config = 12; - * @return \Google\Cloud\GkeBackup\V1\BackupPlan\BackupConfig|null - */ - public function getBackupConfig() - { - return $this->backup_config; - } - - public function hasBackupConfig() - { - return isset($this->backup_config); - } - - public function clearBackupConfig() - { - unset($this->backup_config); - } - - /** - * Defines the configuration of Backups created via this BackupPlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.BackupConfig backup_config = 12; - * @param \Google\Cloud\GkeBackup\V1\BackupPlan\BackupConfig $var - * @return $this - */ - public function setBackupConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\BackupPlan\BackupConfig::class); - $this->backup_config = $var; - - return $this; - } - - /** - * Output only. The number of Kubernetes Pods backed up in the - * last successful Backup created via this BackupPlan. - * - * Generated from protobuf field int32 protected_pod_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getProtectedPodCount() - { - return $this->protected_pod_count; - } - - /** - * Output only. The number of Kubernetes Pods backed up in the - * last successful Backup created via this BackupPlan. - * - * Generated from protobuf field int32 protected_pod_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setProtectedPodCount($var) - { - GPBUtil::checkInt32($var); - $this->protected_pod_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/BackupConfig.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/BackupConfig.php deleted file mode 100644 index 23ab8ab2ec06..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/BackupConfig.php +++ /dev/null @@ -1,288 +0,0 @@ -google.cloud.gkebackup.v1.BackupPlan.BackupConfig - */ -class BackupConfig extends \Google\Protobuf\Internal\Message -{ - /** - * This flag specifies whether volume data should be backed up when - * PVCs are included in the scope of a Backup. - * Default: False - * - * Generated from protobuf field bool include_volume_data = 4; - */ - protected $include_volume_data = false; - /** - * This flag specifies whether Kubernetes Secret resources should be - * included when they fall into the scope of Backups. - * Default: False - * - * Generated from protobuf field bool include_secrets = 5; - */ - protected $include_secrets = false; - /** - * This defines a customer managed encryption key that will be used to - * encrypt the "config" portion (the Kubernetes resources) of Backups - * created via this plan. - * Default (empty): Config backup artifacts will not be encrypted. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6; - */ - protected $encryption_key = null; - protected $backup_scope; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $all_namespaces - * If True, include all namespaced resources - * @type \Google\Cloud\GkeBackup\V1\Namespaces $selected_namespaces - * If set, include just the resources in the listed namespaces. - * @type \Google\Cloud\GkeBackup\V1\NamespacedNames $selected_applications - * If set, include just the resources referenced by the listed - * ProtectedApplications. - * @type bool $include_volume_data - * This flag specifies whether volume data should be backed up when - * PVCs are included in the scope of a Backup. - * Default: False - * @type bool $include_secrets - * This flag specifies whether Kubernetes Secret resources should be - * included when they fall into the scope of Backups. - * Default: False - * @type \Google\Cloud\GkeBackup\V1\EncryptionKey $encryption_key - * This defines a customer managed encryption key that will be used to - * encrypt the "config" portion (the Kubernetes resources) of Backups - * created via this plan. - * Default (empty): Config backup artifacts will not be encrypted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); - parent::__construct($data); - } - - /** - * If True, include all namespaced resources - * - * Generated from protobuf field bool all_namespaces = 1; - * @return bool - */ - public function getAllNamespaces() - { - return $this->readOneof(1); - } - - public function hasAllNamespaces() - { - return $this->hasOneof(1); - } - - /** - * If True, include all namespaced resources - * - * Generated from protobuf field bool all_namespaces = 1; - * @param bool $var - * @return $this - */ - public function setAllNamespaces($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * If set, include just the resources in the listed namespaces. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 2; - * @return \Google\Cloud\GkeBackup\V1\Namespaces|null - */ - public function getSelectedNamespaces() - { - return $this->readOneof(2); - } - - public function hasSelectedNamespaces() - { - return $this->hasOneof(2); - } - - /** - * If set, include just the resources in the listed namespaces. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 2; - * @param \Google\Cloud\GkeBackup\V1\Namespaces $var - * @return $this - */ - public function setSelectedNamespaces($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Namespaces::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * If set, include just the resources referenced by the listed - * ProtectedApplications. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 3; - * @return \Google\Cloud\GkeBackup\V1\NamespacedNames|null - */ - public function getSelectedApplications() - { - return $this->readOneof(3); - } - - public function hasSelectedApplications() - { - return $this->hasOneof(3); - } - - /** - * If set, include just the resources referenced by the listed - * ProtectedApplications. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 3; - * @param \Google\Cloud\GkeBackup\V1\NamespacedNames $var - * @return $this - */ - public function setSelectedApplications($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedNames::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * This flag specifies whether volume data should be backed up when - * PVCs are included in the scope of a Backup. - * Default: False - * - * Generated from protobuf field bool include_volume_data = 4; - * @return bool - */ - public function getIncludeVolumeData() - { - return $this->include_volume_data; - } - - /** - * This flag specifies whether volume data should be backed up when - * PVCs are included in the scope of a Backup. - * Default: False - * - * Generated from protobuf field bool include_volume_data = 4; - * @param bool $var - * @return $this - */ - public function setIncludeVolumeData($var) - { - GPBUtil::checkBool($var); - $this->include_volume_data = $var; - - return $this; - } - - /** - * This flag specifies whether Kubernetes Secret resources should be - * included when they fall into the scope of Backups. - * Default: False - * - * Generated from protobuf field bool include_secrets = 5; - * @return bool - */ - public function getIncludeSecrets() - { - return $this->include_secrets; - } - - /** - * This flag specifies whether Kubernetes Secret resources should be - * included when they fall into the scope of Backups. - * Default: False - * - * Generated from protobuf field bool include_secrets = 5; - * @param bool $var - * @return $this - */ - public function setIncludeSecrets($var) - { - GPBUtil::checkBool($var); - $this->include_secrets = $var; - - return $this; - } - - /** - * This defines a customer managed encryption key that will be used to - * encrypt the "config" portion (the Kubernetes resources) of Backups - * created via this plan. - * Default (empty): Config backup artifacts will not be encrypted. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6; - * @return \Google\Cloud\GkeBackup\V1\EncryptionKey|null - */ - public function getEncryptionKey() - { - return $this->encryption_key; - } - - public function hasEncryptionKey() - { - return isset($this->encryption_key); - } - - public function clearEncryptionKey() - { - unset($this->encryption_key); - } - - /** - * This defines a customer managed encryption key that will be used to - * encrypt the "config" portion (the Kubernetes resources) of Backups - * created via this plan. - * Default (empty): Config backup artifacts will not be encrypted. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6; - * @param \Google\Cloud\GkeBackup\V1\EncryptionKey $var - * @return $this - */ - public function setEncryptionKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\EncryptionKey::class); - $this->encryption_key = $var; - - return $this; - } - - /** - * @return string - */ - public function getBackupScope() - { - return $this->whichOneof("backup_scope"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BackupConfig::class, \Google\Cloud\GkeBackup\V1\BackupPlan_BackupConfig::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/RetentionPolicy.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/RetentionPolicy.php deleted file mode 100644 index c675595bb3a9..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/RetentionPolicy.php +++ /dev/null @@ -1,222 +0,0 @@ -google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy - */ -class RetentionPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Minimum age for Backups created via this BackupPlan (in days). - * This field MUST be an integer value between 0-90 (inclusive). - * A Backup created under this BackupPlan will NOT be deletable until it - * reaches Backup's (create_time + backup_delete_lock_days). - * Updating this field of a BackupPlan does NOT affect existing Backups - * under it. Backups created AFTER a successful update will inherit - * the new value. - * Default: 0 (no delete blocking) - * - * Generated from protobuf field int32 backup_delete_lock_days = 1; - */ - protected $backup_delete_lock_days = 0; - /** - * The default maximum age of a Backup created via this BackupPlan. - * This field MUST be an integer value >= 0. - * If specified, a Backup created under this BackupPlan will be - * automatically deleted after its age reaches (create_time + - * backup_retain_days). - * If not specified, Backups created under this BackupPlan will NOT be - * subject to automatic deletion. - * Updating this field does NOT affect existing Backups under it. Backups - * created AFTER a successful update will automatically pick up the new - * value. - * NOTE: backup_retain_days must be >= [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. - * Default: 0 (no automatic deletion) - * - * Generated from protobuf field int32 backup_retain_days = 2; - */ - protected $backup_retain_days = 0; - /** - * This flag denotes whether the retention policy of this BackupPlan is - * locked. If set to True, no further update is allowed on this policy, - * including the `locked` field itself. - * Default: False - * - * Generated from protobuf field bool locked = 3; - */ - protected $locked = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $backup_delete_lock_days - * Minimum age for Backups created via this BackupPlan (in days). - * This field MUST be an integer value between 0-90 (inclusive). - * A Backup created under this BackupPlan will NOT be deletable until it - * reaches Backup's (create_time + backup_delete_lock_days). - * Updating this field of a BackupPlan does NOT affect existing Backups - * under it. Backups created AFTER a successful update will inherit - * the new value. - * Default: 0 (no delete blocking) - * @type int $backup_retain_days - * The default maximum age of a Backup created via this BackupPlan. - * This field MUST be an integer value >= 0. - * If specified, a Backup created under this BackupPlan will be - * automatically deleted after its age reaches (create_time + - * backup_retain_days). - * If not specified, Backups created under this BackupPlan will NOT be - * subject to automatic deletion. - * Updating this field does NOT affect existing Backups under it. Backups - * created AFTER a successful update will automatically pick up the new - * value. - * NOTE: backup_retain_days must be >= [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. - * Default: 0 (no automatic deletion) - * @type bool $locked - * This flag denotes whether the retention policy of this BackupPlan is - * locked. If set to True, no further update is allowed on this policy, - * including the `locked` field itself. - * Default: False - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); - parent::__construct($data); - } - - /** - * Minimum age for Backups created via this BackupPlan (in days). - * This field MUST be an integer value between 0-90 (inclusive). - * A Backup created under this BackupPlan will NOT be deletable until it - * reaches Backup's (create_time + backup_delete_lock_days). - * Updating this field of a BackupPlan does NOT affect existing Backups - * under it. Backups created AFTER a successful update will inherit - * the new value. - * Default: 0 (no delete blocking) - * - * Generated from protobuf field int32 backup_delete_lock_days = 1; - * @return int - */ - public function getBackupDeleteLockDays() - { - return $this->backup_delete_lock_days; - } - - /** - * Minimum age for Backups created via this BackupPlan (in days). - * This field MUST be an integer value between 0-90 (inclusive). - * A Backup created under this BackupPlan will NOT be deletable until it - * reaches Backup's (create_time + backup_delete_lock_days). - * Updating this field of a BackupPlan does NOT affect existing Backups - * under it. Backups created AFTER a successful update will inherit - * the new value. - * Default: 0 (no delete blocking) - * - * Generated from protobuf field int32 backup_delete_lock_days = 1; - * @param int $var - * @return $this - */ - public function setBackupDeleteLockDays($var) - { - GPBUtil::checkInt32($var); - $this->backup_delete_lock_days = $var; - - return $this; - } - - /** - * The default maximum age of a Backup created via this BackupPlan. - * This field MUST be an integer value >= 0. - * If specified, a Backup created under this BackupPlan will be - * automatically deleted after its age reaches (create_time + - * backup_retain_days). - * If not specified, Backups created under this BackupPlan will NOT be - * subject to automatic deletion. - * Updating this field does NOT affect existing Backups under it. Backups - * created AFTER a successful update will automatically pick up the new - * value. - * NOTE: backup_retain_days must be >= [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. - * Default: 0 (no automatic deletion) - * - * Generated from protobuf field int32 backup_retain_days = 2; - * @return int - */ - public function getBackupRetainDays() - { - return $this->backup_retain_days; - } - - /** - * The default maximum age of a Backup created via this BackupPlan. - * This field MUST be an integer value >= 0. - * If specified, a Backup created under this BackupPlan will be - * automatically deleted after its age reaches (create_time + - * backup_retain_days). - * If not specified, Backups created under this BackupPlan will NOT be - * subject to automatic deletion. - * Updating this field does NOT affect existing Backups under it. Backups - * created AFTER a successful update will automatically pick up the new - * value. - * NOTE: backup_retain_days must be >= [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. - * Default: 0 (no automatic deletion) - * - * Generated from protobuf field int32 backup_retain_days = 2; - * @param int $var - * @return $this - */ - public function setBackupRetainDays($var) - { - GPBUtil::checkInt32($var); - $this->backup_retain_days = $var; - - return $this; - } - - /** - * This flag denotes whether the retention policy of this BackupPlan is - * locked. If set to True, no further update is allowed on this policy, - * including the `locked` field itself. - * Default: False - * - * Generated from protobuf field bool locked = 3; - * @return bool - */ - public function getLocked() - { - return $this->locked; - } - - /** - * This flag denotes whether the retention policy of this BackupPlan is - * locked. If set to True, no further update is allowed on this policy, - * including the `locked` field itself. - * Default: False - * - * Generated from protobuf field bool locked = 3; - * @param bool $var - * @return $this - */ - public function setLocked($var) - { - GPBUtil::checkBool($var); - $this->locked = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RetentionPolicy::class, \Google\Cloud\GkeBackup\V1\BackupPlan_RetentionPolicy::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/Schedule.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/Schedule.php deleted file mode 100644 index 94215c3b9286..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan/Schedule.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.gkebackup.v1.BackupPlan.Schedule - */ -class Schedule extends \Google\Protobuf\Internal\Message -{ - /** - * A standard [cron](https://wikipedia.com/wiki/cron) string that defines a - * repeating schedule for creating Backups via this BackupPlan. - * Default (empty): no automatic backup creation will occur. - * - * Generated from protobuf field string cron_schedule = 1; - */ - protected $cron_schedule = ''; - /** - * This flag denotes whether automatic Backup creation is paused for this - * BackupPlan. - * Default: False - * - * Generated from protobuf field bool paused = 2; - */ - protected $paused = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cron_schedule - * A standard [cron](https://wikipedia.com/wiki/cron) string that defines a - * repeating schedule for creating Backups via this BackupPlan. - * Default (empty): no automatic backup creation will occur. - * @type bool $paused - * This flag denotes whether automatic Backup creation is paused for this - * BackupPlan. - * Default: False - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); - parent::__construct($data); - } - - /** - * A standard [cron](https://wikipedia.com/wiki/cron) string that defines a - * repeating schedule for creating Backups via this BackupPlan. - * Default (empty): no automatic backup creation will occur. - * - * Generated from protobuf field string cron_schedule = 1; - * @return string - */ - public function getCronSchedule() - { - return $this->cron_schedule; - } - - /** - * A standard [cron](https://wikipedia.com/wiki/cron) string that defines a - * repeating schedule for creating Backups via this BackupPlan. - * Default (empty): no automatic backup creation will occur. - * - * Generated from protobuf field string cron_schedule = 1; - * @param string $var - * @return $this - */ - public function setCronSchedule($var) - { - GPBUtil::checkString($var, True); - $this->cron_schedule = $var; - - return $this; - } - - /** - * This flag denotes whether automatic Backup creation is paused for this - * BackupPlan. - * Default: False - * - * Generated from protobuf field bool paused = 2; - * @return bool - */ - public function getPaused() - { - return $this->paused; - } - - /** - * This flag denotes whether automatic Backup creation is paused for this - * BackupPlan. - * Default: False - * - * Generated from protobuf field bool paused = 2; - * @param bool $var - * @return $this - */ - public function setPaused($var) - { - GPBUtil::checkBool($var); - $this->paused = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Schedule::class, \Google\Cloud\GkeBackup\V1\BackupPlan_Schedule::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan_BackupConfig.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan_BackupConfig.php deleted file mode 100644 index 7daaae24bb48..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/BackupPlan_BackupConfig.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.gkebackup.v1.CreateBackupPlanRequest - */ -class CreateBackupPlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location within which to create the BackupPlan. - * Format: projects/*/locations/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The BackupPlan resource object to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_plan = null; - /** - * Required. The client-provided short name for the BackupPlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of BackupPlans in this location - * - * Generated from protobuf field string backup_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_plan_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location within which to create the BackupPlan. - * Format: projects/*/locations/* - * @type \Google\Cloud\GkeBackup\V1\BackupPlan $backup_plan - * Required. The BackupPlan resource object to create. - * @type string $backup_plan_id - * Required. The client-provided short name for the BackupPlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of BackupPlans in this location - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location within which to create the BackupPlan. - * 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 location within which to create the BackupPlan. - * 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. The BackupPlan resource object to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\BackupPlan|null - */ - public function getBackupPlan() - { - return $this->backup_plan; - } - - public function hasBackupPlan() - { - return isset($this->backup_plan); - } - - public function clearBackupPlan() - { - unset($this->backup_plan); - } - - /** - * Required. The BackupPlan resource object to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\BackupPlan $var - * @return $this - */ - public function setBackupPlan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\BackupPlan::class); - $this->backup_plan = $var; - - return $this; - } - - /** - * Required. The client-provided short name for the BackupPlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of BackupPlans in this location - * - * Generated from protobuf field string backup_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBackupPlanId() - { - return $this->backup_plan_id; - } - - /** - * Required. The client-provided short name for the BackupPlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of BackupPlans in this location - * - * Generated from protobuf field string backup_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBackupPlanId($var) - { - GPBUtil::checkString($var, True); - $this->backup_plan_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupRequest.php deleted file mode 100644 index ae48426cf6f9..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateBackupRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.gkebackup.v1.CreateBackupRequest - */ -class CreateBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The BackupPlan within which to create the Backup. - * Format: projects/*/locations/*/backupPlans/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The Backup resource to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 2; - */ - protected $backup = null; - /** - * The client-provided short name for the Backup resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Backups in this BackupPlan - * - * Generated from protobuf field string backup_id = 3; - */ - protected $backup_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The BackupPlan within which to create the Backup. - * Format: projects/*/locations/*/backupPlans/* - * @type \Google\Cloud\GkeBackup\V1\Backup $backup - * The Backup resource to create. - * @type string $backup_id - * The client-provided short name for the Backup resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Backups in this BackupPlan - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The BackupPlan within which to create the Backup. - * Format: projects/*/locations/*/backupPlans/* - * - * Generated 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 BackupPlan within which to create the Backup. - * Format: projects/*/locations/*/backupPlans/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 Backup resource to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 2; - * @return \Google\Cloud\GkeBackup\V1\Backup|null - */ - public function getBackup() - { - return $this->backup; - } - - public function hasBackup() - { - return isset($this->backup); - } - - public function clearBackup() - { - unset($this->backup); - } - - /** - * The Backup resource to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 2; - * @param \Google\Cloud\GkeBackup\V1\Backup $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Backup::class); - $this->backup = $var; - - return $this; - } - - /** - * The client-provided short name for the Backup resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Backups in this BackupPlan - * - * Generated from protobuf field string backup_id = 3; - * @return string - */ - public function getBackupId() - { - return $this->backup_id; - } - - /** - * The client-provided short name for the Backup resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Backups in this BackupPlan - * - * Generated from protobuf field string backup_id = 3; - * @param string $var - * @return $this - */ - public function setBackupId($var) - { - GPBUtil::checkString($var, True); - $this->backup_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestorePlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestorePlanRequest.php deleted file mode 100644 index 84967643b4bf..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestorePlanRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.gkebackup.v1.CreateRestorePlanRequest - */ -class CreateRestorePlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location within which to create the RestorePlan. - * Format: projects/*/locations/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The RestorePlan resource object to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $restore_plan = null; - /** - * Required. The client-provided short name for the RestorePlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of RestorePlans in this location - * - * Generated from protobuf field string restore_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $restore_plan_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location within which to create the RestorePlan. - * Format: projects/*/locations/* - * @type \Google\Cloud\GkeBackup\V1\RestorePlan $restore_plan - * Required. The RestorePlan resource object to create. - * @type string $restore_plan_id - * Required. The client-provided short name for the RestorePlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of RestorePlans in this location - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location within which to create the RestorePlan. - * 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 location within which to create the RestorePlan. - * 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. The RestorePlan resource object to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\RestorePlan|null - */ - public function getRestorePlan() - { - return $this->restore_plan; - } - - public function hasRestorePlan() - { - return isset($this->restore_plan); - } - - public function clearRestorePlan() - { - unset($this->restore_plan); - } - - /** - * Required. The RestorePlan resource object to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\RestorePlan $var - * @return $this - */ - public function setRestorePlan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestorePlan::class); - $this->restore_plan = $var; - - return $this; - } - - /** - * Required. The client-provided short name for the RestorePlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of RestorePlans in this location - * - * Generated from protobuf field string restore_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRestorePlanId() - { - return $this->restore_plan_id; - } - - /** - * Required. The client-provided short name for the RestorePlan resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of RestorePlans in this location - * - * Generated from protobuf field string restore_plan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRestorePlanId($var) - { - GPBUtil::checkString($var, True); - $this->restore_plan_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestoreRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestoreRequest.php deleted file mode 100644 index c35284ac7255..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/CreateRestoreRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.gkebackup.v1.CreateRestoreRequest - */ -class CreateRestoreRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The RestorePlan within which to create the Restore. - * Format: projects/*/locations/*/restorePlans/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The restore resource to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $restore = null; - /** - * Required. The client-provided short name for the Restore resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Restores in this RestorePlan. - * - * Generated from protobuf field string restore_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $restore_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The RestorePlan within which to create the Restore. - * Format: projects/*/locations/*/restorePlans/* - * @type \Google\Cloud\GkeBackup\V1\Restore $restore - * Required. The restore resource to create. - * @type string $restore_id - * Required. The client-provided short name for the Restore resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Restores in this RestorePlan. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The RestorePlan within which to create the Restore. - * Format: projects/*/locations/*/restorePlans/* - * - * Generated 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 RestorePlan within which to create the Restore. - * Format: projects/*/locations/*/restorePlans/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 restore resource to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\Restore|null - */ - public function getRestore() - { - return $this->restore; - } - - public function hasRestore() - { - return isset($this->restore); - } - - public function clearRestore() - { - unset($this->restore); - } - - /** - * Required. The restore resource to create. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\Restore $var - * @return $this - */ - public function setRestore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Restore::class); - $this->restore = $var; - - return $this; - } - - /** - * Required. The client-provided short name for the Restore resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Restores in this RestorePlan. - * - * Generated from protobuf field string restore_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRestoreId() - { - return $this->restore_id; - } - - /** - * Required. The client-provided short name for the Restore resource. - * This name must: - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Restores in this RestorePlan. - * - * Generated from protobuf field string restore_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRestoreId($var) - { - GPBUtil::checkString($var, True); - $this->restore_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupPlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupPlanRequest.php deleted file mode 100644 index 357a8913886c..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupPlanRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkebackup.v1.DeleteBackupPlanRequest - */ -class DeleteBackupPlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Fully qualified BackupPlan name. - * Format: projects/*/locations/*/backupPlans/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If provided, this value must match the current value of the - * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field or the request is - * rejected. - * - * Generated from protobuf field string etag = 2; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Fully qualified BackupPlan name. - * Format: projects/*/locations/*/backupPlans/* - * @type string $etag - * If provided, this value must match the current value of the - * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field or the request is - * rejected. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Fully qualified BackupPlan name. - * Format: projects/*/locations/*/backupPlans/* - * - * Generated 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 BackupPlan name. - * Format: projects/*/locations/*/backupPlans/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 provided, this value must match the current value of the - * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field or the request is - * rejected. - * - * Generated from protobuf field string etag = 2; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * If provided, this value must match the current value of the - * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field or the request is - * rejected. - * - * Generated from protobuf field string etag = 2; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupRequest.php deleted file mode 100644 index 8ba40c9f5493..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteBackupRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.gkebackup.v1.DeleteBackupRequest - */ -class DeleteBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the Backup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If provided, this value must match the current value of the - * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the request is - * rejected. - * - * Generated from protobuf field string etag = 2; - */ - protected $etag = ''; - /** - * If set to true, any VolumeBackups below this Backup will also be deleted. - * Otherwise, the request will only succeed if the Backup has no - * VolumeBackups. - * - * Generated from protobuf field bool force = 3; - */ - protected $force = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the Backup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/* - * @type string $etag - * If provided, this value must match the current value of the - * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the request is - * rejected. - * @type bool $force - * If set to true, any VolumeBackups below this Backup will also be deleted. - * Otherwise, the request will only succeed if the Backup has no - * VolumeBackups. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the Backup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/* - * - * Generated 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 Backup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 provided, this value must match the current value of the - * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the request is - * rejected. - * - * Generated from protobuf field string etag = 2; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * If provided, this value must match the current value of the - * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the request is - * rejected. - * - * Generated from protobuf field string etag = 2; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * If set to true, any VolumeBackups below this Backup will also be deleted. - * Otherwise, the request will only succeed if the Backup has no - * VolumeBackups. - * - * Generated from protobuf field bool force = 3; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * If set to true, any VolumeBackups below this Backup will also be deleted. - * Otherwise, the request will only succeed if the Backup has no - * VolumeBackups. - * - * Generated from protobuf field bool force = 3; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestorePlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestorePlanRequest.php deleted file mode 100644 index e32bdfc956b9..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestorePlanRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.gkebackup.v1.DeleteRestorePlanRequest - */ -class DeleteRestorePlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Fully qualified RestorePlan name. - * Format: projects/*/locations/*/restorePlans/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If provided, this value must match the current value of the - * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] field or the request is - * rejected. - * - * Generated from protobuf field string etag = 2; - */ - protected $etag = ''; - /** - * If set to true, any Restores below this RestorePlan will also be deleted. - * Otherwise, the request will only succeed if the RestorePlan has no - * Restores. - * - * Generated from protobuf field bool force = 3; - */ - protected $force = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Fully qualified RestorePlan name. - * Format: projects/*/locations/*/restorePlans/* - * @type string $etag - * If provided, this value must match the current value of the - * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] field or the request is - * rejected. - * @type bool $force - * If set to true, any Restores below this RestorePlan will also be deleted. - * Otherwise, the request will only succeed if the RestorePlan has no - * Restores. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Fully qualified RestorePlan name. - * Format: projects/*/locations/*/restorePlans/* - * - * Generated 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 RestorePlan name. - * Format: projects/*/locations/*/restorePlans/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 provided, this value must match the current value of the - * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] field or the request is - * rejected. - * - * Generated from protobuf field string etag = 2; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * If provided, this value must match the current value of the - * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] field or the request is - * rejected. - * - * Generated from protobuf field string etag = 2; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * If set to true, any Restores below this RestorePlan will also be deleted. - * Otherwise, the request will only succeed if the RestorePlan has no - * Restores. - * - * Generated from protobuf field bool force = 3; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * If set to true, any Restores below this RestorePlan will also be deleted. - * Otherwise, the request will only succeed if the RestorePlan has no - * Restores. - * - * Generated from protobuf field bool force = 3; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestoreRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestoreRequest.php deleted file mode 100644 index 94cdd6cfc825..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/DeleteRestoreRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.gkebackup.v1.DeleteRestoreRequest - */ -class DeleteRestoreRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full name of the Restore - * Format: projects/*/locations/*/restorePlans/*/restores/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If provided, this value must match the current value of the - * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or the request is - * rejected. - * - * Generated from protobuf field string etag = 2; - */ - protected $etag = ''; - /** - * If set to true, any VolumeRestores below this restore will also be deleted. - * Otherwise, the request will only succeed if the restore has no - * VolumeRestores. - * - * Generated from protobuf field bool force = 3; - */ - protected $force = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Full name of the Restore - * Format: projects/*/locations/*/restorePlans/*/restores/* - * @type string $etag - * If provided, this value must match the current value of the - * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or the request is - * rejected. - * @type bool $force - * If set to true, any VolumeRestores below this restore will also be deleted. - * Otherwise, the request will only succeed if the restore has no - * VolumeRestores. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full name of the Restore - * Format: projects/*/locations/*/restorePlans/*/restores/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Full name of the Restore - * Format: projects/*/locations/*/restorePlans/*/restores/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 provided, this value must match the current value of the - * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or the request is - * rejected. - * - * Generated from protobuf field string etag = 2; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * If provided, this value must match the current value of the - * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or the request is - * rejected. - * - * Generated from protobuf field string etag = 2; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * If set to true, any VolumeRestores below this restore will also be deleted. - * Otherwise, the request will only succeed if the restore has no - * VolumeRestores. - * - * Generated from protobuf field bool force = 3; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * If set to true, any VolumeRestores below this restore will also be deleted. - * Otherwise, the request will only succeed if the restore has no - * VolumeRestores. - * - * Generated from protobuf field bool force = 3; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/EncryptionKey.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/EncryptionKey.php deleted file mode 100644 index ffbe421a5e81..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/EncryptionKey.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.gkebackup.v1.EncryptionKey - */ -class EncryptionKey extends \Google\Protobuf\Internal\Message -{ - /** - * Google Cloud KMS encryption key. Format: - * projects/*/locations/*/keyRings/*/cryptoKeys/* - * - * Generated from protobuf field string gcp_kms_encryption_key = 1 [(.google.api.resource_reference) = { - */ - protected $gcp_kms_encryption_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcp_kms_encryption_key - * Google Cloud KMS encryption key. Format: - * projects/*/locations/*/keyRings/*/cryptoKeys/* - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Google Cloud KMS encryption key. Format: - * projects/*/locations/*/keyRings/*/cryptoKeys/* - * - * Generated from protobuf field string gcp_kms_encryption_key = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getGcpKmsEncryptionKey() - { - return $this->gcp_kms_encryption_key; - } - - /** - * Google Cloud KMS encryption key. Format: - * projects/*/locations/*/keyRings/*/cryptoKeys/* - * - * Generated from protobuf field string gcp_kms_encryption_key = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGcpKmsEncryptionKey($var) - { - GPBUtil::checkString($var, True); - $this->gcp_kms_encryption_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupPlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupPlanRequest.php deleted file mode 100644 index 4f060fc131e1..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupPlanRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gkebackup.v1.GetBackupPlanRequest - */ -class GetBackupPlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Fully qualified BackupPlan name. - * Format: projects/*/locations/*/backupPlans/* - * - * 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. Fully qualified BackupPlan name. - * Format: projects/*/locations/*/backupPlans/* - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Fully qualified BackupPlan name. - * Format: projects/*/locations/*/backupPlans/* - * - * Generated 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 BackupPlan name. - * Format: projects/*/locations/*/backupPlans/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupRequest.php deleted file mode 100644 index 37cafe87d579..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetBackupRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gkebackup.v1.GetBackupRequest - */ -class GetBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full name of the Backup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/* - * - * 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. Full name of the Backup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/* - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full name of the Backup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Full name of the Backup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestorePlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestorePlanRequest.php deleted file mode 100644 index 865b2ed34426..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestorePlanRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gkebackup.v1.GetRestorePlanRequest - */ -class GetRestorePlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Fully qualified RestorePlan name. - * Format: projects/*/locations/*/restorePlans/* - * - * 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. Fully qualified RestorePlan name. - * Format: projects/*/locations/*/restorePlans/* - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Fully qualified RestorePlan name. - * Format: projects/*/locations/*/restorePlans/* - * - * Generated 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 RestorePlan name. - * Format: projects/*/locations/*/restorePlans/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestoreRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestoreRequest.php deleted file mode 100644 index a112ffc96dbe..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetRestoreRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gkebackup.v1.GetRestoreRequest - */ -class GetRestoreRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the restore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/* - * - * 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 restore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/* - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the restore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/* - * - * Generated 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 restore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeBackupRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeBackupRequest.php deleted file mode 100644 index 4ad8baf8f3b3..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeBackupRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gkebackup.v1.GetVolumeBackupRequest - */ -class GetVolumeBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full name of the VolumeBackup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/* - * - * 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. Full name of the VolumeBackup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/* - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full name of the VolumeBackup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Full name of the VolumeBackup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeRestoreRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeRestoreRequest.php deleted file mode 100644 index 338a045e5055..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/GetVolumeRestoreRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gkebackup.v1.GetVolumeRestoreRequest - */ -class GetVolumeRestoreRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full name of the VolumeRestore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/* - * - * 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. Full name of the VolumeRestore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/* - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full name of the VolumeRestore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Full name of the VolumeRestore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansRequest.php deleted file mode 100644 index bc47dae8f53b..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.gkebackup.v1.ListBackupPlansRequest - */ -class ListBackupPlansRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location that contains the BackupPlans to list. - * Format: projects/*/locations/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.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 value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location that contains the BackupPlans to list. - * Format: projects/*/locations/* - * @type int $page_size - * The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the page token. - * @type string $filter - * Field match expression used to filter the results. - * @type string $order_by - * Field by which to sort the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location that contains the BackupPlans to list. - * 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 location that contains the BackupPlans to list. - * 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; - } - - /** - * The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.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 target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.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 value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` 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; - } - - /** - * The value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` 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; - } - - /** - * Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Field match expression used to filter the 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 by which to sort the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field by which to sort 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansResponse.php deleted file mode 100644 index 951c36e1be05..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupPlansResponse.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.gkebackup.v1.ListBackupPlansResponse - */ -class ListBackupPlansResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of BackupPlans matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.BackupPlan backup_plans = 1; - */ - private $backup_plans; - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListBackupPlansRequest.page_token] in a subsequent - * `ListBackupPlans` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * 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\GkeBackup\V1\BackupPlan>|\Google\Protobuf\Internal\RepeatedField $backup_plans - * The list of BackupPlans matching the given criteria. - * @type string $next_page_token - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListBackupPlansRequest.page_token] in a subsequent - * `ListBackupPlans` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * The list of BackupPlans matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.BackupPlan backup_plans = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackupPlans() - { - return $this->backup_plans; - } - - /** - * The list of BackupPlans matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.BackupPlan backup_plans = 1; - * @param array<\Google\Cloud\GkeBackup\V1\BackupPlan>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackupPlans($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\BackupPlan::class); - $this->backup_plans = $arr; - - return $this; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListBackupPlansRequest.page_token] in a subsequent - * `ListBackupPlans` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListBackupPlansRequest.page_token] in a subsequent - * `ListBackupPlans` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsRequest.php deleted file mode 100644 index 3716d6137891..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.gkebackup.v1.ListBackupsRequest - */ -class ListBackupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The BackupPlan that contains the Backups to list. - * Format: projects/*/locations/*/backupPlans/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.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 value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] - * received from a previous `ListBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackups` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The BackupPlan that contains the Backups to list. - * Format: projects/*/locations/*/backupPlans/* - * @type int $page_size - * The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] - * received from a previous `ListBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackups` must match the call that provided the page token. - * @type string $filter - * Field match expression used to filter the results. - * @type string $order_by - * Field by which to sort the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The BackupPlan that contains the Backups to list. - * Format: projects/*/locations/*/backupPlans/* - * - * Generated 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 BackupPlan that contains the Backups to list. - * Format: projects/*/locations/*/backupPlans/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.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 target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.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 value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] - * received from a previous `ListBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackups` 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; - } - - /** - * The value of - * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] - * received from a previous `ListBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackups` 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; - } - - /** - * Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Field match expression used to filter the 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 by which to sort the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field by which to sort 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsResponse.php deleted file mode 100644 index 4ec0191e89e9..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListBackupsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkebackup.v1.ListBackupsResponse - */ -class ListBackupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Backups matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Backup backups = 1; - */ - private $backups; - /** - * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListBackupsRequest.page_token] in - * a subsequent `ListBackups` call to retrieve the next page of results. If - * this field is omitted or empty, then there are no more results to 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\GkeBackup\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $backups - * The list of Backups matching the given criteria. - * @type string $next_page_token - * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListBackupsRequest.page_token] in - * a subsequent `ListBackups` call to retrieve the next page of results. If - * this field is omitted or empty, then there are no more results to return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * The list of Backups matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Backup backups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackups() - { - return $this->backups; - } - - /** - * The list of Backups matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Backup backups = 1; - * @param array<\Google\Cloud\GkeBackup\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\Backup::class); - $this->backups = $arr; - - return $this; - } - - /** - * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListBackupsRequest.page_token] in - * a subsequent `ListBackups` call to retrieve the next page of results. If - * this field is omitted or empty, then there are no more results to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListBackupsRequest.page_token] in - * a subsequent `ListBackups` call to retrieve the next page of results. If - * this field is omitted or empty, then there are no more results to 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansRequest.php deleted file mode 100644 index b7a9a260d0b5..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.gkebackup.v1.ListRestorePlansRequest - */ -class ListRestorePlansRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location that contains the RestorePlans to list. - * Format: projects/*/locations/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.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 value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] - * received from a previous `ListRestorePlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListRestorePlans` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location that contains the RestorePlans to list. - * Format: projects/*/locations/* - * @type int $page_size - * The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] - * received from a previous `ListRestorePlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListRestorePlans` must match the call that provided the page token. - * @type string $filter - * Field match expression used to filter the results. - * @type string $order_by - * Field by which to sort the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location that contains the RestorePlans to list. - * 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 location that contains the RestorePlans to list. - * 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; - } - - /** - * The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.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 target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.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 value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] - * received from a previous `ListRestorePlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListRestorePlans` 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; - } - - /** - * The value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] - * received from a previous `ListRestorePlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListRestorePlans` 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; - } - - /** - * Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Field match expression used to filter the 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 by which to sort the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field by which to sort 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansResponse.php deleted file mode 100644 index 49e9e0e72d2d..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestorePlansResponse.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.gkebackup.v1.ListRestorePlansResponse - */ -class ListRestorePlansResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of RestorePlans matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestorePlan restore_plans = 1; - */ - private $restore_plans; - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListRestorePlansRequest.page_token] in a subsequent - * `ListRestorePlans` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * 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\GkeBackup\V1\RestorePlan>|\Google\Protobuf\Internal\RepeatedField $restore_plans - * The list of RestorePlans matching the given criteria. - * @type string $next_page_token - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListRestorePlansRequest.page_token] in a subsequent - * `ListRestorePlans` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * The list of RestorePlans matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestorePlan restore_plans = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRestorePlans() - { - return $this->restore_plans; - } - - /** - * The list of RestorePlans matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestorePlan restore_plans = 1; - * @param array<\Google\Cloud\GkeBackup\V1\RestorePlan>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRestorePlans($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestorePlan::class); - $this->restore_plans = $arr; - - return $this; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListRestorePlansRequest.page_token] in a subsequent - * `ListRestorePlans` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListRestorePlansRequest.page_token] in a subsequent - * `ListRestorePlans` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresRequest.php deleted file mode 100644 index 9056e4b6fe56..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.gkebackup.v1.ListRestoresRequest - */ -class ListRestoresRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The RestorePlan that contains the Restores to list. - * Format: projects/*/locations/*/restorePlans/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.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 value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] - * received from a previous `ListRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to `ListRestores` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The RestorePlan that contains the Restores to list. - * Format: projects/*/locations/*/restorePlans/* - * @type int $page_size - * The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] - * received from a previous `ListRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to `ListRestores` - * must match the call that provided the page token. - * @type string $filter - * Field match expression used to filter the results. - * @type string $order_by - * Field by which to sort the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The RestorePlan that contains the Restores to list. - * Format: projects/*/locations/*/restorePlans/* - * - * Generated 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 RestorePlan that contains the Restores to list. - * Format: projects/*/locations/*/restorePlans/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.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 target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.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 value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] - * received from a previous `ListRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to `ListRestores` - * 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; - } - - /** - * The value of - * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] - * received from a previous `ListRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to `ListRestores` - * 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; - } - - /** - * Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Field match expression used to filter the 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 by which to sort the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field by which to sort 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresResponse.php deleted file mode 100644 index d549a212fd85..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListRestoresResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.gkebackup.v1.ListRestoresResponse - */ -class ListRestoresResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Restores matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Restore restores = 1; - */ - private $restores; - /** - * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListRestoresRequest.page_token] - * in a subsequent `ListRestores` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * 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\GkeBackup\V1\Restore>|\Google\Protobuf\Internal\RepeatedField $restores - * The list of Restores matching the given criteria. - * @type string $next_page_token - * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListRestoresRequest.page_token] - * in a subsequent `ListRestores` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * The list of Restores matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Restore restores = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRestores() - { - return $this->restores; - } - - /** - * The list of Restores matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.Restore restores = 1; - * @param array<\Google\Cloud\GkeBackup\V1\Restore>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRestores($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\Restore::class); - $this->restores = $arr; - - return $this; - } - - /** - * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListRestoresRequest.page_token] - * in a subsequent `ListRestores` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListRestoresRequest.page_token] - * in a subsequent `ListRestores` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsRequest.php deleted file mode 100644 index b01cf4919603..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.gkebackup.v1.ListVolumeBackupsRequest - */ -class ListVolumeBackupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Backup that contains the VolumeBackups to list. - * Format: projects/*/locations/*/backupPlans/*/backups/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.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 value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] - * received from a previous `ListVolumeBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeBackups` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Backup that contains the VolumeBackups to list. - * Format: projects/*/locations/*/backupPlans/*/backups/* - * @type int $page_size - * The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] - * received from a previous `ListVolumeBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeBackups` must match the call that provided the page token. - * @type string $filter - * Field match expression used to filter the results. - * @type string $order_by - * Field by which to sort the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Backup that contains the VolumeBackups to list. - * Format: projects/*/locations/*/backupPlans/*/backups/* - * - * Generated 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 Backup that contains the VolumeBackups to list. - * Format: projects/*/locations/*/backupPlans/*/backups/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.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 target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.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 value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] - * received from a previous `ListVolumeBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeBackups` 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; - } - - /** - * The value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] - * received from a previous `ListVolumeBackups` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeBackups` 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; - } - - /** - * Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Field match expression used to filter the 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 by which to sort the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field by which to sort 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsResponse.php deleted file mode 100644 index 77f443d70e93..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeBackupsResponse.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.gkebackup.v1.ListVolumeBackupsResponse - */ -class ListVolumeBackupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of VolumeBackups matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeBackup volume_backups = 1; - */ - private $volume_backups; - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeBackupsRequest.page_token] in a subsequent - * `ListVolumeBackups` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * 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\GkeBackup\V1\VolumeBackup>|\Google\Protobuf\Internal\RepeatedField $volume_backups - * The list of VolumeBackups matching the given criteria. - * @type string $next_page_token - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeBackupsRequest.page_token] in a subsequent - * `ListVolumeBackups` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * The list of VolumeBackups matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeBackup volume_backups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumeBackups() - { - return $this->volume_backups; - } - - /** - * The list of VolumeBackups matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeBackup volume_backups = 1; - * @param array<\Google\Cloud\GkeBackup\V1\VolumeBackup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumeBackups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\VolumeBackup::class); - $this->volume_backups = $arr; - - return $this; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeBackupsRequest.page_token] in a subsequent - * `ListVolumeBackups` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeBackupsRequest.page_token] in a subsequent - * `ListVolumeBackups` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresRequest.php deleted file mode 100644 index bf3861a362e9..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.gkebackup.v1.ListVolumeRestoresRequest - */ -class ListVolumeRestoresRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Restore that contains the VolumeRestores to list. - * Format: projects/*/locations/*/restorePlans/*/restores/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.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 value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] - * received from a previous `ListVolumeRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeRestores` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field by which to sort the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Restore that contains the VolumeRestores to list. - * Format: projects/*/locations/*/restorePlans/*/restores/* - * @type int $page_size - * The target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] - * received from a previous `ListVolumeRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeRestores` must match the call that provided the page token. - * @type string $filter - * Field match expression used to filter the results. - * @type string $order_by - * Field by which to sort the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Restore that contains the VolumeRestores to list. - * Format: projects/*/locations/*/restorePlans/*/restores/* - * - * Generated 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 Restore that contains the VolumeRestores to list. - * Format: projects/*/locations/*/restorePlans/*/restores/* - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.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 target number of results to return in a single response. - * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should - * only rely on the response's - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.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 value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] - * received from a previous `ListVolumeRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeRestores` 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; - } - - /** - * The value of - * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] - * received from a previous `ListVolumeRestores` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListVolumeRestores` 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; - } - - /** - * Field match expression used to filter the results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Field match expression used to filter the 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 by which to sort the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field by which to sort 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresResponse.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresResponse.php deleted file mode 100644 index 6338ff4bc361..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/ListVolumeRestoresResponse.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.gkebackup.v1.ListVolumeRestoresResponse - */ -class ListVolumeRestoresResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of VolumeRestores matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeRestore volume_restores = 1; - */ - private $volume_restores; - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeRestoresRequest.page_token] in a subsequent - * `ListVolumeRestores` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * 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\GkeBackup\V1\VolumeRestore>|\Google\Protobuf\Internal\RepeatedField $volume_restores - * The list of VolumeRestores matching the given criteria. - * @type string $next_page_token - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeRestoresRequest.page_token] in a subsequent - * `ListVolumeRestores` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * The list of VolumeRestores matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeRestore volume_restores = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumeRestores() - { - return $this->volume_restores; - } - - /** - * The list of VolumeRestores matching the given criteria. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeRestore volume_restores = 1; - * @param array<\Google\Cloud\GkeBackup\V1\VolumeRestore>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumeRestores($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\VolumeRestore::class); - $this->volume_restores = $arr; - - return $this; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeRestoresRequest.page_token] in a subsequent - * `ListVolumeRestores` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token which may be sent as - * [page_token][google.cloud.gkebackup.v1.ListVolumeRestoresRequest.page_token] in a subsequent - * `ListVolumeRestores` call to retrieve the next page of results. - * If this field is omitted or empty, then there are no more results to - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedName.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedName.php deleted file mode 100644 index 3b3e1b70b41a..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedName.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.gkebackup.v1.NamespacedName - */ -class NamespacedName extends \Google\Protobuf\Internal\Message -{ - /** - * The Namespace of the Kubernetes resource. - * - * Generated from protobuf field string namespace = 1; - */ - protected $namespace = ''; - /** - * The name of the Kubernetes resource. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $namespace - * The Namespace of the Kubernetes resource. - * @type string $name - * The name of the Kubernetes resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The Namespace of the Kubernetes resource. - * - * Generated from protobuf field string namespace = 1; - * @return string - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * The Namespace of the Kubernetes resource. - * - * Generated from protobuf field string namespace = 1; - * @param string $var - * @return $this - */ - public function setNamespace($var) - { - GPBUtil::checkString($var, True); - $this->namespace = $var; - - return $this; - } - - /** - * The name of the Kubernetes resource. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the Kubernetes resource. - * - * 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; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedNames.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedNames.php deleted file mode 100644 index 89a860984ac8..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/NamespacedNames.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkebackup.v1.NamespacedNames - */ -class NamespacedNames extends \Google\Protobuf\Internal\Message -{ - /** - * A list of namespaced Kubernetes resources. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.NamespacedName namespaced_names = 1; - */ - private $namespaced_names; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeBackup\V1\NamespacedName>|\Google\Protobuf\Internal\RepeatedField $namespaced_names - * A list of namespaced Kubernetes resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * A list of namespaced Kubernetes resources. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.NamespacedName namespaced_names = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNamespacedNames() - { - return $this->namespaced_names; - } - - /** - * A list of namespaced Kubernetes resources. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.NamespacedName namespaced_names = 1; - * @param array<\Google\Cloud\GkeBackup\V1\NamespacedName>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNamespacedNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\NamespacedName::class); - $this->namespaced_names = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Namespaces.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Namespaces.php deleted file mode 100644 index 641c9e3e1187..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Namespaces.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.gkebackup.v1.Namespaces - */ -class Namespaces extends \Google\Protobuf\Internal\Message -{ - /** - * A list of Kubernetes Namespaces - * - * Generated from protobuf field repeated string namespaces = 1; - */ - private $namespaces; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $namespaces - * A list of Kubernetes Namespaces - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * A list of Kubernetes Namespaces - * - * Generated from protobuf field repeated string namespaces = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNamespaces() - { - return $this->namespaces; - } - - /** - * A list of Kubernetes Namespaces - * - * Generated from protobuf field repeated string namespaces = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNamespaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespaces = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/OperationMetadata.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/OperationMetadata.php deleted file mode 100644 index c002b5b2034c..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/OperationMetadata.php +++ /dev/null @@ -1,303 +0,0 @@ -google.cloud.gkebackup.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\Gkebackup\V1\Gkebackup::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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore.php deleted file mode 100644 index f2ace637bfa5..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore.php +++ /dev/null @@ -1,729 +0,0 @@ -google.cloud.gkebackup.v1.Restore - */ -class Restore extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full name of the Restore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/* - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The timestamp when this Restore 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 this Restore resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User specified descriptive string for this Restore. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Required. Immutable. A reference to the [Backup][google.cloud.gkebackup.v1.Backup] used as the source from which this Restore - * will restore. Note that this Backup must be a sub-resource of the - * RestorePlan's [backup_plan][google.cloud.gkebackup.v1.RestorePlan.backup_plan]. - * Format: projects/*/locations/*/backupPlans/*/backups/*. - * - * Generated from protobuf field string backup = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $backup = ''; - /** - * Output only. The target cluster into which this Restore will restore data. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * Inherited from parent RestorePlan's [cluster][google.cloud.gkebackup.v1.RestorePlan.cluster] value. - * - * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $cluster = ''; - /** - * Output only. Configuration of the Restore. Inherited from parent RestorePlan's - * [restore_config][google.cloud.gkebackup.v1.RestorePlan.restore_config]. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $restore_config = null; - /** - * A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 9; - */ - private $labels; - /** - * Output only. The current state of the Restore. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Human-readable description of why the Restore is in its current state. - * - * Generated from protobuf field string state_reason = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_reason = ''; - /** - * Output only. Timestamp of when the restore operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $complete_time = null; - /** - * Output only. Number of resources restored during the restore execution. - * - * Generated from protobuf field int32 resources_restored_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resources_restored_count = 0; - /** - * Output only. Number of resources excluded during the restore execution. - * - * Generated from protobuf field int32 resources_excluded_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resources_excluded_count = 0; - /** - * Output only. Number of resources that failed to be restored during the restore - * execution. - * - * Generated from protobuf field int32 resources_failed_count = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resources_failed_count = 0; - /** - * Output only. Number of volumes restored during the restore execution. - * - * Generated from protobuf field int32 volumes_restored_count = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $volumes_restored_count = 0; - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestore`, - * and systems are expected to put that etag in the request to - * `UpdateRestore` or `DeleteRestore` to ensure that their change will be - * applied to the same version of the resource. - * - * Generated from protobuf field string etag = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The full name of the Restore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/* - * @type string $uid - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when this Restore resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when this Restore resource was last - * updated. - * @type string $description - * User specified descriptive string for this Restore. - * @type string $backup - * Required. Immutable. A reference to the [Backup][google.cloud.gkebackup.v1.Backup] used as the source from which this Restore - * will restore. Note that this Backup must be a sub-resource of the - * RestorePlan's [backup_plan][google.cloud.gkebackup.v1.RestorePlan.backup_plan]. - * Format: projects/*/locations/*/backupPlans/*/backups/*. - * @type string $cluster - * Output only. The target cluster into which this Restore will restore data. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * Inherited from parent RestorePlan's [cluster][google.cloud.gkebackup.v1.RestorePlan.cluster] value. - * @type \Google\Cloud\GkeBackup\V1\RestoreConfig $restore_config - * Output only. Configuration of the Restore. Inherited from parent RestorePlan's - * [restore_config][google.cloud.gkebackup.v1.RestorePlan.restore_config]. - * @type array|\Google\Protobuf\Internal\MapField $labels - * A set of custom labels supplied by user. - * @type int $state - * Output only. The current state of the Restore. - * @type string $state_reason - * Output only. Human-readable description of why the Restore is in its current state. - * @type \Google\Protobuf\Timestamp $complete_time - * Output only. Timestamp of when the restore operation completed. - * @type int $resources_restored_count - * Output only. Number of resources restored during the restore execution. - * @type int $resources_excluded_count - * Output only. Number of resources excluded during the restore execution. - * @type int $resources_failed_count - * Output only. Number of resources that failed to be restored during the restore - * execution. - * @type int $volumes_restored_count - * Output only. Number of volumes restored during the restore execution. - * @type string $etag - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestore`, - * and systems are expected to put that etag in the request to - * `UpdateRestore` or `DeleteRestore` to ensure that their change will be - * applied to the same version of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full name of the Restore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/* - * - * 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 Restore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/* - * - * 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. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.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 timestamp when this Restore 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 this Restore 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 this Restore resource 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 this Restore resource 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; - } - - /** - * User specified descriptive string for this Restore. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User specified descriptive string for this Restore. - * - * 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. Immutable. A reference to the [Backup][google.cloud.gkebackup.v1.Backup] used as the source from which this Restore - * will restore. Note that this Backup must be a sub-resource of the - * RestorePlan's [backup_plan][google.cloud.gkebackup.v1.RestorePlan.backup_plan]. - * Format: projects/*/locations/*/backupPlans/*/backups/*. - * - * Generated from protobuf field string backup = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * Required. Immutable. A reference to the [Backup][google.cloud.gkebackup.v1.Backup] used as the source from which this Restore - * will restore. Note that this Backup must be a sub-resource of the - * RestorePlan's [backup_plan][google.cloud.gkebackup.v1.RestorePlan.backup_plan]. - * Format: projects/*/locations/*/backupPlans/*/backups/*. - * - * Generated from protobuf field string backup = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->backup = $var; - - return $this; - } - - /** - * Output only. The target cluster into which this Restore will restore data. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * Inherited from parent RestorePlan's [cluster][google.cloud.gkebackup.v1.RestorePlan.cluster] value. - * - * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * Output only. The target cluster into which this Restore will restore data. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * Inherited from parent RestorePlan's [cluster][google.cloud.gkebackup.v1.RestorePlan.cluster] value. - * - * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Output only. Configuration of the Restore. Inherited from parent RestorePlan's - * [restore_config][google.cloud.gkebackup.v1.RestorePlan.restore_config]. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeBackup\V1\RestoreConfig|null - */ - public function getRestoreConfig() - { - return $this->restore_config; - } - - public function hasRestoreConfig() - { - return isset($this->restore_config); - } - - public function clearRestoreConfig() - { - unset($this->restore_config); - } - - /** - * Output only. Configuration of the Restore. Inherited from parent RestorePlan's - * [restore_config][google.cloud.gkebackup.v1.RestorePlan.restore_config]. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeBackup\V1\RestoreConfig $var - * @return $this - */ - public function setRestoreConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig::class); - $this->restore_config = $var; - - return $this; - } - - /** - * A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 9; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * A set of custom labels supplied by user. - * - * 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 current state of the Restore. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the Restore. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\Restore\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Human-readable description of why the Restore is in its current state. - * - * Generated from protobuf field string state_reason = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateReason() - { - return $this->state_reason; - } - - /** - * Output only. Human-readable description of why the Restore is in its current state. - * - * Generated from protobuf field string state_reason = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateReason($var) - { - GPBUtil::checkString($var, True); - $this->state_reason = $var; - - return $this; - } - - /** - * Output only. Timestamp of when the restore operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 12 [(.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. Timestamp of when the restore operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 12 [(.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. Number of resources restored during the restore execution. - * - * Generated from protobuf field int32 resources_restored_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getResourcesRestoredCount() - { - return $this->resources_restored_count; - } - - /** - * Output only. Number of resources restored during the restore execution. - * - * Generated from protobuf field int32 resources_restored_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setResourcesRestoredCount($var) - { - GPBUtil::checkInt32($var); - $this->resources_restored_count = $var; - - return $this; - } - - /** - * Output only. Number of resources excluded during the restore execution. - * - * Generated from protobuf field int32 resources_excluded_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getResourcesExcludedCount() - { - return $this->resources_excluded_count; - } - - /** - * Output only. Number of resources excluded during the restore execution. - * - * Generated from protobuf field int32 resources_excluded_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setResourcesExcludedCount($var) - { - GPBUtil::checkInt32($var); - $this->resources_excluded_count = $var; - - return $this; - } - - /** - * Output only. Number of resources that failed to be restored during the restore - * execution. - * - * Generated from protobuf field int32 resources_failed_count = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getResourcesFailedCount() - { - return $this->resources_failed_count; - } - - /** - * Output only. Number of resources that failed to be restored during the restore - * execution. - * - * Generated from protobuf field int32 resources_failed_count = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setResourcesFailedCount($var) - { - GPBUtil::checkInt32($var); - $this->resources_failed_count = $var; - - return $this; - } - - /** - * Output only. Number of volumes restored during the restore execution. - * - * Generated from protobuf field int32 volumes_restored_count = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVolumesRestoredCount() - { - return $this->volumes_restored_count; - } - - /** - * Output only. Number of volumes restored during the restore execution. - * - * Generated from protobuf field int32 volumes_restored_count = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVolumesRestoredCount($var) - { - GPBUtil::checkInt32($var); - $this->volumes_restored_count = $var; - - return $this; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestore`, - * and systems are expected to put that etag in the request to - * `UpdateRestore` or `DeleteRestore` to ensure that their change will be - * applied to the same version of the resource. - * - * Generated from protobuf field string etag = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestore`, - * and systems are expected to put that etag in the request to - * `UpdateRestore` or `DeleteRestore` to ensure that their change will be - * applied to the same version of the resource. - * - * Generated from protobuf field string etag = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore/State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore/State.php deleted file mode 100644 index 3c28235bc7c4..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore/State.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.gkebackup.v1.Restore.State - */ -class State -{ - /** - * The Restore resource is in the process of being created. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The Restore resource has been created and the associated RestoreJob - * Kubernetes resource has been injected into target cluster. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The gkebackup agent in the cluster has begun executing the restore - * operation. - * - * Generated from protobuf enum IN_PROGRESS = 2; - */ - const IN_PROGRESS = 2; - /** - * The restore operation has completed successfully. Restored workloads may - * not yet be operational. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * The restore operation has failed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * This Restore resource is in the process of being deleted. - * - * Generated from protobuf enum DELETING = 5; - */ - const DELETING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::IN_PROGRESS => 'IN_PROGRESS', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - 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\GkeBackup\V1\Restore_State::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig.php deleted file mode 100644 index 46cc7d0c8404..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig.php +++ /dev/null @@ -1,382 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig - */ -class RestoreConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the mechanism to be used to restore volume data. - * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as - * NO_VOLUME_DATA_RESTORATION). - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1; - */ - protected $volume_data_restore_policy = 0; - /** - * Defines the behavior for handling the situation where cluster-scoped - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if - * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] is not empty. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2; - */ - protected $cluster_resource_conflict_policy = 0; - /** - * Defines the behavior for handling the situation where sets of namespaced - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3; - */ - protected $namespaced_resource_restore_mode = 0; - /** - * Identifies the cluster-scoped resources to restore from the Backup. - * Not specifying it means NO cluster resource will be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4; - */ - protected $cluster_resource_restore_scope = null; - /** - * A list of transformation rules to be applied against Kubernetes resources - * as they are selected for restoration from a Backup. Rules are executed in - * order defined - this order matters, as changes made by a rule may impact - * the filtering logic of subsequent rules. An empty list means no - * substitution will occur. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8; - */ - private $substitution_rules; - protected $namespaced_resource_restore_scope; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $volume_data_restore_policy - * Specifies the mechanism to be used to restore volume data. - * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as - * NO_VOLUME_DATA_RESTORATION). - * @type int $cluster_resource_conflict_policy - * Defines the behavior for handling the situation where cluster-scoped - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if - * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] is not empty. - * @type int $namespaced_resource_restore_mode - * Defines the behavior for handling the situation where sets of namespaced - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. - * @type \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceRestoreScope $cluster_resource_restore_scope - * Identifies the cluster-scoped resources to restore from the Backup. - * Not specifying it means NO cluster resource will be restored. - * @type bool $all_namespaces - * Restore all namespaced resources in the Backup if set to "True". - * Specifying this field to "False" is an error. - * @type \Google\Cloud\GkeBackup\V1\Namespaces $selected_namespaces - * A list of selected Namespaces to restore from the Backup. The listed - * Namespaces and all resources contained in them will be restored. - * @type \Google\Cloud\GkeBackup\V1\NamespacedNames $selected_applications - * A list of selected ProtectedApplications to restore. The listed - * ProtectedApplications and all the resources to which they refer will be - * restored. - * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\SubstitutionRule>|\Google\Protobuf\Internal\RepeatedField $substitution_rules - * A list of transformation rules to be applied against Kubernetes resources - * as they are selected for restoration from a Backup. Rules are executed in - * order defined - this order matters, as changes made by a rule may impact - * the filtering logic of subsequent rules. An empty list means no - * substitution will occur. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the mechanism to be used to restore volume data. - * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as - * NO_VOLUME_DATA_RESTORATION). - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1; - * @return int - */ - public function getVolumeDataRestorePolicy() - { - return $this->volume_data_restore_policy; - } - - /** - * Specifies the mechanism to be used to restore volume data. - * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as - * NO_VOLUME_DATA_RESTORATION). - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1; - * @param int $var - * @return $this - */ - public function setVolumeDataRestorePolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\VolumeDataRestorePolicy::class); - $this->volume_data_restore_policy = $var; - - return $this; - } - - /** - * Defines the behavior for handling the situation where cluster-scoped - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if - * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] is not empty. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2; - * @return int - */ - public function getClusterResourceConflictPolicy() - { - return $this->cluster_resource_conflict_policy; - } - - /** - * Defines the behavior for handling the situation where cluster-scoped - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if - * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] is not empty. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2; - * @param int $var - * @return $this - */ - public function setClusterResourceConflictPolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceConflictPolicy::class); - $this->cluster_resource_conflict_policy = $var; - - return $this; - } - - /** - * Defines the behavior for handling the situation where sets of namespaced - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3; - * @return int - */ - public function getNamespacedResourceRestoreMode() - { - return $this->namespaced_resource_restore_mode; - } - - /** - * Defines the behavior for handling the situation where sets of namespaced - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3; - * @param int $var - * @return $this - */ - public function setNamespacedResourceRestoreMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\NamespacedResourceRestoreMode::class); - $this->namespaced_resource_restore_mode = $var; - - return $this; - } - - /** - * Identifies the cluster-scoped resources to restore from the Backup. - * Not specifying it means NO cluster resource will be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4; - * @return \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceRestoreScope|null - */ - public function getClusterResourceRestoreScope() - { - return $this->cluster_resource_restore_scope; - } - - public function hasClusterResourceRestoreScope() - { - return isset($this->cluster_resource_restore_scope); - } - - public function clearClusterResourceRestoreScope() - { - unset($this->cluster_resource_restore_scope); - } - - /** - * Identifies the cluster-scoped resources to restore from the Backup. - * Not specifying it means NO cluster resource will be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4; - * @param \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceRestoreScope $var - * @return $this - */ - public function setClusterResourceRestoreScope($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceRestoreScope::class); - $this->cluster_resource_restore_scope = $var; - - return $this; - } - - /** - * Restore all namespaced resources in the Backup if set to "True". - * Specifying this field to "False" is an error. - * - * Generated from protobuf field bool all_namespaces = 5; - * @return bool - */ - public function getAllNamespaces() - { - return $this->readOneof(5); - } - - public function hasAllNamespaces() - { - return $this->hasOneof(5); - } - - /** - * Restore all namespaced resources in the Backup if set to "True". - * Specifying this field to "False" is an error. - * - * Generated from protobuf field bool all_namespaces = 5; - * @param bool $var - * @return $this - */ - public function setAllNamespaces($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * A list of selected Namespaces to restore from the Backup. The listed - * Namespaces and all resources contained in them will be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6; - * @return \Google\Cloud\GkeBackup\V1\Namespaces|null - */ - public function getSelectedNamespaces() - { - return $this->readOneof(6); - } - - public function hasSelectedNamespaces() - { - return $this->hasOneof(6); - } - - /** - * A list of selected Namespaces to restore from the Backup. The listed - * Namespaces and all resources contained in them will be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Namespaces selected_namespaces = 6; - * @param \Google\Cloud\GkeBackup\V1\Namespaces $var - * @return $this - */ - public function setSelectedNamespaces($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Namespaces::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * A list of selected ProtectedApplications to restore. The listed - * ProtectedApplications and all the resources to which they refer will be - * restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7; - * @return \Google\Cloud\GkeBackup\V1\NamespacedNames|null - */ - public function getSelectedApplications() - { - return $this->readOneof(7); - } - - public function hasSelectedApplications() - { - return $this->hasOneof(7); - } - - /** - * A list of selected ProtectedApplications to restore. The listed - * ProtectedApplications and all the resources to which they refer will be - * restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_applications = 7; - * @param \Google\Cloud\GkeBackup\V1\NamespacedNames $var - * @return $this - */ - public function setSelectedApplications($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedNames::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * A list of transformation rules to be applied against Kubernetes resources - * as they are selected for restoration from a Backup. Rules are executed in - * order defined - this order matters, as changes made by a rule may impact - * the filtering logic of subsequent rules. An empty list means no - * substitution will occur. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubstitutionRules() - { - return $this->substitution_rules; - } - - /** - * A list of transformation rules to be applied against Kubernetes resources - * as they are selected for restoration from a Backup. Rules are executed in - * order defined - this order matters, as changes made by a rule may impact - * the filtering logic of subsequent rules. An empty list means no - * substitution will occur. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8; - * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\SubstitutionRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubstitutionRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\SubstitutionRule::class); - $this->substitution_rules = $arr; - - return $this; - } - - /** - * @return string - */ - public function getNamespacedResourceRestoreScope() - { - return $this->whichOneof("namespaced_resource_restore_scope"); - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceConflictPolicy.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceConflictPolicy.php deleted file mode 100644 index 2c370fe9b4a6..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceConflictPolicy.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy - */ -class ClusterResourceConflictPolicy -{ - /** - * Unspecified. Only allowed if no cluster-scoped resources will be - * restored. - * - * Generated from protobuf enum CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0; - */ - const CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0; - /** - * Do not attempt to restore the conflicting resource. - * - * Generated from protobuf enum USE_EXISTING_VERSION = 1; - */ - const USE_EXISTING_VERSION = 1; - /** - * Delete the existing version before re-creating it from the Backup. - * Note that this is a dangerous option which could cause unintentional - * data loss if used inappropriately - for example, deleting a CRD will - * cause Kubernetes to delete all CRs of that type. - * - * Generated from protobuf enum USE_BACKUP_VERSION = 2; - */ - const USE_BACKUP_VERSION = 2; - - private static $valueToName = [ - self::CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED => 'CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED', - self::USE_EXISTING_VERSION => 'USE_EXISTING_VERSION', - self::USE_BACKUP_VERSION => 'USE_BACKUP_VERSION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClusterResourceConflictPolicy::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_ClusterResourceConflictPolicy::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceRestoreScope.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceRestoreScope.php deleted file mode 100644 index cddcdcd36ca3..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/ClusterResourceRestoreScope.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope - */ -class ClusterResourceRestoreScope extends \Google\Protobuf\Internal\Message -{ - /** - * A list of "types" of cluster-scoped resources to be restored from the - * Backup. An empty list means that NO cluster-scoped resources will be - * restored. Note that Namespaces and PersistentVolume restoration is - * handled separately and is not governed by this field. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1; - */ - private $selected_group_kinds; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $selected_group_kinds - * A list of "types" of cluster-scoped resources to be restored from the - * Backup. An empty list means that NO cluster-scoped resources will be - * restored. Note that Namespaces and PersistentVolume restoration is - * handled separately and is not governed by this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * A list of "types" of cluster-scoped resources to be restored from the - * Backup. An empty list means that NO cluster-scoped resources will be - * restored. Note that Namespaces and PersistentVolume restoration is - * handled separately and is not governed by this field. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSelectedGroupKinds() - { - return $this->selected_group_kinds; - } - - /** - * A list of "types" of cluster-scoped resources to be restored from the - * Backup. An empty list means that NO cluster-scoped resources will be - * restored. Note that Namespaces and PersistentVolume restoration is - * handled separately and is not governed by this field. - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1; - * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSelectedGroupKinds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind::class); - $this->selected_group_kinds = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClusterResourceRestoreScope::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_ClusterResourceRestoreScope::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/GroupKind.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/GroupKind.php deleted file mode 100644 index bcef89eac771..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/GroupKind.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.GroupKind - */ -class GroupKind extends \Google\Protobuf\Internal\Message -{ - /** - * API group string of a Kubernetes resource, e.g. - * "apiextensions.k8s.io", "storage.k8s.io", etc. - * Note: use empty string for core API group - * - * Generated from protobuf field string resource_group = 1; - */ - protected $resource_group = ''; - /** - * Kind of a Kubernetes resource, e.g. - * "CustomResourceDefinition", "StorageClass", etc. - * - * Generated from protobuf field string resource_kind = 2; - */ - protected $resource_kind = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_group - * API group string of a Kubernetes resource, e.g. - * "apiextensions.k8s.io", "storage.k8s.io", etc. - * Note: use empty string for core API group - * @type string $resource_kind - * Kind of a Kubernetes resource, e.g. - * "CustomResourceDefinition", "StorageClass", etc. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * API group string of a Kubernetes resource, e.g. - * "apiextensions.k8s.io", "storage.k8s.io", etc. - * Note: use empty string for core API group - * - * Generated from protobuf field string resource_group = 1; - * @return string - */ - public function getResourceGroup() - { - return $this->resource_group; - } - - /** - * API group string of a Kubernetes resource, e.g. - * "apiextensions.k8s.io", "storage.k8s.io", etc. - * Note: use empty string for core API group - * - * Generated from protobuf field string resource_group = 1; - * @param string $var - * @return $this - */ - public function setResourceGroup($var) - { - GPBUtil::checkString($var, True); - $this->resource_group = $var; - - return $this; - } - - /** - * Kind of a Kubernetes resource, e.g. - * "CustomResourceDefinition", "StorageClass", etc. - * - * Generated from protobuf field string resource_kind = 2; - * @return string - */ - public function getResourceKind() - { - return $this->resource_kind; - } - - /** - * Kind of a Kubernetes resource, e.g. - * "CustomResourceDefinition", "StorageClass", etc. - * - * Generated from protobuf field string resource_kind = 2; - * @param string $var - * @return $this - */ - public function setResourceKind($var) - { - GPBUtil::checkString($var, True); - $this->resource_kind = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GroupKind::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_GroupKind::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/NamespacedResourceRestoreMode.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/NamespacedResourceRestoreMode.php deleted file mode 100644 index d2d978281027..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/NamespacedResourceRestoreMode.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode - */ -class NamespacedResourceRestoreMode -{ - /** - * Unspecified (invalid). - * - * Generated from protobuf enum NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0; - */ - const NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0; - /** - * When conflicting top-level resources (either Namespaces or - * ProtectedApplications, depending upon the scope) are encountered, this - * will first trigger a delete of the conflicting resource AND ALL OF ITS - * REFERENCED RESOURCES (e.g., all resources in the Namespace or all - * resources referenced by the ProtectedApplication) before restoring the - * resources from the Backup. This mode should only be used when you are - * intending to revert some portion of a cluster to an earlier state. - * - * Generated from protobuf enum DELETE_AND_RESTORE = 1; - */ - const DELETE_AND_RESTORE = 1; - /** - * If conflicting top-level resources (either Namespaces or - * ProtectedApplications, depending upon the scope) are encountered at the - * beginning of a restore process, the Restore will fail. If a conflict - * occurs during the restore process itself (e.g., because an out of band - * process creates conflicting resources), a conflict will be reported. - * - * Generated from protobuf enum FAIL_ON_CONFLICT = 2; - */ - const FAIL_ON_CONFLICT = 2; - - private static $valueToName = [ - self::NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED => 'NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED', - self::DELETE_AND_RESTORE => 'DELETE_AND_RESTORE', - self::FAIL_ON_CONFLICT => 'FAIL_ON_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(NamespacedResourceRestoreMode::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_NamespacedResourceRestoreMode::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/SubstitutionRule.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/SubstitutionRule.php deleted file mode 100644 index 80c9bc843c57..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/SubstitutionRule.php +++ /dev/null @@ -1,312 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule - */ -class SubstitutionRule extends \Google\Protobuf\Internal\Message -{ - /** - * (Filtering parameter) Any resource subject to substitution must be - * contained within one of the listed Kubernetes Namespace in the Backup. - * If this field is not provided, no namespace filtering will be performed - * (all resources in all Namespaces, including all cluster-scoped resources, - * will be candidates for substitution). - * To mix cluster-scoped and namespaced resources in the same rule, use an - * empty string ("") as one of the target namespaces. - * - * Generated from protobuf field repeated string target_namespaces = 1; - */ - private $target_namespaces; - /** - * (Filtering parameter) Any resource subject to substitution must belong to - * one of the listed "types". - * If this field is not provided, no type filtering will be performed (all - * resources of all types matching previous filtering parameters will be - * candidates for substitution). - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2; - */ - private $target_group_kinds; - /** - * Required. This is a [JSONPath] - * (https://kubernetes.io/docs/reference/kubectl/jsonpath/) - * expression that matches specific fields of candidate - * resources and it operates as both a filtering parameter (resources that - * are not matched with this expression will not be candidates for - * substitution) as well as a field identifier (identifies exactly which - * fields out of the candidate resources will be modified). - * - * Generated from protobuf field string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_json_path = ''; - /** - * (Filtering parameter) This is a [regular expression] - * (https://en.wikipedia.org/wiki/Regular_expression) - * that is compared against the fields matched by the target_json_path - * expression (and must also have passed the previous filters). - * Substitution will not be performed against fields whose - * value does not match this expression. If this field is NOT specified, - * then ALL fields matched by the target_json_path expression will undergo - * substitution. Note that an empty (e.g., "", rather than unspecified) - * value for for this field will only match empty fields. - * - * Generated from protobuf field string original_value_pattern = 4; - */ - protected $original_value_pattern = ''; - /** - * This is the new value to set for any fields that pass the filtering and - * selection criteria. To remove a value from a Kubernetes resource, either - * leave this field unspecified, or set it to the empty string (""). - * - * Generated from protobuf field string new_value = 5; - */ - protected $new_value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $target_namespaces - * (Filtering parameter) Any resource subject to substitution must be - * contained within one of the listed Kubernetes Namespace in the Backup. - * If this field is not provided, no namespace filtering will be performed - * (all resources in all Namespaces, including all cluster-scoped resources, - * will be candidates for substitution). - * To mix cluster-scoped and namespaced resources in the same rule, use an - * empty string ("") as one of the target namespaces. - * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $target_group_kinds - * (Filtering parameter) Any resource subject to substitution must belong to - * one of the listed "types". - * If this field is not provided, no type filtering will be performed (all - * resources of all types matching previous filtering parameters will be - * candidates for substitution). - * @type string $target_json_path - * Required. This is a [JSONPath] - * (https://kubernetes.io/docs/reference/kubectl/jsonpath/) - * expression that matches specific fields of candidate - * resources and it operates as both a filtering parameter (resources that - * are not matched with this expression will not be candidates for - * substitution) as well as a field identifier (identifies exactly which - * fields out of the candidate resources will be modified). - * @type string $original_value_pattern - * (Filtering parameter) This is a [regular expression] - * (https://en.wikipedia.org/wiki/Regular_expression) - * that is compared against the fields matched by the target_json_path - * expression (and must also have passed the previous filters). - * Substitution will not be performed against fields whose - * value does not match this expression. If this field is NOT specified, - * then ALL fields matched by the target_json_path expression will undergo - * substitution. Note that an empty (e.g., "", rather than unspecified) - * value for for this field will only match empty fields. - * @type string $new_value - * This is the new value to set for any fields that pass the filtering and - * selection criteria. To remove a value from a Kubernetes resource, either - * leave this field unspecified, or set it to the empty string (""). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce(); - parent::__construct($data); - } - - /** - * (Filtering parameter) Any resource subject to substitution must be - * contained within one of the listed Kubernetes Namespace in the Backup. - * If this field is not provided, no namespace filtering will be performed - * (all resources in all Namespaces, including all cluster-scoped resources, - * will be candidates for substitution). - * To mix cluster-scoped and namespaced resources in the same rule, use an - * empty string ("") as one of the target namespaces. - * - * Generated from protobuf field repeated string target_namespaces = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetNamespaces() - { - return $this->target_namespaces; - } - - /** - * (Filtering parameter) Any resource subject to substitution must be - * contained within one of the listed Kubernetes Namespace in the Backup. - * If this field is not provided, no namespace filtering will be performed - * (all resources in all Namespaces, including all cluster-scoped resources, - * will be candidates for substitution). - * To mix cluster-scoped and namespaced resources in the same rule, use an - * empty string ("") as one of the target namespaces. - * - * Generated from protobuf field repeated string target_namespaces = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetNamespaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->target_namespaces = $arr; - - return $this; - } - - /** - * (Filtering parameter) Any resource subject to substitution must belong to - * one of the listed "types". - * If this field is not provided, no type filtering will be performed (all - * resources of all types matching previous filtering parameters will be - * candidates for substitution). - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetGroupKinds() - { - return $this->target_group_kinds; - } - - /** - * (Filtering parameter) Any resource subject to substitution must belong to - * one of the listed "types". - * If this field is not provided, no type filtering will be performed (all - * resources of all types matching previous filtering parameters will be - * candidates for substitution). - * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2; - * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetGroupKinds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind::class); - $this->target_group_kinds = $arr; - - return $this; - } - - /** - * Required. This is a [JSONPath] - * (https://kubernetes.io/docs/reference/kubectl/jsonpath/) - * expression that matches specific fields of candidate - * resources and it operates as both a filtering parameter (resources that - * are not matched with this expression will not be candidates for - * substitution) as well as a field identifier (identifies exactly which - * fields out of the candidate resources will be modified). - * - * Generated from protobuf field string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetJsonPath() - { - return $this->target_json_path; - } - - /** - * Required. This is a [JSONPath] - * (https://kubernetes.io/docs/reference/kubectl/jsonpath/) - * expression that matches specific fields of candidate - * resources and it operates as both a filtering parameter (resources that - * are not matched with this expression will not be candidates for - * substitution) as well as a field identifier (identifies exactly which - * fields out of the candidate resources will be modified). - * - * Generated from protobuf field string target_json_path = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetJsonPath($var) - { - GPBUtil::checkString($var, True); - $this->target_json_path = $var; - - return $this; - } - - /** - * (Filtering parameter) This is a [regular expression] - * (https://en.wikipedia.org/wiki/Regular_expression) - * that is compared against the fields matched by the target_json_path - * expression (and must also have passed the previous filters). - * Substitution will not be performed against fields whose - * value does not match this expression. If this field is NOT specified, - * then ALL fields matched by the target_json_path expression will undergo - * substitution. Note that an empty (e.g., "", rather than unspecified) - * value for for this field will only match empty fields. - * - * Generated from protobuf field string original_value_pattern = 4; - * @return string - */ - public function getOriginalValuePattern() - { - return $this->original_value_pattern; - } - - /** - * (Filtering parameter) This is a [regular expression] - * (https://en.wikipedia.org/wiki/Regular_expression) - * that is compared against the fields matched by the target_json_path - * expression (and must also have passed the previous filters). - * Substitution will not be performed against fields whose - * value does not match this expression. If this field is NOT specified, - * then ALL fields matched by the target_json_path expression will undergo - * substitution. Note that an empty (e.g., "", rather than unspecified) - * value for for this field will only match empty fields. - * - * Generated from protobuf field string original_value_pattern = 4; - * @param string $var - * @return $this - */ - public function setOriginalValuePattern($var) - { - GPBUtil::checkString($var, True); - $this->original_value_pattern = $var; - - return $this; - } - - /** - * This is the new value to set for any fields that pass the filtering and - * selection criteria. To remove a value from a Kubernetes resource, either - * leave this field unspecified, or set it to the empty string (""). - * - * Generated from protobuf field string new_value = 5; - * @return string - */ - public function getNewValue() - { - return $this->new_value; - } - - /** - * This is the new value to set for any fields that pass the filtering and - * selection criteria. To remove a value from a Kubernetes resource, either - * leave this field unspecified, or set it to the empty string (""). - * - * Generated from protobuf field string new_value = 5; - * @param string $var - * @return $this - */ - public function setNewValue($var) - { - GPBUtil::checkString($var, True); - $this->new_value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SubstitutionRule::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_SubstitutionRule::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/VolumeDataRestorePolicy.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/VolumeDataRestorePolicy.php deleted file mode 100644 index 26cc27e5aae1..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig/VolumeDataRestorePolicy.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy - */ -class VolumeDataRestorePolicy -{ - /** - * Unspecified (illegal). - * - * Generated from protobuf enum VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0; - */ - const VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0; - /** - * For each PVC to be restored, will create a new underlying volume (and PV) - * from the corresponding VolumeBackup contained within the Backup. - * - * Generated from protobuf enum RESTORE_VOLUME_DATA_FROM_BACKUP = 1; - */ - const RESTORE_VOLUME_DATA_FROM_BACKUP = 1; - /** - * For each PVC to be restored, attempt to reuse the original PV contained - * in the Backup (with its original underlying volume). Note that option - * is likely only usable when restoring a workload to its original cluster. - * - * Generated from protobuf enum REUSE_VOLUME_HANDLE_FROM_BACKUP = 2; - */ - const REUSE_VOLUME_HANDLE_FROM_BACKUP = 2; - /** - * For each PVC to be restored, PVCs will be created without any particular - * action to restore data. In this case, the normal Kubernetes provisioning - * logic would kick in, and this would likely result in either dynamically - * provisioning blank PVs or binding to statically provisioned PVs. - * - * Generated from protobuf enum NO_VOLUME_DATA_RESTORATION = 3; - */ - const NO_VOLUME_DATA_RESTORATION = 3; - - private static $valueToName = [ - self::VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED => 'VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED', - self::RESTORE_VOLUME_DATA_FROM_BACKUP => 'RESTORE_VOLUME_DATA_FROM_BACKUP', - self::REUSE_VOLUME_HANDLE_FROM_BACKUP => 'REUSE_VOLUME_HANDLE_FROM_BACKUP', - self::NO_VOLUME_DATA_RESTORATION => 'NO_VOLUME_DATA_RESTORATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VolumeDataRestorePolicy::class, \Google\Cloud\GkeBackup\V1\RestoreConfig_VolumeDataRestorePolicy::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_ClusterResourceConflictPolicy.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_ClusterResourceConflictPolicy.php deleted file mode 100644 index 0dfbb30724a9..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/RestoreConfig_ClusterResourceConflictPolicy.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.gkebackup.v1.RestorePlan - */ -class RestorePlan extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full name of the RestorePlan resource. - * Format: projects/*/locations/*/restorePlans/*. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The timestamp when this RestorePlan 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 this RestorePlan resource was last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User specified descriptive string for this RestorePlan. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Required. Immutable. A reference to the [BackupPlan][google.cloud.gkebackup.v1.BackupPlan] from which Backups may be used as the - * source for Restores created via this RestorePlan. - * Format: projects/*/locations/*/backupPlans/*. - * - * Generated from protobuf field string backup_plan = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $backup_plan = ''; - /** - * Required. Immutable. The target cluster into which Restores created via this RestorePlan - * will restore data. NOTE: the cluster's region must be the same as the - * RestorePlan. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * - * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $cluster = ''; - /** - * Required. Configuration of Restores created via this RestorePlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $restore_config = null; - /** - * A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 9; - */ - private $labels; - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestorePlan`, - * and systems are expected to put that etag in the request to - * `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change - * will be applied to the same version of the resource. - * - * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The full name of the RestorePlan resource. - * Format: projects/*/locations/*/restorePlans/*. - * @type string $uid - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when this RestorePlan resource was - * created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when this RestorePlan resource was last - * updated. - * @type string $description - * User specified descriptive string for this RestorePlan. - * @type string $backup_plan - * Required. Immutable. A reference to the [BackupPlan][google.cloud.gkebackup.v1.BackupPlan] from which Backups may be used as the - * source for Restores created via this RestorePlan. - * Format: projects/*/locations/*/backupPlans/*. - * @type string $cluster - * Required. Immutable. The target cluster into which Restores created via this RestorePlan - * will restore data. NOTE: the cluster's region must be the same as the - * RestorePlan. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * @type \Google\Cloud\GkeBackup\V1\RestoreConfig $restore_config - * Required. Configuration of Restores created via this RestorePlan. - * @type array|\Google\Protobuf\Internal\MapField $labels - * A set of custom labels supplied by user. - * @type string $etag - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestorePlan`, - * and systems are expected to put that etag in the request to - * `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change - * will be applied to the same version of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\RestorePlan::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full name of the RestorePlan resource. - * Format: projects/*/locations/*/restorePlans/*. - * - * 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 RestorePlan resource. - * Format: projects/*/locations/*/restorePlans/*. - * - * 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. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.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 timestamp when this RestorePlan 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 this RestorePlan 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 this RestorePlan resource 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 this RestorePlan resource 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; - } - - /** - * User specified descriptive string for this RestorePlan. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User specified descriptive string for this RestorePlan. - * - * 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. Immutable. A reference to the [BackupPlan][google.cloud.gkebackup.v1.BackupPlan] from which Backups may be used as the - * source for Restores created via this RestorePlan. - * Format: projects/*/locations/*/backupPlans/*. - * - * Generated from protobuf field string backup_plan = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getBackupPlan() - { - return $this->backup_plan; - } - - /** - * Required. Immutable. A reference to the [BackupPlan][google.cloud.gkebackup.v1.BackupPlan] from which Backups may be used as the - * source for Restores created via this RestorePlan. - * Format: projects/*/locations/*/backupPlans/*. - * - * Generated from protobuf field string backup_plan = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackupPlan($var) - { - GPBUtil::checkString($var, True); - $this->backup_plan = $var; - - return $this; - } - - /** - * Required. Immutable. The target cluster into which Restores created via this RestorePlan - * will restore data. NOTE: the cluster's region must be the same as the - * RestorePlan. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * - * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * Required. Immutable. The target cluster into which Restores created via this RestorePlan - * will restore data. NOTE: the cluster's region must be the same as the - * RestorePlan. - * Valid formats: - * - projects/*/locations/*/clusters/* - * - projects/*/zones/*/clusters/* - * - * Generated from protobuf field string cluster = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Required. Configuration of Restores created via this RestorePlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\RestoreConfig|null - */ - public function getRestoreConfig() - { - return $this->restore_config; - } - - public function hasRestoreConfig() - { - return isset($this->restore_config); - } - - public function clearRestoreConfig() - { - unset($this->restore_config); - } - - /** - * Required. Configuration of Restores created via this RestorePlan. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig restore_config = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\RestoreConfig $var - * @return $this - */ - public function setRestoreConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig::class); - $this->restore_config = $var; - - return $this; - } - - /** - * A set of custom labels supplied by user. - * - * Generated from protobuf field map labels = 9; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * A set of custom labels supplied by user. - * - * 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. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestorePlan`, - * and systems are expected to put that etag in the request to - * `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change - * will be applied to the same version of the resource. - * - * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a restore from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform restore updates in order to avoid - * race conditions: An `etag` is returned in the response to `GetRestorePlan`, - * and systems are expected to put that etag in the request to - * `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change - * will be applied to the same version of the resource. - * - * Generated from protobuf field string etag = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore_State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore_State.php deleted file mode 100644 index 4ee0fe727249..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/Restore_State.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.gkebackup.v1.UpdateBackupPlanRequest - */ -class UpdateBackupPlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A new version of the BackupPlan resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_plan = null; - /** - * This is used to specify the fields to be overwritten in the - * BackupPlan targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource - * (e.g., `description`, `backup_config.include_volume_data`, etc.) - * If no `update_mask` is provided, all fields in `backup_plan` will be - * written to the target BackupPlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored - * and are not used to update the target BackupPlan. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeBackup\V1\BackupPlan $backup_plan - * Required. A new version of the BackupPlan resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * @type \Google\Protobuf\FieldMask $update_mask - * This is used to specify the fields to be overwritten in the - * BackupPlan targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource - * (e.g., `description`, `backup_config.include_volume_data`, etc.) - * If no `update_mask` is provided, all fields in `backup_plan` will be - * written to the target BackupPlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored - * and are not used to update the target BackupPlan. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. A new version of the BackupPlan resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\BackupPlan|null - */ - public function getBackupPlan() - { - return $this->backup_plan; - } - - public function hasBackupPlan() - { - return isset($this->backup_plan); - } - - public function clearBackupPlan() - { - unset($this->backup_plan); - } - - /** - * Required. A new version of the BackupPlan resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\BackupPlan $var - * @return $this - */ - public function setBackupPlan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\BackupPlan::class); - $this->backup_plan = $var; - - return $this; - } - - /** - * This is used to specify the fields to be overwritten in the - * BackupPlan targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource - * (e.g., `description`, `backup_config.include_volume_data`, etc.) - * If no `update_mask` is provided, all fields in `backup_plan` will be - * written to the target BackupPlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored - * and are not used to update the target BackupPlan. - * - * 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); - } - - /** - * This is used to specify the fields to be overwritten in the - * BackupPlan targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource - * (e.g., `description`, `backup_config.include_volume_data`, etc.) - * If no `update_mask` is provided, all fields in `backup_plan` will be - * written to the target BackupPlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored - * and are not used to update the target BackupPlan. - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupRequest.php deleted file mode 100644 index 3be6779fd4d0..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateBackupRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.gkebackup.v1.UpdateBackupRequest - */ -class UpdateBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A new version of the Backup resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup = null; - /** - * This is used to specify the fields to be overwritten in the - * Backup targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `backup` will be - * written to the target Backup resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored - * and are not used to update the target Backup. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeBackup\V1\Backup $backup - * Required. A new version of the Backup resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * @type \Google\Protobuf\FieldMask $update_mask - * This is used to specify the fields to be overwritten in the - * Backup targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `backup` will be - * written to the target Backup resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored - * and are not used to update the target Backup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. A new version of the Backup resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\Backup|null - */ - public function getBackup() - { - return $this->backup; - } - - public function hasBackup() - { - return isset($this->backup); - } - - public function clearBackup() - { - unset($this->backup); - } - - /** - * Required. A new version of the Backup resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\Backup $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Backup::class); - $this->backup = $var; - - return $this; - } - - /** - * This is used to specify the fields to be overwritten in the - * Backup targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `backup` will be - * written to the target Backup resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored - * and are not used to update the target Backup. - * - * 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); - } - - /** - * This is used to specify the fields to be overwritten in the - * Backup targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `backup` will be - * written to the target Backup resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored - * and are not used to update the target Backup. - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestorePlanRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestorePlanRequest.php deleted file mode 100644 index 3d9fd93a2f81..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestorePlanRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.gkebackup.v1.UpdateRestorePlanRequest - */ -class UpdateRestorePlanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A new version of the RestorePlan resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $restore_plan = null; - /** - * This is used to specify the fields to be overwritten in the - * RestorePlan targeted for update. The values for each of these - * updated fields will be taken from the `restore_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore_plan` will be - * written to the target RestorePlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored - * and are not used to update the target RestorePlan. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeBackup\V1\RestorePlan $restore_plan - * Required. A new version of the RestorePlan resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * @type \Google\Protobuf\FieldMask $update_mask - * This is used to specify the fields to be overwritten in the - * RestorePlan targeted for update. The values for each of these - * updated fields will be taken from the `restore_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore_plan` will be - * written to the target RestorePlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored - * and are not used to update the target RestorePlan. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. A new version of the RestorePlan resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\RestorePlan|null - */ - public function getRestorePlan() - { - return $this->restore_plan; - } - - public function hasRestorePlan() - { - return isset($this->restore_plan); - } - - public function clearRestorePlan() - { - unset($this->restore_plan); - } - - /** - * Required. A new version of the RestorePlan resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestorePlan restore_plan = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\RestorePlan $var - * @return $this - */ - public function setRestorePlan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestorePlan::class); - $this->restore_plan = $var; - - return $this; - } - - /** - * This is used to specify the fields to be overwritten in the - * RestorePlan targeted for update. The values for each of these - * updated fields will be taken from the `restore_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore_plan` will be - * written to the target RestorePlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored - * and are not used to update the target RestorePlan. - * - * 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); - } - - /** - * This is used to specify the fields to be overwritten in the - * RestorePlan targeted for update. The values for each of these - * updated fields will be taken from the `restore_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore_plan` will be - * written to the target RestorePlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored - * and are not used to update the target RestorePlan. - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestoreRequest.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestoreRequest.php deleted file mode 100644 index df700b76b63f..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/UpdateRestoreRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.gkebackup.v1.UpdateRestoreRequest - */ -class UpdateRestoreRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A new version of the Restore resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $restore = null; - /** - * This is used to specify the fields to be overwritten in the - * Restore targeted for update. The values for each of these - * updated fields will be taken from the `restore` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore` will be - * written to the target Restore resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored - * and are not used to update the target Restore. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeBackup\V1\Restore $restore - * Required. A new version of the Restore resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * @type \Google\Protobuf\FieldMask $update_mask - * This is used to specify the fields to be overwritten in the - * Restore targeted for update. The values for each of these - * updated fields will be taken from the `restore` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore` will be - * written to the target Restore resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored - * and are not used to update the target Restore. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); - parent::__construct($data); - } - - /** - * Required. A new version of the Restore resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeBackup\V1\Restore|null - */ - public function getRestore() - { - return $this->restore; - } - - public function hasRestore() - { - return isset($this->restore); - } - - public function clearRestore() - { - unset($this->restore); - } - - /** - * Required. A new version of the Restore resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.Restore restore = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeBackup\V1\Restore $var - * @return $this - */ - public function setRestore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Restore::class); - $this->restore = $var; - - return $this; - } - - /** - * This is used to specify the fields to be overwritten in the - * Restore targeted for update. The values for each of these - * updated fields will be taken from the `restore` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore` will be - * written to the target Restore resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored - * and are not used to update the target Restore. - * - * 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); - } - - /** - * This is used to specify the fields to be overwritten in the - * Restore targeted for update. The values for each of these - * updated fields will be taken from the `restore` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore` will be - * written to the target Restore resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored - * and are not used to update the target Restore. - * - * 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/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup.php deleted file mode 100644 index 63a4cb4fab60..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup.php +++ /dev/null @@ -1,578 +0,0 @@ -google.cloud.gkebackup.v1.VolumeBackup - */ -class VolumeBackup extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full name of the VolumeBackup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The timestamp when this VolumeBackup 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 this VolumeBackup resource 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. A reference to the source Kubernetes PVC from which this VolumeBackup - * was created. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName source_pvc = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_pvc = null; - /** - * Output only. A storage system-specific opaque handle to the underlying volume backup. - * - * Generated from protobuf field string volume_backup_handle = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $volume_backup_handle = ''; - /** - * Output only. The format used for the volume backup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormat format = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $format = 0; - /** - * Output only. The aggregate size of the underlying artifacts associated with this - * VolumeBackup in the backup storage. This may change over time when - * multiple backups of the same volume share the same backup storage - * location. In particular, this is likely to increase in size when - * the immediately preceding backup of the same volume is deleted. - * - * Generated from protobuf field int64 storage_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $storage_bytes = 0; - /** - * Output only. The minimum size of the disk to which this VolumeBackup can be restored. - * - * Generated from protobuf field int64 disk_size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $disk_size_bytes = 0; - /** - * Output only. The timestamp when the associated underlying volume backup - * operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $complete_time = null; - /** - * Output only. The current state of this VolumeBackup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. A human readable message explaining why the VolumeBackup is in its current - * state. - * - * Generated from protobuf field string state_message = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_message = ''; - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a volume backup from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume backup updates in order to avoid - * race conditions. - * - * Generated from protobuf field string etag = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The full name of the VolumeBackup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. - * @type string $uid - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when this VolumeBackup resource was - * created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when this VolumeBackup resource was last - * updated. - * @type \Google\Cloud\GkeBackup\V1\NamespacedName $source_pvc - * Output only. A reference to the source Kubernetes PVC from which this VolumeBackup - * was created. - * @type string $volume_backup_handle - * Output only. A storage system-specific opaque handle to the underlying volume backup. - * @type int $format - * Output only. The format used for the volume backup. - * @type int|string $storage_bytes - * Output only. The aggregate size of the underlying artifacts associated with this - * VolumeBackup in the backup storage. This may change over time when - * multiple backups of the same volume share the same backup storage - * location. In particular, this is likely to increase in size when - * the immediately preceding backup of the same volume is deleted. - * @type int|string $disk_size_bytes - * Output only. The minimum size of the disk to which this VolumeBackup can be restored. - * @type \Google\Protobuf\Timestamp $complete_time - * Output only. The timestamp when the associated underlying volume backup - * operation completed. - * @type int $state - * Output only. The current state of this VolumeBackup. - * @type string $state_message - * Output only. A human readable message explaining why the VolumeBackup is in its current - * state. - * @type string $etag - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a volume backup from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume backup updates in order to avoid - * race conditions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full name of the VolumeBackup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. - * - * 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 VolumeBackup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. - * - * 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. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.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 timestamp when this VolumeBackup 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 this VolumeBackup 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 this VolumeBackup resource 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 this VolumeBackup resource 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. A reference to the source Kubernetes PVC from which this VolumeBackup - * was created. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName source_pvc = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeBackup\V1\NamespacedName|null - */ - public function getSourcePvc() - { - return $this->source_pvc; - } - - public function hasSourcePvc() - { - return isset($this->source_pvc); - } - - public function clearSourcePvc() - { - unset($this->source_pvc); - } - - /** - * Output only. A reference to the source Kubernetes PVC from which this VolumeBackup - * was created. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName source_pvc = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeBackup\V1\NamespacedName $var - * @return $this - */ - public function setSourcePvc($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedName::class); - $this->source_pvc = $var; - - return $this; - } - - /** - * Output only. A storage system-specific opaque handle to the underlying volume backup. - * - * Generated from protobuf field string volume_backup_handle = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVolumeBackupHandle() - { - return $this->volume_backup_handle; - } - - /** - * Output only. A storage system-specific opaque handle to the underlying volume backup. - * - * Generated from protobuf field string volume_backup_handle = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVolumeBackupHandle($var) - { - GPBUtil::checkString($var, True); - $this->volume_backup_handle = $var; - - return $this; - } - - /** - * Output only. The format used for the volume backup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormat format = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFormat() - { - return $this->format; - } - - /** - * Output only. The format used for the volume backup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormat format = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\VolumeBackup\VolumeBackupFormat::class); - $this->format = $var; - - return $this; - } - - /** - * Output only. The aggregate size of the underlying artifacts associated with this - * VolumeBackup in the backup storage. This may change over time when - * multiple backups of the same volume share the same backup storage - * location. In particular, this is likely to increase in size when - * the immediately preceding backup of the same volume is deleted. - * - * Generated from protobuf field int64 storage_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getStorageBytes() - { - return $this->storage_bytes; - } - - /** - * Output only. The aggregate size of the underlying artifacts associated with this - * VolumeBackup in the backup storage. This may change over time when - * multiple backups of the same volume share the same backup storage - * location. In particular, this is likely to increase in size when - * the immediately preceding backup of the same volume is deleted. - * - * Generated from protobuf field int64 storage_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setStorageBytes($var) - { - GPBUtil::checkInt64($var); - $this->storage_bytes = $var; - - return $this; - } - - /** - * Output only. The minimum size of the disk to which this VolumeBackup can be restored. - * - * Generated from protobuf field int64 disk_size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getDiskSizeBytes() - { - return $this->disk_size_bytes; - } - - /** - * Output only. The minimum size of the disk to which this VolumeBackup can be restored. - * - * Generated from protobuf field int64 disk_size_bytes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setDiskSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->disk_size_bytes = $var; - - return $this; - } - - /** - * Output only. The timestamp when the associated underlying volume backup - * operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 10 [(.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 associated underlying volume backup - * operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 10 [(.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 current state of this VolumeBackup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of this VolumeBackup. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeBackup.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\VolumeBackup\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. A human readable message explaining why the VolumeBackup is in its current - * state. - * - * Generated from protobuf field string state_message = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateMessage() - { - return $this->state_message; - } - - /** - * Output only. A human readable message explaining why the VolumeBackup is in its current - * state. - * - * Generated from protobuf field string state_message = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateMessage($var) - { - GPBUtil::checkString($var, True); - $this->state_message = $var; - - return $this; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a volume backup from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume backup updates in order to avoid - * race conditions. - * - * Generated from protobuf field string etag = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a volume backup from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume backup updates in order to avoid - * race conditions. - * - * Generated from protobuf field string etag = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/State.php deleted file mode 100644 index fbe20d6856c2..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/State.php +++ /dev/null @@ -1,98 +0,0 @@ -google.cloud.gkebackup.v1.VolumeBackup.State - */ -class State -{ - /** - * This is an illegal state and should not be encountered. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * A volume for the backup was identified and backup process is about to - * start. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The volume backup operation has begun and is in the initial "snapshot" - * phase of the process. Any defined ProtectedApplication "pre" hooks will - * be executed before entering this state and "post" hooks will be executed - * upon leaving this state. - * - * Generated from protobuf enum SNAPSHOTTING = 2; - */ - const SNAPSHOTTING = 2; - /** - * The snapshot phase of the volume backup operation has completed and - * the snapshot is now being uploaded to backup storage. - * - * Generated from protobuf enum UPLOADING = 3; - */ - const UPLOADING = 3; - /** - * The volume backup operation has completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - /** - * The volume backup operation has failed. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - /** - * This VolumeBackup resource (and its associated artifacts) is in the - * process of being deleted. - * - * Generated from protobuf enum DELETING = 6; - */ - const DELETING = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::SNAPSHOTTING => 'SNAPSHOTTING', - self::UPLOADING => 'UPLOADING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - 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\GkeBackup\V1\VolumeBackup_State::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/VolumeBackupFormat.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/VolumeBackupFormat.php deleted file mode 100644 index de6484fc4519..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup/VolumeBackupFormat.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormat - */ -class VolumeBackupFormat -{ - /** - * Default value, not specified. - * - * Generated from protobuf enum VOLUME_BACKUP_FORMAT_UNSPECIFIED = 0; - */ - const VOLUME_BACKUP_FORMAT_UNSPECIFIED = 0; - /** - * Compute Engine Persistent Disk snapshot based volume backup. - * - * Generated from protobuf enum GCE_PERSISTENT_DISK = 1; - */ - const GCE_PERSISTENT_DISK = 1; - - private static $valueToName = [ - self::VOLUME_BACKUP_FORMAT_UNSPECIFIED => 'VOLUME_BACKUP_FORMAT_UNSPECIFIED', - self::GCE_PERSISTENT_DISK => 'GCE_PERSISTENT_DISK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VolumeBackupFormat::class, \Google\Cloud\GkeBackup\V1\VolumeBackup_VolumeBackupFormat::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup_State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup_State.php deleted file mode 100644 index 6f93d4cd336d..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeBackup_State.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.gkebackup.v1.VolumeRestore - */ -class VolumeRestore extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Full name of the VolumeRestore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The timestamp when this VolumeRestore 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 this VolumeRestore resource 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 full name of the VolumeBackup from which the volume will be restored. - * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. - * - * Generated from protobuf field string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $volume_backup = ''; - /** - * Output only. The reference to the target Kubernetes PVC to be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target_pvc = null; - /** - * Output only. A storage system-specific opaque handler to the underlying volume created - * for the target PVC from the volume backup. - * - * Generated from protobuf field string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $volume_handle = ''; - /** - * Output only. The type of volume provisioned - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $volume_type = 0; - /** - * Output only. The timestamp when the associated underlying volume - * restoration completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $complete_time = null; - /** - * Output only. The current state of this VolumeRestore. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. A human readable message explaining why the VolumeRestore is in its - * current state. - * - * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_message = ''; - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a volume restore from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume restore updates in order to avoid - * race conditions. - * - * Generated from protobuf field string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Full name of the VolumeRestore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*. - * @type string $uid - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when this VolumeRestore resource was - * created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when this VolumeRestore resource was last - * updated. - * @type string $volume_backup - * Output only. The full name of the VolumeBackup from which the volume will be restored. - * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. - * @type \Google\Cloud\GkeBackup\V1\NamespacedName $target_pvc - * Output only. The reference to the target Kubernetes PVC to be restored. - * @type string $volume_handle - * Output only. A storage system-specific opaque handler to the underlying volume created - * for the target PVC from the volume backup. - * @type int $volume_type - * Output only. The type of volume provisioned - * @type \Google\Protobuf\Timestamp $complete_time - * Output only. The timestamp when the associated underlying volume - * restoration completed. - * @type int $state - * Output only. The current state of this VolumeRestore. - * @type string $state_message - * Output only. A human readable message explaining why the VolumeRestore is in its - * current state. - * @type string $etag - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a volume restore from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume restore updates in order to avoid - * race conditions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkebackup\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Full name of the VolumeRestore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Full name of the VolumeRestore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*. - * - * 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. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server generated global unique identifier of - * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - * - * Generated from protobuf field string uid = 2 [(.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 timestamp when this VolumeRestore 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 this VolumeRestore 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 this VolumeRestore resource 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 this VolumeRestore resource 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 full name of the VolumeBackup from which the volume will be restored. - * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. - * - * Generated from protobuf field string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVolumeBackup() - { - return $this->volume_backup; - } - - /** - * Output only. The full name of the VolumeBackup from which the volume will be restored. - * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*. - * - * Generated from protobuf field string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVolumeBackup($var) - { - GPBUtil::checkString($var, True); - $this->volume_backup = $var; - - return $this; - } - - /** - * Output only. The reference to the target Kubernetes PVC to be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeBackup\V1\NamespacedName|null - */ - public function getTargetPvc() - { - return $this->target_pvc; - } - - public function hasTargetPvc() - { - return isset($this->target_pvc); - } - - public function clearTargetPvc() - { - unset($this->target_pvc); - } - - /** - * Output only. The reference to the target Kubernetes PVC to be restored. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeBackup\V1\NamespacedName $var - * @return $this - */ - public function setTargetPvc($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedName::class); - $this->target_pvc = $var; - - return $this; - } - - /** - * Output only. A storage system-specific opaque handler to the underlying volume created - * for the target PVC from the volume backup. - * - * Generated from protobuf field string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVolumeHandle() - { - return $this->volume_handle; - } - - /** - * Output only. A storage system-specific opaque handler to the underlying volume created - * for the target PVC from the volume backup. - * - * Generated from protobuf field string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVolumeHandle($var) - { - GPBUtil::checkString($var, True); - $this->volume_handle = $var; - - return $this; - } - - /** - * Output only. The type of volume provisioned - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVolumeType() - { - return $this->volume_type; - } - - /** - * Output only. The type of volume provisioned - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVolumeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\VolumeRestore\VolumeType::class); - $this->volume_type = $var; - - return $this; - } - - /** - * Output only. The timestamp when the associated underlying volume - * restoration completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 9 [(.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 associated underlying volume - * restoration completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 9 [(.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 current state of this VolumeRestore. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of this VolumeRestore. - * - * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\VolumeRestore\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. A human readable message explaining why the VolumeRestore is in its - * current state. - * - * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateMessage() - { - return $this->state_message; - } - - /** - * Output only. A human readable message explaining why the VolumeRestore is in its - * current state. - * - * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateMessage($var) - { - GPBUtil::checkString($var, True); - $this->state_message = $var; - - return $this; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a volume restore from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume restore updates in order to avoid - * race conditions. - * - * Generated from protobuf field string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Output only. `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a volume restore from overwriting each - * other. It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform volume restore updates in order to avoid - * race conditions. - * - * Generated from protobuf field string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/State.php deleted file mode 100644 index 2528f29c845a..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.gkebackup.v1.VolumeRestore.State - */ -class State -{ - /** - * This is an illegal state and should not be encountered. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * A volume for the restore was identified and restore process is about to - * start. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The volume is currently being restored. - * - * Generated from protobuf enum RESTORING = 2; - */ - const RESTORING = 2; - /** - * The volume has been successfully restored. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * The volume restoration process failed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * This VolumeRestore resource is in the process of being deleted. - * - * Generated from protobuf enum DELETING = 5; - */ - const DELETING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::RESTORING => 'RESTORING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - 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\GkeBackup\V1\VolumeRestore_State::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/VolumeType.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/VolumeType.php deleted file mode 100644 index 460afb38ce7f..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore/VolumeType.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.gkebackup.v1.VolumeRestore.VolumeType - */ -class VolumeType -{ - /** - * Default - * - * Generated from protobuf enum VOLUME_TYPE_UNSPECIFIED = 0; - */ - const VOLUME_TYPE_UNSPECIFIED = 0; - /** - * Compute Engine Persistent Disk volume - * - * Generated from protobuf enum GCE_PERSISTENT_DISK = 1; - */ - const GCE_PERSISTENT_DISK = 1; - - private static $valueToName = [ - self::VOLUME_TYPE_UNSPECIFIED => 'VOLUME_TYPE_UNSPECIFIED', - self::GCE_PERSISTENT_DISK => 'GCE_PERSISTENT_DISK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VolumeType::class, \Google\Cloud\GkeBackup\V1\VolumeRestore_VolumeType::class); - diff --git a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore_State.php b/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore_State.php deleted file mode 100644 index 1ebbb83e2801..000000000000 --- a/owl-bot-staging/GkeBackup/v1/proto/src/Google/Cloud/GkeBackup/V1/VolumeRestore_State.php +++ /dev/null @@ -1,16 +0,0 @@ -createBackup($formattedParent); - $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 = BackupForGKEClient::backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - - create_backup_sample($formattedParent); -} -// [END gkebackup_v1_generated_BackupForGKE_CreateBackup_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup_plan.php deleted file mode 100644 index b0baac6c9449..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_backup_plan.php +++ /dev/null @@ -1,107 +0,0 @@ -setCluster($formattedBackupPlanCluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->createBackupPlan($formattedParent, $backupPlan, $backupPlanId); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BackupPlan $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = BackupForGKEClient::locationName('[PROJECT]', '[LOCATION]'); - $formattedBackupPlanCluster = BackupForGKEClient::clusterName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]' - ); - $backupPlanId = '[BACKUP_PLAN_ID]'; - - create_backup_plan_sample($formattedParent, $formattedBackupPlanCluster, $backupPlanId); -} -// [END gkebackup_v1_generated_BackupForGKE_CreateBackupPlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore.php deleted file mode 100644 index f6ecc8047089..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore.php +++ /dev/null @@ -1,106 +0,0 @@ -setBackup($formattedRestoreBackup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->createRestore($formattedParent, $restore, $restoreId); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Restore $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = BackupForGKEClient::restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $formattedRestoreBackup = BackupForGKEClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]', - '[BACKUP]' - ); - $restoreId = '[RESTORE_ID]'; - - create_restore_sample($formattedParent, $formattedRestoreBackup, $restoreId); -} -// [END gkebackup_v1_generated_BackupForGKE_CreateRestore_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore_plan.php deleted file mode 100644 index b79567c5c12d..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/create_restore_plan.php +++ /dev/null @@ -1,127 +0,0 @@ -setBackupPlan($formattedRestorePlanBackupPlan) - ->setCluster($formattedRestorePlanCluster) - ->setRestoreConfig($restorePlanRestoreConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->createRestorePlan($formattedParent, $restorePlan, $restorePlanId); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var RestorePlan $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = BackupForGKEClient::locationName('[PROJECT]', '[LOCATION]'); - $formattedRestorePlanBackupPlan = BackupForGKEClient::backupPlanName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]' - ); - $formattedRestorePlanCluster = BackupForGKEClient::clusterName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]' - ); - $restorePlanId = '[RESTORE_PLAN_ID]'; - - create_restore_plan_sample( - $formattedParent, - $formattedRestorePlanBackupPlan, - $formattedRestorePlanCluster, - $restorePlanId - ); -} -// [END gkebackup_v1_generated_BackupForGKE_CreateRestorePlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup.php deleted file mode 100644 index 2f6fedf85543..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup.php +++ /dev/null @@ -1,81 +0,0 @@ -deleteBackup($formattedName); - $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 = BackupForGKEClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]', - '[BACKUP]' - ); - - delete_backup_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_DeleteBackup_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup_plan.php deleted file mode 100644 index 5d67bfa80ced..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_backup_plan.php +++ /dev/null @@ -1,76 +0,0 @@ -deleteBackupPlan($formattedName); - $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 = BackupForGKEClient::backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - - delete_backup_plan_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore.php deleted file mode 100644 index 2cdf657bdb04..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore.php +++ /dev/null @@ -1,81 +0,0 @@ -deleteRestore($formattedName); - $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 = BackupForGKEClient::restoreName( - '[PROJECT]', - '[LOCATION]', - '[RESTORE_PLAN]', - '[RESTORE]' - ); - - delete_restore_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_DeleteRestore_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore_plan.php deleted file mode 100644 index 89546b26719b..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/delete_restore_plan.php +++ /dev/null @@ -1,76 +0,0 @@ -deleteRestorePlan($formattedName); - $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 = BackupForGKEClient::restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - - delete_restore_plan_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup.php deleted file mode 100644 index e751abe43b0b..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup.php +++ /dev/null @@ -1,72 +0,0 @@ -getBackup($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = BackupForGKEClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]', - '[BACKUP]' - ); - - get_backup_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_GetBackup_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup_plan.php deleted file mode 100644 index 6a665f164113..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_backup_plan.php +++ /dev/null @@ -1,67 +0,0 @@ -getBackupPlan($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = BackupForGKEClient::backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - - get_backup_plan_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_GetBackupPlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore.php deleted file mode 100644 index 3f2c1ec79699..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore.php +++ /dev/null @@ -1,72 +0,0 @@ -getRestore($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = BackupForGKEClient::restoreName( - '[PROJECT]', - '[LOCATION]', - '[RESTORE_PLAN]', - '[RESTORE]' - ); - - get_restore_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_GetRestore_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore_plan.php deleted file mode 100644 index a4f9183e73f0..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_restore_plan.php +++ /dev/null @@ -1,67 +0,0 @@ -getRestorePlan($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = BackupForGKEClient::restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - - get_restore_plan_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_GetRestorePlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_backup.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_backup.php deleted file mode 100644 index 47392af0f84c..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_backup.php +++ /dev/null @@ -1,73 +0,0 @@ -getVolumeBackup($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = BackupForGKEClient::volumeBackupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]', - '[BACKUP]', - '[VOLUME_BACKUP]' - ); - - get_volume_backup_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_restore.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_restore.php deleted file mode 100644 index 31724bcb0eea..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/get_volume_restore.php +++ /dev/null @@ -1,73 +0,0 @@ -getVolumeRestore($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = BackupForGKEClient::volumeRestoreName( - '[PROJECT]', - '[LOCATION]', - '[RESTORE_PLAN]', - '[RESTORE]', - '[VOLUME_RESTORE]' - ); - - get_volume_restore_sample($formattedName); -} -// [END gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backup_plans.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backup_plans.php deleted file mode 100644 index 8f75e078ed52..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backup_plans.php +++ /dev/null @@ -1,72 +0,0 @@ -listBackupPlans($formattedParent); - - /** @var BackupPlan $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 = BackupForGKEClient::locationName('[PROJECT]', '[LOCATION]'); - - list_backup_plans_sample($formattedParent); -} -// [END gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backups.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backups.php deleted file mode 100644 index 30d808ad2913..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_backups.php +++ /dev/null @@ -1,72 +0,0 @@ -listBackups($formattedParent); - - /** @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 = BackupForGKEClient::backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - - list_backups_sample($formattedParent); -} -// [END gkebackup_v1_generated_BackupForGKE_ListBackups_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restore_plans.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restore_plans.php deleted file mode 100644 index 4dc9ab39c087..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restore_plans.php +++ /dev/null @@ -1,72 +0,0 @@ -listRestorePlans($formattedParent); - - /** @var RestorePlan $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 = BackupForGKEClient::locationName('[PROJECT]', '[LOCATION]'); - - list_restore_plans_sample($formattedParent); -} -// [END gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restores.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restores.php deleted file mode 100644 index 892677bfe51b..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_restores.php +++ /dev/null @@ -1,72 +0,0 @@ -listRestores($formattedParent); - - /** @var Restore $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 = BackupForGKEClient::restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - - list_restores_sample($formattedParent); -} -// [END gkebackup_v1_generated_BackupForGKE_ListRestores_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_backups.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_backups.php deleted file mode 100644 index 5cd73077222e..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_backups.php +++ /dev/null @@ -1,77 +0,0 @@ -listVolumeBackups($formattedParent); - - /** @var VolumeBackup $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 = BackupForGKEClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]', - '[BACKUP]' - ); - - list_volume_backups_sample($formattedParent); -} -// [END gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_restores.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_restores.php deleted file mode 100644 index 565cb026b725..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/list_volume_restores.php +++ /dev/null @@ -1,77 +0,0 @@ -listVolumeRestores($formattedParent); - - /** @var VolumeRestore $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 = BackupForGKEClient::restoreName( - '[PROJECT]', - '[LOCATION]', - '[RESTORE_PLAN]', - '[RESTORE]' - ); - - list_volume_restores_sample($formattedParent); -} -// [END gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup.php deleted file mode 100644 index 3ffbc02140fe..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup.php +++ /dev/null @@ -1,68 +0,0 @@ -updateBackup($backup); - $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 gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup_plan.php deleted file mode 100644 index e7bc03a39ef3..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_backup_plan.php +++ /dev/null @@ -1,91 +0,0 @@ -setCluster($formattedBackupPlanCluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->updateBackupPlan($backupPlan); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BackupPlan $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedBackupPlanCluster = BackupForGKEClient::clusterName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]' - ); - - update_backup_plan_sample($formattedBackupPlanCluster); -} -// [END gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore.php deleted file mode 100644 index 69532e9d0acf..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore.php +++ /dev/null @@ -1,90 +0,0 @@ -setBackup($formattedRestoreBackup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->updateRestore($restore); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Restore $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedRestoreBackup = BackupForGKEClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]', - '[BACKUP]' - ); - - update_restore_sample($formattedRestoreBackup); -} -// [END gkebackup_v1_generated_BackupForGKE_UpdateRestore_sync] diff --git a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore_plan.php b/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore_plan.php deleted file mode 100644 index fc0f53435706..000000000000 --- a/owl-bot-staging/GkeBackup/v1/samples/V1/BackupForGKEClient/update_restore_plan.php +++ /dev/null @@ -1,107 +0,0 @@ -setBackupPlan($formattedRestorePlanBackupPlan) - ->setCluster($formattedRestorePlanCluster) - ->setRestoreConfig($restorePlanRestoreConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $backupForGKEClient->updateRestorePlan($restorePlan); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var RestorePlan $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedRestorePlanBackupPlan = BackupForGKEClient::backupPlanName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_PLAN]' - ); - $formattedRestorePlanCluster = BackupForGKEClient::clusterName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]' - ); - - update_restore_plan_sample($formattedRestorePlanBackupPlan, $formattedRestorePlanCluster); -} -// [END gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_sync] diff --git a/owl-bot-staging/GkeBackup/v1/src/V1/BackupForGKEClient.php b/owl-bot-staging/GkeBackup/v1/src/V1/BackupForGKEClient.php deleted file mode 100644 index e5186c4c76bf..000000000000 --- a/owl-bot-staging/GkeBackup/v1/src/V1/BackupForGKEClient.php +++ /dev/null @@ -1,34 +0,0 @@ -backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - * $operationResponse = $backupForGKEClient->createBackup($formattedParent); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $backupForGKEClient->createBackup($formattedParent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'createBackup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $backupForGKEClient->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. - */ -class BackupForGKEGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.gkebackup.v1.BackupForGKE'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'gkebackup.googleapis.com'; - - /** 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 $backupNameTemplate; - - private static $backupPlanNameTemplate; - - private static $clusterNameTemplate; - - private static $locationNameTemplate; - - private static $restoreNameTemplate; - - private static $restorePlanNameTemplate; - - private static $volumeBackupNameTemplate; - - private static $volumeRestoreNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/backup_for_gke_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/backup_for_gke_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/backup_for_gke_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/backup_for_gke_rest_client_config.php', - ], - ], - ]; - } - - private static function getBackupNameTemplate() - { - if (self::$backupNameTemplate == null) { - self::$backupNameTemplate = new PathTemplate('projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}'); - } - - return self::$backupNameTemplate; - } - - private static function getBackupPlanNameTemplate() - { - if (self::$backupPlanNameTemplate == null) { - self::$backupPlanNameTemplate = new PathTemplate('projects/{project}/locations/{location}/backupPlans/{backup_plan}'); - } - - return self::$backupPlanNameTemplate; - } - - private static function getClusterNameTemplate() - { - if (self::$clusterNameTemplate == null) { - self::$clusterNameTemplate = new PathTemplate('projects/{project}/locations/{location}/clusters/{cluster}'); - } - - return self::$clusterNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getRestoreNameTemplate() - { - if (self::$restoreNameTemplate == null) { - self::$restoreNameTemplate = new PathTemplate('projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}'); - } - - return self::$restoreNameTemplate; - } - - private static function getRestorePlanNameTemplate() - { - if (self::$restorePlanNameTemplate == null) { - self::$restorePlanNameTemplate = new PathTemplate('projects/{project}/locations/{location}/restorePlans/{restore_plan}'); - } - - return self::$restorePlanNameTemplate; - } - - private static function getVolumeBackupNameTemplate() - { - if (self::$volumeBackupNameTemplate == null) { - self::$volumeBackupNameTemplate = new PathTemplate('projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}/volumeBackups/{volume_backup}'); - } - - return self::$volumeBackupNameTemplate; - } - - private static function getVolumeRestoreNameTemplate() - { - if (self::$volumeRestoreNameTemplate == null) { - self::$volumeRestoreNameTemplate = new PathTemplate('projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}/volumeRestores/{volume_restore}'); - } - - return self::$volumeRestoreNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'backup' => self::getBackupNameTemplate(), - 'backupPlan' => self::getBackupPlanNameTemplate(), - 'cluster' => self::getClusterNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'restore' => self::getRestoreNameTemplate(), - 'restorePlan' => self::getRestorePlanNameTemplate(), - 'volumeBackup' => self::getVolumeBackupNameTemplate(), - 'volumeRestore' => self::getVolumeRestoreNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a backup - * resource. - * - * @param string $project - * @param string $location - * @param string $backupPlan - * @param string $backup - * - * @return string The formatted backup resource. - */ - public static function backupName($project, $location, $backupPlan, $backup) - { - return self::getBackupNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'backup_plan' => $backupPlan, - 'backup' => $backup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a backup_plan - * resource. - * - * @param string $project - * @param string $location - * @param string $backupPlan - * - * @return string The formatted backup_plan resource. - */ - public static function backupPlanName($project, $location, $backupPlan) - { - return self::getBackupPlanNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'backup_plan' => $backupPlan, - ]); - } - - /** - * 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($project, $location, $cluster) - { - return self::getClusterNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - ]); - } - - /** - * 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($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a restore - * resource. - * - * @param string $project - * @param string $location - * @param string $restorePlan - * @param string $restore - * - * @return string The formatted restore resource. - */ - public static function restoreName($project, $location, $restorePlan, $restore) - { - return self::getRestoreNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'restore_plan' => $restorePlan, - 'restore' => $restore, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a restore_plan - * resource. - * - * @param string $project - * @param string $location - * @param string $restorePlan - * - * @return string The formatted restore_plan resource. - */ - public static function restorePlanName($project, $location, $restorePlan) - { - return self::getRestorePlanNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'restore_plan' => $restorePlan, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * volume_backup resource. - * - * @param string $project - * @param string $location - * @param string $backupPlan - * @param string $backup - * @param string $volumeBackup - * - * @return string The formatted volume_backup resource. - */ - public static function volumeBackupName($project, $location, $backupPlan, $backup, $volumeBackup) - { - return self::getVolumeBackupNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'backup_plan' => $backupPlan, - 'backup' => $backup, - 'volume_backup' => $volumeBackup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * volume_restore resource. - * - * @param string $project - * @param string $location - * @param string $restorePlan - * @param string $restore - * @param string $volumeRestore - * - * @return string The formatted volume_restore resource. - */ - public static function volumeRestoreName($project, $location, $restorePlan, $restore, $volumeRestore) - { - return self::getVolumeRestoreNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'restore_plan' => $restorePlan, - 'restore' => $restore, - 'volume_restore' => $volumeRestore, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - backup: projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup} - * - backupPlan: projects/{project}/locations/{location}/backupPlans/{backup_plan} - * - cluster: projects/{project}/locations/{location}/clusters/{cluster} - * - location: projects/{project}/locations/{location} - * - restore: projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore} - * - restorePlan: projects/{project}/locations/{location}/restorePlans/{restore_plan} - * - volumeBackup: projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}/volumeBackups/{volume_backup} - * - volumeRestore: projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}/volumeRestores/{volume_restore} - * - * 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"); - } - - /** - * 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; - } - - /** - * 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 'gkebackup.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a Backup for the given BackupPlan. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedParent = $backupForGKEClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - * $operationResponse = $backupForGKEClient->createBackup($formattedParent); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $backupForGKEClient->createBackup($formattedParent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'createBackup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $parent Required. The BackupPlan within which to create the Backup. - * Format: projects/*/locations/*/backupPlans/* - * @param array $optionalArgs { - * Optional. - * - * @type Backup $backup - * The Backup resource to create. - * @type string $backupId - * The client-provided short name for the Backup resource. - * This name must: - * - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Backups in this BackupPlan - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createBackup($parent, array $optionalArgs = []) - { - $request = new CreateBackupRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['backup'])) { - $request->setBackup($optionalArgs['backup']); - } - - if (isset($optionalArgs['backupId'])) { - $request->setBackupId($optionalArgs['backupId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateBackup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new BackupPlan in a given location. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedParent = $backupForGKEClient->locationName('[PROJECT]', '[LOCATION]'); - * $backupPlan = new BackupPlan(); - * $backupPlanId = 'backup_plan_id'; - * $operationResponse = $backupForGKEClient->createBackupPlan($formattedParent, $backupPlan, $backupPlanId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $backupForGKEClient->createBackupPlan($formattedParent, $backupPlan, $backupPlanId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'createBackupPlan'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $parent Required. The location within which to create the BackupPlan. - * Format: projects/*/locations/* - * @param BackupPlan $backupPlan Required. The BackupPlan resource object to create. - * @param string $backupPlanId Required. The client-provided short name for the BackupPlan resource. - * This name must: - * - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of BackupPlans in this location - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createBackupPlan($parent, $backupPlan, $backupPlanId, array $optionalArgs = []) - { - $request = new CreateBackupPlanRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setBackupPlan($backupPlan); - $request->setBackupPlanId($backupPlanId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateBackupPlan', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new Restore for the given RestorePlan. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedParent = $backupForGKEClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - * $restore = new Restore(); - * $restoreId = 'restore_id'; - * $operationResponse = $backupForGKEClient->createRestore($formattedParent, $restore, $restoreId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $backupForGKEClient->createRestore($formattedParent, $restore, $restoreId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'createRestore'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $parent Required. The RestorePlan within which to create the Restore. - * Format: projects/*/locations/*/restorePlans/* - * @param Restore $restore Required. The restore resource to create. - * @param string $restoreId Required. The client-provided short name for the Restore resource. - * This name must: - * - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of Restores in this RestorePlan. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createRestore($parent, $restore, $restoreId, array $optionalArgs = []) - { - $request = new CreateRestoreRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setRestore($restore); - $request->setRestoreId($restoreId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateRestore', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new RestorePlan in a given location. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedParent = $backupForGKEClient->locationName('[PROJECT]', '[LOCATION]'); - * $restorePlan = new RestorePlan(); - * $restorePlanId = 'restore_plan_id'; - * $operationResponse = $backupForGKEClient->createRestorePlan($formattedParent, $restorePlan, $restorePlanId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $backupForGKEClient->createRestorePlan($formattedParent, $restorePlan, $restorePlanId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'createRestorePlan'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $parent Required. The location within which to create the RestorePlan. - * Format: projects/*/locations/* - * @param RestorePlan $restorePlan Required. The RestorePlan resource object to create. - * @param string $restorePlanId Required. The client-provided short name for the RestorePlan resource. - * This name must: - * - * - be between 1 and 63 characters long (inclusive) - * - consist of only lower-case ASCII letters, numbers, and dashes - * - start with a lower-case letter - * - end with a lower-case letter or number - * - be unique within the set of RestorePlans in this location - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createRestorePlan($parent, $restorePlan, $restorePlanId, array $optionalArgs = []) - { - $request = new CreateRestorePlanRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setRestorePlan($restorePlan); - $request->setRestorePlanId($restorePlanId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateRestorePlan', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes an existing Backup. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedName = $backupForGKEClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - * $operationResponse = $backupForGKEClient->deleteBackup($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $backupForGKEClient->deleteBackup($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'deleteBackup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the Backup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/* - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * If provided, this value must match the current value of the - * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the request is - * rejected. - * @type bool $force - * If set to true, any VolumeBackups below this Backup will also be deleted. - * Otherwise, the request will only succeed if the Backup has no - * VolumeBackups. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteBackup($name, array $optionalArgs = []) - { - $request = new DeleteBackupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - 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->startOperationsCall('DeleteBackup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes an existing BackupPlan. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedName = $backupForGKEClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - * $operationResponse = $backupForGKEClient->deleteBackupPlan($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $backupForGKEClient->deleteBackupPlan($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'deleteBackupPlan'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $name Required. Fully qualified BackupPlan name. - * Format: projects/*/locations/*/backupPlans/* - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * If provided, this value must match the current value of the - * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field or the request is - * rejected. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteBackupPlan($name, array $optionalArgs = []) - { - $request = new DeleteBackupPlanRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteBackupPlan', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes an existing Restore. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedName = $backupForGKEClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); - * $operationResponse = $backupForGKEClient->deleteRestore($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $backupForGKEClient->deleteRestore($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'deleteRestore'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $name Required. Full name of the Restore - * Format: projects/*/locations/*/restorePlans/*/restores/* - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * If provided, this value must match the current value of the - * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or the request is - * rejected. - * @type bool $force - * If set to true, any VolumeRestores below this restore will also be deleted. - * Otherwise, the request will only succeed if the restore has no - * VolumeRestores. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteRestore($name, array $optionalArgs = []) - { - $request = new DeleteRestoreRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - 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->startOperationsCall('DeleteRestore', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes an existing RestorePlan. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedName = $backupForGKEClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - * $operationResponse = $backupForGKEClient->deleteRestorePlan($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $backupForGKEClient->deleteRestorePlan($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'deleteRestorePlan'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $name Required. Fully qualified RestorePlan name. - * Format: projects/*/locations/*/restorePlans/* - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * If provided, this value must match the current value of the - * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] field or the request is - * rejected. - * @type bool $force - * If set to true, any Restores below this RestorePlan will also be deleted. - * Otherwise, the request will only succeed if the RestorePlan has no - * Restores. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteRestorePlan($name, array $optionalArgs = []) - { - $request = new DeleteRestorePlanRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - 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->startOperationsCall('DeleteRestorePlan', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Retrieve the details of a single Backup. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedName = $backupForGKEClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - * $response = $backupForGKEClient->getBackup($formattedName); - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $name Required. Full name of the Backup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/* - * @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\GkeBackup\V1\Backup - * - * @throws ApiException if the remote call fails - */ - public function getBackup($name, array $optionalArgs = []) - { - $request = new GetBackupRequest(); - $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('GetBackup', Backup::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieve the details of a single BackupPlan. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedName = $backupForGKEClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - * $response = $backupForGKEClient->getBackupPlan($formattedName); - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $name Required. Fully qualified BackupPlan name. - * Format: projects/*/locations/*/backupPlans/* - * @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\GkeBackup\V1\BackupPlan - * - * @throws ApiException if the remote call fails - */ - public function getBackupPlan($name, array $optionalArgs = []) - { - $request = new GetBackupPlanRequest(); - $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('GetBackupPlan', BackupPlan::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves the details of a single Restore. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedName = $backupForGKEClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); - * $response = $backupForGKEClient->getRestore($formattedName); - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the restore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/* - * @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\GkeBackup\V1\Restore - * - * @throws ApiException if the remote call fails - */ - public function getRestore($name, array $optionalArgs = []) - { - $request = new GetRestoreRequest(); - $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('GetRestore', Restore::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieve the details of a single RestorePlan. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedName = $backupForGKEClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - * $response = $backupForGKEClient->getRestorePlan($formattedName); - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $name Required. Fully qualified RestorePlan name. - * Format: projects/*/locations/*/restorePlans/* - * @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\GkeBackup\V1\RestorePlan - * - * @throws ApiException if the remote call fails - */ - public function getRestorePlan($name, array $optionalArgs = []) - { - $request = new GetRestorePlanRequest(); - $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('GetRestorePlan', RestorePlan::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieve the details of a single VolumeBackup. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedName = $backupForGKEClient->volumeBackupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]', '[VOLUME_BACKUP]'); - * $response = $backupForGKEClient->getVolumeBackup($formattedName); - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $name Required. Full name of the VolumeBackup resource. - * Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/* - * @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\GkeBackup\V1\VolumeBackup - * - * @throws ApiException if the remote call fails - */ - public function getVolumeBackup($name, array $optionalArgs = []) - { - $request = new GetVolumeBackupRequest(); - $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('GetVolumeBackup', VolumeBackup::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieve the details of a single VolumeRestore. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedName = $backupForGKEClient->volumeRestoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]', '[VOLUME_RESTORE]'); - * $response = $backupForGKEClient->getVolumeRestore($formattedName); - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $name Required. Full name of the VolumeRestore resource. - * Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/* - * @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\GkeBackup\V1\VolumeRestore - * - * @throws ApiException if the remote call fails - */ - public function getVolumeRestore($name, array $optionalArgs = []) - { - $request = new GetVolumeRestoreRequest(); - $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('GetVolumeRestore', VolumeRestore::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists BackupPlans in a given location. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedParent = $backupForGKEClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $backupForGKEClient->listBackupPlans($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $backupForGKEClient->listBackupPlans($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $parent Required. The location that contains the BackupPlans to list. - * Format: projects/*/locations/* - * @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 - * Field match expression used to filter the results. - * @type string $orderBy - * Field by which to sort the results. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listBackupPlans($parent, array $optionalArgs = []) - { - $request = new ListBackupPlansRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListBackupPlans', $optionalArgs, ListBackupPlansResponse::class, $request); - } - - /** - * Lists the Backups for a given BackupPlan. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedParent = $backupForGKEClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - * // Iterate over pages of elements - * $pagedResponse = $backupForGKEClient->listBackups($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $backupForGKEClient->listBackups($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $parent Required. The BackupPlan that contains the Backups to list. - * Format: projects/*/locations/*/backupPlans/* - * @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 - * Field match expression used to filter the results. - * @type string $orderBy - * Field by which to sort the results. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listBackups($parent, array $optionalArgs = []) - { - $request = new ListBackupsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListBackups', $optionalArgs, ListBackupsResponse::class, $request); - } - - /** - * Lists RestorePlans in a given location. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedParent = $backupForGKEClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $backupForGKEClient->listRestorePlans($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $backupForGKEClient->listRestorePlans($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $parent Required. The location that contains the RestorePlans to list. - * Format: projects/*/locations/* - * @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 - * Field match expression used to filter the results. - * @type string $orderBy - * Field by which to sort the results. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listRestorePlans($parent, array $optionalArgs = []) - { - $request = new ListRestorePlansRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListRestorePlans', $optionalArgs, ListRestorePlansResponse::class, $request); - } - - /** - * Lists the Restores for a given RestorePlan. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedParent = $backupForGKEClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - * // Iterate over pages of elements - * $pagedResponse = $backupForGKEClient->listRestores($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $backupForGKEClient->listRestores($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $parent Required. The RestorePlan that contains the Restores to list. - * Format: projects/*/locations/*/restorePlans/* - * @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 - * Field match expression used to filter the results. - * @type string $orderBy - * Field by which to sort the results. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listRestores($parent, array $optionalArgs = []) - { - $request = new ListRestoresRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListRestores', $optionalArgs, ListRestoresResponse::class, $request); - } - - /** - * Lists the VolumeBackups for a given Backup. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedParent = $backupForGKEClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - * // Iterate over pages of elements - * $pagedResponse = $backupForGKEClient->listVolumeBackups($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $backupForGKEClient->listVolumeBackups($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $parent Required. The Backup that contains the VolumeBackups to list. - * Format: projects/*/locations/*/backupPlans/*/backups/* - * @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 - * Field match expression used to filter the results. - * @type string $orderBy - * Field by which to sort the results. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listVolumeBackups($parent, array $optionalArgs = []) - { - $request = new ListVolumeBackupsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListVolumeBackups', $optionalArgs, ListVolumeBackupsResponse::class, $request); - } - - /** - * Lists the VolumeRestores for a given Restore. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $formattedParent = $backupForGKEClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); - * // Iterate over pages of elements - * $pagedResponse = $backupForGKEClient->listVolumeRestores($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $backupForGKEClient->listVolumeRestores($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param string $parent Required. The Restore that contains the VolumeRestores to list. - * Format: projects/*/locations/*/restorePlans/*/restores/* - * @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 - * Field match expression used to filter the results. - * @type string $orderBy - * Field by which to sort the results. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listVolumeRestores($parent, array $optionalArgs = []) - { - $request = new ListVolumeRestoresRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListVolumeRestores', $optionalArgs, ListVolumeRestoresResponse::class, $request); - } - - /** - * Update a Backup. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $backup = new Backup(); - * $operationResponse = $backupForGKEClient->updateBackup($backup); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $backupForGKEClient->updateBackup($backup); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'updateBackup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param Backup $backup Required. A new version of the Backup resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * This is used to specify the fields to be overwritten in the - * Backup targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `backup` will be - * written to the target Backup resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored - * and are not used to update the target Backup. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateBackup($backup, array $optionalArgs = []) - { - $request = new UpdateBackupRequest(); - $requestParamHeaders = []; - $request->setBackup($backup); - $requestParamHeaders['backup.name'] = $backup->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->startOperationsCall('UpdateBackup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Update a BackupPlan. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $backupPlan = new BackupPlan(); - * $operationResponse = $backupForGKEClient->updateBackupPlan($backupPlan); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $backupForGKEClient->updateBackupPlan($backupPlan); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'updateBackupPlan'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param BackupPlan $backupPlan Required. A new version of the BackupPlan resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * This is used to specify the fields to be overwritten in the - * BackupPlan targeted for update. The values for each of these - * updated fields will be taken from the `backup_plan` provided - * with this request. Field names are relative to the root of the resource - * (e.g., `description`, `backup_config.include_volume_data`, etc.) - * If no `update_mask` is provided, all fields in `backup_plan` will be - * written to the target BackupPlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored - * and are not used to update the target BackupPlan. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateBackupPlan($backupPlan, array $optionalArgs = []) - { - $request = new UpdateBackupPlanRequest(); - $requestParamHeaders = []; - $request->setBackupPlan($backupPlan); - $requestParamHeaders['backup_plan.name'] = $backupPlan->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->startOperationsCall('UpdateBackupPlan', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Update a Restore. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $restore = new Restore(); - * $operationResponse = $backupForGKEClient->updateRestore($restore); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $backupForGKEClient->updateRestore($restore); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'updateRestore'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param Restore $restore Required. A new version of the Restore resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * This is used to specify the fields to be overwritten in the - * Restore targeted for update. The values for each of these - * updated fields will be taken from the `restore` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore` will be - * written to the target Restore resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored - * and are not used to update the target Restore. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateRestore($restore, array $optionalArgs = []) - { - $request = new UpdateRestoreRequest(); - $requestParamHeaders = []; - $request->setRestore($restore); - $requestParamHeaders['restore.name'] = $restore->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->startOperationsCall('UpdateRestore', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Update a RestorePlan. - * - * Sample code: - * ``` - * $backupForGKEClient = new BackupForGKEClient(); - * try { - * $restorePlan = new RestorePlan(); - * $operationResponse = $backupForGKEClient->updateRestorePlan($restorePlan); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $backupForGKEClient->updateRestorePlan($restorePlan); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $backupForGKEClient->resumeOperation($operationName, 'updateRestorePlan'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $backupForGKEClient->close(); - * } - * ``` - * - * @param RestorePlan $restorePlan Required. A new version of the RestorePlan resource that contains updated fields. - * This may be sparsely populated if an `update_mask` is provided. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * This is used to specify the fields to be overwritten in the - * RestorePlan targeted for update. The values for each of these - * updated fields will be taken from the `restore_plan` provided - * with this request. Field names are relative to the root of the resource. - * If no `update_mask` is provided, all fields in `restore_plan` will be - * written to the target RestorePlan resource. - * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored - * and are not used to update the target RestorePlan. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateRestorePlan($restorePlan, array $optionalArgs = []) - { - $request = new UpdateRestorePlanRequest(); - $requestParamHeaders = []; - $request->setRestorePlan($restorePlan); - $requestParamHeaders['restore_plan.name'] = $restorePlan->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->startOperationsCall('UpdateRestorePlan', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/GkeBackup/v1/src/V1/gapic_metadata.json b/owl-bot-staging/GkeBackup/v1/src/V1/gapic_metadata.json deleted file mode 100644 index cf8e54b5b4d3..000000000000 --- a/owl-bot-staging/GkeBackup/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.gkebackup.v1", - "libraryPackage": "Google\\Cloud\\GkeBackup\\V1", - "services": { - "BackupForGKE": { - "clients": { - "grpc": { - "libraryClient": "BackupForGKEGapicClient", - "rpcs": { - "CreateBackup": { - "methods": [ - "createBackup" - ] - }, - "CreateBackupPlan": { - "methods": [ - "createBackupPlan" - ] - }, - "CreateRestore": { - "methods": [ - "createRestore" - ] - }, - "CreateRestorePlan": { - "methods": [ - "createRestorePlan" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "DeleteBackupPlan": { - "methods": [ - "deleteBackupPlan" - ] - }, - "DeleteRestore": { - "methods": [ - "deleteRestore" - ] - }, - "DeleteRestorePlan": { - "methods": [ - "deleteRestorePlan" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupPlan": { - "methods": [ - "getBackupPlan" - ] - }, - "GetRestore": { - "methods": [ - "getRestore" - ] - }, - "GetRestorePlan": { - "methods": [ - "getRestorePlan" - ] - }, - "GetVolumeBackup": { - "methods": [ - "getVolumeBackup" - ] - }, - "GetVolumeRestore": { - "methods": [ - "getVolumeRestore" - ] - }, - "ListBackupPlans": { - "methods": [ - "listBackupPlans" - ] - }, - "ListBackups": { - "methods": [ - "listBackups" - ] - }, - "ListRestorePlans": { - "methods": [ - "listRestorePlans" - ] - }, - "ListRestores": { - "methods": [ - "listRestores" - ] - }, - "ListVolumeBackups": { - "methods": [ - "listVolumeBackups" - ] - }, - "ListVolumeRestores": { - "methods": [ - "listVolumeRestores" - ] - }, - "UpdateBackup": { - "methods": [ - "updateBackup" - ] - }, - "UpdateBackupPlan": { - "methods": [ - "updateBackupPlan" - ] - }, - "UpdateRestore": { - "methods": [ - "updateRestore" - ] - }, - "UpdateRestorePlan": { - "methods": [ - "updateRestorePlan" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_client_config.json b/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_client_config.json deleted file mode 100644 index 7c86f570ac49..000000000000 --- a/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_client_config.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "interfaces": { - "google.cloud.gkebackup.v1.BackupForGKE": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [], - "no_retry_2_codes": [], - "no_retry_3_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": 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 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 - }, - "no_retry_3_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - } - }, - "methods": { - "CreateBackup": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateBackupPlan": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "CreateRestore": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateRestorePlan": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeleteBackup": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "DeleteBackupPlan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteRestore": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteRestorePlan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetBackup": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetBackupPlan": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetRestore": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetRestorePlan": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetVolumeBackup": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetVolumeRestore": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListBackupPlans": { - "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" - }, - "ListRestorePlans": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListRestores": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListVolumeBackups": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListVolumeRestores": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateBackup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateBackupPlan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateRestore": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateRestorePlan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_descriptor_config.php b/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_descriptor_config.php deleted file mode 100644 index 69f8f5298390..000000000000 --- a/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_descriptor_config.php +++ /dev/null @@ -1,188 +0,0 @@ - [ - 'google.cloud.gkebackup.v1.BackupForGKE' => [ - 'CreateBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\Backup', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'CreateBackupPlan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\BackupPlan', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'CreateRestore' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\Restore', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'CreateRestorePlan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\RestorePlan', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteBackupPlan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteRestore' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteRestorePlan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\Backup', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateBackupPlan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\BackupPlan', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateRestore' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\Restore', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateRestorePlan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeBackup\V1\RestorePlan', - 'metadataReturnType' => '\Google\Cloud\GkeBackup\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListBackupPlans' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBackupPlans', - ], - ], - 'ListBackups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBackups', - ], - ], - 'ListRestorePlans' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRestorePlans', - ], - ], - 'ListRestores' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRestores', - ], - ], - 'ListVolumeBackups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVolumeBackups', - ], - ], - 'ListVolumeRestores' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVolumeRestores', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_rest_client_config.php b/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_rest_client_config.php deleted file mode 100644 index 043e32abae6d..000000000000 --- a/owl-bot-staging/GkeBackup/v1/src/V1/resources/backup_for_gke_rest_client_config.php +++ /dev/null @@ -1,478 +0,0 @@ - [ - 'google.cloud.gkebackup.v1.BackupForGKE' => [ - 'CreateBackup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupPlans/*}/backups', - 'body' => 'backup', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateBackupPlan' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPlans', - 'body' => 'backup_plan', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'backup_plan_id', - ], - ], - 'CreateRestore' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/restorePlans/*}/restores', - 'body' => 'restore', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'restore_id', - ], - ], - 'CreateRestorePlan' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/restorePlans', - 'body' => 'restore_plan', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'restore_plan_id', - ], - ], - 'DeleteBackup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackupPlan' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteRestore' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteRestorePlan' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/restorePlans/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupPlan' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRestore' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRestorePlan' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/restorePlans/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVolumeBackup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVolumeRestore' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBackupPlans' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPlans', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupPlans/*}/backups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRestorePlans' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/restorePlans', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRestores' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/restorePlans/*}/restores', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListVolumeBackups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupPlans/*/backups/*}/volumeBackups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListVolumeRestores' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/restorePlans/*/restores/*}/volumeRestores', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateBackup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{backup.name=projects/*/locations/*/backupPlans/*/backups/*}', - 'body' => 'backup', - 'placeholders' => [ - 'backup.name' => [ - 'getters' => [ - 'getBackup', - 'getName', - ], - ], - ], - ], - 'UpdateBackupPlan' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}', - 'body' => 'backup_plan', - 'placeholders' => [ - 'backup_plan.name' => [ - 'getters' => [ - 'getBackupPlan', - 'getName', - ], - ], - ], - ], - 'UpdateRestore' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{restore.name=projects/*/locations/*/restorePlans/*/restores/*}', - 'body' => 'restore', - 'placeholders' => [ - 'restore.name' => [ - 'getters' => [ - 'getRestore', - 'getName', - ], - ], - ], - ], - 'UpdateRestorePlan' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{restore_plan.name=projects/*/locations/*/restorePlans/*}', - 'body' => 'restore_plan', - 'placeholders' => [ - 'restore_plan.name' => [ - 'getters' => [ - 'getRestorePlan', - 'getName', - ], - ], - ], - ], - ], - '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.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}: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/GkeBackup/v1/tests/Unit/V1/BackupForGKEClientTest.php b/owl-bot-staging/GkeBackup/v1/tests/Unit/V1/BackupForGKEClientTest.php deleted file mode 100644 index 312423d11e4b..000000000000 --- a/owl-bot-staging/GkeBackup/v1/tests/Unit/V1/BackupForGKEClientTest.php +++ /dev/null @@ -1,2568 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BackupForGKEClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BackupForGKEClient($options); - } - - /** @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'; - $uid = 'uid115792'; - $manual = true; - $deleteLockDays = 1638724265; - $retainDays = 1380805807; - $allNamespaces = true; - $containsVolumeData = false; - $containsSecrets = false; - $stateReason = 'stateReason282113458'; - $resourceCount = 287552926; - $volumeCount = 1362665558; - $sizeBytes = 1796325715; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $podCount = 977657493; - $configBackupSizeBytes = 606785139; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setManual($manual); - $expectedResponse->setDeleteLockDays($deleteLockDays); - $expectedResponse->setRetainDays($retainDays); - $expectedResponse->setAllNamespaces($allNamespaces); - $expectedResponse->setContainsVolumeData($containsVolumeData); - $expectedResponse->setContainsSecrets($containsSecrets); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setResourceCount($resourceCount); - $expectedResponse->setVolumeCount($volumeCount); - $expectedResponse->setSizeBytes($sizeBytes); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $expectedResponse->setPodCount($podCount); - $expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes); - $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->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $response = $gapicClient->createBackup($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/CreateBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $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->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $response = $gapicClient->createBackup($formattedParent); - $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 createBackupPlanTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBackupPlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $cluster = 'cluster872092154'; - $etag = 'etag3123477'; - $deactivated = true; - $protectedPodCount = 1494678716; - $expectedResponse = new BackupPlan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setCluster($cluster); - $expectedResponse->setEtag($etag); - $expectedResponse->setDeactivated($deactivated); - $expectedResponse->setProtectedPodCount($protectedPodCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBackupPlanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $backupPlan = new BackupPlan(); - $backupPlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $backupPlan->setCluster($backupPlanCluster); - $backupPlanId = 'backupPlanId-25762700'; - $response = $gapicClient->createBackupPlan($formattedParent, $backupPlan, $backupPlanId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/CreateBackupPlan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBackupPlan(); - $this->assertProtobufEquals($backupPlan, $actualValue); - $actualValue = $actualApiRequestObject->getBackupPlanId(); - $this->assertProtobufEquals($backupPlanId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupPlanTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createBackupPlanExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBackupPlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $backupPlan = new BackupPlan(); - $backupPlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $backupPlan->setCluster($backupPlanCluster); - $backupPlanId = 'backupPlanId-25762700'; - $response = $gapicClient->createBackupPlan($formattedParent, $backupPlan, $backupPlanId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupPlanTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createRestoreTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createRestoreTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $backup = 'backup-1396673086'; - $cluster = 'cluster872092154'; - $stateReason = 'stateReason282113458'; - $resourcesRestoredCount = 882879616; - $resourcesExcludedCount = 338652236; - $resourcesFailedCount = 217904743; - $volumesRestoredCount = 1005533068; - $etag = 'etag3123477'; - $expectedResponse = new Restore(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setBackup($backup); - $expectedResponse->setCluster($cluster); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setResourcesRestoredCount($resourcesRestoredCount); - $expectedResponse->setResourcesExcludedCount($resourcesExcludedCount); - $expectedResponse->setResourcesFailedCount($resourcesFailedCount); - $expectedResponse->setVolumesRestoredCount($volumesRestoredCount); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createRestoreTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $restore = new Restore(); - $restoreBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $restore->setBackup($restoreBackup); - $restoreId = 'restoreId-1374819220'; - $response = $gapicClient->createRestore($formattedParent, $restore, $restoreId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/CreateRestore', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRestore(); - $this->assertProtobufEquals($restore, $actualValue); - $actualValue = $actualApiRequestObject->getRestoreId(); - $this->assertProtobufEquals($restoreId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRestoreTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createRestoreExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createRestoreTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $restore = new Restore(); - $restoreBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $restore->setBackup($restoreBackup); - $restoreId = 'restoreId-1374819220'; - $response = $gapicClient->createRestore($formattedParent, $restore, $restoreId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRestoreTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createRestorePlanTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createRestorePlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $backupPlan = 'backupPlan1119623046'; - $cluster = 'cluster872092154'; - $etag = 'etag3123477'; - $expectedResponse = new RestorePlan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setBackupPlan($backupPlan); - $expectedResponse->setCluster($cluster); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createRestorePlanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $restorePlan = new RestorePlan(); - $restorePlanBackupPlan = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $restorePlan->setBackupPlan($restorePlanBackupPlan); - $restorePlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $restorePlan->setCluster($restorePlanCluster); - $restorePlanRestoreConfig = new RestoreConfig(); - $restorePlan->setRestoreConfig($restorePlanRestoreConfig); - $restorePlanId = 'restorePlanId126727488'; - $response = $gapicClient->createRestorePlan($formattedParent, $restorePlan, $restorePlanId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/CreateRestorePlan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRestorePlan(); - $this->assertProtobufEquals($restorePlan, $actualValue); - $actualValue = $actualApiRequestObject->getRestorePlanId(); - $this->assertProtobufEquals($restorePlanId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRestorePlanTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createRestorePlanExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createRestorePlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $restorePlan = new RestorePlan(); - $restorePlanBackupPlan = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $restorePlan->setBackupPlan($restorePlanBackupPlan); - $restorePlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $restorePlan->setCluster($restorePlanCluster); - $restorePlanRestoreConfig = new RestoreConfig(); - $restorePlan->setRestoreConfig($restorePlanRestoreConfig); - $restorePlanId = 'restorePlanId126727488'; - $response = $gapicClient->createRestorePlan($formattedParent, $restorePlan, $restorePlanId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRestorePlanTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->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_PLAN]', '[BACKUP]'); - $response = $gapicClient->deleteBackup($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/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_PLAN]', '[BACKUP]'); - $response = $gapicClient->deleteBackup($formattedName); - $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 deleteBackupPlanTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteBackupPlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteBackupPlanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $response = $gapicClient->deleteBackupPlan($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/DeleteBackupPlan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupPlanTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteBackupPlanExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteBackupPlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $response = $gapicClient->deleteBackupPlan($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupPlanTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRestoreTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRestoreTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteRestoreTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); - $response = $gapicClient->deleteRestore($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/DeleteRestore', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRestoreTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRestoreExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRestoreTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); - $response = $gapicClient->deleteRestore($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRestoreTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRestorePlanTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRestorePlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteRestorePlanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $response = $gapicClient->deleteRestorePlan($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/DeleteRestorePlan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRestorePlanTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRestorePlanExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRestorePlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $response = $gapicClient->deleteRestorePlan($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRestorePlanTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $manual = true; - $deleteLockDays = 1638724265; - $retainDays = 1380805807; - $allNamespaces = true; - $containsVolumeData = false; - $containsSecrets = false; - $stateReason = 'stateReason282113458'; - $resourceCount = 287552926; - $volumeCount = 1362665558; - $sizeBytes = 1796325715; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $podCount = 977657493; - $configBackupSizeBytes = 606785139; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setManual($manual); - $expectedResponse->setDeleteLockDays($deleteLockDays); - $expectedResponse->setRetainDays($retainDays); - $expectedResponse->setAllNamespaces($allNamespaces); - $expectedResponse->setContainsVolumeData($containsVolumeData); - $expectedResponse->setContainsSecrets($containsSecrets); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setResourceCount($resourceCount); - $expectedResponse->setVolumeCount($volumeCount); - $expectedResponse->setSizeBytes($sizeBytes); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $expectedResponse->setPodCount($podCount); - $expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $response = $gapicClient->getBackup($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/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_PLAN]', '[BACKUP]'); - try { - $gapicClient->getBackup($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 getBackupPlanTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $cluster = 'cluster872092154'; - $etag = 'etag3123477'; - $deactivated = true; - $protectedPodCount = 1494678716; - $expectedResponse = new BackupPlan(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setCluster($cluster); - $expectedResponse->setEtag($etag); - $expectedResponse->setDeactivated($deactivated); - $expectedResponse->setProtectedPodCount($protectedPodCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $response = $gapicClient->getBackupPlan($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/GetBackupPlan', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupPlanExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - try { - $gapicClient->getBackupPlan($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 getRestoreTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $backup = 'backup-1396673086'; - $cluster = 'cluster872092154'; - $stateReason = 'stateReason282113458'; - $resourcesRestoredCount = 882879616; - $resourcesExcludedCount = 338652236; - $resourcesFailedCount = 217904743; - $volumesRestoredCount = 1005533068; - $etag = 'etag3123477'; - $expectedResponse = new Restore(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setBackup($backup); - $expectedResponse->setCluster($cluster); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setResourcesRestoredCount($resourcesRestoredCount); - $expectedResponse->setResourcesExcludedCount($resourcesExcludedCount); - $expectedResponse->setResourcesFailedCount($resourcesFailedCount); - $expectedResponse->setVolumesRestoredCount($volumesRestoredCount); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); - $response = $gapicClient->getRestore($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/GetRestore', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRestoreExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); - try { - $gapicClient->getRestore($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 getRestorePlanTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $backupPlan = 'backupPlan1119623046'; - $cluster = 'cluster872092154'; - $etag = 'etag3123477'; - $expectedResponse = new RestorePlan(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setBackupPlan($backupPlan); - $expectedResponse->setCluster($cluster); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $response = $gapicClient->getRestorePlan($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/GetRestorePlan', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRestorePlanExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - try { - $gapicClient->getRestorePlan($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 getVolumeBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $volumeBackupHandle = 'volumeBackupHandle-2105959712'; - $storageBytes = 2035244455; - $diskSizeBytes = 275393905; - $stateMessage = 'stateMessage29641305'; - $etag = 'etag3123477'; - $expectedResponse = new VolumeBackup(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setVolumeBackupHandle($volumeBackupHandle); - $expectedResponse->setStorageBytes($storageBytes); - $expectedResponse->setDiskSizeBytes($diskSizeBytes); - $expectedResponse->setStateMessage($stateMessage); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->volumeBackupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]', '[VOLUME_BACKUP]'); - $response = $gapicClient->getVolumeBackup($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/GetVolumeBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVolumeBackupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->volumeBackupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]', '[VOLUME_BACKUP]'); - try { - $gapicClient->getVolumeBackup($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 getVolumeRestoreTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $volumeBackup = 'volumeBackup664943239'; - $volumeHandle = 'volumeHandle837038829'; - $stateMessage = 'stateMessage29641305'; - $etag = 'etag3123477'; - $expectedResponse = new VolumeRestore(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setVolumeBackup($volumeBackup); - $expectedResponse->setVolumeHandle($volumeHandle); - $expectedResponse->setStateMessage($stateMessage); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->volumeRestoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]', '[VOLUME_RESTORE]'); - $response = $gapicClient->getVolumeRestore($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/GetVolumeRestore', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVolumeRestoreExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->volumeRestoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]', '[VOLUME_RESTORE]'); - try { - $gapicClient->getVolumeRestore($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 listBackupPlansTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $backupPlansElement = new BackupPlan(); - $backupPlans = [ - $backupPlansElement, - ]; - $expectedResponse = new ListBackupPlansResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBackupPlans($backupPlans); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listBackupPlans($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBackupPlans()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListBackupPlans', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupPlansExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listBackupPlans($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 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->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $response = $gapicClient->listBackups($formattedParent); - $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.gkebackup.v1.BackupForGKE/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->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - try { - $gapicClient->listBackups($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 listRestorePlansTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $restorePlansElement = new RestorePlan(); - $restorePlans = [ - $restorePlansElement, - ]; - $expectedResponse = new ListRestorePlansResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRestorePlans($restorePlans); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listRestorePlans($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRestorePlans()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListRestorePlans', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRestorePlansExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listRestorePlans($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 listRestoresTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $restoresElement = new Restore(); - $restores = [ - $restoresElement, - ]; - $expectedResponse = new ListRestoresResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRestores($restores); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - $response = $gapicClient->listRestores($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRestores()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListRestores', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRestoresExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->restorePlanName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]'); - try { - $gapicClient->listRestores($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 listVolumeBackupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $volumeBackupsElement = new VolumeBackup(); - $volumeBackups = [ - $volumeBackupsElement, - ]; - $expectedResponse = new ListVolumeBackupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVolumeBackups($volumeBackups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $response = $gapicClient->listVolumeBackups($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVolumeBackups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListVolumeBackups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVolumeBackupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - try { - $gapicClient->listVolumeBackups($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 listVolumeRestoresTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $volumeRestoresElement = new VolumeRestore(); - $volumeRestores = [ - $volumeRestoresElement, - ]; - $expectedResponse = new ListVolumeRestoresResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVolumeRestores($volumeRestores); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); - $response = $gapicClient->listVolumeRestores($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVolumeRestores()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/ListVolumeRestores', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVolumeRestoresExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->restoreName('[PROJECT]', '[LOCATION]', '[RESTORE_PLAN]', '[RESTORE]'); - try { - $gapicClient->listVolumeRestores($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 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'; - $uid = 'uid115792'; - $manual = true; - $deleteLockDays = 1638724265; - $retainDays = 1380805807; - $allNamespaces = true; - $containsVolumeData = false; - $containsSecrets = false; - $stateReason = 'stateReason282113458'; - $resourceCount = 287552926; - $volumeCount = 1362665558; - $sizeBytes = 1796325715; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $podCount = 977657493; - $configBackupSizeBytes = 606785139; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setManual($manual); - $expectedResponse->setDeleteLockDays($deleteLockDays); - $expectedResponse->setRetainDays($retainDays); - $expectedResponse->setAllNamespaces($allNamespaces); - $expectedResponse->setContainsVolumeData($containsVolumeData); - $expectedResponse->setContainsSecrets($containsSecrets); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setResourceCount($resourceCount); - $expectedResponse->setVolumeCount($volumeCount); - $expectedResponse->setSizeBytes($sizeBytes); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $expectedResponse->setPodCount($podCount); - $expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes); - $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 - $backup = new Backup(); - $response = $gapicClient->updateBackup($backup); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/UpdateBackup', $actualApiFuncCall); - $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 - $backup = new Backup(); - $response = $gapicClient->updateBackup($backup); - $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 updateBackupPlanTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateBackupPlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $cluster = 'cluster872092154'; - $etag = 'etag3123477'; - $deactivated = true; - $protectedPodCount = 1494678716; - $expectedResponse = new BackupPlan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setCluster($cluster); - $expectedResponse->setEtag($etag); - $expectedResponse->setDeactivated($deactivated); - $expectedResponse->setProtectedPodCount($protectedPodCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateBackupPlanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $backupPlan = new BackupPlan(); - $backupPlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $backupPlan->setCluster($backupPlanCluster); - $response = $gapicClient->updateBackupPlan($backupPlan); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/UpdateBackupPlan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getBackupPlan(); - $this->assertProtobufEquals($backupPlan, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackupPlanTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateBackupPlanExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateBackupPlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $backupPlan = new BackupPlan(); - $backupPlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $backupPlan->setCluster($backupPlanCluster); - $response = $gapicClient->updateBackupPlan($backupPlan); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackupPlanTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateRestoreTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateRestoreTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $backup = 'backup-1396673086'; - $cluster = 'cluster872092154'; - $stateReason = 'stateReason282113458'; - $resourcesRestoredCount = 882879616; - $resourcesExcludedCount = 338652236; - $resourcesFailedCount = 217904743; - $volumesRestoredCount = 1005533068; - $etag = 'etag3123477'; - $expectedResponse = new Restore(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setBackup($backup); - $expectedResponse->setCluster($cluster); - $expectedResponse->setStateReason($stateReason); - $expectedResponse->setResourcesRestoredCount($resourcesRestoredCount); - $expectedResponse->setResourcesExcludedCount($resourcesExcludedCount); - $expectedResponse->setResourcesFailedCount($resourcesFailedCount); - $expectedResponse->setVolumesRestoredCount($volumesRestoredCount); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateRestoreTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $restore = new Restore(); - $restoreBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $restore->setBackup($restoreBackup); - $response = $gapicClient->updateRestore($restore); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/UpdateRestore', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRestore(); - $this->assertProtobufEquals($restore, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRestoreTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateRestoreExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateRestoreTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $restore = new Restore(); - $restoreBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); - $restore->setBackup($restoreBackup); - $response = $gapicClient->updateRestore($restore); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRestoreTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateRestorePlanTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateRestorePlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $backupPlan = 'backupPlan1119623046'; - $cluster = 'cluster872092154'; - $etag = 'etag3123477'; - $expectedResponse = new RestorePlan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setBackupPlan($backupPlan); - $expectedResponse->setCluster($cluster); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateRestorePlanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $restorePlan = new RestorePlan(); - $restorePlanBackupPlan = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $restorePlan->setBackupPlan($restorePlanBackupPlan); - $restorePlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $restorePlan->setCluster($restorePlanCluster); - $restorePlanRestoreConfig = new RestoreConfig(); - $restorePlan->setRestoreConfig($restorePlanRestoreConfig); - $response = $gapicClient->updateRestorePlan($restorePlan); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/UpdateRestorePlan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRestorePlan(); - $this->assertProtobufEquals($restorePlan, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRestorePlanTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateRestorePlanExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateRestorePlanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $restorePlan = new RestorePlan(); - $restorePlanBackupPlan = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); - $restorePlan->setBackupPlan($restorePlanBackupPlan); - $restorePlanCluster = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $restorePlan->setCluster($restorePlanCluster); - $restorePlanRestoreConfig = new RestoreConfig(); - $restorePlan->setRestoreConfig($restorePlanRestoreConfig); - $response = $gapicClient->updateRestorePlan($restorePlan); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRestorePlanTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1Beta1/Membership.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/GPBMetadata/Google/Cloud/Gkehub/V1Beta1/Membership.php deleted file mode 100644 index ba4dc977623cfb6c217798ec3aedc9bfd059a379..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8786 zcmcIqJ9FFE6<(5(EFDUgeEpK;c#XiDU0Gw3W9`nyLqFCOMa$ZiL@q^b;tVq!5QHeK zKmfr*w&GEfq)3y@B&qTXGLt50Q>93gaha{+CR=1uY>^^ew#vCL0HkP|(rnzA0`56D z&+mNq0{1_1_guK4tQof9X@SvJT8B!oXDF`c1di@lN-NymH9SRkx~^#%UQSU~E6P@- zu9R2T>)%FE-w8e4C@3Ar=~zZyx16w@@9Z0UVJm-dr)31%oqX5mwhYhTGu<3h3}91dRwj>a0((fI7n3e|BBK({pCS2iPE@B$S4=Y}oI)D=I_ z0{rhC({Gx#8JL=7{uupvpzLavZ=m?`wY#CM2c}~yRG?z(#^Ozd>!fSnaUJykfg-J{ z(vV;{8tZmoc(!IWRt;bGOgC`6DlRP)Iz|u$l3rQ7DIQDJnY+p&x3N$-X5<4U@IoW` zbVc!uAoT2e%xzUns;r#VTGWSh7sR4o)WX*fgy6im|61 zn2vWc(V8KOW@IBb9J}L%wr$#-M#ZJ2dNL=Y+%c;+HGh9}izC^(i8UK&U3YZZnyWXq zF(u(^62fZi_Cr%tRI%NT3g|Jm+hUY*S^)3C7x&@TN&1Xj<*Re7D|5UnbD}F3E(=wf zYhv5d3gF$ja6NHjm!`Sd5_uL2t|S(CBAMdW4ROngGnRLvjEO}OEEpJIOXc}fx|o+f z6QUJ?48B+(jrUwVPunW=`3?0?X8>Z1Am?C=V$FO?Ni9yTWWFqB$P<{bw3cD{^Jyis zm|cE9$88=MrCh8lx51>!cHkXSO(`-D*|xv{tjGC`d`1eNF=^Os*TKxrkKyI)a(=|8 zl!X|3!jreiBN(Ut8S~>z&8-pD(5f@IzYk$b3xhq!GlRqVDW>J!p<0S^HTUuZ$m*Vf z>Y6kO^Ak+Ng47^0l#AMfKNY1y7g1eEof%oGZCHksnjB3E^I$yZpxiXu^MFz;*D3M< zF5uJ%n!01#1_OKUM0PaAmtZQi%^!sZRXZ)!W=Nv}=S_RpL)BiWBTl22hpsU{gG$evu_;o5+*Y+exO;QfyIkn7SeZ9>i2*g*F z_4TdCwc>WYwo|I_)XL5J(`vc7v$b6MBa9K82sc`TY?2n~iPhH@kwY2|OAOYoA1NlH+l3 z=v664h=7(+RZ1Gc@*9=V@6tfx$I3O>4VU7AYwBLJtJ&r*&hvOOjFBo_NGy_O$vH7R zdh$t|LN9l86V3_fX~ya@Z0wvy-6t?7)ifQKks#3x!{>rDuEJ$l#8e$-`>vC3!K^g* z00}!CYSG|i<4$k~3}Bl9&?Hku2jTu*zbR$nL8#t`Ir$J788Qcxz0oI^;H=J@wdw0f z7ld;4F+kkMWC3O(?=92bk8K-gmJ1DC)Ax}mvT@Ap%c#Fi!%R;fpHvqGTds>rYVEFR zN4-V8W%tI(r!X!3VDo^E{fLPdK2OzTsghM&%flaE4riIooL)I0c*ovyE$T zuCqbP+x0T;OzCai36Z$b#EwTd4sc%(w%D3jkn=kd{1~9v(pT=+mvIr z_2%c#_I-vQ(;N|gnTFYT{4xqjR$)xXkT4t0F5eki%6+oA5(>)r^)O`~^7MR)yx&U` zX~>7i35C=Sj8WC(0?d^vtNom28YWA%a^X~>Qn3iys=u|D6<qGhM>y zyBf}U9}g&4)>z4;2o@i^9yt3(&t?J(Vb`=I^AXJUB1}3St>D%nt2=&K{b>p=AG6qZ z@kqcR1(=ff>7&(j@AC!{75k0W&Duz^n+X$H7O_mTp^f_keNSsy29{Z7aZ25S3u{Iq zY%*#e_H4&Q%-&2f)xV-!CAJBPO_DlKp9zHWZp1=+pdd{i!lVoqYn>Csik5turqkoK zLN!y!5Gnc`F0ZmZ&T&^x8J^ca>r0H=4%>!(a}SH5jc(Xk1rKW3=%|H<t} zd2CYR`#ecCWQm+Mu4R~!d*Y3Kl-YBV>AjQGQN2oq2$h zR@T$$AqSaqa`VA#=S8B>BL&Q5+i2q^OCFfVMy1svTpehWNU91G{3J|7p2*1K8Ci}F z^Uzm+l>${3N5Zdfs$Z@k|Mk#(xwlHV*XMX*i%^9dLroIyUFg%zND-}tWARk~n}T!E zF>%Bb`_8eb{2<)wJIA`iPV)Gv5p`z-5uDe7=Hc6bIC&X*5QzobiU&c4a$TOVW*b|; zwBk9=h^kI^@D}bH8R5V^5$$oY3BhP4TY#Qpu<4Rn{?}Q!jC-ahVJk-bZREqIZjisE zV78AOkm0AFeXB+NFMJ?NYv2jjF(IBowfvJW{`s5qhvb9k#n1~*p&mpBNK1)>qotk$ zqgO@2x5yt;Fw;XW$Z+uLSt~slnfR!s<5pA1c#X|HXIx81uZj$X$bV8uRr~l086L&{ z<d#Zm-bd=GqFjhb&#U4!o}62f2HlEL2^r1H;`QEx_Q-^&;r@ zUJ$r`A)kNt>{;K*TTO z7{KJ?S1JR)o4Cgf{eAlC8v8H;4+rsOLyk}PocJ)}rM%k^-%ZdDCvf^V@XHDI^~G1| xx4C$sz~l=BzMxPL3tAJ*n)ly}-ZtOjpCcr`UZ6b1)CYXIz*h1v436Lk;D2)UE)M_z diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ApplianceCluster.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ApplianceCluster.php deleted file mode 100644 index 30a936417d2c..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ApplianceCluster.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.gkehub.v1beta1.ApplianceCluster - */ -class ApplianceCluster extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. Self-link of the GCP resource for the Appliance Cluster. For - * example: - * //transferappliance.googleapis.com/projects/my-project/locations/us-west1-a/appliances/my-appliance - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $resource_link = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_link - * Immutable. Self-link of the GCP resource for the Appliance Cluster. For - * example: - * //transferappliance.googleapis.com/projects/my-project/locations/us-west1-a/appliances/my-appliance - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. Self-link of the GCP resource for the Appliance Cluster. For - * example: - * //transferappliance.googleapis.com/projects/my-project/locations/us-west1-a/appliances/my-appliance - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getResourceLink() - { - return $this->resource_link; - } - - /** - * Immutable. Self-link of the GCP resource for the Appliance Cluster. For - * example: - * //transferappliance.googleapis.com/projects/my-project/locations/us-west1-a/appliances/my-appliance - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setResourceLink($var) - { - GPBUtil::checkString($var, True); - $this->resource_link = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Authority.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Authority.php deleted file mode 100644 index d6571626e5a5..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Authority.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.gkehub.v1beta1.Authority - */ -class Authority extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and - * be a valid URL with length <2000 characters. - * If set, then Google will allow valid OIDC tokens from this issuer to - * authenticate within the workload_identity_pool. OIDC discovery will be - * performed on this URI to validate tokens from the issuer. - * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly - * modified; it must be cleared (and Workload Identity disabled) before using - * a new issuer (and re-enabling Workload Identity). - * - * Generated from protobuf field string issuer = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $issuer = ''; - /** - * Output only. The name of the workload identity pool in which `issuer` will be - * recognized. - * There is a single Workload Identity Pool per Hub that is shared - * between all Memberships that belong to that Hub. For a Hub hosted in - * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, - * although this is subject to change in newer versions of this API. - * - * Generated from protobuf field string workload_identity_pool = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $workload_identity_pool = ''; - /** - * Output only. An identity provider that reflects the `issuer` in the workload identity - * pool. - * - * Generated from protobuf field string identity_provider = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $identity_provider = ''; - /** - * Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517). - * When this field is set, OIDC discovery will NOT be performed on `issuer`, - * and instead OIDC tokens will be validated using this field. - * - * Generated from protobuf field bytes oidc_jwks = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $oidc_jwks = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $issuer - * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and - * be a valid URL with length <2000 characters. - * If set, then Google will allow valid OIDC tokens from this issuer to - * authenticate within the workload_identity_pool. OIDC discovery will be - * performed on this URI to validate tokens from the issuer. - * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly - * modified; it must be cleared (and Workload Identity disabled) before using - * a new issuer (and re-enabling Workload Identity). - * @type string $workload_identity_pool - * Output only. The name of the workload identity pool in which `issuer` will be - * recognized. - * There is a single Workload Identity Pool per Hub that is shared - * between all Memberships that belong to that Hub. For a Hub hosted in - * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, - * although this is subject to change in newer versions of this API. - * @type string $identity_provider - * Output only. An identity provider that reflects the `issuer` in the workload identity - * pool. - * @type string $oidc_jwks - * Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517). - * When this field is set, OIDC discovery will NOT be performed on `issuer`, - * and instead OIDC tokens will be validated using this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and - * be a valid URL with length <2000 characters. - * If set, then Google will allow valid OIDC tokens from this issuer to - * authenticate within the workload_identity_pool. OIDC discovery will be - * performed on this URI to validate tokens from the issuer. - * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly - * modified; it must be cleared (and Workload Identity disabled) before using - * a new issuer (and re-enabling Workload Identity). - * - * Generated from protobuf field string issuer = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getIssuer() - { - return $this->issuer; - } - - /** - * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and - * be a valid URL with length <2000 characters. - * If set, then Google will allow valid OIDC tokens from this issuer to - * authenticate within the workload_identity_pool. OIDC discovery will be - * performed on this URI to validate tokens from the issuer. - * Clearing `issuer` disables Workload Identity. `issuer` cannot be directly - * modified; it must be cleared (and Workload Identity disabled) before using - * a new issuer (and re-enabling Workload Identity). - * - * Generated from protobuf field string issuer = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setIssuer($var) - { - GPBUtil::checkString($var, True); - $this->issuer = $var; - - return $this; - } - - /** - * Output only. The name of the workload identity pool in which `issuer` will be - * recognized. - * There is a single Workload Identity Pool per Hub that is shared - * between all Memberships that belong to that Hub. For a Hub hosted in - * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, - * although this is subject to change in newer versions of this API. - * - * Generated from protobuf field string workload_identity_pool = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getWorkloadIdentityPool() - { - return $this->workload_identity_pool; - } - - /** - * Output only. The name of the workload identity pool in which `issuer` will be - * recognized. - * There is a single Workload Identity Pool per Hub that is shared - * between all Memberships that belong to that Hub. For a Hub hosted in - * {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, - * although this is subject to change in newer versions of this API. - * - * Generated from protobuf field string workload_identity_pool = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setWorkloadIdentityPool($var) - { - GPBUtil::checkString($var, True); - $this->workload_identity_pool = $var; - - return $this; - } - - /** - * Output only. An identity provider that reflects the `issuer` in the workload identity - * pool. - * - * Generated from protobuf field string identity_provider = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getIdentityProvider() - { - return $this->identity_provider; - } - - /** - * Output only. An identity provider that reflects the `issuer` in the workload identity - * pool. - * - * Generated from protobuf field string identity_provider = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setIdentityProvider($var) - { - GPBUtil::checkString($var, True); - $this->identity_provider = $var; - - return $this; - } - - /** - * Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517). - * When this field is set, OIDC discovery will NOT be performed on `issuer`, - * and instead OIDC tokens will be validated using this field. - * - * Generated from protobuf field bytes oidc_jwks = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOidcJwks() - { - return $this->oidc_jwks; - } - - /** - * Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517). - * When this field is set, OIDC discovery will NOT be performed on `issuer`, - * and instead OIDC tokens will be validated using this field. - * - * Generated from protobuf field bytes oidc_jwks = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOidcJwks($var) - { - GPBUtil::checkString($var, False); - $this->oidc_jwks = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgent.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgent.php deleted file mode 100644 index 07ed8a4a59ef..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgent.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.gkehub.v1beta1.ConnectAgent - */ -class ConnectAgent extends \Google\Protobuf\Internal\Message -{ - /** - * Do not set. - * - * Generated from protobuf field string name = 1 [deprecated = true]; - * @deprecated - */ - protected $name = ''; - /** - * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com - * requires the use of a proxy. Format must be in the form - * `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol - * supported by the proxy. This will direct the connect agent's outbound - * traffic through a HTTP(S) proxy. - * - * Generated from protobuf field bytes proxy = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $proxy = ''; - /** - * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. - * The Connect Agent is authorized automatically when run in the default - * namespace. Otherwise, explicit authorization must be granted with an - * additional IAM binding. - * - * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $namespace = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Do not set. - * @type string $proxy - * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com - * requires the use of a proxy. Format must be in the form - * `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol - * supported by the proxy. This will direct the connect agent's outbound - * traffic through a HTTP(S) proxy. - * @type string $namespace - * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. - * The Connect Agent is authorized automatically when run in the default - * namespace. Otherwise, explicit authorization must be granted with an - * additional IAM binding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Do not set. - * - * Generated from protobuf field string name = 1 [deprecated = true]; - * @return string - * @deprecated - */ - public function getName() - { - @trigger_error('name is deprecated.', E_USER_DEPRECATED); - return $this->name; - } - - /** - * Do not set. - * - * Generated from protobuf field string name = 1 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setName($var) - { - @trigger_error('name is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com - * requires the use of a proxy. Format must be in the form - * `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol - * supported by the proxy. This will direct the connect agent's outbound - * traffic through a HTTP(S) proxy. - * - * Generated from protobuf field bytes proxy = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getProxy() - { - return $this->proxy; - } - - /** - * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com - * requires the use of a proxy. Format must be in the form - * `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol - * supported by the proxy. This will direct the connect agent's outbound - * traffic through a HTTP(S) proxy. - * - * Generated from protobuf field bytes proxy = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setProxy($var) - { - GPBUtil::checkString($var, False); - $this->proxy = $var; - - return $this; - } - - /** - * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. - * The Connect Agent is authorized automatically when run in the default - * namespace. Otherwise, explicit authorization must be granted with an - * additional IAM binding. - * - * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. - * The Connect Agent is authorized automatically when run in the default - * namespace. Otherwise, explicit authorization must be granted with an - * additional IAM binding. - * - * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNamespace($var) - { - GPBUtil::checkString($var, True); - $this->namespace = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgentResource.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgentResource.php deleted file mode 100644 index cb87c2c398b5..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ConnectAgentResource.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.gkehub.v1beta1.ConnectAgentResource - */ -class ConnectAgentResource extends \Google\Protobuf\Internal\Message -{ - /** - * Kubernetes type of the resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.TypeMeta type = 1; - */ - protected $type = null; - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 2; - */ - protected $manifest = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1beta1\TypeMeta $type - * Kubernetes type of the resource. - * @type string $manifest - * YAML manifest of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Kubernetes type of the resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.TypeMeta type = 1; - * @return \Google\Cloud\GkeHub\V1beta1\TypeMeta|null - */ - public function getType() - { - return $this->type; - } - - public function hasType() - { - return isset($this->type); - } - - public function clearType() - { - unset($this->type); - } - - /** - * Kubernetes type of the resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.TypeMeta type = 1; - * @param \Google\Cloud\GkeHub\V1beta1\TypeMeta $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\TypeMeta::class); - $this->type = $var; - - return $this; - } - - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 2; - * @return string - */ - public function getManifest() - { - return $this->manifest; - } - - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 2; - * @param string $var - * @return $this - */ - public function setManifest($var) - { - GPBUtil::checkString($var, True); - $this->manifest = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/CreateMembershipRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/CreateMembershipRequest.php deleted file mode 100644 index bb3b559069a9..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/CreateMembershipRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.gkehub.v1beta1.CreateMembershipRequest - */ -class CreateMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Memberships will be created. - * Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC - * 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string membership_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $membership_id = ''; - /** - * Required. The membership to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource = null; - /** - * Optional. A 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Memberships will be created. - * Specified in the format `projects/*/locations/*`. - * @type string $membership_id - * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC - * 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * @type \Google\Cloud\GkeHub\V1beta1\Membership $resource - * Required. The membership to create. - * @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 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\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Memberships will be created. - * 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 parent (project and location) where the Memberships will be created. - * 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; - } - - /** - * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC - * 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string membership_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMembershipId() - { - return $this->membership_id; - } - - /** - * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC - * 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string membership_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMembershipId($var) - { - GPBUtil::checkString($var, True); - $this->membership_id = $var; - - return $this; - } - - /** - * Required. The membership to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1beta1\Membership|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Required. The membership to create. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1beta1\Membership $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\Membership::class); - $this->resource = $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 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 = 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 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 = 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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/DeleteMembershipRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/DeleteMembershipRequest.php deleted file mode 100644 index 78e04fbab6d5..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/DeleteMembershipRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.gkehub.v1beta1.DeleteMembershipRequest - */ -class DeleteMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * 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 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * @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 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\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated 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 Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 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 = 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 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 = 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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/EdgeCluster.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/EdgeCluster.php deleted file mode 100644 index b37310368881..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/EdgeCluster.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.gkehub.v1beta1.EdgeCluster - */ -class EdgeCluster extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. Self-link of the GCP resource for the Edge Cluster. For - * example: - * //edgecontainer.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $resource_link = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_link - * Immutable. Self-link of the GCP resource for the Edge Cluster. For - * example: - * //edgecontainer.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. Self-link of the GCP resource for the Edge Cluster. For - * example: - * //edgecontainer.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getResourceLink() - { - return $this->resource_link; - } - - /** - * Immutable. Self-link of the GCP resource for the Edge Cluster. For - * example: - * //edgecontainer.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setResourceLink($var) - { - GPBUtil::checkString($var, True); - $this->resource_link = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestRequest.php deleted file mode 100644 index ef7bcab84df7..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestRequest.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.gkehub.v1beta1.GenerateConnectManifestRequest - */ -class GenerateConnectManifestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Membership resource name the Agent will associate with, in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The connect agent to generate manifest for. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.ConnectAgent connect_agent = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $connect_agent = null; - /** - * Optional. The Connect agent version to use. Defaults to the most current version. - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = ''; - /** - * Optional. If true, generate the resources for upgrade only. Some resources - * generated only for installation (e.g. secrets) will be excluded. - * - * Generated from protobuf field bool is_upgrade = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $is_upgrade = false; - /** - * Optional. The registry to fetch the connect agent image from. Defaults to - * gcr.io/gkeconnect. - * - * Generated from protobuf field string registry = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $registry = ''; - /** - * Optional. The image pull secret content for the registry, if not public. - * - * Generated from protobuf field bytes image_pull_secret_content = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image_pull_secret_content = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Membership resource name the Agent will associate with, in the format - * `projects/*/locations/*/memberships/*`. - * @type \Google\Cloud\GkeHub\V1beta1\ConnectAgent $connect_agent - * Optional. The connect agent to generate manifest for. - * @type string $version - * Optional. The Connect agent version to use. Defaults to the most current version. - * @type bool $is_upgrade - * Optional. If true, generate the resources for upgrade only. Some resources - * generated only for installation (e.g. secrets) will be excluded. - * @type string $registry - * Optional. The registry to fetch the connect agent image from. Defaults to - * gcr.io/gkeconnect. - * @type string $image_pull_secret_content - * Optional. The image pull secret content for the registry, if not public. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Membership resource name the Agent will associate with, in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated 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 Membership resource name the Agent will associate with, in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 connect agent to generate manifest for. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.ConnectAgent connect_agent = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1beta1\ConnectAgent|null - */ - public function getConnectAgent() - { - return $this->connect_agent; - } - - public function hasConnectAgent() - { - return isset($this->connect_agent); - } - - public function clearConnectAgent() - { - unset($this->connect_agent); - } - - /** - * Optional. The connect agent to generate manifest for. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.ConnectAgent connect_agent = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1beta1\ConnectAgent $var - * @return $this - */ - public function setConnectAgent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\ConnectAgent::class); - $this->connect_agent = $var; - - return $this; - } - - /** - * Optional. The Connect agent version to use. Defaults to the most current version. - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. The Connect agent version to use. Defaults to the most current version. - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. If true, generate the resources for upgrade only. Some resources - * generated only for installation (e.g. secrets) will be excluded. - * - * Generated from protobuf field bool is_upgrade = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIsUpgrade() - { - return $this->is_upgrade; - } - - /** - * Optional. If true, generate the resources for upgrade only. Some resources - * generated only for installation (e.g. secrets) will be excluded. - * - * Generated from protobuf field bool is_upgrade = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIsUpgrade($var) - { - GPBUtil::checkBool($var); - $this->is_upgrade = $var; - - return $this; - } - - /** - * Optional. The registry to fetch the connect agent image from. Defaults to - * gcr.io/gkeconnect. - * - * Generated from protobuf field string registry = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRegistry() - { - return $this->registry; - } - - /** - * Optional. The registry to fetch the connect agent image from. Defaults to - * gcr.io/gkeconnect. - * - * Generated from protobuf field string registry = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRegistry($var) - { - GPBUtil::checkString($var, True); - $this->registry = $var; - - return $this; - } - - /** - * Optional. The image pull secret content for the registry, if not public. - * - * Generated from protobuf field bytes image_pull_secret_content = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImagePullSecretContent() - { - return $this->image_pull_secret_content; - } - - /** - * Optional. The image pull secret content for the registry, if not public. - * - * Generated from protobuf field bytes image_pull_secret_content = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImagePullSecretContent($var) - { - GPBUtil::checkString($var, False); - $this->image_pull_secret_content = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestResponse.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestResponse.php deleted file mode 100644 index 9e192e58618a..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateConnectManifestResponse.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.gkehub.v1beta1.GenerateConnectManifestResponse - */ -class GenerateConnectManifestResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The ordered list of Kubernetes resources that need to be applied to the - * cluster for GKE Connect agent installation/upgrade. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ConnectAgentResource manifest = 1; - */ - private $manifest; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\GkeHub\V1beta1\ConnectAgentResource>|\Google\Protobuf\Internal\RepeatedField $manifest - * The ordered list of Kubernetes resources that need to be applied to the - * cluster for GKE Connect agent installation/upgrade. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * The ordered list of Kubernetes resources that need to be applied to the - * cluster for GKE Connect agent installation/upgrade. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ConnectAgentResource manifest = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getManifest() - { - return $this->manifest; - } - - /** - * The ordered list of Kubernetes resources that need to be applied to the - * cluster for GKE Connect agent installation/upgrade. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ConnectAgentResource manifest = 1; - * @param array<\Google\Cloud\GkeHub\V1beta1\ConnectAgentResource>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setManifest($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1beta1\ConnectAgentResource::class); - $this->manifest = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestRequest.php deleted file mode 100644 index 8e8018991a7f..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.gkehub.v1beta1.GenerateExclusivityManifestRequest - */ -class GenerateExclusivityManifestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The YAML manifest of the membership CRD retrieved by - * `kubectl get customresourcedefinitions membership`. - * Leave empty if the resource does not exist. - * - * Generated from protobuf field string crd_manifest = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $crd_manifest = ''; - /** - * Optional. The YAML manifest of the membership CR retrieved by - * `kubectl get memberships membership`. - * Leave empty if the resource does not exist. - * - * Generated from protobuf field string cr_manifest = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cr_manifest = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * @type string $crd_manifest - * Optional. The YAML manifest of the membership CRD retrieved by - * `kubectl get customresourcedefinitions membership`. - * Leave empty if the resource does not exist. - * @type string $cr_manifest - * Optional. The YAML manifest of the membership CR retrieved by - * `kubectl get memberships membership`. - * Leave empty if the resource does not exist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated 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 Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 YAML manifest of the membership CRD retrieved by - * `kubectl get customresourcedefinitions membership`. - * Leave empty if the resource does not exist. - * - * Generated from protobuf field string crd_manifest = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCrdManifest() - { - return $this->crd_manifest; - } - - /** - * Optional. The YAML manifest of the membership CRD retrieved by - * `kubectl get customresourcedefinitions membership`. - * Leave empty if the resource does not exist. - * - * Generated from protobuf field string crd_manifest = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCrdManifest($var) - { - GPBUtil::checkString($var, True); - $this->crd_manifest = $var; - - return $this; - } - - /** - * Optional. The YAML manifest of the membership CR retrieved by - * `kubectl get memberships membership`. - * Leave empty if the resource does not exist. - * - * Generated from protobuf field string cr_manifest = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCrManifest() - { - return $this->cr_manifest; - } - - /** - * Optional. The YAML manifest of the membership CR retrieved by - * `kubectl get memberships membership`. - * Leave empty if the resource does not exist. - * - * Generated from protobuf field string cr_manifest = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCrManifest($var) - { - GPBUtil::checkString($var, True); - $this->cr_manifest = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestResponse.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestResponse.php deleted file mode 100644 index 101caff844b2..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GenerateExclusivityManifestResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.gkehub.v1beta1.GenerateExclusivityManifestResponse - */ -class GenerateExclusivityManifestResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The YAML manifest of the membership CRD to apply if a newer version of the - * CRD is available. Empty if no update needs to be applied. - * - * Generated from protobuf field string crd_manifest = 1; - */ - protected $crd_manifest = ''; - /** - * The YAML manifest of the membership CR to apply if a new version of the - * CR is available. Empty if no update needs to be applied. - * - * Generated from protobuf field string cr_manifest = 2; - */ - protected $cr_manifest = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $crd_manifest - * The YAML manifest of the membership CRD to apply if a newer version of the - * CRD is available. Empty if no update needs to be applied. - * @type string $cr_manifest - * The YAML manifest of the membership CR to apply if a new version of the - * CR is available. Empty if no update needs to be applied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * The YAML manifest of the membership CRD to apply if a newer version of the - * CRD is available. Empty if no update needs to be applied. - * - * Generated from protobuf field string crd_manifest = 1; - * @return string - */ - public function getCrdManifest() - { - return $this->crd_manifest; - } - - /** - * The YAML manifest of the membership CRD to apply if a newer version of the - * CRD is available. Empty if no update needs to be applied. - * - * Generated from protobuf field string crd_manifest = 1; - * @param string $var - * @return $this - */ - public function setCrdManifest($var) - { - GPBUtil::checkString($var, True); - $this->crd_manifest = $var; - - return $this; - } - - /** - * The YAML manifest of the membership CR to apply if a new version of the - * CR is available. Empty if no update needs to be applied. - * - * Generated from protobuf field string cr_manifest = 2; - * @return string - */ - public function getCrManifest() - { - return $this->cr_manifest; - } - - /** - * The YAML manifest of the membership CR to apply if a new version of the - * CR is available. Empty if no update needs to be applied. - * - * Generated from protobuf field string cr_manifest = 2; - * @param string $var - * @return $this - */ - public function setCrManifest($var) - { - GPBUtil::checkString($var, True); - $this->cr_manifest = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GetMembershipRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GetMembershipRequest.php deleted file mode 100644 index 73c43eb9afda..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GetMembershipRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.gkehub.v1beta1.GetMembershipRequest - */ -class GetMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * 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 Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated 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 Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeCluster.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeCluster.php deleted file mode 100644 index 6cae83514f85..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeCluster.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.gkehub.v1beta1.GkeCluster - */ -class GkeCluster extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. Self-link of the GCP resource for the GKE cluster. For example: - * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * Zonal clusters are also supported. - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $resource_link = ''; - /** - * Output only. If cluster_missing is set then it denotes that the GKE cluster no longer - * exists in the GKE Control Plane. - * - * Generated from protobuf field bool cluster_missing = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_missing = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_link - * Immutable. Self-link of the GCP resource for the GKE cluster. For example: - * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * Zonal clusters are also supported. - * @type bool $cluster_missing - * Output only. If cluster_missing is set then it denotes that the GKE cluster no longer - * exists in the GKE Control Plane. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. Self-link of the GCP resource for the GKE cluster. For example: - * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * Zonal clusters are also supported. - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getResourceLink() - { - return $this->resource_link; - } - - /** - * Immutable. Self-link of the GCP resource for the GKE cluster. For example: - * //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - * Zonal clusters are also supported. - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setResourceLink($var) - { - GPBUtil::checkString($var, True); - $this->resource_link = $var; - - return $this; - } - - /** - * Output only. If cluster_missing is set then it denotes that the GKE cluster no longer - * exists in the GKE Control Plane. - * - * Generated from protobuf field bool cluster_missing = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getClusterMissing() - { - return $this->cluster_missing; - } - - /** - * Output only. If cluster_missing is set then it denotes that the GKE cluster no longer - * exists in the GKE Control Plane. - * - * Generated from protobuf field bool cluster_missing = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setClusterMissing($var) - { - GPBUtil::checkBool($var); - $this->cluster_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeHubMembershipServiceGrpcClient.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeHubMembershipServiceGrpcClient.php deleted file mode 100644 index 56683e227bd9..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/GkeHubMembershipServiceGrpcClient.php +++ /dev/null @@ -1,185 +0,0 @@ -_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/ListMemberships', - $argument, - ['\Google\Cloud\GkeHub\V1beta1\ListMembershipsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets the details of a Membership. - * @param \Google\Cloud\GkeHub\V1beta1\GetMembershipRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetMembership(\Google\Cloud\GkeHub\V1beta1\GetMembershipRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/GetMembership', - $argument, - ['\Google\Cloud\GkeHub\V1beta1\Membership', 'decode'], - $metadata, $options); - } - - /** - * Creates a new Membership. - * - * **This is currently only supported for GKE clusters on Google Cloud**. - * To register other clusters, follow the instructions at - * https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. - * @param \Google\Cloud\GkeHub\V1beta1\CreateMembershipRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateMembership(\Google\Cloud\GkeHub\V1beta1\CreateMembershipRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/CreateMembership', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Removes a Membership. - * - * **This is currently only supported for GKE clusters on Google Cloud**. - * To unregister other clusters, follow the instructions at - * https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. - * @param \Google\Cloud\GkeHub\V1beta1\DeleteMembershipRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteMembership(\Google\Cloud\GkeHub\V1beta1\DeleteMembershipRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/DeleteMembership', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates an existing Membership. - * @param \Google\Cloud\GkeHub\V1beta1\UpdateMembershipRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateMembership(\Google\Cloud\GkeHub\V1beta1\UpdateMembershipRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/UpdateMembership', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Generates the manifest for deployment of the GKE connect agent. - * - * **This method is used internally by Google-provided libraries.** - * Most clients should not need to call this method directly. - * @param \Google\Cloud\GkeHub\V1beta1\GenerateConnectManifestRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GenerateConnectManifest(\Google\Cloud\GkeHub\V1beta1\GenerateConnectManifestRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/GenerateConnectManifest', - $argument, - ['\Google\Cloud\GkeHub\V1beta1\GenerateConnectManifestResponse', 'decode'], - $metadata, $options); - } - - /** - * ValidateExclusivity validates the state of exclusivity in the cluster. - * The validation does not depend on an existing Hub membership resource. - * @param \Google\Cloud\GkeHub\V1beta1\ValidateExclusivityRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ValidateExclusivity(\Google\Cloud\GkeHub\V1beta1\ValidateExclusivityRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/ValidateExclusivity', - $argument, - ['\Google\Cloud\GkeHub\V1beta1\ValidateExclusivityResponse', 'decode'], - $metadata, $options); - } - - /** - * GenerateExclusivityManifest generates the manifests to update the - * exclusivity artifacts in the cluster if needed. - * - * Exclusivity artifacts include the Membership custom resource definition - * (CRD) and the singleton Membership custom resource (CR). Combined with - * ValidateExclusivity, exclusivity artifacts guarantee that a Kubernetes - * cluster is only registered to a single GKE Hub. - * - * The Membership CRD is versioned, and may require conversion when the GKE - * Hub API server begins serving a newer version of the CRD and - * corresponding CR. The response will be the converted CRD and CR if there - * are any differences between the versions. - * @param \Google\Cloud\GkeHub\V1beta1\GenerateExclusivityManifestRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GenerateExclusivityManifest(\Google\Cloud\GkeHub\V1beta1\GenerateExclusivityManifestRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/GenerateExclusivityManifest', - $argument, - ['\Google\Cloud\GkeHub\V1beta1\GenerateExclusivityManifestResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesMetadata.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesMetadata.php deleted file mode 100644 index d9b43c052789..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesMetadata.php +++ /dev/null @@ -1,272 +0,0 @@ -google.cloud.gkehub.v1beta1.KubernetesMetadata - */ -class KubernetesMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Kubernetes API server version string as reported by '/version'. - * - * Generated from protobuf field string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kubernetes_api_server_version = ''; - /** - * Output only. Node providerID as reported by the first node in the list of nodes on - * the Kubernetes endpoint. On Kubernetes platforms that support zero-node - * clusters (like GKE-on-GCP), the node_count will be zero and the - * node_provider_id will be empty. - * - * Generated from protobuf field string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_provider_id = ''; - /** - * Output only. Node count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_count = 0; - /** - * Output only. vCPU count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $vcpu_count = 0; - /** - * Output only. The total memory capacity as reported by the sum of all Kubernetes nodes - * resources, defined in MB. - * - * Generated from protobuf field int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $memory_mb = 0; - /** - * Output only. The time at which these details were last updated. This update_time is - * different from the Membership-level update_time since EndpointDetails are - * updated internally for API consumers. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kubernetes_api_server_version - * Output only. Kubernetes API server version string as reported by '/version'. - * @type string $node_provider_id - * Output only. Node providerID as reported by the first node in the list of nodes on - * the Kubernetes endpoint. On Kubernetes platforms that support zero-node - * clusters (like GKE-on-GCP), the node_count will be zero and the - * node_provider_id will be empty. - * @type int $node_count - * Output only. Node count as reported by Kubernetes nodes resources. - * @type int $vcpu_count - * Output only. vCPU count as reported by Kubernetes nodes resources. - * @type int $memory_mb - * Output only. The total memory capacity as reported by the sum of all Kubernetes nodes - * resources, defined in MB. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which these details were last updated. This update_time is - * different from the Membership-level update_time since EndpointDetails are - * updated internally for API consumers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Kubernetes API server version string as reported by '/version'. - * - * Generated from protobuf field string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKubernetesApiServerVersion() - { - return $this->kubernetes_api_server_version; - } - - /** - * Output only. Kubernetes API server version string as reported by '/version'. - * - * Generated from protobuf field string kubernetes_api_server_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKubernetesApiServerVersion($var) - { - GPBUtil::checkString($var, True); - $this->kubernetes_api_server_version = $var; - - return $this; - } - - /** - * Output only. Node providerID as reported by the first node in the list of nodes on - * the Kubernetes endpoint. On Kubernetes platforms that support zero-node - * clusters (like GKE-on-GCP), the node_count will be zero and the - * node_provider_id will be empty. - * - * Generated from protobuf field string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNodeProviderId() - { - return $this->node_provider_id; - } - - /** - * Output only. Node providerID as reported by the first node in the list of nodes on - * the Kubernetes endpoint. On Kubernetes platforms that support zero-node - * clusters (like GKE-on-GCP), the node_count will be zero and the - * node_provider_id will be empty. - * - * Generated from protobuf field string node_provider_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNodeProviderId($var) - { - GPBUtil::checkString($var, True); - $this->node_provider_id = $var; - - return $this; - } - - /** - * Output only. Node count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getNodeCount() - { - return $this->node_count; - } - - /** - * Output only. Node count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 node_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->node_count = $var; - - return $this; - } - - /** - * Output only. vCPU count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVcpuCount() - { - return $this->vcpu_count; - } - - /** - * Output only. vCPU count as reported by Kubernetes nodes resources. - * - * Generated from protobuf field int32 vcpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVcpuCount($var) - { - GPBUtil::checkInt32($var); - $this->vcpu_count = $var; - - return $this; - } - - /** - * Output only. The total memory capacity as reported by the sum of all Kubernetes nodes - * resources, defined in MB. - * - * Generated from protobuf field int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getMemoryMb() - { - return $this->memory_mb; - } - - /** - * Output only. The total memory capacity as reported by the sum of all Kubernetes nodes - * resources, defined in MB. - * - * Generated from protobuf field int32 memory_mb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setMemoryMb($var) - { - GPBUtil::checkInt32($var); - $this->memory_mb = $var; - - return $this; - } - - /** - * Output only. The time at which these details were last updated. This update_time is - * different from the Membership-level update_time since EndpointDetails are - * updated internally for API consumers. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 100 [(.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 at which these details were last updated. This update_time is - * different from the Membership-level update_time since EndpointDetails are - * updated internally for API consumers. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 100 [(.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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesResource.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesResource.php deleted file mode 100644 index 67e883d2ff54..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/KubernetesResource.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.gkehub.v1beta1.KubernetesResource - */ -class KubernetesResource extends \Google\Protobuf\Internal\Message -{ - /** - * Input only. The YAML representation of the Membership CR. This field is ignored for GKE - * clusters where Hub can read the CR directly. - * Callers should provide the CR that is currently present in the cluster - * during CreateMembership or UpdateMembership, or leave this field empty if - * none exists. The CR manifest is used to validate the cluster has not been - * registered with another Membership. - * - * Generated from protobuf field string membership_cr_manifest = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $membership_cr_manifest = ''; - /** - * Output only. Additional Kubernetes resources that need to be applied to the cluster - * after Membership creation, and after every update. - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ResourceManifest membership_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $membership_resources; - /** - * Output only. The Kubernetes resources for installing the GKE Connect agent - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ResourceManifest connect_resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $connect_resources; - /** - * Optional. Options for Kubernetes resource generation. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.ResourceOptions resource_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $membership_cr_manifest - * Input only. The YAML representation of the Membership CR. This field is ignored for GKE - * clusters where Hub can read the CR directly. - * Callers should provide the CR that is currently present in the cluster - * during CreateMembership or UpdateMembership, or leave this field empty if - * none exists. The CR manifest is used to validate the cluster has not been - * registered with another Membership. - * @type array<\Google\Cloud\GkeHub\V1beta1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $membership_resources - * Output only. Additional Kubernetes resources that need to be applied to the cluster - * after Membership creation, and after every update. - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * @type array<\Google\Cloud\GkeHub\V1beta1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $connect_resources - * Output only. The Kubernetes resources for installing the GKE Connect agent - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * @type \Google\Cloud\GkeHub\V1beta1\ResourceOptions $resource_options - * Optional. Options for Kubernetes resource generation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Input only. The YAML representation of the Membership CR. This field is ignored for GKE - * clusters where Hub can read the CR directly. - * Callers should provide the CR that is currently present in the cluster - * during CreateMembership or UpdateMembership, or leave this field empty if - * none exists. The CR manifest is used to validate the cluster has not been - * registered with another Membership. - * - * Generated from protobuf field string membership_cr_manifest = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getMembershipCrManifest() - { - return $this->membership_cr_manifest; - } - - /** - * Input only. The YAML representation of the Membership CR. This field is ignored for GKE - * clusters where Hub can read the CR directly. - * Callers should provide the CR that is currently present in the cluster - * during CreateMembership or UpdateMembership, or leave this field empty if - * none exists. The CR manifest is used to validate the cluster has not been - * registered with another Membership. - * - * Generated from protobuf field string membership_cr_manifest = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMembershipCrManifest($var) - { - GPBUtil::checkString($var, True); - $this->membership_cr_manifest = $var; - - return $this; - } - - /** - * Output only. Additional Kubernetes resources that need to be applied to the cluster - * after Membership creation, and after every update. - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ResourceManifest membership_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMembershipResources() - { - return $this->membership_resources; - } - - /** - * Output only. Additional Kubernetes resources that need to be applied to the cluster - * after Membership creation, and after every update. - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ResourceManifest membership_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeHub\V1beta1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMembershipResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1beta1\ResourceManifest::class); - $this->membership_resources = $arr; - - return $this; - } - - /** - * Output only. The Kubernetes resources for installing the GKE Connect agent - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ResourceManifest connect_resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConnectResources() - { - return $this->connect_resources; - } - - /** - * Output only. The Kubernetes resources for installing the GKE Connect agent - * This field is only populated in the Membership returned from a successful - * long-running operation from CreateMembership or UpdateMembership. It is not - * populated during normal GetMembership or ListMemberships requests. To get - * the resource manifest after the initial registration, the caller should - * make a UpdateMembership call with an empty field mask. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.ResourceManifest connect_resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\GkeHub\V1beta1\ResourceManifest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConnectResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1beta1\ResourceManifest::class); - $this->connect_resources = $arr; - - return $this; - } - - /** - * Optional. Options for Kubernetes resource generation. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.ResourceOptions resource_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1beta1\ResourceOptions|null - */ - public function getResourceOptions() - { - return $this->resource_options; - } - - public function hasResourceOptions() - { - return isset($this->resource_options); - } - - public function clearResourceOptions() - { - unset($this->resource_options); - } - - /** - * Optional. Options for Kubernetes resource generation. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.ResourceOptions resource_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1beta1\ResourceOptions $var - * @return $this - */ - public function setResourceOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\ResourceOptions::class); - $this->resource_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsRequest.php deleted file mode 100644 index f68edc4f1cad..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsRequest.php +++ /dev/null @@ -1,267 +0,0 @@ -google.cloud.gkehub.v1beta1.ListMembershipsRequest - */ -class ListMembershipsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Memberships will 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 = ''; - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Token returned by previous call to `ListMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Lists Memberships that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * Examples: - * - Name is `bar` in project `foo-proj` and location `global`: - * name = "projects/foo-proj/locations/global/membership/bar" - * - Memberships that have a label called `foo`: - * labels.foo:* - * - Memberships that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - Memberships in the CREATING state: - * state = CREATING - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Memberships will be listed. - * Specified in the format `projects/*/locations/*`. - * @type int $page_size - * Optional. When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. - * @type string $page_token - * Optional. Token returned by previous call to `ListMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * @type string $filter - * Optional. Lists Memberships that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * Examples: - * - Name is `bar` in project `foo-proj` and location `global`: - * name = "projects/foo-proj/locations/global/membership/bar" - * - Memberships that have a label called `foo`: - * labels.foo:* - * - Memberships that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - Memberships in the CREATING state: - * state = CREATING - * @type string $order_by - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Memberships will 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 parent (project and location) where the Memberships will 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; - } - - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be 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. Token returned by previous call to `ListMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Token returned by previous call to `ListMemberships` which - * specifies the position in the list from where to continue listing the - * resources. - * - * 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. Lists Memberships that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * Examples: - * - Name is `bar` in project `foo-proj` and location `global`: - * name = "projects/foo-proj/locations/global/membership/bar" - * - Memberships that have a label called `foo`: - * labels.foo:* - * - Memberships that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - Memberships in the CREATING state: - * state = CREATING - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Lists Memberships that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * Examples: - * - Name is `bar` in project `foo-proj` and location `global`: - * name = "projects/foo-proj/locations/global/membership/bar" - * - Memberships that have a label called `foo`: - * labels.foo:* - * - Memberships that have a label called `foo` whose value is `bar`: - * labels.foo = bar - * - Memberships in the CREATING state: - * state = CREATING - * - * 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. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * 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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsResponse.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsResponse.php deleted file mode 100644 index 62d7d69fcf06..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ListMembershipsResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.gkehub.v1beta1.ListMembershipsResponse - */ -class ListMembershipsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of matching Memberships. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.Membership resources = 1; - */ - private $resources; - /** - * A token to request the next page of resources from the - * `ListMemberships` method. The value of an empty string means that - * there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * List of locations that could not be reached while fetching this list. - * - * 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\GkeHub\V1beta1\Membership>|\Google\Protobuf\Internal\RepeatedField $resources - * The list of matching Memberships. - * @type string $next_page_token - * A token to request the next page of resources from the - * `ListMemberships` method. The value of an empty string means that - * there are no more resources to return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * List of locations that could not be reached while fetching this list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * The list of matching Memberships. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.Membership resources = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResources() - { - return $this->resources; - } - - /** - * The list of matching Memberships. - * - * Generated from protobuf field repeated .google.cloud.gkehub.v1beta1.Membership resources = 1; - * @param array<\Google\Cloud\GkeHub\V1beta1\Membership>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeHub\V1beta1\Membership::class); - $this->resources = $arr; - - return $this; - } - - /** - * A token to request the next page of resources from the - * `ListMemberships` method. The value of an empty string means that - * there are no more resources to return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to request the next page of resources from the - * `ListMemberships` method. The value of an empty string means that - * there are no more resources to 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; - } - - /** - * List of locations that could not be reached while fetching this list. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of locations that could not be reached while fetching this list. - * - * 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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership.php deleted file mode 100644 index 5ea34b72e12a..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership.php +++ /dev/null @@ -1,623 +0,0 @@ -google.cloud.gkehub.v1beta1.Membership - */ -class Membership extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full, unique name of this Membership resource in the format - * `projects/*/locations/*/memberships/{membership_id}`, set during creation. - * `membership_id` must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Optional. GCP labels for this membership. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Description of this membership, limited to 63 characters. - * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. State of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = null; - /** - * Optional. How to identify workloads from this Membership. - * See the documentation on Workload Identity for more details: - * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.Authority authority = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $authority = null; - /** - * Output only. When the Membership was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. When the Membership was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. When the Membership was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Optional. An externally-generated and managed ID for this Membership. This ID may - * be modified after creation, but this is not recommended. For GKE clusters, - * external_id is managed by the Hub API and updates will be ignored. - * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` - * If this Membership represents a Kubernetes cluster, this value should be - * set to the UID of the `kube-system` namespace object. - * - * Generated from protobuf field string external_id = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $external_id = ''; - /** - * Output only. For clusters using Connect, the timestamp of the most recent connection - * established with Google Cloud. This time is updated every several minutes, - * not continuously. For clusters that do not use GKE Connect, or that have - * never connected successfully, this field will be unset. - * - * Generated from protobuf field .google.protobuf.Timestamp last_connection_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_connection_time = null; - /** - * Output only. Google-generated UUID for this resource. This is unique across all - * Membership resources. If a Membership resource is deleted and another - * resource with the same name is created, it gets a different unique_id. - * - * Generated from protobuf field string unique_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $unique_id = ''; - /** - * Optional. The infrastructure type this Membership is running on. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership.InfrastructureType infrastructure_type = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $infrastructure_type = 0; - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The full, unique name of this Membership resource in the format - * `projects/*/locations/*/memberships/{membership_id}`, set during creation. - * `membership_id` must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. GCP labels for this membership. - * @type string $description - * Optional. Description of this membership, limited to 63 characters. - * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` - * @type \Google\Cloud\GkeHub\V1beta1\MembershipEndpoint $endpoint - * Optional. Endpoint information to reach this member. - * @type \Google\Cloud\GkeHub\V1beta1\MembershipState $state - * Output only. State of the Membership resource. - * @type \Google\Cloud\GkeHub\V1beta1\Authority $authority - * Optional. How to identify workloads from this Membership. - * See the documentation on Workload Identity for more details: - * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity - * @type \Google\Protobuf\Timestamp $create_time - * Output only. When the Membership was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. When the Membership was last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. When the Membership was deleted. - * @type string $external_id - * Optional. An externally-generated and managed ID for this Membership. This ID may - * be modified after creation, but this is not recommended. For GKE clusters, - * external_id is managed by the Hub API and updates will be ignored. - * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` - * If this Membership represents a Kubernetes cluster, this value should be - * set to the UID of the `kube-system` namespace object. - * @type \Google\Protobuf\Timestamp $last_connection_time - * Output only. For clusters using Connect, the timestamp of the most recent connection - * established with Google Cloud. This time is updated every several minutes, - * not continuously. For clusters that do not use GKE Connect, or that have - * never connected successfully, this field will be unset. - * @type string $unique_id - * Output only. Google-generated UUID for this resource. This is unique across all - * Membership resources. If a Membership resource is deleted and another - * resource with the same name is created, it gets a different unique_id. - * @type int $infrastructure_type - * Optional. The infrastructure type this Membership is running on. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full, unique name of this Membership resource in the format - * `projects/*/locations/*/memberships/{membership_id}`, set during creation. - * `membership_id` must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * 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, unique name of this Membership resource in the format - * `projects/*/locations/*/memberships/{membership_id}`, set during creation. - * `membership_id` must be a valid RFC 1123 compliant DNS label: - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * - * 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. GCP labels for this membership. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. GCP labels for this membership. - * - * 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. Description of this membership, limited to 63 characters. - * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of this membership, limited to 63 characters. - * Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Endpoint information to reach this member. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipEndpoint endpoint = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1beta1\MembershipEndpoint|null - */ - public function getEndpoint() - { - return $this->readOneof(4); - } - - public function hasEndpoint() - { - return $this->hasOneof(4); - } - - /** - * Optional. Endpoint information to reach this member. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipEndpoint endpoint = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1beta1\MembershipEndpoint $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\MembershipEndpoint::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Output only. State of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1beta1\MembershipState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * Output only. State of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1beta1\MembershipState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\MembershipState::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. How to identify workloads from this Membership. - * See the documentation on Workload Identity for more details: - * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.Authority authority = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1beta1\Authority|null - */ - public function getAuthority() - { - return $this->authority; - } - - public function hasAuthority() - { - return isset($this->authority); - } - - public function clearAuthority() - { - unset($this->authority); - } - - /** - * Optional. How to identify workloads from this Membership. - * See the documentation on Workload Identity for more details: - * https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.Authority authority = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1beta1\Authority $var - * @return $this - */ - public function setAuthority($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\Authority::class); - $this->authority = $var; - - return $this; - } - - /** - * Output only. When the Membership 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. When the Membership 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; - } - - /** - * Output only. When the Membership was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.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. When the Membership was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.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. When the Membership was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. When the Membership was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Optional. An externally-generated and managed ID for this Membership. This ID may - * be modified after creation, but this is not recommended. For GKE clusters, - * external_id is managed by the Hub API and updates will be ignored. - * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` - * If this Membership represents a Kubernetes cluster, this value should be - * set to the UID of the `kube-system` namespace object. - * - * Generated from protobuf field string external_id = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getExternalId() - { - return $this->external_id; - } - - /** - * Optional. An externally-generated and managed ID for this Membership. This ID may - * be modified after creation, but this is not recommended. For GKE clusters, - * external_id is managed by the Hub API and updates will be ignored. - * The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` - * If this Membership represents a Kubernetes cluster, this value should be - * set to the UID of the `kube-system` namespace object. - * - * Generated from protobuf field string external_id = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setExternalId($var) - { - GPBUtil::checkString($var, True); - $this->external_id = $var; - - return $this; - } - - /** - * Output only. For clusters using Connect, the timestamp of the most recent connection - * established with Google Cloud. This time is updated every several minutes, - * not continuously. For clusters that do not use GKE Connect, or that have - * never connected successfully, this field will be unset. - * - * Generated from protobuf field .google.protobuf.Timestamp last_connection_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastConnectionTime() - { - return $this->last_connection_time; - } - - public function hasLastConnectionTime() - { - return isset($this->last_connection_time); - } - - public function clearLastConnectionTime() - { - unset($this->last_connection_time); - } - - /** - * Output only. For clusters using Connect, the timestamp of the most recent connection - * established with Google Cloud. This time is updated every several minutes, - * not continuously. For clusters that do not use GKE Connect, or that have - * never connected successfully, this field will be unset. - * - * Generated from protobuf field .google.protobuf.Timestamp last_connection_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastConnectionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_connection_time = $var; - - return $this; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across all - * Membership resources. If a Membership resource is deleted and another - * resource with the same name is created, it gets a different unique_id. - * - * Generated from protobuf field string unique_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUniqueId() - { - return $this->unique_id; - } - - /** - * Output only. Google-generated UUID for this resource. This is unique across all - * Membership resources. If a Membership resource is deleted and another - * resource with the same name is created, it gets a different unique_id. - * - * Generated from protobuf field string unique_id = 12 [(.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; - } - - /** - * Optional. The infrastructure type this Membership is running on. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership.InfrastructureType infrastructure_type = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getInfrastructureType() - { - return $this->infrastructure_type; - } - - /** - * Optional. The infrastructure type this Membership is running on. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership.InfrastructureType infrastructure_type = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setInfrastructureType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1beta1\Membership\InfrastructureType::class); - $this->infrastructure_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership/InfrastructureType.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership/InfrastructureType.php deleted file mode 100644 index 1ea7d7212c58..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/Membership/InfrastructureType.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.gkehub.v1beta1.Membership.InfrastructureType - */ -class InfrastructureType -{ - /** - * No type was specified. Some Hub functionality may require a type be - * specified, and will not support Memberships with this value. - * - * Generated from protobuf enum INFRASTRUCTURE_TYPE_UNSPECIFIED = 0; - */ - const INFRASTRUCTURE_TYPE_UNSPECIFIED = 0; - /** - * Private infrastructure that is owned or operated by customer. This - * includes GKE distributions such as GKE-OnPrem and GKE-OnBareMetal. - * - * Generated from protobuf enum ON_PREM = 1; - */ - const ON_PREM = 1; - /** - * Public cloud infrastructure. - * - * Generated from protobuf enum MULTI_CLOUD = 2; - */ - const MULTI_CLOUD = 2; - - private static $valueToName = [ - self::INFRASTRUCTURE_TYPE_UNSPECIFIED => 'INFRASTRUCTURE_TYPE_UNSPECIFIED', - self::ON_PREM => 'ON_PREM', - self::MULTI_CLOUD => 'MULTI_CLOUD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InfrastructureType::class, \Google\Cloud\GkeHub\V1beta1\Membership_InfrastructureType::class); - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipEndpoint.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipEndpoint.php deleted file mode 100644 index 099118f49f22..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipEndpoint.php +++ /dev/null @@ -1,326 +0,0 @@ -google.cloud.gkehub.v1beta1.MembershipEndpoint - */ -class MembershipEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Useful Kubernetes-specific metadata. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.KubernetesMetadata kubernetes_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kubernetes_metadata = null; - /** - * Optional. The in-cluster Kubernetes Resources that should be applied for a correctly - * registered cluster, in the steady state. These resources: - * * Ensure that the cluster is exclusively registered to one and only one - * Hub Membership. - * * Propagate Workload Pool Information available in the Membership - * Authority field. - * * Ensure proper initial configuration of default Hub Features. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.KubernetesResource kubernetes_resource = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kubernetes_resource = null; - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\GkeHub\V1beta1\GkeCluster $gke_cluster - * Optional. Specific information for a GKE-on-GCP cluster. - * @type \Google\Cloud\GkeHub\V1beta1\OnPremCluster $on_prem_cluster - * Optional. Specific information for a GKE On-Prem cluster. An onprem user-cluster - * who has no resourceLink is not allowed to use this field, it should have - * a nil "type" instead. - * @type \Google\Cloud\GkeHub\V1beta1\MultiCloudCluster $multi_cloud_cluster - * Optional. Specific information for a GKE Multi-Cloud cluster. - * @type \Google\Cloud\GkeHub\V1beta1\EdgeCluster $edge_cluster - * Optional. Specific information for a Google Edge cluster. - * @type \Google\Cloud\GkeHub\V1beta1\ApplianceCluster $appliance_cluster - * Optional. Specific information for a GDC Edge Appliance cluster. - * @type \Google\Cloud\GkeHub\V1beta1\KubernetesMetadata $kubernetes_metadata - * Output only. Useful Kubernetes-specific metadata. - * @type \Google\Cloud\GkeHub\V1beta1\KubernetesResource $kubernetes_resource - * Optional. The in-cluster Kubernetes Resources that should be applied for a correctly - * registered cluster, in the steady state. These resources: - * * Ensure that the cluster is exclusively registered to one and only one - * Hub Membership. - * * Propagate Workload Pool Information available in the Membership - * Authority field. - * * Ensure proper initial configuration of default Hub Features. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Specific information for a GKE-on-GCP cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.GkeCluster gke_cluster = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1beta1\GkeCluster|null - */ - public function getGkeCluster() - { - return $this->readOneof(4); - } - - public function hasGkeCluster() - { - return $this->hasOneof(4); - } - - /** - * Optional. Specific information for a GKE-on-GCP cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.GkeCluster gke_cluster = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1beta1\GkeCluster $var - * @return $this - */ - public function setGkeCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\GkeCluster::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. Specific information for a GKE On-Prem cluster. An onprem user-cluster - * who has no resourceLink is not allowed to use this field, it should have - * a nil "type" instead. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.OnPremCluster on_prem_cluster = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1beta1\OnPremCluster|null - */ - public function getOnPremCluster() - { - return $this->readOneof(7); - } - - public function hasOnPremCluster() - { - return $this->hasOneof(7); - } - - /** - * Optional. Specific information for a GKE On-Prem cluster. An onprem user-cluster - * who has no resourceLink is not allowed to use this field, it should have - * a nil "type" instead. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.OnPremCluster on_prem_cluster = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1beta1\OnPremCluster $var - * @return $this - */ - public function setOnPremCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\OnPremCluster::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Optional. Specific information for a GKE Multi-Cloud cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.MultiCloudCluster multi_cloud_cluster = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1beta1\MultiCloudCluster|null - */ - public function getMultiCloudCluster() - { - return $this->readOneof(8); - } - - public function hasMultiCloudCluster() - { - return $this->hasOneof(8); - } - - /** - * Optional. Specific information for a GKE Multi-Cloud cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.MultiCloudCluster multi_cloud_cluster = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1beta1\MultiCloudCluster $var - * @return $this - */ - public function setMultiCloudCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\MultiCloudCluster::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Optional. Specific information for a Google Edge cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.EdgeCluster edge_cluster = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1beta1\EdgeCluster|null - */ - public function getEdgeCluster() - { - return $this->readOneof(9); - } - - public function hasEdgeCluster() - { - return $this->hasOneof(9); - } - - /** - * Optional. Specific information for a Google Edge cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.EdgeCluster edge_cluster = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1beta1\EdgeCluster $var - * @return $this - */ - public function setEdgeCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\EdgeCluster::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Optional. Specific information for a GDC Edge Appliance cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.ApplianceCluster appliance_cluster = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1beta1\ApplianceCluster|null - */ - public function getApplianceCluster() - { - return $this->readOneof(10); - } - - public function hasApplianceCluster() - { - return $this->hasOneof(10); - } - - /** - * Optional. Specific information for a GDC Edge Appliance cluster. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.ApplianceCluster appliance_cluster = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1beta1\ApplianceCluster $var - * @return $this - */ - public function setApplianceCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\ApplianceCluster::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Output only. Useful Kubernetes-specific metadata. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.KubernetesMetadata kubernetes_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\GkeHub\V1beta1\KubernetesMetadata|null - */ - public function getKubernetesMetadata() - { - return $this->kubernetes_metadata; - } - - public function hasKubernetesMetadata() - { - return isset($this->kubernetes_metadata); - } - - public function clearKubernetesMetadata() - { - unset($this->kubernetes_metadata); - } - - /** - * Output only. Useful Kubernetes-specific metadata. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.KubernetesMetadata kubernetes_metadata = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\GkeHub\V1beta1\KubernetesMetadata $var - * @return $this - */ - public function setKubernetesMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\KubernetesMetadata::class); - $this->kubernetes_metadata = $var; - - return $this; - } - - /** - * Optional. The in-cluster Kubernetes Resources that should be applied for a correctly - * registered cluster, in the steady state. These resources: - * * Ensure that the cluster is exclusively registered to one and only one - * Hub Membership. - * * Propagate Workload Pool Information available in the Membership - * Authority field. - * * Ensure proper initial configuration of default Hub Features. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.KubernetesResource kubernetes_resource = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\GkeHub\V1beta1\KubernetesResource|null - */ - public function getKubernetesResource() - { - return $this->kubernetes_resource; - } - - public function hasKubernetesResource() - { - return isset($this->kubernetes_resource); - } - - public function clearKubernetesResource() - { - unset($this->kubernetes_resource); - } - - /** - * Optional. The in-cluster Kubernetes Resources that should be applied for a correctly - * registered cluster, in the steady state. These resources: - * * Ensure that the cluster is exclusively registered to one and only one - * Hub Membership. - * * Propagate Workload Pool Information available in the Membership - * Authority field. - * * Ensure proper initial configuration of default Hub Features. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.KubernetesResource kubernetes_resource = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\GkeHub\V1beta1\KubernetesResource $var - * @return $this - */ - public function setKubernetesResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\KubernetesResource::class); - $this->kubernetes_resource = $var; - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState.php deleted file mode 100644 index 8691c8abb1fe..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.gkehub.v1beta1.MembershipState - */ -class MembershipState extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The current state of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $code = 0; - /** - * This field is never set by the Hub Service. - * - * Generated from protobuf field string description = 2 [deprecated = true]; - * @deprecated - */ - protected $description = ''; - /** - * This field is never set by the Hub Service. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [deprecated = true]; - * @deprecated - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Output only. The current state of the Membership resource. - * @type string $description - * This field is never set by the Hub Service. - * @type \Google\Protobuf\Timestamp $update_time - * This field is never set by the Hub Service. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The current state of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Output only. The current state of the Membership resource. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1beta1\MembershipState\Code::class); - $this->code = $var; - - return $this; - } - - /** - * This field is never set by the Hub Service. - * - * Generated from protobuf field string description = 2 [deprecated = true]; - * @return string - * @deprecated - */ - public function getDescription() - { - @trigger_error('description is deprecated.', E_USER_DEPRECATED); - return $this->description; - } - - /** - * This field is never set by the Hub Service. - * - * Generated from protobuf field string description = 2 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setDescription($var) - { - @trigger_error('description is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * This field is never set by the Hub Service. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [deprecated = true]; - * @return \Google\Protobuf\Timestamp|null - * @deprecated - */ - public function getUpdateTime() - { - @trigger_error('update_time is deprecated.', E_USER_DEPRECATED); - return $this->update_time; - } - - public function hasUpdateTime() - { - @trigger_error('update_time is deprecated.', E_USER_DEPRECATED); - return isset($this->update_time); - } - - public function clearUpdateTime() - { - @trigger_error('update_time is deprecated.', E_USER_DEPRECATED); - unset($this->update_time); - } - - /** - * This field is never set by the Hub Service. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [deprecated = true]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - * @deprecated - */ - public function setUpdateTime($var) - { - @trigger_error('update_time is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState/Code.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState/Code.php deleted file mode 100644 index 8b63c2a88ee8..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState/Code.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.gkehub.v1beta1.MembershipState.Code - */ -class Code -{ - /** - * The code is not set. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * The cluster is being registered. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The cluster is registered. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The cluster is being unregistered. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * The Membership is being updated. - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - /** - * The Membership is being updated by the Hub Service. - * - * Generated from protobuf enum SERVICE_UPDATING = 5; - */ - const SERVICE_UPDATING = 5; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - self::UPDATING => 'UPDATING', - self::SERVICE_UPDATING => 'SERVICE_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(Code::class, \Google\Cloud\GkeHub\V1beta1\MembershipState_Code::class); - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState_Code.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState_Code.php deleted file mode 100644 index ed81f624ddab..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/MembershipState_Code.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.gkehub.v1beta1.MultiCloudCluster - */ -class MultiCloudCluster extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. Self-link of the GCP resource for the GKE Multi-Cloud cluster. For - * example: - * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/awsClusters/my-cluster - * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/azureClusters/my-cluster - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $resource_link = ''; - /** - * Output only. If cluster_missing is set then it denotes that - * API(gkemulticloud.googleapis.com) resource for this GKE Multi-Cloud cluster - * no longer exists. - * - * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_missing = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_link - * Immutable. Self-link of the GCP resource for the GKE Multi-Cloud cluster. For - * example: - * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/awsClusters/my-cluster - * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/azureClusters/my-cluster - * @type bool $cluster_missing - * Output only. If cluster_missing is set then it denotes that - * API(gkemulticloud.googleapis.com) resource for this GKE Multi-Cloud cluster - * no longer exists. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. Self-link of the GCP resource for the GKE Multi-Cloud cluster. For - * example: - * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/awsClusters/my-cluster - * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/azureClusters/my-cluster - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getResourceLink() - { - return $this->resource_link; - } - - /** - * Immutable. Self-link of the GCP resource for the GKE Multi-Cloud cluster. For - * example: - * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/awsClusters/my-cluster - * //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/azureClusters/my-cluster - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setResourceLink($var) - { - GPBUtil::checkString($var, True); - $this->resource_link = $var; - - return $this; - } - - /** - * Output only. If cluster_missing is set then it denotes that - * API(gkemulticloud.googleapis.com) resource for this GKE Multi-Cloud cluster - * no longer exists. - * - * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getClusterMissing() - { - return $this->cluster_missing; - } - - /** - * Output only. If cluster_missing is set then it denotes that - * API(gkemulticloud.googleapis.com) resource for this GKE Multi-Cloud cluster - * no longer exists. - * - * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setClusterMissing($var) - { - GPBUtil::checkBool($var); - $this->cluster_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster.php deleted file mode 100644 index fb786127d368..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.gkehub.v1beta1.OnPremCluster - */ -class OnPremCluster extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. Self-link of the GCP resource for the GKE On-Prem cluster. For example: - * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/vmwareClusters/my-cluster - * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/bareMetalClusters/my-cluster - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $resource_link = ''; - /** - * Output only. If cluster_missing is set then it denotes that - * API(gkeonprem.googleapis.com) resource for this GKE On-Prem cluster no - * longer exists. - * - * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cluster_missing = false; - /** - * Immutable. Whether the cluster is an admin cluster. - * - * Generated from protobuf field bool admin_cluster = 3 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $admin_cluster = false; - /** - * Immutable. The on prem cluster's type. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.OnPremCluster.ClusterType cluster_type = 4 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $cluster_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_link - * Immutable. Self-link of the GCP resource for the GKE On-Prem cluster. For example: - * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/vmwareClusters/my-cluster - * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/bareMetalClusters/my-cluster - * @type bool $cluster_missing - * Output only. If cluster_missing is set then it denotes that - * API(gkeonprem.googleapis.com) resource for this GKE On-Prem cluster no - * longer exists. - * @type bool $admin_cluster - * Immutable. Whether the cluster is an admin cluster. - * @type int $cluster_type - * Immutable. The on prem cluster's type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. Self-link of the GCP resource for the GKE On-Prem cluster. For example: - * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/vmwareClusters/my-cluster - * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/bareMetalClusters/my-cluster - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getResourceLink() - { - return $this->resource_link; - } - - /** - * Immutable. Self-link of the GCP resource for the GKE On-Prem cluster. For example: - * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/vmwareClusters/my-cluster - * //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/bareMetalClusters/my-cluster - * - * Generated from protobuf field string resource_link = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setResourceLink($var) - { - GPBUtil::checkString($var, True); - $this->resource_link = $var; - - return $this; - } - - /** - * Output only. If cluster_missing is set then it denotes that - * API(gkeonprem.googleapis.com) resource for this GKE On-Prem cluster no - * longer exists. - * - * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getClusterMissing() - { - return $this->cluster_missing; - } - - /** - * Output only. If cluster_missing is set then it denotes that - * API(gkeonprem.googleapis.com) resource for this GKE On-Prem cluster no - * longer exists. - * - * Generated from protobuf field bool cluster_missing = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setClusterMissing($var) - { - GPBUtil::checkBool($var); - $this->cluster_missing = $var; - - return $this; - } - - /** - * Immutable. Whether the cluster is an admin cluster. - * - * Generated from protobuf field bool admin_cluster = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @return bool - */ - public function getAdminCluster() - { - return $this->admin_cluster; - } - - /** - * Immutable. Whether the cluster is an admin cluster. - * - * Generated from protobuf field bool admin_cluster = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @param bool $var - * @return $this - */ - public function setAdminCluster($var) - { - GPBUtil::checkBool($var); - $this->admin_cluster = $var; - - return $this; - } - - /** - * Immutable. The on prem cluster's type. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.OnPremCluster.ClusterType cluster_type = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getClusterType() - { - return $this->cluster_type; - } - - /** - * Immutable. The on prem cluster's type. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.OnPremCluster.ClusterType cluster_type = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setClusterType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1beta1\OnPremCluster\ClusterType::class); - $this->cluster_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster/ClusterType.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster/ClusterType.php deleted file mode 100644 index 28a857e861c6..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster/ClusterType.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.gkehub.v1beta1.OnPremCluster.ClusterType - */ -class ClusterType -{ - /** - * The ClusterType is not set. - * - * Generated from protobuf enum CLUSTERTYPE_UNSPECIFIED = 0; - */ - const CLUSTERTYPE_UNSPECIFIED = 0; - /** - * The ClusterType is bootstrap cluster. - * - * Generated from protobuf enum BOOTSTRAP = 1; - */ - const BOOTSTRAP = 1; - /** - * The ClusterType is baremetal hybrid cluster. - * - * Generated from protobuf enum HYBRID = 2; - */ - const HYBRID = 2; - /** - * The ClusterType is baremetal standalone cluster. - * - * Generated from protobuf enum STANDALONE = 3; - */ - const STANDALONE = 3; - /** - * The ClusterType is user cluster. - * - * Generated from protobuf enum USER = 4; - */ - const USER = 4; - - private static $valueToName = [ - self::CLUSTERTYPE_UNSPECIFIED => 'CLUSTERTYPE_UNSPECIFIED', - self::BOOTSTRAP => 'BOOTSTRAP', - self::HYBRID => 'HYBRID', - self::STANDALONE => 'STANDALONE', - self::USER => 'USER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClusterType::class, \Google\Cloud\GkeHub\V1beta1\OnPremCluster_ClusterType::class); - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster_ClusterType.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster_ClusterType.php deleted file mode 100644 index f5a979f0e89c..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/OnPremCluster_ClusterType.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.gkehub.v1beta1.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_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. 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_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\Gkehub\V1Beta1\Membership::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_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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceManifest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceManifest.php deleted file mode 100644 index 0cde0ed74bc1..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceManifest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.gkehub.v1beta1.ResourceManifest - */ -class ResourceManifest extends \Google\Protobuf\Internal\Message -{ - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 1; - */ - protected $manifest = ''; - /** - * Whether the resource provided in the manifest is `cluster_scoped`. - * If unset, the manifest is assumed to be namespace scoped. - * This field is used for REST mapping when applying the resource in a - * cluster. - * - * Generated from protobuf field bool cluster_scoped = 2; - */ - protected $cluster_scoped = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $manifest - * YAML manifest of the resource. - * @type bool $cluster_scoped - * Whether the resource provided in the manifest is `cluster_scoped`. - * If unset, the manifest is assumed to be namespace scoped. - * This field is used for REST mapping when applying the resource in a - * cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 1; - * @return string - */ - public function getManifest() - { - return $this->manifest; - } - - /** - * YAML manifest of the resource. - * - * Generated from protobuf field string manifest = 1; - * @param string $var - * @return $this - */ - public function setManifest($var) - { - GPBUtil::checkString($var, True); - $this->manifest = $var; - - return $this; - } - - /** - * Whether the resource provided in the manifest is `cluster_scoped`. - * If unset, the manifest is assumed to be namespace scoped. - * This field is used for REST mapping when applying the resource in a - * cluster. - * - * Generated from protobuf field bool cluster_scoped = 2; - * @return bool - */ - public function getClusterScoped() - { - return $this->cluster_scoped; - } - - /** - * Whether the resource provided in the manifest is `cluster_scoped`. - * If unset, the manifest is assumed to be namespace scoped. - * This field is used for REST mapping when applying the resource in a - * cluster. - * - * Generated from protobuf field bool cluster_scoped = 2; - * @param bool $var - * @return $this - */ - public function setClusterScoped($var) - { - GPBUtil::checkBool($var); - $this->cluster_scoped = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceOptions.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceOptions.php deleted file mode 100644 index 9d0802994ea1..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ResourceOptions.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.gkehub.v1beta1.ResourceOptions - */ -class ResourceOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The Connect agent version to use for connect_resources. Defaults to the - * latest GKE Connect version. The version must be a currently supported - * version, obsolete versions will be rejected. - * - * Generated from protobuf field string connect_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $connect_version = ''; - /** - * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for - * CustomResourceDefinition resources. - * This option should be set for clusters with Kubernetes apiserver versions - * <1.16. - * - * Generated from protobuf field bool v1beta1_crd = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $v1beta1_crd = false; - /** - * Optional. Major version of the Kubernetes cluster. This is only used to determine - * which version to use for the CustomResourceDefinition resources, - * `apiextensions/v1beta1` or`apiextensions/v1`. - * - * Generated from protobuf field string k8s_version = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $k8s_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $connect_version - * Optional. The Connect agent version to use for connect_resources. Defaults to the - * latest GKE Connect version. The version must be a currently supported - * version, obsolete versions will be rejected. - * @type bool $v1beta1_crd - * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for - * CustomResourceDefinition resources. - * This option should be set for clusters with Kubernetes apiserver versions - * <1.16. - * @type string $k8s_version - * Optional. Major version of the Kubernetes cluster. This is only used to determine - * which version to use for the CustomResourceDefinition resources, - * `apiextensions/v1beta1` or`apiextensions/v1`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The Connect agent version to use for connect_resources. Defaults to the - * latest GKE Connect version. The version must be a currently supported - * version, obsolete versions will be rejected. - * - * Generated from protobuf field string connect_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getConnectVersion() - { - return $this->connect_version; - } - - /** - * Optional. The Connect agent version to use for connect_resources. Defaults to the - * latest GKE Connect version. The version must be a currently supported - * version, obsolete versions will be rejected. - * - * Generated from protobuf field string connect_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setConnectVersion($var) - { - GPBUtil::checkString($var, True); - $this->connect_version = $var; - - return $this; - } - - /** - * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for - * CustomResourceDefinition resources. - * This option should be set for clusters with Kubernetes apiserver versions - * <1.16. - * - * Generated from protobuf field bool v1beta1_crd = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getV1Beta1Crd() - { - return $this->v1beta1_crd; - } - - /** - * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for - * CustomResourceDefinition resources. - * This option should be set for clusters with Kubernetes apiserver versions - * <1.16. - * - * Generated from protobuf field bool v1beta1_crd = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setV1Beta1Crd($var) - { - GPBUtil::checkBool($var); - $this->v1beta1_crd = $var; - - return $this; - } - - /** - * Optional. Major version of the Kubernetes cluster. This is only used to determine - * which version to use for the CustomResourceDefinition resources, - * `apiextensions/v1beta1` or`apiextensions/v1`. - * - * Generated from protobuf field string k8s_version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getK8SVersion() - { - return $this->k8s_version; - } - - /** - * Optional. Major version of the Kubernetes cluster. This is only used to determine - * which version to use for the CustomResourceDefinition resources, - * `apiextensions/v1beta1` or`apiextensions/v1`. - * - * Generated from protobuf field string k8s_version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setK8SVersion($var) - { - GPBUtil::checkString($var, True); - $this->k8s_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/TypeMeta.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/TypeMeta.php deleted file mode 100644 index 989ef46f9519..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/TypeMeta.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.gkehub.v1beta1.TypeMeta - */ -class TypeMeta extends \Google\Protobuf\Internal\Message -{ - /** - * Kind of the resource (e.g. Deployment). - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * APIVersion of the resource (e.g. v1). - * - * Generated from protobuf field string api_version = 2; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * Kind of the resource (e.g. Deployment). - * @type string $api_version - * APIVersion of the resource (e.g. v1). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Kind of the resource (e.g. Deployment). - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * Kind of the resource (e.g. Deployment). - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * APIVersion of the resource (e.g. v1). - * - * Generated from protobuf field string api_version = 2; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * APIVersion of the resource (e.g. v1). - * - * Generated from protobuf field string api_version = 2; - * @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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/UpdateMembershipRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/UpdateMembershipRequest.php deleted file mode 100644 index 779c727a1ff0..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/UpdateMembershipRequest.php +++ /dev/null @@ -1,265 +0,0 @@ -google.cloud.gkehub.v1beta1.UpdateMembershipRequest - */ -class UpdateMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The membership resource name in the format: - * `projects/[project_id]/locations/global/memberships/[membership_id]` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Mask of fields to update. At least one field path must be specified in this - * mask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource = null; - /** - * Optional. A 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The membership resource name in the format: - * `projects/[project_id]/locations/global/memberships/[membership_id]` - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one field path must be specified in this - * mask. - * @type \Google\Cloud\GkeHub\V1beta1\Membership $resource - * Required. Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * @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 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\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Required. The membership resource name in the format: - * `projects/[project_id]/locations/global/memberships/[membership_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 membership resource name in the format: - * `projects/[project_id]/locations/global/memberships/[membership_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. Mask of fields to update. At least one field path must be specified in this - * mask. - * - * 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. At least one field path must be specified in this - * mask. - * - * 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; - } - - /** - * Required. Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\GkeHub\V1beta1\Membership|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. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * - * Generated from protobuf field .google.cloud.gkehub.v1beta1.Membership resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\GkeHub\V1beta1\Membership $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1beta1\Membership::class); - $this->resource = $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 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 = 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 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 = 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/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityRequest.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityRequest.php deleted file mode 100644 index c55ce061b402..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityRequest.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.gkehub.v1beta1.ValidateExclusivityRequest - */ -class ValidateExclusivityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent (project and location) where the Memberships will be created. - * Specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The YAML of the membership CR in the cluster. Empty if the membership - * CR does not exist. - * - * Generated from protobuf field string cr_manifest = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cr_manifest = ''; - /** - * Required. The intended membership name under the `parent`. This method only does - * validation in anticipation of a CreateMembership call with the same name. - * - * Generated from protobuf field string intended_membership = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $intended_membership = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent (project and location) where the Memberships will be created. - * Specified in the format `projects/*/locations/*`. - * @type string $cr_manifest - * Optional. The YAML of the membership CR in the cluster. Empty if the membership - * CR does not exist. - * @type string $intended_membership - * Required. The intended membership name under the `parent`. This method only does - * validation in anticipation of a CreateMembership call with the same name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent (project and location) where the Memberships will be created. - * 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 parent (project and location) where the Memberships will be created. - * 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; - } - - /** - * Optional. The YAML of the membership CR in the cluster. Empty if the membership - * CR does not exist. - * - * Generated from protobuf field string cr_manifest = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCrManifest() - { - return $this->cr_manifest; - } - - /** - * Optional. The YAML of the membership CR in the cluster. Empty if the membership - * CR does not exist. - * - * Generated from protobuf field string cr_manifest = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCrManifest($var) - { - GPBUtil::checkString($var, True); - $this->cr_manifest = $var; - - return $this; - } - - /** - * Required. The intended membership name under the `parent`. This method only does - * validation in anticipation of a CreateMembership call with the same name. - * - * Generated from protobuf field string intended_membership = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getIntendedMembership() - { - return $this->intended_membership; - } - - /** - * Required. The intended membership name under the `parent`. This method only does - * validation in anticipation of a CreateMembership call with the same name. - * - * Generated from protobuf field string intended_membership = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setIntendedMembership($var) - { - GPBUtil::checkString($var, True); - $this->intended_membership = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityResponse.php b/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityResponse.php deleted file mode 100644 index 05a5a73831d7..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/proto/src/Google/Cloud/GkeHub/V1beta1/ValidateExclusivityResponse.php +++ /dev/null @@ -1,93 +0,0 @@ -google.cloud.gkehub.v1beta1.ValidateExclusivityResponse - */ -class ValidateExclusivityResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The validation result. - * * `OK` means that exclusivity is validated, assuming the manifest produced - * by GenerateExclusivityManifest is successfully applied. - * * `ALREADY_EXISTS` means that the Membership CRD is already owned by - * another Hub. See `status.message` for more information. - * - * Generated from protobuf field .google.rpc.Status status = 1; - */ - protected $status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Rpc\Status $status - * The validation result. - * * `OK` means that exclusivity is validated, assuming the manifest produced - * by GenerateExclusivityManifest is successfully applied. - * * `ALREADY_EXISTS` means that the Membership CRD is already owned by - * another Hub. See `status.message` for more information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * The validation result. - * * `OK` means that exclusivity is validated, assuming the manifest produced - * by GenerateExclusivityManifest is successfully applied. - * * `ALREADY_EXISTS` means that the Membership CRD is already owned by - * another Hub. See `status.message` for more information. - * - * 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 validation result. - * * `OK` means that exclusivity is validated, assuming the manifest produced - * by GenerateExclusivityManifest is successfully applied. - * * `ALREADY_EXISTS` means that the Membership CRD is already owned by - * another Hub. See `status.message` for more information. - * - * 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; - } - -} - diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/create_membership.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/create_membership.php deleted file mode 100644 index d66be83664d3..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/create_membership.php +++ /dev/null @@ -1,100 +0,0 @@ -createMembership( - $formattedParent, - $membershipId, - $resource - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Membership $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = GkeHubMembershipServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $membershipId = '[MEMBERSHIP_ID]'; - - create_membership_sample($formattedParent, $membershipId); -} -// [END gkehub_v1beta1_generated_GkeHubMembershipService_CreateMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/delete_membership.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/delete_membership.php deleted file mode 100644 index 9c423841d80c..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/delete_membership.php +++ /dev/null @@ -1,84 +0,0 @@ -deleteMembership($formattedName); - $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 = GkeHubMembershipServiceClient::membershipName( - '[PROJECT]', - '[LOCATION]', - '[MEMBERSHIP]' - ); - - delete_membership_sample($formattedName); -} -// [END gkehub_v1beta1_generated_GkeHubMembershipService_DeleteMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_connect_manifest.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_connect_manifest.php deleted file mode 100644 index c91ff100e1fa..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_connect_manifest.php +++ /dev/null @@ -1,74 +0,0 @@ -generateConnectManifest($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GkeHubMembershipServiceClient::membershipName( - '[PROJECT]', - '[LOCATION]', - '[MEMBERSHIP]' - ); - - generate_connect_manifest_sample($formattedName); -} -// [END gkehub_v1beta1_generated_GkeHubMembershipService_GenerateConnectManifest_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_exclusivity_manifest.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_exclusivity_manifest.php deleted file mode 100644 index 0e1eb02ff105..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/generate_exclusivity_manifest.php +++ /dev/null @@ -1,82 +0,0 @@ -generateExclusivityManifest($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GkeHubMembershipServiceClient::membershipName( - '[PROJECT]', - '[LOCATION]', - '[MEMBERSHIP]' - ); - - generate_exclusivity_manifest_sample($formattedName); -} -// [END gkehub_v1beta1_generated_GkeHubMembershipService_GenerateExclusivityManifest_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_iam_policy.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_iam_policy.php deleted file mode 100644 index 0a58b9a30551..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_iam_policy.php +++ /dev/null @@ -1,67 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 gkehub_v1beta1_generated_GkeHubMembershipService_GetIamPolicy_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_location.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_location.php deleted file mode 100644 index 36ea3116af49..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END gkehub_v1beta1_generated_GkeHubMembershipService_GetLocation_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_membership.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_membership.php deleted file mode 100644 index dce6cbec555b..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/get_membership.php +++ /dev/null @@ -1,71 +0,0 @@ -getMembership($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GkeHubMembershipServiceClient::membershipName( - '[PROJECT]', - '[LOCATION]', - '[MEMBERSHIP]' - ); - - get_membership_sample($formattedName); -} -// [END gkehub_v1beta1_generated_GkeHubMembershipService_GetMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_locations.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_locations.php deleted file mode 100644 index 60d84074726a..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @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 gkehub_v1beta1_generated_GkeHubMembershipService_ListLocations_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_memberships.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_memberships.php deleted file mode 100644 index fd7781a2bcfa..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/list_memberships.php +++ /dev/null @@ -1,72 +0,0 @@ -listMemberships($formattedParent); - - /** @var Membership $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 = GkeHubMembershipServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_memberships_sample($formattedParent); -} -// [END gkehub_v1beta1_generated_GkeHubMembershipService_ListMemberships_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/set_iam_policy.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/set_iam_policy.php deleted file mode 100644 index 7b7f9d4e1e01..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/set_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 gkehub_v1beta1_generated_GkeHubMembershipService_SetIamPolicy_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/test_iam_permissions.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/test_iam_permissions.php deleted file mode 100644 index 2ef5da42d5db..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,80 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 gkehub_v1beta1_generated_GkeHubMembershipService_TestIamPermissions_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/update_membership.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/update_membership.php deleted file mode 100644 index 0e40c07e40d9..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/update_membership.php +++ /dev/null @@ -1,92 +0,0 @@ -updateMembership( - $formattedName, - $updateMask, - $resource - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Membership $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GkeHubMembershipServiceClient::membershipName( - '[PROJECT]', - '[LOCATION]', - '[MEMBERSHIP]' - ); - - update_membership_sample($formattedName); -} -// [END gkehub_v1beta1_generated_GkeHubMembershipService_UpdateMembership_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/validate_exclusivity.php b/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/validate_exclusivity.php deleted file mode 100644 index 0b0a9b9ad8ae..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/samples/V1beta1/GkeHubMembershipServiceClient/validate_exclusivity.php +++ /dev/null @@ -1,74 +0,0 @@ -validateExclusivity( - $formattedParent, - $intendedMembership - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = GkeHubMembershipServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $intendedMembership = '[INTENDED_MEMBERSHIP]'; - - validate_exclusivity_sample($formattedParent, $intendedMembership); -} -// [END gkehub_v1beta1_generated_GkeHubMembershipService_ValidateExclusivity_sync] diff --git a/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/Gapic/GkeHubMembershipServiceGapicClient.php b/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/Gapic/GkeHubMembershipServiceGapicClient.php deleted file mode 100644 index 0465989da403..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/Gapic/GkeHubMembershipServiceGapicClient.php +++ /dev/null @@ -1,1305 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $membershipId = 'membership_id'; - * $resource = new Membership(); - * $operationResponse = $gkeHubMembershipServiceClient->createMembership($formattedParent, $membershipId, $resource); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gkeHubMembershipServiceClient->createMembership($formattedParent, $membershipId, $resource); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gkeHubMembershipServiceClient->resumeOperation($operationName, 'createMembership'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gkeHubMembershipServiceClient->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. - * - * @experimental - */ -class GkeHubMembershipServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.gkehub.v1beta1.GkeHubMembershipService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'gkehub.googleapis.com'; - - /** 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 $locationNameTemplate; - - private static $membershipNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/gke_hub_membership_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/gke_hub_membership_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/gke_hub_membership_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/gke_hub_membership_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getMembershipNameTemplate() - { - if (self::$membershipNameTemplate == null) { - self::$membershipNameTemplate = new PathTemplate('projects/{project}/locations/{location}/memberships/{membership}'); - } - - return self::$membershipNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'location' => self::getLocationNameTemplate(), - 'membership' => self::getMembershipNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * 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. - * - * @experimental - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a membership - * resource. - * - * @param string $project - * @param string $location - * @param string $membership - * - * @return string The formatted membership resource. - * - * @experimental - */ - public static function membershipName($project, $location, $membership) - { - return self::getMembershipNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'membership' => $membership, - ]); - } - - /** - * 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} - * - membership: projects/{project}/locations/{location}/memberships/{membership} - * - * 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. - * - * @experimental - */ - 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"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - * - * @experimental - */ - 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 - * - * @experimental - */ - 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; - } - - /** - * 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 'gkehub.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a new Membership. - * - * **This is currently only supported for GKE clusters on Google Cloud**. - * To register other clusters, follow the instructions at - * https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. - * - * Sample code: - * ``` - * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); - * try { - * $formattedParent = $gkeHubMembershipServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $membershipId = 'membership_id'; - * $resource = new Membership(); - * $operationResponse = $gkeHubMembershipServiceClient->createMembership($formattedParent, $membershipId, $resource); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gkeHubMembershipServiceClient->createMembership($formattedParent, $membershipId, $resource); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gkeHubMembershipServiceClient->resumeOperation($operationName, 'createMembership'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gkeHubMembershipServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent (project and location) where the Memberships will be created. - * Specified in the format `projects/*/locations/*`. - * @param string $membershipId Required. Client chosen ID for the membership. `membership_id` must be a valid RFC - * 1123 compliant DNS label: - * - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * @param Membership $resource Required. The membership to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A 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 RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createMembership($parent, $membershipId, $resource, array $optionalArgs = []) - { - $request = new CreateMembershipRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setMembershipId($membershipId); - $request->setResource($resource); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateMembership', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Removes a Membership. - * - * **This is currently only supported for GKE clusters on Google Cloud**. - * To unregister other clusters, follow the instructions at - * https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. - * - * Sample code: - * ``` - * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); - * try { - * $formattedName = $gkeHubMembershipServiceClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - * $operationResponse = $gkeHubMembershipServiceClient->deleteMembership($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gkeHubMembershipServiceClient->deleteMembership($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gkeHubMembershipServiceClient->resumeOperation($operationName, 'deleteMembership'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gkeHubMembershipServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A 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 RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteMembership($name, array $optionalArgs = []) - { - $request = new DeleteMembershipRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteMembership', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Generates the manifest for deployment of the GKE connect agent. - * - * **This method is used internally by Google-provided libraries.** - * Most clients should not need to call this method directly. - * - * Sample code: - * ``` - * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); - * try { - * $formattedName = $gkeHubMembershipServiceClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - * $response = $gkeHubMembershipServiceClient->generateConnectManifest($formattedName); - * } finally { - * $gkeHubMembershipServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The Membership resource name the Agent will associate with, in the format - * `projects/*/locations/*/memberships/*`. - * @param array $optionalArgs { - * Optional. - * - * @type ConnectAgent $connectAgent - * Optional. The connect agent to generate manifest for. - * @type string $version - * Optional. The Connect agent version to use. Defaults to the most current version. - * @type bool $isUpgrade - * Optional. If true, generate the resources for upgrade only. Some resources - * generated only for installation (e.g. secrets) will be excluded. - * @type string $registry - * Optional. The registry to fetch the connect agent image from. Defaults to - * gcr.io/gkeconnect. - * @type string $imagePullSecretContent - * Optional. The image pull secret content for the registry, if not public. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\GkeHub\V1beta1\GenerateConnectManifestResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function generateConnectManifest($name, array $optionalArgs = []) - { - $request = new GenerateConnectManifestRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['connectAgent'])) { - $request->setConnectAgent($optionalArgs['connectAgent']); - } - - if (isset($optionalArgs['version'])) { - $request->setVersion($optionalArgs['version']); - } - - if (isset($optionalArgs['isUpgrade'])) { - $request->setIsUpgrade($optionalArgs['isUpgrade']); - } - - if (isset($optionalArgs['registry'])) { - $request->setRegistry($optionalArgs['registry']); - } - - if (isset($optionalArgs['imagePullSecretContent'])) { - $request->setImagePullSecretContent($optionalArgs['imagePullSecretContent']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateConnectManifest', GenerateConnectManifestResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * GenerateExclusivityManifest generates the manifests to update the - * exclusivity artifacts in the cluster if needed. - * - * Exclusivity artifacts include the Membership custom resource definition - * (CRD) and the singleton Membership custom resource (CR). Combined with - * ValidateExclusivity, exclusivity artifacts guarantee that a Kubernetes - * cluster is only registered to a single GKE Hub. - * - * The Membership CRD is versioned, and may require conversion when the GKE - * Hub API server begins serving a newer version of the CRD and - * corresponding CR. The response will be the converted CRD and CR if there - * are any differences between the versions. - * - * Sample code: - * ``` - * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); - * try { - * $formattedName = $gkeHubMembershipServiceClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - * $response = $gkeHubMembershipServiceClient->generateExclusivityManifest($formattedName); - * } finally { - * $gkeHubMembershipServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * @param array $optionalArgs { - * Optional. - * - * @type string $crdManifest - * Optional. The YAML manifest of the membership CRD retrieved by - * `kubectl get customresourcedefinitions membership`. - * Leave empty if the resource does not exist. - * @type string $crManifest - * Optional. The YAML manifest of the membership CR retrieved by - * `kubectl get memberships membership`. - * Leave empty if the resource does not exist. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\GkeHub\V1beta1\GenerateExclusivityManifestResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function generateExclusivityManifest($name, array $optionalArgs = []) - { - $request = new GenerateExclusivityManifestRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['crdManifest'])) { - $request->setCrdManifest($optionalArgs['crdManifest']); - } - - if (isset($optionalArgs['crManifest'])) { - $request->setCrManifest($optionalArgs['crManifest']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateExclusivityManifest', GenerateExclusivityManifestResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the details of a Membership. - * - * Sample code: - * ``` - * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); - * try { - * $formattedName = $gkeHubMembershipServiceClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - * $response = $gkeHubMembershipServiceClient->getMembership($formattedName); - * } finally { - * $gkeHubMembershipServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The Membership resource name in the format - * `projects/*/locations/*/memberships/*`. - * @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\GkeHub\V1beta1\Membership - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getMembership($name, array $optionalArgs = []) - { - $request = new GetMembershipRequest(); - $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('GetMembership', Membership::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists Memberships in a given project and location. - * - * Sample code: - * ``` - * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); - * try { - * $formattedParent = $gkeHubMembershipServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $gkeHubMembershipServiceClient->listMemberships($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $gkeHubMembershipServiceClient->listMemberships($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $gkeHubMembershipServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent (project and location) where the Memberships will be listed. - * Specified in the format `projects/*/locations/*`. - * @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 - * Optional. Lists Memberships that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * - * Examples: - * - * - Name is `bar` in project `foo-proj` and location `global`: - * - * name = "projects/foo-proj/locations/global/membership/bar" - * - * - Memberships that have a label called `foo`: - * - * labels.foo:* - * - * - Memberships that have a label called `foo` whose value is `bar`: - * - * labels.foo = bar - * - * - Memberships in the CREATING state: - * - * state = CREATING - * @type string $orderBy - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 - * - * @experimental - */ - public function listMemberships($parent, array $optionalArgs = []) - { - $request = new ListMembershipsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListMemberships', $optionalArgs, ListMembershipsResponse::class, $request); - } - - /** - * Updates an existing Membership. - * - * Sample code: - * ``` - * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); - * try { - * $formattedName = $gkeHubMembershipServiceClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - * $updateMask = new FieldMask(); - * $resource = new Membership(); - * $operationResponse = $gkeHubMembershipServiceClient->updateMembership($formattedName, $updateMask, $resource); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $gkeHubMembershipServiceClient->updateMembership($formattedName, $updateMask, $resource); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $gkeHubMembershipServiceClient->resumeOperation($operationName, 'updateMembership'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $gkeHubMembershipServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The membership resource name in the format: - * `projects/[project_id]/locations/global/memberships/[membership_id]` - * @param FieldMask $updateMask Required. Mask of fields to update. At least one field path must be specified in this - * mask. - * @param Membership $resource Required. Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * Optional. A 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 RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateMembership($name, $updateMask, $resource, array $optionalArgs = []) - { - $request = new UpdateMembershipRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setUpdateMask($updateMask); - $request->setResource($resource); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateMembership', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * ValidateExclusivity validates the state of exclusivity in the cluster. - * The validation does not depend on an existing Hub membership resource. - * - * Sample code: - * ``` - * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); - * try { - * $formattedParent = $gkeHubMembershipServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $intendedMembership = 'intended_membership'; - * $response = $gkeHubMembershipServiceClient->validateExclusivity($formattedParent, $intendedMembership); - * } finally { - * $gkeHubMembershipServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent (project and location) where the Memberships will be created. - * Specified in the format `projects/*/locations/*`. - * @param string $intendedMembership Required. The intended membership name under the `parent`. This method only does - * validation in anticipation of a CreateMembership call with the same name. - * @param array $optionalArgs { - * Optional. - * - * @type string $crManifest - * Optional. The YAML of the membership CR in the cluster. Empty if the membership - * CR does not exist. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\GkeHub\V1beta1\ValidateExclusivityResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function validateExclusivity($parent, $intendedMembership, array $optionalArgs = []) - { - $request = new ValidateExclusivityRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setIntendedMembership($intendedMembership); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['crManifest'])) { - $request->setCrManifest($optionalArgs['crManifest']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ValidateExclusivity', ValidateExclusivityResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); - * try { - * $response = $gkeHubMembershipServiceClient->getLocation(); - * } finally { - * $gkeHubMembershipServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Location\Location - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $gkeHubMembershipServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $gkeHubMembershipServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $gkeHubMembershipServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 - * - * @experimental - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); - * try { - * $resource = 'resource'; - * $response = $gkeHubMembershipServiceClient->getIamPolicy($resource); - * } finally { - * $gkeHubMembershipServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $gkeHubMembershipServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $gkeHubMembershipServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - 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('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->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. - * - * Sample code: - * ``` - * $gkeHubMembershipServiceClient = new GkeHubMembershipServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $gkeHubMembershipServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $gkeHubMembershipServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @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\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } -} diff --git a/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/GkeHubMembershipServiceClient.php b/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/GkeHubMembershipServiceClient.php deleted file mode 100644 index c16c06836595..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/GkeHubMembershipServiceClient.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - 'google.cloud.gkehub.v1beta1.GkeHubMembershipService' => [ - 'CreateMembership' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1beta1\Membership', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1beta1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteMembership' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1beta1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdateMembership' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\GkeHub\V1beta1\Membership', - 'metadataReturnType' => '\Google\Cloud\GkeHub\V1beta1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListMemberships' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResources', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php b/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php deleted file mode 100644 index 837fb971ce08..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php +++ /dev/null @@ -1,213 +0,0 @@ - [ - 'google.cloud.gkehub.v1beta1.GkeHubMembershipService' => [ - 'CreateMembership' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/memberships', - 'body' => 'resource', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'membership_id', - ], - ], - 'DeleteMembership' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/memberships/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateConnectManifest' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateExclusivityManifest' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/memberships/*}:generateExclusivityManifest', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetMembership' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/memberships/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListMemberships' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/memberships', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateMembership' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/memberships/*}', - 'body' => 'resource', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'ValidateExclusivity' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{parent=projects/*/locations/*}/memberships:validateExclusivity', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/memberships/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/memberships/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{resource=projects/*/locations/*/memberships/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/GkeHub/v1beta1/tests/Unit/V1beta1/GkeHubMembershipServiceClientTest.php b/owl-bot-staging/GkeHub/v1beta1/tests/Unit/V1beta1/GkeHubMembershipServiceClientTest.php deleted file mode 100644 index e39194df8bb7..000000000000 --- a/owl-bot-staging/GkeHub/v1beta1/tests/Unit/V1beta1/GkeHubMembershipServiceClientTest.php +++ /dev/null @@ -1,1084 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GkeHubMembershipServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GkeHubMembershipServiceClient($options); - } - - /** @test */ - public function createMembershipTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMembershipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $externalId = 'externalId-1153075697'; - $uniqueId = 'uniqueId-538310583'; - $expectedResponse = new Membership(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setExternalId($externalId); - $expectedResponse->setUniqueId($uniqueId); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createMembershipTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $membershipId = 'membershipId-1132211676'; - $resource = new Membership(); - $response = $gapicClient->createMembership($formattedParent, $membershipId, $resource); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/CreateMembership', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getMembershipId(); - $this->assertProtobufEquals($membershipId, $actualValue); - $actualValue = $actualApiRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMembershipTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createMembershipExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMembershipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $membershipId = 'membershipId-1132211676'; - $resource = new Membership(); - $response = $gapicClient->createMembership($formattedParent, $membershipId, $resource); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMembershipTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteMembershipTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMembershipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteMembershipTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $response = $gapicClient->deleteMembership($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/DeleteMembership', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMembershipTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteMembershipExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMembershipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $response = $gapicClient->deleteMembership($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMembershipTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateConnectManifestTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GenerateConnectManifestResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $response = $gapicClient->generateConnectManifest($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/GenerateConnectManifest', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateConnectManifestExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - try { - $gapicClient->generateConnectManifest($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 generateExclusivityManifestTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $crdManifest2 = 'crdManifest2194459340'; - $crManifest2 = 'crManifest2618391538'; - $expectedResponse = new GenerateExclusivityManifestResponse(); - $expectedResponse->setCrdManifest($crdManifest2); - $expectedResponse->setCrManifest($crManifest2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $response = $gapicClient->generateExclusivityManifest($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/GenerateExclusivityManifest', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateExclusivityManifestExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - try { - $gapicClient->generateExclusivityManifest($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 getMembershipTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $externalId = 'externalId-1153075697'; - $uniqueId = 'uniqueId-538310583'; - $expectedResponse = new Membership(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setExternalId($externalId); - $expectedResponse->setUniqueId($uniqueId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $response = $gapicClient->getMembership($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/GetMembership', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMembershipExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - try { - $gapicClient->getMembership($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 listMembershipsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourcesElement = new Membership(); - $resources = [ - $resourcesElement, - ]; - $expectedResponse = new ListMembershipsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResources($resources); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listMemberships($formattedParent); - $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.gkehub.v1beta1.GkeHubMembershipService/ListMemberships', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMembershipsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listMemberships($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 updateMembershipTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMembershipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $externalId = 'externalId-1153075697'; - $uniqueId = 'uniqueId-538310583'; - $expectedResponse = new Membership(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setExternalId($externalId); - $expectedResponse->setUniqueId($uniqueId); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateMembershipTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $updateMask = new FieldMask(); - $resource = new Membership(); - $response = $gapicClient->updateMembership($formattedName, $updateMask, $resource); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/UpdateMembership', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMembershipTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateMembershipExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMembershipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->membershipName('[PROJECT]', '[LOCATION]', '[MEMBERSHIP]'); - $updateMask = new FieldMask(); - $resource = new Membership(); - $response = $gapicClient->updateMembership($formattedName, $updateMask, $resource); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMembershipTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function validateExclusivityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ValidateExclusivityResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $intendedMembership = 'intendedMembership1074975850'; - $response = $gapicClient->validateExclusivity($formattedParent, $intendedMembership); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.gkehub.v1beta1.GkeHubMembershipService/ValidateExclusivity', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getIntendedMembership(); - $this->assertProtobufEquals($intendedMembership, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function validateExclusivityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $intendedMembership = 'intendedMembership1074975850'; - try { - $gapicClient->validateExclusivity($formattedParent, $intendedMembership); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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); - $response = $gapicClient->getLocation(); - $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); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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); - $response = $gapicClient->listLocations(); - $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); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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'; - $response = $gapicClient->getIamPolicy($resource); - $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'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $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(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $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 = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->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/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Attestation.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Attestation.php deleted file mode 100644 index 8db0f36078c4..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Attestation.php +++ /dev/null @@ -1,40 +0,0 @@ -internalAddGeneratedFile( - ' -ˆ -grafeas/v1/attestation.proto -grafeas.v1"f -AttestationNote. -hint ( 2 .grafeas.v1.AttestationNote.Hint# -Hint -human_readable_name ( " -Jwt - compact_jwt ( "} -AttestationOccurrence -serialized_payload ( ) - -signatures ( 2.grafeas.v1.Signature -jwts ( 2.grafeas.v1.JwtBQ - io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Build.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Build.php deleted file mode 100644 index 6ab3907fa635..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Build.php +++ /dev/null @@ -1,39 +0,0 @@ -internalAddGeneratedFile( - ' -´ -grafeas/v1/build.proto -grafeas.v1!grafeas/v1/intoto_statement.protografeas/v1/provenance.proto"$ - BuildNote -builder_version ( "Ì -BuildOccurrence/ - -provenance ( 2.grafeas.v1.BuildProvenance -provenance_bytes ( 7 -intoto_provenance ( 2.grafeas.v1.InTotoProvenance5 -intoto_statement ( 2.grafeas.v1.InTotoStatementBQ - io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Common.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Common.php deleted file mode 100644 index 24ca668a48945347c6dbd5460f3868abca6a98ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1213 zcmZ`&e{b715S`=ZhcC{i3N4oXF@Vhq)Ezn-*-)TxmJN=j8bTafi|qgz3<$JzR){gA zAksnIAzx-+W57P!NJ(`A1l2#{k?-BT$K(C_dv=q-4`hG>bE+{Ri#5?VNU~gN8B0zU ztK|}N63g3+am?F#;kn*Hu}Yjx9;6)Y$Dl5_w8=zQTvq3CU5fa&c1Vwh8Vxt3ugNzp+Y3FG)6K z-s8YyW^u4z$J3q+gZ-teWM7jZB7@+54UW1 z^cETumI`VFqWcsY>Qhj_o9=TsD7zB2-!B#XSbtBv*%ZQg7}5{C)eg==P_C8$CxIc=~A5x-ogGQpSzZwUPA#n)cd;GBz(r z3TtR-;wYo~ru1)e?haXuLZRyd;D;Etx z<1#7sqs3ZdiEjS*Uk&y~QsX%jiTfQqH&f$B=fTK}W}`{y_k;I=?>S!?Wd~QY;mE)2 zodv^SdhOKQ25g_rf}!VZ*=2Ci8~9G$*xe0#{c{^UalZ!e{BStFzVJs=XWKNh;RTca z_{zV$c6LlB_IuN*KbiKX!Fc5CTJkI$T=qQQ*|X&S_#zwzy;0wH8tyZ2yvf9m9#Y`! z4>(}*L0iJwpYPIQY}%>hRHSX0r=1iT~8B16qS#HTqxKDVns>DN~9#Z4fvu(R0>*ofEFb@m`yg*+1qyFc4jj(OHvJg z#=qmg@RvBd-F_rR`_j$bbI(2Je(c-#Q8$8Tq>cg=H5iaqpO`L^NJ%4^3`r|)w^0!$ zdl3&&xrCfH$VKCdd^|n7dTLX(j1|Kw=_uMpsw+49l>{7eDj2#c4}hRO)DdM!>do3Y z8X8bTz4{=$ z?N~6wr65T{!-^^IkpX9d-HD`icSO9pl${X0W@6Zy_0EJrC1~iKqGpOmMyjTTR;wK} zqc$ax@?KUpq2p~*9%!sqr$inRqhg$_PKZJiD{+|WP6%#CPu|@v^1k8?DsKAK>e$dY zKlStS9naJs2f;|}Cp)V~7t)}Uhn(Ri#NrH@ zDK9zeupDIFvJEfJra>1Ltzex5=Ez)m`C!`}le%NV>jB6qz>-}-3#XQMe#on^hXGIH z#atTv0C{HDpoM~UdsKZdF4*w$fwy}%eWKSr;kq`&f4=8Df`VpL*j3VYGU=A+;-aNl z**b@nNwBjCdAq}H+d@CI0|-;cIp;at*V#N$yQ>EqljVoAsuf^ud=0+oM_9Uq!nFA{ zSY#3UvEo@vx4;=W^aIJ_9tvX{nY7!2hn-DZU5a31Oxa*8R?50X=MAh2Dg2=V<0n3} z6`YLY$)w;5DTWLt*%xOUHYZaV`pRB+I!h~|bOsNmQdVF-qNbY}cnE6&*HK9ON&Oxb zLADpGurNtgyM#QK6Iz-x-(GjpqjWnmq@v?W)v0t)q~DUt;1!Lyu8bG>FnjzpJ6Hd5 d+*(MXuXaaE|6*`~69@axV@;8RySjy2fWPu-lUe`( diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Cvss.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Cvss.php deleted file mode 100644 index 77a230e503ff8fc5b474543f37a7a7640f2968cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3353 zcmeHK-BQ~|6t2xr%i+(6049ZIG08wWtrr*F_v5!S8^`#~ySHT|=&?dgSY& z?zVMP_jJ|Jet72Jw1Ggl9 zlVpP}!St|Wsz$4fUCq&L&vGOJEtUG%8^}~d^~32sv>)VHDkYLUL7p?f^i3S(ZvO33pY$-r;Pa`{=x-JQtgMo{JyR&7Tg zl2Y`s+jj7;1Kq*h{HHX+qm&5J2we}s%nQg3TjM%pC*84XZK3D6)=+78X;-^ zF48ktRfno>+?-;_TeyQ)c%OlV$RTaRCaWkc_p06GIYq3u8#P(tIpIv;%ehaOO<0S% zYrOJWtiQ@-nES9Eb+P3iSdOnLxh%5*t5IK7Q)Zh$eg7#g56`2zyJ{EZumT%15Ia{lcmdG$GuoxI`OxZ#mX2WJ)2S&J% zNSd)o%P=3>=}t4u5T(O9sZSOD0hsnx||a%rOSp+w&Co_iFPz4Zhk z=$hwuh~7qm7k0_vM9G^-dHNy2o5cDkcbDx@?*7QYQmn_mfctDiIVXxu1UN-kh>pel z7mcbS5EUjW;9m?;vMkgp#1)8t)D^zcA0_vHExBLHFz+jF6FV-ED*vkTf0DtVE+=mt z29_e;C!{IjwxeA3wAF$|-5OJZ(>b3<$8ah0^EZ7umKXb$p_=`o<@68w*rfj>4g!~I r>+Zqr;CmcC{*|4o)Y;A~g&ysVhUKq<8GLMHpE#~lWH6au!!^La2Pne9 diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Deployment.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Deployment.php deleted file mode 100644 index 4c9c49aad310e4ccf57902e664e90149b926943c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1084 zcmah|+fLg+5N#3~U??=Qc!=7UEkz|rt)tMF$|eV|o^KjsKh2)+dU!!P}w%maq6?poOxfw9~XkNFrUcknDIHy9Pu?deP=HnkH zlGRJ3(pcU4UWUy%aOk>;l&I4;41gp?ImRhvp$3;4t40&n@?{w-ZLD6_muq`Z%ph}} zFOQyyS-3V@u%7TmO69+l4XC<;`z)w0Wj!CmGW9&IJgz^?F7EoMrap`|tVAJIzL3-U zvc_%f?V9sA%s*K)?HOU~2v&ZbjXG@F#|NX{@a$xKae8idj|RO#w^MsyEJLOLp<62% zE3ni%?tZG3bw<^ri}TU&q*gin2}1XMpU%2z5Kw=xYTHc_avJqq)E{io@oz)ts`B@Ff+udO`!> z;{^=^OepFP&o8OOQ!KIDPZ93B)+qq-a2TRaj)V_@)GvsxJw{L{u~dIASU6!mlMH+8 zz0!JyX4ng5)-Tp-68ImHR>)8M!?)2qu%tK-ryzUqTOCqwIbOBEeabkH3Eqj!TqsU0dXDG`6#>(rWmGc^2LJt zn=wh_zx$D8Z8oOUqN_dSuSU^_xGOK=&mE}$zp*sP&h%xgel$;-)l4j>M%k2k#iS@N+S7yMx3E_j(&mzC-@qPL=C}=&5&vNRv{pi;#{S8nzS5z` zfxoD;n52+Ol6@0o7b+y6wFfHTk#++6YJtc}NU%SNCtur2fb~3AZVSD*2-*+u z7z=X4mNZ3de-3e8`Nyc#U&EJq-&VCgU2}%KRkBK|)JMk-Xd4Fh9FEL^J+kcaVC+l` z+qn46v7E`+c7|Qk>RH`R^$QJP+b~DgyKc3lJ%%02&fdz$f0tlCSCF;u2)-(4oRKk7 zv>&tW!oy+L?pSs|rE^Tfw&S<5b_ms;Wn0eA-Oj`rn`YN>s+BmUIk+5NbVptFb^uR` zn4V!>D1{HS8XOiMRkrbPIJg?AldXEWS~~v~_84C?&9L=y ynI7SQh0WE4Kg}NhDp&ef#`Sg*`u)pdNqn2G*0oI>dxwz?TR4eKcjX=20sIFWgfim* diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/DsseAttestation.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/DsseAttestation.php deleted file mode 100644 index ef80894effc944fe157dddad5b1351735c4cb183..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1079 zcmah|(QeZ)6r~$NnO0@T7x0NVNtH&d6M0JPbB@pPJ$d&bnn&ar^iiOq8aS zh=-_bfbI~khZE>^2a{7njb)-3IuI!8BaQ3JM%{~JoKmeZ)>LyT>`aXiK^GWDlp*v- zozJMLM>Tc(Inn*rXcEFg8pqHz0__c-{3KwWD4B(vK_<%JoX1lxxaKtEKaBAf_%w{s zXxzs7iD0P_NC`v1(7J$JGsT`q(gbaR+m|v3(H*7PO>TD}G%7(uw~H}TJknB)4AgM~ z)WwaZE7ryO*i?@DVC5bi=a$J9Xq903bO41qQKFgoP6bxQo4fs<+>dgxkiu~`aW?F` zI3|pVH8vB$1q!{LoL$As_k10^?RiDcPiFj9;Vku8BY$?u>3`>5C2NSiY#f*2<`m;- zn%-4rDX+=dk{ou&<6de0*HUBk4Y@xzjH3!vtb;;Mv-h!5_OdvX=tVkLn3I zoF@w^rV35@W+6_~PG*|>XTK`s=|56K#uBB_G^YBT?4ej`56o5R>v8uI_anlSdvh>7h4`=uIf8*ZD#oa#>=HD&OA*Sv&1OhExQ$R6#vJ wk^Ncqe2Ydru5ZTCT)+O_+3kOA&mLsZ*R^7VFY+puntNw!Gh|+|6P0gwKun`Pig8l+|=FK6#I9+daw#m z_uVA1wB-z&qwy2>n9X-+xPA@gL>+Pfz1@Q zf;wHiYl~;Hy|A=F6w*WrW=(hGy`W)T!2d3L8^j2UrT?{SrR-A99HDjPrk0a=EN z94poc*P7L}co}Zp&Ckn%_T9YF7`yMouslU;l<&WxKV6m?L*o+wg*EFESF&{_ReBA* zk6bv>=@8k!iHM4>g_9+|9#h6YB)hC|VAtcmu> zR5LR4DlpM#A(1u7wHI_p*T4L7qnoq0;XN80Q$LKTMYyVg-wi1%Z@#Il!_^GgURY9& zkb78@en#tQQhF`_IxU4ct8i8Qb6OpN;RepHo}W1X9D)msAT7MR4wK127^k&{oFQ>U zkmR#q!ViOeL()43?=cSgY(z&s`^dpTq}w$;Q_qF?W$cp=VVr&wc{tId`9Aom6Z+l! zY$3E@=i4g443I2_ybLAC&p|9$pR|%)5YZr(L3WmWr1|ZP=7NY<^^9p;N( z1xP;j>$HkgOHU%|tijYKO%-{c)32L2hm(7H>#N@Qdu8C?mFX^ocV5G_pLmJ(lq7r1 z5)4HyHq%t}(CQ3-&=e5O;cZbZ$YmJX^L)H7s?Hi=Q?Dg>Ikgz8FA@U4m(uW%2E4zH zI5n7VGoD0vucH{ms46uHy3j^&6*!rO@qm7l)-(gW!#j^*dY$?-rD}5)USC-{hUqol z-P@njPnt>qDkz?+mZGH|Ume7BJKq;z`X!$dl;k`C;Iz@7Woe zml2H&!I^^#1`ek=d?wrQ?ref(z*v7oUx(C$35F)7|NjK>Q<&7uO8CyfMMl;PxD$F+ zV-9wQY#Am6Wc57sn95f$DPXGW_5;u<7-nwQyoMk$Ms?6ZO2<4cvx^& z!D=_vBb%I4xS=U`IP8A1ao=n`A}7XdsSF70KZOsvnLo#Qul#lbhBw97L{4GMsE)+A zCK)1GcW1h|>a2YGw}1R@V1dlDHzu#yrT0-jYAhL3{?h4LgjrK~mev&y7QP?+D>$e#;vtur#o zUHue0@5x+U>Se1u(=G1)M^1@@>>cj!s@hd9ES*(ITLcODBWAdD1Tr(+D$U&P#)Fq4 z!z;a1|L~DB)9b3wTUxV+e)JIkUM#g-0gv^CDxsj zjItDqhZw|&ad(l6-AyiYlXK)oN0Zz}NmYhlz)05M67s$tWxkx5GH$J!R6^!s!)^!2 z$naVUz}En3P$Gs6wVt`qjq@_*rQTxxWdT67TGOUl&uq3IYK2F-;0SBoA}#Z2>#TA` zvVnz<6WKERO};}qXl#APPTr(Lt2A@RKw|qQc^GTl#iAo{*VV;V=3df#O~|*HCp8P2 zc~a|{W9@koPAsgv{Zz6%UFED~*)jO|rvhBbz^3YJLT-1$sYv;~8H_DuS&U4m{ ztIV+kiKBPev&txUTJ*A+`M*~1lX8Hs(%5Gb{N{R+c!}&%_~9Zc;#-O8&tc39HJ7#v zKYb`0*?#D|!G1A}_e=XUz^0ytB_U$k*#~H(^{TwPe>X6=`MmO`ve@x9Px7%Ke+jrd e#Gm@%o%}n@viO#(efsVC*_ZDWpJz|u6yU#^)internalAddGeneratedFile( - ' -× -grafeas/v1/image.proto -grafeas.v1"- -Layer - directive (  - arguments ( "@ - Fingerprint -v1_name (  -v2_blob (  -v2_name ( "O - ImageNote - resource_url ( , - fingerprint ( 2.grafeas.v1.Fingerprint"“ -ImageOccurrence, - fingerprint ( 2.grafeas.v1.Fingerprint -distance (% - -layer_info ( 2.grafeas.v1.Layer -base_resource_url ( BQ - io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoProvenance.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoProvenance.php deleted file mode 100644 index 5861d7ce8a1b..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoProvenance.php +++ /dev/null @@ -1,54 +0,0 @@ -internalAddGeneratedFile( - ' -Î -"grafeas/v1/intoto_provenance.proto -grafeas.v1google/protobuf/timestamp.proto"œ -Recipe -type (  -defined_in_material ( - entry_point ( \' - arguments ( 2.google.protobuf.Any) - environment ( 2.google.protobuf.Any"I - Completeness - arguments ( - environment ( - materials ("Ú -Metadata -build_invocation_id ( 4 -build_started_on ( 2.google.protobuf.Timestamp5 -build_finished_on ( 2.google.protobuf.Timestamp. - completeness ( 2.grafeas.v1.Completeness - reproducible (" - BuilderConfig - -id ( "¤ -InTotoProvenance1 -builder_config ( 2.grafeas.v1.BuilderConfig" -recipe ( 2.grafeas.v1.Recipe& -metadata ( 2.grafeas.v1.Metadata - materials ( Bh - io.grafeas.v1BInTotoProvenanceProtoPZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoStatement.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/IntotoStatement.php deleted file mode 100644 index 170908323f19bcfbdf0c0728f7e8fbe00f97ba7f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1374 zcmb_b(N5bi6s0W%aXW?-rm3nX%`ha2G*Xpm5(;AzRaxO-13|S16sdC4+u$wOk?jd_H>86cCDk|}{V~y(NJ1&J@I*lR(Qt^8 zc;YH#0ZN;Y_6hlV(j|xODZ9eQ;m-EK;%BrGQ#}ngh$knBX>BxsT@*3o{ap z&Jl8I>^RQU*p%lf^m(A@|G{3M6y0m_`0+`s+aFCcBq1IQ23cmGO)J$im$Bzf_*I6r zfA)|ClM;K>tmRuy8BaaaW|KhDj;n3u2xlsKH%5C;UyHPK{ZA2Aj(OL_nzfy^3iEm# zVzodD^`*0NFaEGLU{OW=@961jk(BC{omG3P$v#iFte5aSlsI6X8G!^>EyX0(4!~4p zb>94|?7Yeoq#CBzb2MkYhm{%e)p7!?<$?Ea)xZv+Is?l*R~Hie+SB;S%^uCQDzKC} zS-*zGJBQC;KAz_^9IF8f1LmW;3+44a>NFI)om3ohEyuNOsN_Da3Y31}ctW-e4{IKd{>m#;F zMS%dgct!%TM^LkO+9n*2F~@^uWIwn*JO;2F90aHr`N5xn#Lo{$4z*CgF&B@08VspR zImHhBL*#jaCfEsx@V#$430;d*&qdOq>sq9IfFew3yYG9Vt`jt9dYRbl8lZJBRpj8vC3Nl z+$`P(EBr*+nLZtyQ{s$I$rR72$7;1@RZEan*9EnMGjBHY+|T?I!4xsl;%Mi{s4PQN%*46=40ar$-GC40garcE(1b_+XfNq; z9UbX9zzmC$#h)-^Lq^r}poPpaHq~Me^5eMw5-KA%OI_Hy@GK!jk@Tarr1gEs-UXJa zJ`lJ78$RY!m0Pa#UmEhU+&dm8f{6_|CNT{eLBp-NDVZ22_%Z-#0)B;wH9iaR><#%R zpBQ;nQ6k}j+E^!eTkL*`;6#Bt4;Q$~>?0K^X11snYs~JdO@S?@oVWoo^!wNs(UD$) z%$VAu#m1hZKu@-|u1-pSrC~Rwv};)*V?<2;XNlGHC$Qzj{S@+&q&`j}E_(e9tP(1P zrBtdVwX0MlwX5kb*R(4&^#y7prvwL5ZfgR%b&nY&RXZKM!oozkWr@7?YGT~ zVoFSAw%zKq+E?vjS}n{EYN7q~1_~>efWS2SXTP;B8)uhS{l*$*7PJqqUkO0@^6KYe z`t%)aQ!i0UFZKItTV1&o+jFpMS3G7{ZQ`nrST#DrJ`JkN+wC}h{X4BS`{pR4OkX}- Y+?&s%+duKKc<@7^ETilE25tcU2e*VT&;S4c diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Provenance.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Provenance.php deleted file mode 100644 index 26eac47b31ced6d96f06119abcebb8a3b04a1c0e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2688 zcma)8ZFAE`5XO#i;&n`nLa7_t>7l?73Q;D80%J;A0i0NN44WB56)% zw`qqz&`+J|@TDL7Gy3bgcPHDj6QKTL>F(LR-DjWO(>ITkqXd>on?+1e$$WBnLgW!6 ziHK$F#UVND_j*haFFsCq$b>`4_8xh$cR+TwI|o!YhV=WR0+G8|b8?3LP@qk4% z@|dIj07Uedr3v*IY42}7XOj9<(r(+BbYHJO1n@$dreuF)3cmxvU(!Dexkpk-CH`IG zsmmiSISu)580{m{qhZR>{4}=Lk37lah$w?S3})pfF+LUcS`uS+k4U#2$3e)tc(9By z*={G2Ohh#7ZnM-AJdv^3M`)`RFgc=0t*qS4j#ch>kF1y&Tdh+;J|a@|S^jiF1e1Lc zJ=Ae42X9AD-3f}OqC4P7q@>45t2It*>_um_`Yq3L*zo;P$WO3*E2BfykvHJqI$Zfc z-7Ls9ox!^OX9*TI`#ki=C9(jD+;0>}VWnc>3l{rl=1CXVihAuj%%O0OY2>Gk88Wj{ zZ7w=vm(G^ivsPi@5Iswm3dwualWC)*(UPG?<*xiAh=w=a03qE}YoqG=Ns zDau--0ot>bPw|!RB}JtaJP4RjR93Z%ZKx@Zd^b*%sME&0W@t5UK2;t^zwa6RP9(*N z^{HXnN6!N$Qgqa)Dfdfv;Nod?6=vSBldQfqI6t6apPACOiVq6*yCRgckeA`guy}5Y zEkgt5W+^Kgj7083wTCKnk7#iu?09axw?b|U}l`TVQR%lQb#hMJdkfboj843*w6Ya~MD zT+bV;MD1lLsefx8O7bLOXK_An{{*wcmO-4FsTmFfWzj$rT2U^j2u#COEZp+BzRxcEbyjVDnWw6)ccx8l!AyX7qm0id z@LW!VzlL&14_P==#PvLW0_;4~IIX~?RjB4(6{{cWjLphOu=XDXnBNFFO^4jvg3=ov znX!4H`9=QxJkEKFAXQ9VXU)6)7)pBe64ak|UTnMHzj(F3v(dddE)0GH3E9%VYKilruw>egy=Vlt^xb$sg+s0udV zYH*CEye?V|FJzhy+byd_<9)g9p4$YN8+x+e6=3m<(kh7_#i`VT)J%}eaKWfU4N`U2 zm}xW}my$x|thiJgRGa@duDeigPbo-MzAwV8Cl=43!+r(jjIFz{FuW2csht=@`z8}( zgF)Bugy9W}M3vMXYu|&~1a9iOHSAo3iauwon9c8?#^YQW_6t8g$S%qt4rvrPu?W@z z7Ga<=UNc)X;py7=yWnB=_)l@B{c_{5tf6;qjJ_pqo6nov*U)>vgf!B8uDpe}0RI8H Cun3p{ diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Severity.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Severity.php deleted file mode 100644 index bd0c81933da82d252d670e0445a98d5e1628beae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 744 zcmZ`%U2EGg6kVFG4R;#^vxn{Njuo1Y&7tgNB+Evcq^_a)Sd(^am=?vkb_K3vBstKH z{F(i<{gTOcmKI9&BB6WEx#u3~^Vjq`g}3ODAjJ$VaDI#CnlM$;$WSIY&!UJFhVmxm z2`Lw`KgQ8`hJ(I8dt<3uW-6o>#)?J6baQ#w)U+hU&8=Ig00?$NI%OfDH#r)TVGCwh z;FW~n;;;=6CQNIbu8Hs)(5^I_Cp<)Ln6cX)*H>I{!&$d zwz(XSuu*z!wH}!4pivp!?~bU*WJt0^efV2} z*N^7zz`Eov58quv?SHt=D|k5_Tnx_q*^jI9(R4EC`N#gCUw`5}gWaJ&@`v5idd1m= z>go70} z#I96vGbT}diDp@1Dc8+A|Lyhh&sNnt>&|xy=*Rud%IJe4cm*qfe}6pT A_y7O^ diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenance.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenance.php deleted file mode 100644 index 0a0032106807..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenance.php +++ /dev/null @@ -1,61 +0,0 @@ -internalAddGeneratedFile( - ' -À - grafeas/v1/slsa_provenance.proto -grafeas.v1google/protobuf/timestamp.proto"þ -SlsaProvenance7 -builder ( 2&.grafeas.v1.SlsaProvenance.SlsaBuilder5 -recipe ( 2%.grafeas.v1.SlsaProvenance.SlsaRecipe9 -metadata ( 2\'.grafeas.v1.SlsaProvenance.SlsaMetadata6 - materials ( 2#.grafeas.v1.SlsaProvenance.Material  - -SlsaRecipe -type (  -defined_in_material ( - entry_point ( \' - arguments ( 2.google.protobuf.Any) - environment ( 2.google.protobuf.AnyM -SlsaCompleteness - arguments ( - environment ( - materials (ñ - SlsaMetadata -build_invocation_id ( 4 -build_started_on ( 2.google.protobuf.Timestamp5 -build_finished_on ( 2.google.protobuf.TimestampA - completeness ( 2+.grafeas.v1.SlsaProvenance.SlsaCompleteness - reproducible ( - SlsaBuilder - -id ( ‡ -Material -uri ( ? -digest ( 2/.grafeas.v1.SlsaProvenance.Material.DigestEntry- - DigestEntry -key (  -value ( :8Bf - io.grafeas.v1BSlsaProvenanceProtoPZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenanceZeroTwo.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenanceZeroTwo.php deleted file mode 100644 index 2df7242755b6..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/SlsaProvenanceZeroTwo.php +++ /dev/null @@ -1,71 +0,0 @@ -internalAddGeneratedFile( - ' -¥ -)grafeas/v1/slsa_provenance_zero_two.proto -grafeas.v1google/protobuf/timestamp.proto"Ó -SlsaProvenanceZeroTwo> -builder ( 2-.grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder - -build_type ( D - -invocation ( 20.grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation- - build_config ( 2.google.protobuf.Struct@ -metadata ( 2..grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadataA - materials ( 2..grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial - SlsaBuilder - -id ( – - SlsaMaterial -uri ( J -digest ( 2:.grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial.DigestEntry- - DigestEntry -key (  -value ( :8¶ -SlsaInvocationI - config_source ( 22.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource+ - -parameters ( 2.google.protobuf.Struct, - environment ( 2.google.protobuf.Struct³ -SlsaConfigSource -uri ( N -digest ( 2>.grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource.DigestEntry - entry_point ( - - DigestEntry -key (  -value ( :8ø - SlsaMetadata -build_invocation_id ( 4 -build_started_on ( 2.google.protobuf.Timestamp5 -build_finished_on ( 2.google.protobuf.TimestampH - completeness ( 22.grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness - reproducible (N -SlsaCompleteness - -parameters ( - environment ( - materials (Bm - io.grafeas.v1BSlsaProvenanceZeroTwoProtoPZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Upgrade.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Upgrade.php deleted file mode 100644 index ccca29a0b7e1..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Upgrade.php +++ /dev/null @@ -1,60 +0,0 @@ -internalAddGeneratedFile( - ' -Ù -grafeas/v1/upgrade.proto -grafeas.v1grafeas/v1/package.proto"¯ - UpgradeNote -package ( $ -version ( 2.grafeas.v1.Version6 - distributions ( 2.grafeas.v1.UpgradeDistribution1 -windows_update ( 2.grafeas.v1.WindowsUpdate"] -UpgradeDistribution -cpe_uri (  -classification (  -severity (  -cve ( "ì - WindowsUpdate4 -identity ( 2".grafeas.v1.WindowsUpdate.Identity -title (  - description ( 6 - -categories ( 2".grafeas.v1.WindowsUpdate.Category -kb_article_ids (  - support_url ( < -last_published_timestamp ( 2.google.protobuf.Timestamp/ -Identity - update_id (  -revision (- -Category - category_id (  -name ( "» -UpgradeOccurrence -package ( + -parsed_version ( 2.grafeas.v1.Version5 - distribution ( 2.grafeas.v1.UpgradeDistribution1 -windows_update ( 2.grafeas.v1.WindowsUpdateBQ - io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Vulnerability.php b/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Vulnerability.php deleted file mode 100644 index d53ef1360fed..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/GPBMetadata/Grafeas/V1/Vulnerability.php +++ /dev/null @@ -1,94 +0,0 @@ -internalAddGeneratedFile( - ' -è -grafeas/v1/vulnerability.proto -grafeas.v1google/protobuf/timestamp.protografeas/v1/common.protografeas/v1/cvss.protografeas/v1/package.protografeas/v1/severity.proto"É -VulnerabilityNote - -cvss_score (& -severity (2.grafeas.v1.Severity5 -details ( 2$.grafeas.v1.VulnerabilityNote.Detail# -cvss_v3 ( 2.grafeas.v1.CVSSv3D -windows_details ( 2+.grafeas.v1.VulnerabilityNote.WindowsDetail6 -source_update_time ( 2.google.protobuf.Timestamp- - cvss_version (2.grafeas.v1.CVSSVersion­ -Detail - severity_name (  - description (  - package_type (  -affected_cpe_uri (  -affected_package ( 3 -affected_version_start ( 2.grafeas.v1.Version1 -affected_version_end ( 2.grafeas.v1.Version - fixed_cpe_uri (  - fixed_package ( * - fixed_version - ( 2.grafeas.v1.Version - is_obsolete (6 -source_update_time ( 2.google.protobuf.Timestamp -source (  -vendor ( ¾ - WindowsDetail -cpe_uri (  -name (  - description ( M - -fixing_kbs ( 29.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase* - KnowledgeBase -name (  -url ( "Œ -VulnerabilityOccurrence -type ( & -severity (2.grafeas.v1.Severity - -cvss_score ( -cvssv3 - ( 2.grafeas.v1.CVSSG - package_issue ( 20.grafeas.v1.VulnerabilityOccurrence.PackageIssue -short_description (  -long_description ( , - related_urls ( 2.grafeas.v1.RelatedUrl0 -effective_severity (2.grafeas.v1.Severity - fix_available (- - cvss_version (2.grafeas.v1.CVSSVersionà - PackageIssue -affected_cpe_uri (  -affected_package ( - -affected_version ( 2.grafeas.v1.Version - fixed_cpe_uri (  - fixed_package ( * - fixed_version ( 2.grafeas.v1.Version - fix_available ( - package_type ( 5 -effective_severity (2.grafeas.v1.SeverityBàA/ - file_location - ( 2.grafeas.v1.FileLocationBQ - io.grafeas.v1PZ8google.golang.org/genproto/googleapis/grafeas/v1;grafeas¢GRAbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext.php deleted file mode 100644 index 36f9800b4f76..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext.php +++ /dev/null @@ -1,101 +0,0 @@ -grafeas.v1.AliasContext - */ -class AliasContext extends \Google\Protobuf\Internal\Message -{ - /** - * The alias kind. - * - * Generated from protobuf field .grafeas.v1.AliasContext.Kind kind = 1; - */ - protected $kind = 0; - /** - * The alias name. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $kind - * The alias kind. - * @type string $name - * The alias name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * The alias kind. - * - * Generated from protobuf field .grafeas.v1.AliasContext.Kind kind = 1; - * @return int - */ - public function getKind() - { - return $this->kind; - } - - /** - * The alias kind. - * - * Generated from protobuf field .grafeas.v1.AliasContext.Kind kind = 1; - * @param int $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\AliasContext\Kind::class); - $this->kind = $var; - - return $this; - } - - /** - * The alias name. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The alias name. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext/Kind.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext/Kind.php deleted file mode 100644 index f46137817ef2..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext/Kind.php +++ /dev/null @@ -1,72 +0,0 @@ -grafeas.v1.AliasContext.Kind - */ -class Kind -{ - /** - * Unknown. - * - * Generated from protobuf enum KIND_UNSPECIFIED = 0; - */ - const KIND_UNSPECIFIED = 0; - /** - * Git tag. - * - * Generated from protobuf enum FIXED = 1; - */ - const FIXED = 1; - /** - * Git branch. - * - * Generated from protobuf enum MOVABLE = 2; - */ - const MOVABLE = 2; - /** - * Used to specify non-standard aliases. For example, if a Git repo has a - * ref named "refs/foo/bar". - * - * Generated from protobuf enum OTHER = 4; - */ - const OTHER = 4; - - private static $valueToName = [ - self::KIND_UNSPECIFIED => 'KIND_UNSPECIFIED', - self::FIXED => 'FIXED', - self::MOVABLE => 'MOVABLE', - self::OTHER => 'OTHER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Kind::class, \Grafeas\V1\AliasContext_Kind::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext_Kind.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext_Kind.php deleted file mode 100644 index 823c2dd74880..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AliasContext_Kind.php +++ /dev/null @@ -1,16 +0,0 @@ -grafeas.v1.Architecture - */ -class Architecture -{ - /** - * Unknown architecture. - * - * Generated from protobuf enum ARCHITECTURE_UNSPECIFIED = 0; - */ - const ARCHITECTURE_UNSPECIFIED = 0; - /** - * X86 architecture. - * - * Generated from protobuf enum X86 = 1; - */ - const X86 = 1; - /** - * X64 architecture. - * - * Generated from protobuf enum X64 = 2; - */ - const X64 = 2; - - private static $valueToName = [ - self::ARCHITECTURE_UNSPECIFIED => 'ARCHITECTURE_UNSPECIFIED', - self::X86 => 'X86', - self::X64 => 'X64', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Grafeas/v1/proto/src/Grafeas/V1/Artifact.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Artifact.php deleted file mode 100644 index ff6f4d0a38d3..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Artifact.php +++ /dev/null @@ -1,159 +0,0 @@ -grafeas.v1.Artifact - */ -class Artifact extends \Google\Protobuf\Internal\Message -{ - /** - * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a - * container. - * - * Generated from protobuf field string checksum = 1; - */ - protected $checksum = ''; - /** - * Artifact ID, if any; for container images, this will be a URL by digest - * like `gcr.io/projectID/imagename@sha256:123456`. - * - * Generated from protobuf field string id = 2; - */ - protected $id = ''; - /** - * Related artifact names. This may be the path to a binary or jar file, or in - * the case of a container build, the name used to push the container image to - * Google Container Registry, as presented to `docker push`. Note that a - * single Artifact ID can have multiple names, for example if two tags are - * applied to one image. - * - * Generated from protobuf field repeated string names = 3; - */ - private $names; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $checksum - * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a - * container. - * @type string $id - * Artifact ID, if any; for container images, this will be a URL by digest - * like `gcr.io/projectID/imagename@sha256:123456`. - * @type array|\Google\Protobuf\Internal\RepeatedField $names - * Related artifact names. This may be the path to a binary or jar file, or in - * the case of a container build, the name used to push the container image to - * Google Container Registry, as presented to `docker push`. Note that a - * single Artifact ID can have multiple names, for example if two tags are - * applied to one image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a - * container. - * - * Generated from protobuf field string checksum = 1; - * @return string - */ - public function getChecksum() - { - return $this->checksum; - } - - /** - * Hash or checksum value of a binary, or Docker Registry 2.0 digest of a - * container. - * - * Generated from protobuf field string checksum = 1; - * @param string $var - * @return $this - */ - public function setChecksum($var) - { - GPBUtil::checkString($var, True); - $this->checksum = $var; - - return $this; - } - - /** - * Artifact ID, if any; for container images, this will be a URL by digest - * like `gcr.io/projectID/imagename@sha256:123456`. - * - * Generated from protobuf field string id = 2; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Artifact ID, if any; for container images, this will be a URL by digest - * like `gcr.io/projectID/imagename@sha256:123456`. - * - * 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; - } - - /** - * Related artifact names. This may be the path to a binary or jar file, or in - * the case of a container build, the name used to push the container image to - * Google Container Registry, as presented to `docker push`. Note that a - * single Artifact ID can have multiple names, for example if two tags are - * applied to one image. - * - * Generated from protobuf field repeated string names = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNames() - { - return $this->names; - } - - /** - * Related artifact names. This may be the path to a binary or jar file, or in - * the case of a container build, the name used to push the container image to - * Google Container Registry, as presented to `docker push`. Note that a - * single Artifact ID can have multiple names, for example if two tags are - * applied to one image. - * - * Generated from protobuf field repeated string names = 3; - * @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; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote.php deleted file mode 100644 index f6c61a7ac8f0..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote.php +++ /dev/null @@ -1,84 +0,0 @@ -grafeas.v1.AttestationNote - */ -class AttestationNote extends \Google\Protobuf\Internal\Message -{ - /** - * Hint hints at the purpose of the attestation authority. - * - * Generated from protobuf field .grafeas.v1.AttestationNote.Hint hint = 1; - */ - protected $hint = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\AttestationNote\Hint $hint - * Hint hints at the purpose of the attestation authority. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Attestation::initOnce(); - parent::__construct($data); - } - - /** - * Hint hints at the purpose of the attestation authority. - * - * Generated from protobuf field .grafeas.v1.AttestationNote.Hint hint = 1; - * @return \Grafeas\V1\AttestationNote\Hint|null - */ - public function getHint() - { - return $this->hint; - } - - public function hasHint() - { - return isset($this->hint); - } - - public function clearHint() - { - unset($this->hint); - } - - /** - * Hint hints at the purpose of the attestation authority. - * - * Generated from protobuf field .grafeas.v1.AttestationNote.Hint hint = 1; - * @param \Grafeas\V1\AttestationNote\Hint $var - * @return $this - */ - public function setHint($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\AttestationNote\Hint::class); - $this->hint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote/Hint.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote/Hint.php deleted file mode 100644 index a9646f504708..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote/Hint.php +++ /dev/null @@ -1,80 +0,0 @@ -grafeas.v1.AttestationNote.Hint - */ -class Hint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The human readable name of this attestation authority, for - * example "qa". - * - * Generated from protobuf field string human_readable_name = 1; - */ - protected $human_readable_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $human_readable_name - * Required. The human readable name of this attestation authority, for - * example "qa". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Attestation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The human readable name of this attestation authority, for - * example "qa". - * - * Generated from protobuf field string human_readable_name = 1; - * @return string - */ - public function getHumanReadableName() - { - return $this->human_readable_name; - } - - /** - * Required. The human readable name of this attestation authority, for - * example "qa". - * - * Generated from protobuf field string human_readable_name = 1; - * @param string $var - * @return $this - */ - public function setHumanReadableName($var) - { - GPBUtil::checkString($var, True); - $this->human_readable_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Hint::class, \Grafeas\V1\AttestationNote_Hint::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote_Hint.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote_Hint.php deleted file mode 100644 index ce2b4bc895f5..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/AttestationNote_Hint.php +++ /dev/null @@ -1,16 +0,0 @@ -grafeas.v1.AttestationOccurrence - */ -class AttestationOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The serialized payload that is verified by one or more - * `signatures`. - * - * Generated from protobuf field bytes serialized_payload = 1; - */ - protected $serialized_payload = ''; - /** - * One or more signatures over `serialized_payload`. Verifier implementations - * should consider this attestation message verified if at least one - * `signature` verifies `serialized_payload`. See `Signature` in common.proto - * for more details on signature structure and verification. - * - * Generated from protobuf field repeated .grafeas.v1.Signature signatures = 2; - */ - private $signatures; - /** - * One or more JWTs encoding a self-contained attestation. - * Each JWT encodes the payload that it verifies within the JWT itself. - * Verifier implementation SHOULD ignore the `serialized_payload` field - * when verifying these JWTs. - * If only JWTs are present on this AttestationOccurrence, then the - * `serialized_payload` SHOULD be left empty. - * Each JWT SHOULD encode a claim specific to the `resource_uri` of this - * Occurrence, but this is not validated by Grafeas metadata API - * implementations. The JWT itself is opaque to Grafeas. - * - * Generated from protobuf field repeated .grafeas.v1.Jwt jwts = 3; - */ - private $jwts; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $serialized_payload - * Required. The serialized payload that is verified by one or more - * `signatures`. - * @type array<\Grafeas\V1\Signature>|\Google\Protobuf\Internal\RepeatedField $signatures - * One or more signatures over `serialized_payload`. Verifier implementations - * should consider this attestation message verified if at least one - * `signature` verifies `serialized_payload`. See `Signature` in common.proto - * for more details on signature structure and verification. - * @type array<\Grafeas\V1\Jwt>|\Google\Protobuf\Internal\RepeatedField $jwts - * One or more JWTs encoding a self-contained attestation. - * Each JWT encodes the payload that it verifies within the JWT itself. - * Verifier implementation SHOULD ignore the `serialized_payload` field - * when verifying these JWTs. - * If only JWTs are present on this AttestationOccurrence, then the - * `serialized_payload` SHOULD be left empty. - * Each JWT SHOULD encode a claim specific to the `resource_uri` of this - * Occurrence, but this is not validated by Grafeas metadata API - * implementations. The JWT itself is opaque to Grafeas. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Attestation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The serialized payload that is verified by one or more - * `signatures`. - * - * Generated from protobuf field bytes serialized_payload = 1; - * @return string - */ - public function getSerializedPayload() - { - return $this->serialized_payload; - } - - /** - * Required. The serialized payload that is verified by one or more - * `signatures`. - * - * Generated from protobuf field bytes serialized_payload = 1; - * @param string $var - * @return $this - */ - public function setSerializedPayload($var) - { - GPBUtil::checkString($var, False); - $this->serialized_payload = $var; - - return $this; - } - - /** - * One or more signatures over `serialized_payload`. Verifier implementations - * should consider this attestation message verified if at least one - * `signature` verifies `serialized_payload`. See `Signature` in common.proto - * for more details on signature structure and verification. - * - * Generated from protobuf field repeated .grafeas.v1.Signature signatures = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSignatures() - { - return $this->signatures; - } - - /** - * One or more signatures over `serialized_payload`. Verifier implementations - * should consider this attestation message verified if at least one - * `signature` verifies `serialized_payload`. See `Signature` in common.proto - * for more details on signature structure and verification. - * - * Generated from protobuf field repeated .grafeas.v1.Signature signatures = 2; - * @param array<\Grafeas\V1\Signature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSignatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Signature::class); - $this->signatures = $arr; - - return $this; - } - - /** - * One or more JWTs encoding a self-contained attestation. - * Each JWT encodes the payload that it verifies within the JWT itself. - * Verifier implementation SHOULD ignore the `serialized_payload` field - * when verifying these JWTs. - * If only JWTs are present on this AttestationOccurrence, then the - * `serialized_payload` SHOULD be left empty. - * Each JWT SHOULD encode a claim specific to the `resource_uri` of this - * Occurrence, but this is not validated by Grafeas metadata API - * implementations. The JWT itself is opaque to Grafeas. - * - * Generated from protobuf field repeated .grafeas.v1.Jwt jwts = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJwts() - { - return $this->jwts; - } - - /** - * One or more JWTs encoding a self-contained attestation. - * Each JWT encodes the payload that it verifies within the JWT itself. - * Verifier implementation SHOULD ignore the `serialized_payload` field - * when verifying these JWTs. - * If only JWTs are present on this AttestationOccurrence, then the - * `serialized_payload` SHOULD be left empty. - * Each JWT SHOULD encode a claim specific to the `resource_uri` of this - * Occurrence, but this is not validated by Grafeas metadata API - * implementations. The JWT itself is opaque to Grafeas. - * - * Generated from protobuf field repeated .grafeas.v1.Jwt jwts = 3; - * @param array<\Grafeas\V1\Jwt>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJwts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Jwt::class); - $this->jwts = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesRequest.php deleted file mode 100644 index 8a0a831cf9d2..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesRequest.php +++ /dev/null @@ -1,105 +0,0 @@ -grafeas.v1.BatchCreateNotesRequest - */ -class BatchCreateNotesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the notes are to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The notes to create. Max allowed length is 1000. - * - * Generated from protobuf field map notes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $notes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the notes are to be created. - * @type array|\Google\Protobuf\Internal\MapField $notes - * The notes to create. Max allowed length is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the notes are to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the notes are to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 notes to create. Max allowed length is 1000. - * - * Generated from protobuf field map notes = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getNotes() - { - return $this->notes; - } - - /** - * The notes to create. Max allowed length is 1000. - * - * Generated from protobuf field map notes = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setNotes($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Note::class); - $this->notes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesResponse.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesResponse.php deleted file mode 100644 index da4f910330f7..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateNotesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -grafeas.v1.BatchCreateNotesResponse - */ -class BatchCreateNotesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The notes that were created. - * - * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; - */ - private $notes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Grafeas\V1\Note>|\Google\Protobuf\Internal\RepeatedField $notes - * The notes that were created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The notes that were created. - * - * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNotes() - { - return $this->notes; - } - - /** - * The notes that were created. - * - * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; - * @param array<\Grafeas\V1\Note>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNotes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Note::class); - $this->notes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesRequest.php deleted file mode 100644 index 4497973ea4c9..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesRequest.php +++ /dev/null @@ -1,105 +0,0 @@ -grafeas.v1.BatchCreateOccurrencesRequest - */ -class BatchCreateOccurrencesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrences are to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The occurrences to create. Max allowed length is 1000. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $occurrences; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrences are to be created. - * @type array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $occurrences - * The occurrences to create. Max allowed length is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrences are to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrences are to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 occurrences to create. Max allowed length is 1000. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOccurrences() - { - return $this->occurrences; - } - - /** - * The occurrences to create. Max allowed length is 1000. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOccurrences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Occurrence::class); - $this->occurrences = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesResponse.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesResponse.php deleted file mode 100644 index ff03d5abda45..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BatchCreateOccurrencesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -grafeas.v1.BatchCreateOccurrencesResponse - */ -class BatchCreateOccurrencesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The occurrences that were created. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - */ - private $occurrences; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $occurrences - * The occurrences that were created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The occurrences that were created. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOccurrences() - { - return $this->occurrences; - } - - /** - * The occurrences that were created. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - * @param array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOccurrences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Occurrence::class); - $this->occurrences = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildNote.php deleted file mode 100644 index 033b8e22bb8c..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildNote.php +++ /dev/null @@ -1,68 +0,0 @@ -grafeas.v1.BuildNote - */ -class BuildNote extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Immutable. Version of the builder which produced this build. - * - * Generated from protobuf field string builder_version = 1; - */ - protected $builder_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $builder_version - * Required. Immutable. Version of the builder which produced this build. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Build::initOnce(); - parent::__construct($data); - } - - /** - * Required. Immutable. Version of the builder which produced this build. - * - * Generated from protobuf field string builder_version = 1; - * @return string - */ - public function getBuilderVersion() - { - return $this->builder_version; - } - - /** - * Required. Immutable. Version of the builder which produced this build. - * - * Generated from protobuf field string builder_version = 1; - * @param string $var - * @return $this - */ - public function setBuilderVersion($var) - { - GPBUtil::checkString($var, True); - $this->builder_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildOccurrence.php deleted file mode 100644 index 150d9122a82d..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildOccurrence.php +++ /dev/null @@ -1,251 +0,0 @@ -grafeas.v1.BuildOccurrence - */ -class BuildOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * The actual provenance for the build. - * - * Generated from protobuf field .grafeas.v1.BuildProvenance provenance = 1; - */ - protected $provenance = null; - /** - * Serialized JSON representation of the provenance, used in generating the - * build signature in the corresponding build note. After verifying the - * signature, `provenance_bytes` can be unmarshalled and compared to the - * provenance to confirm that it is unchanged. A base64-encoded string - * representation of the provenance bytes is used for the signature in order - * to interoperate with openssl which expects this format for signature - * verification. - * The serialized form is captured both to avoid ambiguity in how the - * provenance is marshalled to json as well to prevent incompatibilities with - * future changes. - * - * Generated from protobuf field string provenance_bytes = 2; - */ - protected $provenance_bytes = ''; - /** - * Deprecated. See InTotoStatement for the replacement. - * In-toto Provenance representation as defined in spec. - * - * Generated from protobuf field .grafeas.v1.InTotoProvenance intoto_provenance = 3; - */ - protected $intoto_provenance = null; - /** - * In-toto Statement representation as defined in spec. - * The intoto_statement can contain any type of provenance. The serialized - * payload of the statement can be stored and signed in the Occurrence's - * envelope. - * - * Generated from protobuf field .grafeas.v1.InTotoStatement intoto_statement = 4; - */ - protected $intoto_statement = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\BuildProvenance $provenance - * The actual provenance for the build. - * @type string $provenance_bytes - * Serialized JSON representation of the provenance, used in generating the - * build signature in the corresponding build note. After verifying the - * signature, `provenance_bytes` can be unmarshalled and compared to the - * provenance to confirm that it is unchanged. A base64-encoded string - * representation of the provenance bytes is used for the signature in order - * to interoperate with openssl which expects this format for signature - * verification. - * The serialized form is captured both to avoid ambiguity in how the - * provenance is marshalled to json as well to prevent incompatibilities with - * future changes. - * @type \Grafeas\V1\InTotoProvenance $intoto_provenance - * Deprecated. See InTotoStatement for the replacement. - * In-toto Provenance representation as defined in spec. - * @type \Grafeas\V1\InTotoStatement $intoto_statement - * In-toto Statement representation as defined in spec. - * The intoto_statement can contain any type of provenance. The serialized - * payload of the statement can be stored and signed in the Occurrence's - * envelope. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Build::initOnce(); - parent::__construct($data); - } - - /** - * The actual provenance for the build. - * - * Generated from protobuf field .grafeas.v1.BuildProvenance provenance = 1; - * @return \Grafeas\V1\BuildProvenance|null - */ - public function getProvenance() - { - return $this->provenance; - } - - public function hasProvenance() - { - return isset($this->provenance); - } - - public function clearProvenance() - { - unset($this->provenance); - } - - /** - * The actual provenance for the build. - * - * Generated from protobuf field .grafeas.v1.BuildProvenance provenance = 1; - * @param \Grafeas\V1\BuildProvenance $var - * @return $this - */ - public function setProvenance($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\BuildProvenance::class); - $this->provenance = $var; - - return $this; - } - - /** - * Serialized JSON representation of the provenance, used in generating the - * build signature in the corresponding build note. After verifying the - * signature, `provenance_bytes` can be unmarshalled and compared to the - * provenance to confirm that it is unchanged. A base64-encoded string - * representation of the provenance bytes is used for the signature in order - * to interoperate with openssl which expects this format for signature - * verification. - * The serialized form is captured both to avoid ambiguity in how the - * provenance is marshalled to json as well to prevent incompatibilities with - * future changes. - * - * Generated from protobuf field string provenance_bytes = 2; - * @return string - */ - public function getProvenanceBytes() - { - return $this->provenance_bytes; - } - - /** - * Serialized JSON representation of the provenance, used in generating the - * build signature in the corresponding build note. After verifying the - * signature, `provenance_bytes` can be unmarshalled and compared to the - * provenance to confirm that it is unchanged. A base64-encoded string - * representation of the provenance bytes is used for the signature in order - * to interoperate with openssl which expects this format for signature - * verification. - * The serialized form is captured both to avoid ambiguity in how the - * provenance is marshalled to json as well to prevent incompatibilities with - * future changes. - * - * Generated from protobuf field string provenance_bytes = 2; - * @param string $var - * @return $this - */ - public function setProvenanceBytes($var) - { - GPBUtil::checkString($var, True); - $this->provenance_bytes = $var; - - return $this; - } - - /** - * Deprecated. See InTotoStatement for the replacement. - * In-toto Provenance representation as defined in spec. - * - * Generated from protobuf field .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @return \Grafeas\V1\InTotoProvenance|null - */ - public function getIntotoProvenance() - { - return $this->intoto_provenance; - } - - public function hasIntotoProvenance() - { - return isset($this->intoto_provenance); - } - - public function clearIntotoProvenance() - { - unset($this->intoto_provenance); - } - - /** - * Deprecated. See InTotoStatement for the replacement. - * In-toto Provenance representation as defined in spec. - * - * Generated from protobuf field .grafeas.v1.InTotoProvenance intoto_provenance = 3; - * @param \Grafeas\V1\InTotoProvenance $var - * @return $this - */ - public function setIntotoProvenance($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\InTotoProvenance::class); - $this->intoto_provenance = $var; - - return $this; - } - - /** - * In-toto Statement representation as defined in spec. - * The intoto_statement can contain any type of provenance. The serialized - * payload of the statement can be stored and signed in the Occurrence's - * envelope. - * - * Generated from protobuf field .grafeas.v1.InTotoStatement intoto_statement = 4; - * @return \Grafeas\V1\InTotoStatement|null - */ - public function getIntotoStatement() - { - return $this->intoto_statement; - } - - public function hasIntotoStatement() - { - return isset($this->intoto_statement); - } - - public function clearIntotoStatement() - { - unset($this->intoto_statement); - } - - /** - * In-toto Statement representation as defined in spec. - * The intoto_statement can contain any type of provenance. The serialized - * payload of the statement can be stored and signed in the Occurrence's - * envelope. - * - * Generated from protobuf field .grafeas.v1.InTotoStatement intoto_statement = 4; - * @param \Grafeas\V1\InTotoStatement $var - * @return $this - */ - public function setIntotoStatement($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\InTotoStatement::class); - $this->intoto_statement = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildProvenance.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildProvenance.php deleted file mode 100644 index 8e8c3289d1ee..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuildProvenance.php +++ /dev/null @@ -1,528 +0,0 @@ -grafeas.v1.BuildProvenance - */ -class BuildProvenance extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Unique identifier of the build. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * ID of the project. - * - * Generated from protobuf field string project_id = 2; - */ - protected $project_id = ''; - /** - * Commands requested by the build. - * - * Generated from protobuf field repeated .grafeas.v1.Command commands = 3; - */ - private $commands; - /** - * Output of the build. - * - * Generated from protobuf field repeated .grafeas.v1.Artifact built_artifacts = 4; - */ - private $built_artifacts; - /** - * Time at which the build was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - */ - protected $create_time = null; - /** - * Time at which execution of the build was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; - */ - protected $start_time = null; - /** - * Time at which execution of the build was finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; - */ - protected $end_time = null; - /** - * E-mail address of the user who initiated this build. Note that this was the - * user's e-mail address at the time the build was initiated; this address may - * not represent the same end-user for all time. - * - * Generated from protobuf field string creator = 8; - */ - protected $creator = ''; - /** - * URI where any logs for this provenance were written. - * - * Generated from protobuf field string logs_uri = 9; - */ - protected $logs_uri = ''; - /** - * Details of the Source input to the build. - * - * Generated from protobuf field .grafeas.v1.Source source_provenance = 10; - */ - protected $source_provenance = null; - /** - * Trigger identifier if the build was triggered automatically; empty if not. - * - * Generated from protobuf field string trigger_id = 11; - */ - protected $trigger_id = ''; - /** - * Special options applied to this build. This is a catch-all field where - * build providers can enter any desired additional details. - * - * Generated from protobuf field map build_options = 12; - */ - private $build_options; - /** - * Version string of the builder at the time this build was executed. - * - * Generated from protobuf field string builder_version = 13; - */ - protected $builder_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Required. Unique identifier of the build. - * @type string $project_id - * ID of the project. - * @type array<\Grafeas\V1\Command>|\Google\Protobuf\Internal\RepeatedField $commands - * Commands requested by the build. - * @type array<\Grafeas\V1\Artifact>|\Google\Protobuf\Internal\RepeatedField $built_artifacts - * Output of the build. - * @type \Google\Protobuf\Timestamp $create_time - * Time at which the build was created. - * @type \Google\Protobuf\Timestamp $start_time - * Time at which execution of the build was started. - * @type \Google\Protobuf\Timestamp $end_time - * Time at which execution of the build was finished. - * @type string $creator - * E-mail address of the user who initiated this build. Note that this was the - * user's e-mail address at the time the build was initiated; this address may - * not represent the same end-user for all time. - * @type string $logs_uri - * URI where any logs for this provenance were written. - * @type \Grafeas\V1\Source $source_provenance - * Details of the Source input to the build. - * @type string $trigger_id - * Trigger identifier if the build was triggered automatically; empty if not. - * @type array|\Google\Protobuf\Internal\MapField $build_options - * Special options applied to this build. This is a catch-all field where - * build providers can enter any desired additional details. - * @type string $builder_version - * Version string of the builder at the time this build was executed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Unique identifier of the build. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Required. Unique identifier of the build. - * - * 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; - } - - /** - * ID of the project. - * - * Generated from protobuf field string project_id = 2; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * ID of the 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; - } - - /** - * Commands requested by the build. - * - * Generated from protobuf field repeated .grafeas.v1.Command commands = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCommands() - { - return $this->commands; - } - - /** - * Commands requested by the build. - * - * Generated from protobuf field repeated .grafeas.v1.Command commands = 3; - * @param array<\Grafeas\V1\Command>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCommands($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Command::class); - $this->commands = $arr; - - return $this; - } - - /** - * Output of the build. - * - * Generated from protobuf field repeated .grafeas.v1.Artifact built_artifacts = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBuiltArtifacts() - { - return $this->built_artifacts; - } - - /** - * Output of the build. - * - * Generated from protobuf field repeated .grafeas.v1.Artifact built_artifacts = 4; - * @param array<\Grafeas\V1\Artifact>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBuiltArtifacts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Artifact::class); - $this->built_artifacts = $arr; - - return $this; - } - - /** - * Time at which the build 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); - } - - /** - * Time at which the build 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; - } - - /** - * Time at which execution of the build was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; - * @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 execution of the build was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Time at which execution of the build was finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; - * @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); - } - - /** - * Time at which execution of the build was finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * E-mail address of the user who initiated this build. Note that this was the - * user's e-mail address at the time the build was initiated; this address may - * not represent the same end-user for all time. - * - * Generated from protobuf field string creator = 8; - * @return string - */ - public function getCreator() - { - return $this->creator; - } - - /** - * E-mail address of the user who initiated this build. Note that this was the - * user's e-mail address at the time the build was initiated; this address may - * not represent the same end-user for all time. - * - * Generated from protobuf field string creator = 8; - * @param string $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkString($var, True); - $this->creator = $var; - - return $this; - } - - /** - * URI where any logs for this provenance were written. - * - * Generated from protobuf field string logs_uri = 9; - * @return string - */ - public function getLogsUri() - { - return $this->logs_uri; - } - - /** - * URI where any logs for this provenance were written. - * - * Generated from protobuf field string logs_uri = 9; - * @param string $var - * @return $this - */ - public function setLogsUri($var) - { - GPBUtil::checkString($var, True); - $this->logs_uri = $var; - - return $this; - } - - /** - * Details of the Source input to the build. - * - * Generated from protobuf field .grafeas.v1.Source source_provenance = 10; - * @return \Grafeas\V1\Source|null - */ - public function getSourceProvenance() - { - return $this->source_provenance; - } - - public function hasSourceProvenance() - { - return isset($this->source_provenance); - } - - public function clearSourceProvenance() - { - unset($this->source_provenance); - } - - /** - * Details of the Source input to the build. - * - * Generated from protobuf field .grafeas.v1.Source source_provenance = 10; - * @param \Grafeas\V1\Source $var - * @return $this - */ - public function setSourceProvenance($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Source::class); - $this->source_provenance = $var; - - return $this; - } - - /** - * Trigger identifier if the build was triggered automatically; empty if not. - * - * Generated from protobuf field string trigger_id = 11; - * @return string - */ - public function getTriggerId() - { - return $this->trigger_id; - } - - /** - * Trigger identifier if the build was triggered automatically; empty if not. - * - * Generated from protobuf field string trigger_id = 11; - * @param string $var - * @return $this - */ - public function setTriggerId($var) - { - GPBUtil::checkString($var, True); - $this->trigger_id = $var; - - return $this; - } - - /** - * Special options applied to this build. This is a catch-all field where - * build providers can enter any desired additional details. - * - * Generated from protobuf field map build_options = 12; - * @return \Google\Protobuf\Internal\MapField - */ - public function getBuildOptions() - { - return $this->build_options; - } - - /** - * Special options applied to this build. This is a catch-all field where - * build providers can enter any desired additional details. - * - * Generated from protobuf field map build_options = 12; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setBuildOptions($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->build_options = $arr; - - return $this; - } - - /** - * Version string of the builder at the time this build was executed. - * - * Generated from protobuf field string builder_version = 13; - * @return string - */ - public function getBuilderVersion() - { - return $this->builder_version; - } - - /** - * Version string of the builder at the time this build was executed. - * - * Generated from protobuf field string builder_version = 13; - * @param string $var - * @return $this - */ - public function setBuilderVersion($var) - { - GPBUtil::checkString($var, True); - $this->builder_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuilderConfig.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuilderConfig.php deleted file mode 100644 index 97732fb870dd..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/BuilderConfig.php +++ /dev/null @@ -1,58 +0,0 @@ -grafeas.v1.BuilderConfig - */ -class BuilderConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoProvenance::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * 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; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS.php deleted file mode 100644 index eed433379f38..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS.php +++ /dev/null @@ -1,382 +0,0 @@ -grafeas.v1.CVSS - */ -class CVSS extends \Google\Protobuf\Internal\Message -{ - /** - * The base score is a function of the base metric scores. - * - * Generated from protobuf field float base_score = 1; - */ - protected $base_score = 0.0; - /** - * Generated from protobuf field float exploitability_score = 2; - */ - protected $exploitability_score = 0.0; - /** - * Generated from protobuf field float impact_score = 3; - */ - protected $impact_score = 0.0; - /** - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * - * Generated from protobuf field .grafeas.v1.CVSS.AttackVector attack_vector = 4; - */ - protected $attack_vector = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - */ - protected $attack_complexity = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.Authentication authentication = 6; - */ - protected $authentication = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - */ - protected $privileges_required = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - */ - protected $user_interaction = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.Scope scope = 9; - */ - protected $scope = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - */ - protected $confidentiality_impact = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact integrity_impact = 11; - */ - protected $integrity_impact = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSS.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. - * @type float $exploitability_score - * @type float $impact_score - * @type int $attack_vector - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * @type int $attack_complexity - * @type int $authentication - * @type int $privileges_required - * @type int $user_interaction - * @type int $scope - * @type int $confidentiality_impact - * @type int $integrity_impact - * @type int $availability_impact - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Cvss::initOnce(); - parent::__construct($data); - } - - /** - * The base score is a function of the base metric scores. - * - * 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. - * - * 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; - } - - /** - * Generated from protobuf field float exploitability_score = 2; - * @return float - */ - public function getExploitabilityScore() - { - return $this->exploitability_score; - } - - /** - * 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; - } - - /** - * Generated from protobuf field float impact_score = 3; - * @return float - */ - public function getImpactScore() - { - return $this->impact_score; - } - - /** - * 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; - } - - /** - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * - * Generated from protobuf field .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @return int - */ - public function getAttackVector() - { - return $this->attack_vector; - } - - /** - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * - * Generated from protobuf field .grafeas.v1.CVSS.AttackVector attack_vector = 4; - * @param int $var - * @return $this - */ - public function setAttackVector($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\AttackVector::class); - $this->attack_vector = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @return int - */ - public function getAttackComplexity() - { - return $this->attack_complexity; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5; - * @param int $var - * @return $this - */ - public function setAttackComplexity($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\AttackComplexity::class); - $this->attack_complexity = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Authentication authentication = 6; - * @return int - */ - public function getAuthentication() - { - return $this->authentication; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Authentication authentication = 6; - * @param int $var - * @return $this - */ - public function setAuthentication($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\Authentication::class); - $this->authentication = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @return int - */ - public function getPrivilegesRequired() - { - return $this->privileges_required; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7; - * @param int $var - * @return $this - */ - public function setPrivilegesRequired($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\PrivilegesRequired::class); - $this->privileges_required = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @return int - */ - public function getUserInteraction() - { - return $this->user_interaction; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.UserInteraction user_interaction = 8; - * @param int $var - * @return $this - */ - public function setUserInteraction($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\UserInteraction::class); - $this->user_interaction = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Scope scope = 9; - * @return int - */ - public function getScope() - { - return $this->scope; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Scope scope = 9; - * @param int $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\Scope::class); - $this->scope = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @return int - */ - public function getConfidentialityImpact() - { - return $this->confidentiality_impact; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact confidentiality_impact = 10; - * @param int $var - * @return $this - */ - public function setConfidentialityImpact($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\Impact::class); - $this->confidentiality_impact = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @return int - */ - public function getIntegrityImpact() - { - return $this->integrity_impact; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact integrity_impact = 11; - * @param int $var - * @return $this - */ - public function setIntegrityImpact($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\Impact::class); - $this->integrity_impact = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact availability_impact = 12; - * @return int - */ - public function getAvailabilityImpact() - { - return $this->availability_impact; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSS.Impact availability_impact = 12; - * @param int $var - * @return $this - */ - public function setAvailabilityImpact($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSS\Impact::class); - $this->availability_impact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackComplexity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackComplexity.php deleted file mode 100644 index 5921b034341d..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackComplexity.php +++ /dev/null @@ -1,56 +0,0 @@ -grafeas.v1.CVSS.AttackComplexity - */ -class AttackComplexity -{ - /** - * Generated from protobuf enum ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - const ATTACK_COMPLEXITY_UNSPECIFIED = 0; - /** - * Generated from protobuf enum ATTACK_COMPLEXITY_LOW = 1; - */ - const ATTACK_COMPLEXITY_LOW = 1; - /** - * 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, \Grafeas\V1\CVSS_AttackComplexity::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackVector.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackVector.php deleted file mode 100644 index e012b40cdfd8..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/AttackVector.php +++ /dev/null @@ -1,66 +0,0 @@ -grafeas.v1.CVSS.AttackVector - */ -class AttackVector -{ - /** - * Generated from protobuf enum ATTACK_VECTOR_UNSPECIFIED = 0; - */ - const ATTACK_VECTOR_UNSPECIFIED = 0; - /** - * Generated from protobuf enum ATTACK_VECTOR_NETWORK = 1; - */ - const ATTACK_VECTOR_NETWORK = 1; - /** - * Generated from protobuf enum ATTACK_VECTOR_ADJACENT = 2; - */ - const ATTACK_VECTOR_ADJACENT = 2; - /** - * Generated from protobuf enum ATTACK_VECTOR_LOCAL = 3; - */ - const ATTACK_VECTOR_LOCAL = 3; - /** - * 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, \Grafeas\V1\CVSS_AttackVector::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Authentication.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Authentication.php deleted file mode 100644 index 3e49c8c45e11..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Authentication.php +++ /dev/null @@ -1,61 +0,0 @@ -grafeas.v1.CVSS.Authentication - */ -class Authentication -{ - /** - * Generated from protobuf enum AUTHENTICATION_UNSPECIFIED = 0; - */ - const AUTHENTICATION_UNSPECIFIED = 0; - /** - * Generated from protobuf enum AUTHENTICATION_MULTIPLE = 1; - */ - const AUTHENTICATION_MULTIPLE = 1; - /** - * Generated from protobuf enum AUTHENTICATION_SINGLE = 2; - */ - const AUTHENTICATION_SINGLE = 2; - /** - * Generated from protobuf enum AUTHENTICATION_NONE = 3; - */ - const AUTHENTICATION_NONE = 3; - - private static $valueToName = [ - self::AUTHENTICATION_UNSPECIFIED => 'AUTHENTICATION_UNSPECIFIED', - self::AUTHENTICATION_MULTIPLE => 'AUTHENTICATION_MULTIPLE', - self::AUTHENTICATION_SINGLE => 'AUTHENTICATION_SINGLE', - self::AUTHENTICATION_NONE => 'AUTHENTICATION_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(Authentication::class, \Grafeas\V1\CVSS_Authentication::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Impact.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Impact.php deleted file mode 100644 index ea32fc11f66f..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Impact.php +++ /dev/null @@ -1,61 +0,0 @@ -grafeas.v1.CVSS.Impact - */ -class Impact -{ - /** - * Generated from protobuf enum IMPACT_UNSPECIFIED = 0; - */ - const IMPACT_UNSPECIFIED = 0; - /** - * Generated from protobuf enum IMPACT_HIGH = 1; - */ - const IMPACT_HIGH = 1; - /** - * Generated from protobuf enum IMPACT_LOW = 2; - */ - const IMPACT_LOW = 2; - /** - * 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, \Grafeas\V1\CVSS_Impact::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/PrivilegesRequired.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/PrivilegesRequired.php deleted file mode 100644 index b3f593d06893..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/PrivilegesRequired.php +++ /dev/null @@ -1,61 +0,0 @@ -grafeas.v1.CVSS.PrivilegesRequired - */ -class PrivilegesRequired -{ - /** - * Generated from protobuf enum PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - const PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - /** - * Generated from protobuf enum PRIVILEGES_REQUIRED_NONE = 1; - */ - const PRIVILEGES_REQUIRED_NONE = 1; - /** - * Generated from protobuf enum PRIVILEGES_REQUIRED_LOW = 2; - */ - const PRIVILEGES_REQUIRED_LOW = 2; - /** - * 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, \Grafeas\V1\CVSS_PrivilegesRequired::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Scope.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Scope.php deleted file mode 100644 index 44ac100792e8..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/Scope.php +++ /dev/null @@ -1,56 +0,0 @@ -grafeas.v1.CVSS.Scope - */ -class Scope -{ - /** - * Generated from protobuf enum SCOPE_UNSPECIFIED = 0; - */ - const SCOPE_UNSPECIFIED = 0; - /** - * Generated from protobuf enum SCOPE_UNCHANGED = 1; - */ - const SCOPE_UNCHANGED = 1; - /** - * 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, \Grafeas\V1\CVSS_Scope::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/UserInteraction.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/UserInteraction.php deleted file mode 100644 index 2e0e911d1c88..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS/UserInteraction.php +++ /dev/null @@ -1,56 +0,0 @@ -grafeas.v1.CVSS.UserInteraction - */ -class UserInteraction -{ - /** - * Generated from protobuf enum USER_INTERACTION_UNSPECIFIED = 0; - */ - const USER_INTERACTION_UNSPECIFIED = 0; - /** - * Generated from protobuf enum USER_INTERACTION_NONE = 1; - */ - const USER_INTERACTION_NONE = 1; - /** - * 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, \Grafeas\V1\CVSS_UserInteraction::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSVersion.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSVersion.php deleted file mode 100644 index 8c25036f4fff..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSVersion.php +++ /dev/null @@ -1,55 +0,0 @@ -grafeas.v1.CVSSVersion - */ -class CVSSVersion -{ - /** - * Generated from protobuf enum CVSS_VERSION_UNSPECIFIED = 0; - */ - const CVSS_VERSION_UNSPECIFIED = 0; - /** - * Generated from protobuf enum CVSS_VERSION_2 = 1; - */ - const CVSS_VERSION_2 = 1; - /** - * Generated from protobuf enum CVSS_VERSION_3 = 2; - */ - const CVSS_VERSION_3 = 2; - - private static $valueToName = [ - self::CVSS_VERSION_UNSPECIFIED => 'CVSS_VERSION_UNSPECIFIED', - self::CVSS_VERSION_2 => 'CVSS_VERSION_2', - self::CVSS_VERSION_3 => 'CVSS_VERSION_3', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Grafeas/v1/proto/src/Grafeas/V1/CVSS_AttackComplexity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_AttackComplexity.php deleted file mode 100644 index f53fa0e2874d..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSS_AttackComplexity.php +++ /dev/null @@ -1,16 +0,0 @@ -grafeas.v1.CVSSv3 - */ -class CVSSv3 extends \Google\Protobuf\Internal\Message -{ - /** - * The base score is a function of the base metric scores. - * - * Generated from protobuf field float base_score = 1; - */ - protected $base_score = 0.0; - /** - * Generated from protobuf field float exploitability_score = 2; - */ - protected $exploitability_score = 0.0; - /** - * Generated from protobuf field float impact_score = 3; - */ - protected $impact_score = 0.0; - /** - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * - * Generated from protobuf field .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - */ - protected $attack_vector = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - */ - protected $attack_complexity = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - */ - protected $privileges_required = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - */ - protected $user_interaction = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Scope scope = 9; - */ - protected $scope = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - */ - protected $confidentiality_impact = 0; - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - */ - protected $integrity_impact = 0; - /** - * Generated from protobuf field .grafeas.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. - * @type float $exploitability_score - * @type float $impact_score - * @type int $attack_vector - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * @type int $attack_complexity - * @type int $privileges_required - * @type int $user_interaction - * @type int $scope - * @type int $confidentiality_impact - * @type int $integrity_impact - * @type int $availability_impact - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Cvss::initOnce(); - parent::__construct($data); - } - - /** - * The base score is a function of the base metric scores. - * - * 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. - * - * 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; - } - - /** - * Generated from protobuf field float exploitability_score = 2; - * @return float - */ - public function getExploitabilityScore() - { - return $this->exploitability_score; - } - - /** - * 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; - } - - /** - * Generated from protobuf field float impact_score = 3; - * @return float - */ - public function getImpactScore() - { - return $this->impact_score; - } - - /** - * 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; - } - - /** - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * - * Generated from protobuf field .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @return int - */ - public function getAttackVector() - { - return $this->attack_vector; - } - - /** - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * - * Generated from protobuf field .grafeas.v1.CVSSv3.AttackVector attack_vector = 5; - * @param int $var - * @return $this - */ - public function setAttackVector($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\AttackVector::class); - $this->attack_vector = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return int - */ - public function getAttackComplexity() - { - return $this->attack_complexity; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @param int $var - * @return $this - */ - public function setAttackComplexity($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\AttackComplexity::class); - $this->attack_complexity = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return int - */ - public function getPrivilegesRequired() - { - return $this->privileges_required; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @param int $var - * @return $this - */ - public function setPrivilegesRequired($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\PrivilegesRequired::class); - $this->privileges_required = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return int - */ - public function getUserInteraction() - { - return $this->user_interaction; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.UserInteraction user_interaction = 8; - * @param int $var - * @return $this - */ - public function setUserInteraction($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\UserInteraction::class); - $this->user_interaction = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Scope scope = 9; - * @return int - */ - public function getScope() - { - return $this->scope; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Scope scope = 9; - * @param int $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\Scope::class); - $this->scope = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return int - */ - public function getConfidentialityImpact() - { - return $this->confidentiality_impact; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact confidentiality_impact = 10; - * @param int $var - * @return $this - */ - public function setConfidentialityImpact($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\Impact::class); - $this->confidentiality_impact = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @return int - */ - public function getIntegrityImpact() - { - return $this->integrity_impact; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact integrity_impact = 11; - * @param int $var - * @return $this - */ - public function setIntegrityImpact($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\Impact::class); - $this->integrity_impact = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @return int - */ - public function getAvailabilityImpact() - { - return $this->availability_impact; - } - - /** - * Generated from protobuf field .grafeas.v1.CVSSv3.Impact availability_impact = 12; - * @param int $var - * @return $this - */ - public function setAvailabilityImpact($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSv3\Impact::class); - $this->availability_impact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackComplexity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackComplexity.php deleted file mode 100644 index 6086d84dc982..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackComplexity.php +++ /dev/null @@ -1,56 +0,0 @@ -grafeas.v1.CVSSv3.AttackComplexity - */ -class AttackComplexity -{ - /** - * Generated from protobuf enum ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - const ATTACK_COMPLEXITY_UNSPECIFIED = 0; - /** - * Generated from protobuf enum ATTACK_COMPLEXITY_LOW = 1; - */ - const ATTACK_COMPLEXITY_LOW = 1; - /** - * 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, \Grafeas\V1\CVSSv3_AttackComplexity::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackVector.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackVector.php deleted file mode 100644 index 9f0892749620..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/AttackVector.php +++ /dev/null @@ -1,66 +0,0 @@ -grafeas.v1.CVSSv3.AttackVector - */ -class AttackVector -{ - /** - * Generated from protobuf enum ATTACK_VECTOR_UNSPECIFIED = 0; - */ - const ATTACK_VECTOR_UNSPECIFIED = 0; - /** - * Generated from protobuf enum ATTACK_VECTOR_NETWORK = 1; - */ - const ATTACK_VECTOR_NETWORK = 1; - /** - * Generated from protobuf enum ATTACK_VECTOR_ADJACENT = 2; - */ - const ATTACK_VECTOR_ADJACENT = 2; - /** - * Generated from protobuf enum ATTACK_VECTOR_LOCAL = 3; - */ - const ATTACK_VECTOR_LOCAL = 3; - /** - * 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, \Grafeas\V1\CVSSv3_AttackVector::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Impact.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Impact.php deleted file mode 100644 index d933d36fe7fb..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Impact.php +++ /dev/null @@ -1,61 +0,0 @@ -grafeas.v1.CVSSv3.Impact - */ -class Impact -{ - /** - * Generated from protobuf enum IMPACT_UNSPECIFIED = 0; - */ - const IMPACT_UNSPECIFIED = 0; - /** - * Generated from protobuf enum IMPACT_HIGH = 1; - */ - const IMPACT_HIGH = 1; - /** - * Generated from protobuf enum IMPACT_LOW = 2; - */ - const IMPACT_LOW = 2; - /** - * 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, \Grafeas\V1\CVSSv3_Impact::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/PrivilegesRequired.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/PrivilegesRequired.php deleted file mode 100644 index dff9206db9b8..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/PrivilegesRequired.php +++ /dev/null @@ -1,61 +0,0 @@ -grafeas.v1.CVSSv3.PrivilegesRequired - */ -class PrivilegesRequired -{ - /** - * Generated from protobuf enum PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - const PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - /** - * Generated from protobuf enum PRIVILEGES_REQUIRED_NONE = 1; - */ - const PRIVILEGES_REQUIRED_NONE = 1; - /** - * Generated from protobuf enum PRIVILEGES_REQUIRED_LOW = 2; - */ - const PRIVILEGES_REQUIRED_LOW = 2; - /** - * 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, \Grafeas\V1\CVSSv3_PrivilegesRequired::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Scope.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Scope.php deleted file mode 100644 index fc48b6eed3d7..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/Scope.php +++ /dev/null @@ -1,56 +0,0 @@ -grafeas.v1.CVSSv3.Scope - */ -class Scope -{ - /** - * Generated from protobuf enum SCOPE_UNSPECIFIED = 0; - */ - const SCOPE_UNSPECIFIED = 0; - /** - * Generated from protobuf enum SCOPE_UNCHANGED = 1; - */ - const SCOPE_UNCHANGED = 1; - /** - * 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, \Grafeas\V1\CVSSv3_Scope::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/UserInteraction.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/UserInteraction.php deleted file mode 100644 index 2348d20766da..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3/UserInteraction.php +++ /dev/null @@ -1,56 +0,0 @@ -grafeas.v1.CVSSv3.UserInteraction - */ -class UserInteraction -{ - /** - * Generated from protobuf enum USER_INTERACTION_UNSPECIFIED = 0; - */ - const USER_INTERACTION_UNSPECIFIED = 0; - /** - * Generated from protobuf enum USER_INTERACTION_NONE = 1; - */ - const USER_INTERACTION_NONE = 1; - /** - * 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, \Grafeas\V1\CVSSv3_UserInteraction::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_AttackComplexity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_AttackComplexity.php deleted file mode 100644 index 5194d471da3e..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CVSSv3_AttackComplexity.php +++ /dev/null @@ -1,16 +0,0 @@ -grafeas.v1.CloudRepoSourceContext - */ -class CloudRepoSourceContext extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the repo. - * - * Generated from protobuf field .grafeas.v1.RepoId repo_id = 1; - */ - protected $repo_id = null; - protected $revision; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\RepoId $repo_id - * The ID of the repo. - * @type string $revision_id - * A revision ID. - * @type \Grafeas\V1\AliasContext $alias_context - * An alias, which may be a branch or tag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the repo. - * - * Generated from protobuf field .grafeas.v1.RepoId repo_id = 1; - * @return \Grafeas\V1\RepoId|null - */ - public function getRepoId() - { - return $this->repo_id; - } - - public function hasRepoId() - { - return isset($this->repo_id); - } - - public function clearRepoId() - { - unset($this->repo_id); - } - - /** - * The ID of the repo. - * - * Generated from protobuf field .grafeas.v1.RepoId repo_id = 1; - * @param \Grafeas\V1\RepoId $var - * @return $this - */ - public function setRepoId($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\RepoId::class); - $this->repo_id = $var; - - return $this; - } - - /** - * A revision ID. - * - * Generated from protobuf field string revision_id = 2; - * @return string - */ - public function getRevisionId() - { - return $this->readOneof(2); - } - - public function hasRevisionId() - { - return $this->hasOneof(2); - } - - /** - * A revision ID. - * - * Generated from protobuf field string revision_id = 2; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * An alias, which may be a branch or tag. - * - * Generated from protobuf field .grafeas.v1.AliasContext alias_context = 3; - * @return \Grafeas\V1\AliasContext|null - */ - public function getAliasContext() - { - return $this->readOneof(3); - } - - public function hasAliasContext() - { - return $this->hasOneof(3); - } - - /** - * An alias, which may be a branch or tag. - * - * Generated from protobuf field .grafeas.v1.AliasContext alias_context = 3; - * @param \Grafeas\V1\AliasContext $var - * @return $this - */ - public function setAliasContext($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\AliasContext::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getRevision() - { - return $this->whichOneof("revision"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Command.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Command.php deleted file mode 100644 index 40d507cfd67f..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Command.php +++ /dev/null @@ -1,249 +0,0 @@ -grafeas.v1.Command - */ -class Command extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the command, as presented on the command line, or if the - * command is packaged as a Docker container, as presented to `docker pull`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Environment variables set before running this command. - * - * Generated from protobuf field repeated string env = 2; - */ - private $env; - /** - * Command-line arguments used when executing this command. - * - * Generated from protobuf field repeated string args = 3; - */ - private $args; - /** - * Working directory (relative to project source root) used when running this - * command. - * - * Generated from protobuf field string dir = 4; - */ - protected $dir = ''; - /** - * Optional unique identifier for this command, used in wait_for to reference - * this command as a dependency. - * - * Generated from protobuf field string id = 5; - */ - protected $id = ''; - /** - * The ID(s) of the command(s) that this command depends on. - * - * Generated from protobuf field repeated string wait_for = 6; - */ - private $wait_for; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the command, as presented on the command line, or if the - * command is packaged as a Docker container, as presented to `docker pull`. - * @type array|\Google\Protobuf\Internal\RepeatedField $env - * Environment variables set before running this command. - * @type array|\Google\Protobuf\Internal\RepeatedField $args - * Command-line arguments used when executing this command. - * @type string $dir - * Working directory (relative to project source root) used when running this - * command. - * @type string $id - * Optional unique identifier for this command, used in wait_for to reference - * this command as a dependency. - * @type array|\Google\Protobuf\Internal\RepeatedField $wait_for - * The ID(s) of the command(s) that this command depends on. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the command, as presented on the command line, or if the - * command is packaged as a Docker container, as presented to `docker pull`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the command, as presented on the command line, or if the - * command is packaged as a Docker container, as presented to `docker pull`. - * - * 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; - } - - /** - * Environment variables set before running this command. - * - * Generated from protobuf field repeated string env = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnv() - { - return $this->env; - } - - /** - * Environment variables set before running this command. - * - * Generated from protobuf field repeated string env = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnv($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->env = $arr; - - return $this; - } - - /** - * Command-line arguments used when executing this command. - * - * Generated from protobuf field repeated string args = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Command-line arguments used when executing this command. - * - * 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; - } - - /** - * Working directory (relative to project source root) used when running this - * command. - * - * Generated from protobuf field string dir = 4; - * @return string - */ - public function getDir() - { - return $this->dir; - } - - /** - * Working directory (relative to project source root) used when running this - * command. - * - * Generated from protobuf field string dir = 4; - * @param string $var - * @return $this - */ - public function setDir($var) - { - GPBUtil::checkString($var, True); - $this->dir = $var; - - return $this; - } - - /** - * Optional unique identifier for this command, used in wait_for to reference - * this command as a dependency. - * - * Generated from protobuf field string id = 5; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Optional unique identifier for this command, used in wait_for to reference - * this command as a dependency. - * - * Generated from protobuf field string id = 5; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The ID(s) of the command(s) that this command depends on. - * - * Generated from protobuf field repeated string wait_for = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWaitFor() - { - return $this->wait_for; - } - - /** - * The ID(s) of the command(s) that this command depends on. - * - * Generated from protobuf field repeated string wait_for = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWaitFor($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->wait_for = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Completeness.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Completeness.php deleted file mode 100644 index d5cd151e9b5d..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Completeness.php +++ /dev/null @@ -1,148 +0,0 @@ -grafeas.v1.Completeness - */ -class Completeness extends \Google\Protobuf\Internal\Message -{ - /** - * If true, the builder claims that recipe.arguments is complete, meaning that - * all external inputs are properly captured in the recipe. - * - * Generated from protobuf field bool arguments = 1; - */ - protected $arguments = false; - /** - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * - * Generated from protobuf field bool environment = 2; - */ - protected $environment = false; - /** - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * - * Generated from protobuf field bool materials = 3; - */ - protected $materials = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $arguments - * If true, the builder claims that recipe.arguments is complete, meaning that - * all external inputs are properly captured in the recipe. - * @type bool $environment - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * @type bool $materials - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoProvenance::initOnce(); - parent::__construct($data); - } - - /** - * If true, the builder claims that recipe.arguments is complete, meaning that - * all external inputs are properly captured in the recipe. - * - * Generated from protobuf field bool arguments = 1; - * @return bool - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * If true, the builder claims that recipe.arguments is complete, meaning that - * all external inputs are properly captured in the recipe. - * - * Generated from protobuf field bool arguments = 1; - * @param bool $var - * @return $this - */ - public function setArguments($var) - { - GPBUtil::checkBool($var); - $this->arguments = $var; - - return $this; - } - - /** - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * - * Generated from protobuf field bool environment = 2; - * @return bool - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * - * Generated from protobuf field bool environment = 2; - * @param bool $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkBool($var); - $this->environment = $var; - - return $this; - } - - /** - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * - * Generated from protobuf field bool materials = 3; - * @return bool - */ - public function getMaterials() - { - return $this->materials; - } - - /** - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * - * Generated from protobuf field bool materials = 3; - * @param bool $var - * @return $this - */ - public function setMaterials($var) - { - GPBUtil::checkBool($var); - $this->materials = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote.php deleted file mode 100644 index 651c3573ec47..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote.php +++ /dev/null @@ -1,272 +0,0 @@ -grafeas.v1.ComplianceNote - */ -class ComplianceNote extends \Google\Protobuf\Internal\Message -{ - /** - * The title that identifies this compliance check. - * - * Generated from protobuf field string title = 1; - */ - protected $title = ''; - /** - * A description about this compliance check. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * The OS and config versions the benchmark applies to. - * - * Generated from protobuf field repeated .grafeas.v1.ComplianceVersion version = 3; - */ - private $version; - /** - * A rationale for the existence of this compliance check. - * - * Generated from protobuf field string rationale = 4; - */ - protected $rationale = ''; - /** - * A description of remediation steps if the compliance check fails. - * - * Generated from protobuf field string remediation = 5; - */ - protected $remediation = ''; - /** - * Serialized scan instructions with a predefined format. - * - * Generated from protobuf field bytes scan_instructions = 7; - */ - protected $scan_instructions = ''; - protected $compliance_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * The title that identifies this compliance check. - * @type string $description - * A description about this compliance check. - * @type array<\Grafeas\V1\ComplianceVersion>|\Google\Protobuf\Internal\RepeatedField $version - * The OS and config versions the benchmark applies to. - * @type string $rationale - * A rationale for the existence of this compliance check. - * @type string $remediation - * A description of remediation steps if the compliance check fails. - * @type \Grafeas\V1\ComplianceNote\CisBenchmark $cis_benchmark - * @type string $scan_instructions - * Serialized scan instructions with a predefined format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Compliance::initOnce(); - parent::__construct($data); - } - - /** - * The title that identifies this compliance check. - * - * Generated from protobuf field string title = 1; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * The title that identifies this compliance check. - * - * 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; - } - - /** - * A description about this compliance check. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A description about this compliance check. - * - * 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 OS and config versions the benchmark applies to. - * - * Generated from protobuf field repeated .grafeas.v1.ComplianceVersion version = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVersion() - { - return $this->version; - } - - /** - * The OS and config versions the benchmark applies to. - * - * Generated from protobuf field repeated .grafeas.v1.ComplianceVersion version = 3; - * @param array<\Grafeas\V1\ComplianceVersion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVersion($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\ComplianceVersion::class); - $this->version = $arr; - - return $this; - } - - /** - * A rationale for the existence of this compliance check. - * - * Generated from protobuf field string rationale = 4; - * @return string - */ - public function getRationale() - { - return $this->rationale; - } - - /** - * A rationale for the existence of this compliance check. - * - * Generated from protobuf field string rationale = 4; - * @param string $var - * @return $this - */ - public function setRationale($var) - { - GPBUtil::checkString($var, True); - $this->rationale = $var; - - return $this; - } - - /** - * A description of remediation steps if the compliance check fails. - * - * Generated from protobuf field string remediation = 5; - * @return string - */ - public function getRemediation() - { - return $this->remediation; - } - - /** - * A description of remediation steps if the compliance check fails. - * - * Generated from protobuf field string remediation = 5; - * @param string $var - * @return $this - */ - public function setRemediation($var) - { - GPBUtil::checkString($var, True); - $this->remediation = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @return \Grafeas\V1\ComplianceNote\CisBenchmark|null - */ - public function getCisBenchmark() - { - return $this->readOneof(6); - } - - public function hasCisBenchmark() - { - return $this->hasOneof(6); - } - - /** - * Generated from protobuf field .grafeas.v1.ComplianceNote.CisBenchmark cis_benchmark = 6; - * @param \Grafeas\V1\ComplianceNote\CisBenchmark $var - * @return $this - */ - public function setCisBenchmark($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\ComplianceNote\CisBenchmark::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Serialized scan instructions with a predefined format. - * - * Generated from protobuf field bytes scan_instructions = 7; - * @return string - */ - public function getScanInstructions() - { - return $this->scan_instructions; - } - - /** - * Serialized scan instructions with a predefined format. - * - * Generated from protobuf field bytes scan_instructions = 7; - * @param string $var - * @return $this - */ - public function setScanInstructions($var) - { - GPBUtil::checkString($var, False); - $this->scan_instructions = $var; - - return $this; - } - - /** - * @return string - */ - public function getComplianceType() - { - return $this->whichOneof("compliance_type"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote/CisBenchmark.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote/CisBenchmark.php deleted file mode 100644 index be70e77b1666..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote/CisBenchmark.php +++ /dev/null @@ -1,90 +0,0 @@ -grafeas.v1.ComplianceNote.CisBenchmark - */ -class CisBenchmark extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field int32 profile_level = 1; - */ - protected $profile_level = 0; - /** - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - */ - protected $severity = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $profile_level - * @type int $severity - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Compliance::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field int32 profile_level = 1; - * @return int - */ - public function getProfileLevel() - { - return $this->profile_level; - } - - /** - * Generated from protobuf field int32 profile_level = 1; - * @param int $var - * @return $this - */ - public function setProfileLevel($var) - { - GPBUtil::checkInt32($var); - $this->profile_level = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class); - $this->severity = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CisBenchmark::class, \Grafeas\V1\ComplianceNote_CisBenchmark::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote_CisBenchmark.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote_CisBenchmark.php deleted file mode 100644 index 05b17cf4e1c0..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceNote_CisBenchmark.php +++ /dev/null @@ -1,16 +0,0 @@ -grafeas.v1.ComplianceOccurrence - */ -class ComplianceOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - */ - private $non_compliant_files; - /** - * Generated from protobuf field string non_compliance_reason = 3; - */ - protected $non_compliance_reason = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Grafeas\V1\NonCompliantFile>|\Google\Protobuf\Internal\RepeatedField $non_compliant_files - * @type string $non_compliance_reason - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Compliance::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNonCompliantFiles() - { - return $this->non_compliant_files; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2; - * @param array<\Grafeas\V1\NonCompliantFile>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNonCompliantFiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\NonCompliantFile::class); - $this->non_compliant_files = $arr; - - return $this; - } - - /** - * Generated from protobuf field string non_compliance_reason = 3; - * @return string - */ - public function getNonComplianceReason() - { - return $this->non_compliance_reason; - } - - /** - * Generated from protobuf field string non_compliance_reason = 3; - * @param string $var - * @return $this - */ - public function setNonComplianceReason($var) - { - GPBUtil::checkString($var, True); - $this->non_compliance_reason = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceVersion.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceVersion.php deleted file mode 100644 index 19d19abd80bd..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ComplianceVersion.php +++ /dev/null @@ -1,148 +0,0 @@ -grafeas.v1.ComplianceVersion - */ -class ComplianceVersion extends \Google\Protobuf\Internal\Message -{ - /** - * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is - * applicable to. - * - * Generated from protobuf field string cpe_uri = 1; - */ - protected $cpe_uri = ''; - /** - * The name of the document that defines this benchmark, e.g. "CIS - * Container-Optimized OS". - * - * Generated from protobuf field string benchmark_document = 3; - */ - protected $benchmark_document = ''; - /** - * The version of the benchmark. This is set to the version of the OS-specific - * CIS document the benchmark is defined in. - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cpe_uri - * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is - * applicable to. - * @type string $benchmark_document - * The name of the document that defines this benchmark, e.g. "CIS - * Container-Optimized OS". - * @type string $version - * The version of the benchmark. This is set to the version of the OS-specific - * CIS document the benchmark is defined in. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Compliance::initOnce(); - parent::__construct($data); - } - - /** - * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is - * applicable to. - * - * Generated from protobuf field string cpe_uri = 1; - * @return string - */ - public function getCpeUri() - { - return $this->cpe_uri; - } - - /** - * The CPE URI (https://cpe.mitre.org/specification/) this benchmark is - * applicable to. - * - * Generated from protobuf field string cpe_uri = 1; - * @param string $var - * @return $this - */ - public function setCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->cpe_uri = $var; - - return $this; - } - - /** - * The name of the document that defines this benchmark, e.g. "CIS - * Container-Optimized OS". - * - * Generated from protobuf field string benchmark_document = 3; - * @return string - */ - public function getBenchmarkDocument() - { - return $this->benchmark_document; - } - - /** - * The name of the document that defines this benchmark, e.g. "CIS - * Container-Optimized OS". - * - * Generated from protobuf field string benchmark_document = 3; - * @param string $var - * @return $this - */ - public function setBenchmarkDocument($var) - { - GPBUtil::checkString($var, True); - $this->benchmark_document = $var; - - return $this; - } - - /** - * The version of the benchmark. This is set to the version of the OS-specific - * CIS document the benchmark is defined in. - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The version of the benchmark. This is set to the version of the OS-specific - * CIS document the benchmark is defined in. - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateNoteRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateNoteRequest.php deleted file mode 100644 index 65774554b463..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateNoteRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -grafeas.v1.CreateNoteRequest - */ -class CreateNoteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the note is to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The ID to use for this note. - * - * Generated from protobuf field string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $note_id = ''; - /** - * The note to create. - * - * Generated from protobuf field .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $note = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the note is to be created. - * @type string $note_id - * The ID to use for this note. - * @type \Grafeas\V1\Note $note - * The note to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the note is to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the note is to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 ID to use for this note. - * - * Generated from protobuf field string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNoteId() - { - return $this->note_id; - } - - /** - * The ID to use for this note. - * - * Generated from protobuf field string note_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNoteId($var) - { - GPBUtil::checkString($var, True); - $this->note_id = $var; - - return $this; - } - - /** - * The note to create. - * - * Generated from protobuf field .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Grafeas\V1\Note|null - */ - public function getNote() - { - return $this->note; - } - - public function hasNote() - { - return isset($this->note); - } - - public function clearNote() - { - unset($this->note); - } - - /** - * The note to create. - * - * Generated from protobuf field .grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Grafeas\V1\Note $var - * @return $this - */ - public function setNote($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Note::class); - $this->note = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateOccurrenceRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateOccurrenceRequest.php deleted file mode 100644 index 406afefc2f63..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/CreateOccurrenceRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -grafeas.v1.CreateOccurrenceRequest - */ -class CreateOccurrenceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrence is to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The occurrence to create. - * - * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $occurrence = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrence is to be created. - * @type \Grafeas\V1\Occurrence $occurrence - * The occurrence to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrence is to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrence is to be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 occurrence to create. - * - * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Grafeas\V1\Occurrence|null - */ - public function getOccurrence() - { - return $this->occurrence; - } - - public function hasOccurrence() - { - return isset($this->occurrence); - } - - public function clearOccurrence() - { - unset($this->occurrence); - } - - /** - * The occurrence to create. - * - * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Grafeas\V1\Occurrence $var - * @return $this - */ - public function setOccurrence($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Occurrence::class); - $this->occurrence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote.php deleted file mode 100644 index b40b73c92c36..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote.php +++ /dev/null @@ -1,75 +0,0 @@ -grafeas.v1.DSSEAttestationNote - */ -class DSSEAttestationNote extends \Google\Protobuf\Internal\Message -{ - /** - * DSSEHint hints at the purpose of the attestation authority. - * - * Generated from protobuf field .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - */ - protected $hint = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\DSSEAttestationNote\DSSEHint $hint - * DSSEHint hints at the purpose of the attestation authority. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\DsseAttestation::initOnce(); - parent::__construct($data); - } - - /** - * DSSEHint hints at the purpose of the attestation authority. - * - * Generated from protobuf field .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @return \Grafeas\V1\DSSEAttestationNote\DSSEHint|null - */ - public function getHint() - { - return $this->hint; - } - - public function hasHint() - { - return isset($this->hint); - } - - public function clearHint() - { - unset($this->hint); - } - - /** - * DSSEHint hints at the purpose of the attestation authority. - * - * Generated from protobuf field .grafeas.v1.DSSEAttestationNote.DSSEHint hint = 1; - * @param \Grafeas\V1\DSSEAttestationNote\DSSEHint $var - * @return $this - */ - public function setHint($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DSSEAttestationNote\DSSEHint::class); - $this->hint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote/DSSEHint.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote/DSSEHint.php deleted file mode 100644 index 972f84285167..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote/DSSEHint.php +++ /dev/null @@ -1,80 +0,0 @@ -grafeas.v1.DSSEAttestationNote.DSSEHint - */ -class DSSEHint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The human readable name of this attestation authority, for - * example "cloudbuild-prod". - * - * Generated from protobuf field string human_readable_name = 1; - */ - protected $human_readable_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $human_readable_name - * Required. The human readable name of this attestation authority, for - * example "cloudbuild-prod". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\DsseAttestation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The human readable name of this attestation authority, for - * example "cloudbuild-prod". - * - * Generated from protobuf field string human_readable_name = 1; - * @return string - */ - public function getHumanReadableName() - { - return $this->human_readable_name; - } - - /** - * Required. The human readable name of this attestation authority, for - * example "cloudbuild-prod". - * - * Generated from protobuf field string human_readable_name = 1; - * @param string $var - * @return $this - */ - public function setHumanReadableName($var) - { - GPBUtil::checkString($var, True); - $this->human_readable_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DSSEHint::class, \Grafeas\V1\DSSEAttestationNote_DSSEHint::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote_DSSEHint.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote_DSSEHint.php deleted file mode 100644 index 59c6d41f9483..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DSSEAttestationNote_DSSEHint.php +++ /dev/null @@ -1,16 +0,0 @@ -grafeas.v1.DSSEAttestationOccurrence - */ -class DSSEAttestationOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * If doing something security critical, make sure to verify the signatures in - * this metadata. - * - * Generated from protobuf field .grafeas.v1.Envelope envelope = 1; - */ - protected $envelope = null; - protected $decoded_payload; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\Envelope $envelope - * If doing something security critical, make sure to verify the signatures in - * this metadata. - * @type \Grafeas\V1\InTotoStatement $statement - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\DsseAttestation::initOnce(); - parent::__construct($data); - } - - /** - * If doing something security critical, make sure to verify the signatures in - * this metadata. - * - * Generated from protobuf field .grafeas.v1.Envelope envelope = 1; - * @return \Grafeas\V1\Envelope|null - */ - public function getEnvelope() - { - return $this->envelope; - } - - public function hasEnvelope() - { - return isset($this->envelope); - } - - public function clearEnvelope() - { - unset($this->envelope); - } - - /** - * If doing something security critical, make sure to verify the signatures in - * this metadata. - * - * Generated from protobuf field .grafeas.v1.Envelope envelope = 1; - * @param \Grafeas\V1\Envelope $var - * @return $this - */ - public function setEnvelope($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Envelope::class); - $this->envelope = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoStatement statement = 2; - * @return \Grafeas\V1\InTotoStatement|null - */ - public function getStatement() - { - return $this->readOneof(2); - } - - public function hasStatement() - { - return $this->hasOneof(2); - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoStatement statement = 2; - * @param \Grafeas\V1\InTotoStatement $var - * @return $this - */ - public function setStatement($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\InTotoStatement::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getDecodedPayload() - { - return $this->whichOneof("decoded_payload"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteNoteRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteNoteRequest.php deleted file mode 100644 index 776c3531767c..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteNoteRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -grafeas.v1.DeleteNoteRequest - */ -class DeleteNoteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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 - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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; - } - - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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/Grafeas/v1/proto/src/Grafeas/V1/DeleteOccurrenceRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteOccurrenceRequest.php deleted file mode 100644 index 78bc19ab3724..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeleteOccurrenceRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -grafeas.v1.DeleteOccurrenceRequest - */ -class DeleteOccurrenceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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 - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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/Grafeas/v1/proto/src/Grafeas/V1/DeploymentNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentNote.php deleted file mode 100644 index d934670e3bb8..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentNote.php +++ /dev/null @@ -1,67 +0,0 @@ -grafeas.v1.DeploymentNote - */ -class DeploymentNote extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource URI for the artifact being deployed. - * - * Generated from protobuf field repeated string resource_uri = 1; - */ - private $resource_uri; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $resource_uri - * Required. Resource URI for the artifact being deployed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Deployment::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource URI for the artifact being deployed. - * - * Generated from protobuf field repeated string resource_uri = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * Required. Resource URI for the artifact being deployed. - * - * Generated from protobuf field repeated string resource_uri = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceUri($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_uri = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence.php deleted file mode 100644 index 9971d3eb3d44..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence.php +++ /dev/null @@ -1,295 +0,0 @@ -grafeas.v1.DeploymentOccurrence - */ -class DeploymentOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * Identity of the user that triggered this deployment. - * - * Generated from protobuf field string user_email = 1; - */ - protected $user_email = ''; - /** - * Required. Beginning of the lifetime of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp deploy_time = 2; - */ - protected $deploy_time = null; - /** - * End of the lifetime of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp undeploy_time = 3; - */ - protected $undeploy_time = null; - /** - * Configuration used to create this deployment. - * - * Generated from protobuf field string config = 4; - */ - protected $config = ''; - /** - * Address of the runtime element hosting this deployment. - * - * Generated from protobuf field string address = 5; - */ - protected $address = ''; - /** - * Output only. Resource URI for the artifact being deployed taken from - * the deployable field with the same name. - * - * Generated from protobuf field repeated string resource_uri = 6; - */ - private $resource_uri; - /** - * Platform hosting this deployment. - * - * Generated from protobuf field .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - */ - protected $platform = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $user_email - * Identity of the user that triggered this deployment. - * @type \Google\Protobuf\Timestamp $deploy_time - * Required. Beginning of the lifetime of this deployment. - * @type \Google\Protobuf\Timestamp $undeploy_time - * End of the lifetime of this deployment. - * @type string $config - * Configuration used to create this deployment. - * @type string $address - * Address of the runtime element hosting this deployment. - * @type array|\Google\Protobuf\Internal\RepeatedField $resource_uri - * Output only. Resource URI for the artifact being deployed taken from - * the deployable field with the same name. - * @type int $platform - * Platform hosting this deployment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Deployment::initOnce(); - parent::__construct($data); - } - - /** - * Identity of the user that triggered this deployment. - * - * Generated from protobuf field string user_email = 1; - * @return string - */ - public function getUserEmail() - { - return $this->user_email; - } - - /** - * Identity of the user that triggered this deployment. - * - * Generated from protobuf field string user_email = 1; - * @param string $var - * @return $this - */ - public function setUserEmail($var) - { - GPBUtil::checkString($var, True); - $this->user_email = $var; - - return $this; - } - - /** - * Required. Beginning of the lifetime of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp deploy_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeployTime() - { - return $this->deploy_time; - } - - public function hasDeployTime() - { - return isset($this->deploy_time); - } - - public function clearDeployTime() - { - unset($this->deploy_time); - } - - /** - * Required. Beginning of the lifetime of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp deploy_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeployTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->deploy_time = $var; - - return $this; - } - - /** - * End of the lifetime of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp undeploy_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUndeployTime() - { - return $this->undeploy_time; - } - - public function hasUndeployTime() - { - return isset($this->undeploy_time); - } - - public function clearUndeployTime() - { - unset($this->undeploy_time); - } - - /** - * End of the lifetime of this deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp undeploy_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUndeployTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->undeploy_time = $var; - - return $this; - } - - /** - * Configuration used to create this deployment. - * - * Generated from protobuf field string config = 4; - * @return string - */ - public function getConfig() - { - return $this->config; - } - - /** - * Configuration used to create this deployment. - * - * Generated from protobuf field string config = 4; - * @param string $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkString($var, True); - $this->config = $var; - - return $this; - } - - /** - * Address of the runtime element hosting this deployment. - * - * Generated from protobuf field string address = 5; - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * Address of the runtime element hosting this deployment. - * - * Generated from protobuf field string address = 5; - * @param string $var - * @return $this - */ - public function setAddress($var) - { - GPBUtil::checkString($var, True); - $this->address = $var; - - return $this; - } - - /** - * Output only. Resource URI for the artifact being deployed taken from - * the deployable field with the same name. - * - * Generated from protobuf field repeated string resource_uri = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * Output only. Resource URI for the artifact being deployed taken from - * the deployable field with the same name. - * - * Generated from protobuf field repeated string resource_uri = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceUri($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_uri = $arr; - - return $this; - } - - /** - * Platform hosting this deployment. - * - * Generated from protobuf field .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @return int - */ - public function getPlatform() - { - return $this->platform; - } - - /** - * Platform hosting this deployment. - * - * Generated from protobuf field .grafeas.v1.DeploymentOccurrence.Platform platform = 7; - * @param int $var - * @return $this - */ - public function setPlatform($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\DeploymentOccurrence\Platform::class); - $this->platform = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence/Platform.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence/Platform.php deleted file mode 100644 index 35b13b4c7858..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence/Platform.php +++ /dev/null @@ -1,71 +0,0 @@ -grafeas.v1.DeploymentOccurrence.Platform - */ -class Platform -{ - /** - * Unknown. - * - * Generated from protobuf enum PLATFORM_UNSPECIFIED = 0; - */ - const PLATFORM_UNSPECIFIED = 0; - /** - * Google Container Engine. - * - * Generated from protobuf enum GKE = 1; - */ - const GKE = 1; - /** - * Google App Engine: Flexible Environment. - * - * Generated from protobuf enum FLEX = 2; - */ - const FLEX = 2; - /** - * Custom user-defined platform. - * - * Generated from protobuf enum CUSTOM = 3; - */ - const CUSTOM = 3; - - private static $valueToName = [ - self::PLATFORM_UNSPECIFIED => 'PLATFORM_UNSPECIFIED', - self::GKE => 'GKE', - self::FLEX => 'FLEX', - 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(Platform::class, \Grafeas\V1\DeploymentOccurrence_Platform::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence_Platform.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence_Platform.php deleted file mode 100644 index 411764953ea1..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DeploymentOccurrence_Platform.php +++ /dev/null @@ -1,16 +0,0 @@ -grafeas.v1.Digest - */ -class Digest extends \Google\Protobuf\Internal\Message -{ - /** - * `SHA1`, `SHA512` etc. - * - * Generated from protobuf field string algo = 1; - */ - protected $algo = ''; - /** - * Value of the digest. - * - * Generated from protobuf field bytes digest_bytes = 2; - */ - protected $digest_bytes = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $algo - * `SHA1`, `SHA512` etc. - * @type string $digest_bytes - * Value of the digest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * `SHA1`, `SHA512` etc. - * - * Generated from protobuf field string algo = 1; - * @return string - */ - public function getAlgo() - { - return $this->algo; - } - - /** - * `SHA1`, `SHA512` etc. - * - * Generated from protobuf field string algo = 1; - * @param string $var - * @return $this - */ - public function setAlgo($var) - { - GPBUtil::checkString($var, True); - $this->algo = $var; - - return $this; - } - - /** - * Value of the digest. - * - * Generated from protobuf field bytes digest_bytes = 2; - * @return string - */ - public function getDigestBytes() - { - return $this->digest_bytes; - } - - /** - * Value of the digest. - * - * Generated from protobuf field bytes digest_bytes = 2; - * @param string $var - * @return $this - */ - public function setDigestBytes($var) - { - GPBUtil::checkString($var, False); - $this->digest_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryNote.php deleted file mode 100644 index d1fa446c046d..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryNote.php +++ /dev/null @@ -1,73 +0,0 @@ -grafeas.v1.DiscoveryNote - */ -class DiscoveryNote extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Immutable. The kind of analysis that is handled by this - * discovery. - * - * Generated from protobuf field .grafeas.v1.NoteKind analysis_kind = 1; - */ - protected $analysis_kind = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $analysis_kind - * Required. Immutable. The kind of analysis that is handled by this - * discovery. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Discovery::initOnce(); - parent::__construct($data); - } - - /** - * Required. Immutable. The kind of analysis that is handled by this - * discovery. - * - * Generated from protobuf field .grafeas.v1.NoteKind analysis_kind = 1; - * @return int - */ - public function getAnalysisKind() - { - return $this->analysis_kind; - } - - /** - * Required. Immutable. The kind of analysis that is handled by this - * discovery. - * - * Generated from protobuf field .grafeas.v1.NoteKind analysis_kind = 1; - * @param int $var - * @return $this - */ - public function setAnalysisKind($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\NoteKind::class); - $this->analysis_kind = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence.php deleted file mode 100644 index e1710bb863ec..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence.php +++ /dev/null @@ -1,350 +0,0 @@ -grafeas.v1.DiscoveryOccurrence - */ -class DiscoveryOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * Whether the resource is continuously analyzed. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - */ - protected $continuous_analysis = 0; - /** - * The status of discovery for the resource. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - */ - protected $analysis_status = 0; - /** - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - */ - protected $analysis_completed = null; - /** - * Indicates any errors encountered during analysis of a resource. There - * could be 0 or more of these errors. - * - * Generated from protobuf field repeated .google.rpc.Status analysis_error = 8; - */ - private $analysis_error; - /** - * When an error is encountered this will contain a LocalizedMessage under - * details to show to the user. The LocalizedMessage is output only and - * populated by the API. - * - * Generated from protobuf field .google.rpc.Status analysis_status_error = 3; - */ - protected $analysis_status_error = null; - /** - * The CPE of the resource being scanned. - * - * Generated from protobuf field string cpe = 4; - */ - protected $cpe = ''; - /** - * The last time this resource was scanned. - * - * Generated from protobuf field .google.protobuf.Timestamp last_scan_time = 5; - */ - protected $last_scan_time = null; - /** - * The time occurrences related to this discovery occurrence were archived. - * - * Generated from protobuf field .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $archive_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $continuous_analysis - * Whether the resource is continuously analyzed. - * @type int $analysis_status - * The status of discovery for the resource. - * @type \Grafeas\V1\DiscoveryOccurrence\AnalysisCompleted $analysis_completed - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $analysis_error - * Indicates any errors encountered during analysis of a resource. There - * could be 0 or more of these errors. - * @type \Google\Rpc\Status $analysis_status_error - * When an error is encountered this will contain a LocalizedMessage under - * details to show to the user. The LocalizedMessage is output only and - * populated by the API. - * @type string $cpe - * The CPE of the resource being scanned. - * @type \Google\Protobuf\Timestamp $last_scan_time - * The last time this resource was scanned. - * @type \Google\Protobuf\Timestamp $archive_time - * The time occurrences related to this discovery occurrence were archived. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Discovery::initOnce(); - parent::__construct($data); - } - - /** - * Whether the resource is continuously analyzed. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @return int - */ - public function getContinuousAnalysis() - { - return $this->continuous_analysis; - } - - /** - * Whether the resource is continuously analyzed. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis continuous_analysis = 1; - * @param int $var - * @return $this - */ - public function setContinuousAnalysis($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\DiscoveryOccurrence\ContinuousAnalysis::class); - $this->continuous_analysis = $var; - - return $this; - } - - /** - * The status of discovery for the resource. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @return int - */ - public function getAnalysisStatus() - { - return $this->analysis_status; - } - - /** - * The status of discovery for the resource. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisStatus analysis_status = 2; - * @param int $var - * @return $this - */ - public function setAnalysisStatus($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\DiscoveryOccurrence\AnalysisStatus::class); - $this->analysis_status = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @return \Grafeas\V1\DiscoveryOccurrence\AnalysisCompleted|null - */ - public function getAnalysisCompleted() - { - return $this->analysis_completed; - } - - public function hasAnalysisCompleted() - { - return isset($this->analysis_completed); - } - - public function clearAnalysisCompleted() - { - unset($this->analysis_completed); - } - - /** - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence.AnalysisCompleted analysis_completed = 7; - * @param \Grafeas\V1\DiscoveryOccurrence\AnalysisCompleted $var - * @return $this - */ - public function setAnalysisCompleted($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DiscoveryOccurrence\AnalysisCompleted::class); - $this->analysis_completed = $var; - - return $this; - } - - /** - * Indicates any errors encountered during analysis of a resource. There - * could be 0 or more of these errors. - * - * Generated from protobuf field repeated .google.rpc.Status analysis_error = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAnalysisError() - { - return $this->analysis_error; - } - - /** - * Indicates any errors encountered during analysis of a resource. There - * could be 0 or more of these errors. - * - * Generated from protobuf field repeated .google.rpc.Status analysis_error = 8; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAnalysisError($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->analysis_error = $arr; - - return $this; - } - - /** - * When an error is encountered this will contain a LocalizedMessage under - * details to show to the user. The LocalizedMessage is output only and - * populated by the API. - * - * Generated from protobuf field .google.rpc.Status analysis_status_error = 3; - * @return \Google\Rpc\Status|null - */ - public function getAnalysisStatusError() - { - return $this->analysis_status_error; - } - - public function hasAnalysisStatusError() - { - return isset($this->analysis_status_error); - } - - public function clearAnalysisStatusError() - { - unset($this->analysis_status_error); - } - - /** - * When an error is encountered this will contain a LocalizedMessage under - * details to show to the user. The LocalizedMessage is output only and - * populated by the API. - * - * Generated from protobuf field .google.rpc.Status analysis_status_error = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setAnalysisStatusError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->analysis_status_error = $var; - - return $this; - } - - /** - * The CPE of the resource being scanned. - * - * Generated from protobuf field string cpe = 4; - * @return string - */ - public function getCpe() - { - return $this->cpe; - } - - /** - * The CPE of the resource being scanned. - * - * Generated from protobuf field string cpe = 4; - * @param string $var - * @return $this - */ - public function setCpe($var) - { - GPBUtil::checkString($var, True); - $this->cpe = $var; - - return $this; - } - - /** - * The last time this resource was scanned. - * - * Generated from protobuf field .google.protobuf.Timestamp last_scan_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastScanTime() - { - return $this->last_scan_time; - } - - public function hasLastScanTime() - { - return isset($this->last_scan_time); - } - - public function clearLastScanTime() - { - unset($this->last_scan_time); - } - - /** - * The last time this resource was scanned. - * - * Generated from protobuf field .google.protobuf.Timestamp last_scan_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastScanTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_scan_time = $var; - - return $this; - } - - /** - * The time occurrences related to this discovery occurrence were archived. - * - * Generated from protobuf field .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getArchiveTime() - { - return $this->archive_time; - } - - public function hasArchiveTime() - { - return isset($this->archive_time); - } - - public function clearArchiveTime() - { - unset($this->archive_time); - } - - /** - * The time occurrences related to this discovery occurrence were archived. - * - * Generated from protobuf field .google.protobuf.Timestamp archive_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setArchiveTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->archive_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisCompleted.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisCompleted.php deleted file mode 100644 index 5d1e7201fb22..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisCompleted.php +++ /dev/null @@ -1,64 +0,0 @@ -grafeas.v1.DiscoveryOccurrence.AnalysisCompleted - */ -class AnalysisCompleted extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field repeated string analysis_type = 1; - */ - private $analysis_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $analysis_type - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Discovery::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field repeated string analysis_type = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAnalysisType() - { - return $this->analysis_type; - } - - /** - * Generated from protobuf field repeated string analysis_type = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAnalysisType($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->analysis_type = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AnalysisCompleted::class, \Grafeas\V1\DiscoveryOccurrence_AnalysisCompleted::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisStatus.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisStatus.php deleted file mode 100644 index fcef24fb33a3..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/AnalysisStatus.php +++ /dev/null @@ -1,94 +0,0 @@ -grafeas.v1.DiscoveryOccurrence.AnalysisStatus - */ -class AnalysisStatus -{ - /** - * Unknown. - * - * Generated from protobuf enum ANALYSIS_STATUS_UNSPECIFIED = 0; - */ - const ANALYSIS_STATUS_UNSPECIFIED = 0; - /** - * Resource is known but no action has been taken yet. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * Resource is being analyzed. - * - * Generated from protobuf enum SCANNING = 2; - */ - const SCANNING = 2; - /** - * Analysis has finished successfully. - * - * Generated from protobuf enum FINISHED_SUCCESS = 3; - */ - const FINISHED_SUCCESS = 3; - /** - * Analysis has completed. - * - * Generated from protobuf enum COMPLETE = 3; - */ - const COMPLETE = 3; - /** - * Analysis has finished unsuccessfully, the analysis itself is in a bad - * state. - * - * Generated from protobuf enum FINISHED_FAILED = 4; - */ - const FINISHED_FAILED = 4; - /** - * The resource is known not to be supported. - * - * Generated from protobuf enum FINISHED_UNSUPPORTED = 5; - */ - const FINISHED_UNSUPPORTED = 5; - - private static $valueToName = [ - self::ANALYSIS_STATUS_UNSPECIFIED => 'ANALYSIS_STATUS_UNSPECIFIED', - self::PENDING => 'PENDING', - self::SCANNING => 'SCANNING', - self::FINISHED_SUCCESS => 'FINISHED_SUCCESS', - self::COMPLETE => 'COMPLETE', - self::FINISHED_FAILED => 'FINISHED_FAILED', - self::FINISHED_UNSUPPORTED => 'FINISHED_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(AnalysisStatus::class, \Grafeas\V1\DiscoveryOccurrence_AnalysisStatus::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/ContinuousAnalysis.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/ContinuousAnalysis.php deleted file mode 100644 index 350c2fb7590b..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence/ContinuousAnalysis.php +++ /dev/null @@ -1,64 +0,0 @@ -grafeas.v1.DiscoveryOccurrence.ContinuousAnalysis - */ -class ContinuousAnalysis -{ - /** - * Unknown. - * - * Generated from protobuf enum CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; - */ - const CONTINUOUS_ANALYSIS_UNSPECIFIED = 0; - /** - * The resource is continuously analyzed. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The resource is ignored for continuous analysis. - * - * Generated from protobuf enum INACTIVE = 2; - */ - const INACTIVE = 2; - - private static $valueToName = [ - self::CONTINUOUS_ANALYSIS_UNSPECIFIED => 'CONTINUOUS_ANALYSIS_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::INACTIVE => 'INACTIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ContinuousAnalysis::class, \Grafeas\V1\DiscoveryOccurrence_ContinuousAnalysis::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence_AnalysisCompleted.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence_AnalysisCompleted.php deleted file mode 100644 index 8fb46b02d277..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/DiscoveryOccurrence_AnalysisCompleted.php +++ /dev/null @@ -1,16 +0,0 @@ -grafeas.v1.Distribution - */ -class Distribution extends \Google\Protobuf\Internal\Message -{ - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * - * Generated from protobuf field string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cpe_uri = ''; - /** - * The CPU architecture for which packages in this distribution channel were - * built. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 2; - */ - protected $architecture = 0; - /** - * The latest available version of this package in this distribution channel. - * - * Generated from protobuf field .grafeas.v1.Version latest_version = 3; - */ - protected $latest_version = null; - /** - * A freeform string denoting the maintainer of this package. - * - * Generated from protobuf field string maintainer = 4; - */ - protected $maintainer = ''; - /** - * The distribution channel-specific homepage for this package. - * - * Generated from protobuf field string url = 5; - */ - protected $url = ''; - /** - * The distribution channel-specific description of this package. - * - * Generated from protobuf field string description = 6; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cpe_uri - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * @type int $architecture - * The CPU architecture for which packages in this distribution channel were - * built. - * @type \Grafeas\V1\Version $latest_version - * The latest available version of this package in this distribution channel. - * @type string $maintainer - * A freeform string denoting the maintainer of this package. - * @type string $url - * The distribution channel-specific homepage for this package. - * @type string $description - * The distribution channel-specific description of this package. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Package::initOnce(); - parent::__construct($data); - } - - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * - * Generated from protobuf field string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCpeUri() - { - return $this->cpe_uri; - } - - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * - * Generated from protobuf field string cpe_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->cpe_uri = $var; - - return $this; - } - - /** - * The CPU architecture for which packages in this distribution channel were - * built. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 2; - * @return int - */ - public function getArchitecture() - { - return $this->architecture; - } - - /** - * The CPU architecture for which packages in this distribution channel were - * built. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 2; - * @param int $var - * @return $this - */ - public function setArchitecture($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Architecture::class); - $this->architecture = $var; - - return $this; - } - - /** - * The latest available version of this package in this distribution channel. - * - * Generated from protobuf field .grafeas.v1.Version latest_version = 3; - * @return \Grafeas\V1\Version|null - */ - public function getLatestVersion() - { - return $this->latest_version; - } - - public function hasLatestVersion() - { - return isset($this->latest_version); - } - - public function clearLatestVersion() - { - unset($this->latest_version); - } - - /** - * The latest available version of this package in this distribution channel. - * - * Generated from protobuf field .grafeas.v1.Version latest_version = 3; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setLatestVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->latest_version = $var; - - return $this; - } - - /** - * A freeform string denoting the maintainer of this package. - * - * Generated from protobuf field string maintainer = 4; - * @return string - */ - public function getMaintainer() - { - return $this->maintainer; - } - - /** - * A freeform string denoting the maintainer of this package. - * - * Generated from protobuf field string maintainer = 4; - * @param string $var - * @return $this - */ - public function setMaintainer($var) - { - GPBUtil::checkString($var, True); - $this->maintainer = $var; - - return $this; - } - - /** - * The distribution channel-specific homepage for this package. - * - * Generated from protobuf field string url = 5; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The distribution channel-specific homepage for this package. - * - * Generated from protobuf field string url = 5; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * The distribution channel-specific description of this package. - * - * Generated from protobuf field string description = 6; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The distribution channel-specific description of this package. - * - * 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/Grafeas/v1/proto/src/Grafeas/V1/Envelope.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Envelope.php deleted file mode 100644 index 17bcc1346ae5..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Envelope.php +++ /dev/null @@ -1,116 +0,0 @@ -grafeas.v1.Envelope - */ -class Envelope extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field bytes payload = 1; - */ - protected $payload = ''; - /** - * Generated from protobuf field string payload_type = 2; - */ - protected $payload_type = ''; - /** - * Generated from protobuf field repeated .grafeas.v1.EnvelopeSignature signatures = 3; - */ - private $signatures; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $payload - * @type string $payload_type - * @type array<\Grafeas\V1\EnvelopeSignature>|\Google\Protobuf\Internal\RepeatedField $signatures - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field bytes payload = 1; - * @return string - */ - public function getPayload() - { - return $this->payload; - } - - /** - * Generated from protobuf field bytes payload = 1; - * @param string $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkString($var, False); - $this->payload = $var; - - return $this; - } - - /** - * Generated from protobuf field string payload_type = 2; - * @return string - */ - public function getPayloadType() - { - return $this->payload_type; - } - - /** - * Generated from protobuf field string payload_type = 2; - * @param string $var - * @return $this - */ - public function setPayloadType($var) - { - GPBUtil::checkString($var, True); - $this->payload_type = $var; - - return $this; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.EnvelopeSignature signatures = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSignatures() - { - return $this->signatures; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.EnvelopeSignature signatures = 3; - * @param array<\Grafeas\V1\EnvelopeSignature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSignatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\EnvelopeSignature::class); - $this->signatures = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/EnvelopeSignature.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/EnvelopeSignature.php deleted file mode 100644 index 61ebdc60fbcf..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/EnvelopeSignature.php +++ /dev/null @@ -1,85 +0,0 @@ -grafeas.v1.EnvelopeSignature - */ -class EnvelopeSignature extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field bytes sig = 1; - */ - protected $sig = ''; - /** - * Generated from protobuf field string keyid = 2; - */ - protected $keyid = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sig - * @type string $keyid - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field bytes sig = 1; - * @return string - */ - public function getSig() - { - return $this->sig; - } - - /** - * Generated from protobuf field bytes sig = 1; - * @param string $var - * @return $this - */ - public function setSig($var) - { - GPBUtil::checkString($var, False); - $this->sig = $var; - - return $this; - } - - /** - * Generated from protobuf field string keyid = 2; - * @return string - */ - public function getKeyid() - { - return $this->keyid; - } - - /** - * Generated from protobuf field string keyid = 2; - * @param string $var - * @return $this - */ - public function setKeyid($var) - { - GPBUtil::checkString($var, True); - $this->keyid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileHashes.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileHashes.php deleted file mode 100644 index a24ab1da8401..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileHashes.php +++ /dev/null @@ -1,68 +0,0 @@ -grafeas.v1.FileHashes - */ -class FileHashes extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Collection of file hashes. - * - * Generated from protobuf field repeated .grafeas.v1.Hash file_hash = 1; - */ - private $file_hash; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Grafeas\V1\Hash>|\Google\Protobuf\Internal\RepeatedField $file_hash - * Required. Collection of file hashes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Collection of file hashes. - * - * Generated from protobuf field repeated .grafeas.v1.Hash file_hash = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileHash() - { - return $this->file_hash; - } - - /** - * Required. Collection of file hashes. - * - * Generated from protobuf field repeated .grafeas.v1.Hash file_hash = 1; - * @param array<\Grafeas\V1\Hash>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileHash($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Hash::class); - $this->file_hash = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileLocation.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileLocation.php deleted file mode 100644 index c7f6d9e7cccc..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/FileLocation.php +++ /dev/null @@ -1,71 +0,0 @@ -grafeas.v1.FileLocation - */ -class FileLocation extends \Google\Protobuf\Internal\Message -{ - /** - * For jars that are contained inside .war files, this filepath - * can indicate the path to war file combined with the path to jar file. - * - * Generated from protobuf field string file_path = 1; - */ - protected $file_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $file_path - * For jars that are contained inside .war files, this filepath - * can indicate the path to war file combined with the path to jar file. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * For jars that are contained inside .war files, this filepath - * can indicate the path to war file combined with the path to jar file. - * - * Generated from protobuf field string file_path = 1; - * @return string - */ - public function getFilePath() - { - return $this->file_path; - } - - /** - * For jars that are contained inside .war files, this filepath - * can indicate the path to war file combined with the path to jar file. - * - * Generated from protobuf field string file_path = 1; - * @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/Grafeas/v1/proto/src/Grafeas/V1/Fingerprint.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Fingerprint.php deleted file mode 100644 index 7191d7383ef5..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Fingerprint.php +++ /dev/null @@ -1,151 +0,0 @@ -grafeas.v1.Fingerprint - */ -class Fingerprint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The layer ID of the final layer in the Docker image's v1 - * representation. - * - * Generated from protobuf field string v1_name = 1; - */ - protected $v1_name = ''; - /** - * Required. The ordered list of v2 blobs that represent a given image. - * - * Generated from protobuf field repeated string v2_blob = 2; - */ - private $v2_blob; - /** - * Output only. The name of the image's v2 blobs computed via: - * [bottom] := v2_blob[bottom] - * [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) - * Only the name of the final blob is kept. - * - * Generated from protobuf field string v2_name = 3; - */ - protected $v2_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $v1_name - * Required. The layer ID of the final layer in the Docker image's v1 - * representation. - * @type array|\Google\Protobuf\Internal\RepeatedField $v2_blob - * Required. The ordered list of v2 blobs that represent a given image. - * @type string $v2_name - * Output only. The name of the image's v2 blobs computed via: - * [bottom] := v2_blob[bottom] - * [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) - * Only the name of the final blob is kept. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Image::initOnce(); - parent::__construct($data); - } - - /** - * Required. The layer ID of the final layer in the Docker image's v1 - * representation. - * - * Generated from protobuf field string v1_name = 1; - * @return string - */ - public function getV1Name() - { - return $this->v1_name; - } - - /** - * Required. The layer ID of the final layer in the Docker image's v1 - * representation. - * - * Generated from protobuf field string v1_name = 1; - * @param string $var - * @return $this - */ - public function setV1Name($var) - { - GPBUtil::checkString($var, True); - $this->v1_name = $var; - - return $this; - } - - /** - * Required. The ordered list of v2 blobs that represent a given image. - * - * Generated from protobuf field repeated string v2_blob = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getV2Blob() - { - return $this->v2_blob; - } - - /** - * Required. The ordered list of v2 blobs that represent a given image. - * - * Generated from protobuf field repeated string v2_blob = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setV2Blob($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->v2_blob = $arr; - - return $this; - } - - /** - * Output only. The name of the image's v2 blobs computed via: - * [bottom] := v2_blob[bottom] - * [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) - * Only the name of the final blob is kept. - * - * Generated from protobuf field string v2_name = 3; - * @return string - */ - public function getV2Name() - { - return $this->v2_name; - } - - /** - * Output only. The name of the image's v2 blobs computed via: - * [bottom] := v2_blob[bottom] - * [N] := sha256(v2_blob[N] + " " + v2_name[N+1]) - * Only the name of the final blob is kept. - * - * Generated from protobuf field string v2_name = 3; - * @param string $var - * @return $this - */ - public function setV2Name($var) - { - GPBUtil::checkString($var, True); - $this->v2_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GerritSourceContext.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GerritSourceContext.php deleted file mode 100644 index 616fb62984ad..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GerritSourceContext.php +++ /dev/null @@ -1,184 +0,0 @@ -grafeas.v1.GerritSourceContext - */ -class GerritSourceContext extends \Google\Protobuf\Internal\Message -{ - /** - * The URI of a running Gerrit instance. - * - * Generated from protobuf field string host_uri = 1; - */ - protected $host_uri = ''; - /** - * The full project name within the host. Projects may be nested, so - * "project/subproject" is a valid project name. The "repo name" is the - * hostURI/project. - * - * Generated from protobuf field string gerrit_project = 2; - */ - protected $gerrit_project = ''; - protected $revision; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $host_uri - * The URI of a running Gerrit instance. - * @type string $gerrit_project - * The full project name within the host. Projects may be nested, so - * "project/subproject" is a valid project name. The "repo name" is the - * hostURI/project. - * @type string $revision_id - * A revision (commit) ID. - * @type \Grafeas\V1\AliasContext $alias_context - * An alias, which may be a branch or tag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * The URI of a running Gerrit instance. - * - * Generated from protobuf field string host_uri = 1; - * @return string - */ - public function getHostUri() - { - return $this->host_uri; - } - - /** - * The URI of a running Gerrit instance. - * - * Generated from protobuf field string host_uri = 1; - * @param string $var - * @return $this - */ - public function setHostUri($var) - { - GPBUtil::checkString($var, True); - $this->host_uri = $var; - - return $this; - } - - /** - * The full project name within the host. Projects may be nested, so - * "project/subproject" is a valid project name. The "repo name" is the - * hostURI/project. - * - * Generated from protobuf field string gerrit_project = 2; - * @return string - */ - public function getGerritProject() - { - return $this->gerrit_project; - } - - /** - * The full project name within the host. Projects may be nested, so - * "project/subproject" is a valid project name. The "repo name" is the - * hostURI/project. - * - * Generated from protobuf field string gerrit_project = 2; - * @param string $var - * @return $this - */ - public function setGerritProject($var) - { - GPBUtil::checkString($var, True); - $this->gerrit_project = $var; - - return $this; - } - - /** - * A revision (commit) ID. - * - * Generated from protobuf field string revision_id = 3; - * @return string - */ - public function getRevisionId() - { - return $this->readOneof(3); - } - - public function hasRevisionId() - { - return $this->hasOneof(3); - } - - /** - * A revision (commit) ID. - * - * Generated from protobuf field string revision_id = 3; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * An alias, which may be a branch or tag. - * - * Generated from protobuf field .grafeas.v1.AliasContext alias_context = 4; - * @return \Grafeas\V1\AliasContext|null - */ - public function getAliasContext() - { - return $this->readOneof(4); - } - - public function hasAliasContext() - { - return $this->hasOneof(4); - } - - /** - * An alias, which may be a branch or tag. - * - * Generated from protobuf field .grafeas.v1.AliasContext alias_context = 4; - * @param \Grafeas\V1\AliasContext $var - * @return $this - */ - public function setAliasContext($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\AliasContext::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getRevision() - { - return $this->whichOneof("revision"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetNoteRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetNoteRequest.php deleted file mode 100644 index 1f34634c9e3a..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetNoteRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -grafeas.v1.GetNoteRequest - */ -class GetNoteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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 - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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; - } - - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceNoteRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceNoteRequest.php deleted file mode 100644 index 16072c0db579..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceNoteRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -grafeas.v1.GetOccurrenceNoteRequest - */ -class GetOccurrenceNoteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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 - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceRequest.php deleted file mode 100644 index 44e659ea0b83..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GetOccurrenceRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -grafeas.v1.GetOccurrenceRequest - */ -class GetOccurrenceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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 - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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/Grafeas/v1/proto/src/Grafeas/V1/GitSourceContext.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GitSourceContext.php deleted file mode 100644 index 6eb31ad84fe2..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GitSourceContext.php +++ /dev/null @@ -1,102 +0,0 @@ -grafeas.v1.GitSourceContext - */ -class GitSourceContext extends \Google\Protobuf\Internal\Message -{ - /** - * Git repository URL. - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - /** - * Git commit hash. - * - * Generated from protobuf field string revision_id = 2; - */ - protected $revision_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * Git repository URL. - * @type string $revision_id - * Git commit hash. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * Git repository URL. - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Git repository URL. - * - * 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; - } - - /** - * Git commit hash. - * - * Generated from protobuf field string revision_id = 2; - * @return string - */ - public function getRevisionId() - { - return $this->revision_id; - } - - /** - * Git commit hash. - * - * Generated from protobuf field string revision_id = 2; - * @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/Grafeas/v1/proto/src/Grafeas/V1/GrafeasGrpcClient.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GrafeasGrpcClient.php deleted file mode 100644 index 5c3784661a8b..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/GrafeasGrpcClient.php +++ /dev/null @@ -1,263 +0,0 @@ -_simpleRequest('/grafeas.v1.Grafeas/GetOccurrence', - $argument, - ['\Grafeas\V1\Occurrence', 'decode'], - $metadata, $options); - } - - /** - * Lists occurrences for the specified project. - * @param \Grafeas\V1\ListOccurrencesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListOccurrences(\Grafeas\V1\ListOccurrencesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/grafeas.v1.Grafeas/ListOccurrences', - $argument, - ['\Grafeas\V1\ListOccurrencesResponse', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified occurrence. For example, use this method to delete an - * occurrence when the occurrence is no longer applicable for the given - * resource. - * @param \Grafeas\V1\DeleteOccurrenceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteOccurrence(\Grafeas\V1\DeleteOccurrenceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/grafeas.v1.Grafeas/DeleteOccurrence', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Creates a new occurrence. - * @param \Grafeas\V1\CreateOccurrenceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateOccurrence(\Grafeas\V1\CreateOccurrenceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/grafeas.v1.Grafeas/CreateOccurrence', - $argument, - ['\Grafeas\V1\Occurrence', 'decode'], - $metadata, $options); - } - - /** - * Creates new occurrences in batch. - * @param \Grafeas\V1\BatchCreateOccurrencesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchCreateOccurrences(\Grafeas\V1\BatchCreateOccurrencesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/grafeas.v1.Grafeas/BatchCreateOccurrences', - $argument, - ['\Grafeas\V1\BatchCreateOccurrencesResponse', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified occurrence. - * @param \Grafeas\V1\UpdateOccurrenceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateOccurrence(\Grafeas\V1\UpdateOccurrenceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/grafeas.v1.Grafeas/UpdateOccurrence', - $argument, - ['\Grafeas\V1\Occurrence', 'decode'], - $metadata, $options); - } - - /** - * Gets the note attached to the specified occurrence. Consumer projects can - * use this method to get a note that belongs to a provider project. - * @param \Grafeas\V1\GetOccurrenceNoteRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetOccurrenceNote(\Grafeas\V1\GetOccurrenceNoteRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/grafeas.v1.Grafeas/GetOccurrenceNote', - $argument, - ['\Grafeas\V1\Note', 'decode'], - $metadata, $options); - } - - /** - * Gets the specified note. - * @param \Grafeas\V1\GetNoteRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetNote(\Grafeas\V1\GetNoteRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/grafeas.v1.Grafeas/GetNote', - $argument, - ['\Grafeas\V1\Note', 'decode'], - $metadata, $options); - } - - /** - * Lists notes for the specified project. - * @param \Grafeas\V1\ListNotesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListNotes(\Grafeas\V1\ListNotesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/grafeas.v1.Grafeas/ListNotes', - $argument, - ['\Grafeas\V1\ListNotesResponse', 'decode'], - $metadata, $options); - } - - /** - * Deletes the specified note. - * @param \Grafeas\V1\DeleteNoteRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteNote(\Grafeas\V1\DeleteNoteRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/grafeas.v1.Grafeas/DeleteNote', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Creates a new note. - * @param \Grafeas\V1\CreateNoteRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateNote(\Grafeas\V1\CreateNoteRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/grafeas.v1.Grafeas/CreateNote', - $argument, - ['\Grafeas\V1\Note', 'decode'], - $metadata, $options); - } - - /** - * Creates new notes in batch. - * @param \Grafeas\V1\BatchCreateNotesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BatchCreateNotes(\Grafeas\V1\BatchCreateNotesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/grafeas.v1.Grafeas/BatchCreateNotes', - $argument, - ['\Grafeas\V1\BatchCreateNotesResponse', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified note. - * @param \Grafeas\V1\UpdateNoteRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateNote(\Grafeas\V1\UpdateNoteRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/grafeas.v1.Grafeas/UpdateNote', - $argument, - ['\Grafeas\V1\Note', 'decode'], - $metadata, $options); - } - - /** - * Lists occurrences referencing the specified note. Provider projects can use - * this method to get all occurrences across consumer projects referencing the - * specified note. - * @param \Grafeas\V1\ListNoteOccurrencesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListNoteOccurrences(\Grafeas\V1\ListNoteOccurrencesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/grafeas.v1.Grafeas/ListNoteOccurrences', - $argument, - ['\Grafeas\V1\ListNoteOccurrencesResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Hash.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Hash.php deleted file mode 100644 index a6f6d1b8ae02..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Hash.php +++ /dev/null @@ -1,101 +0,0 @@ -grafeas.v1.Hash - */ -class Hash extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The type of hash that was performed, e.g. "SHA-256". - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * Required. The hash value. - * - * Generated from protobuf field bytes value = 2; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * Required. The type of hash that was performed, e.g. "SHA-256". - * @type string $value - * Required. The hash value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * Required. The type of hash that was performed, e.g. "SHA-256". - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of hash that was performed, e.g. "SHA-256". - * - * 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; - } - - /** - * Required. The hash value. - * - * Generated from protobuf field bytes value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Required. The hash value. - * - * Generated from protobuf field bytes value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, False); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageNote.php deleted file mode 100644 index 661c99087167..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageNote.php +++ /dev/null @@ -1,119 +0,0 @@ - - * Or an equivalent reference, e.g., a tag of the resource_url. - * - * Generated from protobuf message grafeas.v1.ImageNote - */ -class ImageNote extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Immutable. The resource_url for the resource representing the - * basis of associated occurrence images. - * - * Generated from protobuf field string resource_url = 1; - */ - protected $resource_url = ''; - /** - * Required. Immutable. The fingerprint of the base image. - * - * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 2; - */ - protected $fingerprint = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_url - * Required. Immutable. The resource_url for the resource representing the - * basis of associated occurrence images. - * @type \Grafeas\V1\Fingerprint $fingerprint - * Required. Immutable. The fingerprint of the base image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Image::initOnce(); - parent::__construct($data); - } - - /** - * Required. Immutable. The resource_url for the resource representing the - * basis of associated occurrence images. - * - * Generated from protobuf field string resource_url = 1; - * @return string - */ - public function getResourceUrl() - { - return $this->resource_url; - } - - /** - * Required. Immutable. The resource_url for the resource representing the - * basis of associated occurrence images. - * - * Generated from protobuf field string resource_url = 1; - * @param string $var - * @return $this - */ - public function setResourceUrl($var) - { - GPBUtil::checkString($var, True); - $this->resource_url = $var; - - return $this; - } - - /** - * Required. Immutable. The fingerprint of the base image. - * - * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 2; - * @return \Grafeas\V1\Fingerprint|null - */ - public function getFingerprint() - { - return $this->fingerprint; - } - - public function hasFingerprint() - { - return isset($this->fingerprint); - } - - public function clearFingerprint() - { - unset($this->fingerprint); - } - - /** - * Required. Immutable. The fingerprint of the base image. - * - * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 2; - * @param \Grafeas\V1\Fingerprint $var - * @return $this - */ - public function setFingerprint($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Fingerprint::class); - $this->fingerprint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageOccurrence.php deleted file mode 100644 index e6c64fc037e3..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ImageOccurrence.php +++ /dev/null @@ -1,197 +0,0 @@ -. - * - * Generated from protobuf message grafeas.v1.ImageOccurrence - */ -class ImageOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fingerprint of the derived image. - * - * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 1; - */ - protected $fingerprint = null; - /** - * Output only. The number of layers by which this image differs from the - * associated image basis. - * - * Generated from protobuf field int32 distance = 2; - */ - protected $distance = 0; - /** - * This contains layer-specific metadata, if populated it has length - * "distance" and is ordered with [distance] being the layer immediately - * following the base image and [1] being the final layer. - * - * Generated from protobuf field repeated .grafeas.v1.Layer layer_info = 3; - */ - private $layer_info; - /** - * Output only. This contains the base image URL for the derived image - * occurrence. - * - * Generated from protobuf field string base_resource_url = 4; - */ - protected $base_resource_url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\Fingerprint $fingerprint - * Required. The fingerprint of the derived image. - * @type int $distance - * Output only. The number of layers by which this image differs from the - * associated image basis. - * @type array<\Grafeas\V1\Layer>|\Google\Protobuf\Internal\RepeatedField $layer_info - * This contains layer-specific metadata, if populated it has length - * "distance" and is ordered with [distance] being the layer immediately - * following the base image and [1] being the final layer. - * @type string $base_resource_url - * Output only. This contains the base image URL for the derived image - * occurrence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Image::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fingerprint of the derived image. - * - * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 1; - * @return \Grafeas\V1\Fingerprint|null - */ - public function getFingerprint() - { - return $this->fingerprint; - } - - public function hasFingerprint() - { - return isset($this->fingerprint); - } - - public function clearFingerprint() - { - unset($this->fingerprint); - } - - /** - * Required. The fingerprint of the derived image. - * - * Generated from protobuf field .grafeas.v1.Fingerprint fingerprint = 1; - * @param \Grafeas\V1\Fingerprint $var - * @return $this - */ - public function setFingerprint($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Fingerprint::class); - $this->fingerprint = $var; - - return $this; - } - - /** - * Output only. The number of layers by which this image differs from the - * associated image basis. - * - * Generated from protobuf field int32 distance = 2; - * @return int - */ - public function getDistance() - { - return $this->distance; - } - - /** - * Output only. The number of layers by which this image differs from the - * associated image basis. - * - * Generated from protobuf field int32 distance = 2; - * @param int $var - * @return $this - */ - public function setDistance($var) - { - GPBUtil::checkInt32($var); - $this->distance = $var; - - return $this; - } - - /** - * This contains layer-specific metadata, if populated it has length - * "distance" and is ordered with [distance] being the layer immediately - * following the base image and [1] being the final layer. - * - * Generated from protobuf field repeated .grafeas.v1.Layer layer_info = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLayerInfo() - { - return $this->layer_info; - } - - /** - * This contains layer-specific metadata, if populated it has length - * "distance" and is ordered with [distance] being the layer immediately - * following the base image and [1] being the final layer. - * - * Generated from protobuf field repeated .grafeas.v1.Layer layer_info = 3; - * @param array<\Grafeas\V1\Layer>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLayerInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Layer::class); - $this->layer_info = $arr; - - return $this; - } - - /** - * Output only. This contains the base image URL for the derived image - * occurrence. - * - * Generated from protobuf field string base_resource_url = 4; - * @return string - */ - public function getBaseResourceUrl() - { - return $this->base_resource_url; - } - - /** - * Output only. This contains the base image URL for the derived image - * occurrence. - * - * Generated from protobuf field string base_resource_url = 4; - * @param string $var - * @return $this - */ - public function setBaseResourceUrl($var) - { - GPBUtil::checkString($var, True); - $this->base_resource_url = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoProvenance.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoProvenance.php deleted file mode 100644 index 74cc83a629ce..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoProvenance.php +++ /dev/null @@ -1,214 +0,0 @@ -grafeas.v1.InTotoProvenance - */ -class InTotoProvenance extends \Google\Protobuf\Internal\Message -{ - /** - * required - * - * Generated from protobuf field .grafeas.v1.BuilderConfig builder_config = 1; - */ - protected $builder_config = null; - /** - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * - * Generated from protobuf field .grafeas.v1.Recipe recipe = 2; - */ - protected $recipe = null; - /** - * Generated from protobuf field .grafeas.v1.Metadata metadata = 3; - */ - protected $metadata = null; - /** - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * - * Generated from protobuf field repeated string materials = 4; - */ - private $materials; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\BuilderConfig $builder_config - * required - * @type \Grafeas\V1\Recipe $recipe - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * @type \Grafeas\V1\Metadata $metadata - * @type array|\Google\Protobuf\Internal\RepeatedField $materials - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoProvenance::initOnce(); - parent::__construct($data); - } - - /** - * required - * - * Generated from protobuf field .grafeas.v1.BuilderConfig builder_config = 1; - * @return \Grafeas\V1\BuilderConfig|null - */ - public function getBuilderConfig() - { - return $this->builder_config; - } - - public function hasBuilderConfig() - { - return isset($this->builder_config); - } - - public function clearBuilderConfig() - { - unset($this->builder_config); - } - - /** - * required - * - * Generated from protobuf field .grafeas.v1.BuilderConfig builder_config = 1; - * @param \Grafeas\V1\BuilderConfig $var - * @return $this - */ - public function setBuilderConfig($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\BuilderConfig::class); - $this->builder_config = $var; - - return $this; - } - - /** - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * - * Generated from protobuf field .grafeas.v1.Recipe recipe = 2; - * @return \Grafeas\V1\Recipe|null - */ - public function getRecipe() - { - return $this->recipe; - } - - public function hasRecipe() - { - return isset($this->recipe); - } - - public function clearRecipe() - { - unset($this->recipe); - } - - /** - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * - * Generated from protobuf field .grafeas.v1.Recipe recipe = 2; - * @param \Grafeas\V1\Recipe $var - * @return $this - */ - public function setRecipe($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Recipe::class); - $this->recipe = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.Metadata metadata = 3; - * @return \Grafeas\V1\Metadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Generated from protobuf field .grafeas.v1.Metadata metadata = 3; - * @param \Grafeas\V1\Metadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Metadata::class); - $this->metadata = $var; - - return $this; - } - - /** - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * - * Generated from protobuf field repeated string materials = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMaterials() - { - return $this->materials; - } - - /** - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * - * Generated from protobuf field repeated string materials = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMaterials($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->materials = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoStatement.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoStatement.php deleted file mode 100644 index 93a86b0dd503..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/InTotoStatement.php +++ /dev/null @@ -1,224 +0,0 @@ -grafeas.v1.InTotoStatement - */ -class InTotoStatement extends \Google\Protobuf\Internal\Message -{ - /** - * Always `https://in-toto.io/Statement/v0.1`. - * - * Generated from protobuf field string type = 1 [json_name = "_type"]; - */ - protected $type = ''; - /** - * Generated from protobuf field repeated .grafeas.v1.Subject subject = 2; - */ - private $subject; - /** - * `https://slsa.dev/provenance/v0.1` for SlsaProvenance. - * - * Generated from protobuf field string predicate_type = 3; - */ - protected $predicate_type = ''; - protected $predicate; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * Always `https://in-toto.io/Statement/v0.1`. - * @type array<\Grafeas\V1\Subject>|\Google\Protobuf\Internal\RepeatedField $subject - * @type string $predicate_type - * `https://slsa.dev/provenance/v0.1` for SlsaProvenance. - * @type \Grafeas\V1\InTotoProvenance $provenance - * @type \Grafeas\V1\SlsaProvenance $slsa_provenance - * @type \Grafeas\V1\SlsaProvenanceZeroTwo $slsa_provenance_zero_two - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoStatement::initOnce(); - parent::__construct($data); - } - - /** - * Always `https://in-toto.io/Statement/v0.1`. - * - * Generated from protobuf field string type = 1 [json_name = "_type"]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Always `https://in-toto.io/Statement/v0.1`. - * - * Generated from protobuf field string type = 1 [json_name = "_type"]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.Subject subject = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.Subject subject = 2; - * @param array<\Grafeas\V1\Subject>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubject($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Subject::class); - $this->subject = $arr; - - return $this; - } - - /** - * `https://slsa.dev/provenance/v0.1` for SlsaProvenance. - * - * Generated from protobuf field string predicate_type = 3; - * @return string - */ - public function getPredicateType() - { - return $this->predicate_type; - } - - /** - * `https://slsa.dev/provenance/v0.1` for SlsaProvenance. - * - * Generated from protobuf field string predicate_type = 3; - * @param string $var - * @return $this - */ - public function setPredicateType($var) - { - GPBUtil::checkString($var, True); - $this->predicate_type = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoProvenance provenance = 4; - * @return \Grafeas\V1\InTotoProvenance|null - */ - public function getProvenance() - { - return $this->readOneof(4); - } - - public function hasProvenance() - { - return $this->hasOneof(4); - } - - /** - * Generated from protobuf field .grafeas.v1.InTotoProvenance provenance = 4; - * @param \Grafeas\V1\InTotoProvenance $var - * @return $this - */ - public function setProvenance($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\InTotoProvenance::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @return \Grafeas\V1\SlsaProvenance|null - */ - public function getSlsaProvenance() - { - return $this->readOneof(5); - } - - public function hasSlsaProvenance() - { - return $this->hasOneof(5); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenance slsa_provenance = 5; - * @param \Grafeas\V1\SlsaProvenance $var - * @return $this - */ - public function setSlsaProvenance($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @return \Grafeas\V1\SlsaProvenanceZeroTwo|null - */ - public function getSlsaProvenanceZeroTwo() - { - return $this->readOneof(6); - } - - public function hasSlsaProvenanceZeroTwo() - { - return $this->hasOneof(6); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo slsa_provenance_zero_two = 6; - * @param \Grafeas\V1\SlsaProvenanceZeroTwo $var - * @return $this - */ - public function setSlsaProvenanceZeroTwo($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getPredicate() - { - return $this->whichOneof("predicate"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Jwt.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Jwt.php deleted file mode 100644 index 3b9e9a5ece42..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Jwt.php +++ /dev/null @@ -1,73 +0,0 @@ -grafeas.v1.Jwt - */ -class Jwt extends \Google\Protobuf\Internal\Message -{ - /** - * The compact encoding of a JWS, which is always three base64 encoded strings - * joined by periods. For details, see: - * https://tools.ietf.org/html/rfc7515.html#section-3.1 - * - * Generated from protobuf field string compact_jwt = 1; - */ - protected $compact_jwt = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $compact_jwt - * The compact encoding of a JWS, which is always three base64 encoded strings - * joined by periods. For details, see: - * https://tools.ietf.org/html/rfc7515.html#section-3.1 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Attestation::initOnce(); - parent::__construct($data); - } - - /** - * The compact encoding of a JWS, which is always three base64 encoded strings - * joined by periods. For details, see: - * https://tools.ietf.org/html/rfc7515.html#section-3.1 - * - * Generated from protobuf field string compact_jwt = 1; - * @return string - */ - public function getCompactJwt() - { - return $this->compact_jwt; - } - - /** - * The compact encoding of a JWS, which is always three base64 encoded strings - * joined by periods. For details, see: - * https://tools.ietf.org/html/rfc7515.html#section-3.1 - * - * Generated from protobuf field string compact_jwt = 1; - * @param string $var - * @return $this - */ - public function setCompactJwt($var) - { - GPBUtil::checkString($var, True); - $this->compact_jwt = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Layer.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Layer.php deleted file mode 100644 index 429ce63f2c3a..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Layer.php +++ /dev/null @@ -1,105 +0,0 @@ -grafeas.v1.Layer - */ -class Layer extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The recovered Dockerfile directive used to construct this layer. - * See https://docs.docker.com/engine/reference/builder/ for more information. - * - * Generated from protobuf field string directive = 1; - */ - protected $directive = ''; - /** - * The recovered arguments to the Dockerfile directive. - * - * Generated from protobuf field string arguments = 2; - */ - protected $arguments = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $directive - * Required. The recovered Dockerfile directive used to construct this layer. - * See https://docs.docker.com/engine/reference/builder/ for more information. - * @type string $arguments - * The recovered arguments to the Dockerfile directive. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Image::initOnce(); - parent::__construct($data); - } - - /** - * Required. The recovered Dockerfile directive used to construct this layer. - * See https://docs.docker.com/engine/reference/builder/ for more information. - * - * Generated from protobuf field string directive = 1; - * @return string - */ - public function getDirective() - { - return $this->directive; - } - - /** - * Required. The recovered Dockerfile directive used to construct this layer. - * See https://docs.docker.com/engine/reference/builder/ for more information. - * - * Generated from protobuf field string directive = 1; - * @param string $var - * @return $this - */ - public function setDirective($var) - { - GPBUtil::checkString($var, True); - $this->directive = $var; - - return $this; - } - - /** - * The recovered arguments to the Dockerfile directive. - * - * Generated from protobuf field string arguments = 2; - * @return string - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * The recovered arguments to the Dockerfile directive. - * - * Generated from protobuf field string arguments = 2; - * @param string $var - * @return $this - */ - public function setArguments($var) - { - GPBUtil::checkString($var, True); - $this->arguments = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/License.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/License.php deleted file mode 100644 index cf2409f0739f..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/License.php +++ /dev/null @@ -1,117 +0,0 @@ -grafeas.v1.License - */ -class License extends \Google\Protobuf\Internal\Message -{ - /** - * Often a single license can be used to represent the licensing terms. - * Sometimes it is necessary to include a choice of one or more licenses - * or some combination of license identifiers. - * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", - * "GPL-2.0-or-later WITH Bison-exception-2.2". - * - * Generated from protobuf field string expression = 1; - */ - protected $expression = ''; - /** - * Comments - * - * Generated from protobuf field string comments = 2; - */ - protected $comments = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $expression - * Often a single license can be used to represent the licensing terms. - * Sometimes it is necessary to include a choice of one or more licenses - * or some combination of license identifiers. - * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", - * "GPL-2.0-or-later WITH Bison-exception-2.2". - * @type string $comments - * Comments - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Often a single license can be used to represent the licensing terms. - * Sometimes it is necessary to include a choice of one or more licenses - * or some combination of license identifiers. - * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", - * "GPL-2.0-or-later WITH Bison-exception-2.2". - * - * Generated from protobuf field string expression = 1; - * @return string - */ - public function getExpression() - { - return $this->expression; - } - - /** - * Often a single license can be used to represent the licensing terms. - * Sometimes it is necessary to include a choice of one or more licenses - * or some combination of license identifiers. - * Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", - * "GPL-2.0-or-later WITH Bison-exception-2.2". - * - * Generated from protobuf field string expression = 1; - * @param string $var - * @return $this - */ - public function setExpression($var) - { - GPBUtil::checkString($var, True); - $this->expression = $var; - - return $this; - } - - /** - * Comments - * - * Generated from protobuf field string comments = 2; - * @return string - */ - public function getComments() - { - return $this->comments; - } - - /** - * Comments - * - * Generated from protobuf field string comments = 2; - * @param string $var - * @return $this - */ - public function setComments($var) - { - GPBUtil::checkString($var, True); - $this->comments = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesRequest.php deleted file mode 100644 index 2a4ff134f9e3..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -grafeas.v1.ListNoteOccurrencesRequest - */ -class ListNoteOccurrencesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the note to list occurrences for in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The filter expression. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Number of occurrences to return in the list. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the note to list occurrences for in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @type string $filter - * The filter expression. - * @type int $page_size - * Number of occurrences to return in the list. - * @type string $page_token - * Token to provide to skip to a particular spot in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the note to list occurrences for in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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; - } - - /** - * The name of the note to list occurrences for in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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; - } - - /** - * The filter expression. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter expression. - * - * 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; - } - - /** - * Number of occurrences to return in the list. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Number of occurrences to return in the list. - * - * 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; - } - - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Token to provide to skip to a particular spot in the list. - * - * 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/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesResponse.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesResponse.php deleted file mode 100644 index d76a8a59df99..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNoteOccurrencesResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -grafeas.v1.ListNoteOccurrencesResponse - */ -class ListNoteOccurrencesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The occurrences attached to the specified note. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - */ - private $occurrences; - /** - * Token to provide to skip to a particular spot in the list. - * - * 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<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $occurrences - * The occurrences attached to the specified note. - * @type string $next_page_token - * Token to provide to skip to a particular spot in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The occurrences attached to the specified note. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOccurrences() - { - return $this->occurrences; - } - - /** - * The occurrences attached to the specified note. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - * @param array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOccurrences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Occurrence::class); - $this->occurrences = $arr; - - return $this; - } - - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to provide to skip to a particular spot 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; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesRequest.php deleted file mode 100644 index 79a612271451..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesRequest.php +++ /dev/null @@ -1,177 +0,0 @@ -grafeas.v1.ListNotesRequest - */ -class ListNotesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the project to list notes for in the form of - * `projects/[PROJECT_ID]`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The filter expression. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Number of notes to return in the list. Must be positive. Max allowed page - * size is 1000. If not specified, page size defaults to 20. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the project to list notes for in the form of - * `projects/[PROJECT_ID]`. - * @type string $filter - * The filter expression. - * @type int $page_size - * Number of notes to return in the list. Must be positive. Max allowed page - * size is 1000. If not specified, page size defaults to 20. - * @type string $page_token - * Token to provide to skip to a particular spot in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the project to list notes for in the form of - * `projects/[PROJECT_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; - } - - /** - * The name of the project to list notes for in the form of - * `projects/[PROJECT_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 filter expression. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter expression. - * - * 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; - } - - /** - * Number of notes to return in the list. Must be positive. Max allowed page - * size is 1000. If not specified, page size defaults to 20. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Number of notes to return in the list. Must be positive. Max allowed page - * size is 1000. If not specified, page size defaults to 20. - * - * 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; - } - - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Token to provide to skip to a particular spot in the list. - * - * 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/Grafeas/v1/proto/src/Grafeas/V1/ListNotesResponse.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesResponse.php deleted file mode 100644 index 22c8bc22a257..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListNotesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -grafeas.v1.ListNotesResponse - */ -class ListNotesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The notes requested. - * - * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; - */ - private $notes; - /** - * 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 - * 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<\Grafeas\V1\Note>|\Google\Protobuf\Internal\RepeatedField $notes - * The notes requested. - * @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 - * results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The notes requested. - * - * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNotes() - { - return $this->notes; - } - - /** - * The notes requested. - * - * Generated from protobuf field repeated .grafeas.v1.Note notes = 1; - * @param array<\Grafeas\V1\Note>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNotes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Note::class); - $this->notes = $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 - * results. - * - * 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 - * 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/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesRequest.php deleted file mode 100644 index e6fb40837630..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesRequest.php +++ /dev/null @@ -1,177 +0,0 @@ -grafeas.v1.ListOccurrencesRequest - */ -class ListOccurrencesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the project to list occurrences for in the form of - * `projects/[PROJECT_ID]`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The filter expression. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Number of occurrences to return in the list. Must be positive. Max allowed - * page size is 1000. If not specified, page size defaults to 20. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the project to list occurrences for in the form of - * `projects/[PROJECT_ID]`. - * @type string $filter - * The filter expression. - * @type int $page_size - * Number of occurrences to return in the list. Must be positive. Max allowed - * page size is 1000. If not specified, page size defaults to 20. - * @type string $page_token - * Token to provide to skip to a particular spot in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the project to list occurrences for in the form of - * `projects/[PROJECT_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; - } - - /** - * The name of the project to list occurrences for in the form of - * `projects/[PROJECT_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 filter expression. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter expression. - * - * 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; - } - - /** - * Number of occurrences to return in the list. Must be positive. Max allowed - * page size is 1000. If not specified, page size defaults to 20. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Number of occurrences to return in the list. Must be positive. Max allowed - * page size is 1000. If not specified, page size defaults to 20. - * - * 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; - } - - /** - * Token to provide to skip to a particular spot in the list. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Token to provide to skip to a particular spot in the list. - * - * 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/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesResponse.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesResponse.php deleted file mode 100644 index c698cc7476a2..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ListOccurrencesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -grafeas.v1.ListOccurrencesResponse - */ -class ListOccurrencesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The occurrences requested. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - */ - private $occurrences; - /** - * 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 - * 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<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $occurrences - * The occurrences requested. - * @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 - * results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The occurrences requested. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOccurrences() - { - return $this->occurrences; - } - - /** - * The occurrences requested. - * - * Generated from protobuf field repeated .grafeas.v1.Occurrence occurrences = 1; - * @param array<\Grafeas\V1\Occurrence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOccurrences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Occurrence::class); - $this->occurrences = $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 - * results. - * - * 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 - * 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/Grafeas/v1/proto/src/Grafeas/V1/Location.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Location.php deleted file mode 100644 index b8381eca4d41..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Location.php +++ /dev/null @@ -1,154 +0,0 @@ -grafeas.v1.Location - */ -class Location extends \Google\Protobuf\Internal\Message -{ - /** - * Deprecated. - * The CPE URI in [CPE format](https://cpe.mitre.org/specification/) - * - * Generated from protobuf field string cpe_uri = 1; - */ - protected $cpe_uri = ''; - /** - * Deprecated. - * The version installed at this location. - * - * Generated from protobuf field .grafeas.v1.Version version = 2; - */ - protected $version = null; - /** - * The path from which we gathered that this package/version is installed. - * - * Generated from protobuf field string path = 3; - */ - protected $path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cpe_uri - * Deprecated. - * The CPE URI in [CPE format](https://cpe.mitre.org/specification/) - * @type \Grafeas\V1\Version $version - * Deprecated. - * The version installed at this location. - * @type string $path - * The path from which we gathered that this package/version is installed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Package::initOnce(); - parent::__construct($data); - } - - /** - * Deprecated. - * The CPE URI in [CPE format](https://cpe.mitre.org/specification/) - * - * Generated from protobuf field string cpe_uri = 1; - * @return string - */ - public function getCpeUri() - { - return $this->cpe_uri; - } - - /** - * Deprecated. - * The CPE URI in [CPE format](https://cpe.mitre.org/specification/) - * - * Generated from protobuf field string cpe_uri = 1; - * @param string $var - * @return $this - */ - public function setCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->cpe_uri = $var; - - return $this; - } - - /** - * Deprecated. - * The version installed at this location. - * - * Generated from protobuf field .grafeas.v1.Version version = 2; - * @return \Grafeas\V1\Version|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * Deprecated. - * The version installed at this location. - * - * Generated from protobuf field .grafeas.v1.Version version = 2; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->version = $var; - - return $this; - } - - /** - * The path from which we gathered that this package/version is installed. - * - * Generated from protobuf field string path = 3; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * The path from which we gathered that this package/version is installed. - * - * Generated from protobuf field string path = 3; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Metadata.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Metadata.php deleted file mode 100644 index 496b347e8c53..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Metadata.php +++ /dev/null @@ -1,249 +0,0 @@ -grafeas.v1.Metadata - */ -class Metadata extends \Google\Protobuf\Internal\Message -{ - /** - * Identifies the particular build invocation, which can be useful for finding - * associated logs or other ad-hoc analysis. The value SHOULD be globally - * unique, per in-toto Provenance spec. - * - * Generated from protobuf field string build_invocation_id = 1; - */ - protected $build_invocation_id = ''; - /** - * The timestamp of when the build started. - * - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - */ - protected $build_started_on = null; - /** - * The timestamp of when the build completed. - * - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - */ - protected $build_finished_on = null; - /** - * Indicates that the builder claims certain fields in this message to be - * complete. - * - * Generated from protobuf field .grafeas.v1.Completeness completeness = 4; - */ - protected $completeness = null; - /** - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * - * Generated from protobuf field bool reproducible = 5; - */ - protected $reproducible = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $build_invocation_id - * Identifies the particular build invocation, which can be useful for finding - * associated logs or other ad-hoc analysis. The value SHOULD be globally - * unique, per in-toto Provenance spec. - * @type \Google\Protobuf\Timestamp $build_started_on - * The timestamp of when the build started. - * @type \Google\Protobuf\Timestamp $build_finished_on - * The timestamp of when the build completed. - * @type \Grafeas\V1\Completeness $completeness - * Indicates that the builder claims certain fields in this message to be - * complete. - * @type bool $reproducible - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoProvenance::initOnce(); - parent::__construct($data); - } - - /** - * Identifies the particular build invocation, which can be useful for finding - * associated logs or other ad-hoc analysis. The value SHOULD be globally - * unique, per in-toto Provenance spec. - * - * Generated from protobuf field string build_invocation_id = 1; - * @return string - */ - public function getBuildInvocationId() - { - return $this->build_invocation_id; - } - - /** - * Identifies the particular build invocation, which can be useful for finding - * associated logs or other ad-hoc analysis. The value SHOULD be globally - * unique, per in-toto Provenance spec. - * - * Generated from protobuf field string build_invocation_id = 1; - * @param string $var - * @return $this - */ - public function setBuildInvocationId($var) - { - GPBUtil::checkString($var, True); - $this->build_invocation_id = $var; - - return $this; - } - - /** - * The timestamp of when the build started. - * - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getBuildStartedOn() - { - return $this->build_started_on; - } - - public function hasBuildStartedOn() - { - return isset($this->build_started_on); - } - - public function clearBuildStartedOn() - { - unset($this->build_started_on); - } - - /** - * The timestamp of when the build started. - * - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setBuildStartedOn($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->build_started_on = $var; - - return $this; - } - - /** - * The timestamp of when the build completed. - * - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getBuildFinishedOn() - { - return $this->build_finished_on; - } - - public function hasBuildFinishedOn() - { - return isset($this->build_finished_on); - } - - public function clearBuildFinishedOn() - { - unset($this->build_finished_on); - } - - /** - * The timestamp of when the build completed. - * - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setBuildFinishedOn($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->build_finished_on = $var; - - return $this; - } - - /** - * Indicates that the builder claims certain fields in this message to be - * complete. - * - * Generated from protobuf field .grafeas.v1.Completeness completeness = 4; - * @return \Grafeas\V1\Completeness|null - */ - public function getCompleteness() - { - return $this->completeness; - } - - public function hasCompleteness() - { - return isset($this->completeness); - } - - public function clearCompleteness() - { - unset($this->completeness); - } - - /** - * Indicates that the builder claims certain fields in this message to be - * complete. - * - * Generated from protobuf field .grafeas.v1.Completeness completeness = 4; - * @param \Grafeas\V1\Completeness $var - * @return $this - */ - public function setCompleteness($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Completeness::class); - $this->completeness = $var; - - return $this; - } - - /** - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * - * Generated from protobuf field bool reproducible = 5; - * @return bool - */ - public function getReproducible() - { - return $this->reproducible; - } - - /** - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * - * Generated from protobuf field bool reproducible = 5; - * @param bool $var - * @return $this - */ - public function setReproducible($var) - { - GPBUtil::checkBool($var); - $this->reproducible = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NonCompliantFile.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NonCompliantFile.php deleted file mode 100644 index db2f7ae1e2f2..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NonCompliantFile.php +++ /dev/null @@ -1,135 +0,0 @@ -grafeas.v1.NonCompliantFile - */ -class NonCompliantFile extends \Google\Protobuf\Internal\Message -{ - /** - * Empty if `display_command` is set. - * - * Generated from protobuf field string path = 1; - */ - protected $path = ''; - /** - * Command to display the non-compliant files. - * - * Generated from protobuf field string display_command = 2; - */ - protected $display_command = ''; - /** - * Explains why a file is non compliant for a CIS check. - * - * Generated from protobuf field string reason = 3; - */ - protected $reason = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * Empty if `display_command` is set. - * @type string $display_command - * Command to display the non-compliant files. - * @type string $reason - * Explains why a file is non compliant for a CIS check. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Compliance::initOnce(); - parent::__construct($data); - } - - /** - * Empty if `display_command` is set. - * - * Generated from protobuf field string path = 1; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Empty if `display_command` is set. - * - * Generated from protobuf field string path = 1; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Command to display the non-compliant files. - * - * Generated from protobuf field string display_command = 2; - * @return string - */ - public function getDisplayCommand() - { - return $this->display_command; - } - - /** - * Command to display the non-compliant files. - * - * Generated from protobuf field string display_command = 2; - * @param string $var - * @return $this - */ - public function setDisplayCommand($var) - { - GPBUtil::checkString($var, True); - $this->display_command = $var; - - return $this; - } - - /** - * Explains why a file is non compliant for a CIS check. - * - * Generated from protobuf field string reason = 3; - * @return string - */ - public function getReason() - { - return $this->reason; - } - - /** - * Explains why a file is non compliant for a CIS check. - * - * Generated from protobuf field string reason = 3; - * @param string $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkString($var, True); - $this->reason = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Note.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Note.php deleted file mode 100644 index b59a6bf10feb..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Note.php +++ /dev/null @@ -1,724 +0,0 @@ -grafeas.v1.Note - */ -class Note extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * A one sentence description of this note. - * - * Generated from protobuf field string short_description = 2; - */ - protected $short_description = ''; - /** - * A detailed description of this note. - * - * Generated from protobuf field string long_description = 3; - */ - protected $long_description = ''; - /** - * Output only. The type of analysis. This field can be used as a filter in - * list requests. - * - * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; - */ - protected $kind = 0; - /** - * URLs associated with this note. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_url = 5; - */ - private $related_url; - /** - * Time of expiration for this note. Empty if note does not expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; - */ - protected $expiration_time = null; - /** - * Output only. The time this note was created. This field can be used as a - * filter in list requests. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; - */ - protected $create_time = null; - /** - * Output only. The time this note was last updated. This field can be used as - * a filter in list requests. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8; - */ - protected $update_time = null; - /** - * Other notes related to this note. - * - * Generated from protobuf field repeated string related_note_names = 9; - */ - private $related_note_names; - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @type string $short_description - * A one sentence description of this note. - * @type string $long_description - * A detailed description of this note. - * @type int $kind - * Output only. The type of analysis. This field can be used as a filter in - * list requests. - * @type array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $related_url - * URLs associated with this note. - * @type \Google\Protobuf\Timestamp $expiration_time - * Time of expiration for this note. Empty if note does not expire. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time this note was created. This field can be used as a - * filter in list requests. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time this note was last updated. This field can be used as - * a filter in list requests. - * @type array|\Google\Protobuf\Internal\RepeatedField $related_note_names - * Other notes related to this note. - * @type \Grafeas\V1\VulnerabilityNote $vulnerability - * A note describing a package vulnerability. - * @type \Grafeas\V1\BuildNote $build - * A note describing build provenance for a verifiable build. - * @type \Grafeas\V1\ImageNote $image - * A note describing a base image. - * @type \Grafeas\V1\PackageNote $package - * A note describing a package hosted by various package managers. - * @type \Grafeas\V1\DeploymentNote $deployment - * A note describing something that can be deployed. - * @type \Grafeas\V1\DiscoveryNote $discovery - * A note describing the initial analysis of a resource. - * @type \Grafeas\V1\AttestationNote $attestation - * A note describing an attestation role. - * @type \Grafeas\V1\UpgradeNote $upgrade - * A note describing available package upgrades. - * @type \Grafeas\V1\ComplianceNote $compliance - * A note describing a compliance check. - * @type \Grafeas\V1\DSSEAttestationNote $dsse_attestation - * A note describing a dsse attestation note. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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; - } - - /** - * A one sentence description of this note. - * - * Generated from protobuf field string short_description = 2; - * @return string - */ - public function getShortDescription() - { - return $this->short_description; - } - - /** - * A one sentence description of this note. - * - * Generated from protobuf field string short_description = 2; - * @param string $var - * @return $this - */ - public function setShortDescription($var) - { - GPBUtil::checkString($var, True); - $this->short_description = $var; - - return $this; - } - - /** - * A detailed description of this note. - * - * Generated from protobuf field string long_description = 3; - * @return string - */ - public function getLongDescription() - { - return $this->long_description; - } - - /** - * A detailed description of this note. - * - * Generated from protobuf field string long_description = 3; - * @param string $var - * @return $this - */ - public function setLongDescription($var) - { - GPBUtil::checkString($var, True); - $this->long_description = $var; - - return $this; - } - - /** - * Output only. The type of analysis. This field can be used as a filter in - * list requests. - * - * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; - * @return int - */ - public function getKind() - { - return $this->kind; - } - - /** - * Output only. The type of analysis. This field can be used as a filter in - * list requests. - * - * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; - * @param int $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\NoteKind::class); - $this->kind = $var; - - return $this; - } - - /** - * URLs associated with this note. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_url = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelatedUrl() - { - return $this->related_url; - } - - /** - * URLs associated with this note. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_url = 5; - * @param array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelatedUrl($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\RelatedUrl::class); - $this->related_url = $arr; - - return $this; - } - - /** - * Time of expiration for this note. Empty if note does not expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpirationTime() - { - return $this->expiration_time; - } - - public function hasExpirationTime() - { - return isset($this->expiration_time); - } - - public function clearExpirationTime() - { - unset($this->expiration_time); - } - - /** - * Time of expiration for this note. Empty if note does not expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpirationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expiration_time = $var; - - return $this; - } - - /** - * Output only. The time this note was created. This field can be used as a - * filter in list requests. - * - * 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); - } - - /** - * Output only. The time this note was created. This field can be used as a - * filter in list requests. - * - * 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; - } - - /** - * Output only. The time this note was last updated. This field can be used as - * a filter in list requests. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8; - * @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 this note was last updated. This field can be used as - * a filter in list requests. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Other notes related to this note. - * - * Generated from protobuf field repeated string related_note_names = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelatedNoteNames() - { - return $this->related_note_names; - } - - /** - * Other notes related to this note. - * - * Generated from protobuf field repeated string related_note_names = 9; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelatedNoteNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->related_note_names = $arr; - - return $this; - } - - /** - * A note describing a package vulnerability. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @return \Grafeas\V1\VulnerabilityNote|null - */ - public function getVulnerability() - { - return $this->readOneof(10); - } - - public function hasVulnerability() - { - return $this->hasOneof(10); - } - - /** - * A note describing a package vulnerability. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityNote vulnerability = 10; - * @param \Grafeas\V1\VulnerabilityNote $var - * @return $this - */ - public function setVulnerability($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\VulnerabilityNote::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * A note describing build provenance for a verifiable build. - * - * Generated from protobuf field .grafeas.v1.BuildNote build = 11; - * @return \Grafeas\V1\BuildNote|null - */ - public function getBuild() - { - return $this->readOneof(11); - } - - public function hasBuild() - { - return $this->hasOneof(11); - } - - /** - * A note describing build provenance for a verifiable build. - * - * Generated from protobuf field .grafeas.v1.BuildNote build = 11; - * @param \Grafeas\V1\BuildNote $var - * @return $this - */ - public function setBuild($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\BuildNote::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * A note describing a base image. - * - * Generated from protobuf field .grafeas.v1.ImageNote image = 12; - * @return \Grafeas\V1\ImageNote|null - */ - public function getImage() - { - return $this->readOneof(12); - } - - public function hasImage() - { - return $this->hasOneof(12); - } - - /** - * A note describing a base image. - * - * Generated from protobuf field .grafeas.v1.ImageNote image = 12; - * @param \Grafeas\V1\ImageNote $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\ImageNote::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * A note describing a package hosted by various package managers. - * - * Generated from protobuf field .grafeas.v1.PackageNote package = 13; - * @return \Grafeas\V1\PackageNote|null - */ - public function getPackage() - { - return $this->readOneof(13); - } - - public function hasPackage() - { - return $this->hasOneof(13); - } - - /** - * A note describing a package hosted by various package managers. - * - * Generated from protobuf field .grafeas.v1.PackageNote package = 13; - * @param \Grafeas\V1\PackageNote $var - * @return $this - */ - public function setPackage($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\PackageNote::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * A note describing something that can be deployed. - * - * Generated from protobuf field .grafeas.v1.DeploymentNote deployment = 14; - * @return \Grafeas\V1\DeploymentNote|null - */ - public function getDeployment() - { - return $this->readOneof(14); - } - - public function hasDeployment() - { - return $this->hasOneof(14); - } - - /** - * A note describing something that can be deployed. - * - * Generated from protobuf field .grafeas.v1.DeploymentNote deployment = 14; - * @param \Grafeas\V1\DeploymentNote $var - * @return $this - */ - public function setDeployment($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DeploymentNote::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * A note describing the initial analysis of a resource. - * - * Generated from protobuf field .grafeas.v1.DiscoveryNote discovery = 15; - * @return \Grafeas\V1\DiscoveryNote|null - */ - public function getDiscovery() - { - return $this->readOneof(15); - } - - public function hasDiscovery() - { - return $this->hasOneof(15); - } - - /** - * A note describing the initial analysis of a resource. - * - * Generated from protobuf field .grafeas.v1.DiscoveryNote discovery = 15; - * @param \Grafeas\V1\DiscoveryNote $var - * @return $this - */ - public function setDiscovery($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DiscoveryNote::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * A note describing an attestation role. - * - * Generated from protobuf field .grafeas.v1.AttestationNote attestation = 16; - * @return \Grafeas\V1\AttestationNote|null - */ - public function getAttestation() - { - return $this->readOneof(16); - } - - public function hasAttestation() - { - return $this->hasOneof(16); - } - - /** - * A note describing an attestation role. - * - * Generated from protobuf field .grafeas.v1.AttestationNote attestation = 16; - * @param \Grafeas\V1\AttestationNote $var - * @return $this - */ - public function setAttestation($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\AttestationNote::class); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * A note describing available package upgrades. - * - * Generated from protobuf field .grafeas.v1.UpgradeNote upgrade = 17; - * @return \Grafeas\V1\UpgradeNote|null - */ - public function getUpgrade() - { - return $this->readOneof(17); - } - - public function hasUpgrade() - { - return $this->hasOneof(17); - } - - /** - * A note describing available package upgrades. - * - * Generated from protobuf field .grafeas.v1.UpgradeNote upgrade = 17; - * @param \Grafeas\V1\UpgradeNote $var - * @return $this - */ - public function setUpgrade($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\UpgradeNote::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * A note describing a compliance check. - * - * Generated from protobuf field .grafeas.v1.ComplianceNote compliance = 18; - * @return \Grafeas\V1\ComplianceNote|null - */ - public function getCompliance() - { - return $this->readOneof(18); - } - - public function hasCompliance() - { - return $this->hasOneof(18); - } - - /** - * A note describing a compliance check. - * - * Generated from protobuf field .grafeas.v1.ComplianceNote compliance = 18; - * @param \Grafeas\V1\ComplianceNote $var - * @return $this - */ - public function setCompliance($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\ComplianceNote::class); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * A note describing a dsse attestation note. - * - * Generated from protobuf field .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @return \Grafeas\V1\DSSEAttestationNote|null - */ - public function getDsseAttestation() - { - return $this->readOneof(19); - } - - public function hasDsseAttestation() - { - return $this->hasOneof(19); - } - - /** - * A note describing a dsse attestation note. - * - * Generated from protobuf field .grafeas.v1.DSSEAttestationNote dsse_attestation = 19; - * @param \Grafeas\V1\DSSEAttestationNote $var - * @return $this - */ - public function setDsseAttestation($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DSSEAttestationNote::class); - $this->writeOneof(19, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NoteKind.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NoteKind.php deleted file mode 100644 index 522f07bb21ca..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/NoteKind.php +++ /dev/null @@ -1,117 +0,0 @@ -grafeas.v1.NoteKind - */ -class NoteKind -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum NOTE_KIND_UNSPECIFIED = 0; - */ - const NOTE_KIND_UNSPECIFIED = 0; - /** - * The note and occurrence represent a package vulnerability. - * - * Generated from protobuf enum VULNERABILITY = 1; - */ - const VULNERABILITY = 1; - /** - * The note and occurrence assert build provenance. - * - * Generated from protobuf enum BUILD = 2; - */ - const BUILD = 2; - /** - * This represents an image basis relationship. - * - * Generated from protobuf enum IMAGE = 3; - */ - const IMAGE = 3; - /** - * This represents a package installed via a package manager. - * - * Generated from protobuf enum PACKAGE = 4; - */ - const PACKAGE = 4; - /** - * The note and occurrence track deployment events. - * - * Generated from protobuf enum DEPLOYMENT = 5; - */ - const DEPLOYMENT = 5; - /** - * The note and occurrence track the initial discovery status of a resource. - * - * Generated from protobuf enum DISCOVERY = 6; - */ - const DISCOVERY = 6; - /** - * This represents a logical "role" that can attest to artifacts. - * - * Generated from protobuf enum ATTESTATION = 7; - */ - const ATTESTATION = 7; - /** - * This represents an available package upgrade. - * - * Generated from protobuf enum UPGRADE = 8; - */ - const UPGRADE = 8; - /** - * This represents a Compliance Note - * - * Generated from protobuf enum COMPLIANCE = 9; - */ - const COMPLIANCE = 9; - /** - * This represents a DSSE attestation Note - * - * Generated from protobuf enum DSSE_ATTESTATION = 10; - */ - const DSSE_ATTESTATION = 10; - - private static $valueToName = [ - self::NOTE_KIND_UNSPECIFIED => 'NOTE_KIND_UNSPECIFIED', - self::VULNERABILITY => 'VULNERABILITY', - self::BUILD => 'BUILD', - self::IMAGE => 'IMAGE', - self::PACKAGE => 'PACKAGE', - self::DEPLOYMENT => 'DEPLOYMENT', - self::DISCOVERY => 'DISCOVERY', - self::ATTESTATION => 'ATTESTATION', - self::UPGRADE => 'UPGRADE', - self::COMPLIANCE => 'COMPLIANCE', - self::DSSE_ATTESTATION => 'DSSE_ATTESTATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Grafeas/v1/proto/src/Grafeas/V1/Occurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Occurrence.php deleted file mode 100644 index afc520226b1c..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Occurrence.php +++ /dev/null @@ -1,701 +0,0 @@ -grafeas.v1.Occurrence - */ -class Occurrence extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. Immutable. A URI that represents the resource for which the - * occurrence applies. For example, - * `https://gcr.io/project/image@sha256:123abc` for a Docker image. - * - * Generated from protobuf field string resource_uri = 2; - */ - protected $resource_uri = ''; - /** - * Required. Immutable. The analysis note associated with this occurrence, in - * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be - * used as a filter in list requests. - * - * Generated from protobuf field string note_name = 3; - */ - protected $note_name = ''; - /** - * Output only. This explicitly denotes which of the occurrence details are - * specified. This field can be used as a filter in list requests. - * - * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; - */ - protected $kind = 0; - /** - * A description of actions that can be taken to remedy the note. - * - * Generated from protobuf field string remediation = 5; - */ - protected $remediation = ''; - /** - * Output only. The time this occurrence was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - */ - protected $create_time = null; - /** - * Output only. The time this occurrence was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; - */ - protected $update_time = null; - /** - * https://github.com/secure-systems-lab/dsse - * - * Generated from protobuf field .grafeas.v1.Envelope envelope = 18; - */ - protected $envelope = null; - protected $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @type string $resource_uri - * Required. Immutable. A URI that represents the resource for which the - * occurrence applies. For example, - * `https://gcr.io/project/image@sha256:123abc` for a Docker image. - * @type string $note_name - * Required. Immutable. The analysis note associated with this occurrence, in - * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be - * used as a filter in list requests. - * @type int $kind - * Output only. This explicitly denotes which of the occurrence details are - * specified. This field can be used as a filter in list requests. - * @type string $remediation - * A description of actions that can be taken to remedy the note. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time this occurrence was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time this occurrence was last updated. - * @type \Grafeas\V1\VulnerabilityOccurrence $vulnerability - * Describes a security vulnerability. - * @type \Grafeas\V1\BuildOccurrence $build - * Describes a verifiable build. - * @type \Grafeas\V1\ImageOccurrence $image - * Describes how this resource derives from the basis in the associated - * note. - * @type \Grafeas\V1\PackageOccurrence $package - * Describes the installation of a package on the linked resource. - * @type \Grafeas\V1\DeploymentOccurrence $deployment - * Describes the deployment of an artifact on a runtime. - * @type \Grafeas\V1\DiscoveryOccurrence $discovery - * Describes when a resource was discovered. - * @type \Grafeas\V1\AttestationOccurrence $attestation - * Describes an attestation of an artifact. - * @type \Grafeas\V1\UpgradeOccurrence $upgrade - * Describes an available package upgrade on the linked resource. - * @type \Grafeas\V1\ComplianceOccurrence $compliance - * Describes a compliance violation on a linked resource. - * @type \Grafeas\V1\DSSEAttestationOccurrence $dsse_attestation - * Describes an attestation of an artifact using dsse. - * @type \Grafeas\V1\Envelope $envelope - * https://github.com/secure-systems-lab/dsse - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; - } - - /** - * Required. Immutable. A URI that represents the resource for which the - * occurrence applies. For example, - * `https://gcr.io/project/image@sha256:123abc` for a Docker image. - * - * Generated from protobuf field string resource_uri = 2; - * @return string - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * Required. Immutable. A URI that represents the resource for which the - * occurrence applies. For example, - * `https://gcr.io/project/image@sha256:123abc` for a Docker image. - * - * 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; - } - - /** - * Required. Immutable. The analysis note associated with this occurrence, in - * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be - * used as a filter in list requests. - * - * Generated from protobuf field string note_name = 3; - * @return string - */ - public function getNoteName() - { - return $this->note_name; - } - - /** - * Required. Immutable. The analysis note associated with this occurrence, in - * the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be - * used as a filter in list requests. - * - * Generated from protobuf field string note_name = 3; - * @param string $var - * @return $this - */ - public function setNoteName($var) - { - GPBUtil::checkString($var, True); - $this->note_name = $var; - - return $this; - } - - /** - * Output only. This explicitly denotes which of the occurrence details are - * specified. This field can be used as a filter in list requests. - * - * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; - * @return int - */ - public function getKind() - { - return $this->kind; - } - - /** - * Output only. This explicitly denotes which of the occurrence details are - * specified. This field can be used as a filter in list requests. - * - * Generated from protobuf field .grafeas.v1.NoteKind kind = 4; - * @param int $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\NoteKind::class); - $this->kind = $var; - - return $this; - } - - /** - * A description of actions that can be taken to remedy the note. - * - * Generated from protobuf field string remediation = 5; - * @return string - */ - public function getRemediation() - { - return $this->remediation; - } - - /** - * A description of actions that can be taken to remedy the note. - * - * Generated from protobuf field string remediation = 5; - * @param string $var - * @return $this - */ - public function setRemediation($var) - { - GPBUtil::checkString($var, True); - $this->remediation = $var; - - return $this; - } - - /** - * Output only. The time this occurrence was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - * @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 this occurrence was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - * @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 this occurrence was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; - * @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 this occurrence was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Describes a security vulnerability. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @return \Grafeas\V1\VulnerabilityOccurrence|null - */ - public function getVulnerability() - { - return $this->readOneof(8); - } - - public function hasVulnerability() - { - return $this->hasOneof(8); - } - - /** - * Describes a security vulnerability. - * - * Generated from protobuf field .grafeas.v1.VulnerabilityOccurrence vulnerability = 8; - * @param \Grafeas\V1\VulnerabilityOccurrence $var - * @return $this - */ - public function setVulnerability($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\VulnerabilityOccurrence::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Describes a verifiable build. - * - * Generated from protobuf field .grafeas.v1.BuildOccurrence build = 9; - * @return \Grafeas\V1\BuildOccurrence|null - */ - public function getBuild() - { - return $this->readOneof(9); - } - - public function hasBuild() - { - return $this->hasOneof(9); - } - - /** - * Describes a verifiable build. - * - * Generated from protobuf field .grafeas.v1.BuildOccurrence build = 9; - * @param \Grafeas\V1\BuildOccurrence $var - * @return $this - */ - public function setBuild($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\BuildOccurrence::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Describes how this resource derives from the basis in the associated - * note. - * - * Generated from protobuf field .grafeas.v1.ImageOccurrence image = 10; - * @return \Grafeas\V1\ImageOccurrence|null - */ - public function getImage() - { - return $this->readOneof(10); - } - - public function hasImage() - { - return $this->hasOneof(10); - } - - /** - * Describes how this resource derives from the basis in the associated - * note. - * - * Generated from protobuf field .grafeas.v1.ImageOccurrence image = 10; - * @param \Grafeas\V1\ImageOccurrence $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\ImageOccurrence::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Describes the installation of a package on the linked resource. - * - * Generated from protobuf field .grafeas.v1.PackageOccurrence package = 11; - * @return \Grafeas\V1\PackageOccurrence|null - */ - public function getPackage() - { - return $this->readOneof(11); - } - - public function hasPackage() - { - return $this->hasOneof(11); - } - - /** - * Describes the installation of a package on the linked resource. - * - * Generated from protobuf field .grafeas.v1.PackageOccurrence package = 11; - * @param \Grafeas\V1\PackageOccurrence $var - * @return $this - */ - public function setPackage($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\PackageOccurrence::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Describes the deployment of an artifact on a runtime. - * - * Generated from protobuf field .grafeas.v1.DeploymentOccurrence deployment = 12; - * @return \Grafeas\V1\DeploymentOccurrence|null - */ - public function getDeployment() - { - return $this->readOneof(12); - } - - public function hasDeployment() - { - return $this->hasOneof(12); - } - - /** - * Describes the deployment of an artifact on a runtime. - * - * Generated from protobuf field .grafeas.v1.DeploymentOccurrence deployment = 12; - * @param \Grafeas\V1\DeploymentOccurrence $var - * @return $this - */ - public function setDeployment($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DeploymentOccurrence::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Describes when a resource was discovered. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @return \Grafeas\V1\DiscoveryOccurrence|null - */ - public function getDiscovery() - { - return $this->readOneof(13); - } - - public function hasDiscovery() - { - return $this->hasOneof(13); - } - - /** - * Describes when a resource was discovered. - * - * Generated from protobuf field .grafeas.v1.DiscoveryOccurrence discovery = 13; - * @param \Grafeas\V1\DiscoveryOccurrence $var - * @return $this - */ - public function setDiscovery($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DiscoveryOccurrence::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Describes an attestation of an artifact. - * - * Generated from protobuf field .grafeas.v1.AttestationOccurrence attestation = 14; - * @return \Grafeas\V1\AttestationOccurrence|null - */ - public function getAttestation() - { - return $this->readOneof(14); - } - - public function hasAttestation() - { - return $this->hasOneof(14); - } - - /** - * Describes an attestation of an artifact. - * - * Generated from protobuf field .grafeas.v1.AttestationOccurrence attestation = 14; - * @param \Grafeas\V1\AttestationOccurrence $var - * @return $this - */ - public function setAttestation($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\AttestationOccurrence::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Describes an available package upgrade on the linked resource. - * - * Generated from protobuf field .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @return \Grafeas\V1\UpgradeOccurrence|null - */ - public function getUpgrade() - { - return $this->readOneof(15); - } - - public function hasUpgrade() - { - return $this->hasOneof(15); - } - - /** - * Describes an available package upgrade on the linked resource. - * - * Generated from protobuf field .grafeas.v1.UpgradeOccurrence upgrade = 15; - * @param \Grafeas\V1\UpgradeOccurrence $var - * @return $this - */ - public function setUpgrade($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\UpgradeOccurrence::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Describes a compliance violation on a linked resource. - * - * Generated from protobuf field .grafeas.v1.ComplianceOccurrence compliance = 16; - * @return \Grafeas\V1\ComplianceOccurrence|null - */ - public function getCompliance() - { - return $this->readOneof(16); - } - - public function hasCompliance() - { - return $this->hasOneof(16); - } - - /** - * Describes a compliance violation on a linked resource. - * - * Generated from protobuf field .grafeas.v1.ComplianceOccurrence compliance = 16; - * @param \Grafeas\V1\ComplianceOccurrence $var - * @return $this - */ - public function setCompliance($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\ComplianceOccurrence::class); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * Describes an attestation of an artifact using dsse. - * - * Generated from protobuf field .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @return \Grafeas\V1\DSSEAttestationOccurrence|null - */ - public function getDsseAttestation() - { - return $this->readOneof(17); - } - - public function hasDsseAttestation() - { - return $this->hasOneof(17); - } - - /** - * Describes an attestation of an artifact using dsse. - * - * Generated from protobuf field .grafeas.v1.DSSEAttestationOccurrence dsse_attestation = 17; - * @param \Grafeas\V1\DSSEAttestationOccurrence $var - * @return $this - */ - public function setDsseAttestation($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\DSSEAttestationOccurrence::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * https://github.com/secure-systems-lab/dsse - * - * Generated from protobuf field .grafeas.v1.Envelope envelope = 18; - * @return \Grafeas\V1\Envelope|null - */ - public function getEnvelope() - { - return $this->envelope; - } - - public function hasEnvelope() - { - return isset($this->envelope); - } - - public function clearEnvelope() - { - unset($this->envelope); - } - - /** - * https://github.com/secure-systems-lab/dsse - * - * Generated from protobuf field .grafeas.v1.Envelope envelope = 18; - * @param \Grafeas\V1\Envelope $var - * @return $this - */ - public function setEnvelope($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Envelope::class); - $this->envelope = $var; - - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->whichOneof("details"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageNote.php deleted file mode 100644 index a7295d29168a..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageNote.php +++ /dev/null @@ -1,451 +0,0 @@ -grafeas.v1.PackageNote - */ -class PackageNote extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the package. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Deprecated. - * The various channels by which a package is distributed. - * - * Generated from protobuf field repeated .grafeas.v1.Distribution distribution = 10; - */ - private $distribution; - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 11; - */ - protected $package_type = ''; - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * - * Generated from protobuf field string cpe_uri = 12; - */ - protected $cpe_uri = ''; - /** - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 13; - */ - protected $architecture = 0; - /** - * The version of the package. - * - * Generated from protobuf field .grafeas.v1.Version version = 14; - */ - protected $version = null; - /** - * A freeform text denoting the maintainer of this package. - * - * Generated from protobuf field string maintainer = 15; - */ - protected $maintainer = ''; - /** - * The homepage for this package. - * - * Generated from protobuf field string url = 16; - */ - protected $url = ''; - /** - * The description of this package. - * - * Generated from protobuf field string description = 17; - */ - protected $description = ''; - /** - * Licenses that have been declared by the authors of the package. - * - * Generated from protobuf field .grafeas.v1.License license = 18; - */ - protected $license = null; - /** - * Hash value, typically a file digest, that allows unique - * identification a specific package. - * - * Generated from protobuf field repeated .grafeas.v1.Digest digest = 19; - */ - private $digest; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the package. - * @type array<\Grafeas\V1\Distribution>|\Google\Protobuf\Internal\RepeatedField $distribution - * Deprecated. - * The various channels by which a package is distributed. - * @type string $package_type - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * @type string $cpe_uri - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * @type int $architecture - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * @type \Grafeas\V1\Version $version - * The version of the package. - * @type string $maintainer - * A freeform text denoting the maintainer of this package. - * @type string $url - * The homepage for this package. - * @type string $description - * The description of this package. - * @type \Grafeas\V1\License $license - * Licenses that have been declared by the authors of the package. - * @type array<\Grafeas\V1\Digest>|\Google\Protobuf\Internal\RepeatedField $digest - * Hash value, typically a file digest, that allows unique - * identification a specific package. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Package::initOnce(); - parent::__construct($data); - } - - /** - * The name of the package. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the package. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Deprecated. - * The various channels by which a package is distributed. - * - * Generated from protobuf field repeated .grafeas.v1.Distribution distribution = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDistribution() - { - return $this->distribution; - } - - /** - * Deprecated. - * The various channels by which a package is distributed. - * - * Generated from protobuf field repeated .grafeas.v1.Distribution distribution = 10; - * @param array<\Grafeas\V1\Distribution>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDistribution($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Distribution::class); - $this->distribution = $arr; - - return $this; - } - - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 11; - * @return string - */ - public function getPackageType() - { - return $this->package_type; - } - - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 11; - * @param string $var - * @return $this - */ - public function setPackageType($var) - { - GPBUtil::checkString($var, True); - $this->package_type = $var; - - return $this; - } - - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * - * Generated from protobuf field string cpe_uri = 12; - * @return string - */ - public function getCpeUri() - { - return $this->cpe_uri; - } - - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * - * Generated from protobuf field string cpe_uri = 12; - * @param string $var - * @return $this - */ - public function setCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->cpe_uri = $var; - - return $this; - } - - /** - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 13; - * @return int - */ - public function getArchitecture() - { - return $this->architecture; - } - - /** - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 13; - * @param int $var - * @return $this - */ - public function setArchitecture($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Architecture::class); - $this->architecture = $var; - - return $this; - } - - /** - * The version of the package. - * - * Generated from protobuf field .grafeas.v1.Version version = 14; - * @return \Grafeas\V1\Version|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * The version of the package. - * - * Generated from protobuf field .grafeas.v1.Version version = 14; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->version = $var; - - return $this; - } - - /** - * A freeform text denoting the maintainer of this package. - * - * Generated from protobuf field string maintainer = 15; - * @return string - */ - public function getMaintainer() - { - return $this->maintainer; - } - - /** - * A freeform text denoting the maintainer of this package. - * - * Generated from protobuf field string maintainer = 15; - * @param string $var - * @return $this - */ - public function setMaintainer($var) - { - GPBUtil::checkString($var, True); - $this->maintainer = $var; - - return $this; - } - - /** - * The homepage for this package. - * - * Generated from protobuf field string url = 16; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The homepage for this package. - * - * Generated from protobuf field string url = 16; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * The description of this package. - * - * Generated from protobuf field string description = 17; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of this package. - * - * 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; - } - - /** - * Licenses that have been declared by the authors of the package. - * - * Generated from protobuf field .grafeas.v1.License license = 18; - * @return \Grafeas\V1\License|null - */ - public function getLicense() - { - return $this->license; - } - - public function hasLicense() - { - return isset($this->license); - } - - public function clearLicense() - { - unset($this->license); - } - - /** - * Licenses that have been declared by the authors of the package. - * - * Generated from protobuf field .grafeas.v1.License license = 18; - * @param \Grafeas\V1\License $var - * @return $this - */ - public function setLicense($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\License::class); - $this->license = $var; - - return $this; - } - - /** - * Hash value, typically a file digest, that allows unique - * identification a specific package. - * - * Generated from protobuf field repeated .grafeas.v1.Digest digest = 19; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDigest() - { - return $this->digest; - } - - /** - * Hash value, typically a file digest, that allows unique - * identification a specific package. - * - * Generated from protobuf field repeated .grafeas.v1.Digest digest = 19; - * @param array<\Grafeas\V1\Digest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDigest($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Digest::class); - $this->digest = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageOccurrence.php deleted file mode 100644 index dafa0769a930..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/PackageOccurrence.php +++ /dev/null @@ -1,311 +0,0 @@ -grafeas.v1.PackageOccurrence - */ -class PackageOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the installed package. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * All of the places within the filesystem versions of this package - * have been found. - * - * Generated from protobuf field repeated .grafeas.v1.Location location = 2; - */ - private $location; - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $package_type = ''; - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * - * Generated from protobuf field string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cpe_uri = ''; - /** - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $architecture = 0; - /** - * Licenses that have been declared by the authors of the package. - * - * Generated from protobuf field .grafeas.v1.License license = 6; - */ - protected $license = null; - /** - * The version of the package. - * - * Generated from protobuf field .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $version = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the installed package. - * @type array<\Grafeas\V1\Location>|\Google\Protobuf\Internal\RepeatedField $location - * All of the places within the filesystem versions of this package - * have been found. - * @type string $package_type - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * @type string $cpe_uri - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * @type int $architecture - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * @type \Grafeas\V1\License $license - * Licenses that have been declared by the authors of the package. - * @type \Grafeas\V1\Version $version - * The version of the package. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Package::initOnce(); - parent::__construct($data); - } - - /** - * The name of the installed package. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the installed package. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * All of the places within the filesystem versions of this package - * have been found. - * - * Generated from protobuf field repeated .grafeas.v1.Location location = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLocation() - { - return $this->location; - } - - /** - * All of the places within the filesystem versions of this package - * have been found. - * - * Generated from protobuf field repeated .grafeas.v1.Location location = 2; - * @param array<\Grafeas\V1\Location>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLocation($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\Location::class); - $this->location = $arr; - - return $this; - } - - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPackageType() - { - return $this->package_type; - } - - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPackageType($var) - { - GPBUtil::checkString($var, True); - $this->package_type = $var; - - return $this; - } - - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * - * Generated from protobuf field string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCpeUri() - { - return $this->cpe_uri; - } - - /** - * The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) - * denoting the package manager version distributing a package. - * The cpe_uri will be blank for language packages. - * - * Generated from protobuf field string cpe_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->cpe_uri = $var; - - return $this; - } - - /** - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getArchitecture() - { - return $this->architecture; - } - - /** - * The CPU architecture for which packages in this distribution channel were - * built. Architecture will be blank for language packages. - * - * Generated from protobuf field .grafeas.v1.Architecture architecture = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setArchitecture($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Architecture::class); - $this->architecture = $var; - - return $this; - } - - /** - * Licenses that have been declared by the authors of the package. - * - * Generated from protobuf field .grafeas.v1.License license = 6; - * @return \Grafeas\V1\License|null - */ - public function getLicense() - { - return $this->license; - } - - public function hasLicense() - { - return isset($this->license); - } - - public function clearLicense() - { - unset($this->license); - } - - /** - * Licenses that have been declared by the authors of the package. - * - * Generated from protobuf field .grafeas.v1.License license = 6; - * @param \Grafeas\V1\License $var - * @return $this - */ - public function setLicense($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\License::class); - $this->license = $var; - - return $this; - } - - /** - * The version of the package. - * - * Generated from protobuf field .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Grafeas\V1\Version|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * The version of the package. - * - * Generated from protobuf field .grafeas.v1.Version version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ProjectRepoId.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ProjectRepoId.php deleted file mode 100644 index d2c9475a063e..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/ProjectRepoId.php +++ /dev/null @@ -1,102 +0,0 @@ -grafeas.v1.ProjectRepoId - */ -class ProjectRepoId extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the project. - * - * Generated from protobuf field string project_id = 1; - */ - protected $project_id = ''; - /** - * The name of the repo. Leave empty for the default repo. - * - * Generated from protobuf field string repo_name = 2; - */ - protected $repo_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * The ID of the project. - * @type string $repo_name - * The name of the repo. Leave empty for the default repo. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the project. - * - * Generated from protobuf field string project_id = 1; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * The ID of the project. - * - * Generated from protobuf field string project_id = 1; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * The name of the repo. Leave empty for the default repo. - * - * Generated from protobuf field string repo_name = 2; - * @return string - */ - public function getRepoName() - { - return $this->repo_name; - } - - /** - * The name of the repo. Leave empty for the default repo. - * - * Generated from protobuf field string repo_name = 2; - * @param string $var - * @return $this - */ - public function setRepoName($var) - { - GPBUtil::checkString($var, True); - $this->repo_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Recipe.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Recipe.php deleted file mode 100644 index 0806a1ed630b..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Recipe.php +++ /dev/null @@ -1,273 +0,0 @@ -grafeas.v1.Recipe - */ -class Recipe extends \Google\Protobuf\Internal\Message -{ - /** - * URI indicating what type of recipe was performed. It determines the meaning - * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * - * Generated from protobuf field int64 defined_in_material = 2; - */ - protected $defined_in_material = 0; - /** - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For example, - * if the recipe type were "make", then this would reference the directory in - * which to run make as well as which target to use. - * - * Generated from protobuf field string entry_point = 3; - */ - protected $entry_point = ''; - /** - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe - * type were "make", then this might be the flags passed to make aside from - * the target, which is captured in recipe.entryPoint. Since the arguments - * field can greatly vary in structure, depending on the builder and recipe - * type, this is of form "Any". - * - * Generated from protobuf field repeated .google.protobuf.Any arguments = 4; - */ - private $arguments; - /** - * Any other builder-controlled inputs necessary for correctly evaluating the - * recipe. Usually only needed for reproducing the build but not evaluated as - * part of policy. Since the environment field can greatly vary in structure, - * depending on the builder and recipe type, this is of form "Any". - * - * Generated from protobuf field repeated .google.protobuf.Any environment = 5; - */ - private $environment; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * URI indicating what type of recipe was performed. It determines the meaning - * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. - * @type int|string $defined_in_material - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * @type string $entry_point - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For example, - * if the recipe type were "make", then this would reference the directory in - * which to run make as well as which target to use. - * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $arguments - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe - * type were "make", then this might be the flags passed to make aside from - * the target, which is captured in recipe.entryPoint. Since the arguments - * field can greatly vary in structure, depending on the builder and recipe - * type, this is of form "Any". - * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $environment - * Any other builder-controlled inputs necessary for correctly evaluating the - * recipe. Usually only needed for reproducing the build but not evaluated as - * part of policy. Since the environment field can greatly vary in structure, - * depending on the builder and recipe type, this is of form "Any". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoProvenance::initOnce(); - parent::__construct($data); - } - - /** - * URI indicating what type of recipe was performed. It determines the meaning - * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * URI indicating what type of recipe was performed. It determines the meaning - * of recipe.entryPoint, recipe.arguments, recipe.environment, and materials. - * - * 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; - } - - /** - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * - * Generated from protobuf field int64 defined_in_material = 2; - * @return int|string - */ - public function getDefinedInMaterial() - { - return $this->defined_in_material; - } - - /** - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * - * Generated from protobuf field int64 defined_in_material = 2; - * @param int|string $var - * @return $this - */ - public function setDefinedInMaterial($var) - { - GPBUtil::checkInt64($var); - $this->defined_in_material = $var; - - return $this; - } - - /** - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For example, - * if the recipe type were "make", then this would reference the directory in - * which to run make as well as which target to use. - * - * Generated from protobuf field string entry_point = 3; - * @return string - */ - public function getEntryPoint() - { - return $this->entry_point; - } - - /** - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For example, - * if the recipe type were "make", then this would reference the directory in - * which to run make as well as which target to use. - * - * Generated from protobuf field string entry_point = 3; - * @param string $var - * @return $this - */ - public function setEntryPoint($var) - { - GPBUtil::checkString($var, True); - $this->entry_point = $var; - - return $this; - } - - /** - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe - * type were "make", then this might be the flags passed to make aside from - * the target, which is captured in recipe.entryPoint. Since the arguments - * field can greatly vary in structure, depending on the builder and recipe - * type, this is of form "Any". - * - * Generated from protobuf field repeated .google.protobuf.Any arguments = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe - * type were "make", then this might be the flags passed to make aside from - * the target, which is captured in recipe.entryPoint. Since the arguments - * field can greatly vary in structure, depending on the builder and recipe - * type, this is of form "Any". - * - * Generated from protobuf field repeated .google.protobuf.Any arguments = 4; - * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArguments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); - $this->arguments = $arr; - - return $this; - } - - /** - * Any other builder-controlled inputs necessary for correctly evaluating the - * recipe. Usually only needed for reproducing the build but not evaluated as - * part of policy. Since the environment field can greatly vary in structure, - * depending on the builder and recipe type, this is of form "Any". - * - * Generated from protobuf field repeated .google.protobuf.Any environment = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * Any other builder-controlled inputs necessary for correctly evaluating the - * recipe. Usually only needed for reproducing the build but not evaluated as - * part of policy. Since the environment field can greatly vary in structure, - * depending on the builder and recipe type, this is of form "Any". - * - * Generated from protobuf field repeated .google.protobuf.Any environment = 5; - * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnvironment($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); - $this->environment = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RelatedUrl.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RelatedUrl.php deleted file mode 100644 index c407db0064b9..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RelatedUrl.php +++ /dev/null @@ -1,101 +0,0 @@ -grafeas.v1.RelatedUrl - */ -class RelatedUrl extends \Google\Protobuf\Internal\Message -{ - /** - * Specific URL associated with the resource. - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - /** - * Label to describe usage of the URL. - * - * Generated from protobuf field string label = 2; - */ - protected $label = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * Specific URL associated with the resource. - * @type string $label - * Label to describe usage of the URL. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Specific URL associated with the resource. - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Specific URL associated with the resource. - * - * 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; - } - - /** - * Label to describe usage of the URL. - * - * Generated from protobuf field string label = 2; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Label to describe usage of the URL. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RepoId.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RepoId.php deleted file mode 100644 index 5643c66c7c24..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/RepoId.php +++ /dev/null @@ -1,108 +0,0 @@ -grafeas.v1.RepoId - */ -class RepoId extends \Google\Protobuf\Internal\Message -{ - protected $id; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\ProjectRepoId $project_repo_id - * A combination of a project ID and a repo name. - * @type string $uid - * A server-assigned, globally unique identifier. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * A combination of a project ID and a repo name. - * - * Generated from protobuf field .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @return \Grafeas\V1\ProjectRepoId|null - */ - public function getProjectRepoId() - { - return $this->readOneof(1); - } - - public function hasProjectRepoId() - { - return $this->hasOneof(1); - } - - /** - * A combination of a project ID and a repo name. - * - * Generated from protobuf field .grafeas.v1.ProjectRepoId project_repo_id = 1; - * @param \Grafeas\V1\ProjectRepoId $var - * @return $this - */ - public function setProjectRepoId($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\ProjectRepoId::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A server-assigned, globally unique identifier. - * - * Generated from protobuf field string uid = 2; - * @return string - */ - public function getUid() - { - return $this->readOneof(2); - } - - public function hasUid() - { - return $this->hasOneof(2); - } - - /** - * A server-assigned, globally unique identifier. - * - * Generated from protobuf field string uid = 2; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getId() - { - return $this->whichOneof("id"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Severity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Severity.php deleted file mode 100644 index 698112c5460e..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Severity.php +++ /dev/null @@ -1,82 +0,0 @@ -grafeas.v1.Severity - */ -class Severity -{ - /** - * Unknown. - * - * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; - */ - const SEVERITY_UNSPECIFIED = 0; - /** - * Minimal severity. - * - * Generated from protobuf enum MINIMAL = 1; - */ - const MINIMAL = 1; - /** - * Low severity. - * - * Generated from protobuf enum LOW = 2; - */ - const LOW = 2; - /** - * Medium severity. - * - * Generated from protobuf enum MEDIUM = 3; - */ - const MEDIUM = 3; - /** - * High severity. - * - * Generated from protobuf enum HIGH = 4; - */ - const HIGH = 4; - /** - * Critical severity. - * - * Generated from protobuf enum CRITICAL = 5; - */ - const CRITICAL = 5; - - private static $valueToName = [ - self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', - self::MINIMAL => 'MINIMAL', - self::LOW => 'LOW', - self::MEDIUM => 'MEDIUM', - self::HIGH => 'HIGH', - self::CRITICAL => 'CRITICAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Grafeas/v1/proto/src/Grafeas/V1/Signature.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Signature.php deleted file mode 100644 index de57d7bfe087..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Signature.php +++ /dev/null @@ -1,192 +0,0 @@ -grafeas.v1.Signature - */ -class Signature extends \Google\Protobuf\Internal\Message -{ - /** - * The content of the signature, an opaque bytestring. - * The payload that this signature verifies MUST be unambiguously provided - * with the Signature during verification. A wrapper message might provide - * the payload explicitly. Alternatively, a message might have a canonical - * serialization that can always be unambiguously computed to derive the - * payload. - * - * Generated from protobuf field bytes signature = 1; - */ - protected $signature = ''; - /** - * The identifier for the public key that verifies this signature. - * * The `public_key_id` is required. - * * The `public_key_id` SHOULD be an RFC3986 conformant URI. - * * When possible, the `public_key_id` SHOULD be an immutable reference, - * such as a cryptographic digest. - * Examples of valid `public_key_id`s: - * OpenPGP V4 public key fingerprint: - * * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" - * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more - * details on this scheme. - * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER - * serialization): - * * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" - * * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" - * - * Generated from protobuf field string public_key_id = 2; - */ - protected $public_key_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $signature - * The content of the signature, an opaque bytestring. - * The payload that this signature verifies MUST be unambiguously provided - * with the Signature during verification. A wrapper message might provide - * the payload explicitly. Alternatively, a message might have a canonical - * serialization that can always be unambiguously computed to derive the - * payload. - * @type string $public_key_id - * The identifier for the public key that verifies this signature. - * * The `public_key_id` is required. - * * The `public_key_id` SHOULD be an RFC3986 conformant URI. - * * When possible, the `public_key_id` SHOULD be an immutable reference, - * such as a cryptographic digest. - * Examples of valid `public_key_id`s: - * OpenPGP V4 public key fingerprint: - * * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" - * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more - * details on this scheme. - * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER - * serialization): - * * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" - * * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The content of the signature, an opaque bytestring. - * The payload that this signature verifies MUST be unambiguously provided - * with the Signature during verification. A wrapper message might provide - * the payload explicitly. Alternatively, a message might have a canonical - * serialization that can always be unambiguously computed to derive the - * payload. - * - * Generated from protobuf field bytes signature = 1; - * @return string - */ - public function getSignature() - { - return $this->signature; - } - - /** - * The content of the signature, an opaque bytestring. - * The payload that this signature verifies MUST be unambiguously provided - * with the Signature during verification. A wrapper message might provide - * the payload explicitly. Alternatively, a message might have a canonical - * serialization that can always be unambiguously computed to derive the - * payload. - * - * Generated from protobuf field bytes signature = 1; - * @param string $var - * @return $this - */ - public function setSignature($var) - { - GPBUtil::checkString($var, False); - $this->signature = $var; - - return $this; - } - - /** - * The identifier for the public key that verifies this signature. - * * The `public_key_id` is required. - * * The `public_key_id` SHOULD be an RFC3986 conformant URI. - * * When possible, the `public_key_id` SHOULD be an immutable reference, - * such as a cryptographic digest. - * Examples of valid `public_key_id`s: - * OpenPGP V4 public key fingerprint: - * * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" - * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more - * details on this scheme. - * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER - * serialization): - * * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" - * * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" - * - * Generated from protobuf field string public_key_id = 2; - * @return string - */ - public function getPublicKeyId() - { - return $this->public_key_id; - } - - /** - * The identifier for the public key that verifies this signature. - * * The `public_key_id` is required. - * * The `public_key_id` SHOULD be an RFC3986 conformant URI. - * * When possible, the `public_key_id` SHOULD be an immutable reference, - * such as a cryptographic digest. - * Examples of valid `public_key_id`s: - * OpenPGP V4 public key fingerprint: - * * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" - * See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more - * details on this scheme. - * RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER - * serialization): - * * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" - * * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" - * - * Generated from protobuf field string public_key_id = 2; - * @param string $var - * @return $this - */ - public function setPublicKeyId($var) - { - GPBUtil::checkString($var, True); - $this->public_key_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance.php deleted file mode 100644 index 0113d091326d..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance.php +++ /dev/null @@ -1,214 +0,0 @@ -grafeas.v1.SlsaProvenance - */ -class SlsaProvenance extends \Google\Protobuf\Internal\Message -{ - /** - * required - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - */ - protected $builder = null; - /** - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - */ - protected $recipe = null; - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - */ - protected $metadata = null; - /** - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * - * Generated from protobuf field repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - */ - private $materials; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\SlsaProvenance\SlsaBuilder $builder - * required - * @type \Grafeas\V1\SlsaProvenance\SlsaRecipe $recipe - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * @type \Grafeas\V1\SlsaProvenance\SlsaMetadata $metadata - * @type array<\Grafeas\V1\SlsaProvenance\Material>|\Google\Protobuf\Internal\RepeatedField $materials - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); - parent::__construct($data); - } - - /** - * required - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @return \Grafeas\V1\SlsaProvenance\SlsaBuilder|null - */ - public function getBuilder() - { - return $this->builder; - } - - public function hasBuilder() - { - return isset($this->builder); - } - - public function clearBuilder() - { - unset($this->builder); - } - - /** - * required - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaBuilder builder = 1; - * @param \Grafeas\V1\SlsaProvenance\SlsaBuilder $var - * @return $this - */ - public function setBuilder($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance\SlsaBuilder::class); - $this->builder = $var; - - return $this; - } - - /** - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @return \Grafeas\V1\SlsaProvenance\SlsaRecipe|null - */ - public function getRecipe() - { - return $this->recipe; - } - - public function hasRecipe() - { - return isset($this->recipe); - } - - public function clearRecipe() - { - unset($this->recipe); - } - - /** - * Identifies the configuration used for the build. - * When combined with materials, this SHOULD fully describe the build, - * such that re-running this recipe results in bit-for-bit identical output - * (if the build is reproducible). - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaRecipe recipe = 2; - * @param \Grafeas\V1\SlsaProvenance\SlsaRecipe $var - * @return $this - */ - public function setRecipe($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance\SlsaRecipe::class); - $this->recipe = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @return \Grafeas\V1\SlsaProvenance\SlsaMetadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaMetadata metadata = 3; - * @param \Grafeas\V1\SlsaProvenance\SlsaMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance\SlsaMetadata::class); - $this->metadata = $var; - - return $this; - } - - /** - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * - * Generated from protobuf field repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMaterials() - { - return $this->materials; - } - - /** - * The collection of artifacts that influenced the build including sources, - * dependencies, build tools, base images, and so on. This is considered to be - * incomplete unless metadata.completeness.materials is true. Unset or null is - * equivalent to empty. - * - * Generated from protobuf field repeated .grafeas.v1.SlsaProvenance.Material materials = 4; - * @param array<\Grafeas\V1\SlsaProvenance\Material>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMaterials($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\SlsaProvenance\Material::class); - $this->materials = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/Material.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/Material.php deleted file mode 100644 index d2165056a94b..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/Material.php +++ /dev/null @@ -1,88 +0,0 @@ -grafeas.v1.SlsaProvenance.Material - */ -class Material extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * Generated from protobuf field map digest = 2; - */ - private $digest; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * @type array|\Google\Protobuf\Internal\MapField $digest - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * 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; - } - - /** - * Generated from protobuf field map digest = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDigest() - { - return $this->digest; - } - - /** - * Generated from protobuf field map digest = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDigest($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->digest = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Material::class, \Grafeas\V1\SlsaProvenance_Material::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaBuilder.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaBuilder.php deleted file mode 100644 index 455fa4993f05..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaBuilder.php +++ /dev/null @@ -1,61 +0,0 @@ -grafeas.v1.SlsaProvenance.SlsaBuilder - */ -class SlsaBuilder extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * 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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaBuilder::class, \Grafeas\V1\SlsaProvenance_SlsaBuilder::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaCompleteness.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaCompleteness.php deleted file mode 100644 index 15d1ba478108..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaCompleteness.php +++ /dev/null @@ -1,151 +0,0 @@ -grafeas.v1.SlsaProvenance.SlsaCompleteness - */ -class SlsaCompleteness extends \Google\Protobuf\Internal\Message -{ - /** - * If true, the builder claims that recipe.arguments is complete, meaning - * that all external inputs are properly captured in the recipe. - * - * Generated from protobuf field bool arguments = 1; - */ - protected $arguments = false; - /** - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * - * Generated from protobuf field bool environment = 2; - */ - protected $environment = false; - /** - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * - * Generated from protobuf field bool materials = 3; - */ - protected $materials = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $arguments - * If true, the builder claims that recipe.arguments is complete, meaning - * that all external inputs are properly captured in the recipe. - * @type bool $environment - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * @type bool $materials - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); - parent::__construct($data); - } - - /** - * If true, the builder claims that recipe.arguments is complete, meaning - * that all external inputs are properly captured in the recipe. - * - * Generated from protobuf field bool arguments = 1; - * @return bool - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * If true, the builder claims that recipe.arguments is complete, meaning - * that all external inputs are properly captured in the recipe. - * - * Generated from protobuf field bool arguments = 1; - * @param bool $var - * @return $this - */ - public function setArguments($var) - { - GPBUtil::checkBool($var); - $this->arguments = $var; - - return $this; - } - - /** - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * - * Generated from protobuf field bool environment = 2; - * @return bool - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * If true, the builder claims that recipe.environment is claimed to be - * complete. - * - * Generated from protobuf field bool environment = 2; - * @param bool $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkBool($var); - $this->environment = $var; - - return $this; - } - - /** - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * - * Generated from protobuf field bool materials = 3; - * @return bool - */ - public function getMaterials() - { - return $this->materials; - } - - /** - * If true, the builder claims that materials are complete, usually through - * some controls to prevent network access. Sometimes called "hermetic". - * - * Generated from protobuf field bool materials = 3; - * @param bool $var - * @return $this - */ - public function setMaterials($var) - { - GPBUtil::checkBool($var); - $this->materials = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaCompleteness::class, \Grafeas\V1\SlsaProvenance_SlsaCompleteness::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaMetadata.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaMetadata.php deleted file mode 100644 index 05447be11b5c..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaMetadata.php +++ /dev/null @@ -1,252 +0,0 @@ -grafeas.v1.SlsaProvenance.SlsaMetadata - */ -class SlsaMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Identifies the particular build invocation, which can be useful for - * finding associated logs or other ad-hoc analysis. The value SHOULD be - * globally unique, per in-toto Provenance spec. - * - * Generated from protobuf field string build_invocation_id = 1; - */ - protected $build_invocation_id = ''; - /** - * The timestamp of when the build started. - * - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - */ - protected $build_started_on = null; - /** - * The timestamp of when the build completed. - * - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - */ - protected $build_finished_on = null; - /** - * Indicates that the builder claims certain fields in this message to be - * complete. - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - */ - protected $completeness = null; - /** - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * - * Generated from protobuf field bool reproducible = 5; - */ - protected $reproducible = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $build_invocation_id - * Identifies the particular build invocation, which can be useful for - * finding associated logs or other ad-hoc analysis. The value SHOULD be - * globally unique, per in-toto Provenance spec. - * @type \Google\Protobuf\Timestamp $build_started_on - * The timestamp of when the build started. - * @type \Google\Protobuf\Timestamp $build_finished_on - * The timestamp of when the build completed. - * @type \Grafeas\V1\SlsaProvenance\SlsaCompleteness $completeness - * Indicates that the builder claims certain fields in this message to be - * complete. - * @type bool $reproducible - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); - parent::__construct($data); - } - - /** - * Identifies the particular build invocation, which can be useful for - * finding associated logs or other ad-hoc analysis. The value SHOULD be - * globally unique, per in-toto Provenance spec. - * - * Generated from protobuf field string build_invocation_id = 1; - * @return string - */ - public function getBuildInvocationId() - { - return $this->build_invocation_id; - } - - /** - * Identifies the particular build invocation, which can be useful for - * finding associated logs or other ad-hoc analysis. The value SHOULD be - * globally unique, per in-toto Provenance spec. - * - * Generated from protobuf field string build_invocation_id = 1; - * @param string $var - * @return $this - */ - public function setBuildInvocationId($var) - { - GPBUtil::checkString($var, True); - $this->build_invocation_id = $var; - - return $this; - } - - /** - * The timestamp of when the build started. - * - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getBuildStartedOn() - { - return $this->build_started_on; - } - - public function hasBuildStartedOn() - { - return isset($this->build_started_on); - } - - public function clearBuildStartedOn() - { - unset($this->build_started_on); - } - - /** - * The timestamp of when the build started. - * - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setBuildStartedOn($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->build_started_on = $var; - - return $this; - } - - /** - * The timestamp of when the build completed. - * - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getBuildFinishedOn() - { - return $this->build_finished_on; - } - - public function hasBuildFinishedOn() - { - return isset($this->build_finished_on); - } - - public function clearBuildFinishedOn() - { - unset($this->build_finished_on); - } - - /** - * The timestamp of when the build completed. - * - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setBuildFinishedOn($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->build_finished_on = $var; - - return $this; - } - - /** - * Indicates that the builder claims certain fields in this message to be - * complete. - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @return \Grafeas\V1\SlsaProvenance\SlsaCompleteness|null - */ - public function getCompleteness() - { - return $this->completeness; - } - - public function hasCompleteness() - { - return isset($this->completeness); - } - - public function clearCompleteness() - { - unset($this->completeness); - } - - /** - * Indicates that the builder claims certain fields in this message to be - * complete. - * - * Generated from protobuf field .grafeas.v1.SlsaProvenance.SlsaCompleteness completeness = 4; - * @param \Grafeas\V1\SlsaProvenance\SlsaCompleteness $var - * @return $this - */ - public function setCompleteness($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenance\SlsaCompleteness::class); - $this->completeness = $var; - - return $this; - } - - /** - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * - * Generated from protobuf field bool reproducible = 5; - * @return bool - */ - public function getReproducible() - { - return $this->reproducible; - } - - /** - * If true, the builder claims that running the recipe on materials will - * produce bit-for-bit identical output. - * - * Generated from protobuf field bool reproducible = 5; - * @param bool $var - * @return $this - */ - public function setReproducible($var) - { - GPBUtil::checkBool($var); - $this->reproducible = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaMetadata::class, \Grafeas\V1\SlsaProvenance_SlsaMetadata::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaRecipe.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaRecipe.php deleted file mode 100644 index a448a91e95fb..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenance/SlsaRecipe.php +++ /dev/null @@ -1,296 +0,0 @@ -grafeas.v1.SlsaProvenance.SlsaRecipe - */ -class SlsaRecipe extends \Google\Protobuf\Internal\Message -{ - /** - * URI indicating what type of recipe was performed. It determines the - * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and - * materials. - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * - * Generated from protobuf field int64 defined_in_material = 2; - */ - protected $defined_in_material = 0; - /** - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For - * example, if the recipe type were "make", then this would reference the - * directory in which to run make as well as which target to use. - * - * Generated from protobuf field string entry_point = 3; - */ - protected $entry_point = ''; - /** - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the - * recipe type were "make", then this might be the flags passed to make - * aside from the target, which is captured in recipe.entryPoint. Depending - * on the recipe Type, the structure may be different. - * - * Generated from protobuf field .google.protobuf.Any arguments = 4; - */ - protected $arguments = null; - /** - * Any other builder-controlled inputs necessary for correctly evaluating - * the recipe. Usually only needed for reproducing the build but not - * evaluated as part of policy. Depending on the recipe Type, the structure - * may be different. - * - * Generated from protobuf field .google.protobuf.Any environment = 5; - */ - protected $environment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * URI indicating what type of recipe was performed. It determines the - * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and - * materials. - * @type int|string $defined_in_material - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * @type string $entry_point - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For - * example, if the recipe type were "make", then this would reference the - * directory in which to run make as well as which target to use. - * @type \Google\Protobuf\Any $arguments - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the - * recipe type were "make", then this might be the flags passed to make - * aside from the target, which is captured in recipe.entryPoint. Depending - * on the recipe Type, the structure may be different. - * @type \Google\Protobuf\Any $environment - * Any other builder-controlled inputs necessary for correctly evaluating - * the recipe. Usually only needed for reproducing the build but not - * evaluated as part of policy. Depending on the recipe Type, the structure - * may be different. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenance::initOnce(); - parent::__construct($data); - } - - /** - * URI indicating what type of recipe was performed. It determines the - * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and - * materials. - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * URI indicating what type of recipe was performed. It determines the - * meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and - * materials. - * - * 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; - } - - /** - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * - * Generated from protobuf field int64 defined_in_material = 2; - * @return int|string - */ - public function getDefinedInMaterial() - { - return $this->defined_in_material; - } - - /** - * Index in materials containing the recipe steps that are not implied by - * recipe.type. For example, if the recipe type were "make", then this would - * point to the source containing the Makefile, not the make program itself. - * Set to -1 if the recipe doesn't come from a material, as zero is default - * unset value for int64. - * - * Generated from protobuf field int64 defined_in_material = 2; - * @param int|string $var - * @return $this - */ - public function setDefinedInMaterial($var) - { - GPBUtil::checkInt64($var); - $this->defined_in_material = $var; - - return $this; - } - - /** - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For - * example, if the recipe type were "make", then this would reference the - * directory in which to run make as well as which target to use. - * - * Generated from protobuf field string entry_point = 3; - * @return string - */ - public function getEntryPoint() - { - return $this->entry_point; - } - - /** - * String identifying the entry point into the build. - * This is often a path to a configuration file and/or a target label within - * that file. The syntax and meaning are defined by recipe.type. For - * example, if the recipe type were "make", then this would reference the - * directory in which to run make as well as which target to use. - * - * Generated from protobuf field string entry_point = 3; - * @param string $var - * @return $this - */ - public function setEntryPoint($var) - { - GPBUtil::checkString($var, True); - $this->entry_point = $var; - - return $this; - } - - /** - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the - * recipe type were "make", then this might be the flags passed to make - * aside from the target, which is captured in recipe.entryPoint. Depending - * on the recipe Type, the structure may be different. - * - * Generated from protobuf field .google.protobuf.Any arguments = 4; - * @return \Google\Protobuf\Any|null - */ - public function getArguments() - { - return $this->arguments; - } - - public function hasArguments() - { - return isset($this->arguments); - } - - public function clearArguments() - { - unset($this->arguments); - } - - /** - * Collection of all external inputs that influenced the build on top of - * recipe.definedInMaterial and recipe.entryPoint. For example, if the - * recipe type were "make", then this might be the flags passed to make - * aside from the target, which is captured in recipe.entryPoint. Depending - * on the recipe Type, the structure may be different. - * - * Generated from protobuf field .google.protobuf.Any arguments = 4; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setArguments($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->arguments = $var; - - return $this; - } - - /** - * Any other builder-controlled inputs necessary for correctly evaluating - * the recipe. Usually only needed for reproducing the build but not - * evaluated as part of policy. Depending on the recipe Type, the structure - * may be different. - * - * Generated from protobuf field .google.protobuf.Any environment = 5; - * @return \Google\Protobuf\Any|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * Any other builder-controlled inputs necessary for correctly evaluating - * the recipe. Usually only needed for reproducing the build but not - * evaluated as part of policy. Depending on the recipe Type, the structure - * may be different. - * - * Generated from protobuf field .google.protobuf.Any environment = 5; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->environment = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaRecipe::class, \Grafeas\V1\SlsaProvenance_SlsaRecipe::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo.php deleted file mode 100644 index c066b7a6521b..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo.php +++ /dev/null @@ -1,235 +0,0 @@ -grafeas.v1.SlsaProvenanceZeroTwo - */ -class SlsaProvenanceZeroTwo extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - */ - protected $builder = null; - /** - * Generated from protobuf field string build_type = 2; - */ - protected $build_type = ''; - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - */ - protected $invocation = null; - /** - * Generated from protobuf field .google.protobuf.Struct build_config = 4; - */ - protected $build_config = null; - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - */ - protected $metadata = null; - /** - * Generated from protobuf field repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - */ - private $materials; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaBuilder $builder - * @type string $build_type - * @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaInvocation $invocation - * @type \Google\Protobuf\Struct $build_config - * @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMetadata $metadata - * @type array<\Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMaterial>|\Google\Protobuf\Internal\RepeatedField $materials - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaBuilder|null - */ - public function getBuilder() - { - return $this->builder; - } - - public function hasBuilder() - { - return isset($this->builder); - } - - public function clearBuilder() - { - unset($this->builder); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder builder = 1; - * @param \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaBuilder $var - * @return $this - */ - public function setBuilder($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaBuilder::class); - $this->builder = $var; - - return $this; - } - - /** - * Generated from protobuf field string build_type = 2; - * @return string - */ - public function getBuildType() - { - return $this->build_type; - } - - /** - * Generated from protobuf field string build_type = 2; - * @param string $var - * @return $this - */ - public function setBuildType($var) - { - GPBUtil::checkString($var, True); - $this->build_type = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaInvocation|null - */ - public function getInvocation() - { - return $this->invocation; - } - - public function hasInvocation() - { - return isset($this->invocation); - } - - public function clearInvocation() - { - unset($this->invocation); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation invocation = 3; - * @param \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaInvocation $var - * @return $this - */ - public function setInvocation($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaInvocation::class); - $this->invocation = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.protobuf.Struct build_config = 4; - * @return \Google\Protobuf\Struct|null - */ - public function getBuildConfig() - { - return $this->build_config; - } - - public function hasBuildConfig() - { - return isset($this->build_config); - } - - public function clearBuildConfig() - { - unset($this->build_config); - } - - /** - * Generated from protobuf field .google.protobuf.Struct build_config = 4; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setBuildConfig($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->build_config = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMetadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata metadata = 5; - * @param \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMetadata::class); - $this->metadata = $var; - - return $this; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMaterials() - { - return $this->materials; - } - - /** - * Generated from protobuf field repeated .grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial materials = 6; - * @param array<\Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMaterial>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMaterials($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaMaterial::class); - $this->materials = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaBuilder.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaBuilder.php deleted file mode 100644 index 8029c7d4c110..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaBuilder.php +++ /dev/null @@ -1,64 +0,0 @@ -grafeas.v1.SlsaProvenanceZeroTwo.SlsaBuilder - */ -class SlsaBuilder extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * 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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaBuilder::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaBuilder::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaCompleteness.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaCompleteness.php deleted file mode 100644 index dcb6e0a819c6..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaCompleteness.php +++ /dev/null @@ -1,118 +0,0 @@ -grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness - */ -class SlsaCompleteness extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field bool parameters = 1; - */ - protected $parameters = false; - /** - * Generated from protobuf field bool environment = 2; - */ - protected $environment = false; - /** - * Generated from protobuf field bool materials = 3; - */ - protected $materials = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $parameters - * @type bool $environment - * @type bool $materials - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field bool parameters = 1; - * @return bool - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Generated from protobuf field bool parameters = 1; - * @param bool $var - * @return $this - */ - public function setParameters($var) - { - GPBUtil::checkBool($var); - $this->parameters = $var; - - return $this; - } - - /** - * Generated from protobuf field bool environment = 2; - * @return bool - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * Generated from protobuf field bool environment = 2; - * @param bool $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkBool($var); - $this->environment = $var; - - return $this; - } - - /** - * Generated from protobuf field bool materials = 3; - * @return bool - */ - public function getMaterials() - { - return $this->materials; - } - - /** - * Generated from protobuf field bool materials = 3; - * @param bool $var - * @return $this - */ - public function setMaterials($var) - { - GPBUtil::checkBool($var); - $this->materials = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaCompleteness::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaCompleteness::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaConfigSource.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaConfigSource.php deleted file mode 100644 index 236b9d685397..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaConfigSource.php +++ /dev/null @@ -1,118 +0,0 @@ -grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource - */ -class SlsaConfigSource extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * Generated from protobuf field map digest = 2; - */ - private $digest; - /** - * Generated from protobuf field string entry_point = 3; - */ - protected $entry_point = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * @type array|\Google\Protobuf\Internal\MapField $digest - * @type string $entry_point - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * 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; - } - - /** - * Generated from protobuf field map digest = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDigest() - { - return $this->digest; - } - - /** - * Generated from protobuf field map digest = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDigest($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->digest = $arr; - - return $this; - } - - /** - * Generated from protobuf field string entry_point = 3; - * @return string - */ - public function getEntryPoint() - { - return $this->entry_point; - } - - /** - * Generated from protobuf field string entry_point = 3; - * @param string $var - * @return $this - */ - public function setEntryPoint($var) - { - GPBUtil::checkString($var, True); - $this->entry_point = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaConfigSource::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaConfigSource::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaInvocation.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaInvocation.php deleted file mode 100644 index 14076ccc4655..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaInvocation.php +++ /dev/null @@ -1,147 +0,0 @@ -grafeas.v1.SlsaProvenanceZeroTwo.SlsaInvocation - */ -class SlsaInvocation extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - */ - protected $config_source = null; - /** - * Generated from protobuf field .google.protobuf.Struct parameters = 2; - */ - protected $parameters = null; - /** - * Generated from protobuf field .google.protobuf.Struct environment = 3; - */ - protected $environment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaConfigSource $config_source - * @type \Google\Protobuf\Struct $parameters - * @type \Google\Protobuf\Struct $environment - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaConfigSource|null - */ - public function getConfigSource() - { - return $this->config_source; - } - - public function hasConfigSource() - { - return isset($this->config_source); - } - - public function clearConfigSource() - { - unset($this->config_source); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaConfigSource config_source = 1; - * @param \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaConfigSource $var - * @return $this - */ - public function setConfigSource($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaConfigSource::class); - $this->config_source = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.protobuf.Struct parameters = 2; - * @return \Google\Protobuf\Struct|null - */ - public function getParameters() - { - return $this->parameters; - } - - public function hasParameters() - { - return isset($this->parameters); - } - - public function clearParameters() - { - unset($this->parameters); - } - - /** - * Generated from protobuf field .google.protobuf.Struct parameters = 2; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setParameters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->parameters = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.protobuf.Struct environment = 3; - * @return \Google\Protobuf\Struct|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * Generated from protobuf field .google.protobuf.Struct environment = 3; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->environment = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaInvocation::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaInvocation::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMaterial.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMaterial.php deleted file mode 100644 index e25c459a24c4..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMaterial.php +++ /dev/null @@ -1,91 +0,0 @@ -grafeas.v1.SlsaProvenanceZeroTwo.SlsaMaterial - */ -class SlsaMaterial extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * Generated from protobuf field map digest = 2; - */ - private $digest; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * @type array|\Google\Protobuf\Internal\MapField $digest - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * 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; - } - - /** - * Generated from protobuf field map digest = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDigest() - { - return $this->digest; - } - - /** - * Generated from protobuf field map digest = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDigest($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->digest = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaMaterial::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaMaterial::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMetadata.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMetadata.php deleted file mode 100644 index 611a1e272054..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo/SlsaMetadata.php +++ /dev/null @@ -1,201 +0,0 @@ -grafeas.v1.SlsaProvenanceZeroTwo.SlsaMetadata - */ -class SlsaMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string build_invocation_id = 1; - */ - protected $build_invocation_id = ''; - /** - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - */ - protected $build_started_on = null; - /** - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - */ - protected $build_finished_on = null; - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - */ - protected $completeness = null; - /** - * Generated from protobuf field bool reproducible = 5; - */ - protected $reproducible = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $build_invocation_id - * @type \Google\Protobuf\Timestamp $build_started_on - * @type \Google\Protobuf\Timestamp $build_finished_on - * @type \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaCompleteness $completeness - * @type bool $reproducible - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\SlsaProvenanceZeroTwo::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string build_invocation_id = 1; - * @return string - */ - public function getBuildInvocationId() - { - return $this->build_invocation_id; - } - - /** - * Generated from protobuf field string build_invocation_id = 1; - * @param string $var - * @return $this - */ - public function setBuildInvocationId($var) - { - GPBUtil::checkString($var, True); - $this->build_invocation_id = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getBuildStartedOn() - { - return $this->build_started_on; - } - - public function hasBuildStartedOn() - { - return isset($this->build_started_on); - } - - public function clearBuildStartedOn() - { - unset($this->build_started_on); - } - - /** - * Generated from protobuf field .google.protobuf.Timestamp build_started_on = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setBuildStartedOn($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->build_started_on = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getBuildFinishedOn() - { - return $this->build_finished_on; - } - - public function hasBuildFinishedOn() - { - return isset($this->build_finished_on); - } - - public function clearBuildFinishedOn() - { - unset($this->build_finished_on); - } - - /** - * Generated from protobuf field .google.protobuf.Timestamp build_finished_on = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setBuildFinishedOn($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->build_finished_on = $var; - - return $this; - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @return \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaCompleteness|null - */ - public function getCompleteness() - { - return $this->completeness; - } - - public function hasCompleteness() - { - return isset($this->completeness); - } - - public function clearCompleteness() - { - unset($this->completeness); - } - - /** - * Generated from protobuf field .grafeas.v1.SlsaProvenanceZeroTwo.SlsaCompleteness completeness = 4; - * @param \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaCompleteness $var - * @return $this - */ - public function setCompleteness($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SlsaProvenanceZeroTwo\SlsaCompleteness::class); - $this->completeness = $var; - - return $this; - } - - /** - * Generated from protobuf field bool reproducible = 5; - * @return bool - */ - public function getReproducible() - { - return $this->reproducible; - } - - /** - * Generated from protobuf field bool reproducible = 5; - * @param bool $var - * @return $this - */ - public function setReproducible($var) - { - GPBUtil::checkBool($var); - $this->reproducible = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlsaMetadata::class, \Grafeas\V1\SlsaProvenanceZeroTwo_SlsaMetadata::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaBuilder.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaBuilder.php deleted file mode 100644 index 47d4e33cdfd2..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SlsaProvenanceZeroTwo_SlsaBuilder.php +++ /dev/null @@ -1,16 +0,0 @@ -grafeas.v1.Source - */ -class Source extends \Google\Protobuf\Internal\Message -{ - /** - * If provided, the input binary artifacts for the build came from this - * location. - * - * Generated from protobuf field string artifact_storage_source_uri = 1; - */ - protected $artifact_storage_source_uri = ''; - /** - * Hash(es) of the build source, which can be used to verify that the original - * source integrity was maintained in the build. - * The keys to this map are file paths used as build source and the values - * contain the hash values for those files. - * If the build source came in a single package such as a gzipped tarfile - * (.tar.gz), the FileHash will be for the single path to that file. - * - * Generated from protobuf field map file_hashes = 2; - */ - private $file_hashes; - /** - * If provided, the source code used for the build came from this location. - * - * Generated from protobuf field .grafeas.v1.SourceContext context = 3; - */ - protected $context = null; - /** - * If provided, some of the source code used for the build may be found in - * these locations, in the case where the source repository had multiple - * remotes or submodules. This list will not include the context specified in - * the context field. - * - * Generated from protobuf field repeated .grafeas.v1.SourceContext additional_contexts = 4; - */ - private $additional_contexts; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $artifact_storage_source_uri - * If provided, the input binary artifacts for the build came from this - * location. - * @type array|\Google\Protobuf\Internal\MapField $file_hashes - * Hash(es) of the build source, which can be used to verify that the original - * source integrity was maintained in the build. - * The keys to this map are file paths used as build source and the values - * contain the hash values for those files. - * If the build source came in a single package such as a gzipped tarfile - * (.tar.gz), the FileHash will be for the single path to that file. - * @type \Grafeas\V1\SourceContext $context - * If provided, the source code used for the build came from this location. - * @type array<\Grafeas\V1\SourceContext>|\Google\Protobuf\Internal\RepeatedField $additional_contexts - * If provided, some of the source code used for the build may be found in - * these locations, in the case where the source repository had multiple - * remotes or submodules. This list will not include the context specified in - * the context field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * If provided, the input binary artifacts for the build came from this - * location. - * - * Generated from protobuf field string artifact_storage_source_uri = 1; - * @return string - */ - public function getArtifactStorageSourceUri() - { - return $this->artifact_storage_source_uri; - } - - /** - * If provided, the input binary artifacts for the build came from this - * location. - * - * Generated from protobuf field string artifact_storage_source_uri = 1; - * @param string $var - * @return $this - */ - public function setArtifactStorageSourceUri($var) - { - GPBUtil::checkString($var, True); - $this->artifact_storage_source_uri = $var; - - return $this; - } - - /** - * Hash(es) of the build source, which can be used to verify that the original - * source integrity was maintained in the build. - * The keys to this map are file paths used as build source and the values - * contain the hash values for those files. - * If the build source came in a single package such as a gzipped tarfile - * (.tar.gz), the FileHash will be for the single path to that file. - * - * Generated from protobuf field map file_hashes = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getFileHashes() - { - return $this->file_hashes; - } - - /** - * Hash(es) of the build source, which can be used to verify that the original - * source integrity was maintained in the build. - * The keys to this map are file paths used as build source and the values - * contain the hash values for those files. - * If the build source came in a single package such as a gzipped tarfile - * (.tar.gz), the FileHash will be for the single path to that file. - * - * Generated from protobuf field map file_hashes = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setFileHashes($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\FileHashes::class); - $this->file_hashes = $arr; - - return $this; - } - - /** - * If provided, the source code used for the build came from this location. - * - * Generated from protobuf field .grafeas.v1.SourceContext context = 3; - * @return \Grafeas\V1\SourceContext|null - */ - public function getContext() - { - return $this->context; - } - - public function hasContext() - { - return isset($this->context); - } - - public function clearContext() - { - unset($this->context); - } - - /** - * If provided, the source code used for the build came from this location. - * - * Generated from protobuf field .grafeas.v1.SourceContext context = 3; - * @param \Grafeas\V1\SourceContext $var - * @return $this - */ - public function setContext($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\SourceContext::class); - $this->context = $var; - - return $this; - } - - /** - * If provided, some of the source code used for the build may be found in - * these locations, in the case where the source repository had multiple - * remotes or submodules. This list will not include the context specified in - * the context field. - * - * Generated from protobuf field repeated .grafeas.v1.SourceContext additional_contexts = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdditionalContexts() - { - return $this->additional_contexts; - } - - /** - * If provided, some of the source code used for the build may be found in - * these locations, in the case where the source repository had multiple - * remotes or submodules. This list will not include the context specified in - * the context field. - * - * Generated from protobuf field repeated .grafeas.v1.SourceContext additional_contexts = 4; - * @param array<\Grafeas\V1\SourceContext>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdditionalContexts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\SourceContext::class); - $this->additional_contexts = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SourceContext.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SourceContext.php deleted file mode 100644 index fced17b0d002..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/SourceContext.php +++ /dev/null @@ -1,176 +0,0 @@ -grafeas.v1.SourceContext - */ -class SourceContext extends \Google\Protobuf\Internal\Message -{ - /** - * Labels with user defined metadata. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - protected $context; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\CloudRepoSourceContext $cloud_repo - * A SourceContext referring to a revision in a Google Cloud Source Repo. - * @type \Grafeas\V1\GerritSourceContext $gerrit - * A SourceContext referring to a Gerrit project. - * @type \Grafeas\V1\GitSourceContext $git - * A SourceContext referring to any third party Git repo (e.g., GitHub). - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels with user defined metadata. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Provenance::initOnce(); - parent::__construct($data); - } - - /** - * A SourceContext referring to a revision in a Google Cloud Source Repo. - * - * Generated from protobuf field .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @return \Grafeas\V1\CloudRepoSourceContext|null - */ - public function getCloudRepo() - { - return $this->readOneof(1); - } - - public function hasCloudRepo() - { - return $this->hasOneof(1); - } - - /** - * A SourceContext referring to a revision in a Google Cloud Source Repo. - * - * Generated from protobuf field .grafeas.v1.CloudRepoSourceContext cloud_repo = 1; - * @param \Grafeas\V1\CloudRepoSourceContext $var - * @return $this - */ - public function setCloudRepo($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\CloudRepoSourceContext::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A SourceContext referring to a Gerrit project. - * - * Generated from protobuf field .grafeas.v1.GerritSourceContext gerrit = 2; - * @return \Grafeas\V1\GerritSourceContext|null - */ - public function getGerrit() - { - return $this->readOneof(2); - } - - public function hasGerrit() - { - return $this->hasOneof(2); - } - - /** - * A SourceContext referring to a Gerrit project. - * - * Generated from protobuf field .grafeas.v1.GerritSourceContext gerrit = 2; - * @param \Grafeas\V1\GerritSourceContext $var - * @return $this - */ - public function setGerrit($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\GerritSourceContext::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A SourceContext referring to any third party Git repo (e.g., GitHub). - * - * Generated from protobuf field .grafeas.v1.GitSourceContext git = 3; - * @return \Grafeas\V1\GitSourceContext|null - */ - public function getGit() - { - return $this->readOneof(3); - } - - public function hasGit() - { - return $this->hasOneof(3); - } - - /** - * A SourceContext referring to any third party Git repo (e.g., GitHub). - * - * Generated from protobuf field .grafeas.v1.GitSourceContext git = 3; - * @param \Grafeas\V1\GitSourceContext $var - * @return $this - */ - public function setGit($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\GitSourceContext::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Labels with user defined metadata. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels with user defined metadata. - * - * 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; - } - - /** - * @return string - */ - public function getContext() - { - return $this->whichOneof("context"); - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Subject.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Subject.php deleted file mode 100644 index 14d4fa6fe2e7..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Subject.php +++ /dev/null @@ -1,104 +0,0 @@ -grafeas.v1.Subject - */ -class Subject extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * `"": ""` - * Algorithms can be e.g. sha256, sha512 - * See - * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet - * - * Generated from protobuf field map digest = 2; - */ - private $digest; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * @type array|\Google\Protobuf\Internal\MapField $digest - * `"": ""` - * Algorithms can be e.g. sha256, sha512 - * See - * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\IntotoStatement::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * 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; - } - - /** - * `"": ""` - * Algorithms can be e.g. sha256, sha512 - * See - * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet - * - * Generated from protobuf field map digest = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDigest() - { - return $this->digest; - } - - /** - * `"": ""` - * Algorithms can be e.g. sha256, sha512 - * See - * https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet - * - * Generated from protobuf field map digest = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDigest($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->digest = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateNoteRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateNoteRequest.php deleted file mode 100644 index f9630fde9793..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateNoteRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -grafeas.v1.UpdateNoteRequest - */ -class UpdateNoteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The updated note. - * - * Generated from protobuf field .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $note = null; - /** - * The fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @type \Grafeas\V1\Note $note - * The updated note. - * @type \Google\Protobuf\FieldMask $update_mask - * The fields to update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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; - } - - /** - * The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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; - } - - /** - * The updated note. - * - * Generated from protobuf field .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Grafeas\V1\Note|null - */ - public function getNote() - { - return $this->note; - } - - public function hasNote() - { - return isset($this->note); - } - - public function clearNote() - { - unset($this->note); - } - - /** - * The updated note. - * - * Generated from protobuf field .grafeas.v1.Note note = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Grafeas\V1\Note $var - * @return $this - */ - public function setNote($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Note::class); - $this->note = $var; - - return $this; - } - - /** - * The fields to update. - * - * 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); - } - - /** - * The fields to update. - * - * 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/Grafeas/v1/proto/src/Grafeas/V1/UpdateOccurrenceRequest.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateOccurrenceRequest.php deleted file mode 100644 index 6e79019d4dec..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpdateOccurrenceRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -grafeas.v1.UpdateOccurrenceRequest - */ -class UpdateOccurrenceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The updated occurrence. - * - * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $occurrence = null; - /** - * The fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @type \Grafeas\V1\Occurrence $occurrence - * The updated occurrence. - * @type \Google\Protobuf\FieldMask $update_mask - * The fields to update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Grafeas::initOnce(); - parent::__construct($data); - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; - } - - /** - * The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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; - } - - /** - * The updated occurrence. - * - * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Grafeas\V1\Occurrence|null - */ - public function getOccurrence() - { - return $this->occurrence; - } - - public function hasOccurrence() - { - return isset($this->occurrence); - } - - public function clearOccurrence() - { - unset($this->occurrence); - } - - /** - * The updated occurrence. - * - * Generated from protobuf field .grafeas.v1.Occurrence occurrence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Grafeas\V1\Occurrence $var - * @return $this - */ - public function setOccurrence($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Occurrence::class); - $this->occurrence = $var; - - return $this; - } - - /** - * The fields to update. - * - * 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); - } - - /** - * The fields to update. - * - * 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/Grafeas/v1/proto/src/Grafeas/V1/UpgradeDistribution.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeDistribution.php deleted file mode 100644 index b5b16a112b02..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeDistribution.php +++ /dev/null @@ -1,187 +0,0 @@ -grafeas.v1.UpgradeDistribution - */ -class UpgradeDistribution extends \Google\Protobuf\Internal\Message -{ - /** - * Required - The specific operating system this metadata applies to. See - * https://cpe.mitre.org/specification/. - * - * Generated from protobuf field string cpe_uri = 1; - */ - protected $cpe_uri = ''; - /** - * The operating system classification of this Upgrade, as specified by the - * upstream operating system upgrade feed. For Windows the classification is - * one of the category_ids listed at - * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) - * - * Generated from protobuf field string classification = 2; - */ - protected $classification = ''; - /** - * The severity as specified by the upstream operating system. - * - * Generated from protobuf field string severity = 3; - */ - protected $severity = ''; - /** - * The cve tied to this Upgrade. - * - * Generated from protobuf field repeated string cve = 4; - */ - private $cve; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cpe_uri - * Required - The specific operating system this metadata applies to. See - * https://cpe.mitre.org/specification/. - * @type string $classification - * The operating system classification of this Upgrade, as specified by the - * upstream operating system upgrade feed. For Windows the classification is - * one of the category_ids listed at - * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) - * @type string $severity - * The severity as specified by the upstream operating system. - * @type array|\Google\Protobuf\Internal\RepeatedField $cve - * The cve tied to this Upgrade. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); - parent::__construct($data); - } - - /** - * Required - The specific operating system this metadata applies to. See - * https://cpe.mitre.org/specification/. - * - * Generated from protobuf field string cpe_uri = 1; - * @return string - */ - public function getCpeUri() - { - return $this->cpe_uri; - } - - /** - * Required - The specific operating system this metadata applies to. See - * https://cpe.mitre.org/specification/. - * - * Generated from protobuf field string cpe_uri = 1; - * @param string $var - * @return $this - */ - public function setCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->cpe_uri = $var; - - return $this; - } - - /** - * The operating system classification of this Upgrade, as specified by the - * upstream operating system upgrade feed. For Windows the classification is - * one of the category_ids listed at - * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) - * - * Generated from protobuf field string classification = 2; - * @return string - */ - public function getClassification() - { - return $this->classification; - } - - /** - * The operating system classification of this Upgrade, as specified by the - * upstream operating system upgrade feed. For Windows the classification is - * one of the category_ids listed at - * https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85) - * - * Generated from protobuf field string classification = 2; - * @param string $var - * @return $this - */ - public function setClassification($var) - { - GPBUtil::checkString($var, True); - $this->classification = $var; - - return $this; - } - - /** - * The severity as specified by the upstream operating system. - * - * Generated from protobuf field string severity = 3; - * @return string - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * The severity as specified by the upstream operating system. - * - * 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; - } - - /** - * The cve tied to this Upgrade. - * - * Generated from protobuf field repeated string cve = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCve() - { - return $this->cve; - } - - /** - * The cve tied to this Upgrade. - * - * Generated from protobuf field repeated string cve = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCve($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->cve = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeNote.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeNote.php deleted file mode 100644 index b91b637b0c3b..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeNote.php +++ /dev/null @@ -1,196 +0,0 @@ -grafeas.v1.UpgradeNote - */ -class UpgradeNote extends \Google\Protobuf\Internal\Message -{ - /** - * Required for non-Windows OS. The package this Upgrade is for. - * - * Generated from protobuf field string package = 1; - */ - protected $package = ''; - /** - * Required for non-Windows OS. The version of the package in machine + human - * readable form. - * - * Generated from protobuf field .grafeas.v1.Version version = 2; - */ - protected $version = null; - /** - * Metadata about the upgrade for each specific operating system. - * - * Generated from protobuf field repeated .grafeas.v1.UpgradeDistribution distributions = 3; - */ - private $distributions; - /** - * Required for Windows OS. Represents the metadata about the Windows update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 4; - */ - protected $windows_update = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $package - * Required for non-Windows OS. The package this Upgrade is for. - * @type \Grafeas\V1\Version $version - * Required for non-Windows OS. The version of the package in machine + human - * readable form. - * @type array<\Grafeas\V1\UpgradeDistribution>|\Google\Protobuf\Internal\RepeatedField $distributions - * Metadata about the upgrade for each specific operating system. - * @type \Grafeas\V1\WindowsUpdate $windows_update - * Required for Windows OS. Represents the metadata about the Windows update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); - parent::__construct($data); - } - - /** - * Required for non-Windows OS. The package this Upgrade is for. - * - * Generated from protobuf field string package = 1; - * @return string - */ - public function getPackage() - { - return $this->package; - } - - /** - * Required for non-Windows OS. The package this Upgrade is for. - * - * Generated from protobuf field string package = 1; - * @param string $var - * @return $this - */ - public function setPackage($var) - { - GPBUtil::checkString($var, True); - $this->package = $var; - - return $this; - } - - /** - * Required for non-Windows OS. The version of the package in machine + human - * readable form. - * - * Generated from protobuf field .grafeas.v1.Version version = 2; - * @return \Grafeas\V1\Version|null - */ - public function getVersion() - { - return $this->version; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * Required for non-Windows OS. The version of the package in machine + human - * readable form. - * - * Generated from protobuf field .grafeas.v1.Version version = 2; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->version = $var; - - return $this; - } - - /** - * Metadata about the upgrade for each specific operating system. - * - * Generated from protobuf field repeated .grafeas.v1.UpgradeDistribution distributions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDistributions() - { - return $this->distributions; - } - - /** - * Metadata about the upgrade for each specific operating system. - * - * Generated from protobuf field repeated .grafeas.v1.UpgradeDistribution distributions = 3; - * @param array<\Grafeas\V1\UpgradeDistribution>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDistributions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\UpgradeDistribution::class); - $this->distributions = $arr; - - return $this; - } - - /** - * Required for Windows OS. Represents the metadata about the Windows update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 4; - * @return \Grafeas\V1\WindowsUpdate|null - */ - public function getWindowsUpdate() - { - return $this->windows_update; - } - - public function hasWindowsUpdate() - { - return isset($this->windows_update); - } - - public function clearWindowsUpdate() - { - unset($this->windows_update); - } - - /** - * Required for Windows OS. Represents the metadata about the Windows update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 4; - * @param \Grafeas\V1\WindowsUpdate $var - * @return $this - */ - public function setWindowsUpdate($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\WindowsUpdate::class); - $this->windows_update = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeOccurrence.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeOccurrence.php deleted file mode 100644 index 15c700918d0f..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/UpgradeOccurrence.php +++ /dev/null @@ -1,215 +0,0 @@ -grafeas.v1.UpgradeOccurrence - */ -class UpgradeOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * Required for non-Windows OS. The package this Upgrade is for. - * - * Generated from protobuf field string package = 1; - */ - protected $package = ''; - /** - * Required for non-Windows OS. The version of the package in a machine + - * human readable form. - * - * Generated from protobuf field .grafeas.v1.Version parsed_version = 3; - */ - protected $parsed_version = null; - /** - * Metadata about the upgrade for available for the specific operating system - * for the resource_url. This allows efficient filtering, as well as - * making it easier to use the occurrence. - * - * Generated from protobuf field .grafeas.v1.UpgradeDistribution distribution = 4; - */ - protected $distribution = null; - /** - * Required for Windows OS. Represents the metadata about the Windows update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 5; - */ - protected $windows_update = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $package - * Required for non-Windows OS. The package this Upgrade is for. - * @type \Grafeas\V1\Version $parsed_version - * Required for non-Windows OS. The version of the package in a machine + - * human readable form. - * @type \Grafeas\V1\UpgradeDistribution $distribution - * Metadata about the upgrade for available for the specific operating system - * for the resource_url. This allows efficient filtering, as well as - * making it easier to use the occurrence. - * @type \Grafeas\V1\WindowsUpdate $windows_update - * Required for Windows OS. Represents the metadata about the Windows update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); - parent::__construct($data); - } - - /** - * Required for non-Windows OS. The package this Upgrade is for. - * - * Generated from protobuf field string package = 1; - * @return string - */ - public function getPackage() - { - return $this->package; - } - - /** - * Required for non-Windows OS. The package this Upgrade is for. - * - * Generated from protobuf field string package = 1; - * @param string $var - * @return $this - */ - public function setPackage($var) - { - GPBUtil::checkString($var, True); - $this->package = $var; - - return $this; - } - - /** - * Required for non-Windows OS. The version of the package in a machine + - * human readable form. - * - * Generated from protobuf field .grafeas.v1.Version parsed_version = 3; - * @return \Grafeas\V1\Version|null - */ - public function getParsedVersion() - { - return $this->parsed_version; - } - - public function hasParsedVersion() - { - return isset($this->parsed_version); - } - - public function clearParsedVersion() - { - unset($this->parsed_version); - } - - /** - * Required for non-Windows OS. The version of the package in a machine + - * human readable form. - * - * Generated from protobuf field .grafeas.v1.Version parsed_version = 3; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setParsedVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->parsed_version = $var; - - return $this; - } - - /** - * Metadata about the upgrade for available for the specific operating system - * for the resource_url. This allows efficient filtering, as well as - * making it easier to use the occurrence. - * - * Generated from protobuf field .grafeas.v1.UpgradeDistribution distribution = 4; - * @return \Grafeas\V1\UpgradeDistribution|null - */ - public function getDistribution() - { - return $this->distribution; - } - - public function hasDistribution() - { - return isset($this->distribution); - } - - public function clearDistribution() - { - unset($this->distribution); - } - - /** - * Metadata about the upgrade for available for the specific operating system - * for the resource_url. This allows efficient filtering, as well as - * making it easier to use the occurrence. - * - * Generated from protobuf field .grafeas.v1.UpgradeDistribution distribution = 4; - * @param \Grafeas\V1\UpgradeDistribution $var - * @return $this - */ - public function setDistribution($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\UpgradeDistribution::class); - $this->distribution = $var; - - return $this; - } - - /** - * Required for Windows OS. Represents the metadata about the Windows update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 5; - * @return \Grafeas\V1\WindowsUpdate|null - */ - public function getWindowsUpdate() - { - return $this->windows_update; - } - - public function hasWindowsUpdate() - { - return isset($this->windows_update); - } - - public function clearWindowsUpdate() - { - unset($this->windows_update); - } - - /** - * Required for Windows OS. Represents the metadata about the Windows update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate windows_update = 5; - * @param \Grafeas\V1\WindowsUpdate $var - * @return $this - */ - public function setWindowsUpdate($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\WindowsUpdate::class); - $this->windows_update = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version.php deleted file mode 100644 index ed635362b2f0..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version.php +++ /dev/null @@ -1,269 +0,0 @@ -grafeas.v1.Version - */ -class Version extends \Google\Protobuf\Internal\Message -{ - /** - * Used to correct mistakes in the version numbering scheme. - * - * Generated from protobuf field int32 epoch = 1; - */ - protected $epoch = 0; - /** - * Required only when version kind is NORMAL. The main part of the version - * name. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - /** - * The iteration of the package build from the above version. - * - * Generated from protobuf field string revision = 3; - */ - protected $revision = ''; - /** - * Whether this version is specifying part of an inclusive range. Grafeas - * does not have the capability to specify version ranges; instead we have - * fields that specify start version and end versions. At times this is - * insufficient - we also need to specify whether the version is included in - * the range or is excluded from the range. This boolean is expected to be set - * to true when the version is included in a range. - * - * Generated from protobuf field bool inclusive = 6; - */ - protected $inclusive = false; - /** - * Required. Distinguishes between sentinel MIN/MAX versions and normal - * versions. - * - * Generated from protobuf field .grafeas.v1.Version.VersionKind kind = 4; - */ - protected $kind = 0; - /** - * Human readable version string. This string is of the form - * :- and is only set when kind is NORMAL. - * - * Generated from protobuf field string full_name = 5; - */ - protected $full_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $epoch - * Used to correct mistakes in the version numbering scheme. - * @type string $name - * Required only when version kind is NORMAL. The main part of the version - * name. - * @type string $revision - * The iteration of the package build from the above version. - * @type bool $inclusive - * Whether this version is specifying part of an inclusive range. Grafeas - * does not have the capability to specify version ranges; instead we have - * fields that specify start version and end versions. At times this is - * insufficient - we also need to specify whether the version is included in - * the range or is excluded from the range. This boolean is expected to be set - * to true when the version is included in a range. - * @type int $kind - * Required. Distinguishes between sentinel MIN/MAX versions and normal - * versions. - * @type string $full_name - * Human readable version string. This string is of the form - * :- and is only set when kind is NORMAL. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Package::initOnce(); - parent::__construct($data); - } - - /** - * Used to correct mistakes in the version numbering scheme. - * - * Generated from protobuf field int32 epoch = 1; - * @return int - */ - public function getEpoch() - { - return $this->epoch; - } - - /** - * Used to correct mistakes in the version numbering scheme. - * - * Generated from protobuf field int32 epoch = 1; - * @param int $var - * @return $this - */ - public function setEpoch($var) - { - GPBUtil::checkInt32($var); - $this->epoch = $var; - - return $this; - } - - /** - * Required only when version kind is NORMAL. The main part of the version - * name. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required only when version kind is NORMAL. The main part of the version - * name. - * - * 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; - } - - /** - * The iteration of the package build from the above version. - * - * Generated from protobuf field string revision = 3; - * @return string - */ - public function getRevision() - { - return $this->revision; - } - - /** - * The iteration of the package build from the above version. - * - * Generated from protobuf field string revision = 3; - * @param string $var - * @return $this - */ - public function setRevision($var) - { - GPBUtil::checkString($var, True); - $this->revision = $var; - - return $this; - } - - /** - * Whether this version is specifying part of an inclusive range. Grafeas - * does not have the capability to specify version ranges; instead we have - * fields that specify start version and end versions. At times this is - * insufficient - we also need to specify whether the version is included in - * the range or is excluded from the range. This boolean is expected to be set - * to true when the version is included in a range. - * - * Generated from protobuf field bool inclusive = 6; - * @return bool - */ - public function getInclusive() - { - return $this->inclusive; - } - - /** - * Whether this version is specifying part of an inclusive range. Grafeas - * does not have the capability to specify version ranges; instead we have - * fields that specify start version and end versions. At times this is - * insufficient - we also need to specify whether the version is included in - * the range or is excluded from the range. This boolean is expected to be set - * to true when the version is included in a range. - * - * Generated from protobuf field bool inclusive = 6; - * @param bool $var - * @return $this - */ - public function setInclusive($var) - { - GPBUtil::checkBool($var); - $this->inclusive = $var; - - return $this; - } - - /** - * Required. Distinguishes between sentinel MIN/MAX versions and normal - * versions. - * - * Generated from protobuf field .grafeas.v1.Version.VersionKind kind = 4; - * @return int - */ - public function getKind() - { - return $this->kind; - } - - /** - * Required. Distinguishes between sentinel MIN/MAX versions and normal - * versions. - * - * Generated from protobuf field .grafeas.v1.Version.VersionKind kind = 4; - * @param int $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Version\VersionKind::class); - $this->kind = $var; - - return $this; - } - - /** - * Human readable version string. This string is of the form - * :- and is only set when kind is NORMAL. - * - * Generated from protobuf field string full_name = 5; - * @return string - */ - public function getFullName() - { - return $this->full_name; - } - - /** - * Human readable version string. This string is of the form - * :- and is only set when kind is NORMAL. - * - * Generated from protobuf field string full_name = 5; - * @param string $var - * @return $this - */ - public function setFullName($var) - { - GPBUtil::checkString($var, True); - $this->full_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version/VersionKind.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version/VersionKind.php deleted file mode 100644 index d978c7d44cf5..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version/VersionKind.php +++ /dev/null @@ -1,71 +0,0 @@ -grafeas.v1.Version.VersionKind - */ -class VersionKind -{ - /** - * Unknown. - * - * Generated from protobuf enum VERSION_KIND_UNSPECIFIED = 0; - */ - const VERSION_KIND_UNSPECIFIED = 0; - /** - * A standard package version. - * - * Generated from protobuf enum NORMAL = 1; - */ - const NORMAL = 1; - /** - * A special version representing negative infinity. - * - * Generated from protobuf enum MINIMUM = 2; - */ - const MINIMUM = 2; - /** - * A special version representing positive infinity. - * - * Generated from protobuf enum MAXIMUM = 3; - */ - const MAXIMUM = 3; - - private static $valueToName = [ - self::VERSION_KIND_UNSPECIFIED => 'VERSION_KIND_UNSPECIFIED', - self::NORMAL => 'NORMAL', - self::MINIMUM => 'MINIMUM', - self::MAXIMUM => 'MAXIMUM', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VersionKind::class, \Grafeas\V1\Version_VersionKind::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version_VersionKind.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version_VersionKind.php deleted file mode 100644 index 681173bb0c70..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/Version_VersionKind.php +++ /dev/null @@ -1,16 +0,0 @@ -grafeas.v1.VulnerabilityNote - */ -class VulnerabilityNote extends \Google\Protobuf\Internal\Message -{ - /** - * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 - * where 0 indicates low severity and 10 indicates high severity. - * - * Generated from protobuf field float cvss_score = 1; - */ - protected $cvss_score = 0.0; - /** - * The note provider assigned severity of this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - */ - protected $severity = 0; - /** - * Details of all known distros and packages affected by this vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - */ - private $details; - /** - * The full description of the CVSSv3 for this vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSSv3 cvss_v3 = 4; - */ - protected $cvss_v3 = null; - /** - * Windows details get their own format because the information format and - * model don't match a normal detail. Specifically Windows updates are done as - * patches, thus Windows vulnerabilities really are a missing package, rather - * than a package being at an incorrect version. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - */ - private $windows_details; - /** - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * - * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 6; - */ - protected $source_update_time = null; - /** - * CVSS version used to populate cvss_score and severity. - * - * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 7; - */ - protected $cvss_version = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $cvss_score - * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 - * where 0 indicates low severity and 10 indicates high severity. - * @type int $severity - * The note provider assigned severity of this vulnerability. - * @type array<\Grafeas\V1\VulnerabilityNote\Detail>|\Google\Protobuf\Internal\RepeatedField $details - * Details of all known distros and packages affected by this vulnerability. - * @type \Grafeas\V1\CVSSv3 $cvss_v3 - * The full description of the CVSSv3 for this vulnerability. - * @type array<\Grafeas\V1\VulnerabilityNote\WindowsDetail>|\Google\Protobuf\Internal\RepeatedField $windows_details - * Windows details get their own format because the information format and - * model don't match a normal detail. Specifically Windows updates are done as - * patches, thus Windows vulnerabilities really are a missing package, rather - * than a package being at an incorrect version. - * @type \Google\Protobuf\Timestamp $source_update_time - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * @type int $cvss_version - * CVSS version used to populate cvss_score and severity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 - * where 0 indicates low severity and 10 indicates high severity. - * - * Generated from protobuf field float cvss_score = 1; - * @return float - */ - public function getCvssScore() - { - return $this->cvss_score; - } - - /** - * The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 - * where 0 indicates low severity and 10 indicates high severity. - * - * Generated from protobuf field float cvss_score = 1; - * @param float $var - * @return $this - */ - public function setCvssScore($var) - { - GPBUtil::checkFloat($var); - $this->cvss_score = $var; - - return $this; - } - - /** - * The note provider assigned severity of this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * The note provider assigned severity of this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * Details of all known distros and packages affected by this vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDetails() - { - return $this->details; - } - - /** - * Details of all known distros and packages affected by this vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.Detail details = 3; - * @param array<\Grafeas\V1\VulnerabilityNote\Detail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\VulnerabilityNote\Detail::class); - $this->details = $arr; - - return $this; - } - - /** - * The full description of the CVSSv3 for this vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @return \Grafeas\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. - * - * Generated from protobuf field .grafeas.v1.CVSSv3 cvss_v3 = 4; - * @param \Grafeas\V1\CVSSv3 $var - * @return $this - */ - public function setCvssV3($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\CVSSv3::class); - $this->cvss_v3 = $var; - - return $this; - } - - /** - * Windows details get their own format because the information format and - * model don't match a normal detail. Specifically Windows updates are done as - * patches, thus Windows vulnerabilities really are a missing package, rather - * than a package being at an incorrect version. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWindowsDetails() - { - return $this->windows_details; - } - - /** - * Windows details get their own format because the information format and - * model don't match a normal detail. Specifically Windows updates are done as - * patches, thus Windows vulnerabilities really are a missing package, rather - * than a package being at an incorrect version. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail windows_details = 5; - * @param array<\Grafeas\V1\VulnerabilityNote\WindowsDetail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWindowsDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\VulnerabilityNote\WindowsDetail::class); - $this->windows_details = $arr; - - return $this; - } - - /** - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * - * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSourceUpdateTime() - { - return $this->source_update_time; - } - - public function hasSourceUpdateTime() - { - return isset($this->source_update_time); - } - - public function clearSourceUpdateTime() - { - unset($this->source_update_time); - } - - /** - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * - * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSourceUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->source_update_time = $var; - - return $this; - } - - /** - * CVSS version used to populate cvss_score and severity. - * - * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 7; - * @return int - */ - public function getCvssVersion() - { - return $this->cvss_version; - } - - /** - * CVSS version used to populate cvss_score and severity. - * - * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 7; - * @param int $var - * @return $this - */ - public function setCvssVersion($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSVersion::class); - $this->cvss_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/Detail.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/Detail.php deleted file mode 100644 index 8bd53ea558d3..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/Detail.php +++ /dev/null @@ -1,645 +0,0 @@ -grafeas.v1.VulnerabilityNote.Detail - */ -class Detail extends \Google\Protobuf\Internal\Message -{ - /** - * The distro assigned severity of this vulnerability. - * - * Generated from protobuf field string severity_name = 1; - */ - protected $severity_name = ''; - /** - * A vendor-specific description of this vulnerability. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 3; - */ - protected $package_type = ''; - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * - * Generated from protobuf field string affected_cpe_uri = 4; - */ - protected $affected_cpe_uri = ''; - /** - * Required. The package this vulnerability affects. - * - * Generated from protobuf field string affected_package = 5; - */ - protected $affected_package = ''; - /** - * The version number at the start of an interval in which this - * vulnerability exists. A vulnerability can affect a package between - * version numbers that are disjoint sets of intervals (example: - * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be - * represented in its own Detail. If a specific affected version is provided - * by a vulnerability database, affected_version_start and - * affected_version_end will be the same in that Detail. - * - * Generated from protobuf field .grafeas.v1.Version affected_version_start = 6; - */ - protected $affected_version_start = null; - /** - * The version number at the end of an interval in which this vulnerability - * exists. A vulnerability can affect a package between version numbers - * that are disjoint sets of intervals (example: [1.0.0-1.1.0], - * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its - * own Detail. If a specific affected version is provided by a vulnerability - * database, affected_version_start and affected_version_end will be the - * same in that Detail. - * - * Generated from protobuf field .grafeas.v1.Version affected_version_end = 7; - */ - protected $affected_version_end = null; - /** - * The distro recommended [CPE URI](https://cpe.mitre.org/specification/) - * to update to that contains a fix for this vulnerability. It is possible - * for this to be different from the affected_cpe_uri. - * - * Generated from protobuf field string fixed_cpe_uri = 8; - */ - protected $fixed_cpe_uri = ''; - /** - * The distro recommended package to update to that contains a fix for this - * vulnerability. It is possible for this to be different from the - * affected_package. - * - * Generated from protobuf field string fixed_package = 9; - */ - protected $fixed_package = ''; - /** - * The distro recommended version to update to that contains a - * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no - * such version is yet available. - * - * Generated from protobuf field .grafeas.v1.Version fixed_version = 10; - */ - protected $fixed_version = null; - /** - * Whether this detail is obsolete. Occurrences are expected not to point to - * obsolete details. - * - * Generated from protobuf field bool is_obsolete = 11; - */ - protected $is_obsolete = false; - /** - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * - * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 12; - */ - protected $source_update_time = null; - /** - * The source from which the information in this Detail was obtained. - * - * Generated from protobuf field string source = 13; - */ - protected $source = ''; - /** - * The name of the vendor of the product. - * - * Generated from protobuf field string vendor = 14; - */ - protected $vendor = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $severity_name - * The distro assigned severity of this vulnerability. - * @type string $description - * A vendor-specific description of this vulnerability. - * @type string $package_type - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * @type string $affected_cpe_uri - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * @type string $affected_package - * Required. The package this vulnerability affects. - * @type \Grafeas\V1\Version $affected_version_start - * The version number at the start of an interval in which this - * vulnerability exists. A vulnerability can affect a package between - * version numbers that are disjoint sets of intervals (example: - * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be - * represented in its own Detail. If a specific affected version is provided - * by a vulnerability database, affected_version_start and - * affected_version_end will be the same in that Detail. - * @type \Grafeas\V1\Version $affected_version_end - * The version number at the end of an interval in which this vulnerability - * exists. A vulnerability can affect a package between version numbers - * that are disjoint sets of intervals (example: [1.0.0-1.1.0], - * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its - * own Detail. If a specific affected version is provided by a vulnerability - * database, affected_version_start and affected_version_end will be the - * same in that Detail. - * @type string $fixed_cpe_uri - * The distro recommended [CPE URI](https://cpe.mitre.org/specification/) - * to update to that contains a fix for this vulnerability. It is possible - * for this to be different from the affected_cpe_uri. - * @type string $fixed_package - * The distro recommended package to update to that contains a fix for this - * vulnerability. It is possible for this to be different from the - * affected_package. - * @type \Grafeas\V1\Version $fixed_version - * The distro recommended version to update to that contains a - * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no - * such version is yet available. - * @type bool $is_obsolete - * Whether this detail is obsolete. Occurrences are expected not to point to - * obsolete details. - * @type \Google\Protobuf\Timestamp $source_update_time - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * @type string $source - * The source from which the information in this Detail was obtained. - * @type string $vendor - * The name of the vendor of the product. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * The distro assigned severity of this vulnerability. - * - * Generated from protobuf field string severity_name = 1; - * @return string - */ - public function getSeverityName() - { - return $this->severity_name; - } - - /** - * The distro assigned severity of this vulnerability. - * - * Generated from protobuf field string severity_name = 1; - * @param string $var - * @return $this - */ - public function setSeverityName($var) - { - GPBUtil::checkString($var, True); - $this->severity_name = $var; - - return $this; - } - - /** - * A vendor-specific description of this vulnerability. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A vendor-specific description of this vulnerability. - * - * 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 type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 3; - * @return string - */ - public function getPackageType() - { - return $this->package_type; - } - - /** - * The type of package; whether native or non native (e.g., ruby gems, - * node.js packages, etc.). - * - * Generated from protobuf field string package_type = 3; - * @param string $var - * @return $this - */ - public function setPackageType($var) - { - GPBUtil::checkString($var, True); - $this->package_type = $var; - - return $this; - } - - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * - * Generated from protobuf field string affected_cpe_uri = 4; - * @return string - */ - public function getAffectedCpeUri() - { - return $this->affected_cpe_uri; - } - - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * - * Generated from protobuf field string affected_cpe_uri = 4; - * @param string $var - * @return $this - */ - public function setAffectedCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->affected_cpe_uri = $var; - - return $this; - } - - /** - * Required. The package this vulnerability affects. - * - * Generated from protobuf field string affected_package = 5; - * @return string - */ - public function getAffectedPackage() - { - return $this->affected_package; - } - - /** - * Required. The package this vulnerability affects. - * - * Generated from protobuf field string affected_package = 5; - * @param string $var - * @return $this - */ - public function setAffectedPackage($var) - { - GPBUtil::checkString($var, True); - $this->affected_package = $var; - - return $this; - } - - /** - * The version number at the start of an interval in which this - * vulnerability exists. A vulnerability can affect a package between - * version numbers that are disjoint sets of intervals (example: - * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be - * represented in its own Detail. If a specific affected version is provided - * by a vulnerability database, affected_version_start and - * affected_version_end will be the same in that Detail. - * - * Generated from protobuf field .grafeas.v1.Version affected_version_start = 6; - * @return \Grafeas\V1\Version|null - */ - public function getAffectedVersionStart() - { - return $this->affected_version_start; - } - - public function hasAffectedVersionStart() - { - return isset($this->affected_version_start); - } - - public function clearAffectedVersionStart() - { - unset($this->affected_version_start); - } - - /** - * The version number at the start of an interval in which this - * vulnerability exists. A vulnerability can affect a package between - * version numbers that are disjoint sets of intervals (example: - * [1.0.0-1.1.0], [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be - * represented in its own Detail. If a specific affected version is provided - * by a vulnerability database, affected_version_start and - * affected_version_end will be the same in that Detail. - * - * Generated from protobuf field .grafeas.v1.Version affected_version_start = 6; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setAffectedVersionStart($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->affected_version_start = $var; - - return $this; - } - - /** - * The version number at the end of an interval in which this vulnerability - * exists. A vulnerability can affect a package between version numbers - * that are disjoint sets of intervals (example: [1.0.0-1.1.0], - * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its - * own Detail. If a specific affected version is provided by a vulnerability - * database, affected_version_start and affected_version_end will be the - * same in that Detail. - * - * Generated from protobuf field .grafeas.v1.Version affected_version_end = 7; - * @return \Grafeas\V1\Version|null - */ - public function getAffectedVersionEnd() - { - return $this->affected_version_end; - } - - public function hasAffectedVersionEnd() - { - return isset($this->affected_version_end); - } - - public function clearAffectedVersionEnd() - { - unset($this->affected_version_end); - } - - /** - * The version number at the end of an interval in which this vulnerability - * exists. A vulnerability can affect a package between version numbers - * that are disjoint sets of intervals (example: [1.0.0-1.1.0], - * [2.4.6-2.4.8] and [4.5.6-4.6.8]) each of which will be represented in its - * own Detail. If a specific affected version is provided by a vulnerability - * database, affected_version_start and affected_version_end will be the - * same in that Detail. - * - * Generated from protobuf field .grafeas.v1.Version affected_version_end = 7; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setAffectedVersionEnd($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->affected_version_end = $var; - - return $this; - } - - /** - * The distro recommended [CPE URI](https://cpe.mitre.org/specification/) - * to update to that contains a fix for this vulnerability. It is possible - * for this to be different from the affected_cpe_uri. - * - * Generated from protobuf field string fixed_cpe_uri = 8; - * @return string - */ - public function getFixedCpeUri() - { - return $this->fixed_cpe_uri; - } - - /** - * The distro recommended [CPE URI](https://cpe.mitre.org/specification/) - * to update to that contains a fix for this vulnerability. It is possible - * for this to be different from the affected_cpe_uri. - * - * Generated from protobuf field string fixed_cpe_uri = 8; - * @param string $var - * @return $this - */ - public function setFixedCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->fixed_cpe_uri = $var; - - return $this; - } - - /** - * The distro recommended package to update to that contains a fix for this - * vulnerability. It is possible for this to be different from the - * affected_package. - * - * Generated from protobuf field string fixed_package = 9; - * @return string - */ - public function getFixedPackage() - { - return $this->fixed_package; - } - - /** - * The distro recommended package to update to that contains a fix for this - * vulnerability. It is possible for this to be different from the - * affected_package. - * - * Generated from protobuf field string fixed_package = 9; - * @param string $var - * @return $this - */ - public function setFixedPackage($var) - { - GPBUtil::checkString($var, True); - $this->fixed_package = $var; - - return $this; - } - - /** - * The distro recommended version to update to that contains a - * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no - * such version is yet available. - * - * Generated from protobuf field .grafeas.v1.Version fixed_version = 10; - * @return \Grafeas\V1\Version|null - */ - public function getFixedVersion() - { - return $this->fixed_version; - } - - public function hasFixedVersion() - { - return isset($this->fixed_version); - } - - public function clearFixedVersion() - { - unset($this->fixed_version); - } - - /** - * The distro recommended version to update to that contains a - * fix for this vulnerability. Setting this to VersionKind.MAXIMUM means no - * such version is yet available. - * - * Generated from protobuf field .grafeas.v1.Version fixed_version = 10; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setFixedVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->fixed_version = $var; - - return $this; - } - - /** - * Whether this detail is obsolete. Occurrences are expected not to point to - * obsolete details. - * - * Generated from protobuf field bool is_obsolete = 11; - * @return bool - */ - public function getIsObsolete() - { - return $this->is_obsolete; - } - - /** - * Whether this detail is obsolete. Occurrences are expected not to point to - * obsolete details. - * - * Generated from protobuf field bool is_obsolete = 11; - * @param bool $var - * @return $this - */ - public function setIsObsolete($var) - { - GPBUtil::checkBool($var); - $this->is_obsolete = $var; - - return $this; - } - - /** - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * - * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 12; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSourceUpdateTime() - { - return $this->source_update_time; - } - - public function hasSourceUpdateTime() - { - return isset($this->source_update_time); - } - - public function clearSourceUpdateTime() - { - unset($this->source_update_time); - } - - /** - * The time this information was last changed at the source. This is an - * upstream timestamp from the underlying information source - e.g. Ubuntu - * security tracker. - * - * Generated from protobuf field .google.protobuf.Timestamp source_update_time = 12; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSourceUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->source_update_time = $var; - - return $this; - } - - /** - * The source from which the information in this Detail was obtained. - * - * Generated from protobuf field string source = 13; - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * The source from which the information in this Detail was obtained. - * - * Generated from protobuf field string source = 13; - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - - /** - * The name of the vendor of the product. - * - * Generated from protobuf field string vendor = 14; - * @return string - */ - public function getVendor() - { - return $this->vendor; - } - - /** - * The name of the vendor of the product. - * - * Generated from protobuf field string vendor = 14; - * @param string $var - * @return $this - */ - public function setVendor($var) - { - GPBUtil::checkString($var, True); - $this->vendor = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Detail::class, \Grafeas\V1\VulnerabilityNote_Detail::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail.php deleted file mode 100644 index e20cc151c87d..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail.php +++ /dev/null @@ -1,186 +0,0 @@ -grafeas.v1.VulnerabilityNote.WindowsDetail - */ -class WindowsDetail extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * - * Generated from protobuf field string cpe_uri = 1; - */ - protected $cpe_uri = ''; - /** - * Required. The name of this vulnerability. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - /** - * The description of this vulnerability. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Required. The names of the KBs which have hotfixes to mitigate this - * vulnerability. Note that there may be multiple hotfixes (and thus - * multiple KBs) that mitigate a given vulnerability. Currently any listed - * KBs presence is considered a fix. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - */ - private $fixing_kbs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cpe_uri - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * @type string $name - * Required. The name of this vulnerability. - * @type string $description - * The description of this vulnerability. - * @type array<\Grafeas\V1\VulnerabilityNote\WindowsDetail\KnowledgeBase>|\Google\Protobuf\Internal\RepeatedField $fixing_kbs - * Required. The names of the KBs which have hotfixes to mitigate this - * vulnerability. Note that there may be multiple hotfixes (and thus - * multiple KBs) that mitigate a given vulnerability. Currently any listed - * KBs presence is considered a fix. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * - * Generated from protobuf field string cpe_uri = 1; - * @return string - */ - public function getCpeUri() - { - return $this->cpe_uri; - } - - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability affects. - * - * Generated from protobuf field string cpe_uri = 1; - * @param string $var - * @return $this - */ - public function setCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->cpe_uri = $var; - - return $this; - } - - /** - * Required. The name of this vulnerability. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of this vulnerability. - * - * 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; - } - - /** - * The description of this vulnerability. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of this vulnerability. - * - * 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. The names of the KBs which have hotfixes to mitigate this - * vulnerability. Note that there may be multiple hotfixes (and thus - * multiple KBs) that mitigate a given vulnerability. Currently any listed - * KBs presence is considered a fix. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFixingKbs() - { - return $this->fixing_kbs; - } - - /** - * Required. The names of the KBs which have hotfixes to mitigate this - * vulnerability. Note that there may be multiple hotfixes (and thus - * multiple KBs) that mitigate a given vulnerability. Currently any listed - * KBs presence is considered a fix. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase fixing_kbs = 4; - * @param array<\Grafeas\V1\VulnerabilityNote\WindowsDetail\KnowledgeBase>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFixingKbs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\VulnerabilityNote\WindowsDetail\KnowledgeBase::class); - $this->fixing_kbs = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WindowsDetail::class, \Grafeas\V1\VulnerabilityNote_WindowsDetail::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail/KnowledgeBase.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail/KnowledgeBase.php deleted file mode 100644 index 26ec0c58b2f6..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote/WindowsDetail/KnowledgeBase.php +++ /dev/null @@ -1,106 +0,0 @@ -grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase - */ -class KnowledgeBase extends \Google\Protobuf\Internal\Message -{ - /** - * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * A link to the KB in the [Windows update catalog] - * (https://www.catalog.update.microsoft.com/). - * - * Generated from protobuf field string url = 2; - */ - protected $url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). - * @type string $url - * A link to the KB in the [Windows update catalog] - * (https://www.catalog.update.microsoft.com/). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The KB name (generally of the form KB[0-9]+ (e.g., KB123456)). - * - * 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 link to the KB in the [Windows update catalog] - * (https://www.catalog.update.microsoft.com/). - * - * Generated from protobuf field string url = 2; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * A link to the KB in the [Windows update catalog] - * (https://www.catalog.update.microsoft.com/). - * - * 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(KnowledgeBase::class, \Grafeas\V1\VulnerabilityNote_WindowsDetail_KnowledgeBase::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote_Detail.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote_Detail.php deleted file mode 100644 index 3406384a9d4f..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityNote_Detail.php +++ /dev/null @@ -1,16 +0,0 @@ -grafeas.v1.VulnerabilityOccurrence - */ -class VulnerabilityOccurrence extends \Google\Protobuf\Internal\Message -{ - /** - * The type of package; whether native or non native (e.g., ruby gems, node.js - * packages, etc.). - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * Output only. The note provider assigned severity of this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - */ - protected $severity = 0; - /** - * Output only. The CVSS score of this vulnerability. CVSS score is on a - * scale of 0 - 10 where 0 indicates low severity and 10 indicates high - * severity. - * - * Generated from protobuf field float cvss_score = 3; - */ - protected $cvss_score = 0.0; - /** - * The cvss v3 score for the vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSS cvssv3 = 10; - */ - protected $cvssv3 = null; - /** - * Required. The set of affected locations and their fixes (if available) - * within the associated resource. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - */ - private $package_issue; - /** - * Output only. A one sentence description of this vulnerability. - * - * Generated from protobuf field string short_description = 5; - */ - protected $short_description = ''; - /** - * Output only. A detailed description of this vulnerability. - * - * Generated from protobuf field string long_description = 6; - */ - protected $long_description = ''; - /** - * Output only. URLs related to this vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_urls = 7; - */ - private $related_urls; - /** - * The distro assigned severity for this vulnerability when it is available, - * otherwise this is the note provider assigned severity. - * When there are multiple PackageIssues for this vulnerability, they can have - * different effective severities because some might be provided by the distro - * while others are provided by the language ecosystem for a language pack. - * For this reason, it is advised to use the effective severity on the - * PackageIssue level. In the case where multiple PackageIssues have differing - * effective severities, this field should be the highest severity for any of - * the PackageIssues. - * - * Generated from protobuf field .grafeas.v1.Severity effective_severity = 8; - */ - protected $effective_severity = 0; - /** - * Output only. Whether at least one of the affected packages has a fix - * available. - * - * Generated from protobuf field bool fix_available = 9; - */ - protected $fix_available = false; - /** - * Output only. CVSS version used to populate cvss_score and severity. - * - * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 11; - */ - protected $cvss_version = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * The type of package; whether native or non native (e.g., ruby gems, node.js - * packages, etc.). - * @type int $severity - * Output only. The note provider assigned severity of this vulnerability. - * @type float $cvss_score - * Output only. The CVSS score of this vulnerability. CVSS score is on a - * scale of 0 - 10 where 0 indicates low severity and 10 indicates high - * severity. - * @type \Grafeas\V1\CVSS $cvssv3 - * The cvss v3 score for the vulnerability. - * @type array<\Grafeas\V1\VulnerabilityOccurrence\PackageIssue>|\Google\Protobuf\Internal\RepeatedField $package_issue - * Required. The set of affected locations and their fixes (if available) - * within the associated resource. - * @type string $short_description - * Output only. A one sentence description of this vulnerability. - * @type string $long_description - * Output only. A detailed description of this vulnerability. - * @type array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $related_urls - * Output only. URLs related to this vulnerability. - * @type int $effective_severity - * The distro assigned severity for this vulnerability when it is available, - * otherwise this is the note provider assigned severity. - * When there are multiple PackageIssues for this vulnerability, they can have - * different effective severities because some might be provided by the distro - * while others are provided by the language ecosystem for a language pack. - * For this reason, it is advised to use the effective severity on the - * PackageIssue level. In the case where multiple PackageIssues have differing - * effective severities, this field should be the highest severity for any of - * the PackageIssues. - * @type bool $fix_available - * Output only. Whether at least one of the affected packages has a fix - * available. - * @type int $cvss_version - * Output only. CVSS version used to populate cvss_score and severity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * The type of package; whether native or non native (e.g., ruby gems, node.js - * packages, etc.). - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The type of package; whether native or non native (e.g., ruby gems, node.js - * packages, etc.). - * - * 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; - } - - /** - * Output only. The note provider assigned severity of this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Output only. The note provider assigned severity of this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Severity severity = 2; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * Output only. The CVSS score of this vulnerability. CVSS score is on a - * scale of 0 - 10 where 0 indicates low severity and 10 indicates high - * severity. - * - * Generated from protobuf field float cvss_score = 3; - * @return float - */ - public function getCvssScore() - { - return $this->cvss_score; - } - - /** - * Output only. The CVSS score of this vulnerability. CVSS score is on a - * scale of 0 - 10 where 0 indicates low severity and 10 indicates high - * severity. - * - * Generated from protobuf field float cvss_score = 3; - * @param float $var - * @return $this - */ - public function setCvssScore($var) - { - GPBUtil::checkFloat($var); - $this->cvss_score = $var; - - return $this; - } - - /** - * The cvss v3 score for the vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSS cvssv3 = 10; - * @return \Grafeas\V1\CVSS|null - */ - public function getCvssv3() - { - return $this->cvssv3; - } - - public function hasCvssv3() - { - return isset($this->cvssv3); - } - - public function clearCvssv3() - { - unset($this->cvssv3); - } - - /** - * The cvss v3 score for the vulnerability. - * - * Generated from protobuf field .grafeas.v1.CVSS cvssv3 = 10; - * @param \Grafeas\V1\CVSS $var - * @return $this - */ - public function setCvssv3($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\CVSS::class); - $this->cvssv3 = $var; - - return $this; - } - - /** - * Required. The set of affected locations and their fixes (if available) - * within the associated resource. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPackageIssue() - { - return $this->package_issue; - } - - /** - * Required. The set of affected locations and their fixes (if available) - * within the associated resource. - * - * Generated from protobuf field repeated .grafeas.v1.VulnerabilityOccurrence.PackageIssue package_issue = 4; - * @param array<\Grafeas\V1\VulnerabilityOccurrence\PackageIssue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPackageIssue($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\VulnerabilityOccurrence\PackageIssue::class); - $this->package_issue = $arr; - - return $this; - } - - /** - * Output only. A one sentence description of this vulnerability. - * - * Generated from protobuf field string short_description = 5; - * @return string - */ - public function getShortDescription() - { - return $this->short_description; - } - - /** - * Output only. A one sentence description of this vulnerability. - * - * Generated from protobuf field string short_description = 5; - * @param string $var - * @return $this - */ - public function setShortDescription($var) - { - GPBUtil::checkString($var, True); - $this->short_description = $var; - - return $this; - } - - /** - * Output only. A detailed description of this vulnerability. - * - * Generated from protobuf field string long_description = 6; - * @return string - */ - public function getLongDescription() - { - return $this->long_description; - } - - /** - * Output only. A detailed description of this vulnerability. - * - * Generated from protobuf field string long_description = 6; - * @param string $var - * @return $this - */ - public function setLongDescription($var) - { - GPBUtil::checkString($var, True); - $this->long_description = $var; - - return $this; - } - - /** - * Output only. URLs related to this vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_urls = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelatedUrls() - { - return $this->related_urls; - } - - /** - * Output only. URLs related to this vulnerability. - * - * Generated from protobuf field repeated .grafeas.v1.RelatedUrl related_urls = 7; - * @param array<\Grafeas\V1\RelatedUrl>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelatedUrls($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\RelatedUrl::class); - $this->related_urls = $arr; - - return $this; - } - - /** - * The distro assigned severity for this vulnerability when it is available, - * otherwise this is the note provider assigned severity. - * When there are multiple PackageIssues for this vulnerability, they can have - * different effective severities because some might be provided by the distro - * while others are provided by the language ecosystem for a language pack. - * For this reason, it is advised to use the effective severity on the - * PackageIssue level. In the case where multiple PackageIssues have differing - * effective severities, this field should be the highest severity for any of - * the PackageIssues. - * - * Generated from protobuf field .grafeas.v1.Severity effective_severity = 8; - * @return int - */ - public function getEffectiveSeverity() - { - return $this->effective_severity; - } - - /** - * The distro assigned severity for this vulnerability when it is available, - * otherwise this is the note provider assigned severity. - * When there are multiple PackageIssues for this vulnerability, they can have - * different effective severities because some might be provided by the distro - * while others are provided by the language ecosystem for a language pack. - * For this reason, it is advised to use the effective severity on the - * PackageIssue level. In the case where multiple PackageIssues have differing - * effective severities, this field should be the highest severity for any of - * the PackageIssues. - * - * Generated from protobuf field .grafeas.v1.Severity effective_severity = 8; - * @param int $var - * @return $this - */ - public function setEffectiveSeverity($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class); - $this->effective_severity = $var; - - return $this; - } - - /** - * Output only. Whether at least one of the affected packages has a fix - * available. - * - * Generated from protobuf field bool fix_available = 9; - * @return bool - */ - public function getFixAvailable() - { - return $this->fix_available; - } - - /** - * Output only. Whether at least one of the affected packages has a fix - * available. - * - * Generated from protobuf field bool fix_available = 9; - * @param bool $var - * @return $this - */ - public function setFixAvailable($var) - { - GPBUtil::checkBool($var); - $this->fix_available = $var; - - return $this; - } - - /** - * Output only. CVSS version used to populate cvss_score and severity. - * - * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 11; - * @return int - */ - public function getCvssVersion() - { - return $this->cvss_version; - } - - /** - * Output only. CVSS version used to populate cvss_score and severity. - * - * Generated from protobuf field .grafeas.v1.CVSSVersion cvss_version = 11; - * @param int $var - * @return $this - */ - public function setCvssVersion($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\CVSSVersion::class); - $this->cvss_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence/PackageIssue.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence/PackageIssue.php deleted file mode 100644 index 50eb18f7d2f5..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence/PackageIssue.php +++ /dev/null @@ -1,429 +0,0 @@ -grafeas.v1.VulnerabilityOccurrence.PackageIssue - */ -class PackageIssue extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability was found in. - * - * Generated from protobuf field string affected_cpe_uri = 1; - */ - protected $affected_cpe_uri = ''; - /** - * Required. The package this vulnerability was found in. - * - * Generated from protobuf field string affected_package = 2; - */ - protected $affected_package = ''; - /** - * Required. The version of the package that is installed on the resource - * affected by this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Version affected_version = 3; - */ - protected $affected_version = null; - /** - * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability - * was fixed in. It is possible for this to be different from the - * affected_cpe_uri. - * - * Generated from protobuf field string fixed_cpe_uri = 4; - */ - protected $fixed_cpe_uri = ''; - /** - * The package this vulnerability was fixed in. It is possible for this to - * be different from the affected_package. - * - * Generated from protobuf field string fixed_package = 5; - */ - protected $fixed_package = ''; - /** - * Required. The version of the package this vulnerability was fixed in. - * Setting this to VersionKind.MAXIMUM means no fix is yet available. - * - * Generated from protobuf field .grafeas.v1.Version fixed_version = 6; - */ - protected $fixed_version = null; - /** - * Output only. Whether a fix is available for this package. - * - * Generated from protobuf field bool fix_available = 7; - */ - protected $fix_available = false; - /** - * The type of package (e.g. OS, MAVEN, GO). - * - * Generated from protobuf field string package_type = 8; - */ - protected $package_type = ''; - /** - * The distro or language system assigned severity for this vulnerability - * when that is available and note provider assigned severity when it is not - * available. - * - * Generated from protobuf field .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $effective_severity = 0; - /** - * The location at which this package was found. - * - * Generated from protobuf field repeated .grafeas.v1.FileLocation file_location = 10; - */ - private $file_location; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $affected_cpe_uri - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability was found in. - * @type string $affected_package - * Required. The package this vulnerability was found in. - * @type \Grafeas\V1\Version $affected_version - * Required. The version of the package that is installed on the resource - * affected by this vulnerability. - * @type string $fixed_cpe_uri - * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability - * was fixed in. It is possible for this to be different from the - * affected_cpe_uri. - * @type string $fixed_package - * The package this vulnerability was fixed in. It is possible for this to - * be different from the affected_package. - * @type \Grafeas\V1\Version $fixed_version - * Required. The version of the package this vulnerability was fixed in. - * Setting this to VersionKind.MAXIMUM means no fix is yet available. - * @type bool $fix_available - * Output only. Whether a fix is available for this package. - * @type string $package_type - * The type of package (e.g. OS, MAVEN, GO). - * @type int $effective_severity - * The distro or language system assigned severity for this vulnerability - * when that is available and note provider assigned severity when it is not - * available. - * @type array<\Grafeas\V1\FileLocation>|\Google\Protobuf\Internal\RepeatedField $file_location - * The location at which this package was found. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability was found in. - * - * Generated from protobuf field string affected_cpe_uri = 1; - * @return string - */ - public function getAffectedCpeUri() - { - return $this->affected_cpe_uri; - } - - /** - * Required. The [CPE URI](https://cpe.mitre.org/specification/) this - * vulnerability was found in. - * - * Generated from protobuf field string affected_cpe_uri = 1; - * @param string $var - * @return $this - */ - public function setAffectedCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->affected_cpe_uri = $var; - - return $this; - } - - /** - * Required. The package this vulnerability was found in. - * - * Generated from protobuf field string affected_package = 2; - * @return string - */ - public function getAffectedPackage() - { - return $this->affected_package; - } - - /** - * Required. The package this vulnerability was found in. - * - * Generated from protobuf field string affected_package = 2; - * @param string $var - * @return $this - */ - public function setAffectedPackage($var) - { - GPBUtil::checkString($var, True); - $this->affected_package = $var; - - return $this; - } - - /** - * Required. The version of the package that is installed on the resource - * affected by this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Version affected_version = 3; - * @return \Grafeas\V1\Version|null - */ - public function getAffectedVersion() - { - return $this->affected_version; - } - - public function hasAffectedVersion() - { - return isset($this->affected_version); - } - - public function clearAffectedVersion() - { - unset($this->affected_version); - } - - /** - * Required. The version of the package that is installed on the resource - * affected by this vulnerability. - * - * Generated from protobuf field .grafeas.v1.Version affected_version = 3; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setAffectedVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->affected_version = $var; - - return $this; - } - - /** - * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability - * was fixed in. It is possible for this to be different from the - * affected_cpe_uri. - * - * Generated from protobuf field string fixed_cpe_uri = 4; - * @return string - */ - public function getFixedCpeUri() - { - return $this->fixed_cpe_uri; - } - - /** - * The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability - * was fixed in. It is possible for this to be different from the - * affected_cpe_uri. - * - * Generated from protobuf field string fixed_cpe_uri = 4; - * @param string $var - * @return $this - */ - public function setFixedCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->fixed_cpe_uri = $var; - - return $this; - } - - /** - * The package this vulnerability was fixed in. It is possible for this to - * be different from the affected_package. - * - * Generated from protobuf field string fixed_package = 5; - * @return string - */ - public function getFixedPackage() - { - return $this->fixed_package; - } - - /** - * The package this vulnerability was fixed in. It is possible for this to - * be different from the affected_package. - * - * Generated from protobuf field string fixed_package = 5; - * @param string $var - * @return $this - */ - public function setFixedPackage($var) - { - GPBUtil::checkString($var, True); - $this->fixed_package = $var; - - return $this; - } - - /** - * Required. The version of the package this vulnerability was fixed in. - * Setting this to VersionKind.MAXIMUM means no fix is yet available. - * - * Generated from protobuf field .grafeas.v1.Version fixed_version = 6; - * @return \Grafeas\V1\Version|null - */ - public function getFixedVersion() - { - return $this->fixed_version; - } - - public function hasFixedVersion() - { - return isset($this->fixed_version); - } - - public function clearFixedVersion() - { - unset($this->fixed_version); - } - - /** - * Required. The version of the package this vulnerability was fixed in. - * Setting this to VersionKind.MAXIMUM means no fix is yet available. - * - * Generated from protobuf field .grafeas.v1.Version fixed_version = 6; - * @param \Grafeas\V1\Version $var - * @return $this - */ - public function setFixedVersion($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\Version::class); - $this->fixed_version = $var; - - return $this; - } - - /** - * Output only. Whether a fix is available for this package. - * - * Generated from protobuf field bool fix_available = 7; - * @return bool - */ - public function getFixAvailable() - { - return $this->fix_available; - } - - /** - * Output only. Whether a fix is available for this package. - * - * Generated from protobuf field bool fix_available = 7; - * @param bool $var - * @return $this - */ - public function setFixAvailable($var) - { - GPBUtil::checkBool($var); - $this->fix_available = $var; - - return $this; - } - - /** - * The type of package (e.g. OS, MAVEN, GO). - * - * Generated from protobuf field string package_type = 8; - * @return string - */ - public function getPackageType() - { - return $this->package_type; - } - - /** - * The type of package (e.g. OS, MAVEN, GO). - * - * Generated from protobuf field string package_type = 8; - * @param string $var - * @return $this - */ - public function setPackageType($var) - { - GPBUtil::checkString($var, True); - $this->package_type = $var; - - return $this; - } - - /** - * The distro or language system assigned severity for this vulnerability - * when that is available and note provider assigned severity when it is not - * available. - * - * Generated from protobuf field .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEffectiveSeverity() - { - return $this->effective_severity; - } - - /** - * The distro or language system assigned severity for this vulnerability - * when that is available and note provider assigned severity when it is not - * available. - * - * Generated from protobuf field .grafeas.v1.Severity effective_severity = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEffectiveSeverity($var) - { - GPBUtil::checkEnum($var, \Grafeas\V1\Severity::class); - $this->effective_severity = $var; - - return $this; - } - - /** - * The location at which this package was found. - * - * Generated from protobuf field repeated .grafeas.v1.FileLocation file_location = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileLocation() - { - return $this->file_location; - } - - /** - * The location at which this package was found. - * - * Generated from protobuf field repeated .grafeas.v1.FileLocation file_location = 10; - * @param array<\Grafeas\V1\FileLocation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileLocation($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\FileLocation::class); - $this->file_location = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PackageIssue::class, \Grafeas\V1\VulnerabilityOccurrence_PackageIssue::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence_PackageIssue.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence_PackageIssue.php deleted file mode 100644 index cc29d1796f14..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/VulnerabilityOccurrence_PackageIssue.php +++ /dev/null @@ -1,16 +0,0 @@ -grafeas.v1.WindowsUpdate - */ -class WindowsUpdate extends \Google\Protobuf\Internal\Message -{ - /** - * Required - The unique identifier for the update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate.Identity identity = 1; - */ - protected $identity = null; - /** - * The localized title of the update. - * - * Generated from protobuf field string title = 2; - */ - protected $title = ''; - /** - * The localized description of the update. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * The list of categories to which the update belongs. - * - * Generated from protobuf field repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - */ - private $categories; - /** - * The Microsoft Knowledge Base article IDs that are associated with the - * update. - * - * Generated from protobuf field repeated string kb_article_ids = 5; - */ - private $kb_article_ids; - /** - * The hyperlink to the support information for the update. - * - * Generated from protobuf field string support_url = 6; - */ - protected $support_url = ''; - /** - * The last published timestamp of the update. - * - * Generated from protobuf field .google.protobuf.Timestamp last_published_timestamp = 7; - */ - protected $last_published_timestamp = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Grafeas\V1\WindowsUpdate\Identity $identity - * Required - The unique identifier for the update. - * @type string $title - * The localized title of the update. - * @type string $description - * The localized description of the update. - * @type array<\Grafeas\V1\WindowsUpdate\Category>|\Google\Protobuf\Internal\RepeatedField $categories - * The list of categories to which the update belongs. - * @type array|\Google\Protobuf\Internal\RepeatedField $kb_article_ids - * The Microsoft Knowledge Base article IDs that are associated with the - * update. - * @type string $support_url - * The hyperlink to the support information for the update. - * @type \Google\Protobuf\Timestamp $last_published_timestamp - * The last published timestamp of the update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); - parent::__construct($data); - } - - /** - * Required - The unique identifier for the update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @return \Grafeas\V1\WindowsUpdate\Identity|null - */ - public function getIdentity() - { - return $this->identity; - } - - public function hasIdentity() - { - return isset($this->identity); - } - - public function clearIdentity() - { - unset($this->identity); - } - - /** - * Required - The unique identifier for the update. - * - * Generated from protobuf field .grafeas.v1.WindowsUpdate.Identity identity = 1; - * @param \Grafeas\V1\WindowsUpdate\Identity $var - * @return $this - */ - public function setIdentity($var) - { - GPBUtil::checkMessage($var, \Grafeas\V1\WindowsUpdate\Identity::class); - $this->identity = $var; - - return $this; - } - - /** - * The localized title of the update. - * - * Generated from protobuf field string title = 2; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * The localized title of the update. - * - * Generated from protobuf field string title = 2; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * The localized description of the update. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The localized description of the update. - * - * 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 list of categories to which the update belongs. - * - * Generated from protobuf field repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * The list of categories to which the update belongs. - * - * Generated from protobuf field repeated .grafeas.v1.WindowsUpdate.Category categories = 4; - * @param array<\Grafeas\V1\WindowsUpdate\Category>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grafeas\V1\WindowsUpdate\Category::class); - $this->categories = $arr; - - return $this; - } - - /** - * The Microsoft Knowledge Base article IDs that are associated with the - * update. - * - * Generated from protobuf field repeated string kb_article_ids = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getKbArticleIds() - { - return $this->kb_article_ids; - } - - /** - * The Microsoft Knowledge Base article IDs that are associated with the - * update. - * - * Generated from protobuf field repeated string kb_article_ids = 5; - * @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; - } - - /** - * The hyperlink to the support information for the update. - * - * Generated from protobuf field string support_url = 6; - * @return string - */ - public function getSupportUrl() - { - return $this->support_url; - } - - /** - * The hyperlink to the support information for the update. - * - * Generated from protobuf field string support_url = 6; - * @param string $var - * @return $this - */ - public function setSupportUrl($var) - { - GPBUtil::checkString($var, True); - $this->support_url = $var; - - return $this; - } - - /** - * The last published timestamp of the update. - * - * Generated from protobuf field .google.protobuf.Timestamp last_published_timestamp = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastPublishedTimestamp() - { - return $this->last_published_timestamp; - } - - public function hasLastPublishedTimestamp() - { - return isset($this->last_published_timestamp); - } - - public function clearLastPublishedTimestamp() - { - unset($this->last_published_timestamp); - } - - /** - * The last published timestamp of the update. - * - * Generated from protobuf field .google.protobuf.Timestamp last_published_timestamp = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastPublishedTimestamp($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_published_timestamp = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Category.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Category.php deleted file mode 100644 index f3fc03d57a42..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Category.php +++ /dev/null @@ -1,104 +0,0 @@ -grafeas.v1.WindowsUpdate.Category - */ -class Category extends \Google\Protobuf\Internal\Message -{ - /** - * The identifier of the category. - * - * Generated from protobuf field string category_id = 1; - */ - protected $category_id = ''; - /** - * The localized name of the category. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $category_id - * The identifier of the category. - * @type string $name - * The localized name of the category. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); - parent::__construct($data); - } - - /** - * The identifier of the category. - * - * Generated from protobuf field string category_id = 1; - * @return string - */ - public function getCategoryId() - { - return $this->category_id; - } - - /** - * The identifier of the category. - * - * Generated from protobuf field string category_id = 1; - * @param string $var - * @return $this - */ - public function setCategoryId($var) - { - GPBUtil::checkString($var, True); - $this->category_id = $var; - - return $this; - } - - /** - * The localized name of the category. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The localized name of the 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(Category::class, \Grafeas\V1\WindowsUpdate_Category::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Identity.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Identity.php deleted file mode 100644 index 8d4340a93fc8..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate/Identity.php +++ /dev/null @@ -1,104 +0,0 @@ -grafeas.v1.WindowsUpdate.Identity - */ -class Identity extends \Google\Protobuf\Internal\Message -{ - /** - * The revision independent identifier of the update. - * - * Generated from protobuf field string update_id = 1; - */ - protected $update_id = ''; - /** - * The revision number of the update. - * - * Generated from protobuf field int32 revision = 2; - */ - protected $revision = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $update_id - * The revision independent identifier of the update. - * @type int $revision - * The revision number of the update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Grafeas\V1\Upgrade::initOnce(); - parent::__construct($data); - } - - /** - * The revision independent identifier of the update. - * - * Generated from protobuf field string update_id = 1; - * @return string - */ - public function getUpdateId() - { - return $this->update_id; - } - - /** - * The revision independent identifier of the update. - * - * Generated from protobuf field string update_id = 1; - * @param string $var - * @return $this - */ - public function setUpdateId($var) - { - GPBUtil::checkString($var, True); - $this->update_id = $var; - - return $this; - } - - /** - * The revision number of the update. - * - * Generated from protobuf field int32 revision = 2; - * @return int - */ - public function getRevision() - { - return $this->revision; - } - - /** - * The revision number of the update. - * - * Generated from protobuf field int32 revision = 2; - * @param int $var - * @return $this - */ - public function setRevision($var) - { - GPBUtil::checkInt32($var); - $this->revision = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Identity::class, \Grafeas\V1\WindowsUpdate_Identity::class); - diff --git a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate_Category.php b/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate_Category.php deleted file mode 100644 index 4acf25cc639c..000000000000 --- a/owl-bot-staging/Grafeas/v1/proto/src/Grafeas/V1/WindowsUpdate_Category.php +++ /dev/null @@ -1,16 +0,0 @@ -batchCreateNotes($formattedParent, $notes); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = GrafeasClient::projectName('[PROJECT]'); - - batch_create_notes_sample($formattedParent); -} -// [END containeranalysis_v1_generated_Grafeas_BatchCreateNotes_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_occurrences.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_occurrences.php deleted file mode 100644 index fe167aa897ca..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/batch_create_occurrences.php +++ /dev/null @@ -1,71 +0,0 @@ -batchCreateOccurrences($formattedParent, $occurrences); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = GrafeasClient::projectName('[PROJECT]'); - - batch_create_occurrences_sample($formattedParent); -} -// [END containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_note.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_note.php deleted file mode 100644 index 23288a642b18..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_note.php +++ /dev/null @@ -1,72 +0,0 @@ -createNote($formattedParent, $noteId, $note); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = GrafeasClient::projectName('[PROJECT]'); - $noteId = '[NOTE_ID]'; - - create_note_sample($formattedParent, $noteId); -} -// [END containeranalysis_v1_generated_Grafeas_CreateNote_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_occurrence.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_occurrence.php deleted file mode 100644 index 3ef0cf3be2f8..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/create_occurrence.php +++ /dev/null @@ -1,70 +0,0 @@ -createOccurrence($formattedParent, $occurrence); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = GrafeasClient::projectName('[PROJECT]'); - - create_occurrence_sample($formattedParent); -} -// [END containeranalysis_v1_generated_Grafeas_CreateOccurrence_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_note.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_note.php deleted file mode 100644 index 0f28ce4570e3..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_note.php +++ /dev/null @@ -1,65 +0,0 @@ -deleteNote($formattedName); - 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 = GrafeasClient::noteName('[PROJECT]', '[NOTE]'); - - delete_note_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_DeleteNote_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_occurrence.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_occurrence.php deleted file mode 100644 index b5c45a1db5d1..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/delete_occurrence.php +++ /dev/null @@ -1,67 +0,0 @@ -deleteOccurrence($formattedName); - 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 = GrafeasClient::occurrenceName('[PROJECT]', '[OCCURRENCE]'); - - delete_occurrence_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_DeleteOccurrence_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_note.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_note.php deleted file mode 100644 index 8e7f6b8a878d..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_note.php +++ /dev/null @@ -1,67 +0,0 @@ -getNote($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GrafeasClient::noteName('[PROJECT]', '[NOTE]'); - - get_note_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_GetNote_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence.php deleted file mode 100644 index e1c746d2eedc..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence.php +++ /dev/null @@ -1,67 +0,0 @@ -getOccurrence($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GrafeasClient::occurrenceName('[PROJECT]', '[OCCURRENCE]'); - - get_occurrence_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_GetOccurrence_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence_note.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence_note.php deleted file mode 100644 index f811ea3f799a..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/get_occurrence_note.php +++ /dev/null @@ -1,68 +0,0 @@ -getOccurrenceNote($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GrafeasClient::occurrenceName('[PROJECT]', '[OCCURRENCE]'); - - get_occurrence_note_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_note_occurrences.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_note_occurrences.php deleted file mode 100644 index 585f2c67bdd5..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_note_occurrences.php +++ /dev/null @@ -1,74 +0,0 @@ -listNoteOccurrences($formattedName); - - /** @var Occurrence $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 = GrafeasClient::noteName('[PROJECT]', '[NOTE]'); - - list_note_occurrences_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_notes.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_notes.php deleted file mode 100644 index e2efbce6d25c..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_notes.php +++ /dev/null @@ -1,72 +0,0 @@ -listNotes($formattedParent); - - /** @var Note $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 = GrafeasClient::projectName('[PROJECT]'); - - list_notes_sample($formattedParent); -} -// [END containeranalysis_v1_generated_Grafeas_ListNotes_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_occurrences.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_occurrences.php deleted file mode 100644 index f5fd4a42b076..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/list_occurrences.php +++ /dev/null @@ -1,72 +0,0 @@ -listOccurrences($formattedParent); - - /** @var Occurrence $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 = GrafeasClient::projectName('[PROJECT]'); - - list_occurrences_sample($formattedParent); -} -// [END containeranalysis_v1_generated_Grafeas_ListOccurrences_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_note.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_note.php deleted file mode 100644 index a21bfab7fafd..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_note.php +++ /dev/null @@ -1,70 +0,0 @@ -updateNote($formattedName, $note); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GrafeasClient::noteName('[PROJECT]', '[NOTE]'); - - update_note_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_UpdateNote_sync] diff --git a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_occurrence.php b/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_occurrence.php deleted file mode 100644 index d6016829c691..000000000000 --- a/owl-bot-staging/Grafeas/v1/samples/V1/GrafeasClient/update_occurrence.php +++ /dev/null @@ -1,70 +0,0 @@ -updateOccurrence($formattedName, $occurrence); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GrafeasClient::occurrenceName('[PROJECT]', '[OCCURRENCE]'); - - update_occurrence_sample($formattedName); -} -// [END containeranalysis_v1_generated_Grafeas_UpdateOccurrence_sync] diff --git a/owl-bot-staging/Grafeas/v1/src/V1/Gapic/GrafeasGapicClient.php b/owl-bot-staging/Grafeas/v1/src/V1/Gapic/GrafeasGapicClient.php deleted file mode 100644 index 23d79eb57ed9..000000000000 --- a/owl-bot-staging/Grafeas/v1/src/V1/Gapic/GrafeasGapicClient.php +++ /dev/null @@ -1,1031 +0,0 @@ -projectName('[PROJECT]'); - * $notes = []; - * $response = $grafeasClient->batchCreateNotes($formattedParent, $notes); - * } finally { - * $grafeasClient->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. - */ -class GrafeasGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'grafeas.v1.Grafeas'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'containeranalysis.googleapis.com'; - - /** 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 = []; - - private static $noteNameTemplate; - - private static $occurrenceNameTemplate; - - private static $projectNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/grafeas_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/grafeas_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/grafeas_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/grafeas_rest_client_config.php', - ], - ], - ]; - } - - private static function getNoteNameTemplate() - { - if (self::$noteNameTemplate == null) { - self::$noteNameTemplate = new PathTemplate('projects/{project}/notes/{note}'); - } - - return self::$noteNameTemplate; - } - - private static function getOccurrenceNameTemplate() - { - if (self::$occurrenceNameTemplate == null) { - self::$occurrenceNameTemplate = new PathTemplate('projects/{project}/occurrences/{occurrence}'); - } - - return self::$occurrenceNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'note' => self::getNoteNameTemplate(), - 'occurrence' => self::getOccurrenceNameTemplate(), - 'project' => self::getProjectNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a note - * resource. - * - * @param string $project - * @param string $note - * - * @return string The formatted note resource. - */ - public static function noteName($project, $note) - { - return self::getNoteNameTemplate()->render([ - 'project' => $project, - 'note' => $note, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a occurrence - * resource. - * - * @param string $project - * @param string $occurrence - * - * @return string The formatted occurrence resource. - */ - public static function occurrenceName($project, $occurrence) - { - return self::getOccurrenceNameTemplate()->render([ - 'project' => $project, - 'occurrence' => $occurrence, - ]); - } - - /** - * 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, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - note: projects/{project}/notes/{note} - * - occurrence: projects/{project}/occurrences/{occurrence} - * - 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($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 'containeranalysis.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 new notes in batch. - * - * Sample code: - * ``` - * $grafeasClient = new GrafeasClient(); - * try { - * $formattedParent = $grafeasClient->projectName('[PROJECT]'); - * $notes = []; - * $response = $grafeasClient->batchCreateNotes($formattedParent, $notes); - * } finally { - * $grafeasClient->close(); - * } - * ``` - * - * @param string $parent The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the notes are to be created. - * @param array $notes The notes to create. Max allowed length is 1000. - * @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 \Grafeas\V1\BatchCreateNotesResponse - * - * @throws ApiException if the remote call fails - */ - public function batchCreateNotes($parent, $notes, array $optionalArgs = []) - { - $request = new BatchCreateNotesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setNotes($notes); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BatchCreateNotes', BatchCreateNotesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates new occurrences in batch. - * - * Sample code: - * ``` - * $grafeasClient = new GrafeasClient(); - * try { - * $formattedParent = $grafeasClient->projectName('[PROJECT]'); - * $occurrences = []; - * $response = $grafeasClient->batchCreateOccurrences($formattedParent, $occurrences); - * } finally { - * $grafeasClient->close(); - * } - * ``` - * - * @param string $parent The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrences are to be created. - * @param Occurrence[] $occurrences The occurrences to create. Max allowed length is 1000. - * @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 \Grafeas\V1\BatchCreateOccurrencesResponse - * - * @throws ApiException if the remote call fails - */ - public function batchCreateOccurrences($parent, $occurrences, array $optionalArgs = []) - { - $request = new BatchCreateOccurrencesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setOccurrences($occurrences); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BatchCreateOccurrences', BatchCreateOccurrencesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a new note. - * - * Sample code: - * ``` - * $grafeasClient = new GrafeasClient(); - * try { - * $formattedParent = $grafeasClient->projectName('[PROJECT]'); - * $noteId = 'note_id'; - * $note = new Note(); - * $response = $grafeasClient->createNote($formattedParent, $noteId, $note); - * } finally { - * $grafeasClient->close(); - * } - * ``` - * - * @param string $parent The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the note is to be created. - * @param string $noteId The ID to use for this note. - * @param Note $note The note 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 \Grafeas\V1\Note - * - * @throws ApiException if the remote call fails - */ - public function createNote($parent, $noteId, $note, array $optionalArgs = []) - { - $request = new CreateNoteRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setNoteId($noteId); - $request->setNote($note); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateNote', Note::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a new occurrence. - * - * Sample code: - * ``` - * $grafeasClient = new GrafeasClient(); - * try { - * $formattedParent = $grafeasClient->projectName('[PROJECT]'); - * $occurrence = new Occurrence(); - * $response = $grafeasClient->createOccurrence($formattedParent, $occurrence); - * } finally { - * $grafeasClient->close(); - * } - * ``` - * - * @param string $parent The name of the project in the form of `projects/[PROJECT_ID]`, under which - * the occurrence is to be created. - * @param Occurrence $occurrence The occurrence 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 \Grafeas\V1\Occurrence - * - * @throws ApiException if the remote call fails - */ - public function createOccurrence($parent, $occurrence, array $optionalArgs = []) - { - $request = new CreateOccurrenceRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setOccurrence($occurrence); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateOccurrence', Occurrence::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the specified note. - * - * Sample code: - * ``` - * $grafeasClient = new GrafeasClient(); - * try { - * $formattedName = $grafeasClient->noteName('[PROJECT]', '[NOTE]'); - * $grafeasClient->deleteNote($formattedName); - * } finally { - * $grafeasClient->close(); - * } - * ``` - * - * @param string $name The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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 deleteNote($name, array $optionalArgs = []) - { - $request = new DeleteNoteRequest(); - $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('DeleteNote', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the specified occurrence. For example, use this method to delete an - * occurrence when the occurrence is no longer applicable for the given - * resource. - * - * Sample code: - * ``` - * $grafeasClient = new GrafeasClient(); - * try { - * $formattedName = $grafeasClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - * $grafeasClient->deleteOccurrence($formattedName); - * } finally { - * $grafeasClient->close(); - * } - * ``` - * - * @param string $name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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 deleteOccurrence($name, array $optionalArgs = []) - { - $request = new DeleteOccurrenceRequest(); - $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('DeleteOccurrence', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the specified note. - * - * Sample code: - * ``` - * $grafeasClient = new GrafeasClient(); - * try { - * $formattedName = $grafeasClient->noteName('[PROJECT]', '[NOTE]'); - * $response = $grafeasClient->getNote($formattedName); - * } finally { - * $grafeasClient->close(); - * } - * ``` - * - * @param string $name The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_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 \Grafeas\V1\Note - * - * @throws ApiException if the remote call fails - */ - public function getNote($name, array $optionalArgs = []) - { - $request = new GetNoteRequest(); - $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('GetNote', Note::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the specified occurrence. - * - * Sample code: - * ``` - * $grafeasClient = new GrafeasClient(); - * try { - * $formattedName = $grafeasClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - * $response = $grafeasClient->getOccurrence($formattedName); - * } finally { - * $grafeasClient->close(); - * } - * ``` - * - * @param string $name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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 \Grafeas\V1\Occurrence - * - * @throws ApiException if the remote call fails - */ - public function getOccurrence($name, array $optionalArgs = []) - { - $request = new GetOccurrenceRequest(); - $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('GetOccurrence', Occurrence::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the note attached to the specified occurrence. Consumer projects can - * use this method to get a note that belongs to a provider project. - * - * Sample code: - * ``` - * $grafeasClient = new GrafeasClient(); - * try { - * $formattedName = $grafeasClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - * $response = $grafeasClient->getOccurrenceNote($formattedName); - * } finally { - * $grafeasClient->close(); - * } - * ``` - * - * @param string $name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_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 \Grafeas\V1\Note - * - * @throws ApiException if the remote call fails - */ - public function getOccurrenceNote($name, array $optionalArgs = []) - { - $request = new GetOccurrenceNoteRequest(); - $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('GetOccurrenceNote', Note::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists occurrences referencing the specified note. Provider projects can use - * this method to get all occurrences across consumer projects referencing the - * specified note. - * - * Sample code: - * ``` - * $grafeasClient = new GrafeasClient(); - * try { - * $formattedName = $grafeasClient->noteName('[PROJECT]', '[NOTE]'); - * // Iterate over pages of elements - * $pagedResponse = $grafeasClient->listNoteOccurrences($formattedName); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $grafeasClient->listNoteOccurrences($formattedName); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $grafeasClient->close(); - * } - * ``` - * - * @param string $name The name of the note to list occurrences for in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * The filter expression. - * @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 listNoteOccurrences($name, array $optionalArgs = []) - { - $request = new ListNoteOccurrencesRequest(); - $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('ListNoteOccurrences', $optionalArgs, ListNoteOccurrencesResponse::class, $request); - } - - /** - * Lists notes for the specified project. - * - * Sample code: - * ``` - * $grafeasClient = new GrafeasClient(); - * try { - * $formattedParent = $grafeasClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $grafeasClient->listNotes($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $grafeasClient->listNotes($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $grafeasClient->close(); - * } - * ``` - * - * @param string $parent The name of the project to list notes for in the form of - * `projects/[PROJECT_ID]`. - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * The filter expression. - * @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 listNotes($parent, array $optionalArgs = []) - { - $request = new ListNotesRequest(); - $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('ListNotes', $optionalArgs, ListNotesResponse::class, $request); - } - - /** - * Lists occurrences for the specified project. - * - * Sample code: - * ``` - * $grafeasClient = new GrafeasClient(); - * try { - * $formattedParent = $grafeasClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $grafeasClient->listOccurrences($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $grafeasClient->listOccurrences($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $grafeasClient->close(); - * } - * ``` - * - * @param string $parent The name of the project to list occurrences for in the form of - * `projects/[PROJECT_ID]`. - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * The filter expression. - * @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 listOccurrences($parent, array $optionalArgs = []) - { - $request = new ListOccurrencesRequest(); - $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('ListOccurrences', $optionalArgs, ListOccurrencesResponse::class, $request); - } - - /** - * Updates the specified note. - * - * Sample code: - * ``` - * $grafeasClient = new GrafeasClient(); - * try { - * $formattedName = $grafeasClient->noteName('[PROJECT]', '[NOTE]'); - * $note = new Note(); - * $response = $grafeasClient->updateNote($formattedName, $note); - * } finally { - * $grafeasClient->close(); - * } - * ``` - * - * @param string $name The name of the note in the form of - * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. - * @param Note $note The updated note. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * 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 \Grafeas\V1\Note - * - * @throws ApiException if the remote call fails - */ - public function updateNote($name, $note, array $optionalArgs = []) - { - $request = new UpdateNoteRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setNote($note); - $requestParamHeaders['name'] = $name; - 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('UpdateNote', Note::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates the specified occurrence. - * - * Sample code: - * ``` - * $grafeasClient = new GrafeasClient(); - * try { - * $formattedName = $grafeasClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - * $occurrence = new Occurrence(); - * $response = $grafeasClient->updateOccurrence($formattedName, $occurrence); - * } finally { - * $grafeasClient->close(); - * } - * ``` - * - * @param string $name The name of the occurrence in the form of - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. - * @param Occurrence $occurrence The updated occurrence. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * 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 \Grafeas\V1\Occurrence - * - * @throws ApiException if the remote call fails - */ - public function updateOccurrence($name, $occurrence, array $optionalArgs = []) - { - $request = new UpdateOccurrenceRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setOccurrence($occurrence); - $requestParamHeaders['name'] = $name; - 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('UpdateOccurrence', Occurrence::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Grafeas/v1/src/V1/GrafeasClient.php b/owl-bot-staging/Grafeas/v1/src/V1/GrafeasClient.php deleted file mode 100644 index ec675d7f8cbe..000000000000 --- a/owl-bot-staging/Grafeas/v1/src/V1/GrafeasClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'grafeas.v1.Grafeas' => [ - 'ListNoteOccurrences' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOccurrences', - ], - ], - 'ListNotes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNotes', - ], - ], - 'ListOccurrences' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOccurrences', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_rest_client_config.php b/owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_rest_client_config.php deleted file mode 100644 index 30b86b499f1a..000000000000 --- a/owl-bot-staging/Grafeas/v1/src/V1/resources/grafeas_rest_client_config.php +++ /dev/null @@ -1,172 +0,0 @@ - [ - 'grafeas.v1.Grafeas' => [ - 'BatchCreateNotes' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/notes:batchCreate', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchCreateOccurrences' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/occurrences:batchCreate', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateNote' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/notes', - 'body' => 'note', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'note_id', - ], - ], - 'CreateOccurrence' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/occurrences', - 'body' => 'occurrence', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteNote' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/notes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOccurrence' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/occurrences/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNote' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/notes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOccurrence' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/occurrences/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOccurrenceNote' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/occurrences/*}/notes', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListNoteOccurrences' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/notes/*}/occurrences', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListNotes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/notes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListOccurrences' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/occurrences', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateNote' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/notes/*}', - 'body' => 'note', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateOccurrence' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/occurrences/*}', - 'body' => 'occurrence', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Grafeas/v1/tests/Unit/V1/GrafeasClientTest.php b/owl-bot-staging/Grafeas/v1/tests/Unit/V1/GrafeasClientTest.php deleted file mode 100644 index 8b715d081bcb..000000000000 --- a/owl-bot-staging/Grafeas/v1/tests/Unit/V1/GrafeasClientTest.php +++ /dev/null @@ -1,990 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GrafeasClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GrafeasClient($options); - } - - /** @test */ - public function batchCreateNotesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchCreateNotesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $notesValue = new Note(); - $notes = [ - 'notesKey' => $notesValue, - ]; - $response = $gapicClient->batchCreateNotes($formattedParent, $notes); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/BatchCreateNotes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getNotes(); - $this->assertProtobufEquals($notes, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCreateNotesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $notesValue = new Note(); - $notes = [ - 'notesKey' => $notesValue, - ]; - try { - $gapicClient->batchCreateNotes($formattedParent, $notes); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCreateOccurrencesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchCreateOccurrencesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $occurrences = []; - $response = $gapicClient->batchCreateOccurrences($formattedParent, $occurrences); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/BatchCreateOccurrences', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getOccurrences(); - $this->assertProtobufEquals($occurrences, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCreateOccurrencesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $occurrences = []; - try { - $gapicClient->batchCreateOccurrences($formattedParent, $occurrences); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createNoteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $shortDescription = 'shortDescription-235369287'; - $longDescription = 'longDescription-1747792199'; - $expectedResponse = new Note(); - $expectedResponse->setName($name); - $expectedResponse->setShortDescription($shortDescription); - $expectedResponse->setLongDescription($longDescription); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $noteId = 'noteId2129224840'; - $note = new Note(); - $response = $gapicClient->createNote($formattedParent, $noteId, $note); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/CreateNote', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getNoteId(); - $this->assertProtobufEquals($noteId, $actualValue); - $actualValue = $actualRequestObject->getNote(); - $this->assertProtobufEquals($note, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createNoteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $noteId = 'noteId2129224840'; - $note = new Note(); - try { - $gapicClient->createNote($formattedParent, $noteId, $note); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createOccurrenceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $resourceUri = 'resourceUri-384040517'; - $noteName = 'noteName1780787896'; - $remediation = 'remediation779381797'; - $expectedResponse = new Occurrence(); - $expectedResponse->setName($name); - $expectedResponse->setResourceUri($resourceUri); - $expectedResponse->setNoteName($noteName); - $expectedResponse->setRemediation($remediation); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $occurrence = new Occurrence(); - $response = $gapicClient->createOccurrence($formattedParent, $occurrence); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/CreateOccurrence', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getOccurrence(); - $this->assertProtobufEquals($occurrence, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createOccurrenceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $occurrence = new Occurrence(); - try { - $gapicClient->createOccurrence($formattedParent, $occurrence); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteNoteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); - $gapicClient->deleteNote($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/DeleteNote', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteNoteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); - try { - $gapicClient->deleteNote($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 deleteOccurrenceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - $gapicClient->deleteOccurrence($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/DeleteOccurrence', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteOccurrenceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - try { - $gapicClient->deleteOccurrence($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 getNoteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $shortDescription = 'shortDescription-235369287'; - $longDescription = 'longDescription-1747792199'; - $expectedResponse = new Note(); - $expectedResponse->setName($name2); - $expectedResponse->setShortDescription($shortDescription); - $expectedResponse->setLongDescription($longDescription); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); - $response = $gapicClient->getNote($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/GetNote', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNoteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); - try { - $gapicClient->getNote($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 getOccurrenceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $resourceUri = 'resourceUri-384040517'; - $noteName = 'noteName1780787896'; - $remediation = 'remediation779381797'; - $expectedResponse = new Occurrence(); - $expectedResponse->setName($name2); - $expectedResponse->setResourceUri($resourceUri); - $expectedResponse->setNoteName($noteName); - $expectedResponse->setRemediation($remediation); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - $response = $gapicClient->getOccurrence($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/GetOccurrence', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOccurrenceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - try { - $gapicClient->getOccurrence($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 getOccurrenceNoteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $shortDescription = 'shortDescription-235369287'; - $longDescription = 'longDescription-1747792199'; - $expectedResponse = new Note(); - $expectedResponse->setName($name2); - $expectedResponse->setShortDescription($shortDescription); - $expectedResponse->setLongDescription($longDescription); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - $response = $gapicClient->getOccurrenceNote($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/GetOccurrenceNote', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOccurrenceNoteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - try { - $gapicClient->getOccurrenceNote($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 listNoteOccurrencesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $occurrencesElement = new Occurrence(); - $occurrences = [ - $occurrencesElement, - ]; - $expectedResponse = new ListNoteOccurrencesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOccurrences($occurrences); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); - $response = $gapicClient->listNoteOccurrences($formattedName); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOccurrences()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/ListNoteOccurrences', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNoteOccurrencesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); - try { - $gapicClient->listNoteOccurrences($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 listNotesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $notesElement = new Note(); - $notes = [ - $notesElement, - ]; - $expectedResponse = new ListNotesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNotes($notes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listNotes($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNotes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/ListNotes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNotesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listNotes($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 listOccurrencesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $occurrencesElement = new Occurrence(); - $occurrences = [ - $occurrencesElement, - ]; - $expectedResponse = new ListOccurrencesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOccurrences($occurrences); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listOccurrences($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOccurrences()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/ListOccurrences', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOccurrencesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listOccurrences($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 updateNoteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $shortDescription = 'shortDescription-235369287'; - $longDescription = 'longDescription-1747792199'; - $expectedResponse = new Note(); - $expectedResponse->setName($name2); - $expectedResponse->setShortDescription($shortDescription); - $expectedResponse->setLongDescription($longDescription); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); - $note = new Note(); - $response = $gapicClient->updateNote($formattedName, $note); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/UpdateNote', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getNote(); - $this->assertProtobufEquals($note, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateNoteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->noteName('[PROJECT]', '[NOTE]'); - $note = new Note(); - try { - $gapicClient->updateNote($formattedName, $note); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateOccurrenceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $resourceUri = 'resourceUri-384040517'; - $noteName = 'noteName1780787896'; - $remediation = 'remediation779381797'; - $expectedResponse = new Occurrence(); - $expectedResponse->setName($name2); - $expectedResponse->setResourceUri($resourceUri); - $expectedResponse->setNoteName($noteName); - $expectedResponse->setRemediation($remediation); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - $occurrence = new Occurrence(); - $response = $gapicClient->updateOccurrence($formattedName, $occurrence); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/grafeas.v1.Grafeas/UpdateOccurrence', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getOccurrence(); - $this->assertProtobufEquals($occurrence, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateOccurrenceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->occurrenceName('[PROJECT]', '[OCCURRENCE]'); - $occurrence = new Occurrence(); - try { - $gapicClient->updateOccurrence($formattedName, $occurrence); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->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/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Deny.php b/owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Deny.php deleted file mode 100644 index ae2b4a4fc886..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Deny.php +++ /dev/null @@ -1,34 +0,0 @@ -internalAddGeneratedFile( - ' -ä -google/iam/v2/deny.proto google.iam.v2"« -DenyRule -denied_principals (  -exception_principals (  -denied_permissions (  -exception_permissions ( + -denial_condition ( 2.google.type.ExprB‚ -com.google.iam.v2B DenyRuleProtoPZ0google.golang.org/genproto/googleapis/iam/v2;iamªGoogle.Cloud.Iam.V2ÊGoogle\\Cloud\\Iam\\V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Policy.php b/owl-bot-staging/Iam/v2/proto/src/GPBMetadata/Google/Iam/V2/Policy.php deleted file mode 100644 index 16917455af212de230bdb53e0d65a90ab42137e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3121 zcmb7G-EQMV6edX<+DTWm&Z1_6P-oqRW}~i+0v9NyptRkVt_m%yvLIwBn#L1%RA+4L zaZ6ZLLhuMY0GCKS0+(D?Tp+mX6&E}R^J6>CUzP1mD$n`(&iTG`Wfz8w9Sjdnc0R)l*@z+QKzdk*sAs)sYyr@5Q5eD#=?Pu} z$p8H4jK_f?LyZ4CB4L|Q!U%H7_Z;gs>>@YB+;!Zx8_^CU9)-f;n09dOF;p>y?IYjg zwQa)$!-*)DmuekSh69RRYY&H=fcVS{PPl2a>0p*NNqnh2j?;>8qzh{bW3xF1avQQB z!rAN)2AD+w-IBOPfa~->YeI)wKCxPqdZG&+4V%qDO@k2A9CuxUDSI`aeS%$k2cM%$ z;svw2DkgdBXn%I6Bab>kL@A+;b?gfjzFLhbb*F@jjG>-CIk%+z$;TunxMkZZpZi?d zwUhzD#|HRw1yrX?TDzyt3@&%$vQb@)O_5K`j%>J+eswK#&=p;6pT%vB4JyM)Y~H*0 zWIaA{2Msd4v_T{B<)Co^n=I*qGSL4hfT9{HZ3WDUL9FCpuC};S__sB$ErUWt>`H#{ zg&SQEYF7%$r-F7LEZHRVUDR(&|2c7_ZGjRRXtFX73$;??T|Bt}r!e)^hL1|>V*Wqhz= z@{5XP{R>b&A|aE(2@ap*ZzDcK+^6WHfUk{#R`Ogvi#~F2JLJ1prk&R`0OTj;U0|vt zqkj$V4~GnWzO%4qZGZ(|>~@}qhZSmha|E@jQCkIXQ2ZThXF^MX>hFN%1FXRI6R2aN z&g%q}ccq--p50YcomVO^oVbybAqnPG1Eg)6kBpoTy#>l&N(~OD8blSdHmy(@Ro?>T zJt@fH5aV@;`ISSHPHRqo23D0@x;c~ERWpZ&N&&fJs2YD2!Ga9N3DSPbfu$^snm)o+ z_Aut6x_+mP(t%$8@t^;G&cCHS5YL2{N@m-BEDW=5)~|0{vHG+gSWF4m)<&YICrSFr z-08KUgkpmYrIQKeV$^=;MQ4>WR&@3-$@+EzE3>DKln&jI+1K^yD;&Olp`3=`S2>pImvzVUVLRbo{Oksc!6U&n95tv8~}(P)>}Nr zZ~5|pd^#JuBAs!_k-li$BwsB{ezxSpn!l{iiZa&w8|e#YQ@uzt57?=XS81spnb+VN Gfd2swaqeLN diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/CreatePolicyRequest.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/CreatePolicyRequest.php deleted file mode 100644 index bfff2cd1bb65..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/CreatePolicyRequest.php +++ /dev/null @@ -1,185 +0,0 @@ -google.iam.v2.CreatePolicyRequest - */ -class CreatePolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource that the policy is attached to, along with the kind of policy - * to create. Format: `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. The policy to create. - * - * Generated from protobuf field .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $policy = null; - /** - * The ID to use for this policy, which will become the final component of - * the policy's resource name. The ID must contain 3 to 63 characters. It can - * contain lowercase letters and numbers, as well as dashes (`-`) and periods - * (`.`). The first character must be a lowercase letter. - * - * Generated from protobuf field string policy_id = 3; - */ - protected $policy_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource that the policy is attached to, along with the kind of policy - * to create. Format: `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * @type \Google\Cloud\Iam\V2\Policy $policy - * Required. The policy to create. - * @type string $policy_id - * The ID to use for this policy, which will become the final component of - * the policy's resource name. The ID must contain 3 to 63 characters. It can - * contain lowercase letters and numbers, as well as dashes (`-`) and periods - * (`.`). The first character must be a lowercase letter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource that the policy is attached to, along with the kind of policy - * to create. Format: `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource that the policy is attached to, along with the kind of policy - * to create. Format: `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * 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. The policy to create. - * - * Generated from protobuf field .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iam\V2\Policy|null - */ - public function getPolicy() - { - return $this->policy; - } - - public function hasPolicy() - { - return isset($this->policy); - } - - public function clearPolicy() - { - unset($this->policy); - } - - /** - * Required. The policy to create. - * - * Generated from protobuf field .google.iam.v2.Policy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iam\V2\Policy $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iam\V2\Policy::class); - $this->policy = $var; - - return $this; - } - - /** - * The ID to use for this policy, which will become the final component of - * the policy's resource name. The ID must contain 3 to 63 characters. It can - * contain lowercase letters and numbers, as well as dashes (`-`) and periods - * (`.`). The first character must be a lowercase letter. - * - * Generated from protobuf field string policy_id = 3; - * @return string - */ - public function getPolicyId() - { - return $this->policy_id; - } - - /** - * The ID to use for this policy, which will become the final component of - * the policy's resource name. The ID must contain 3 to 63 characters. It can - * contain lowercase letters and numbers, as well as dashes (`-`) and periods - * (`.`). The first character must be a lowercase letter. - * - * Generated from protobuf field string policy_id = 3; - * @param string $var - * @return $this - */ - public function setPolicyId($var) - { - GPBUtil::checkString($var, True); - $this->policy_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DeletePolicyRequest.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DeletePolicyRequest.php deleted file mode 100644 index c728fbb1621c..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DeletePolicyRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.iam.v2.DeletePolicyRequest - */ -class DeletePolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the policy to delete. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. The expected `etag` of the policy to delete. If the value does not match - * the value that is stored in IAM, the request fails with a `409` error code - * and `ABORTED` status. - * If you omit this field, the policy is deleted regardless of its current - * `etag`. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the policy to delete. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * @type string $etag - * Optional. The expected `etag` of the policy to delete. If the value does not match - * the value that is stored in IAM, the request fails with a `409` error code - * and `ABORTED` status. - * If you omit this field, the policy is deleted regardless of its current - * `etag`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the policy to delete. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the policy to delete. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric 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 expected `etag` of the policy to delete. If the value does not match - * the value that is stored in IAM, the request fails with a `409` error code - * and `ABORTED` status. - * If you omit this field, the policy is deleted regardless of its current - * `etag`. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. The expected `etag` of the policy to delete. If the value does not match - * the value that is stored in IAM, the request fails with a `409` error code - * and `ABORTED` status. - * If you omit this field, the policy is deleted regardless of its current - * `etag`. - * - * 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/Iam/v2/proto/src/Google/Cloud/Iam/V2/DenyRule.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DenyRule.php deleted file mode 100644 index c53d85f881f6..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/DenyRule.php +++ /dev/null @@ -1,425 +0,0 @@ -google.iam.v2.DenyRule - */ -class DenyRule extends \Google\Protobuf\Internal\Message -{ - /** - * The identities that are prevented from using one or more permissions on - * Google Cloud resources. This field can contain the following values: - * * `principalSet://goog/public:all`: A special identifier that represents - * any principal that is on the internet, even if they do not have a Google - * Account or are not logged in. - * * `principal://goog/subject/{email_id}`: A specific Google Account. - * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - * example, `principal://goog/subject/alice@example.com`. - * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - * Google Account that was deleted recently. For example, - * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - * the Google Account is recovered, this identifier reverts to the standard - * identifier for a Google Account. - * * `principalSet://goog/group/{group_id}`: A Google group. For example, - * `principalSet://goog/group/admins@example.com`. - * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - * that was deleted recently. For example, - * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If - * the Google group is restored, this identifier reverts to the standard - * identifier for a Google group. - * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - * A Google Cloud service account. For example, - * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - * A Google Cloud service account that was deleted recently. For example, - * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - * If the service account is undeleted, this identifier reverts to the - * standard identifier for a service account. - * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - * principals associated with the specified Google Workspace or Cloud - * Identity customer ID. For example, - * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - * - * Generated from protobuf field repeated string denied_principals = 1; - */ - private $denied_principals; - /** - * The identities that are excluded from the deny rule, even if they are - * listed in the `denied_principals`. For example, you could add a Google - * group to the `denied_principals`, then exclude specific users who belong to - * that group. - * This field can contain the same values as the `denied_principals` field, - * excluding `principalSet://goog/public:all`, which represents all users on - * the internet. - * - * Generated from protobuf field repeated string exception_principals = 2; - */ - private $exception_principals; - /** - * The permissions that are explicitly denied by this rule. Each permission - * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` - * is the fully qualified domain name for the service. For example, - * `iam.googleapis.com/roles.list`. - * - * Generated from protobuf field repeated string denied_permissions = 3; - */ - private $denied_permissions; - /** - * Specifies the permissions that this rule excludes from the set of denied - * permissions given by `denied_permissions`. If a permission appears in - * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be - * denied. - * The excluded permissions can be specified using the same syntax as - * `denied_permissions`. - * - * Generated from protobuf field repeated string exception_permissions = 4; - */ - private $exception_permissions; - /** - * The condition that determines whether this deny rule applies to a request. - * If the condition expression evaluates to `true`, then the deny rule is - * applied; otherwise, the deny rule is not applied. - * Each deny rule is evaluated independently. If this deny rule does not apply - * to a request, other deny rules might still apply. - * The condition can use CEL functions that evaluate - * [resource - * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other - * functions and operators are not supported. - * - * Generated from protobuf field .google.type.Expr denial_condition = 5; - */ - protected $denial_condition = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $denied_principals - * The identities that are prevented from using one or more permissions on - * Google Cloud resources. This field can contain the following values: - * * `principalSet://goog/public:all`: A special identifier that represents - * any principal that is on the internet, even if they do not have a Google - * Account or are not logged in. - * * `principal://goog/subject/{email_id}`: A specific Google Account. - * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - * example, `principal://goog/subject/alice@example.com`. - * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - * Google Account that was deleted recently. For example, - * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - * the Google Account is recovered, this identifier reverts to the standard - * identifier for a Google Account. - * * `principalSet://goog/group/{group_id}`: A Google group. For example, - * `principalSet://goog/group/admins@example.com`. - * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - * that was deleted recently. For example, - * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If - * the Google group is restored, this identifier reverts to the standard - * identifier for a Google group. - * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - * A Google Cloud service account. For example, - * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - * A Google Cloud service account that was deleted recently. For example, - * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - * If the service account is undeleted, this identifier reverts to the - * standard identifier for a service account. - * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - * principals associated with the specified Google Workspace or Cloud - * Identity customer ID. For example, - * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - * @type array|\Google\Protobuf\Internal\RepeatedField $exception_principals - * The identities that are excluded from the deny rule, even if they are - * listed in the `denied_principals`. For example, you could add a Google - * group to the `denied_principals`, then exclude specific users who belong to - * that group. - * This field can contain the same values as the `denied_principals` field, - * excluding `principalSet://goog/public:all`, which represents all users on - * the internet. - * @type array|\Google\Protobuf\Internal\RepeatedField $denied_permissions - * The permissions that are explicitly denied by this rule. Each permission - * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` - * is the fully qualified domain name for the service. For example, - * `iam.googleapis.com/roles.list`. - * @type array|\Google\Protobuf\Internal\RepeatedField $exception_permissions - * Specifies the permissions that this rule excludes from the set of denied - * permissions given by `denied_permissions`. If a permission appears in - * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be - * denied. - * The excluded permissions can be specified using the same syntax as - * `denied_permissions`. - * @type \Google\Type\Expr $denial_condition - * The condition that determines whether this deny rule applies to a request. - * If the condition expression evaluates to `true`, then the deny rule is - * applied; otherwise, the deny rule is not applied. - * Each deny rule is evaluated independently. If this deny rule does not apply - * to a request, other deny rules might still apply. - * The condition can use CEL functions that evaluate - * [resource - * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other - * functions and operators are not supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Deny::initOnce(); - parent::__construct($data); - } - - /** - * The identities that are prevented from using one or more permissions on - * Google Cloud resources. This field can contain the following values: - * * `principalSet://goog/public:all`: A special identifier that represents - * any principal that is on the internet, even if they do not have a Google - * Account or are not logged in. - * * `principal://goog/subject/{email_id}`: A specific Google Account. - * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - * example, `principal://goog/subject/alice@example.com`. - * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - * Google Account that was deleted recently. For example, - * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - * the Google Account is recovered, this identifier reverts to the standard - * identifier for a Google Account. - * * `principalSet://goog/group/{group_id}`: A Google group. For example, - * `principalSet://goog/group/admins@example.com`. - * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - * that was deleted recently. For example, - * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If - * the Google group is restored, this identifier reverts to the standard - * identifier for a Google group. - * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - * A Google Cloud service account. For example, - * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - * A Google Cloud service account that was deleted recently. For example, - * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - * If the service account is undeleted, this identifier reverts to the - * standard identifier for a service account. - * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - * principals associated with the specified Google Workspace or Cloud - * Identity customer ID. For example, - * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - * - * Generated from protobuf field repeated string denied_principals = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeniedPrincipals() - { - return $this->denied_principals; - } - - /** - * The identities that are prevented from using one or more permissions on - * Google Cloud resources. This field can contain the following values: - * * `principalSet://goog/public:all`: A special identifier that represents - * any principal that is on the internet, even if they do not have a Google - * Account or are not logged in. - * * `principal://goog/subject/{email_id}`: A specific Google Account. - * Includes Gmail, Cloud Identity, and Google Workspace user accounts. For - * example, `principal://goog/subject/alice@example.com`. - * * `deleted:principal://goog/subject/{email_id}?uid={uid}`: A specific - * Google Account that was deleted recently. For example, - * `deleted:principal://goog/subject/alice@example.com?uid=1234567890`. If - * the Google Account is recovered, this identifier reverts to the standard - * identifier for a Google Account. - * * `principalSet://goog/group/{group_id}`: A Google group. For example, - * `principalSet://goog/group/admins@example.com`. - * * `deleted:principalSet://goog/group/{group_id}?uid={uid}`: A Google group - * that was deleted recently. For example, - * `deleted:principalSet://goog/group/admins@example.com?uid=1234567890`. If - * the Google group is restored, this identifier reverts to the standard - * identifier for a Google group. - * * `principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}`: - * A Google Cloud service account. For example, - * `principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com`. - * * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/{service_account_id}?uid={uid}`: - * A Google Cloud service account that was deleted recently. For example, - * `deleted:principal://iam.googleapis.com/projects/-/serviceAccounts/my-service-account@iam.gserviceaccount.com?uid=1234567890`. - * If the service account is undeleted, this identifier reverts to the - * standard identifier for a service account. - * * `principalSet://goog/cloudIdentityCustomerId/{customer_id}`: All of the - * principals associated with the specified Google Workspace or Cloud - * Identity customer ID. For example, - * `principalSet://goog/cloudIdentityCustomerId/C01Abc35`. - * - * Generated from protobuf field repeated string denied_principals = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeniedPrincipals($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->denied_principals = $arr; - - return $this; - } - - /** - * The identities that are excluded from the deny rule, even if they are - * listed in the `denied_principals`. For example, you could add a Google - * group to the `denied_principals`, then exclude specific users who belong to - * that group. - * This field can contain the same values as the `denied_principals` field, - * excluding `principalSet://goog/public:all`, which represents all users on - * the internet. - * - * Generated from protobuf field repeated string exception_principals = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExceptionPrincipals() - { - return $this->exception_principals; - } - - /** - * The identities that are excluded from the deny rule, even if they are - * listed in the `denied_principals`. For example, you could add a Google - * group to the `denied_principals`, then exclude specific users who belong to - * that group. - * This field can contain the same values as the `denied_principals` field, - * excluding `principalSet://goog/public:all`, which represents all users on - * the internet. - * - * Generated from protobuf field repeated string exception_principals = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExceptionPrincipals($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exception_principals = $arr; - - return $this; - } - - /** - * The permissions that are explicitly denied by this rule. Each permission - * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` - * is the fully qualified domain name for the service. For example, - * `iam.googleapis.com/roles.list`. - * - * Generated from protobuf field repeated string denied_permissions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeniedPermissions() - { - return $this->denied_permissions; - } - - /** - * The permissions that are explicitly denied by this rule. Each permission - * uses the format `{service_fqdn}/{resource}.{verb}`, where `{service_fqdn}` - * is the fully qualified domain name for the service. For example, - * `iam.googleapis.com/roles.list`. - * - * Generated from protobuf field repeated string denied_permissions = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeniedPermissions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->denied_permissions = $arr; - - return $this; - } - - /** - * Specifies the permissions that this rule excludes from the set of denied - * permissions given by `denied_permissions`. If a permission appears in - * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be - * denied. - * The excluded permissions can be specified using the same syntax as - * `denied_permissions`. - * - * Generated from protobuf field repeated string exception_permissions = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExceptionPermissions() - { - return $this->exception_permissions; - } - - /** - * Specifies the permissions that this rule excludes from the set of denied - * permissions given by `denied_permissions`. If a permission appears in - * `denied_permissions` _and_ in `exception_permissions` then it will _not_ be - * denied. - * The excluded permissions can be specified using the same syntax as - * `denied_permissions`. - * - * Generated from protobuf field repeated string exception_permissions = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExceptionPermissions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exception_permissions = $arr; - - return $this; - } - - /** - * The condition that determines whether this deny rule applies to a request. - * If the condition expression evaluates to `true`, then the deny rule is - * applied; otherwise, the deny rule is not applied. - * Each deny rule is evaluated independently. If this deny rule does not apply - * to a request, other deny rules might still apply. - * The condition can use CEL functions that evaluate - * [resource - * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other - * functions and operators are not supported. - * - * Generated from protobuf field .google.type.Expr denial_condition = 5; - * @return \Google\Type\Expr|null - */ - public function getDenialCondition() - { - return $this->denial_condition; - } - - public function hasDenialCondition() - { - return isset($this->denial_condition); - } - - public function clearDenialCondition() - { - unset($this->denial_condition); - } - - /** - * The condition that determines whether this deny rule applies to a request. - * If the condition expression evaluates to `true`, then the deny rule is - * applied; otherwise, the deny rule is not applied. - * Each deny rule is evaluated independently. If this deny rule does not apply - * to a request, other deny rules might still apply. - * The condition can use CEL functions that evaluate - * [resource - * tags](https://cloud.google.com/iam/help/conditions/resource-tags). Other - * functions and operators are not supported. - * - * Generated from protobuf field .google.type.Expr denial_condition = 5; - * @param \Google\Type\Expr $var - * @return $this - */ - public function setDenialCondition($var) - { - GPBUtil::checkMessage($var, \Google\Type\Expr::class); - $this->denial_condition = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/GetPolicyRequest.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/GetPolicyRequest.php deleted file mode 100644 index 4b02f1d7a6ff..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/GetPolicyRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.iam.v2.GetPolicyRequest - */ -class GetPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the policy to retrieve. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric 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. The resource name of the policy to retrieve. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the policy to retrieve. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the policy to retrieve. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric 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/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesRequest.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesRequest.php deleted file mode 100644 index 1573013d9d62..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesRequest.php +++ /dev/null @@ -1,175 +0,0 @@ -google.iam.v2.ListPoliciesRequest - */ -class ListPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource that the policy is attached to, along with the kind of policy - * to list. Format: - * `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * The maximum number of policies to return. IAM ignores this value and uses - * the value 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to - * retrieve the next page. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource that the policy is attached to, along with the kind of policy - * to list. Format: - * `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * @type int $page_size - * The maximum number of policies to return. IAM ignores this value and uses - * the value 1000. - * @type string $page_token - * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to - * retrieve the next page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource that the policy is attached to, along with the kind of policy - * to list. Format: - * `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource that the policy is attached to, along with the kind of policy - * to list. Format: - * `policies/{attachment_point}/denypolicies` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * - * 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; - } - - /** - * The maximum number of policies to return. IAM ignores this value and uses - * the value 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of policies to return. IAM ignores this value and uses - * the value 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 in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to - * retrieve the next page. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to - * retrieve the next page. - * - * 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/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesResponse.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesResponse.php deleted file mode 100644 index c2749f099b28..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/ListPoliciesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.iam.v2.ListPoliciesResponse - */ -class ListPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Metadata for the policies that are attached to the resource. - * - * Generated from protobuf field repeated .google.iam.v2.Policy policies = 1; - */ - private $policies; - /** - * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the - * next page. If this field is omitted, there are no additional 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\Iam\V2\Policy>|\Google\Protobuf\Internal\RepeatedField $policies - * Metadata for the policies that are attached to the resource. - * @type string $next_page_token - * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the - * next page. If this field is omitted, there are no additional pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Metadata for the policies that are attached to the resource. - * - * Generated from protobuf field repeated .google.iam.v2.Policy policies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPolicies() - { - return $this->policies; - } - - /** - * Metadata for the policies that are attached to the resource. - * - * Generated from protobuf field repeated .google.iam.v2.Policy policies = 1; - * @param array<\Google\Cloud\Iam\V2\Policy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iam\V2\Policy::class); - $this->policies = $arr; - - return $this; - } - - /** - * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the - * next page. If this field is omitted, there are no additional pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the - * next page. If this field is omitted, there are no additional 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/Iam/v2/proto/src/Google/Cloud/Iam/V2/PoliciesGrpcClient.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PoliciesGrpcClient.php deleted file mode 100644 index c4e5d79b4cdb..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PoliciesGrpcClient.php +++ /dev/null @@ -1,124 +0,0 @@ -_simpleRequest('/google.iam.v2.Policies/ListPolicies', - $argument, - ['\Google\Cloud\Iam\V2\ListPoliciesResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets a policy. - * @param \Google\Cloud\Iam\V2\GetPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetPolicy(\Google\Cloud\Iam\V2\GetPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.iam.v2.Policies/GetPolicy', - $argument, - ['\Google\Cloud\Iam\V2\Policy', 'decode'], - $metadata, $options); - } - - /** - * Creates a policy. - * @param \Google\Cloud\Iam\V2\CreatePolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreatePolicy(\Google\Cloud\Iam\V2\CreatePolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.iam.v2.Policies/CreatePolicy', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates the specified policy. - * - * You can update only the rules and the display name for the policy. - * - * To update a policy, you should use a read-modify-write loop: - * - * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. - * 2. Modify the policy as needed. - * 3. Use `UpdatePolicy` to write the updated policy. - * - * This pattern helps prevent conflicts between concurrent updates. - * @param \Google\Cloud\Iam\V2\UpdatePolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdatePolicy(\Google\Cloud\Iam\V2\UpdatePolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.iam.v2.Policies/UpdatePolicy', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a policy. This action is permanent. - * @param \Google\Cloud\Iam\V2\DeletePolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeletePolicy(\Google\Cloud\Iam\V2\DeletePolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.iam.v2.Policies/DeletePolicy', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/Policy.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/Policy.php deleted file mode 100644 index 79dfa8b27141..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/Policy.php +++ /dev/null @@ -1,505 +0,0 @@ -google.iam.v2.Policy - */ -class Policy extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The resource name of the `Policy`, which must be unique. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, requests can use the alphanumeric or the numeric ID. - * Responses always contain the numeric ID. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the - * `Policy` is created. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $uid = ''; - /** - * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. - * - * Generated from protobuf field string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kind = ''; - /** - * A user-specified description of the `Policy`. This value can be up to 63 - * characters. - * - * Generated from protobuf field string display_name = 4; - */ - protected $display_name = ''; - /** - * A key-value map to store arbitrary metadata for the `Policy`. Keys - * can be up to 63 characters. Values can be up to 255 characters. - * - * Generated from protobuf field map annotations = 5; - */ - private $annotations; - /** - * An opaque tag that identifies the current version of the `Policy`. IAM uses - * this value to help manage concurrent updates, so they do not cause one - * update to be overwritten by another. - * If this field is present in a [CreatePolicy][] request, the value is - * ignored. - * - * Generated from protobuf field string etag = 6; - */ - protected $etag = ''; - /** - * Output only. The time when the `Policy` 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 time when the `Policy` was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * A list of rules that specify the behavior of the `Policy`. All of the rules - * should be of the `kind` specified in the `Policy`. - * - * Generated from protobuf field repeated .google.iam.v2.PolicyRule rules = 10; - */ - private $rules; - /** - * Immutable. Specifies that this policy is managed by an authority and can only be - * modified by that authority. Usage is restricted. - * - * Generated from protobuf field string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $managing_authority = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The resource name of the `Policy`, which must be unique. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, requests can use the alphanumeric or the numeric ID. - * Responses always contain the numeric ID. - * @type string $uid - * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the - * `Policy` is created. - * @type string $kind - * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. - * @type string $display_name - * A user-specified description of the `Policy`. This value can be up to 63 - * characters. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * A key-value map to store arbitrary metadata for the `Policy`. Keys - * can be up to 63 characters. Values can be up to 255 characters. - * @type string $etag - * An opaque tag that identifies the current version of the `Policy`. IAM uses - * this value to help manage concurrent updates, so they do not cause one - * update to be overwritten by another. - * If this field is present in a [CreatePolicy][] request, the value is - * ignored. - * @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 last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. - * @type array<\Google\Cloud\Iam\V2\PolicyRule>|\Google\Protobuf\Internal\RepeatedField $rules - * A list of rules that specify the behavior of the `Policy`. All of the rules - * should be of the `kind` specified in the `Policy`. - * @type string $managing_authority - * Immutable. Specifies that this policy is managed by an authority and can only be - * modified by that authority. Usage is restricted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The resource name of the `Policy`, which must be unique. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, requests can use the alphanumeric or the numeric ID. - * Responses always contain the numeric ID. - * - * 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`, which must be unique. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`. - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, requests can use the alphanumeric or the numeric ID. - * Responses always contain the numeric 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; - } - - /** - * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the - * `Policy` is created. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the - * `Policy` is created. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. - * - * Generated from protobuf field string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. - * - * Generated from protobuf field string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * A user-specified description of the `Policy`. This value can be up to 63 - * characters. - * - * Generated from protobuf field string display_name = 4; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A user-specified description of the `Policy`. This value can be up to 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 key-value map to store arbitrary metadata for the `Policy`. Keys - * can be up to 63 characters. Values can be up to 255 characters. - * - * Generated from protobuf field map annotations = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * A key-value map to store arbitrary metadata for the `Policy`. Keys - * can be up to 63 characters. Values can be up to 255 characters. - * - * Generated from protobuf field map annotations = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * An opaque tag that identifies the current version of the `Policy`. IAM uses - * this value to help manage concurrent updates, so they do not cause one - * update to be overwritten by another. - * If this field is present in a [CreatePolicy][] request, the value is - * ignored. - * - * Generated from protobuf field string etag = 6; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * An opaque tag that identifies the current version of the `Policy`. IAM uses - * this value to help manage concurrent updates, so they do not cause one - * update to be overwritten by another. - * If this field is present in a [CreatePolicy][] request, the value is - * ignored. - * - * Generated from protobuf field string etag = 6; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Output only. The time when the `Policy` 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 when the `Policy` 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 time when the `Policy` 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. The time when the `Policy` 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; - } - - /** - * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * A list of rules that specify the behavior of the `Policy`. All of the rules - * should be of the `kind` specified in the `Policy`. - * - * Generated from protobuf field repeated .google.iam.v2.PolicyRule rules = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * A list of rules that specify the behavior of the `Policy`. All of the rules - * should be of the `kind` specified in the `Policy`. - * - * Generated from protobuf field repeated .google.iam.v2.PolicyRule rules = 10; - * @param array<\Google\Cloud\Iam\V2\PolicyRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iam\V2\PolicyRule::class); - $this->rules = $arr; - - return $this; - } - - /** - * Immutable. Specifies that this policy is managed by an authority and can only be - * modified by that authority. Usage is restricted. - * - * Generated from protobuf field string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getManagingAuthority() - { - return $this->managing_authority; - } - - /** - * Immutable. Specifies that this policy is managed by an authority and can only be - * modified by that authority. Usage is restricted. - * - * Generated from protobuf field string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setManagingAuthority($var) - { - GPBUtil::checkString($var, True); - $this->managing_authority = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyOperationMetadata.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyOperationMetadata.php deleted file mode 100644 index bcaa57148115..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyOperationMetadata.php +++ /dev/null @@ -1,77 +0,0 @@ -google.iam.v2.PolicyOperationMetadata - */ -class PolicyOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Timestamp when the `google.longrunning.Operation` was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Timestamp when the `google.longrunning.Operation` was created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Timestamp when the `google.longrunning.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); - } - - /** - * Timestamp when the `google.longrunning.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; - } - -} - diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyRule.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyRule.php deleted file mode 100644 index 2691d8de2f72..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/PolicyRule.php +++ /dev/null @@ -1,113 +0,0 @@ -google.iam.v2.PolicyRule - */ -class PolicyRule extends \Google\Protobuf\Internal\Message -{ - /** - * A user-specified description of the rule. This value can be up to 256 - * characters. - * - * Generated from protobuf field string description = 1; - */ - protected $description = ''; - protected $kind; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iam\V2\DenyRule $deny_rule - * A rule for a deny policy. - * @type string $description - * A user-specified description of the rule. This value can be up to 256 - * characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * A rule for a deny policy. - * - * Generated from protobuf field .google.iam.v2.DenyRule deny_rule = 2; - * @return \Google\Cloud\Iam\V2\DenyRule|null - */ - public function getDenyRule() - { - return $this->readOneof(2); - } - - public function hasDenyRule() - { - return $this->hasOneof(2); - } - - /** - * A rule for a deny policy. - * - * Generated from protobuf field .google.iam.v2.DenyRule deny_rule = 2; - * @param \Google\Cloud\Iam\V2\DenyRule $var - * @return $this - */ - public function setDenyRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iam\V2\DenyRule::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A user-specified description of the rule. This value can be up to 256 - * characters. - * - * Generated from protobuf field string description = 1; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A user-specified description of the rule. This value can be up to 256 - * characters. - * - * 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; - } - - /** - * @return string - */ - public function getKind() - { - return $this->whichOneof("kind"); - } - -} - diff --git a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/UpdatePolicyRequest.php b/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/UpdatePolicyRequest.php deleted file mode 100644 index da476fab3dce..000000000000 --- a/owl-bot-staging/Iam/v2/proto/src/Google/Cloud/Iam/V2/UpdatePolicyRequest.php +++ /dev/null @@ -1,89 +0,0 @@ -google.iam.v2.UpdatePolicyRequest - */ -class UpdatePolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The policy to update. - * To prevent conflicting updates, the `etag` value must match the value that - * is stored in IAM. If the `etag` values do not match, the request fails with - * a `409` error code and `ABORTED` status. - * - * Generated from protobuf field .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $policy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iam\V2\Policy $policy - * Required. The policy to update. - * To prevent conflicting updates, the `etag` value must match the value that - * is stored in IAM. If the `etag` values do not match, the request fails with - * a `409` error code and `ABORTED` status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\V2\Policy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The policy to update. - * To prevent conflicting updates, the `etag` value must match the value that - * is stored in IAM. If the `etag` values do not match, the request fails with - * a `409` error code and `ABORTED` status. - * - * Generated from protobuf field .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iam\V2\Policy|null - */ - public function getPolicy() - { - return $this->policy; - } - - public function hasPolicy() - { - return isset($this->policy); - } - - public function clearPolicy() - { - unset($this->policy); - } - - /** - * Required. The policy to update. - * To prevent conflicting updates, the `etag` value must match the value that - * is stored in IAM. If the `etag` values do not match, the request fails with - * a `409` error code and `ABORTED` status. - * - * Generated from protobuf field .google.iam.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iam\V2\Policy $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iam\V2\Policy::class); - $this->policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/create_policy.php b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/create_policy.php deleted file mode 100644 index 446dd916febe..000000000000 --- a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/create_policy.php +++ /dev/null @@ -1,90 +0,0 @@ -createPolicy($parent, $policy); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Policy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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_policy_sample($parent); -} -// [END iam_v2_generated_Policies_CreatePolicy_sync] diff --git a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/delete_policy.php b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/delete_policy.php deleted file mode 100644 index 2e5eebdbf025..000000000000 --- a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/delete_policy.php +++ /dev/null @@ -1,86 +0,0 @@ -deletePolicy($name); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Policy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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_policy_sample($name); -} -// [END iam_v2_generated_Policies_DeletePolicy_sync] diff --git a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/get_policy.php b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/get_policy.php deleted file mode 100644 index 3a595cfb4eab..000000000000 --- a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/get_policy.php +++ /dev/null @@ -1,74 +0,0 @@ -getPolicy($name); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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_policy_sample($name); -} -// [END iam_v2_generated_Policies_GetPolicy_sync] diff --git a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/list_policies.php b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/list_policies.php deleted file mode 100644 index 3b00a41ff1c4..000000000000 --- a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/list_policies.php +++ /dev/null @@ -1,85 +0,0 @@ -listPolicies($parent); - - /** @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 -{ - $parent = '[PARENT]'; - - list_policies_sample($parent); -} -// [END iam_v2_generated_Policies_ListPolicies_sync] diff --git a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/update_policy.php b/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/update_policy.php deleted file mode 100644 index e557f00a9091..000000000000 --- a/owl-bot-staging/Iam/v2/samples/V2/PoliciesClient/update_policy.php +++ /dev/null @@ -1,78 +0,0 @@ -updatePolicy($policy); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Policy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - 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 iam_v2_generated_Policies_UpdatePolicy_sync] diff --git a/owl-bot-staging/Iam/v2/src/V2/Gapic/PoliciesGapicClient.php b/owl-bot-staging/Iam/v2/src/V2/Gapic/PoliciesGapicClient.php deleted file mode 100644 index 6a3c6aec38d0..000000000000 --- a/owl-bot-staging/Iam/v2/src/V2/Gapic/PoliciesGapicClient.php +++ /dev/null @@ -1,598 +0,0 @@ -createPolicy($parent, $policy); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $policiesClient->createPolicy($parent, $policy); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $policiesClient->resumeOperation($operationName, 'createPolicy'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $policiesClient->close(); - * } - * ``` - */ -class PoliciesGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.iam.v2.Policies'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'iam.googleapis.com'; - - /** 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 $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/policies_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/policies_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/policies_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/policies_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; - } - - /** - * 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 'iam.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a policy. - * - * Sample code: - * ``` - * $policiesClient = new PoliciesClient(); - * try { - * $parent = 'parent'; - * $policy = new Policy(); - * $operationResponse = $policiesClient->createPolicy($parent, $policy); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $policiesClient->createPolicy($parent, $policy); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $policiesClient->resumeOperation($operationName, 'createPolicy'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $policiesClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource that the policy is attached to, along with the kind of policy - * to create. Format: `policies/{attachment_point}/denypolicies` - * - * - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * @param Policy $policy Required. The policy to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $policyId - * The ID to use for this policy, which will become the final component of - * the policy's resource name. The ID must contain 3 to 63 characters. It can - * contain lowercase letters and numbers, as well as dashes (`-`) and periods - * (`.`). The first character must be a lowercase letter. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createPolicy($parent, $policy, array $optionalArgs = []) - { - $request = new CreatePolicyRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setPolicy($policy); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['policyId'])) { - $request->setPolicyId($optionalArgs['policyId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreatePolicy', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a policy. This action is permanent. - * - * Sample code: - * ``` - * $policiesClient = new PoliciesClient(); - * try { - * $name = 'name'; - * $operationResponse = $policiesClient->deletePolicy($name); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $policiesClient->deletePolicy($name); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $policiesClient->resumeOperation($operationName, 'deletePolicy'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $policiesClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the policy to delete. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * - * - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric ID. - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * Optional. The expected `etag` of the policy to delete. If the value does not match - * the value that is stored in IAM, the request fails with a `409` error code - * and `ABORTED` status. - * - * If you omit this field, the policy is deleted regardless of its current - * `etag`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deletePolicy($name, array $optionalArgs = []) - { - $request = new DeletePolicyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeletePolicy', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets a policy. - * - * Sample code: - * ``` - * $policiesClient = new PoliciesClient(); - * try { - * $name = 'name'; - * $response = $policiesClient->getPolicy($name); - * } finally { - * $policiesClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the policy to retrieve. Format: - * `policies/{attachment_point}/denypolicies/{policy_id}` - * - * - * Use the URL-encoded full resource name, which means that the forward-slash - * character, `/`, must be written as `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`. - * - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric 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\Iam\V2\Policy - * - * @throws ApiException if the remote call fails - */ - public function getPolicy($name, array $optionalArgs = []) - { - $request = new GetPolicyRequest(); - $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('GetPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves the policies of the specified kind that are attached to a - * resource. - * - * The response lists only policy metadata. In particular, policy rules are - * omitted. - * - * Sample code: - * ``` - * $policiesClient = new PoliciesClient(); - * try { - * $parent = 'parent'; - * // Iterate over pages of elements - * $pagedResponse = $policiesClient->listPolicies($parent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $policiesClient->listPolicies($parent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $policiesClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource that the policy is attached to, along with the kind of policy - * to list. Format: - * `policies/{attachment_point}/denypolicies` - * - * - * The attachment point is identified by its URL-encoded full resource name, - * which means that the forward-slash character, `/`, must be written as - * `%2F`. For example, - * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies`. - * - * For organizations and folders, use the numeric ID in the full resource - * name. For projects, you can use the alphanumeric or the numeric 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 RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listPolicies($parent, array $optionalArgs = []) - { - $request = new ListPoliciesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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('ListPolicies', $optionalArgs, ListPoliciesResponse::class, $request); - } - - /** - * Updates the specified policy. - * - * You can update only the rules and the display name for the policy. - * - * To update a policy, you should use a read-modify-write loop: - * - * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. - * 2. Modify the policy as needed. - * 3. Use `UpdatePolicy` to write the updated policy. - * - * This pattern helps prevent conflicts between concurrent updates. - * - * Sample code: - * ``` - * $policiesClient = new PoliciesClient(); - * try { - * $policy = new Policy(); - * $operationResponse = $policiesClient->updatePolicy($policy); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $policiesClient->updatePolicy($policy); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $policiesClient->resumeOperation($operationName, 'updatePolicy'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $policiesClient->close(); - * } - * ``` - * - * @param Policy $policy Required. The policy to update. - * - * To prevent conflicting updates, the `etag` value must match the value that - * is stored in IAM. If the `etag` values do not match, the request fails with - * a `409` error code and `ABORTED` status. - * @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\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updatePolicy($policy, array $optionalArgs = []) - { - $request = new UpdatePolicyRequest(); - $requestParamHeaders = []; - $request->setPolicy($policy); - $requestParamHeaders['policy.name'] = $policy->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdatePolicy', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/Iam/v2/src/V2/PoliciesClient.php b/owl-bot-staging/Iam/v2/src/V2/PoliciesClient.php deleted file mode 100644 index d0acebc4ea23..000000000000 --- a/owl-bot-staging/Iam/v2/src/V2/PoliciesClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.iam.v2.Policies' => [ - 'CreatePolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Iam\V2\Policy', - 'metadataReturnType' => '\Google\Cloud\Iam\V2\PolicyOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeletePolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Iam\V2\Policy', - 'metadataReturnType' => '\Google\Cloud\Iam\V2\PolicyOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'UpdatePolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Iam\V2\Policy', - 'metadataReturnType' => '\Google\Cloud\Iam\V2\PolicyOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPolicies', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Iam/v2/src/V2/resources/policies_rest_client_config.php b/owl-bot-staging/Iam/v2/src/V2/resources/policies_rest_client_config.php deleted file mode 100644 index 37374681f440..000000000000 --- a/owl-bot-staging/Iam/v2/src/V2/resources/policies_rest_client_config.php +++ /dev/null @@ -1,80 +0,0 @@ - [ - 'google.iam.v2.Policies' => [ - 'CreatePolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=policies/*/*}', - 'body' => 'policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeletePolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=policies/*/*/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=policies/*/*/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=policies/*/*}', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdatePolicy' => [ - 'method' => 'put', - 'uriTemplate' => '/v2/{policy.name=policies/*/*/*}', - 'body' => 'policy', - 'placeholders' => [ - 'policy.name' => [ - 'getters' => [ - 'getPolicy', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=policies/*/*/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Iam/v2/tests/Unit/V2/PoliciesClientTest.php b/owl-bot-staging/Iam/v2/tests/Unit/V2/PoliciesClientTest.php deleted file mode 100644 index 9f1626edc41d..000000000000 --- a/owl-bot-staging/Iam/v2/tests/Unit/V2/PoliciesClientTest.php +++ /dev/null @@ -1,595 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return PoliciesClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new PoliciesClient($options); - } - - /** @test */ - public function createPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $kind = 'kind3292052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $managingAuthority = 'managingAuthority617792550'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setKind($kind); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setManagingAuthority($managingAuthority); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $policy = new Policy(); - $response = $gapicClient->createPolicy($parent, $policy); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v2.Policies/CreatePolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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'; - $policy = new Policy(); - $response = $gapicClient->createPolicy($parent, $policy); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deletePolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $kind = 'kind3292052'; - $displayName = 'displayName1615086568'; - $etag2 = 'etag2-1293302904'; - $managingAuthority = 'managingAuthority617792550'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setKind($kind); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag2); - $expectedResponse->setManagingAuthority($managingAuthority); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deletePolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->deletePolicy($name); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v2.Policies/DeletePolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deletePolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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'; - $response = $gapicClient->deletePolicy($name); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $kind = 'kind3292052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $managingAuthority = 'managingAuthority617792550'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setKind($kind); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setManagingAuthority($managingAuthority); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->getPolicy($name); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v2.Policies/GetPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $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 - $name = 'name3373707'; - try { - $gapicClient->getPolicy($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 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 - $parent = 'parent-995424086'; - $response = $gapicClient->listPolicies($parent); - $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.iam.v2.Policies/ListPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $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 - $parent = 'parent-995424086'; - try { - $gapicClient->listPolicies($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 updatePolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $kind = 'kind3292052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $managingAuthority = 'managingAuthority617792550'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setKind($kind); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setManagingAuthority($managingAuthority); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updatePolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $policy = new Policy(); - $response = $gapicClient->updatePolicy($policy); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v2.Policies/UpdatePolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updatePolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $policy = new Policy(); - $response = $gapicClient->updatePolicy($policy); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Common.php b/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Common.php deleted file mode 100644 index fadb9cb46821..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Common.php +++ /dev/null @@ -1,66 +0,0 @@ -internalAddGeneratedFile( - ' -ÿ -&google/iam/credentials/v1/common.protogoogle.iam.credentials.v1google/api/resource.protogoogle/protobuf/duration.protogoogle/protobuf/timestamp.proto"© -GenerateAccessTokenRequest7 -name ( B)àAúA# -!iam.googleapis.com/ServiceAccount - delegates (  -scope ( BàA+ -lifetime ( 2.google.protobuf.Duration"d -GenerateAccessTokenResponse - access_token ( / - expire_time ( 2.google.protobuf.Timestamp"s -SignBlobRequest7 -name ( B)àAúA# -!iam.googleapis.com/ServiceAccount - delegates (  -payload ( BàA"7 -SignBlobResponse -key_id (  - signed_blob ( "r -SignJwtRequest7 -name ( B)àAúA# -!iam.googleapis.com/ServiceAccount - delegates (  -payload ( BàA"5 -SignJwtResponse -key_id (  - -signed_jwt ( "’ -GenerateIdTokenRequest7 -name ( B)àAúA# -!iam.googleapis.com/ServiceAccount - delegates (  -audience ( BàA - include_email ("( -GenerateIdTokenResponse -token ( B« -#com.google.cloud.iam.credentials.v1BIAMCredentialsCommonProtoPZDgoogle.golang.org/genproto/googleapis/iam/credentials/v1;credentialsøªGoogle.Cloud.Iam.Credentials.V1ÊGoogle\\Cloud\\Iam\\Credentials\\V1êAY -!iam.googleapis.com/ServiceAccount4projects/{project}/serviceAccounts/{service_account}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Iamcredentials.php b/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Iamcredentials.php deleted file mode 100644 index 41d6ac08850d..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/GPBMetadata/Google/Iam/Credentials/V1/Iamcredentials.php +++ /dev/null @@ -1,36 +0,0 @@ -internalAddGeneratedFile( - ' - - -.google/iam/credentials/v1/iamcredentials.protogoogle.iam.credentials.v1google/api/client.proto&google/iam/credentials/v1/common.proto2­ -IAMCredentialsì -GenerateAccessToken5.google.iam.credentials.v1.GenerateAccessTokenRequest6.google.iam.credentials.v1.GenerateAccessTokenResponse"f‚Óä“@";/v1/{name=projects/*/serviceAccounts/*}:generateAccessToken:*ÚAname,delegates,scope,lifetimeä -GenerateIdToken1.google.iam.credentials.v1.GenerateIdTokenRequest2.google.iam.credentials.v1.GenerateIdTokenResponse"j‚Óä“<"7/v1/{name=projects/*/serviceAccounts/*}:generateIdToken:*ÚA%name,delegates,audience,include_email¹ -SignBlob*.google.iam.credentials.v1.SignBlobRequest+.google.iam.credentials.v1.SignBlobResponse"T‚Óä“5"0/v1/{name=projects/*/serviceAccounts/*}:signBlob:*ÚAname,delegates,payloadµ -SignJwt).google.iam.credentials.v1.SignJwtRequest*.google.iam.credentials.v1.SignJwtResponse"S‚Óä“4"//v1/{name=projects/*/serviceAccounts/*}:signJwt:*ÚAname,delegates,payloadQÊAiamcredentials.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÉ -#com.google.cloud.iam.credentials.v1BIAMCredentialsProtoPZDgoogle.golang.org/genproto/googleapis/iam/credentials/v1;credentialsøªGoogle.Cloud.Iam.Credentials.V1ÊGoogle\\Cloud\\Iam\\Credentials\\V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenRequest.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenRequest.php deleted file mode 100644 index c52fa03abdc2..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenRequest.php +++ /dev/null @@ -1,245 +0,0 @@ -google.iam.credentials.v1.GenerateAccessTokenRequest - */ -class GenerateAccessTokenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 2; - */ - private $delegates; - /** - * Required. Code to identify the scopes to be included in the OAuth 2.0 access token. - * See https://developers.google.com/identity/protocols/googlescopes for more - * information. - * At least one value required. - * - * Generated from protobuf field repeated string scope = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $scope; - /** - * The desired lifetime duration of the access token in seconds. - * Must be set to a value less than or equal to 3600 (1 hour). If a value is - * not specified, the token's lifetime will be set to a default value of one - * hour. - * - * Generated from protobuf field .google.protobuf.Duration lifetime = 7; - */ - protected $lifetime = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type array|\Google\Protobuf\Internal\RepeatedField $delegates - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type array|\Google\Protobuf\Internal\RepeatedField $scope - * Required. Code to identify the scopes to be included in the OAuth 2.0 access token. - * See https://developers.google.com/identity/protocols/googlescopes for more - * information. - * At least one value required. - * @type \Google\Protobuf\Duration $lifetime - * The desired lifetime duration of the access token in seconds. - * Must be set to a value less than or equal to 3600 (1 hour). If a value is - * not specified, the token's lifetime will be set to a default value of one - * hour. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated 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 service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDelegates() - { - return $this->delegates; - } - - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDelegates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->delegates = $arr; - - return $this; - } - - /** - * Required. Code to identify the scopes to be included in the OAuth 2.0 access token. - * See https://developers.google.com/identity/protocols/googlescopes for more - * information. - * At least one value required. - * - * Generated from protobuf field repeated string scope = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScope() - { - return $this->scope; - } - - /** - * Required. Code to identify the scopes to be included in the OAuth 2.0 access token. - * See https://developers.google.com/identity/protocols/googlescopes for more - * information. - * At least one value required. - * - * Generated from protobuf field repeated string scope = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScope($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->scope = $arr; - - return $this; - } - - /** - * The desired lifetime duration of the access token in seconds. - * Must be set to a value less than or equal to 3600 (1 hour). If a value is - * not specified, the token's lifetime will be set to a default value of one - * hour. - * - * Generated from protobuf field .google.protobuf.Duration lifetime = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getLifetime() - { - return $this->lifetime; - } - - public function hasLifetime() - { - return isset($this->lifetime); - } - - public function clearLifetime() - { - unset($this->lifetime); - } - - /** - * The desired lifetime duration of the access token in seconds. - * Must be set to a value less than or equal to 3600 (1 hour). If a value is - * not specified, the token's lifetime will be set to a default value of one - * hour. - * - * Generated from protobuf field .google.protobuf.Duration lifetime = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setLifetime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->lifetime = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenResponse.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenResponse.php deleted file mode 100644 index d9cc2fe9f2d5..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateAccessTokenResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.iam.credentials.v1.GenerateAccessTokenResponse - */ -class GenerateAccessTokenResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The OAuth 2.0 access token. - * - * Generated from protobuf field string access_token = 1; - */ - protected $access_token = ''; - /** - * Token expiration time. - * The expiration time is always set. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; - */ - 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 - * Token expiration time. - * The expiration time is always set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::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; - } - - /** - * Token expiration time. - * The expiration time is always set. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; - * @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); - } - - /** - * Token expiration time. - * The expiration time is always set. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3; - * @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/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenRequest.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenRequest.php deleted file mode 100644 index 8db3ebfde699..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenRequest.php +++ /dev/null @@ -1,219 +0,0 @@ -google.iam.credentials.v1.GenerateIdTokenRequest - */ -class GenerateIdTokenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 2; - */ - private $delegates; - /** - * Required. The audience for the token, such as the API or account that this token - * grants access to. - * - * Generated from protobuf field string audience = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $audience = ''; - /** - * Include the service account email in the token. If set to `true`, the - * token will contain `email` and `email_verified` claims. - * - * Generated from protobuf field bool include_email = 4; - */ - protected $include_email = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type array|\Google\Protobuf\Internal\RepeatedField $delegates - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type string $audience - * Required. The audience for the token, such as the API or account that this token - * grants access to. - * @type bool $include_email - * Include the service account email in the token. If set to `true`, the - * token will contain `email` and `email_verified` claims. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated 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 service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDelegates() - { - return $this->delegates; - } - - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDelegates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->delegates = $arr; - - return $this; - } - - /** - * Required. The audience for the token, such as the API or account that this token - * grants access to. - * - * Generated from protobuf field string audience = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAudience() - { - return $this->audience; - } - - /** - * Required. The audience for the token, such as the API or account that this token - * grants access to. - * - * Generated from protobuf field string audience = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAudience($var) - { - GPBUtil::checkString($var, True); - $this->audience = $var; - - return $this; - } - - /** - * Include the service account email in the token. If set to `true`, the - * token will contain `email` and `email_verified` claims. - * - * Generated from protobuf field bool include_email = 4; - * @return bool - */ - public function getIncludeEmail() - { - return $this->include_email; - } - - /** - * Include the service account email in the token. If set to `true`, the - * token will contain `email` and `email_verified` claims. - * - * Generated from protobuf field bool include_email = 4; - * @param bool $var - * @return $this - */ - public function setIncludeEmail($var) - { - GPBUtil::checkBool($var); - $this->include_email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenResponse.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenResponse.php deleted file mode 100644 index 17171c522436..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/GenerateIdTokenResponse.php +++ /dev/null @@ -1,65 +0,0 @@ -google.iam.credentials.v1.GenerateIdTokenResponse - */ -class GenerateIdTokenResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The OpenId Connect ID token. - * - * Generated from protobuf field string token = 1; - */ - protected $token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $token - * The OpenId Connect ID token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The OpenId Connect ID token. - * - * Generated from protobuf field string token = 1; - * @return string - */ - public function getToken() - { - return $this->token; - } - - /** - * The OpenId Connect ID token. - * - * Generated from protobuf field string token = 1; - * @param string $var - * @return $this - */ - public function setToken($var) - { - GPBUtil::checkString($var, True); - $this->token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/IAMCredentialsGrpcClient.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/IAMCredentialsGrpcClient.php deleted file mode 100644 index 8695ed8b6e29..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/IAMCredentialsGrpcClient.php +++ /dev/null @@ -1,103 +0,0 @@ -_simpleRequest('/google.iam.credentials.v1.IAMCredentials/GenerateAccessToken', - $argument, - ['\Google\Cloud\Iam\Credentials\V1\GenerateAccessTokenResponse', 'decode'], - $metadata, $options); - } - - /** - * Generates an OpenID Connect ID token for a service account. - * @param \Google\Cloud\Iam\Credentials\V1\GenerateIdTokenRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GenerateIdToken(\Google\Cloud\Iam\Credentials\V1\GenerateIdTokenRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.iam.credentials.v1.IAMCredentials/GenerateIdToken', - $argument, - ['\Google\Cloud\Iam\Credentials\V1\GenerateIdTokenResponse', 'decode'], - $metadata, $options); - } - - /** - * Signs a blob using a service account's system-managed private key. - * @param \Google\Cloud\Iam\Credentials\V1\SignBlobRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SignBlob(\Google\Cloud\Iam\Credentials\V1\SignBlobRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.iam.credentials.v1.IAMCredentials/SignBlob', - $argument, - ['\Google\Cloud\Iam\Credentials\V1\SignBlobResponse', 'decode'], - $metadata, $options); - } - - /** - * Signs a JWT using a service account's system-managed private key. - * @param \Google\Cloud\Iam\Credentials\V1\SignJwtRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SignJwt(\Google\Cloud\Iam\Credentials\V1\SignJwtRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.iam.credentials.v1.IAMCredentials/SignJwt', - $argument, - ['\Google\Cloud\Iam\Credentials\V1\SignJwtResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobRequest.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobRequest.php deleted file mode 100644 index 7142fadbba6b..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobRequest.php +++ /dev/null @@ -1,177 +0,0 @@ -google.iam.credentials.v1.SignBlobRequest - */ -class SignBlobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 3; - */ - private $delegates; - /** - * Required. The bytes to sign. - * - * Generated from protobuf field bytes payload = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $payload = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type array|\Google\Protobuf\Internal\RepeatedField $delegates - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type string $payload - * Required. The bytes to sign. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated 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 service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDelegates() - { - return $this->delegates; - } - - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDelegates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->delegates = $arr; - - return $this; - } - - /** - * Required. The bytes to sign. - * - * Generated from protobuf field bytes payload = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPayload() - { - return $this->payload; - } - - /** - * Required. The bytes to sign. - * - * Generated from protobuf field bytes payload = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkString($var, False); - $this->payload = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobResponse.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobResponse.php deleted file mode 100644 index b416997364ea..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignBlobResponse.php +++ /dev/null @@ -1,99 +0,0 @@ -google.iam.credentials.v1.SignBlobResponse - */ -class SignBlobResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the key used to sign the blob. - * - * Generated from protobuf field string key_id = 1; - */ - protected $key_id = ''; - /** - * The signed blob. - * - * Generated from protobuf field bytes signed_blob = 4; - */ - protected $signed_blob = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key_id - * The ID of the key used to sign the blob. - * @type string $signed_blob - * The signed blob. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the key used to sign the blob. - * - * Generated from protobuf field string key_id = 1; - * @return string - */ - public function getKeyId() - { - return $this->key_id; - } - - /** - * The ID of the key used to sign the blob. - * - * Generated from protobuf field string key_id = 1; - * @param string $var - * @return $this - */ - public function setKeyId($var) - { - GPBUtil::checkString($var, True); - $this->key_id = $var; - - return $this; - } - - /** - * The signed blob. - * - * Generated from protobuf field bytes signed_blob = 4; - * @return string - */ - public function getSignedBlob() - { - return $this->signed_blob; - } - - /** - * The signed blob. - * - * Generated from protobuf field bytes signed_blob = 4; - * @param string $var - * @return $this - */ - public function setSignedBlob($var) - { - GPBUtil::checkString($var, False); - $this->signed_blob = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtRequest.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtRequest.php deleted file mode 100644 index c73f5ec68326..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtRequest.php +++ /dev/null @@ -1,177 +0,0 @@ -google.iam.credentials.v1.SignJwtRequest - */ -class SignJwtRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 3; - */ - private $delegates; - /** - * Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * - * Generated from protobuf field string payload = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $payload = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type array|\Google\Protobuf\Internal\RepeatedField $delegates - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type string $payload - * Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated 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 service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDelegates() - { - return $this->delegates; - } - - /** - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * - * Generated from protobuf field repeated string delegates = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDelegates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->delegates = $arr; - - return $this; - } - - /** - * Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * - * Generated from protobuf field string payload = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPayload() - { - return $this->payload; - } - - /** - * Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * - * Generated from protobuf field string payload = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkString($var, True); - $this->payload = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtResponse.php b/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtResponse.php deleted file mode 100644 index 637ea731569e..000000000000 --- a/owl-bot-staging/IamCredentials/v1/proto/src/Google/Cloud/Iam/Credentials/V1/SignJwtResponse.php +++ /dev/null @@ -1,99 +0,0 @@ -google.iam.credentials.v1.SignJwtResponse - */ -class SignJwtResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the key used to sign the JWT. - * - * Generated from protobuf field string key_id = 1; - */ - protected $key_id = ''; - /** - * The signed JWT. - * - * Generated from protobuf field string signed_jwt = 2; - */ - protected $signed_jwt = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key_id - * The ID of the key used to sign the JWT. - * @type string $signed_jwt - * The signed JWT. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Iam\Credentials\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the key used to sign the JWT. - * - * Generated from protobuf field string key_id = 1; - * @return string - */ - public function getKeyId() - { - return $this->key_id; - } - - /** - * The ID of the key used to sign the JWT. - * - * Generated from protobuf field string key_id = 1; - * @param string $var - * @return $this - */ - public function setKeyId($var) - { - GPBUtil::checkString($var, True); - $this->key_id = $var; - - return $this; - } - - /** - * The signed JWT. - * - * Generated from protobuf field string signed_jwt = 2; - * @return string - */ - public function getSignedJwt() - { - return $this->signed_jwt; - } - - /** - * The signed JWT. - * - * Generated from protobuf field string signed_jwt = 2; - * @param string $var - * @return $this - */ - public function setSignedJwt($var) - { - GPBUtil::checkString($var, True); - $this->signed_jwt = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_access_token.php b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_access_token.php deleted file mode 100644 index 9743b203c12b..000000000000 --- a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_access_token.php +++ /dev/null @@ -1,77 +0,0 @@ -generateAccessToken($formattedName, $scope); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = IAMCredentialsClient::serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $scopeElement = '[SCOPE]'; - - generate_access_token_sample($formattedName, $scopeElement); -} -// [END iamcredentials_v1_generated_IAMCredentials_GenerateAccessToken_sync] diff --git a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_id_token.php b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_id_token.php deleted file mode 100644 index b5aba25f3234..000000000000 --- a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/generate_id_token.php +++ /dev/null @@ -1,72 +0,0 @@ -generateIdToken($formattedName, $audience); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = IAMCredentialsClient::serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $audience = '[AUDIENCE]'; - - generate_id_token_sample($formattedName, $audience); -} -// [END iamcredentials_v1_generated_IAMCredentials_GenerateIdToken_sync] diff --git a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_blob.php b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_blob.php deleted file mode 100644 index 18067323e76e..000000000000 --- a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_blob.php +++ /dev/null @@ -1,71 +0,0 @@ -signBlob($formattedName, $payload); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = IAMCredentialsClient::serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $payload = '...'; - - sign_blob_sample($formattedName, $payload); -} -// [END iamcredentials_v1_generated_IAMCredentials_SignBlob_sync] diff --git a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_jwt.php b/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_jwt.php deleted file mode 100644 index b60434c64e8d..000000000000 --- a/owl-bot-staging/IamCredentials/v1/samples/V1/IAMCredentialsClient/sign_jwt.php +++ /dev/null @@ -1,71 +0,0 @@ -signJwt($formattedName, $payload); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = IAMCredentialsClient::serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $payload = '[PAYLOAD]'; - - sign_jwt_sample($formattedName, $payload); -} -// [END iamcredentials_v1_generated_IAMCredentials_SignJwt_sync] diff --git a/owl-bot-staging/IamCredentials/v1/src/V1/Gapic/IAMCredentialsGapicClient.php b/owl-bot-staging/IamCredentials/v1/src/V1/Gapic/IAMCredentialsGapicClient.php deleted file mode 100644 index 624b018587c1..000000000000 --- a/owl-bot-staging/IamCredentials/v1/src/V1/Gapic/IAMCredentialsGapicClient.php +++ /dev/null @@ -1,517 +0,0 @@ -serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - * $scope = []; - * $response = $iAMCredentialsClient->generateAccessToken($formattedName, $scope); - * } finally { - * $iAMCredentialsClient->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. - */ -class IAMCredentialsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.iam.credentials.v1.IAMCredentials'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'iamcredentials.googleapis.com'; - - /** 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 $serviceAccountNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/iam_credentials_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/iam_credentials_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/iam_credentials_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/iam_credentials_rest_client_config.php', - ], - ], - ]; - } - - private static function getServiceAccountNameTemplate() - { - if (self::$serviceAccountNameTemplate == null) { - self::$serviceAccountNameTemplate = new PathTemplate('projects/{project}/serviceAccounts/{service_account}'); - } - - return self::$serviceAccountNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'serviceAccount' => self::getServiceAccountNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * service_account resource. - * - * @param string $project - * @param string $serviceAccount - * - * @return string The formatted service_account resource. - */ - public static function serviceAccountName($project, $serviceAccount) - { - return self::getServiceAccountNameTemplate()->render([ - 'project' => $project, - 'service_account' => $serviceAccount, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - serviceAccount: projects/{project}/serviceAccounts/{service_account} - * - * 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 'iamcredentials.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); - } - - /** - * Generates an OAuth 2.0 access token for a service account. - * - * Sample code: - * ``` - * $iAMCredentialsClient = new IAMCredentialsClient(); - * try { - * $formattedName = $iAMCredentialsClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - * $scope = []; - * $response = $iAMCredentialsClient->generateAccessToken($formattedName, $scope); - * } finally { - * $iAMCredentialsClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @param string[] $scope Required. Code to identify the scopes to be included in the OAuth 2.0 access token. - * See https://developers.google.com/identity/protocols/googlescopes for more - * information. - * At least one value required. - * @param array $optionalArgs { - * Optional. - * - * @type string[] $delegates - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type Duration $lifetime - * The desired lifetime duration of the access token in seconds. - * Must be set to a value less than or equal to 3600 (1 hour). If a value is - * not specified, the token's lifetime will be set to a default value of one - * hour. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\Credentials\V1\GenerateAccessTokenResponse - * - * @throws ApiException if the remote call fails - */ - public function generateAccessToken($name, $scope, array $optionalArgs = []) - { - $request = new GenerateAccessTokenRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setScope($scope); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['delegates'])) { - $request->setDelegates($optionalArgs['delegates']); - } - - if (isset($optionalArgs['lifetime'])) { - $request->setLifetime($optionalArgs['lifetime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateAccessToken', GenerateAccessTokenResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Generates an OpenID Connect ID token for a service account. - * - * Sample code: - * ``` - * $iAMCredentialsClient = new IAMCredentialsClient(); - * try { - * $formattedName = $iAMCredentialsClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - * $audience = 'audience'; - * $response = $iAMCredentialsClient->generateIdToken($formattedName, $audience); - * } finally { - * $iAMCredentialsClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @param string $audience Required. The audience for the token, such as the API or account that this token - * grants access to. - * @param array $optionalArgs { - * Optional. - * - * @type string[] $delegates - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type bool $includeEmail - * Include the service account email in the token. If set to `true`, the - * token will contain `email` and `email_verified` claims. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\Credentials\V1\GenerateIdTokenResponse - * - * @throws ApiException if the remote call fails - */ - public function generateIdToken($name, $audience, array $optionalArgs = []) - { - $request = new GenerateIdTokenRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setAudience($audience); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['delegates'])) { - $request->setDelegates($optionalArgs['delegates']); - } - - if (isset($optionalArgs['includeEmail'])) { - $request->setIncludeEmail($optionalArgs['includeEmail']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateIdToken', GenerateIdTokenResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Signs a blob using a service account's system-managed private key. - * - * Sample code: - * ``` - * $iAMCredentialsClient = new IAMCredentialsClient(); - * try { - * $formattedName = $iAMCredentialsClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - * $payload = '...'; - * $response = $iAMCredentialsClient->signBlob($formattedName, $payload); - * } finally { - * $iAMCredentialsClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @param string $payload Required. The bytes to sign. - * @param array $optionalArgs { - * Optional. - * - * @type string[] $delegates - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\Credentials\V1\SignBlobResponse - * - * @throws ApiException if the remote call fails - */ - public function signBlob($name, $payload, array $optionalArgs = []) - { - $request = new SignBlobRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setPayload($payload); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['delegates'])) { - $request->setDelegates($optionalArgs['delegates']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SignBlob', SignBlobResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Signs a JWT using a service account's system-managed private key. - * - * Sample code: - * ``` - * $iAMCredentialsClient = new IAMCredentialsClient(); - * try { - * $formattedName = $iAMCredentialsClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - * $payload = 'payload'; - * $response = $iAMCredentialsClient->signJwt($formattedName, $payload); - * } finally { - * $iAMCredentialsClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the service account for which the credentials - * are requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @param string $payload Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - * @param array $optionalArgs { - * Optional. - * - * @type string[] $delegates - * The sequence of service accounts in a delegation chain. Each service - * account must be granted the `roles/iam.serviceAccountTokenCreator` role - * on its next service account in the chain. The last service account in the - * chain must be granted the `roles/iam.serviceAccountTokenCreator` role - * on the service account that is specified in the `name` field of the - * request. - * - * The delegates must have the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - * character is required; replacing it with a project ID is invalid. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\Credentials\V1\SignJwtResponse - * - * @throws ApiException if the remote call fails - */ - public function signJwt($name, $payload, array $optionalArgs = []) - { - $request = new SignJwtRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setPayload($payload); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['delegates'])) { - $request->setDelegates($optionalArgs['delegates']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SignJwt', SignJwtResponse::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/IamCredentials/v1/src/V1/IAMCredentialsClient.php b/owl-bot-staging/IamCredentials/v1/src/V1/IAMCredentialsClient.php deleted file mode 100644 index 99a36ef5fa09..000000000000 --- a/owl-bot-staging/IamCredentials/v1/src/V1/IAMCredentialsClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.iam.credentials.v1.IAMCredentials' => [], - ], -]; diff --git a/owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_rest_client_config.php b/owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_rest_client_config.php deleted file mode 100644 index e4c5263da78c..000000000000 --- a/owl-bot-staging/IamCredentials/v1/src/V1/resources/iam_credentials_rest_client_config.php +++ /dev/null @@ -1,57 +0,0 @@ - [ - 'google.iam.credentials.v1.IAMCredentials' => [ - 'GenerateAccessToken' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/serviceAccounts/*}:generateAccessToken', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateIdToken' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/serviceAccounts/*}:generateIdToken', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SignBlob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/serviceAccounts/*}:signBlob', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SignJwt' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/serviceAccounts/*}:signJwt', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/IamCredentials/v1/tests/Unit/V1/IAMCredentialsClientTest.php b/owl-bot-staging/IamCredentials/v1/tests/Unit/V1/IAMCredentialsClientTest.php deleted file mode 100644 index b9961c90b8f6..000000000000 --- a/owl-bot-staging/IamCredentials/v1/tests/Unit/V1/IAMCredentialsClientTest.php +++ /dev/null @@ -1,324 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return IAMCredentialsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new IAMCredentialsClient($options); - } - - /** @test */ - public function generateAccessTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expectedResponse = new GenerateAccessTokenResponse(); - $expectedResponse->setAccessToken($accessToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $scope = []; - $response = $gapicClient->generateAccessToken($formattedName, $scope); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.credentials.v1.IAMCredentials/GenerateAccessToken', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAccessTokenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $scope = []; - try { - $gapicClient->generateAccessToken($formattedName, $scope); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateIdTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $token = 'token110541305'; - $expectedResponse = new GenerateIdTokenResponse(); - $expectedResponse->setToken($token); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $audience = 'audience975628804'; - $response = $gapicClient->generateIdToken($formattedName, $audience); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.credentials.v1.IAMCredentials/GenerateIdToken', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getAudience(); - $this->assertProtobufEquals($audience, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateIdTokenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $audience = 'audience975628804'; - try { - $gapicClient->generateIdToken($formattedName, $audience); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function signBlobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $keyId = 'keyId-1134673157'; - $signedBlob = '-32'; - $expectedResponse = new SignBlobResponse(); - $expectedResponse->setKeyId($keyId); - $expectedResponse->setSignedBlob($signedBlob); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $payload = '-114'; - $response = $gapicClient->signBlob($formattedName, $payload); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.credentials.v1.IAMCredentials/SignBlob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getPayload(); - $this->assertProtobufEquals($payload, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function signBlobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $payload = '-114'; - try { - $gapicClient->signBlob($formattedName, $payload); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function signJwtTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $keyId = 'keyId-1134673157'; - $signedJwt = 'signedJwt-979546844'; - $expectedResponse = new SignJwtResponse(); - $expectedResponse->setKeyId($keyId); - $expectedResponse->setSignedJwt($signedJwt); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $payload = 'payload-786701938'; - $response = $gapicClient->signJwt($formattedName, $payload); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.credentials.v1.IAMCredentials/SignJwt', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getPayload(); - $this->assertProtobufEquals($payload, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function signJwtExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceAccountName('[PROJECT]', '[SERVICE_ACCOUNT]'); - $payload = 'payload-786701938'; - try { - $gapicClient->signJwt($formattedName, $payload); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->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/Iap/v1/proto/src/GPBMetadata/Google/Cloud/Iap/V1/Service.php b/owl-bot-staging/Iap/v1/proto/src/GPBMetadata/Google/Cloud/Iap/V1/Service.php deleted file mode 100644 index dd62f0cf6feae58f76d1e2c581e2f4a5acd23b71..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9409 zcmb_iOKcoj6`i&xPJG*O?3bTodrZ0FnK;d)d(wk4lS;y*+}(CMi9h%=A;?lu?tZq5 zbXV0>RVOi#g+PF24PwJ`76>6WNGw<)frJ=|1+dF%7A!_1R%{TgxbIWdzp75#gE#K( zckg}Y{_lHLw?AZKmffDRf#r2%PsW>%dr?I^rBp0$&LXStG`tGcls(7UtI=Gg<}|7~%XD*3ujhQ~J+&${%cTL>W}W)3S)t0( z+QKpo%&Hlf+e@5ryTBN?%ci^i;q_Ypm73}M%7zdCFF?URx3N>RDvBSN0sfn_e8aM> zz%pyrcMjt8-LMeX2dJc|~sRTt>K`P6c}qp_}286JIu zESq%<0E~nBnuE?h=zl-Sc~rK@*~JEC09v&F9V1rsQmO6+M*thKa^o(W{*z;D`^Yn0 zmwE{yz@z%w*DV>tdbJvb>>{S}d=z9XGjErlFxK4 z%zqYOBI75&(z3A2qR7~hVI&DIwGenRR^-x*T(ZnMD<$~PaCtwp_L|5N@{+1;p%7lz<>42Fw4v-kfA00EY{qdknzx|@X#dVFzlLp)bO$5 zO$;FS2|@t)Pl5A<+7p9JqIv++@c?`mD+VQZfdm|!QAI$;9*2i$2ItfHISHZ7#n}#B z$VE6~)8~QFvNeMA+Bf_u+Nc$)xure&_?g`c0TF(i%;)&G9Aw49&jfVn0nX zd#veL{2j@3IY>A7E(S{nY5K`9V#0jLMnz5iV+zi61OhqNX1^hH$!9u?;}aFD>iH;i z5R(EuHN<|~{itgD=$i01&HqAo`!P1Tk8r+2D}kSTAwM0mxx^5@&(&m3;d1!#FvrqC zBx~+PGc^v?44lV!D4XsE4Fb#Fi*k9qO&1nk>c=UV5Uz-!zXc-vZhTCw)tW>D)H!+>yQE@pIlg?>FE09Gvhb;*EG%rt0 z5kp+We7uMzLnuf6%K(gah<+bV?^UcWQ_aT8TtdoF7(vd8d!jd;$=6`C=ImLvsNoIIlIc7hZWN{SM&M!0 ze`wYkR9%FTHj~`|!hsw6LEsvW%V$y<*4>3+0cT|)M~Bnx_In3Fz}d%%r7tLd#h~dh zBQ}>h4fdTXM=+Ytgu1jPRy$J`Pa?=cGH|kPJ~yzv%H1!8%#k6&5s?%iEd~xFIB+TN z9HaScNZ)HSF`jNBm%0o?a_b8~mP?!WR*S~g%Enr$P+lyTies;lVL0({b*a2EmLg+t zYE9qRc(l4+92=M%IF%x!02`&k)_Tc!PNMzIW>0Yagdlc0j9)GBcKMx2IA-_f3Ne5y&jJxWL;}=hIrJw zkZx7^I;6b{AM6aXA!7O!;MAWCz(k_Dx8XvJ30dk3C-m0)E==#qdjccCkr89T-*+6= z4~=H|=#lhf8Rk4%r&UYXOK2u#;>k-!j+n&K`5uyZ^et>(fj5nQ1gf75z_i}O@Ho!` zeeU8B#77+58p9&O4IoYrkty0y8swP_UAOU2U4W?6r@(UI8zL-$I0v9ykfeG&%mKf+U4QZpP>OxDx&cir6H7t0hU5y4DO#8OO3LkOs{Lo4%PZb#$+TpxtKX#Ic{MS|w zxp-8Nh*JXp8cx=6n~^M>;9_M}?jcpo?sISkXSFuD-E)t+19MD;GWSDppg+SC8D`}3 z193yrQ~!RCVK|h(`HD@X={8{6l1L1bL1A^}`GFx$)1qUi^YO(kNrmJy8p9>5pTyhK zA&+3H2UzK*qhS@Edk<7LWhb~K#1!Mq4sLfEnd;<;Bii1|Gmhs+RB8%mafTWckkd-;csfw`jduw`_S0O9B|dRu$dN zk!UW)+ZntF%C;^_YfqjJi=?CxGm3ik2Y>&^PX{imGwgEbMR@mfCzCnUm?NX>zf^|p z$`4=iMzCww*2UxRy4SJm&r?7)@i@q!P_J(B&ft^iOe59lCJ7;2?NB_9Ql!6{5ky8e;e=16Yj-{MFRKr}gK<6voR=WFt(6r5uvxZ@7OC+~#bX=_e#q#@M! zaW0-i`t?4?ev91X*hL?`gOy!eOJw4&BQmYm5HEGve#yU6a9$Mc4qZq*uvpqqm%c9f z)E}le{uTB3__gi}yO;VkVTrfJO-#!jWcM$4UM0W9OvE_uR6G8-)lGObo$s}|j7Qij z9oBknlsSB<^Gg=;YjjxbZC`@JVrfJ07s7BwF#Oq6mOpS%CESeg(3gSxAA~E?wA0Y> z@fAxO!tF1MlgSXrcv!^`)-=~;HE z;cL0vvuDpb7IW;XM?CGkhMhFnb-a51mm_g4RNiy&N1^0LDF9Y8_{iXsw?e;ml_5b8 z8g%>0D+y)Id5Z_ILPTTjsyTNURm_7&OJ6SvpI zOpm?&6lSbI5Fa$*azDGb>)x3SLh)SYko+?RGeWWMfk({$M2od|Z>A7pd=E_8N;SC6 z9;;eHmxyrZtc20n*LqFlf{M&656tp`V_*b%+hu1iwvCA*Nt<>x85+{ZzNd=RTsADqY3?Hk-r57b2-p~uoq z!x5hb;vmK**xz9a_C9hYq+oBRP{E{rDZP{t5qB(2{$Jf<;a@4Zh|hTAe7TnT)(!C_ z7*}hiy_dy9VGeJ~c>B*a9}>5{Z*vQK*sli8F7X#?vIX`+4SR@`{qXvy;ji2BJsbX_ z4Zdjc#lQtYu4$ZJ(~v>aa6y06&jaav)Sdf&$hI@Ym3a3`^a8@$;+>e5S7;JnpW&3^ KHJ3v;1o$6@vxA2K diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessDeniedPageSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessDeniedPageSettings.php deleted file mode 100644 index 867e592fa1cd..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessDeniedPageSettings.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.iap.v1.AccessDeniedPageSettings - */ -class AccessDeniedPageSettings extends \Google\Protobuf\Internal\Message -{ - /** - * The URI to be redirected to when access is denied. - * - * Generated from protobuf field .google.protobuf.StringValue access_denied_page_uri = 1; - */ - protected $access_denied_page_uri = null; - /** - * Whether to generate a troubleshooting URL on access denied events to this - * application. - * - * Generated from protobuf field .google.protobuf.BoolValue generate_troubleshooting_uri = 2; - */ - protected $generate_troubleshooting_uri = null; - /** - * Whether to generate remediation token on access denied events to this - * application. - * - * Generated from protobuf field optional .google.protobuf.BoolValue remediation_token_generation_enabled = 3; - */ - protected $remediation_token_generation_enabled = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\StringValue $access_denied_page_uri - * The URI to be redirected to when access is denied. - * @type \Google\Protobuf\BoolValue $generate_troubleshooting_uri - * Whether to generate a troubleshooting URL on access denied events to this - * application. - * @type \Google\Protobuf\BoolValue $remediation_token_generation_enabled - * Whether to generate remediation token on access denied events to this - * application. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The URI to be redirected to when access is denied. - * - * Generated from protobuf field .google.protobuf.StringValue access_denied_page_uri = 1; - * @return \Google\Protobuf\StringValue|null - */ - public function getAccessDeniedPageUri() - { - return $this->access_denied_page_uri; - } - - public function hasAccessDeniedPageUri() - { - return isset($this->access_denied_page_uri); - } - - public function clearAccessDeniedPageUri() - { - unset($this->access_denied_page_uri); - } - - /** - * Returns the unboxed value from getAccessDeniedPageUri() - - * The URI to be redirected to when access is denied. - * - * Generated from protobuf field .google.protobuf.StringValue access_denied_page_uri = 1; - * @return string|null - */ - public function getAccessDeniedPageUriUnwrapped() - { - return $this->readWrapperValue("access_denied_page_uri"); - } - - /** - * The URI to be redirected to when access is denied. - * - * Generated from protobuf field .google.protobuf.StringValue access_denied_page_uri = 1; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setAccessDeniedPageUri($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->access_denied_page_uri = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * The URI to be redirected to when access is denied. - * - * Generated from protobuf field .google.protobuf.StringValue access_denied_page_uri = 1; - * @param string|null $var - * @return $this - */ - public function setAccessDeniedPageUriUnwrapped($var) - { - $this->writeWrapperValue("access_denied_page_uri", $var); - return $this;} - - /** - * Whether to generate a troubleshooting URL on access denied events to this - * application. - * - * Generated from protobuf field .google.protobuf.BoolValue generate_troubleshooting_uri = 2; - * @return \Google\Protobuf\BoolValue|null - */ - public function getGenerateTroubleshootingUri() - { - return $this->generate_troubleshooting_uri; - } - - public function hasGenerateTroubleshootingUri() - { - return isset($this->generate_troubleshooting_uri); - } - - public function clearGenerateTroubleshootingUri() - { - unset($this->generate_troubleshooting_uri); - } - - /** - * Returns the unboxed value from getGenerateTroubleshootingUri() - - * Whether to generate a troubleshooting URL on access denied events to this - * application. - * - * Generated from protobuf field .google.protobuf.BoolValue generate_troubleshooting_uri = 2; - * @return bool|null - */ - public function getGenerateTroubleshootingUriUnwrapped() - { - return $this->readWrapperValue("generate_troubleshooting_uri"); - } - - /** - * Whether to generate a troubleshooting URL on access denied events to this - * application. - * - * Generated from protobuf field .google.protobuf.BoolValue generate_troubleshooting_uri = 2; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setGenerateTroubleshootingUri($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->generate_troubleshooting_uri = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether to generate a troubleshooting URL on access denied events to this - * application. - * - * Generated from protobuf field .google.protobuf.BoolValue generate_troubleshooting_uri = 2; - * @param bool|null $var - * @return $this - */ - public function setGenerateTroubleshootingUriUnwrapped($var) - { - $this->writeWrapperValue("generate_troubleshooting_uri", $var); - return $this;} - - /** - * Whether to generate remediation token on access denied events to this - * application. - * - * Generated from protobuf field optional .google.protobuf.BoolValue remediation_token_generation_enabled = 3; - * @return \Google\Protobuf\BoolValue|null - */ - public function getRemediationTokenGenerationEnabled() - { - return $this->remediation_token_generation_enabled; - } - - public function hasRemediationTokenGenerationEnabled() - { - return isset($this->remediation_token_generation_enabled); - } - - public function clearRemediationTokenGenerationEnabled() - { - unset($this->remediation_token_generation_enabled); - } - - /** - * Returns the unboxed value from getRemediationTokenGenerationEnabled() - - * Whether to generate remediation token on access denied events to this - * application. - * - * Generated from protobuf field optional .google.protobuf.BoolValue remediation_token_generation_enabled = 3; - * @return bool|null - */ - public function getRemediationTokenGenerationEnabledUnwrapped() - { - return $this->readWrapperValue("remediation_token_generation_enabled"); - } - - /** - * Whether to generate remediation token on access denied events to this - * application. - * - * Generated from protobuf field optional .google.protobuf.BoolValue remediation_token_generation_enabled = 3; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setRemediationTokenGenerationEnabled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->remediation_token_generation_enabled = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether to generate remediation token on access denied events to this - * application. - * - * Generated from protobuf field optional .google.protobuf.BoolValue remediation_token_generation_enabled = 3; - * @param bool|null $var - * @return $this - */ - public function setRemediationTokenGenerationEnabledUnwrapped($var) - { - $this->writeWrapperValue("remediation_token_generation_enabled", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessSettings.php deleted file mode 100644 index 36658c877255..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AccessSettings.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.iap.v1.AccessSettings - */ -class AccessSettings extends \Google\Protobuf\Internal\Message -{ - /** - * GCIP claims and endpoint configurations for 3p identity providers. - * - * Generated from protobuf field .google.cloud.iap.v1.GcipSettings gcip_settings = 1; - */ - protected $gcip_settings = null; - /** - * Configuration to allow cross-origin requests via IAP. - * - * Generated from protobuf field .google.cloud.iap.v1.CorsSettings cors_settings = 2; - */ - protected $cors_settings = null; - /** - * Settings to configure IAP's OAuth behavior. - * - * Generated from protobuf field .google.cloud.iap.v1.OAuthSettings oauth_settings = 3; - */ - protected $oauth_settings = null; - /** - * Settings to configure reauthentication policies in IAP. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings reauth_settings = 6; - */ - protected $reauth_settings = null; - /** - * Settings to configure and enable allowed domains. - * - * Generated from protobuf field .google.cloud.iap.v1.AllowedDomainsSettings allowed_domains_settings = 7; - */ - protected $allowed_domains_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iap\V1\GcipSettings $gcip_settings - * GCIP claims and endpoint configurations for 3p identity providers. - * @type \Google\Cloud\Iap\V1\CorsSettings $cors_settings - * Configuration to allow cross-origin requests via IAP. - * @type \Google\Cloud\Iap\V1\OAuthSettings $oauth_settings - * Settings to configure IAP's OAuth behavior. - * @type \Google\Cloud\Iap\V1\ReauthSettings $reauth_settings - * Settings to configure reauthentication policies in IAP. - * @type \Google\Cloud\Iap\V1\AllowedDomainsSettings $allowed_domains_settings - * Settings to configure and enable allowed domains. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * GCIP claims and endpoint configurations for 3p identity providers. - * - * Generated from protobuf field .google.cloud.iap.v1.GcipSettings gcip_settings = 1; - * @return \Google\Cloud\Iap\V1\GcipSettings|null - */ - public function getGcipSettings() - { - return $this->gcip_settings; - } - - public function hasGcipSettings() - { - return isset($this->gcip_settings); - } - - public function clearGcipSettings() - { - unset($this->gcip_settings); - } - - /** - * GCIP claims and endpoint configurations for 3p identity providers. - * - * Generated from protobuf field .google.cloud.iap.v1.GcipSettings gcip_settings = 1; - * @param \Google\Cloud\Iap\V1\GcipSettings $var - * @return $this - */ - public function setGcipSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\GcipSettings::class); - $this->gcip_settings = $var; - - return $this; - } - - /** - * Configuration to allow cross-origin requests via IAP. - * - * Generated from protobuf field .google.cloud.iap.v1.CorsSettings cors_settings = 2; - * @return \Google\Cloud\Iap\V1\CorsSettings|null - */ - public function getCorsSettings() - { - return $this->cors_settings; - } - - public function hasCorsSettings() - { - return isset($this->cors_settings); - } - - public function clearCorsSettings() - { - unset($this->cors_settings); - } - - /** - * Configuration to allow cross-origin requests via IAP. - * - * Generated from protobuf field .google.cloud.iap.v1.CorsSettings cors_settings = 2; - * @param \Google\Cloud\Iap\V1\CorsSettings $var - * @return $this - */ - public function setCorsSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\CorsSettings::class); - $this->cors_settings = $var; - - return $this; - } - - /** - * Settings to configure IAP's OAuth behavior. - * - * Generated from protobuf field .google.cloud.iap.v1.OAuthSettings oauth_settings = 3; - * @return \Google\Cloud\Iap\V1\OAuthSettings|null - */ - public function getOauthSettings() - { - return $this->oauth_settings; - } - - public function hasOauthSettings() - { - return isset($this->oauth_settings); - } - - public function clearOauthSettings() - { - unset($this->oauth_settings); - } - - /** - * Settings to configure IAP's OAuth behavior. - * - * Generated from protobuf field .google.cloud.iap.v1.OAuthSettings oauth_settings = 3; - * @param \Google\Cloud\Iap\V1\OAuthSettings $var - * @return $this - */ - public function setOauthSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\OAuthSettings::class); - $this->oauth_settings = $var; - - return $this; - } - - /** - * Settings to configure reauthentication policies in IAP. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings reauth_settings = 6; - * @return \Google\Cloud\Iap\V1\ReauthSettings|null - */ - public function getReauthSettings() - { - return $this->reauth_settings; - } - - public function hasReauthSettings() - { - return isset($this->reauth_settings); - } - - public function clearReauthSettings() - { - unset($this->reauth_settings); - } - - /** - * Settings to configure reauthentication policies in IAP. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings reauth_settings = 6; - * @param \Google\Cloud\Iap\V1\ReauthSettings $var - * @return $this - */ - public function setReauthSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\ReauthSettings::class); - $this->reauth_settings = $var; - - return $this; - } - - /** - * Settings to configure and enable allowed domains. - * - * Generated from protobuf field .google.cloud.iap.v1.AllowedDomainsSettings allowed_domains_settings = 7; - * @return \Google\Cloud\Iap\V1\AllowedDomainsSettings|null - */ - public function getAllowedDomainsSettings() - { - return $this->allowed_domains_settings; - } - - public function hasAllowedDomainsSettings() - { - return isset($this->allowed_domains_settings); - } - - public function clearAllowedDomainsSettings() - { - unset($this->allowed_domains_settings); - } - - /** - * Settings to configure and enable allowed domains. - * - * Generated from protobuf field .google.cloud.iap.v1.AllowedDomainsSettings allowed_domains_settings = 7; - * @param \Google\Cloud\Iap\V1\AllowedDomainsSettings $var - * @return $this - */ - public function setAllowedDomainsSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\AllowedDomainsSettings::class); - $this->allowed_domains_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AllowedDomainsSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AllowedDomainsSettings.php deleted file mode 100644 index 982a8e503ad5..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AllowedDomainsSettings.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.iap.v1.AllowedDomainsSettings - */ -class AllowedDomainsSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Configuration for customers to opt in for the feature. - * - * Generated from protobuf field optional bool enable = 1; - */ - protected $enable = null; - /** - * List of trusted domains. - * - * Generated from protobuf field repeated string domains = 2; - */ - private $domains; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable - * Configuration for customers to opt in for the feature. - * @type array|\Google\Protobuf\Internal\RepeatedField $domains - * List of trusted domains. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Configuration for customers to opt in for the feature. - * - * Generated from protobuf field optional bool enable = 1; - * @return bool - */ - public function getEnable() - { - return isset($this->enable) ? $this->enable : false; - } - - public function hasEnable() - { - return isset($this->enable); - } - - public function clearEnable() - { - unset($this->enable); - } - - /** - * Configuration for customers to opt in for the feature. - * - * Generated from protobuf field optional bool enable = 1; - * @param bool $var - * @return $this - */ - public function setEnable($var) - { - GPBUtil::checkBool($var); - $this->enable = $var; - - return $this; - } - - /** - * List of trusted domains. - * - * Generated from protobuf field repeated string domains = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDomains() - { - return $this->domains; - } - - /** - * List of trusted domains. - * - * Generated from protobuf field repeated string domains = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDomains($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->domains = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ApplicationSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ApplicationSettings.php deleted file mode 100644 index cc9b3ad24e6a..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ApplicationSettings.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.iap.v1.ApplicationSettings - */ -class ApplicationSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Settings to configure IAP's behavior for a service mesh. - * - * Generated from protobuf field .google.cloud.iap.v1.CsmSettings csm_settings = 1; - */ - protected $csm_settings = null; - /** - * Customization for Access Denied page. - * - * Generated from protobuf field .google.cloud.iap.v1.AccessDeniedPageSettings access_denied_page_settings = 2; - */ - protected $access_denied_page_settings = null; - /** - * The Domain value to set for cookies generated by IAP. This value is not - * validated by the API, but will be ignored at runtime if invalid. - * - * Generated from protobuf field .google.protobuf.StringValue cookie_domain = 3; - */ - protected $cookie_domain = null; - /** - * Settings to configure attribute propagation. - * - * Generated from protobuf field .google.cloud.iap.v1.AttributePropagationSettings attribute_propagation_settings = 4; - */ - protected $attribute_propagation_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iap\V1\CsmSettings $csm_settings - * Settings to configure IAP's behavior for a service mesh. - * @type \Google\Cloud\Iap\V1\AccessDeniedPageSettings $access_denied_page_settings - * Customization for Access Denied page. - * @type \Google\Protobuf\StringValue $cookie_domain - * The Domain value to set for cookies generated by IAP. This value is not - * validated by the API, but will be ignored at runtime if invalid. - * @type \Google\Cloud\Iap\V1\AttributePropagationSettings $attribute_propagation_settings - * Settings to configure attribute propagation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Settings to configure IAP's behavior for a service mesh. - * - * Generated from protobuf field .google.cloud.iap.v1.CsmSettings csm_settings = 1; - * @return \Google\Cloud\Iap\V1\CsmSettings|null - */ - public function getCsmSettings() - { - return $this->csm_settings; - } - - public function hasCsmSettings() - { - return isset($this->csm_settings); - } - - public function clearCsmSettings() - { - unset($this->csm_settings); - } - - /** - * Settings to configure IAP's behavior for a service mesh. - * - * Generated from protobuf field .google.cloud.iap.v1.CsmSettings csm_settings = 1; - * @param \Google\Cloud\Iap\V1\CsmSettings $var - * @return $this - */ - public function setCsmSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\CsmSettings::class); - $this->csm_settings = $var; - - return $this; - } - - /** - * Customization for Access Denied page. - * - * Generated from protobuf field .google.cloud.iap.v1.AccessDeniedPageSettings access_denied_page_settings = 2; - * @return \Google\Cloud\Iap\V1\AccessDeniedPageSettings|null - */ - public function getAccessDeniedPageSettings() - { - return $this->access_denied_page_settings; - } - - public function hasAccessDeniedPageSettings() - { - return isset($this->access_denied_page_settings); - } - - public function clearAccessDeniedPageSettings() - { - unset($this->access_denied_page_settings); - } - - /** - * Customization for Access Denied page. - * - * Generated from protobuf field .google.cloud.iap.v1.AccessDeniedPageSettings access_denied_page_settings = 2; - * @param \Google\Cloud\Iap\V1\AccessDeniedPageSettings $var - * @return $this - */ - public function setAccessDeniedPageSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\AccessDeniedPageSettings::class); - $this->access_denied_page_settings = $var; - - return $this; - } - - /** - * The Domain value to set for cookies generated by IAP. This value is not - * validated by the API, but will be ignored at runtime if invalid. - * - * Generated from protobuf field .google.protobuf.StringValue cookie_domain = 3; - * @return \Google\Protobuf\StringValue|null - */ - public function getCookieDomain() - { - return $this->cookie_domain; - } - - public function hasCookieDomain() - { - return isset($this->cookie_domain); - } - - public function clearCookieDomain() - { - unset($this->cookie_domain); - } - - /** - * Returns the unboxed value from getCookieDomain() - - * The Domain value to set for cookies generated by IAP. This value is not - * validated by the API, but will be ignored at runtime if invalid. - * - * Generated from protobuf field .google.protobuf.StringValue cookie_domain = 3; - * @return string|null - */ - public function getCookieDomainUnwrapped() - { - return $this->readWrapperValue("cookie_domain"); - } - - /** - * The Domain value to set for cookies generated by IAP. This value is not - * validated by the API, but will be ignored at runtime if invalid. - * - * Generated from protobuf field .google.protobuf.StringValue cookie_domain = 3; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setCookieDomain($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->cookie_domain = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * The Domain value to set for cookies generated by IAP. This value is not - * validated by the API, but will be ignored at runtime if invalid. - * - * Generated from protobuf field .google.protobuf.StringValue cookie_domain = 3; - * @param string|null $var - * @return $this - */ - public function setCookieDomainUnwrapped($var) - { - $this->writeWrapperValue("cookie_domain", $var); - return $this;} - - /** - * Settings to configure attribute propagation. - * - * Generated from protobuf field .google.cloud.iap.v1.AttributePropagationSettings attribute_propagation_settings = 4; - * @return \Google\Cloud\Iap\V1\AttributePropagationSettings|null - */ - public function getAttributePropagationSettings() - { - return $this->attribute_propagation_settings; - } - - public function hasAttributePropagationSettings() - { - return isset($this->attribute_propagation_settings); - } - - public function clearAttributePropagationSettings() - { - unset($this->attribute_propagation_settings); - } - - /** - * Settings to configure attribute propagation. - * - * Generated from protobuf field .google.cloud.iap.v1.AttributePropagationSettings attribute_propagation_settings = 4; - * @param \Google\Cloud\Iap\V1\AttributePropagationSettings $var - * @return $this - */ - public function setAttributePropagationSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\AttributePropagationSettings::class); - $this->attribute_propagation_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings.php deleted file mode 100644 index 64f58a2417a6..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings.php +++ /dev/null @@ -1,252 +0,0 @@ -google.cloud.iap.v1.AttributePropagationSettings - */ -class AttributePropagationSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Raw string CEL expression. Must return a list of attributes. Maximum of 45 - * attributes can be selected. Expressions can select different attribute - * types from `attributes`: `attributes.saml_attributes`, - * `attributes.iap_attributes`. Limited functions are supported: - * - `filter: .filter(, )` -> returns a subset of - * `` where `` is true for every item. - * - `in: in ` -> returns true if `` contains `` - * - `selectByName: .selectByName()` -> returns the attribute - * in - * `` with the given `` name, otherwise returns empty. - * - `emitAs: .emitAs()` -> sets the `` name - * field to the given `` for propagation in selected output - * credentials. - * - `strict: .strict()` -> ignore the `x-goog-iap-attr-` prefix - * for the provided `` when propagating via the `HEADER` output - * credential, i.e. request headers. - * - `append: .append()` OR - * `.append()` -> append the provided `` or - * `` onto the end of ``. - * Example expression: `attributes.saml_attributes.filter(x, x.name in - * ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())` - * - * Generated from protobuf field optional string expression = 1; - */ - protected $expression = null; - /** - * Which output credentials attributes selected by the CEL expression should - * be propagated in. All attributes will be fully duplicated in each selected - * output credential. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials output_credentials = 2; - */ - private $output_credentials; - /** - * Whether the provided attribute propagation settings should be evaluated on - * user requests. If set to true, attributes returned from the expression will - * be propagated in the set output credentials. - * - * Generated from protobuf field optional bool enable = 3; - */ - protected $enable = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $expression - * Raw string CEL expression. Must return a list of attributes. Maximum of 45 - * attributes can be selected. Expressions can select different attribute - * types from `attributes`: `attributes.saml_attributes`, - * `attributes.iap_attributes`. Limited functions are supported: - * - `filter: .filter(, )` -> returns a subset of - * `` where `` is true for every item. - * - `in: in ` -> returns true if `` contains `` - * - `selectByName: .selectByName()` -> returns the attribute - * in - * `` with the given `` name, otherwise returns empty. - * - `emitAs: .emitAs()` -> sets the `` name - * field to the given `` for propagation in selected output - * credentials. - * - `strict: .strict()` -> ignore the `x-goog-iap-attr-` prefix - * for the provided `` when propagating via the `HEADER` output - * credential, i.e. request headers. - * - `append: .append()` OR - * `.append()` -> append the provided `` or - * `` onto the end of ``. - * Example expression: `attributes.saml_attributes.filter(x, x.name in - * ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())` - * @type array|\Google\Protobuf\Internal\RepeatedField $output_credentials - * Which output credentials attributes selected by the CEL expression should - * be propagated in. All attributes will be fully duplicated in each selected - * output credential. - * @type bool $enable - * Whether the provided attribute propagation settings should be evaluated on - * user requests. If set to true, attributes returned from the expression will - * be propagated in the set output credentials. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Raw string CEL expression. Must return a list of attributes. Maximum of 45 - * attributes can be selected. Expressions can select different attribute - * types from `attributes`: `attributes.saml_attributes`, - * `attributes.iap_attributes`. Limited functions are supported: - * - `filter: .filter(, )` -> returns a subset of - * `` where `` is true for every item. - * - `in: in ` -> returns true if `` contains `` - * - `selectByName: .selectByName()` -> returns the attribute - * in - * `` with the given `` name, otherwise returns empty. - * - `emitAs: .emitAs()` -> sets the `` name - * field to the given `` for propagation in selected output - * credentials. - * - `strict: .strict()` -> ignore the `x-goog-iap-attr-` prefix - * for the provided `` when propagating via the `HEADER` output - * credential, i.e. request headers. - * - `append: .append()` OR - * `.append()` -> append the provided `` or - * `` onto the end of ``. - * Example expression: `attributes.saml_attributes.filter(x, x.name in - * ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())` - * - * Generated from protobuf field optional string expression = 1; - * @return string - */ - public function getExpression() - { - return isset($this->expression) ? $this->expression : ''; - } - - public function hasExpression() - { - return isset($this->expression); - } - - public function clearExpression() - { - unset($this->expression); - } - - /** - * Raw string CEL expression. Must return a list of attributes. Maximum of 45 - * attributes can be selected. Expressions can select different attribute - * types from `attributes`: `attributes.saml_attributes`, - * `attributes.iap_attributes`. Limited functions are supported: - * - `filter: .filter(, )` -> returns a subset of - * `` where `` is true for every item. - * - `in: in ` -> returns true if `` contains `` - * - `selectByName: .selectByName()` -> returns the attribute - * in - * `` with the given `` name, otherwise returns empty. - * - `emitAs: .emitAs()` -> sets the `` name - * field to the given `` for propagation in selected output - * credentials. - * - `strict: .strict()` -> ignore the `x-goog-iap-attr-` prefix - * for the provided `` when propagating via the `HEADER` output - * credential, i.e. request headers. - * - `append: .append()` OR - * `.append()` -> append the provided `` or - * `` onto the end of ``. - * Example expression: `attributes.saml_attributes.filter(x, x.name in - * ['test']).append(attributes.iap_attributes.selectByName('exact').emitAs('custom').strict())` - * - * Generated from protobuf field optional string expression = 1; - * @param string $var - * @return $this - */ - public function setExpression($var) - { - GPBUtil::checkString($var, True); - $this->expression = $var; - - return $this; - } - - /** - * Which output credentials attributes selected by the CEL expression should - * be propagated in. All attributes will be fully duplicated in each selected - * output credential. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials output_credentials = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOutputCredentials() - { - return $this->output_credentials; - } - - /** - * Which output credentials attributes selected by the CEL expression should - * be propagated in. All attributes will be fully duplicated in each selected - * output credential. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials output_credentials = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOutputCredentials($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Iap\V1\AttributePropagationSettings\OutputCredentials::class); - $this->output_credentials = $arr; - - return $this; - } - - /** - * Whether the provided attribute propagation settings should be evaluated on - * user requests. If set to true, attributes returned from the expression will - * be propagated in the set output credentials. - * - * Generated from protobuf field optional bool enable = 3; - * @return bool - */ - public function getEnable() - { - return isset($this->enable) ? $this->enable : false; - } - - public function hasEnable() - { - return isset($this->enable); - } - - public function clearEnable() - { - unset($this->enable); - } - - /** - * Whether the provided attribute propagation settings should be evaluated on - * user requests. If set to true, attributes returned from the expression will - * be propagated in the set output credentials. - * - * Generated from protobuf field optional bool enable = 3; - * @param bool $var - * @return $this - */ - public function setEnable($var) - { - GPBUtil::checkBool($var); - $this->enable = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings/OutputCredentials.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings/OutputCredentials.php deleted file mode 100644 index 8cf9e0e51a76..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings/OutputCredentials.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.iap.v1.AttributePropagationSettings.OutputCredentials - */ -class OutputCredentials -{ - /** - * No output credential. This is an unsupported default. - * - * Generated from protobuf enum OUTPUT_CREDENTIALS_UNSPECIFIED = 0; - */ - const OUTPUT_CREDENTIALS_UNSPECIFIED = 0; - /** - * Propagate attributes in the headers with "x-goog-iap-attr-" prefix. - * - * Generated from protobuf enum HEADER = 1; - */ - const HEADER = 1; - /** - * Propagate attributes in the JWT of the form: `"additional_claims": { - * "my_attribute": ["value1", "value2"] }` - * - * Generated from protobuf enum JWT = 2; - */ - const JWT = 2; - /** - * Propagate attributes in the RCToken of the form: `"additional_claims": { - * "my_attribute": ["value1", "value2"] }` - * - * Generated from protobuf enum RCTOKEN = 3; - */ - const RCTOKEN = 3; - - private static $valueToName = [ - self::OUTPUT_CREDENTIALS_UNSPECIFIED => 'OUTPUT_CREDENTIALS_UNSPECIFIED', - self::HEADER => 'HEADER', - self::JWT => 'JWT', - self::RCTOKEN => 'RCTOKEN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OutputCredentials::class, \Google\Cloud\Iap\V1\AttributePropagationSettings_OutputCredentials::class); - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings_OutputCredentials.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings_OutputCredentials.php deleted file mode 100644 index 780bafa92bf8..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/AttributePropagationSettings_OutputCredentials.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.iap.v1.Brand - */ -class Brand extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier of the brand. - * NOTE: GCP project number achieves the same brand identification purpose as - * only one brand per project can be created. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Support email displayed on the OAuth consent screen. - * - * Generated from protobuf field string support_email = 2; - */ - protected $support_email = ''; - /** - * Application name displayed on OAuth consent screen. - * - * Generated from protobuf field string application_title = 3; - */ - protected $application_title = ''; - /** - * Output only. Whether the brand is only intended for usage inside the - * G Suite organization only. - * - * Generated from protobuf field bool org_internal_only = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $org_internal_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier of the brand. - * NOTE: GCP project number achieves the same brand identification purpose as - * only one brand per project can be created. - * @type string $support_email - * Support email displayed on the OAuth consent screen. - * @type string $application_title - * Application name displayed on OAuth consent screen. - * @type bool $org_internal_only - * Output only. Whether the brand is only intended for usage inside the - * G Suite organization only. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier of the brand. - * NOTE: GCP project number achieves the same brand identification purpose as - * only one brand per project can be created. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Identifier of the brand. - * NOTE: GCP project number achieves the same brand identification purpose as - * only one brand per project can be created. - * - * 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; - } - - /** - * Support email displayed on the OAuth consent screen. - * - * Generated from protobuf field string support_email = 2; - * @return string - */ - public function getSupportEmail() - { - return $this->support_email; - } - - /** - * Support email displayed on the OAuth consent screen. - * - * Generated from protobuf field string support_email = 2; - * @param string $var - * @return $this - */ - public function setSupportEmail($var) - { - GPBUtil::checkString($var, True); - $this->support_email = $var; - - return $this; - } - - /** - * Application name displayed on OAuth consent screen. - * - * Generated from protobuf field string application_title = 3; - * @return string - */ - public function getApplicationTitle() - { - return $this->application_title; - } - - /** - * Application name displayed on OAuth consent screen. - * - * Generated from protobuf field string application_title = 3; - * @param string $var - * @return $this - */ - public function setApplicationTitle($var) - { - GPBUtil::checkString($var, True); - $this->application_title = $var; - - return $this; - } - - /** - * Output only. Whether the brand is only intended for usage inside the - * G Suite organization only. - * - * Generated from protobuf field bool org_internal_only = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getOrgInternalOnly() - { - return $this->org_internal_only; - } - - /** - * Output only. Whether the brand is only intended for usage inside the - * G Suite organization only. - * - * Generated from protobuf field bool org_internal_only = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setOrgInternalOnly($var) - { - GPBUtil::checkBool($var); - $this->org_internal_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CorsSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CorsSettings.php deleted file mode 100644 index 945b88df8573..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CorsSettings.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.iap.v1.CorsSettings - */ -class CorsSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Configuration to allow HTTP OPTIONS calls to skip authorization. If - * undefined, IAP will not apply any special logic to OPTIONS requests. - * - * Generated from protobuf field .google.protobuf.BoolValue allow_http_options = 1; - */ - protected $allow_http_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\BoolValue $allow_http_options - * Configuration to allow HTTP OPTIONS calls to skip authorization. If - * undefined, IAP will not apply any special logic to OPTIONS requests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Configuration to allow HTTP OPTIONS calls to skip authorization. If - * undefined, IAP will not apply any special logic to OPTIONS requests. - * - * Generated from protobuf field .google.protobuf.BoolValue allow_http_options = 1; - * @return \Google\Protobuf\BoolValue|null - */ - public function getAllowHttpOptions() - { - return $this->allow_http_options; - } - - public function hasAllowHttpOptions() - { - return isset($this->allow_http_options); - } - - public function clearAllowHttpOptions() - { - unset($this->allow_http_options); - } - - /** - * Returns the unboxed value from getAllowHttpOptions() - - * Configuration to allow HTTP OPTIONS calls to skip authorization. If - * undefined, IAP will not apply any special logic to OPTIONS requests. - * - * Generated from protobuf field .google.protobuf.BoolValue allow_http_options = 1; - * @return bool|null - */ - public function getAllowHttpOptionsUnwrapped() - { - return $this->readWrapperValue("allow_http_options"); - } - - /** - * Configuration to allow HTTP OPTIONS calls to skip authorization. If - * undefined, IAP will not apply any special logic to OPTIONS requests. - * - * Generated from protobuf field .google.protobuf.BoolValue allow_http_options = 1; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setAllowHttpOptions($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->allow_http_options = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Configuration to allow HTTP OPTIONS calls to skip authorization. If - * undefined, IAP will not apply any special logic to OPTIONS requests. - * - * Generated from protobuf field .google.protobuf.BoolValue allow_http_options = 1; - * @param bool|null $var - * @return $this - */ - public function setAllowHttpOptionsUnwrapped($var) - { - $this->writeWrapperValue("allow_http_options", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateBrandRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateBrandRequest.php deleted file mode 100644 index acd649fe0e5c..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateBrandRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.iap.v1.CreateBrandRequest - */ -class CreateBrandRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. GCP Project number/id under which the brand is to be created. - * In the following format: projects/{project_number/id}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. The brand to be created. - * - * Generated from protobuf field .google.cloud.iap.v1.Brand brand = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $brand = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. GCP Project number/id under which the brand is to be created. - * In the following format: projects/{project_number/id}. - * @type \Google\Cloud\Iap\V1\Brand $brand - * Required. The brand to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. GCP Project number/id under which the brand is to be created. - * In the following format: projects/{project_number/id}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. GCP Project number/id under which the brand is to be created. - * In the following format: projects/{project_number/id}. - * - * 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. The brand to be created. - * - * Generated from protobuf field .google.cloud.iap.v1.Brand brand = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iap\V1\Brand|null - */ - public function getBrand() - { - return $this->brand; - } - - public function hasBrand() - { - return isset($this->brand); - } - - public function clearBrand() - { - unset($this->brand); - } - - /** - * Required. The brand to be created. - * - * Generated from protobuf field .google.cloud.iap.v1.Brand brand = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iap\V1\Brand $var - * @return $this - */ - public function setBrand($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\Brand::class); - $this->brand = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateIdentityAwareProxyClientRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateIdentityAwareProxyClientRequest.php deleted file mode 100644 index 0e938fed6c17..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateIdentityAwareProxyClientRequest.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.iap.v1.CreateIdentityAwareProxyClientRequest - */ -class CreateIdentityAwareProxyClientRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Path to create the client in. - * In the following format: - * projects/{project_number/id}/brands/{brand}. - * The project must belong to a G Suite account. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. Identity Aware Proxy Client to be created. - * - * Generated from protobuf field .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_client = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $identity_aware_proxy_client = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Path to create the client in. - * In the following format: - * projects/{project_number/id}/brands/{brand}. - * The project must belong to a G Suite account. - * @type \Google\Cloud\Iap\V1\IdentityAwareProxyClient $identity_aware_proxy_client - * Required. Identity Aware Proxy Client to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Path to create the client in. - * In the following format: - * projects/{project_number/id}/brands/{brand}. - * The project must belong to a G Suite account. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Path to create the client in. - * In the following format: - * projects/{project_number/id}/brands/{brand}. - * The project must belong to a G Suite account. - * - * 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. Identity Aware Proxy Client to be created. - * - * Generated from protobuf field .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_client = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iap\V1\IdentityAwareProxyClient|null - */ - public function getIdentityAwareProxyClient() - { - return $this->identity_aware_proxy_client; - } - - public function hasIdentityAwareProxyClient() - { - return isset($this->identity_aware_proxy_client); - } - - public function clearIdentityAwareProxyClient() - { - unset($this->identity_aware_proxy_client); - } - - /** - * Required. Identity Aware Proxy Client to be created. - * - * Generated from protobuf field .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_client = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iap\V1\IdentityAwareProxyClient $var - * @return $this - */ - public function setIdentityAwareProxyClient($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\IdentityAwareProxyClient::class); - $this->identity_aware_proxy_client = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateTunnelDestGroupRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateTunnelDestGroupRequest.php deleted file mode 100644 index 944fb56a724c..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CreateTunnelDestGroupRequest.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.iap.v1.CreateTunnelDestGroupRequest - */ -class CreateTunnelDestGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The TunnelDestGroup to create. - * - * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tunnel_dest_group = null; - /** - * Required. The ID to use for the TunnelDestGroup, which becomes the final - * component of the resource name. - * This value must be 4-63 characters, and valid characters - * are `[a-z]-`. - * - * Generated from protobuf field string tunnel_dest_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tunnel_dest_group_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. - * @type \Google\Cloud\Iap\V1\TunnelDestGroup $tunnel_dest_group - * Required. The TunnelDestGroup to create. - * @type string $tunnel_dest_group_id - * Required. The ID to use for the TunnelDestGroup, which becomes the final - * component of the resource name. - * This value must be 4-63 characters, and valid characters - * are `[a-z]-`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/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. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/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 TunnelDestGroup to create. - * - * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iap\V1\TunnelDestGroup|null - */ - public function getTunnelDestGroup() - { - return $this->tunnel_dest_group; - } - - public function hasTunnelDestGroup() - { - return isset($this->tunnel_dest_group); - } - - public function clearTunnelDestGroup() - { - unset($this->tunnel_dest_group); - } - - /** - * Required. The TunnelDestGroup to create. - * - * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iap\V1\TunnelDestGroup $var - * @return $this - */ - public function setTunnelDestGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\TunnelDestGroup::class); - $this->tunnel_dest_group = $var; - - return $this; - } - - /** - * Required. The ID to use for the TunnelDestGroup, which becomes the final - * component of the resource name. - * This value must be 4-63 characters, and valid characters - * are `[a-z]-`. - * - * Generated from protobuf field string tunnel_dest_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTunnelDestGroupId() - { - return $this->tunnel_dest_group_id; - } - - /** - * Required. The ID to use for the TunnelDestGroup, which becomes the final - * component of the resource name. - * This value must be 4-63 characters, and valid characters - * are `[a-z]-`. - * - * Generated from protobuf field string tunnel_dest_group_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTunnelDestGroupId($var) - { - GPBUtil::checkString($var, True); - $this->tunnel_dest_group_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CsmSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CsmSettings.php deleted file mode 100644 index c35125b3b5f0..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/CsmSettings.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.iap.v1.CsmSettings - */ -class CsmSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Audience claim set in the generated RCToken. This value is not validated by - * IAP. - * - * Generated from protobuf field .google.protobuf.StringValue rctoken_aud = 1; - */ - protected $rctoken_aud = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\StringValue $rctoken_aud - * Audience claim set in the generated RCToken. This value is not validated by - * IAP. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Audience claim set in the generated RCToken. This value is not validated by - * IAP. - * - * Generated from protobuf field .google.protobuf.StringValue rctoken_aud = 1; - * @return \Google\Protobuf\StringValue|null - */ - public function getRctokenAud() - { - return $this->rctoken_aud; - } - - public function hasRctokenAud() - { - return isset($this->rctoken_aud); - } - - public function clearRctokenAud() - { - unset($this->rctoken_aud); - } - - /** - * Returns the unboxed value from getRctokenAud() - - * Audience claim set in the generated RCToken. This value is not validated by - * IAP. - * - * Generated from protobuf field .google.protobuf.StringValue rctoken_aud = 1; - * @return string|null - */ - public function getRctokenAudUnwrapped() - { - return $this->readWrapperValue("rctoken_aud"); - } - - /** - * Audience claim set in the generated RCToken. This value is not validated by - * IAP. - * - * Generated from protobuf field .google.protobuf.StringValue rctoken_aud = 1; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setRctokenAud($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->rctoken_aud = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * Audience claim set in the generated RCToken. This value is not validated by - * IAP. - * - * Generated from protobuf field .google.protobuf.StringValue rctoken_aud = 1; - * @param string|null $var - * @return $this - */ - public function setRctokenAudUnwrapped($var) - { - $this->writeWrapperValue("rctoken_aud", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteIdentityAwareProxyClientRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteIdentityAwareProxyClientRequest.php deleted file mode 100644 index f17a3fe37e65..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteIdentityAwareProxyClientRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.iap.v1.DeleteIdentityAwareProxyClientRequest - */ -class DeleteIdentityAwareProxyClientRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the Identity Aware Proxy client to be deleted. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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. Name of the Identity Aware Proxy client to be deleted. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the Identity Aware Proxy client to be deleted. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the Identity Aware Proxy client to be deleted. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteTunnelDestGroupRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteTunnelDestGroupRequest.php deleted file mode 100644 index dacfe95791d8..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/DeleteTunnelDestGroupRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.iap.v1.DeleteTunnelDestGroupRequest - */ -class DeleteTunnelDestGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the TunnelDestGroup to delete. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * - * 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 TunnelDestGroup to delete. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the TunnelDestGroup to delete. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * - * Generated 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 TunnelDestGroup to delete. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Iap/v1/proto/src/Google/Cloud/Iap/V1/GcipSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GcipSettings.php deleted file mode 100644 index 972c15b86f85..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GcipSettings.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.iap.v1.GcipSettings - */ -class GcipSettings extends \Google\Protobuf\Internal\Message -{ - /** - * GCIP tenant ids that are linked to the IAP resource. - * tenant_ids could be a string beginning with a number character to indicate - * authenticating with GCIP tenant flow, or in the format of _ - * to indicate authenticating with GCIP agent flow. - * If agent flow is used, tenant_ids should only contain one single element, - * while for tenant flow, tenant_ids can contain multiple elements. - * - * Generated from protobuf field repeated string tenant_ids = 1; - */ - private $tenant_ids; - /** - * Login page URI associated with the GCIP tenants. - * Typically, all resources within the same project share the same login page, - * though it could be overridden at the sub resource level. - * - * Generated from protobuf field .google.protobuf.StringValue login_page_uri = 2; - */ - protected $login_page_uri = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $tenant_ids - * GCIP tenant ids that are linked to the IAP resource. - * tenant_ids could be a string beginning with a number character to indicate - * authenticating with GCIP tenant flow, or in the format of _ - * to indicate authenticating with GCIP agent flow. - * If agent flow is used, tenant_ids should only contain one single element, - * while for tenant flow, tenant_ids can contain multiple elements. - * @type \Google\Protobuf\StringValue $login_page_uri - * Login page URI associated with the GCIP tenants. - * Typically, all resources within the same project share the same login page, - * though it could be overridden at the sub resource level. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * GCIP tenant ids that are linked to the IAP resource. - * tenant_ids could be a string beginning with a number character to indicate - * authenticating with GCIP tenant flow, or in the format of _ - * to indicate authenticating with GCIP agent flow. - * If agent flow is used, tenant_ids should only contain one single element, - * while for tenant flow, tenant_ids can contain multiple elements. - * - * Generated from protobuf field repeated string tenant_ids = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTenantIds() - { - return $this->tenant_ids; - } - - /** - * GCIP tenant ids that are linked to the IAP resource. - * tenant_ids could be a string beginning with a number character to indicate - * authenticating with GCIP tenant flow, or in the format of _ - * to indicate authenticating with GCIP agent flow. - * If agent flow is used, tenant_ids should only contain one single element, - * while for tenant flow, tenant_ids can contain multiple elements. - * - * Generated from protobuf field repeated string tenant_ids = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTenantIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tenant_ids = $arr; - - return $this; - } - - /** - * Login page URI associated with the GCIP tenants. - * Typically, all resources within the same project share the same login page, - * though it could be overridden at the sub resource level. - * - * Generated from protobuf field .google.protobuf.StringValue login_page_uri = 2; - * @return \Google\Protobuf\StringValue|null - */ - public function getLoginPageUri() - { - return $this->login_page_uri; - } - - public function hasLoginPageUri() - { - return isset($this->login_page_uri); - } - - public function clearLoginPageUri() - { - unset($this->login_page_uri); - } - - /** - * Returns the unboxed value from getLoginPageUri() - - * Login page URI associated with the GCIP tenants. - * Typically, all resources within the same project share the same login page, - * though it could be overridden at the sub resource level. - * - * Generated from protobuf field .google.protobuf.StringValue login_page_uri = 2; - * @return string|null - */ - public function getLoginPageUriUnwrapped() - { - return $this->readWrapperValue("login_page_uri"); - } - - /** - * Login page URI associated with the GCIP tenants. - * Typically, all resources within the same project share the same login page, - * though it could be overridden at the sub resource level. - * - * Generated from protobuf field .google.protobuf.StringValue login_page_uri = 2; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setLoginPageUri($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->login_page_uri = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * Login page URI associated with the GCIP tenants. - * Typically, all resources within the same project share the same login page, - * though it could be overridden at the sub resource level. - * - * Generated from protobuf field .google.protobuf.StringValue login_page_uri = 2; - * @param string|null $var - * @return $this - */ - public function setLoginPageUriUnwrapped($var) - { - $this->writeWrapperValue("login_page_uri", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetBrandRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetBrandRequest.php deleted file mode 100644 index 9ffb6ac252dc..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetBrandRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.iap.v1.GetBrandRequest - */ -class GetBrandRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the brand to be fetched. - * In the following format: projects/{project_number/id}/brands/{brand}. - * - * 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. Name of the brand to be fetched. - * In the following format: projects/{project_number/id}/brands/{brand}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the brand to be fetched. - * In the following format: projects/{project_number/id}/brands/{brand}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the brand to be fetched. - * In the following format: projects/{project_number/id}/brands/{brand}. - * - * 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/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIapSettingsRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIapSettingsRequest.php deleted file mode 100644 index 8cc90694746a..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIapSettingsRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.iap.v1.GetIapSettingsRequest - */ -class GetIapSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name for which to retrieve the settings. - * Authorization: Requires the `getSettings` permission for the associated - * resource. - * - * 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. The resource name for which to retrieve the settings. - * Authorization: Requires the `getSettings` permission for the associated - * resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name for which to retrieve the settings. - * Authorization: Requires the `getSettings` permission for the associated - * resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name for which to retrieve the settings. - * Authorization: Requires the `getSettings` permission for the associated - * resource. - * - * 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/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIdentityAwareProxyClientRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIdentityAwareProxyClientRequest.php deleted file mode 100644 index 01dc5db82cf4..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetIdentityAwareProxyClientRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.iap.v1.GetIdentityAwareProxyClientRequest - */ -class GetIdentityAwareProxyClientRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the Identity Aware Proxy client to be fetched. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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. Name of the Identity Aware Proxy client to be fetched. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the Identity Aware Proxy client to be fetched. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the Identity Aware Proxy client to be fetched. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetTunnelDestGroupRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetTunnelDestGroupRequest.php deleted file mode 100644 index b9e56c841894..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/GetTunnelDestGroupRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.iap.v1.GetTunnelDestGroupRequest - */ -class GetTunnelDestGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the TunnelDestGroup to be fetched. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * - * 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 TunnelDestGroup to be fetched. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the TunnelDestGroup to be fetched. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * - * Generated 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 TunnelDestGroup to be fetched. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Iap/v1/proto/src/Google/Cloud/Iap/V1/IapSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IapSettings.php deleted file mode 100644 index faaa3d8ca1b3..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IapSettings.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.iap.v1.IapSettings - */ -class IapSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the IAP protected resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Top level wrapper for all access related setting in IAP - * - * Generated from protobuf field .google.cloud.iap.v1.AccessSettings access_settings = 5; - */ - protected $access_settings = null; - /** - * Top level wrapper for all application related settings in IAP - * - * Generated from protobuf field .google.cloud.iap.v1.ApplicationSettings application_settings = 6; - */ - protected $application_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the IAP protected resource. - * @type \Google\Cloud\Iap\V1\AccessSettings $access_settings - * Top level wrapper for all access related setting in IAP - * @type \Google\Cloud\Iap\V1\ApplicationSettings $application_settings - * Top level wrapper for all application related settings in IAP - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the IAP protected resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the IAP protected resource. - * - * 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; - } - - /** - * Top level wrapper for all access related setting in IAP - * - * Generated from protobuf field .google.cloud.iap.v1.AccessSettings access_settings = 5; - * @return \Google\Cloud\Iap\V1\AccessSettings|null - */ - public function getAccessSettings() - { - return $this->access_settings; - } - - public function hasAccessSettings() - { - return isset($this->access_settings); - } - - public function clearAccessSettings() - { - unset($this->access_settings); - } - - /** - * Top level wrapper for all access related setting in IAP - * - * Generated from protobuf field .google.cloud.iap.v1.AccessSettings access_settings = 5; - * @param \Google\Cloud\Iap\V1\AccessSettings $var - * @return $this - */ - public function setAccessSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\AccessSettings::class); - $this->access_settings = $var; - - return $this; - } - - /** - * Top level wrapper for all application related settings in IAP - * - * Generated from protobuf field .google.cloud.iap.v1.ApplicationSettings application_settings = 6; - * @return \Google\Cloud\Iap\V1\ApplicationSettings|null - */ - public function getApplicationSettings() - { - return $this->application_settings; - } - - public function hasApplicationSettings() - { - return isset($this->application_settings); - } - - public function clearApplicationSettings() - { - unset($this->application_settings); - } - - /** - * Top level wrapper for all application related settings in IAP - * - * Generated from protobuf field .google.cloud.iap.v1.ApplicationSettings application_settings = 6; - * @param \Google\Cloud\Iap\V1\ApplicationSettings $var - * @return $this - */ - public function setApplicationSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\ApplicationSettings::class); - $this->application_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyAdminServiceGrpcClient.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyAdminServiceGrpcClient.php deleted file mode 100644 index aac6ae683046..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyAdminServiceGrpcClient.php +++ /dev/null @@ -1,199 +0,0 @@ -_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/SetIamPolicy', - $argument, - ['\Google\Cloud\Iam\V1\Policy', 'decode'], - $metadata, $options); - } - - /** - * Gets the access control policy for an Identity-Aware Proxy protected - * resource. - * More information about managing access via IAP can be found at: - * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - * @param \Google\Cloud\Iam\V1\GetIamPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetIamPolicy(\Google\Cloud\Iam\V1\GetIamPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/GetIamPolicy', - $argument, - ['\Google\Cloud\Iam\V1\Policy', 'decode'], - $metadata, $options); - } - - /** - * Returns permissions that a caller has on the Identity-Aware Proxy protected - * resource. - * More information about managing access via IAP can be found at: - * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - * @param \Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function TestIamPermissions(\Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/TestIamPermissions', - $argument, - ['\Google\Cloud\Iam\V1\TestIamPermissionsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets the IAP settings on a particular IAP protected resource. - * @param \Google\Cloud\Iap\V1\GetIapSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetIapSettings(\Google\Cloud\Iap\V1\GetIapSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/GetIapSettings', - $argument, - ['\Google\Cloud\Iap\V1\IapSettings', 'decode'], - $metadata, $options); - } - - /** - * Updates the IAP settings on a particular IAP protected resource. It - * replaces all fields unless the `update_mask` is set. - * @param \Google\Cloud\Iap\V1\UpdateIapSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateIapSettings(\Google\Cloud\Iap\V1\UpdateIapSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/UpdateIapSettings', - $argument, - ['\Google\Cloud\Iap\V1\IapSettings', 'decode'], - $metadata, $options); - } - - /** - * Lists the existing TunnelDestGroups. To group across all locations, use a - * `-` as the location ID. For example: - * `/v1/projects/123/iap_tunnel/locations/-/destGroups` - * @param \Google\Cloud\Iap\V1\ListTunnelDestGroupsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListTunnelDestGroups(\Google\Cloud\Iap\V1\ListTunnelDestGroupsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/ListTunnelDestGroups', - $argument, - ['\Google\Cloud\Iap\V1\ListTunnelDestGroupsResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates a new TunnelDestGroup. - * @param \Google\Cloud\Iap\V1\CreateTunnelDestGroupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateTunnelDestGroup(\Google\Cloud\Iap\V1\CreateTunnelDestGroupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/CreateTunnelDestGroup', - $argument, - ['\Google\Cloud\Iap\V1\TunnelDestGroup', 'decode'], - $metadata, $options); - } - - /** - * Retrieves an existing TunnelDestGroup. - * @param \Google\Cloud\Iap\V1\GetTunnelDestGroupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetTunnelDestGroup(\Google\Cloud\Iap\V1\GetTunnelDestGroupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/GetTunnelDestGroup', - $argument, - ['\Google\Cloud\Iap\V1\TunnelDestGroup', 'decode'], - $metadata, $options); - } - - /** - * Deletes a TunnelDestGroup. - * @param \Google\Cloud\Iap\V1\DeleteTunnelDestGroupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteTunnelDestGroup(\Google\Cloud\Iap\V1\DeleteTunnelDestGroupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/DeleteTunnelDestGroup', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Updates a TunnelDestGroup. - * @param \Google\Cloud\Iap\V1\UpdateTunnelDestGroupRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateTunnelDestGroup(\Google\Cloud\Iap\V1\UpdateTunnelDestGroupRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyAdminService/UpdateTunnelDestGroup', - $argument, - ['\Google\Cloud\Iap\V1\TunnelDestGroup', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyClient.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyClient.php deleted file mode 100644 index e8d02a564039..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyClient.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.iap.v1.IdentityAwareProxyClient - */ -class IdentityAwareProxyClient extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Unique identifier of the OAuth client. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Client secret of the OAuth client. - * - * Generated from protobuf field string secret = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $secret = ''; - /** - * Human-friendly name given to the OAuth client. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Unique identifier of the OAuth client. - * @type string $secret - * Output only. Client secret of the OAuth client. - * @type string $display_name - * Human-friendly name given to the OAuth client. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Unique identifier of the OAuth client. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Unique identifier of the OAuth client. - * - * 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. Client secret of the OAuth client. - * - * Generated from protobuf field string secret = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSecret() - { - return $this->secret; - } - - /** - * Output only. Client secret of the OAuth client. - * - * Generated from protobuf field string secret = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSecret($var) - { - GPBUtil::checkString($var, True); - $this->secret = $var; - - return $this; - } - - /** - * Human-friendly name given to the OAuth client. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Human-friendly name given to the OAuth client. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyOAuthServiceGrpcClient.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyOAuthServiceGrpcClient.php deleted file mode 100644 index c2bd554fdb41..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/IdentityAwareProxyOAuthServiceGrpcClient.php +++ /dev/null @@ -1,170 +0,0 @@ -_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ListBrands', - $argument, - ['\Google\Cloud\Iap\V1\ListBrandsResponse', 'decode'], - $metadata, $options); - } - - /** - * Constructs a new OAuth brand for the project if one does not exist. - * The created brand is "internal only", meaning that OAuth clients created - * under it only accept requests from users who belong to the same Google - * Workspace organization as the project. The brand is created in an - * un-reviewed status. NOTE: The "internal only" status can be manually - * changed in the Google Cloud Console. Requires that a brand does not already - * exist for the project, and that the specified support email is owned by the - * caller. - * @param \Google\Cloud\Iap\V1\CreateBrandRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateBrand(\Google\Cloud\Iap\V1\CreateBrandRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/CreateBrand', - $argument, - ['\Google\Cloud\Iap\V1\Brand', 'decode'], - $metadata, $options); - } - - /** - * Retrieves the OAuth brand of the project. - * @param \Google\Cloud\Iap\V1\GetBrandRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetBrand(\Google\Cloud\Iap\V1\GetBrandRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/GetBrand', - $argument, - ['\Google\Cloud\Iap\V1\Brand', 'decode'], - $metadata, $options); - } - - /** - * Creates an Identity Aware Proxy (IAP) OAuth client. The client is owned - * by IAP. Requires that the brand for the project exists and that it is - * set for internal-only use. - * @param \Google\Cloud\Iap\V1\CreateIdentityAwareProxyClientRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateIdentityAwareProxyClient(\Google\Cloud\Iap\V1\CreateIdentityAwareProxyClientRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/CreateIdentityAwareProxyClient', - $argument, - ['\Google\Cloud\Iap\V1\IdentityAwareProxyClient', 'decode'], - $metadata, $options); - } - - /** - * Lists the existing clients for the brand. - * @param \Google\Cloud\Iap\V1\ListIdentityAwareProxyClientsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListIdentityAwareProxyClients(\Google\Cloud\Iap\V1\ListIdentityAwareProxyClientsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ListIdentityAwareProxyClients', - $argument, - ['\Google\Cloud\Iap\V1\ListIdentityAwareProxyClientsResponse', 'decode'], - $metadata, $options); - } - - /** - * Retrieves an Identity Aware Proxy (IAP) OAuth client. - * Requires that the client is owned by IAP. - * @param \Google\Cloud\Iap\V1\GetIdentityAwareProxyClientRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetIdentityAwareProxyClient(\Google\Cloud\Iap\V1\GetIdentityAwareProxyClientRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/GetIdentityAwareProxyClient', - $argument, - ['\Google\Cloud\Iap\V1\IdentityAwareProxyClient', 'decode'], - $metadata, $options); - } - - /** - * Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the - * secret was compromised. Requires that the client is owned by IAP. - * @param \Google\Cloud\Iap\V1\ResetIdentityAwareProxyClientSecretRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ResetIdentityAwareProxyClientSecret(\Google\Cloud\Iap\V1\ResetIdentityAwareProxyClientSecretRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ResetIdentityAwareProxyClientSecret', - $argument, - ['\Google\Cloud\Iap\V1\IdentityAwareProxyClient', 'decode'], - $metadata, $options); - } - - /** - * Deletes an Identity Aware Proxy (IAP) OAuth client. Useful for removing - * obsolete clients, managing the number of clients in a given project, and - * cleaning up after tests. Requires that the client is owned by IAP. - * @param \Google\Cloud\Iap\V1\DeleteIdentityAwareProxyClientRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteIdentityAwareProxyClient(\Google\Cloud\Iap\V1\DeleteIdentityAwareProxyClientRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/DeleteIdentityAwareProxyClient', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsRequest.php deleted file mode 100644 index 72be9dbce426..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.iap.v1.ListBrandsRequest - */ -class ListBrandsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. GCP Project number/id. - * In the following format: projects/{project_number/id}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. GCP Project number/id. - * In the following format: projects/{project_number/id}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. GCP Project number/id. - * In the following format: projects/{project_number/id}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. GCP Project number/id. - * In the following format: projects/{project_number/id}. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsResponse.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsResponse.php deleted file mode 100644 index 87d7babf7797..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListBrandsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.iap.v1.ListBrandsResponse - */ -class ListBrandsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Brands existing in the project. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.Brand brands = 1; - */ - private $brands; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Iap\V1\Brand>|\Google\Protobuf\Internal\RepeatedField $brands - * Brands existing in the project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Brands existing in the project. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.Brand brands = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBrands() - { - return $this->brands; - } - - /** - * Brands existing in the project. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.Brand brands = 1; - * @param array<\Google\Cloud\Iap\V1\Brand>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBrands($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iap\V1\Brand::class); - $this->brands = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsRequest.php deleted file mode 100644 index 0f175a124de3..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.iap.v1.ListIdentityAwareProxyClientsRequest - */ -class ListIdentityAwareProxyClientsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Full brand path. - * In the following format: projects/{project_number/id}/brands/{brand}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * The maximum number of clients to return. The service may return fewer than - * this value. - * If unspecified, at most 100 clients 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 `ListIdentityAwareProxyClients` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListIdentityAwareProxyClients` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Full brand path. - * In the following format: projects/{project_number/id}/brands/{brand}. - * @type int $page_size - * The maximum number of clients to return. The service may return fewer than - * this value. - * If unspecified, at most 100 clients 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 `ListIdentityAwareProxyClients` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListIdentityAwareProxyClients` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Full brand path. - * In the following format: projects/{project_number/id}/brands/{brand}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Full brand path. - * In the following format: projects/{project_number/id}/brands/{brand}. - * - * 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; - } - - /** - * The maximum number of clients to return. The service may return fewer than - * this value. - * If unspecified, at most 100 clients 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 clients to return. The service may return fewer than - * this value. - * If unspecified, at most 100 clients 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 `ListIdentityAwareProxyClients` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListIdentityAwareProxyClients` 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 `ListIdentityAwareProxyClients` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListIdentityAwareProxyClients` 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; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsResponse.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsResponse.php deleted file mode 100644 index 61d2737fce29..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListIdentityAwareProxyClientsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.iap.v1.ListIdentityAwareProxyClientsResponse - */ -class ListIdentityAwareProxyClientsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Clients existing in the brand. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_clients = 1; - */ - private $identity_aware_proxy_clients; - /** - * A token, which can be send 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 = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Iap\V1\IdentityAwareProxyClient>|\Google\Protobuf\Internal\RepeatedField $identity_aware_proxy_clients - * Clients existing in the brand. - * @type string $next_page_token - * A token, which can be send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Clients existing in the brand. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_clients = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIdentityAwareProxyClients() - { - return $this->identity_aware_proxy_clients; - } - - /** - * Clients existing in the brand. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.IdentityAwareProxyClient identity_aware_proxy_clients = 1; - * @param array<\Google\Cloud\Iap\V1\IdentityAwareProxyClient>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIdentityAwareProxyClients($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iap\V1\IdentityAwareProxyClient::class); - $this->identity_aware_proxy_clients = $arr; - - return $this; - } - - /** - * A token, which can be send 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, which can be send 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; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsRequest.php deleted file mode 100644 index 1e7162ea07a2..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsRequest.php +++ /dev/null @@ -1,175 +0,0 @@ -google.cloud.iap.v1.ListTunnelDestGroupsRequest - */ -class ListTunnelDestGroupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. - * A `-` can be used for the location to group across all locations. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of groups to return. The service might return fewer than - * this value. - * If unspecified, at most 100 groups are returned. - * The maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListTunnelDestGroups` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListTunnelDestGroups` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. - * A `-` can be used for the location to group across all locations. - * @type int $page_size - * The maximum number of groups to return. The service might return fewer than - * this value. - * If unspecified, at most 100 groups are returned. - * The maximum value is 1000; values above 1000 are coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ListTunnelDestGroups` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListTunnelDestGroups` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. - * A `-` can be used for the location to group across all 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. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. - * A `-` can be used for the location to group across all 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; - } - - /** - * The maximum number of groups to return. The service might return fewer than - * this value. - * If unspecified, at most 100 groups are returned. - * The maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of groups to return. The service might return fewer than - * this value. - * If unspecified, at most 100 groups are returned. - * The maximum value is 1000; values above 1000 are 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 `ListTunnelDestGroups` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListTunnelDestGroups` 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 `ListTunnelDestGroups` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListTunnelDestGroups` 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; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsResponse.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsResponse.php deleted file mode 100644 index 9c7a174c1b8b..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ListTunnelDestGroupsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.iap.v1.ListTunnelDestGroupsResponse - */ -class ListTunnelDestGroupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * TunnelDestGroup existing in the project. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_groups = 1; - */ - private $tunnel_dest_groups; - /** - * A token that you can send 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 = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Iap\V1\TunnelDestGroup>|\Google\Protobuf\Internal\RepeatedField $tunnel_dest_groups - * TunnelDestGroup existing in the project. - * @type string $next_page_token - * A token that you can send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * TunnelDestGroup existing in the project. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_groups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTunnelDestGroups() - { - return $this->tunnel_dest_groups; - } - - /** - * TunnelDestGroup existing in the project. - * - * Generated from protobuf field repeated .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_groups = 1; - * @param array<\Google\Cloud\Iap\V1\TunnelDestGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTunnelDestGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iap\V1\TunnelDestGroup::class); - $this->tunnel_dest_groups = $arr; - - return $this; - } - - /** - * A token that you can send 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 you can send 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; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/OAuthSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/OAuthSettings.php deleted file mode 100644 index bc4042cf7d3b..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/OAuthSettings.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.iap.v1.OAuthSettings - */ -class OAuthSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Domain hint to send as hd=? parameter in OAuth request flow. Enables - * redirect to primary IDP by skipping Google's login screen. - * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param - * Note: IAP does not verify that the id token's hd claim matches this value - * since access behavior is managed by IAM policies. - * - * Generated from protobuf field .google.protobuf.StringValue login_hint = 2; - */ - protected $login_hint = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\StringValue $login_hint - * Domain hint to send as hd=? parameter in OAuth request flow. Enables - * redirect to primary IDP by skipping Google's login screen. - * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param - * Note: IAP does not verify that the id token's hd claim matches this value - * since access behavior is managed by IAM policies. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Domain hint to send as hd=? parameter in OAuth request flow. Enables - * redirect to primary IDP by skipping Google's login screen. - * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param - * Note: IAP does not verify that the id token's hd claim matches this value - * since access behavior is managed by IAM policies. - * - * Generated from protobuf field .google.protobuf.StringValue login_hint = 2; - * @return \Google\Protobuf\StringValue|null - */ - public function getLoginHint() - { - return $this->login_hint; - } - - public function hasLoginHint() - { - return isset($this->login_hint); - } - - public function clearLoginHint() - { - unset($this->login_hint); - } - - /** - * Returns the unboxed value from getLoginHint() - - * Domain hint to send as hd=? parameter in OAuth request flow. Enables - * redirect to primary IDP by skipping Google's login screen. - * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param - * Note: IAP does not verify that the id token's hd claim matches this value - * since access behavior is managed by IAM policies. - * - * Generated from protobuf field .google.protobuf.StringValue login_hint = 2; - * @return string|null - */ - public function getLoginHintUnwrapped() - { - return $this->readWrapperValue("login_hint"); - } - - /** - * Domain hint to send as hd=? parameter in OAuth request flow. Enables - * redirect to primary IDP by skipping Google's login screen. - * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param - * Note: IAP does not verify that the id token's hd claim matches this value - * since access behavior is managed by IAM policies. - * - * Generated from protobuf field .google.protobuf.StringValue login_hint = 2; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setLoginHint($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->login_hint = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * Domain hint to send as hd=? parameter in OAuth request flow. Enables - * redirect to primary IDP by skipping Google's login screen. - * https://developers.google.com/identity/protocols/OpenIDConnect#hd-param - * Note: IAP does not verify that the id token's hd claim matches this value - * since access behavior is managed by IAM policies. - * - * Generated from protobuf field .google.protobuf.StringValue login_hint = 2; - * @param string|null $var - * @return $this - */ - public function setLoginHintUnwrapped($var) - { - $this->writeWrapperValue("login_hint", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings.php deleted file mode 100644 index 7c4baa762797..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.iap.v1.ReauthSettings - */ -class ReauthSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Reauth method requested. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.Method method = 1; - */ - protected $method = 0; - /** - * Reauth session lifetime, how long before a user has to reauthenticate - * again. - * - * Generated from protobuf field .google.protobuf.Duration max_age = 2; - */ - protected $max_age = null; - /** - * How IAP determines the effective policy in cases of hierarchial policies. - * Policies are merged from higher in the hierarchy to lower in the hierarchy. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.PolicyType policy_type = 3; - */ - protected $policy_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $method - * Reauth method requested. - * @type \Google\Protobuf\Duration $max_age - * Reauth session lifetime, how long before a user has to reauthenticate - * again. - * @type int $policy_type - * How IAP determines the effective policy in cases of hierarchial policies. - * Policies are merged from higher in the hierarchy to lower in the hierarchy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Reauth method requested. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.Method method = 1; - * @return int - */ - public function getMethod() - { - return $this->method; - } - - /** - * Reauth method requested. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.Method method = 1; - * @param int $var - * @return $this - */ - public function setMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Iap\V1\ReauthSettings\Method::class); - $this->method = $var; - - return $this; - } - - /** - * Reauth session lifetime, how long before a user has to reauthenticate - * again. - * - * Generated from protobuf field .google.protobuf.Duration max_age = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxAge() - { - return $this->max_age; - } - - public function hasMaxAge() - { - return isset($this->max_age); - } - - public function clearMaxAge() - { - unset($this->max_age); - } - - /** - * Reauth session lifetime, how long before a user has to reauthenticate - * again. - * - * Generated from protobuf field .google.protobuf.Duration max_age = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxAge($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_age = $var; - - return $this; - } - - /** - * How IAP determines the effective policy in cases of hierarchial policies. - * Policies are merged from higher in the hierarchy to lower in the hierarchy. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.PolicyType policy_type = 3; - * @return int - */ - public function getPolicyType() - { - return $this->policy_type; - } - - /** - * How IAP determines the effective policy in cases of hierarchial policies. - * Policies are merged from higher in the hierarchy to lower in the hierarchy. - * - * Generated from protobuf field .google.cloud.iap.v1.ReauthSettings.PolicyType policy_type = 3; - * @param int $var - * @return $this - */ - public function setPolicyType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Iap\V1\ReauthSettings\PolicyType::class); - $this->policy_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/Method.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/Method.php deleted file mode 100644 index 93b09ac5867d..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/Method.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.iap.v1.ReauthSettings.Method - */ -class Method -{ - /** - * Reauthentication disabled. - * - * Generated from protobuf enum METHOD_UNSPECIFIED = 0; - */ - const METHOD_UNSPECIFIED = 0; - /** - * Prompts the user to log in again. - * - * Generated from protobuf enum LOGIN = 1; - */ - const LOGIN = 1; - /** - * Deprecated, no longer accepted by IAP APIs. - * - * Generated from protobuf enum PASSWORD = 2 [deprecated = true]; - */ - const PASSWORD = 2; - /** - * User must use their secure key 2nd factor device. - * - * Generated from protobuf enum SECURE_KEY = 3; - */ - const SECURE_KEY = 3; - - private static $valueToName = [ - self::METHOD_UNSPECIFIED => 'METHOD_UNSPECIFIED', - self::LOGIN => 'LOGIN', - self::PASSWORD => 'PASSWORD', - self::SECURE_KEY => 'SECURE_KEY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Method::class, \Google\Cloud\Iap\V1\ReauthSettings_Method::class); - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/PolicyType.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/PolicyType.php deleted file mode 100644 index f2f2779c5aac..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings/PolicyType.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.iap.v1.ReauthSettings.PolicyType - */ -class PolicyType -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum POLICY_TYPE_UNSPECIFIED = 0; - */ - const POLICY_TYPE_UNSPECIFIED = 0; - /** - * This policy acts as a minimum to other policies, lower in the hierarchy. - * Effective policy may only be the same or stricter. - * - * Generated from protobuf enum MINIMUM = 1; - */ - const MINIMUM = 1; - /** - * This policy acts as a default if no other reauth policy is set. - * - * Generated from protobuf enum DEFAULT = 2; - */ - const PBDEFAULT = 2; - - private static $valueToName = [ - self::POLICY_TYPE_UNSPECIFIED => 'POLICY_TYPE_UNSPECIFIED', - self::MINIMUM => 'MINIMUM', - self::PBDEFAULT => 'DEFAULT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has 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(PolicyType::class, \Google\Cloud\Iap\V1\ReauthSettings_PolicyType::class); - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings_Method.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings_Method.php deleted file mode 100644 index 7d5223e450f2..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/ReauthSettings_Method.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.iap.v1.ResetIdentityAwareProxyClientSecretRequest - */ -class ResetIdentityAwareProxyClientSecretRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the Identity Aware Proxy client to that will have its - * secret reset. In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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. Name of the Identity Aware Proxy client to that will have its - * secret reset. In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the Identity Aware Proxy client to that will have its - * secret reset. In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the Identity Aware Proxy client to that will have its - * secret reset. In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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/Iap/v1/proto/src/Google/Cloud/Iap/V1/TunnelDestGroup.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/TunnelDestGroup.php deleted file mode 100644 index d552a68d741c..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/TunnelDestGroup.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.iap.v1.TunnelDestGroup - */ -class TunnelDestGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Immutable. Identifier for the TunnelDestGroup. Must be unique - * within the project and contain only lower case letters (a-z) and dashes - * (-). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Unordered list. List of CIDRs that this group applies to. - * - * Generated from protobuf field repeated string cidrs = 2 [(.google.api.field_behavior) = UNORDERED_LIST]; - */ - private $cidrs; - /** - * Unordered list. List of FQDNs that this group applies to. - * - * Generated from protobuf field repeated string fqdns = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; - */ - private $fqdns; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Immutable. Identifier for the TunnelDestGroup. Must be unique - * within the project and contain only lower case letters (a-z) and dashes - * (-). - * @type array|\Google\Protobuf\Internal\RepeatedField $cidrs - * Unordered list. List of CIDRs that this group applies to. - * @type array|\Google\Protobuf\Internal\RepeatedField $fqdns - * Unordered list. List of FQDNs that this group applies to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Immutable. Identifier for the TunnelDestGroup. Must be unique - * within the project and contain only lower case letters (a-z) and dashes - * (-). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Immutable. Identifier for the TunnelDestGroup. Must be unique - * within the project and contain only lower case letters (a-z) and dashes - * (-). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Unordered list. List of CIDRs that this group applies to. - * - * Generated from protobuf field repeated string cidrs = 2 [(.google.api.field_behavior) = UNORDERED_LIST]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCidrs() - { - return $this->cidrs; - } - - /** - * Unordered list. List of CIDRs that this group applies to. - * - * Generated from protobuf field repeated string cidrs = 2 [(.google.api.field_behavior) = UNORDERED_LIST]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCidrs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->cidrs = $arr; - - return $this; - } - - /** - * Unordered list. List of FQDNs that this group applies to. - * - * Generated from protobuf field repeated string fqdns = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFqdns() - { - return $this->fqdns; - } - - /** - * Unordered list. List of FQDNs that this group applies to. - * - * Generated from protobuf field repeated string fqdns = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFqdns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->fqdns = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateIapSettingsRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateIapSettingsRequest.php deleted file mode 100644 index 672d6c7cd1e1..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateIapSettingsRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.iap.v1.UpdateIapSettingsRequest - */ -class UpdateIapSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The new values for the IAP settings to be updated. - * Authorization: Requires the `updateSettings` permission for the associated - * resource. - * - * Generated from protobuf field .google.cloud.iap.v1.IapSettings iap_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $iap_settings = null; - /** - * The field mask specifying which IAP settings should be updated. - * If omitted, the all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iap\V1\IapSettings $iap_settings - * Required. The new values for the IAP settings to be updated. - * Authorization: Requires the `updateSettings` permission for the associated - * resource. - * @type \Google\Protobuf\FieldMask $update_mask - * The field mask specifying which IAP settings should be updated. - * If omitted, the all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The new values for the IAP settings to be updated. - * Authorization: Requires the `updateSettings` permission for the associated - * resource. - * - * Generated from protobuf field .google.cloud.iap.v1.IapSettings iap_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iap\V1\IapSettings|null - */ - public function getIapSettings() - { - return $this->iap_settings; - } - - public function hasIapSettings() - { - return isset($this->iap_settings); - } - - public function clearIapSettings() - { - unset($this->iap_settings); - } - - /** - * Required. The new values for the IAP settings to be updated. - * Authorization: Requires the `updateSettings` permission for the associated - * resource. - * - * Generated from protobuf field .google.cloud.iap.v1.IapSettings iap_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iap\V1\IapSettings $var - * @return $this - */ - public function setIapSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\IapSettings::class); - $this->iap_settings = $var; - - return $this; - } - - /** - * The field mask specifying which IAP settings should be updated. - * If omitted, the all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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); - } - - /** - * The field mask specifying which IAP settings should be updated. - * If omitted, the all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateTunnelDestGroupRequest.php b/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateTunnelDestGroupRequest.php deleted file mode 100644 index 715d4dfbd7aa..000000000000 --- a/owl-bot-staging/Iap/v1/proto/src/Google/Cloud/Iap/V1/UpdateTunnelDestGroupRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.iap.v1.UpdateTunnelDestGroupRequest - */ -class UpdateTunnelDestGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The new values for the TunnelDestGroup. - * - * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tunnel_dest_group = null; - /** - * A field mask that specifies which IAP settings to update. - * If omitted, then all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iap\V1\TunnelDestGroup $tunnel_dest_group - * Required. The new values for the TunnelDestGroup. - * @type \Google\Protobuf\FieldMask $update_mask - * A field mask that specifies which IAP settings to update. - * If omitted, then all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The new values for the TunnelDestGroup. - * - * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iap\V1\TunnelDestGroup|null - */ - public function getTunnelDestGroup() - { - return $this->tunnel_dest_group; - } - - public function hasTunnelDestGroup() - { - return isset($this->tunnel_dest_group); - } - - public function clearTunnelDestGroup() - { - unset($this->tunnel_dest_group); - } - - /** - * Required. The new values for the TunnelDestGroup. - * - * Generated from protobuf field .google.cloud.iap.v1.TunnelDestGroup tunnel_dest_group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iap\V1\TunnelDestGroup $var - * @return $this - */ - public function setTunnelDestGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iap\V1\TunnelDestGroup::class); - $this->tunnel_dest_group = $var; - - return $this; - } - - /** - * A field mask that specifies which IAP settings to update. - * If omitted, then all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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 field mask that specifies which IAP settings to update. - * If omitted, then all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/create_tunnel_dest_group.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/create_tunnel_dest_group.php deleted file mode 100644 index 3cf0ce79be17..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/create_tunnel_dest_group.php +++ /dev/null @@ -1,92 +0,0 @@ -setName($tunnelDestGroupName); - - // Call the API and handle any network failures. - try { - /** @var TunnelDestGroup $response */ - $response = $identityAwareProxyAdminServiceClient->createTunnelDestGroup( - $formattedParent, - $tunnelDestGroup, - $tunnelDestGroupId - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = IdentityAwareProxyAdminServiceClient::tunnelLocationName( - '[PROJECT]', - '[LOCATION]' - ); - $tunnelDestGroupName = '[NAME]'; - $tunnelDestGroupId = '[TUNNEL_DEST_GROUP_ID]'; - - create_tunnel_dest_group_sample($formattedParent, $tunnelDestGroupName, $tunnelDestGroupId); -} -// [END iap_v1_generated_IdentityAwareProxyAdminService_CreateTunnelDestGroup_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/delete_tunnel_dest_group.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/delete_tunnel_dest_group.php deleted file mode 100644 index 837f12a971a3..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/delete_tunnel_dest_group.php +++ /dev/null @@ -1,70 +0,0 @@ -deleteTunnelDestGroup($formattedName); - 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 = IdentityAwareProxyAdminServiceClient::tunnelDestGroupName( - '[PROJECT]', - '[LOCATION]', - '[DEST_GROUP]' - ); - - delete_tunnel_dest_group_sample($formattedName); -} -// [END iap_v1_generated_IdentityAwareProxyAdminService_DeleteTunnelDestGroup_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iam_policy.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iam_policy.php deleted file mode 100644 index df094f89b806..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iam_policy.php +++ /dev/null @@ -1,69 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 iap_v1_generated_IdentityAwareProxyAdminService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iap_settings.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iap_settings.php deleted file mode 100644 index 1248c6c1a558..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_iap_settings.php +++ /dev/null @@ -1,67 +0,0 @@ -getIapSettings($name); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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_iap_settings_sample($name); -} -// [END iap_v1_generated_IdentityAwareProxyAdminService_GetIapSettings_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_tunnel_dest_group.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_tunnel_dest_group.php deleted file mode 100644 index 8f6fe042039c..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/get_tunnel_dest_group.php +++ /dev/null @@ -1,72 +0,0 @@ -getTunnelDestGroup($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = IdentityAwareProxyAdminServiceClient::tunnelDestGroupName( - '[PROJECT]', - '[LOCATION]', - '[DEST_GROUP]' - ); - - get_tunnel_dest_group_sample($formattedName); -} -// [END iap_v1_generated_IdentityAwareProxyAdminService_GetTunnelDestGroup_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/list_tunnel_dest_groups.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/list_tunnel_dest_groups.php deleted file mode 100644 index 0e2d0981ba2c..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/list_tunnel_dest_groups.php +++ /dev/null @@ -1,79 +0,0 @@ -listTunnelDestGroups($formattedParent); - - /** @var TunnelDestGroup $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 = IdentityAwareProxyAdminServiceClient::tunnelLocationName( - '[PROJECT]', - '[LOCATION]' - ); - - list_tunnel_dest_groups_sample($formattedParent); -} -// [END iap_v1_generated_IdentityAwareProxyAdminService_ListTunnelDestGroups_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/set_iam_policy.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/set_iam_policy.php deleted file mode 100644 index 0015005fcca1..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/set_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 iap_v1_generated_IdentityAwareProxyAdminService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/test_iam_permissions.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/test_iam_permissions.php deleted file mode 100644 index 9768775d4058..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,77 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 iap_v1_generated_IdentityAwareProxyAdminService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_iap_settings.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_iap_settings.php deleted file mode 100644 index 20c346e8bd5e..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_iap_settings.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($iapSettingsName); - - // Call the API and handle any network failures. - try { - /** @var IapSettings $response */ - $response = $identityAwareProxyAdminServiceClient->updateIapSettings($iapSettings); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $iapSettingsName = '[NAME]'; - - update_iap_settings_sample($iapSettingsName); -} -// [END iap_v1_generated_IdentityAwareProxyAdminService_UpdateIapSettings_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_tunnel_dest_group.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_tunnel_dest_group.php deleted file mode 100644 index ee3eb84f59d2..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyAdminServiceClient/update_tunnel_dest_group.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($tunnelDestGroupName); - - // Call the API and handle any network failures. - try { - /** @var TunnelDestGroup $response */ - $response = $identityAwareProxyAdminServiceClient->updateTunnelDestGroup($tunnelDestGroup); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $tunnelDestGroupName = '[NAME]'; - - update_tunnel_dest_group_sample($tunnelDestGroupName); -} -// [END iap_v1_generated_IdentityAwareProxyAdminService_UpdateTunnelDestGroup_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_brand.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_brand.php deleted file mode 100644 index 530bc4083f91..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_brand.php +++ /dev/null @@ -1,76 +0,0 @@ -createBrand($parent, $brand); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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_brand_sample($parent); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_CreateBrand_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_identity_aware_proxy_client.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_identity_aware_proxy_client.php deleted file mode 100644 index efc69ae78788..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/create_identity_aware_proxy_client.php +++ /dev/null @@ -1,76 +0,0 @@ -createIdentityAwareProxyClient( - $parent, - $identityAwareProxyClient - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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_identity_aware_proxy_client_sample($parent); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_CreateIdentityAwareProxyClient_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/delete_identity_aware_proxy_client.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/delete_identity_aware_proxy_client.php deleted file mode 100644 index 4aabc43e1b57..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/delete_identity_aware_proxy_client.php +++ /dev/null @@ -1,67 +0,0 @@ -deleteIdentityAwareProxyClient($name); - 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 -{ - $name = '[NAME]'; - - delete_identity_aware_proxy_client_sample($name); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_DeleteIdentityAwareProxyClient_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_brand.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_brand.php deleted file mode 100644 index e10c2745c15d..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_brand.php +++ /dev/null @@ -1,66 +0,0 @@ -getBrand($name); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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_brand_sample($name); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_GetBrand_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_identity_aware_proxy_client.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_identity_aware_proxy_client.php deleted file mode 100644 index af61a6b6153f..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/get_identity_aware_proxy_client.php +++ /dev/null @@ -1,68 +0,0 @@ -getIdentityAwareProxyClient($name); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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_identity_aware_proxy_client_sample($name); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_GetIdentityAwareProxyClient_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_brands.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_brands.php deleted file mode 100644 index 821facb0216a..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_brands.php +++ /dev/null @@ -1,66 +0,0 @@ -listBrands($parent); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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_brands_sample($parent); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_ListBrands_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_identity_aware_proxy_clients.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_identity_aware_proxy_clients.php deleted file mode 100644 index 9453f08e7712..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/list_identity_aware_proxy_clients.php +++ /dev/null @@ -1,71 +0,0 @@ -listIdentityAwareProxyClients($parent); - - /** @var IdentityAwareProxyClient $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_identity_aware_proxy_clients_sample($parent); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_ListIdentityAwareProxyClients_sync] diff --git a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/reset_identity_aware_proxy_client_secret.php b/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/reset_identity_aware_proxy_client_secret.php deleted file mode 100644 index 19a0297da962..000000000000 --- a/owl-bot-staging/Iap/v1/samples/V1/IdentityAwareProxyOAuthServiceClient/reset_identity_aware_proxy_client_secret.php +++ /dev/null @@ -1,68 +0,0 @@ -resetIdentityAwareProxyClientSecret($name); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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_identity_aware_proxy_client_secret_sample($name); -} -// [END iap_v1_generated_IdentityAwareProxyOAuthService_ResetIdentityAwareProxyClientSecret_sync] diff --git a/owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyAdminServiceGapicClient.php b/owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyAdminServiceGapicClient.php deleted file mode 100644 index 6feed0f1af94..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyAdminServiceGapicClient.php +++ /dev/null @@ -1,791 +0,0 @@ -tunnelLocationName('[PROJECT]', '[LOCATION]'); - * $tunnelDestGroup = new TunnelDestGroup(); - * $tunnelDestGroupId = 'tunnel_dest_group_id'; - * $response = $identityAwareProxyAdminServiceClient->createTunnelDestGroup($formattedParent, $tunnelDestGroup, $tunnelDestGroupId); - * } finally { - * $identityAwareProxyAdminServiceClient->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. - */ -class IdentityAwareProxyAdminServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.iap.v1.IdentityAwareProxyAdminService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'iap.googleapis.com'; - - /** 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 $tunnelDestGroupNameTemplate; - - private static $tunnelLocationNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/identity_aware_proxy_admin_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_admin_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_admin_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_admin_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getTunnelDestGroupNameTemplate() - { - if (self::$tunnelDestGroupNameTemplate == null) { - self::$tunnelDestGroupNameTemplate = new PathTemplate('projects/{project}/iap_tunnel/locations/{location}/destGroups/{dest_group}'); - } - - return self::$tunnelDestGroupNameTemplate; - } - - private static function getTunnelLocationNameTemplate() - { - if (self::$tunnelLocationNameTemplate == null) { - self::$tunnelLocationNameTemplate = new PathTemplate('projects/{project}/iap_tunnel/locations/{location}'); - } - - return self::$tunnelLocationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'tunnelDestGroup' => self::getTunnelDestGroupNameTemplate(), - 'tunnelLocation' => self::getTunnelLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * tunnel_dest_group resource. - * - * @param string $project - * @param string $location - * @param string $destGroup - * - * @return string The formatted tunnel_dest_group resource. - */ - public static function tunnelDestGroupName($project, $location, $destGroup) - { - return self::getTunnelDestGroupNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'dest_group' => $destGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * tunnel_location resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted tunnel_location resource. - */ - public static function tunnelLocationName($project, $location) - { - return self::getTunnelLocationNameTemplate()->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 - * - tunnelDestGroup: projects/{project}/iap_tunnel/locations/{location}/destGroups/{dest_group} - * - tunnelLocation: projects/{project}/iap_tunnel/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($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 'iap.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 TunnelDestGroup. - * - * Sample code: - * ``` - * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); - * try { - * $formattedParent = $identityAwareProxyAdminServiceClient->tunnelLocationName('[PROJECT]', '[LOCATION]'); - * $tunnelDestGroup = new TunnelDestGroup(); - * $tunnelDestGroupId = 'tunnel_dest_group_id'; - * $response = $identityAwareProxyAdminServiceClient->createTunnelDestGroup($formattedParent, $tunnelDestGroup, $tunnelDestGroupId); - * } finally { - * $identityAwareProxyAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. - * @param TunnelDestGroup $tunnelDestGroup Required. The TunnelDestGroup to create. - * @param string $tunnelDestGroupId Required. The ID to use for the TunnelDestGroup, which becomes the final - * component of the resource name. - * - * This value must be 4-63 characters, and valid characters - * are `[a-z]-`. - * @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\Iap\V1\TunnelDestGroup - * - * @throws ApiException if the remote call fails - */ - public function createTunnelDestGroup($parent, $tunnelDestGroup, $tunnelDestGroupId, array $optionalArgs = []) - { - $request = new CreateTunnelDestGroupRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTunnelDestGroup($tunnelDestGroup); - $request->setTunnelDestGroupId($tunnelDestGroupId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateTunnelDestGroup', TunnelDestGroup::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a TunnelDestGroup. - * - * Sample code: - * ``` - * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); - * try { - * $formattedName = $identityAwareProxyAdminServiceClient->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); - * $identityAwareProxyAdminServiceClient->deleteTunnelDestGroup($formattedName); - * } finally { - * $identityAwareProxyAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the TunnelDestGroup to delete. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * @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 deleteTunnelDestGroup($name, array $optionalArgs = []) - { - $request = new DeleteTunnelDestGroupRequest(); - $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('DeleteTunnelDestGroup', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy for an Identity-Aware Proxy protected - * resource. - * More information about managing access via IAP can be found at: - * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - * - * Sample code: - * ``` - * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); - * try { - * $resource = 'resource'; - * $response = $identityAwareProxyAdminServiceClient->getIamPolicy($resource); - * } finally { - * $identityAwareProxyAdminServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the IAP settings on a particular IAP protected resource. - * - * Sample code: - * ``` - * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); - * try { - * $name = 'name'; - * $response = $identityAwareProxyAdminServiceClient->getIapSettings($name); - * } finally { - * $identityAwareProxyAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name for which to retrieve the settings. - * Authorization: Requires the `getSettings` permission for the associated - * resource. - * @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\Iap\V1\IapSettings - * - * @throws ApiException if the remote call fails - */ - public function getIapSettings($name, array $optionalArgs = []) - { - $request = new GetIapSettingsRequest(); - $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('GetIapSettings', IapSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves an existing TunnelDestGroup. - * - * Sample code: - * ``` - * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); - * try { - * $formattedName = $identityAwareProxyAdminServiceClient->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); - * $response = $identityAwareProxyAdminServiceClient->getTunnelDestGroup($formattedName); - * } finally { - * $identityAwareProxyAdminServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the TunnelDestGroup to be fetched. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`. - * @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\Iap\V1\TunnelDestGroup - * - * @throws ApiException if the remote call fails - */ - public function getTunnelDestGroup($name, array $optionalArgs = []) - { - $request = new GetTunnelDestGroupRequest(); - $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('GetTunnelDestGroup', TunnelDestGroup::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the existing TunnelDestGroups. To group across all locations, use a - * `-` as the location ID. For example: - * `/v1/projects/123/iap_tunnel/locations/-/destGroups` - * - * Sample code: - * ``` - * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); - * try { - * $formattedParent = $identityAwareProxyAdminServiceClient->tunnelLocationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $identityAwareProxyAdminServiceClient->listTunnelDestGroups($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $identityAwareProxyAdminServiceClient->listTunnelDestGroups($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $identityAwareProxyAdminServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Google Cloud Project ID and location. - * In the following format: - * `projects/{project_number/id}/iap_tunnel/locations/{location}`. - * A `-` can be used for the location to group across all locations. - * @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 listTunnelDestGroups($parent, array $optionalArgs = []) - { - $request = new ListTunnelDestGroupsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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('ListTunnelDestGroups', $optionalArgs, ListTunnelDestGroupsResponse::class, $request); - } - - /** - * Sets the access control policy for an Identity-Aware Proxy protected - * resource. Replaces any existing policy. - * More information about managing access via IAP can be found at: - * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - * - * Sample code: - * ``` - * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $identityAwareProxyAdminServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $identityAwareProxyAdminServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - 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('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns permissions that a caller has on the Identity-Aware Proxy protected - * resource. - * More information about managing access via IAP can be found at: - * https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api - * - * Sample code: - * ``` - * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $identityAwareProxyAdminServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $identityAwareProxyAdminServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @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\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates the IAP settings on a particular IAP protected resource. It - * replaces all fields unless the `update_mask` is set. - * - * Sample code: - * ``` - * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); - * try { - * $iapSettings = new IapSettings(); - * $response = $identityAwareProxyAdminServiceClient->updateIapSettings($iapSettings); - * } finally { - * $identityAwareProxyAdminServiceClient->close(); - * } - * ``` - * - * @param IapSettings $iapSettings Required. The new values for the IAP settings to be updated. - * Authorization: Requires the `updateSettings` permission for the associated - * resource. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The field mask specifying which IAP settings should be updated. - * If omitted, the all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iap\V1\IapSettings - * - * @throws ApiException if the remote call fails - */ - public function updateIapSettings($iapSettings, array $optionalArgs = []) - { - $request = new UpdateIapSettingsRequest(); - $requestParamHeaders = []; - $request->setIapSettings($iapSettings); - $requestParamHeaders['iap_settings.name'] = $iapSettings->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('UpdateIapSettings', IapSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a TunnelDestGroup. - * - * Sample code: - * ``` - * $identityAwareProxyAdminServiceClient = new IdentityAwareProxyAdminServiceClient(); - * try { - * $tunnelDestGroup = new TunnelDestGroup(); - * $response = $identityAwareProxyAdminServiceClient->updateTunnelDestGroup($tunnelDestGroup); - * } finally { - * $identityAwareProxyAdminServiceClient->close(); - * } - * ``` - * - * @param TunnelDestGroup $tunnelDestGroup Required. The new values for the TunnelDestGroup. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * A field mask that specifies which IAP settings to update. - * If omitted, then all of the settings are updated. See - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iap\V1\TunnelDestGroup - * - * @throws ApiException if the remote call fails - */ - public function updateTunnelDestGroup($tunnelDestGroup, array $optionalArgs = []) - { - $request = new UpdateTunnelDestGroupRequest(); - $requestParamHeaders = []; - $request->setTunnelDestGroup($tunnelDestGroup); - $requestParamHeaders['tunnel_dest_group.name'] = $tunnelDestGroup->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('UpdateTunnelDestGroup', TunnelDestGroup::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyOAuthServiceGapicClient.php b/owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyOAuthServiceGapicClient.php deleted file mode 100644 index 884b901dd0f9..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/Gapic/IdentityAwareProxyOAuthServiceGapicClient.php +++ /dev/null @@ -1,538 +0,0 @@ -createBrand($parent, $brand); - * } finally { - * $identityAwareProxyOAuthServiceClient->close(); - * } - * ``` - */ -class IdentityAwareProxyOAuthServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.iap.v1.IdentityAwareProxyOAuthService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'iap.googleapis.com'; - - /** 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/identity_aware_proxy_o_auth_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_o_auth_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_o_auth_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/identity_aware_proxy_o_auth_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 'iap.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); - } - - /** - * Constructs a new OAuth brand for the project if one does not exist. - * The created brand is "internal only", meaning that OAuth clients created - * under it only accept requests from users who belong to the same Google - * Workspace organization as the project. The brand is created in an - * un-reviewed status. NOTE: The "internal only" status can be manually - * changed in the Google Cloud Console. Requires that a brand does not already - * exist for the project, and that the specified support email is owned by the - * caller. - * - * Sample code: - * ``` - * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); - * try { - * $parent = 'parent'; - * $brand = new Brand(); - * $response = $identityAwareProxyOAuthServiceClient->createBrand($parent, $brand); - * } finally { - * $identityAwareProxyOAuthServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. GCP Project number/id under which the brand is to be created. - * In the following format: projects/{project_number/id}. - * @param Brand $brand Required. The brand to be created. - * @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\Iap\V1\Brand - * - * @throws ApiException if the remote call fails - */ - public function createBrand($parent, $brand, array $optionalArgs = []) - { - $request = new CreateBrandRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setBrand($brand); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateBrand', Brand::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an Identity Aware Proxy (IAP) OAuth client. The client is owned - * by IAP. Requires that the brand for the project exists and that it is - * set for internal-only use. - * - * Sample code: - * ``` - * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); - * try { - * $parent = 'parent'; - * $identityAwareProxyClient = new IdentityAwareProxyClient(); - * $response = $identityAwareProxyOAuthServiceClient->createIdentityAwareProxyClient($parent, $identityAwareProxyClient); - * } finally { - * $identityAwareProxyOAuthServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Path to create the client in. - * In the following format: - * projects/{project_number/id}/brands/{brand}. - * The project must belong to a G Suite account. - * @param IdentityAwareProxyClient $identityAwareProxyClient Required. Identity Aware Proxy Client to be created. - * @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\Iap\V1\IdentityAwareProxyClient - * - * @throws ApiException if the remote call fails - */ - public function createIdentityAwareProxyClient($parent, $identityAwareProxyClient, array $optionalArgs = []) - { - $request = new CreateIdentityAwareProxyClientRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setIdentityAwareProxyClient($identityAwareProxyClient); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateIdentityAwareProxyClient', IdentityAwareProxyClient::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an Identity Aware Proxy (IAP) OAuth client. Useful for removing - * obsolete clients, managing the number of clients in a given project, and - * cleaning up after tests. Requires that the client is owned by IAP. - * - * Sample code: - * ``` - * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); - * try { - * $name = 'name'; - * $identityAwareProxyOAuthServiceClient->deleteIdentityAwareProxyClient($name); - * } finally { - * $identityAwareProxyOAuthServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the Identity Aware Proxy client to be deleted. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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 deleteIdentityAwareProxyClient($name, array $optionalArgs = []) - { - $request = new DeleteIdentityAwareProxyClientRequest(); - $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('DeleteIdentityAwareProxyClient', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves the OAuth brand of the project. - * - * Sample code: - * ``` - * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); - * try { - * $name = 'name'; - * $response = $identityAwareProxyOAuthServiceClient->getBrand($name); - * } finally { - * $identityAwareProxyOAuthServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the brand to be fetched. - * In the following format: projects/{project_number/id}/brands/{brand}. - * @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\Iap\V1\Brand - * - * @throws ApiException if the remote call fails - */ - public function getBrand($name, array $optionalArgs = []) - { - $request = new GetBrandRequest(); - $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('GetBrand', Brand::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves an Identity Aware Proxy (IAP) OAuth client. - * Requires that the client is owned by IAP. - * - * Sample code: - * ``` - * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); - * try { - * $name = 'name'; - * $response = $identityAwareProxyOAuthServiceClient->getIdentityAwareProxyClient($name); - * } finally { - * $identityAwareProxyOAuthServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the Identity Aware Proxy client to be fetched. - * In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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\Iap\V1\IdentityAwareProxyClient - * - * @throws ApiException if the remote call fails - */ - public function getIdentityAwareProxyClient($name, array $optionalArgs = []) - { - $request = new GetIdentityAwareProxyClientRequest(); - $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('GetIdentityAwareProxyClient', IdentityAwareProxyClient::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the existing brands for the project. - * - * Sample code: - * ``` - * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); - * try { - * $parent = 'parent'; - * $response = $identityAwareProxyOAuthServiceClient->listBrands($parent); - * } finally { - * $identityAwareProxyOAuthServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. GCP Project number/id. - * In the following format: projects/{project_number/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\Iap\V1\ListBrandsResponse - * - * @throws ApiException if the remote call fails - */ - public function listBrands($parent, array $optionalArgs = []) - { - $request = new ListBrandsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ListBrands', ListBrandsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the existing clients for the brand. - * - * Sample code: - * ``` - * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); - * try { - * $parent = 'parent'; - * // Iterate over pages of elements - * $pagedResponse = $identityAwareProxyOAuthServiceClient->listIdentityAwareProxyClients($parent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $identityAwareProxyOAuthServiceClient->listIdentityAwareProxyClients($parent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $identityAwareProxyOAuthServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Full brand path. - * In the following format: projects/{project_number/id}/brands/{brand}. - * @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 listIdentityAwareProxyClients($parent, array $optionalArgs = []) - { - $request = new ListIdentityAwareProxyClientsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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('ListIdentityAwareProxyClients', $optionalArgs, ListIdentityAwareProxyClientsResponse::class, $request); - } - - /** - * Resets an Identity Aware Proxy (IAP) OAuth client secret. Useful if the - * secret was compromised. Requires that the client is owned by IAP. - * - * Sample code: - * ``` - * $identityAwareProxyOAuthServiceClient = new IdentityAwareProxyOAuthServiceClient(); - * try { - * $name = 'name'; - * $response = $identityAwareProxyOAuthServiceClient->resetIdentityAwareProxyClientSecret($name); - * } finally { - * $identityAwareProxyOAuthServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the Identity Aware Proxy client to that will have its - * secret reset. In the following format: - * projects/{project_number/id}/brands/{brand}/identityAwareProxyClients/{client_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\Iap\V1\IdentityAwareProxyClient - * - * @throws ApiException if the remote call fails - */ - public function resetIdentityAwareProxyClientSecret($name, array $optionalArgs = []) - { - $request = new ResetIdentityAwareProxyClientSecretRequest(); - $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('ResetIdentityAwareProxyClientSecret', IdentityAwareProxyClient::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Iap/v1/src/V1/IdentityAwareProxyAdminServiceClient.php b/owl-bot-staging/Iap/v1/src/V1/IdentityAwareProxyAdminServiceClient.php deleted file mode 100644 index 2c2e79e96b7e..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/IdentityAwareProxyAdminServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.iap.v1.IdentityAwareProxyAdminService' => [ - 'ListTunnelDestGroups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTunnelDestGroups', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php deleted file mode 100644 index c49e6cb53acc..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php +++ /dev/null @@ -1,130 +0,0 @@ - [ - 'google.cloud.iap.v1.IdentityAwareProxyAdminService' => [ - 'CreateTunnelDestGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/iap_tunnel/locations/*}/destGroups', - 'body' => 'tunnel_dest_group', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'tunnel_dest_group_id', - ], - ], - 'DeleteTunnelDestGroup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/iap_tunnel/locations/*/destGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=**}:getIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetIapSettings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=**}:iapSettings', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTunnelDestGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/iap_tunnel/locations/*/destGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListTunnelDestGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/iap_tunnel/locations/*}/destGroups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=**}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=**}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateIapSettings' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{iap_settings.name=**}:iapSettings', - 'body' => 'iap_settings', - 'placeholders' => [ - 'iap_settings.name' => [ - 'getters' => [ - 'getIapSettings', - 'getName', - ], - ], - ], - ], - 'UpdateTunnelDestGroup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{tunnel_dest_group.name=projects/*/iap_tunnel/locations/*/destGroups/*}', - 'body' => 'tunnel_dest_group', - 'placeholders' => [ - 'tunnel_dest_group.name' => [ - 'getters' => [ - 'getTunnelDestGroup', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_client_config.json b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_client_config.json deleted file mode 100644 index 71494a74db15..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_client_config.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "interfaces": { - "google.cloud.iap.v1.IdentityAwareProxyOAuthService": { - "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": { - "CreateBrand": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateIdentityAwareProxyClient": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteIdentityAwareProxyClient": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetBrand": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetIdentityAwareProxyClient": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListBrands": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListIdentityAwareProxyClients": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ResetIdentityAwareProxyClientSecret": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_descriptor_config.php b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_descriptor_config.php deleted file mode 100644 index 7953ceef8d11..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_descriptor_config.php +++ /dev/null @@ -1,18 +0,0 @@ - [ - 'google.cloud.iap.v1.IdentityAwareProxyOAuthService' => [ - 'ListIdentityAwareProxyClients' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getIdentityAwareProxyClients', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php b/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php deleted file mode 100644 index 0e5faa00e399..000000000000 --- a/owl-bot-staging/Iap/v1/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php +++ /dev/null @@ -1,100 +0,0 @@ - [ - 'google.cloud.iap.v1.IdentityAwareProxyOAuthService' => [ - 'CreateBrand' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/brands', - 'body' => 'brand', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIdentityAwareProxyClient' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/brands/*}/identityAwareProxyClients', - 'body' => 'identity_aware_proxy_client', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteIdentityAwareProxyClient' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBrand' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/brands/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIdentityAwareProxyClient' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBrands' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/brands', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListIdentityAwareProxyClients' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/brands/*}/identityAwareProxyClients', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ResetIdentityAwareProxyClientSecret' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/brands/*/identityAwareProxyClients/*}:resetSecret', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Iap/v1/tests/Unit/V1/IdentityAwareProxyAdminServiceClientTest.php b/owl-bot-staging/Iap/v1/tests/Unit/V1/IdentityAwareProxyAdminServiceClientTest.php deleted file mode 100644 index db53d466bdb9..000000000000 --- a/owl-bot-staging/Iap/v1/tests/Unit/V1/IdentityAwareProxyAdminServiceClientTest.php +++ /dev/null @@ -1,701 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return IdentityAwareProxyAdminServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new IdentityAwareProxyAdminServiceClient($options); - } - - /** @test */ - public function createTunnelDestGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new TunnelDestGroup(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tunnelLocationName('[PROJECT]', '[LOCATION]'); - $tunnelDestGroup = new TunnelDestGroup(); - $tunnelDestGroupName = 'tunnelDestGroupName1906281888'; - $tunnelDestGroup->setName($tunnelDestGroupName); - $tunnelDestGroupId = 'tunnelDestGroupId-1205367743'; - $response = $gapicClient->createTunnelDestGroup($formattedParent, $tunnelDestGroup, $tunnelDestGroupId); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/CreateTunnelDestGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTunnelDestGroup(); - $this->assertProtobufEquals($tunnelDestGroup, $actualValue); - $actualValue = $actualRequestObject->getTunnelDestGroupId(); - $this->assertProtobufEquals($tunnelDestGroupId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTunnelDestGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tunnelLocationName('[PROJECT]', '[LOCATION]'); - $tunnelDestGroup = new TunnelDestGroup(); - $tunnelDestGroupName = 'tunnelDestGroupName1906281888'; - $tunnelDestGroup->setName($tunnelDestGroupName); - $tunnelDestGroupId = 'tunnelDestGroupId-1205367743'; - try { - $gapicClient->createTunnelDestGroup($formattedParent, $tunnelDestGroup, $tunnelDestGroupId); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTunnelDestGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); - $gapicClient->deleteTunnelDestGroup($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/DeleteTunnelDestGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTunnelDestGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); - try { - $gapicClient->deleteTunnelDestGroup($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 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'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/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'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIapSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new IapSettings(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->getIapSettings($name); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/GetIapSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIapSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->getIapSettings($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 getTunnelDestGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new TunnelDestGroup(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); - $response = $gapicClient->getTunnelDestGroup($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/GetTunnelDestGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTunnelDestGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tunnelDestGroupName('[PROJECT]', '[LOCATION]', '[DEST_GROUP]'); - try { - $gapicClient->getTunnelDestGroup($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 listTunnelDestGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tunnelDestGroupsElement = new TunnelDestGroup(); - $tunnelDestGroups = [ - $tunnelDestGroupsElement, - ]; - $expectedResponse = new ListTunnelDestGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTunnelDestGroups($tunnelDestGroups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tunnelLocationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listTunnelDestGroups($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTunnelDestGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/ListTunnelDestGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTunnelDestGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tunnelLocationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listTunnelDestGroups($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 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(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/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(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/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 = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateIapSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new IapSettings(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $iapSettings = new IapSettings(); - $iapSettingsName = 'iapSettingsName-218298426'; - $iapSettings->setName($iapSettingsName); - $response = $gapicClient->updateIapSettings($iapSettings); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/UpdateIapSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getIapSettings(); - $this->assertProtobufEquals($iapSettings, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateIapSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $iapSettings = new IapSettings(); - $iapSettingsName = 'iapSettingsName-218298426'; - $iapSettings->setName($iapSettingsName); - try { - $gapicClient->updateIapSettings($iapSettings); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTunnelDestGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new TunnelDestGroup(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $tunnelDestGroup = new TunnelDestGroup(); - $tunnelDestGroupName = 'tunnelDestGroupName1906281888'; - $tunnelDestGroup->setName($tunnelDestGroupName); - $response = $gapicClient->updateTunnelDestGroup($tunnelDestGroup); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyAdminService/UpdateTunnelDestGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getTunnelDestGroup(); - $this->assertProtobufEquals($tunnelDestGroup, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTunnelDestGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $tunnelDestGroup = new TunnelDestGroup(); - $tunnelDestGroupName = 'tunnelDestGroupName1906281888'; - $tunnelDestGroup->setName($tunnelDestGroupName); - try { - $gapicClient->updateTunnelDestGroup($tunnelDestGroup); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->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/Iap/v1/tests/Unit/V1/IdentityAwareProxyOAuthServiceClientTest.php b/owl-bot-staging/Iap/v1/tests/Unit/V1/IdentityAwareProxyOAuthServiceClientTest.php deleted file mode 100644 index d23cb4b1577e..000000000000 --- a/owl-bot-staging/Iap/v1/tests/Unit/V1/IdentityAwareProxyOAuthServiceClientTest.php +++ /dev/null @@ -1,580 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return IdentityAwareProxyOAuthServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new IdentityAwareProxyOAuthServiceClient($options); - } - - /** @test */ - public function createBrandTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $supportEmail = 'supportEmail-648030420'; - $applicationTitle = 'applicationTitle24071849'; - $orgInternalOnly = false; - $expectedResponse = new Brand(); - $expectedResponse->setName($name); - $expectedResponse->setSupportEmail($supportEmail); - $expectedResponse->setApplicationTitle($applicationTitle); - $expectedResponse->setOrgInternalOnly($orgInternalOnly); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $brand = new Brand(); - $response = $gapicClient->createBrand($parent, $brand); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/CreateBrand', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getBrand(); - $this->assertProtobufEquals($brand, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBrandExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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'; - $brand = new Brand(); - try { - $gapicClient->createBrand($parent, $brand); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createIdentityAwareProxyClientTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $secret = 'secret-906277200'; - $displayName = 'displayName1615086568'; - $expectedResponse = new IdentityAwareProxyClient(); - $expectedResponse->setName($name); - $expectedResponse->setSecret($secret); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $identityAwareProxyClient = new IdentityAwareProxyClient(); - $response = $gapicClient->createIdentityAwareProxyClient($parent, $identityAwareProxyClient); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/CreateIdentityAwareProxyClient', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getIdentityAwareProxyClient(); - $this->assertProtobufEquals($identityAwareProxyClient, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createIdentityAwareProxyClientExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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'; - $identityAwareProxyClient = new IdentityAwareProxyClient(); - try { - $gapicClient->createIdentityAwareProxyClient($parent, $identityAwareProxyClient); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteIdentityAwareProxyClientTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $gapicClient->deleteIdentityAwareProxyClient($name); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/DeleteIdentityAwareProxyClient', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteIdentityAwareProxyClientExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->deleteIdentityAwareProxyClient($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 getBrandTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $supportEmail = 'supportEmail-648030420'; - $applicationTitle = 'applicationTitle24071849'; - $orgInternalOnly = false; - $expectedResponse = new Brand(); - $expectedResponse->setName($name2); - $expectedResponse->setSupportEmail($supportEmail); - $expectedResponse->setApplicationTitle($applicationTitle); - $expectedResponse->setOrgInternalOnly($orgInternalOnly); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->getBrand($name); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/GetBrand', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBrandExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->getBrand($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 getIdentityAwareProxyClientTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $secret = 'secret-906277200'; - $displayName = 'displayName1615086568'; - $expectedResponse = new IdentityAwareProxyClient(); - $expectedResponse->setName($name2); - $expectedResponse->setSecret($secret); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->getIdentityAwareProxyClient($name); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/GetIdentityAwareProxyClient', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIdentityAwareProxyClientExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->getIdentityAwareProxyClient($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 listBrandsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListBrandsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $response = $gapicClient->listBrands($parent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ListBrands', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBrandsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->listBrands($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 listIdentityAwareProxyClientsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $identityAwareProxyClientsElement = new IdentityAwareProxyClient(); - $identityAwareProxyClients = [ - $identityAwareProxyClientsElement, - ]; - $expectedResponse = new ListIdentityAwareProxyClientsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIdentityAwareProxyClients($identityAwareProxyClients); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $response = $gapicClient->listIdentityAwareProxyClients($parent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIdentityAwareProxyClients()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ListIdentityAwareProxyClients', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIdentityAwareProxyClientsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->listIdentityAwareProxyClients($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 resetIdentityAwareProxyClientSecretTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $secret = 'secret-906277200'; - $displayName = 'displayName1615086568'; - $expectedResponse = new IdentityAwareProxyClient(); - $expectedResponse->setName($name2); - $expectedResponse->setSecret($secret); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->resetIdentityAwareProxyClientSecret($name); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iap.v1.IdentityAwareProxyOAuthService/ResetIdentityAwareProxyClientSecret', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetIdentityAwareProxyClientSecretExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->resetIdentityAwareProxyClientSecret($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()); - } -} diff --git a/owl-bot-staging/Ids/v1/proto/src/GPBMetadata/Google/Cloud/Ids/V1/Ids.php b/owl-bot-staging/Ids/v1/proto/src/GPBMetadata/Google/Cloud/Ids/V1/Ids.php deleted file mode 100644 index 95e3d56d00b169997a61de73077d22b16e155e61..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3693 zcmbVP%~IP|6s~Pd?BkG<8z3$jrm9IB!UU@%owiXzIszNVGk_T&>7@0?YoTGET^L^*u`|vA!--dai zLQU!@jA}yjSYZ29upNt8s$~dGuhpWCpjrpEZcwKv2&I~^RofHFrRv^C=;~UYqf$v| zTUOhkqH0*4ChD3i9xn5rq8|ysR1TglOt(ydJJd{- zF5DJ^nB4ZJZDEBgLX^ffFB%K3S4~D8Q!(l#>Z*=zGt1dVQ%P!57DL6~EZh!1%fsm{ zVIjy-lFlT#A~46Jy5vn_;xT!k?% z%zQ#fEM!+x|Hvuw8RS%l;w)%z&wLVBa(8Eo!MB4L7`7P09D8{-N;>pPUCiq~j2lXm z8g70}Na1I0N1y2hvlwMt-0*G7CUcI-6kIYXJF=V?`E-TG<9rt1T)F$n`HAj^)*PE8 z`2x~>EYSRA-*^5UzT7kbbqX#sM`^WmwP9FoH$Q>?nb{@C^#YND)C+nXbdXFy`cN^v zplw+x`DLP@K_*HE>z>*zKP~T6_ntMLZ0&BB*Q)E)a%u8CB*H{>YrVF!DeqNlTk^(a zf?R^sM(yj#Bmo%T#A*Lzb23FTF!s1wc|18rE<+9s0e8bpZc8vtCd$&$ZxdD?zTocuO~MZ$ZAtFQ*}6IU02u z&EqbW6NMv~9>~)wH!o zfh>{NPSE{^t_2M#JcsELH7KKl8IN8*>5uONUic{qSL59+It2}mTt191Fmjjusz;jA z$Umkyc!=qeGR5}*oNdi6B~#=ET;UVTa~rsqx=8UZF;iq7WIYcf#KNV;oY|(k}Tm0TX=$C&QuThi*8 zWs99t+269sX#%eFtBVXrrQhgGZat@oVoc3K$ItD4VKmUBScj+bjR5I8kuu{4RNE_g zuJ;fUe>PUcpIBVK5Z_W@`25c$ysU7uD_DW+3oBv zxwy}m?Mk9}baXVh*C`&`5AIP*HYy9xF$b%Ma2>b7VZ>X_R5f>--(0p6-+Ue>*0v1A zY!@x3Ew-tNWM`Jx-BJ54X%8^H*U6cRe-o1=|0*U)s8C6Iy4)Q1eed0hkHvR_drZ%@ UhffM!9dhOIErY8`2RZ=%0f9K79{>OV diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/CreateEndpointRequest.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/CreateEndpointRequest.php deleted file mode 100644 index aac7e1055b1a..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/CreateEndpointRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.ids.v1.CreateEndpointRequest - */ -class CreateEndpointRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The endpoint's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The endpoint identifier. This will be part of the endpoint's - * resource name. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * - * Generated from protobuf field string endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $endpoint_id = ''; - /** - * Required. The endpoint to create. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $endpoint = null; - /** - * 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 t - * he request times out. If you make the 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; - */ - protected $request_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The endpoint's parent. - * @type string $endpoint_id - * Required. The endpoint identifier. This will be part of the endpoint's - * resource name. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * @type \Google\Cloud\Ids\V1\Endpoint $endpoint - * Required. The endpoint to create. - * @type string $request_id - * 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 t - * he request times out. If you make the 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\Ids\V1\Ids::initOnce(); - parent::__construct($data); - } - - /** - * Required. The endpoint's 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. The endpoint's 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. The endpoint identifier. This will be part of the endpoint's - * resource name. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * - * Generated from protobuf field string endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEndpointId() - { - return $this->endpoint_id; - } - - /** - * Required. The endpoint identifier. This will be part of the endpoint's - * resource name. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * - * Generated from protobuf field string endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEndpointId($var) - { - GPBUtil::checkString($var, True); - $this->endpoint_id = $var; - - return $this; - } - - /** - * Required. The endpoint to create. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Ids\V1\Endpoint|null - */ - public function getEndpoint() - { - return $this->endpoint; - } - - public function hasEndpoint() - { - return isset($this->endpoint); - } - - public function clearEndpoint() - { - unset($this->endpoint); - } - - /** - * Required. The endpoint to create. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Ids\V1\Endpoint $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Ids\V1\Endpoint::class); - $this->endpoint = $var; - - return $this; - } - - /** - * 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 t - * he request times out. If you make the 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * 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 t - * he request times out. If you make the 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; - * @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/Ids/v1/proto/src/Google/Cloud/Ids/V1/DeleteEndpointRequest.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/DeleteEndpointRequest.php deleted file mode 100644 index 14c030c96e07..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/DeleteEndpointRequest.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.ids.v1.DeleteEndpointRequest - */ -class DeleteEndpointRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the endpoint to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * 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 t - * he request times out. If you make the 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; - */ - protected $request_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the endpoint to delete. - * @type string $request_id - * 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 t - * he request times out. If you make the 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\Ids\V1\Ids::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the endpoint 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 endpoint 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; - } - - /** - * 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 t - * he request times out. If you make the 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * 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 t - * he request times out. If you make the 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; - * @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/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint.php deleted file mode 100644 index f6410808a084..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint.php +++ /dev/null @@ -1,432 +0,0 @@ -google.cloud.ids.v1.Endpoint - */ -class Endpoint extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the endpoint. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The create time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The labels of the endpoint. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Required. The fully qualified URL of the network to which the IDS Endpoint is - * attached. - * - * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network = ''; - /** - * Output only. The fully qualified URL of the endpoint's ILB Forwarding Rule. - * - * Generated from protobuf field string endpoint_forwarding_rule = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $endpoint_forwarding_rule = ''; - /** - * Output only. The IP address of the IDS Endpoint's ILB. - * - * Generated from protobuf field string endpoint_ip = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $endpoint_ip = ''; - /** - * User-provided description of the endpoint - * - * Generated from protobuf field string description = 8; - */ - protected $description = ''; - /** - * Required. Lowest threat severity that this endpoint will alert on. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint.Severity severity = 9 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $severity = 0; - /** - * Output only. Current state of the endpoint. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Whether the endpoint should report traffic logs in addition to threat logs. - * - * Generated from protobuf field bool traffic_logs = 13; - */ - protected $traffic_logs = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the endpoint. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create time timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time timestamp. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The labels of the endpoint. - * @type string $network - * Required. The fully qualified URL of the network to which the IDS Endpoint is - * attached. - * @type string $endpoint_forwarding_rule - * Output only. The fully qualified URL of the endpoint's ILB Forwarding Rule. - * @type string $endpoint_ip - * Output only. The IP address of the IDS Endpoint's ILB. - * @type string $description - * User-provided description of the endpoint - * @type int $severity - * Required. Lowest threat severity that this endpoint will alert on. - * @type int $state - * Output only. Current state of the endpoint. - * @type bool $traffic_logs - * Whether the endpoint should report traffic logs in addition to threat logs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Ids\V1\Ids::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the endpoint. - * - * 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 endpoint. - * - * 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 create time 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. The create time 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. The update time 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. The update time 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; - } - - /** - * The labels of the endpoint. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The labels of the endpoint. - * - * 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; - } - - /** - * Required. The fully qualified URL of the network to which the IDS Endpoint is - * attached. - * - * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Required. The fully qualified URL of the network to which the IDS Endpoint is - * attached. - * - * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Output only. The fully qualified URL of the endpoint's ILB Forwarding Rule. - * - * Generated from protobuf field string endpoint_forwarding_rule = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEndpointForwardingRule() - { - return $this->endpoint_forwarding_rule; - } - - /** - * Output only. The fully qualified URL of the endpoint's ILB Forwarding Rule. - * - * Generated from protobuf field string endpoint_forwarding_rule = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEndpointForwardingRule($var) - { - GPBUtil::checkString($var, True); - $this->endpoint_forwarding_rule = $var; - - return $this; - } - - /** - * Output only. The IP address of the IDS Endpoint's ILB. - * - * Generated from protobuf field string endpoint_ip = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEndpointIp() - { - return $this->endpoint_ip; - } - - /** - * Output only. The IP address of the IDS Endpoint's ILB. - * - * Generated from protobuf field string endpoint_ip = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEndpointIp($var) - { - GPBUtil::checkString($var, True); - $this->endpoint_ip = $var; - - return $this; - } - - /** - * User-provided description of the endpoint - * - * Generated from protobuf field string description = 8; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description of the endpoint - * - * Generated from protobuf field string description = 8; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Lowest threat severity that this endpoint will alert on. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint.Severity severity = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Required. Lowest threat severity that this endpoint will alert on. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint.Severity severity = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Ids\V1\Endpoint\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * Output only. Current state of the endpoint. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the endpoint. - * - * Generated from protobuf field .google.cloud.ids.v1.Endpoint.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Ids\V1\Endpoint\State::class); - $this->state = $var; - - return $this; - } - - /** - * Whether the endpoint should report traffic logs in addition to threat logs. - * - * Generated from protobuf field bool traffic_logs = 13; - * @return bool - */ - public function getTrafficLogs() - { - return $this->traffic_logs; - } - - /** - * Whether the endpoint should report traffic logs in addition to threat logs. - * - * Generated from protobuf field bool traffic_logs = 13; - * @param bool $var - * @return $this - */ - public function setTrafficLogs($var) - { - GPBUtil::checkBool($var); - $this->traffic_logs = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/Severity.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/Severity.php deleted file mode 100644 index 77b6813c9be8..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/Severity.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.ids.v1.Endpoint.Severity - */ -class Severity -{ - /** - * Not set. - * - * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; - */ - const SEVERITY_UNSPECIFIED = 0; - /** - * Informational alerts. - * - * Generated from protobuf enum INFORMATIONAL = 1; - */ - const INFORMATIONAL = 1; - /** - * Low severity alerts. - * - * Generated from protobuf enum LOW = 2; - */ - const LOW = 2; - /** - * Medium severity alerts. - * - * Generated from protobuf enum MEDIUM = 3; - */ - const MEDIUM = 3; - /** - * High severity alerts. - * - * Generated from protobuf enum HIGH = 4; - */ - const HIGH = 4; - /** - * Critical severity alerts. - * - * Generated from protobuf enum CRITICAL = 5; - */ - const CRITICAL = 5; - - private static $valueToName = [ - self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', - self::INFORMATIONAL => 'INFORMATIONAL', - self::LOW => 'LOW', - self::MEDIUM => 'MEDIUM', - self::HIGH => 'HIGH', - self::CRITICAL => 'CRITICAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Ids\V1\Endpoint_Severity::class); - diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/State.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/State.php deleted file mode 100644 index 35c39ce9be00..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.ids.v1.Endpoint.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Active and ready for traffic. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - 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\Ids\V1\Endpoint_State::class); - diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint_Severity.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint_Severity.php deleted file mode 100644 index a1b5a3b821ed..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/Endpoint_Severity.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.ids.v1.GetEndpointRequest - */ -class GetEndpointRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the endpoint to retrieve. - * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * - * 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 name of the endpoint to retrieve. - * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Ids\V1\Ids::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the endpoint to retrieve. - * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * - * Generated 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 endpoint to retrieve. - * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Ids/v1/proto/src/Google/Cloud/Ids/V1/IDSGrpcClient.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/IDSGrpcClient.php deleted file mode 100644 index 0a13a2ac72a0..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/IDSGrpcClient.php +++ /dev/null @@ -1,95 +0,0 @@ -_simpleRequest('/google.cloud.ids.v1.IDS/ListEndpoints', - $argument, - ['\Google\Cloud\Ids\V1\ListEndpointsResponse', 'decode'], - $metadata, $options); - } - - /** - * Gets details of a single Endpoint. - * @param \Google\Cloud\Ids\V1\GetEndpointRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetEndpoint(\Google\Cloud\Ids\V1\GetEndpointRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.ids.v1.IDS/GetEndpoint', - $argument, - ['\Google\Cloud\Ids\V1\Endpoint', 'decode'], - $metadata, $options); - } - - /** - * Creates a new Endpoint in a given project and location. - * @param \Google\Cloud\Ids\V1\CreateEndpointRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateEndpoint(\Google\Cloud\Ids\V1\CreateEndpointRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.ids.v1.IDS/CreateEndpoint', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Deletes a single Endpoint. - * @param \Google\Cloud\Ids\V1\DeleteEndpointRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteEndpoint(\Google\Cloud\Ids\V1\DeleteEndpointRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.ids.v1.IDS/DeleteEndpoint', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsRequest.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsRequest.php deleted file mode 100644 index 82a147e9cb23..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsRequest.php +++ /dev/null @@ -1,225 +0,0 @@ -google.cloud.ids.v1.ListEndpointsRequest - */ -class ListEndpointsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of endpoints. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of endpoints to return. The service may return fewer - * than this value. - * - * 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 `ListEndpoints` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListEndpoints` 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. The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns this collection of endpoints. - * @type int $page_size - * Optional. The maximum number of endpoints to return. The service may return fewer - * than this value. - * @type string $page_token - * Optional. A page token, received from a previous `ListEndpoints` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListEndpoints` must - * match the call that provided the page token. - * @type string $filter - * Optional. The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * @type string $order_by - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Ids\V1\Ids::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of endpoints. - * - * Generated 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, which owns this collection of endpoints. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 endpoints to return. The service may return fewer - * than this value. - * - * 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 endpoints to return. The service may return fewer - * than this value. - * - * 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 `ListEndpoints` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListEndpoints` 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 `ListEndpoints` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListEndpoints` 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. The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * 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. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * 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/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsResponse.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsResponse.php deleted file mode 100644 index c24d54eeef07..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/ListEndpointsResponse.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.ids.v1.ListEndpointsResponse - */ -class ListEndpointsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of endpoints response. - * - * Generated from protobuf field repeated .google.cloud.ids.v1.Endpoint endpoints = 1; - */ - private $endpoints; - /** - * A token, which 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\Ids\V1\Endpoint>|\Google\Protobuf\Internal\RepeatedField $endpoints - * The list of endpoints response. - * @type string $next_page_token - * A token, which 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\Ids\V1\Ids::initOnce(); - parent::__construct($data); - } - - /** - * The list of endpoints response. - * - * Generated from protobuf field repeated .google.cloud.ids.v1.Endpoint endpoints = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEndpoints() - { - return $this->endpoints; - } - - /** - * The list of endpoints response. - * - * Generated from protobuf field repeated .google.cloud.ids.v1.Endpoint endpoints = 1; - * @param array<\Google\Cloud\Ids\V1\Endpoint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEndpoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Ids\V1\Endpoint::class); - $this->endpoints = $arr; - - return $this; - } - - /** - * A token, which 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, which 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/Ids/v1/proto/src/Google/Cloud/Ids/V1/OperationMetadata.php b/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/OperationMetadata.php deleted file mode 100644 index 50e0d626665f..000000000000 --- a/owl-bot-staging/Ids/v1/proto/src/Google/Cloud/Ids/V1/OperationMetadata.php +++ /dev/null @@ -1,303 +0,0 @@ -google.cloud.ids.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\Ids\V1\Ids::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/Ids/v1/samples/V1/IDSClient/create_endpoint.php b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/create_endpoint.php deleted file mode 100644 index 762c6eb745f8..000000000000 --- a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/create_endpoint.php +++ /dev/null @@ -1,100 +0,0 @@ -setNetwork($endpointNetwork) - ->setSeverity($endpointSeverity); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $iDSClient->createEndpoint($formattedParent, $endpointId, $endpoint); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Endpoint $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = IDSClient::locationName('[PROJECT]', '[LOCATION]'); - $endpointId = '[ENDPOINT_ID]'; - $endpointNetwork = '[NETWORK]'; - $endpointSeverity = Severity::SEVERITY_UNSPECIFIED; - - create_endpoint_sample($formattedParent, $endpointId, $endpointNetwork, $endpointSeverity); -} -// [END ids_v1_generated_IDS_CreateEndpoint_sync] diff --git a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/delete_endpoint.php b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/delete_endpoint.php deleted file mode 100644 index 4df7b65dad12..000000000000 --- a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/delete_endpoint.php +++ /dev/null @@ -1,75 +0,0 @@ -deleteEndpoint($formattedName); - $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 = IDSClient::endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); - - delete_endpoint_sample($formattedName); -} -// [END ids_v1_generated_IDS_DeleteEndpoint_sync] diff --git a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/get_endpoint.php b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/get_endpoint.php deleted file mode 100644 index 8e2686450085..000000000000 --- a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/get_endpoint.php +++ /dev/null @@ -1,67 +0,0 @@ -getEndpoint($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = IDSClient::endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); - - get_endpoint_sample($formattedName); -} -// [END ids_v1_generated_IDS_GetEndpoint_sync] diff --git a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/list_endpoints.php b/owl-bot-staging/Ids/v1/samples/V1/IDSClient/list_endpoints.php deleted file mode 100644 index 270413720689..000000000000 --- a/owl-bot-staging/Ids/v1/samples/V1/IDSClient/list_endpoints.php +++ /dev/null @@ -1,71 +0,0 @@ -listEndpoints($formattedParent); - - /** @var Endpoint $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 = IDSClient::locationName('[PROJECT]', '[LOCATION]'); - - list_endpoints_sample($formattedParent); -} -// [END ids_v1_generated_IDS_ListEndpoints_sync] diff --git a/owl-bot-staging/Ids/v1/src/V1/Gapic/IDSGapicClient.php b/owl-bot-staging/Ids/v1/src/V1/Gapic/IDSGapicClient.php deleted file mode 100644 index 02c3a79f92bb..000000000000 --- a/owl-bot-staging/Ids/v1/src/V1/Gapic/IDSGapicClient.php +++ /dev/null @@ -1,634 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $endpointId = 'endpoint_id'; - * $endpoint = new Endpoint(); - * $operationResponse = $iDSClient->createEndpoint($formattedParent, $endpointId, $endpoint); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $iDSClient->createEndpoint($formattedParent, $endpointId, $endpoint); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $iDSClient->resumeOperation($operationName, 'createEndpoint'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $iDSClient->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. - */ -class IDSGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.ids.v1.IDS'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'ids.googleapis.com'; - - /** 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 $endpointNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/ids_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/ids_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/ids_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/ids_rest_client_config.php', - ], - ], - ]; - } - - private static function getEndpointNameTemplate() - { - if (self::$endpointNameTemplate == null) { - self::$endpointNameTemplate = new PathTemplate('projects/{project}/locations/{location}/endpoints/{endpoint}'); - } - - return self::$endpointNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'endpoint' => self::getEndpointNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a endpoint - * resource. - * - * @param string $project - * @param string $location - * @param string $endpoint - * - * @return string The formatted endpoint resource. - */ - public static function endpointName($project, $location, $endpoint) - { - return self::getEndpointNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'endpoint' => $endpoint, - ]); - } - - /** - * 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($project, $location) - { - return self::getLocationNameTemplate()->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 - * - endpoint: projects/{project}/locations/{location}/endpoints/{endpoint} - * - 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($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"); - } - - /** - * 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; - } - - /** - * 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 'ids.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a new Endpoint in a given project and location. - * - * Sample code: - * ``` - * $iDSClient = new IDSClient(); - * try { - * $formattedParent = $iDSClient->locationName('[PROJECT]', '[LOCATION]'); - * $endpointId = 'endpoint_id'; - * $endpoint = new Endpoint(); - * $operationResponse = $iDSClient->createEndpoint($formattedParent, $endpointId, $endpoint); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $iDSClient->createEndpoint($formattedParent, $endpointId, $endpoint); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $iDSClient->resumeOperation($operationName, 'createEndpoint'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $iDSClient->close(); - * } - * ``` - * - * @param string $parent Required. The endpoint's parent. - * @param string $endpointId Required. The endpoint identifier. This will be part of the endpoint's - * resource name. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * Values that do not match this pattern will trigger an INVALID_ARGUMENT - * error. - * @param Endpoint $endpoint Required. The endpoint to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * 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 t - * he request times out. If you make the 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 RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createEndpoint($parent, $endpointId, $endpoint, array $optionalArgs = []) - { - $request = new CreateEndpointRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEndpointId($endpointId); - $request->setEndpoint($endpoint); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateEndpoint', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a single Endpoint. - * - * Sample code: - * ``` - * $iDSClient = new IDSClient(); - * try { - * $formattedName = $iDSClient->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); - * $operationResponse = $iDSClient->deleteEndpoint($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $iDSClient->deleteEndpoint($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $iDSClient->resumeOperation($operationName, 'deleteEndpoint'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $iDSClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the endpoint to delete. - * @param array $optionalArgs { - * Optional. - * - * @type string $requestId - * 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 t - * he request times out. If you make the 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 RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteEndpoint($name, array $optionalArgs = []) - { - $request = new DeleteEndpointRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['requestId'])) { - $request->setRequestId($optionalArgs['requestId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteEndpoint', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets details of a single Endpoint. - * - * Sample code: - * ``` - * $iDSClient = new IDSClient(); - * try { - * $formattedName = $iDSClient->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); - * $response = $iDSClient->getEndpoint($formattedName); - * } finally { - * $iDSClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the endpoint to retrieve. - * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` - * @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\Ids\V1\Endpoint - * - * @throws ApiException if the remote call fails - */ - public function getEndpoint($name, array $optionalArgs = []) - { - $request = new GetEndpointRequest(); - $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('GetEndpoint', Endpoint::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists Endpoints in a given project and location. - * - * Sample code: - * ``` - * $iDSClient = new IDSClient(); - * try { - * $formattedParent = $iDSClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $iDSClient->listEndpoints($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $iDSClient->listEndpoints($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $iDSClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent, which owns this collection of endpoints. - * @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 - * Optional. The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * @type string $orderBy - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listEndpoints($parent, array $optionalArgs = []) - { - $request = new ListEndpointsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListEndpoints', $optionalArgs, ListEndpointsResponse::class, $request); - } -} diff --git a/owl-bot-staging/Ids/v1/src/V1/IDSClient.php b/owl-bot-staging/Ids/v1/src/V1/IDSClient.php deleted file mode 100644 index 62686deb8190..000000000000 --- a/owl-bot-staging/Ids/v1/src/V1/IDSClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.ids.v1.IDS' => [ - 'CreateEndpoint' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Ids\V1\Endpoint', - 'metadataReturnType' => '\Google\Cloud\Ids\V1\OperationMetadata', - 'initialPollDelayMillis' => '5000', - 'pollDelayMultiplier' => '2.0', - 'maxPollDelayMillis' => '45000', - 'totalPollTimeoutMillis' => '3600000', - ], - ], - 'DeleteEndpoint' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Ids\V1\OperationMetadata', - 'initialPollDelayMillis' => '5000', - 'pollDelayMultiplier' => '2.0', - 'maxPollDelayMillis' => '45000', - 'totalPollTimeoutMillis' => '3600000', - ], - ], - 'ListEndpoints' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEndpoints', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Ids/v1/src/V1/resources/ids_rest_client_config.php b/owl-bot-staging/Ids/v1/src/V1/resources/ids_rest_client_config.php deleted file mode 100644 index e81293b497d7..000000000000 --- a/owl-bot-staging/Ids/v1/src/V1/resources/ids_rest_client_config.php +++ /dev/null @@ -1,165 +0,0 @@ - [ - 'google.cloud.ids.v1.IDS' => [ - 'CreateEndpoint' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/endpoints', - 'body' => 'endpoint', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'endpoint_id', - ], - ], - 'DeleteEndpoint' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEndpoint' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListEndpoints' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/endpoints', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - '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.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpoints/*}: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/Ids/v1/tests/Unit/V1/IDSClientTest.php b/owl-bot-staging/Ids/v1/tests/Unit/V1/IDSClientTest.php deleted file mode 100644 index f80141f86c8a..000000000000 --- a/owl-bot-staging/Ids/v1/tests/Unit/V1/IDSClientTest.php +++ /dev/null @@ -1,468 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return IDSClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new IDSClient($options); - } - - /** @test */ - public function createEndpointTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEndpointTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $network = 'network1843485230'; - $endpointForwardingRule = 'endpointForwardingRule-1878786988'; - $endpointIp = 'endpointIp-1135808495'; - $description = 'description-1724546052'; - $trafficLogs = false; - $expectedResponse = new Endpoint(); - $expectedResponse->setName($name); - $expectedResponse->setNetwork($network); - $expectedResponse->setEndpointForwardingRule($endpointForwardingRule); - $expectedResponse->setEndpointIp($endpointIp); - $expectedResponse->setDescription($description); - $expectedResponse->setTrafficLogs($trafficLogs); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEndpointTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $endpointId = 'endpointId-1135808507'; - $endpoint = new Endpoint(); - $endpointNetwork = 'endpointNetwork1670861529'; - $endpoint->setNetwork($endpointNetwork); - $endpointSeverity = Severity::SEVERITY_UNSPECIFIED; - $endpoint->setSeverity($endpointSeverity); - $response = $gapicClient->createEndpoint($formattedParent, $endpointId, $endpoint); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.ids.v1.IDS/CreateEndpoint', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEndpointId(); - $this->assertProtobufEquals($endpointId, $actualValue); - $actualValue = $actualApiRequestObject->getEndpoint(); - $this->assertProtobufEquals($endpoint, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEndpointTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEndpointExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEndpointTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $endpointId = 'endpointId-1135808507'; - $endpoint = new Endpoint(); - $endpointNetwork = 'endpointNetwork1670861529'; - $endpoint->setNetwork($endpointNetwork); - $endpointSeverity = Severity::SEVERITY_UNSPECIFIED; - $endpoint->setSeverity($endpointSeverity); - $response = $gapicClient->createEndpoint($formattedParent, $endpointId, $endpoint); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEndpointTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEndpointTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEndpointTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteEndpointTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); - $response = $gapicClient->deleteEndpoint($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.ids.v1.IDS/DeleteEndpoint', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEndpointTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEndpointExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEndpointTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); - $response = $gapicClient->deleteEndpoint($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEndpointTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getEndpointTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $network = 'network1843485230'; - $endpointForwardingRule = 'endpointForwardingRule-1878786988'; - $endpointIp = 'endpointIp-1135808495'; - $description = 'description-1724546052'; - $trafficLogs = false; - $expectedResponse = new Endpoint(); - $expectedResponse->setName($name2); - $expectedResponse->setNetwork($network); - $expectedResponse->setEndpointForwardingRule($endpointForwardingRule); - $expectedResponse->setEndpointIp($endpointIp); - $expectedResponse->setDescription($description); - $expectedResponse->setTrafficLogs($trafficLogs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); - $response = $gapicClient->getEndpoint($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.ids.v1.IDS/GetEndpoint', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEndpointExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]'); - try { - $gapicClient->getEndpoint($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 listEndpointsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $endpointsElement = new Endpoint(); - $endpoints = [ - $endpointsElement, - ]; - $expectedResponse = new ListEndpointsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEndpoints($endpoints); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listEndpoints($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEndpoints()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.ids.v1.IDS/ListEndpoints', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEndpointsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listEndpoints($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()); - } -} diff --git a/owl-bot-staging/Iot/v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/DeviceManager.php b/owl-bot-staging/Iot/v1/proto/src/GPBMetadata/Google/Cloud/Iot/V1/DeviceManager.php deleted file mode 100644 index f2365a62713902b45b9c3047a8737baaeb97a46d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9166 zcmc&)-)|gO74F!<)YndvTnF2+AsJ6f<51})HyuM5v;#(o9=v#YwxJ`7=cSE=A*7dDswMu-w>^3~R zPW+s%FWuMQxWA#_TDrS21*(DD^vk56*Ic(&C;4*SZC3KO8|HVecR>Mt%?;|#bu^nT%`KNyKY!~c;z}m<+>FF`VzCV!p)#}kq-a7 z=2qP<>p^IR@aJVaDA|r3+E(5E0faHHSFL(Lz`{YNB|1OyG}@a$Ep{XNKp1|FLeD?5G@pHB#iK*zf4~g%TjZ8RiEZQ777QP zoYzCYN#d*Px=+HU?_6hoQv>_a|B4E@OwTTwj^k1kTqh_L+A+0Fq$w`eZQ_L8>D;zS zy|O^ItsUF-yHi~wf-9MwjFX`#)w>AtuGIh<72(gS3uM{L?yu17RxKh6r0Q0~3%gh` zQe_CQSivK;w~U{cZrFm2W~CC5?>1EEbVL_Qo(t&LH_>#~(!?WNGRKNI2SuFQxiT>( z)Gg13>ZXk0g*QQ8u`5CUgn0=`JTcywMoO0)|p69}QRLddonw41=6lE?BW zo=+s7C!S4;XRPNy`Q`~thftKwDtgG>Zvg0A!uXYjCKr7IEs^)0HBz&K(BE4l-*1v2 z#IK_P&+-9_aZT5z2Ny2>%k2A)c^*yG-7+u59CrXv3v$ps^Y_F9Y@!pQFZ#mhcpump znmaF467c7e>o4@fLdF^zUnXJliS+C>bc{Aw;ny_t%Ro84K>*cu+apM1eg;NOqt_cR976s$7u2%q%;AdO#%ty zb0qi_8uVblD+RCk(rF+%L8(0xRl@qS7fV;6l{?Lgo`Cnxv@I+f%Jcn4YS&xj2k zLnj>aPFRX9OnEkF{7^$9Np5paU+ds>X71q2Xn?yaz@L=h#~X=YGDrU%bTYUk~7O(g9dq@%i~0ORY1A3ya@a@Xgt*rR%l;C!_tdz&*N?Kr8)hu#Wz6i z&I@=7jlnGHmTlhOOVW&8VXPYj5gm;tL?X<1$=`Wl;YBo1wd*iQ8pR?SN#stH{Ve(- zSChqlSTUs+`4bK4D{jTE?k&=Zdc$2}GxVbCRPCBFLV}q+gH7 zUS_CBz^9aCh~sCJ(OBF3It<_Kjia|HpulJp^rQe?p2x6`#t$wceE&K+F32TR_{N~- zF?XH0X*@;~>%^%nx(zs$MYMQ6LUd%Ede5^?Yc*(YRo!}p_+s1p3Yt_pzymXWtf7eo z+o^D$H(XJ|(!t(a+ZaNf70Z~3N70~w5-OQ(&785|sL~PP=ub3s_JIRz7p~s+-NygV z*(r1`)fw*a+()mV;~Z6Skj8)2(COqLz=vFXSy=%pQIVI4EVHZe){j1W_I{sf;`wS47Jcr%(I`4GqWZ5>G3gh>J*f51T8D?=Z&}jB7`iYLei2PKTf% zP6RFUc%oMEKQuHLl^*`8(%tBJCSQN5F=roR?rc^vOHZLHHy5$V0?n*j^WCOLdzJ_{ zR@y)7L&NcUO-V^yBvY6l^Dv)kb2no}oVj*mp32;8uFc))$&?~`X|rWw4oRX9{1Rvy zFYXjf;vy20w7OqrNiWRwoOIcW|E-~+c98}+lC{JkVa4=r?cJw+7F zuA7%>+LyU+_l>{wp);w+1N=2*Ri?^IJTeTTnJ>!F@o(VzZUf#X(4dLmumgIh614Y5k@SNiGX9GlsaHt~;(x+1 z`9L#nv1*o1WTOLIN_2Qhky$t1=-O6{6iTBl^R#qr){BAi&ptGwxHrIg2|;4$R!Buu?%F{AZ5vQ_WanaAcox_6x8NcU~4zWY>(9E=|RlskYfNC&f{weUT(@ zAnXeMTOS%rxr4#4Dp{H$Epb#24yj54%TGC$A8MjwcY|e9eV;|~d}zGcJD%xw565&O z{L~y{g?;eN<=@S3Z-=256!Q7q-Ccoi^tRP%hTHsGluKUS3ahT)n9U>(3oX2j#^8;u zDrF0JDgG(SD*ZNORoi@xzf=W{y5-bzu3yX7h{G-_^6mGniEm@B!$O~H+SUM*di6r| d+J2UQ6B7G`gw6%GkB?ioPx2)Qb{(a?Rq)8~BWr_an+U%N*x+*S6e zO+B5_p3)sD?1(C^=P<``ETuc__o=5C&arD+)XOSLxvtdeZAC3t+IJA@J44T)1!dqk z1B>Pi%Nh1^ro(b4k8&QByM9*a1F-dD>btr@mHo!w>o9&8=mPh$7`Typ)jCqOdDU>eh?hX z)tP-|TiRGCykq2Zg?U3deY&D}lnp)mnXsEHI2}KABB(05W+!B(P?$J0!AGISKDA8@ z1JjS)_s2F}qtimthki6h@b~bA8L(CC^~U7vVd89$-QmvNhu?0&-S@~CvMzk{t(zd=9GuNKf!w30it@5cio%(8i^pFJMEQWH@%;9B8`n zRw9#^BEN*|(@3A%Jqab3LRaBh*K&-vw3l8-;iZYcp67T{3tXz@A*@M~1V~0Y9TzYX za*H{Tm5ECp!J>3By&`1pgfi3F6~<7oL2__akeN;igfauc5255UShk#jW?|f{^mPO! z^B+cns?MOwg~&5lIu1HvdQIfkgGhkPt!&seRhxMu%+2HgkNr^}X@P5LVQ3~&#l93R z3E#GIuyR&e9OmEBQBV^raP>sDhCxvj=Dvs({6C5=+!AE*N|XhlyQZJT>me7^RSlE* z2Wl`s_jB-cn!`wAyLN0`3m;GMau}FC^Gu4X!Sm=e*Avx=OY-3~^S>CZoUxlcg+%Bx z8@W{2o6JXtCP21Pj+9_M#OXtJq#^4^PEQnlGXL=`!ip%4RG~CcAT3f(Hw^0gw5NqC zgLbh@UcgqggsA)l5uO>9pZV7UBqf(k$=3rY%)TjU4pPBSgGi@OBVAK@ zW2sG{WLA(m+!PtFMQ9BAR1XDLAj_TLI8RGmx>~D05C;O0f-=! z+IrW*43rIu-(<=Btw_T;ScHdbnxYFe36kGm69-F8b=bTpg>J%{KkW7$t4BTUSZBr& z^@F<=w{U{PU5z=eX=viw6_;@4F>GFxLNibfkdWm`SjbDbAqPbb8=7WNFDMS#EaLg- z4%-m33&l$gJ>|_X z@IDKG!SaIpoKF|ChkzW!=})fdjpT)RY40E(z`Ab^Y@B#Js_E9i@l1AfoW6=DEt5@H zogziF&PBeF`6UJ$QNEL}VX^Oc7{Q>&<|4Bz3c4p?WF4z(!ezih5fVQkfm%<}CZ?=- z{*y@E(M)Il6N8lOkyAl`0Wk4ToE6V+M{1o|JdW$Z6+VIpw#8K?8Rz`W4AHsd_zu=1 zbd$&Dc)T~;s(`%UIu=7|=D#sW1Rl%D1e5E8dOqH&A~^Hp39N}eqzzqss|vN(4nV4+s8sVN}Ka8+$K>&?^#!Np2# zub#Ta7t8AItNqmWP6guA1Iynay^oH5TYRIn-!#rU9EWScF8aC(aXdo{7v^^U9fP$% z*VOcK7jB0di?7-T+M(J$sF%;#y8)?Ut5q*mitP&OtkF80HcW`d+=^~a8zmUCc~F?zrnvNG-BUB4PGAyj-}g!tm6%G18U=#z?|G< wus-uSgoogle.cloud.iot.v1.BindDeviceToGatewayRequest - */ -class BindDeviceToGatewayRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * - * Generated from protobuf field string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $gateway_id = ''; - /** - * Required. The device to associate with the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * - * Generated from protobuf field string device_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $device_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @type string $gateway_id - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * @type string $device_id - * Required. The device to associate with the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated 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 registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * - * Generated from protobuf field string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGatewayId() - { - return $this->gateway_id; - } - - /** - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * - * 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. The device to associate with the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * - * Generated from protobuf field string device_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDeviceId() - { - return $this->device_id; - } - - /** - * Required. The device to associate with the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * - * Generated from protobuf field string device_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDeviceId($var) - { - GPBUtil::checkString($var, True); - $this->device_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/BindDeviceToGatewayResponse.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/BindDeviceToGatewayResponse.php deleted file mode 100644 index 7a15086995cc..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/BindDeviceToGatewayResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.iot.v1.BindDeviceToGatewayResponse - */ -class BindDeviceToGatewayResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRegistryRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRegistryRequest.php deleted file mode 100644 index c8cfb29ffeed..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRegistryRequest.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.iot.v1.CreateDeviceRegistryRequest - */ -class CreateDeviceRegistryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and cloud region where this device registry must be created. - * For example, `projects/example-project/locations/us-central1`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The device registry. The field `name` must be empty. The server will - * generate that field from the device registry `id` provided and the - * `parent` field. - * - * Generated from protobuf field .google.cloud.iot.v1.DeviceRegistry device_registry = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $device_registry = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and cloud region where this device registry must be created. - * For example, `projects/example-project/locations/us-central1`. - * @type \Google\Cloud\Iot\V1\DeviceRegistry $device_registry - * Required. The device registry. The field `name` must be empty. The server will - * generate that field from the device registry `id` provided and the - * `parent` field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and cloud region where this device registry must be created. - * For example, `projects/example-project/locations/us-central1`. - * - * Generated 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 cloud region where this device registry must be created. - * For example, `projects/example-project/locations/us-central1`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 device registry. The field `name` must be empty. The server will - * generate that field from the device registry `id` provided and the - * `parent` field. - * - * Generated from protobuf field .google.cloud.iot.v1.DeviceRegistry device_registry = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iot\V1\DeviceRegistry|null - */ - public function getDeviceRegistry() - { - return $this->device_registry; - } - - public function hasDeviceRegistry() - { - return isset($this->device_registry); - } - - public function clearDeviceRegistry() - { - unset($this->device_registry); - } - - /** - * Required. The device registry. The field `name` must be empty. The server will - * generate that field from the device registry `id` provided and the - * `parent` field. - * - * Generated from protobuf field .google.cloud.iot.v1.DeviceRegistry device_registry = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iot\V1\DeviceRegistry $var - * @return $this - */ - public function setDeviceRegistry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\DeviceRegistry::class); - $this->device_registry = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRequest.php deleted file mode 100644 index d3453055311e..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/CreateDeviceRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.iot.v1.CreateDeviceRequest - */ -class CreateDeviceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the device registry where this device should be created. - * For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The device registration details. The field `name` must be empty. The server - * generates `name` from the device registry `id` and the - * `parent` field. - * - * Generated from protobuf field .google.cloud.iot.v1.Device device = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $device = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the device registry where this device should be created. - * For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @type \Google\Cloud\Iot\V1\Device $device - * Required. The device registration details. The field `name` must be empty. The server - * generates `name` from the device registry `id` and the - * `parent` field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the device registry where this device should be created. - * For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated 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 device registry where this device should be created. - * For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 device registration details. The field `name` must be empty. The server - * generates `name` from the device registry `id` and the - * `parent` field. - * - * Generated from protobuf field .google.cloud.iot.v1.Device device = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iot\V1\Device|null - */ - public function getDevice() - { - return $this->device; - } - - public function hasDevice() - { - return isset($this->device); - } - - public function clearDevice() - { - unset($this->device); - } - - /** - * Required. The device registration details. The field `name` must be empty. The server - * generates `name` from the device registry `id` and the - * `parent` field. - * - * Generated from protobuf field .google.cloud.iot.v1.Device device = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iot\V1\Device $var - * @return $this - */ - public function setDevice($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\Device::class); - $this->device = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRegistryRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRegistryRequest.php deleted file mode 100644 index 1320cdd106cc..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRegistryRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.iot.v1.DeleteDeviceRegistryRequest - */ -class DeleteDeviceRegistryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * 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 name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated 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 device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRequest.php deleted file mode 100644 index 469fde59413a..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeleteDeviceRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.iot.v1.DeleteDeviceRequest - */ -class DeleteDeviceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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/Iot/v1/proto/src/Google/Cloud/Iot/V1/Device.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/Device.php deleted file mode 100644 index c00d28ef0a92..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/Device.php +++ /dev/null @@ -1,891 +0,0 @@ -google.cloud.iot.v1.Device - */ -class Device extends \Google\Protobuf\Internal\Message -{ - /** - * The user-defined device identifier. The device ID must be unique - * within a device registry. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * The resource path name. For example, - * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or - * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. - * When `name` is populated as a response from the service, it always ends - * in the device numeric ID. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - /** - * [Output only] A server-defined unique numeric ID for the device. This is a - * more compact way to identify devices, and it is globally unique. - * - * Generated from protobuf field uint64 num_id = 3; - */ - protected $num_id = 0; - /** - * The credentials used to authenticate this device. To allow credential - * rotation without interruption, multiple device credentials can be bound to - * this device. No more than 3 credentials can be bound to a single device at - * a time. When new credentials are added to a device, they are verified - * against the registry credentials. For details, see the description of the - * `DeviceRegistry.credentials` field. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceCredential credentials = 12; - */ - private $credentials; - /** - * [Output only] The last time an MQTT `PINGREQ` was received. This field - * applies only to devices connecting through MQTT. MQTT clients usually only - * send `PINGREQ` messages if the connection is idle, and no other messages - * have been sent. Timestamps are periodically collected and written to - * storage; they may be stale by a few minutes. - * - * Generated from protobuf field .google.protobuf.Timestamp last_heartbeat_time = 7; - */ - protected $last_heartbeat_time = null; - /** - * [Output only] The last time a telemetry event was received. Timestamps are - * periodically collected and written to storage; they may be stale by a few - * minutes. - * - * Generated from protobuf field .google.protobuf.Timestamp last_event_time = 8; - */ - protected $last_event_time = null; - /** - * [Output only] The last time a state event was received. Timestamps are - * periodically collected and written to storage; they may be stale by a few - * minutes. - * - * Generated from protobuf field .google.protobuf.Timestamp last_state_time = 20; - */ - protected $last_state_time = null; - /** - * [Output only] The last time a cloud-to-device config version acknowledgment - * was received from the device. This field is only for configurations - * sent through MQTT. - * - * Generated from protobuf field .google.protobuf.Timestamp last_config_ack_time = 14; - */ - protected $last_config_ack_time = null; - /** - * [Output only] The last time a cloud-to-device config version was sent to - * the device. - * - * Generated from protobuf field .google.protobuf.Timestamp last_config_send_time = 18; - */ - protected $last_config_send_time = null; - /** - * If a device is blocked, connections or requests from this device will fail. - * Can be used to temporarily prevent the device from connecting if, for - * example, the sensor is generating bad data and needs maintenance. - * - * Generated from protobuf field bool blocked = 19; - */ - protected $blocked = false; - /** - * [Output only] The time the most recent error occurred, such as a failure to - * publish to Cloud Pub/Sub. This field is the timestamp of - * 'last_error_status'. - * - * Generated from protobuf field .google.protobuf.Timestamp last_error_time = 10; - */ - protected $last_error_time = null; - /** - * [Output only] The error message of the most recent error, such as a failure - * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this - * field. If no errors have occurred, this field has an empty message - * and the status code 0 == OK. Otherwise, this field is expected to have a - * status code other than OK. - * - * Generated from protobuf field .google.rpc.Status last_error_status = 11; - */ - protected $last_error_status = null; - /** - * The most recent device configuration, which is eventually sent from - * Cloud IoT Core to the device. If not present on creation, the - * configuration will be initialized with an empty payload and version value - * of `1`. To update this field after creation, use the - * `DeviceManager.ModifyCloudToDeviceConfig` method. - * - * Generated from protobuf field .google.cloud.iot.v1.DeviceConfig config = 13; - */ - protected $config = null; - /** - * [Output only] The state most recently received from the device. If no state - * has been reported, this field is not present. - * - * Generated from protobuf field .google.cloud.iot.v1.DeviceState state = 16; - */ - protected $state = null; - /** - * **Beta Feature** - * The logging verbosity for device activity. If unspecified, - * DeviceRegistry.log_level will be used. - * - * Generated from protobuf field .google.cloud.iot.v1.LogLevel log_level = 21; - */ - protected $log_level = 0; - /** - * The metadata key-value pairs assigned to the device. This metadata is not - * interpreted or indexed by Cloud IoT Core. It can be used to add contextual - * information for the device. - * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and - * be less than 128 bytes in length. - * Values are free-form strings. Each value must be less than or equal to 32 - * KB in size. - * The total size of all keys and values must be less than 256 KB, and the - * maximum number of key-value pairs is 500. - * - * Generated from protobuf field map metadata = 17; - */ - private $metadata; - /** - * Gateway-related configuration and state. - * - * Generated from protobuf field .google.cloud.iot.v1.GatewayConfig gateway_config = 24; - */ - protected $gateway_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The user-defined device identifier. The device ID must be unique - * within a device registry. - * @type string $name - * The resource path name. For example, - * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or - * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. - * When `name` is populated as a response from the service, it always ends - * in the device numeric ID. - * @type int|string $num_id - * [Output only] A server-defined unique numeric ID for the device. This is a - * more compact way to identify devices, and it is globally unique. - * @type array<\Google\Cloud\Iot\V1\DeviceCredential>|\Google\Protobuf\Internal\RepeatedField $credentials - * The credentials used to authenticate this device. To allow credential - * rotation without interruption, multiple device credentials can be bound to - * this device. No more than 3 credentials can be bound to a single device at - * a time. When new credentials are added to a device, they are verified - * against the registry credentials. For details, see the description of the - * `DeviceRegistry.credentials` field. - * @type \Google\Protobuf\Timestamp $last_heartbeat_time - * [Output only] The last time an MQTT `PINGREQ` was received. This field - * applies only to devices connecting through MQTT. MQTT clients usually only - * send `PINGREQ` messages if the connection is idle, and no other messages - * have been sent. Timestamps are periodically collected and written to - * storage; they may be stale by a few minutes. - * @type \Google\Protobuf\Timestamp $last_event_time - * [Output only] The last time a telemetry event was received. Timestamps are - * periodically collected and written to storage; they may be stale by a few - * minutes. - * @type \Google\Protobuf\Timestamp $last_state_time - * [Output only] The last time a state event was received. Timestamps are - * periodically collected and written to storage; they may be stale by a few - * minutes. - * @type \Google\Protobuf\Timestamp $last_config_ack_time - * [Output only] The last time a cloud-to-device config version acknowledgment - * was received from the device. This field is only for configurations - * sent through MQTT. - * @type \Google\Protobuf\Timestamp $last_config_send_time - * [Output only] The last time a cloud-to-device config version was sent to - * the device. - * @type bool $blocked - * If a device is blocked, connections or requests from this device will fail. - * Can be used to temporarily prevent the device from connecting if, for - * example, the sensor is generating bad data and needs maintenance. - * @type \Google\Protobuf\Timestamp $last_error_time - * [Output only] The time the most recent error occurred, such as a failure to - * publish to Cloud Pub/Sub. This field is the timestamp of - * 'last_error_status'. - * @type \Google\Rpc\Status $last_error_status - * [Output only] The error message of the most recent error, such as a failure - * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this - * field. If no errors have occurred, this field has an empty message - * and the status code 0 == OK. Otherwise, this field is expected to have a - * status code other than OK. - * @type \Google\Cloud\Iot\V1\DeviceConfig $config - * The most recent device configuration, which is eventually sent from - * Cloud IoT Core to the device. If not present on creation, the - * configuration will be initialized with an empty payload and version value - * of `1`. To update this field after creation, use the - * `DeviceManager.ModifyCloudToDeviceConfig` method. - * @type \Google\Cloud\Iot\V1\DeviceState $state - * [Output only] The state most recently received from the device. If no state - * has been reported, this field is not present. - * @type int $log_level - * **Beta Feature** - * The logging verbosity for device activity. If unspecified, - * DeviceRegistry.log_level will be used. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * The metadata key-value pairs assigned to the device. This metadata is not - * interpreted or indexed by Cloud IoT Core. It can be used to add contextual - * information for the device. - * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and - * be less than 128 bytes in length. - * Values are free-form strings. Each value must be less than or equal to 32 - * KB in size. - * The total size of all keys and values must be less than 256 KB, and the - * maximum number of key-value pairs is 500. - * @type \Google\Cloud\Iot\V1\GatewayConfig $gateway_config - * Gateway-related configuration and state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The user-defined device identifier. The device ID must be unique - * within a device registry. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The user-defined device identifier. The device ID must be unique - * within a device registry. - * - * 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 resource path name. For example, - * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or - * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. - * When `name` is populated as a response from the service, it always ends - * in the device numeric ID. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource path name. For example, - * `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or - * `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. - * When `name` is populated as a response from the service, it always ends - * in the device numeric ID. - * - * 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; - } - - /** - * [Output only] A server-defined unique numeric ID for the device. This is a - * more compact way to identify devices, and it is globally unique. - * - * Generated from protobuf field uint64 num_id = 3; - * @return int|string - */ - public function getNumId() - { - return $this->num_id; - } - - /** - * [Output only] A server-defined unique numeric ID for the device. This is a - * more compact way to identify devices, and it is globally unique. - * - * Generated from protobuf field uint64 num_id = 3; - * @param int|string $var - * @return $this - */ - public function setNumId($var) - { - GPBUtil::checkUint64($var); - $this->num_id = $var; - - return $this; - } - - /** - * The credentials used to authenticate this device. To allow credential - * rotation without interruption, multiple device credentials can be bound to - * this device. No more than 3 credentials can be bound to a single device at - * a time. When new credentials are added to a device, they are verified - * against the registry credentials. For details, see the description of the - * `DeviceRegistry.credentials` field. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceCredential credentials = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCredentials() - { - return $this->credentials; - } - - /** - * The credentials used to authenticate this device. To allow credential - * rotation without interruption, multiple device credentials can be bound to - * this device. No more than 3 credentials can be bound to a single device at - * a time. When new credentials are added to a device, they are verified - * against the registry credentials. For details, see the description of the - * `DeviceRegistry.credentials` field. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceCredential credentials = 12; - * @param array<\Google\Cloud\Iot\V1\DeviceCredential>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCredentials($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\DeviceCredential::class); - $this->credentials = $arr; - - return $this; - } - - /** - * [Output only] The last time an MQTT `PINGREQ` was received. This field - * applies only to devices connecting through MQTT. MQTT clients usually only - * send `PINGREQ` messages if the connection is idle, and no other messages - * have been sent. Timestamps are periodically collected and written to - * storage; they may be stale by a few minutes. - * - * Generated from protobuf field .google.protobuf.Timestamp last_heartbeat_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastHeartbeatTime() - { - return $this->last_heartbeat_time; - } - - public function hasLastHeartbeatTime() - { - return isset($this->last_heartbeat_time); - } - - public function clearLastHeartbeatTime() - { - unset($this->last_heartbeat_time); - } - - /** - * [Output only] The last time an MQTT `PINGREQ` was received. This field - * applies only to devices connecting through MQTT. MQTT clients usually only - * send `PINGREQ` messages if the connection is idle, and no other messages - * have been sent. Timestamps are periodically collected and written to - * storage; they may be stale by a few minutes. - * - * Generated from protobuf field .google.protobuf.Timestamp last_heartbeat_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastHeartbeatTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_heartbeat_time = $var; - - return $this; - } - - /** - * [Output only] The last time a telemetry event was received. Timestamps are - * periodically collected and written to storage; they may be stale by a few - * minutes. - * - * Generated from protobuf field .google.protobuf.Timestamp last_event_time = 8; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastEventTime() - { - return $this->last_event_time; - } - - public function hasLastEventTime() - { - return isset($this->last_event_time); - } - - public function clearLastEventTime() - { - unset($this->last_event_time); - } - - /** - * [Output only] The last time a telemetry event was received. Timestamps are - * periodically collected and written to storage; they may be stale by a few - * minutes. - * - * Generated from protobuf field .google.protobuf.Timestamp last_event_time = 8; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_event_time = $var; - - return $this; - } - - /** - * [Output only] The last time a state event was received. Timestamps are - * periodically collected and written to storage; they may be stale by a few - * minutes. - * - * Generated from protobuf field .google.protobuf.Timestamp last_state_time = 20; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastStateTime() - { - return $this->last_state_time; - } - - public function hasLastStateTime() - { - return isset($this->last_state_time); - } - - public function clearLastStateTime() - { - unset($this->last_state_time); - } - - /** - * [Output only] The last time a state event was received. Timestamps are - * periodically collected and written to storage; they may be stale by a few - * minutes. - * - * Generated from protobuf field .google.protobuf.Timestamp last_state_time = 20; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastStateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_state_time = $var; - - return $this; - } - - /** - * [Output only] The last time a cloud-to-device config version acknowledgment - * was received from the device. This field is only for configurations - * sent through MQTT. - * - * Generated from protobuf field .google.protobuf.Timestamp last_config_ack_time = 14; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastConfigAckTime() - { - return $this->last_config_ack_time; - } - - public function hasLastConfigAckTime() - { - return isset($this->last_config_ack_time); - } - - public function clearLastConfigAckTime() - { - unset($this->last_config_ack_time); - } - - /** - * [Output only] The last time a cloud-to-device config version acknowledgment - * was received from the device. This field is only for configurations - * sent through MQTT. - * - * Generated from protobuf field .google.protobuf.Timestamp last_config_ack_time = 14; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastConfigAckTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_config_ack_time = $var; - - return $this; - } - - /** - * [Output only] The last time a cloud-to-device config version was sent to - * the device. - * - * Generated from protobuf field .google.protobuf.Timestamp last_config_send_time = 18; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastConfigSendTime() - { - return $this->last_config_send_time; - } - - public function hasLastConfigSendTime() - { - return isset($this->last_config_send_time); - } - - public function clearLastConfigSendTime() - { - unset($this->last_config_send_time); - } - - /** - * [Output only] The last time a cloud-to-device config version was sent to - * the device. - * - * Generated from protobuf field .google.protobuf.Timestamp last_config_send_time = 18; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastConfigSendTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_config_send_time = $var; - - return $this; - } - - /** - * If a device is blocked, connections or requests from this device will fail. - * Can be used to temporarily prevent the device from connecting if, for - * example, the sensor is generating bad data and needs maintenance. - * - * Generated from protobuf field bool blocked = 19; - * @return bool - */ - public function getBlocked() - { - return $this->blocked; - } - - /** - * If a device is blocked, connections or requests from this device will fail. - * Can be used to temporarily prevent the device from connecting if, for - * example, the sensor is generating bad data and needs maintenance. - * - * Generated from protobuf field bool blocked = 19; - * @param bool $var - * @return $this - */ - public function setBlocked($var) - { - GPBUtil::checkBool($var); - $this->blocked = $var; - - return $this; - } - - /** - * [Output only] The time the most recent error occurred, such as a failure to - * publish to Cloud Pub/Sub. This field is the timestamp of - * 'last_error_status'. - * - * Generated from protobuf field .google.protobuf.Timestamp last_error_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastErrorTime() - { - return $this->last_error_time; - } - - public function hasLastErrorTime() - { - return isset($this->last_error_time); - } - - public function clearLastErrorTime() - { - unset($this->last_error_time); - } - - /** - * [Output only] The time the most recent error occurred, such as a failure to - * publish to Cloud Pub/Sub. This field is the timestamp of - * 'last_error_status'. - * - * Generated from protobuf field .google.protobuf.Timestamp last_error_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastErrorTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_error_time = $var; - - return $this; - } - - /** - * [Output only] The error message of the most recent error, such as a failure - * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this - * field. If no errors have occurred, this field has an empty message - * and the status code 0 == OK. Otherwise, this field is expected to have a - * status code other than OK. - * - * Generated from protobuf field .google.rpc.Status last_error_status = 11; - * @return \Google\Rpc\Status|null - */ - public function getLastErrorStatus() - { - return $this->last_error_status; - } - - public function hasLastErrorStatus() - { - return isset($this->last_error_status); - } - - public function clearLastErrorStatus() - { - unset($this->last_error_status); - } - - /** - * [Output only] The error message of the most recent error, such as a failure - * to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this - * field. If no errors have occurred, this field has an empty message - * and the status code 0 == OK. Otherwise, this field is expected to have a - * status code other than OK. - * - * Generated from protobuf field .google.rpc.Status last_error_status = 11; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setLastErrorStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->last_error_status = $var; - - return $this; - } - - /** - * The most recent device configuration, which is eventually sent from - * Cloud IoT Core to the device. If not present on creation, the - * configuration will be initialized with an empty payload and version value - * of `1`. To update this field after creation, use the - * `DeviceManager.ModifyCloudToDeviceConfig` method. - * - * Generated from protobuf field .google.cloud.iot.v1.DeviceConfig config = 13; - * @return \Google\Cloud\Iot\V1\DeviceConfig|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * The most recent device configuration, which is eventually sent from - * Cloud IoT Core to the device. If not present on creation, the - * configuration will be initialized with an empty payload and version value - * of `1`. To update this field after creation, use the - * `DeviceManager.ModifyCloudToDeviceConfig` method. - * - * Generated from protobuf field .google.cloud.iot.v1.DeviceConfig config = 13; - * @param \Google\Cloud\Iot\V1\DeviceConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\DeviceConfig::class); - $this->config = $var; - - return $this; - } - - /** - * [Output only] The state most recently received from the device. If no state - * has been reported, this field is not present. - * - * Generated from protobuf field .google.cloud.iot.v1.DeviceState state = 16; - * @return \Google\Cloud\Iot\V1\DeviceState|null - */ - public function getState() - { - return $this->state; - } - - public function hasState() - { - return isset($this->state); - } - - public function clearState() - { - unset($this->state); - } - - /** - * [Output only] The state most recently received from the device. If no state - * has been reported, this field is not present. - * - * Generated from protobuf field .google.cloud.iot.v1.DeviceState state = 16; - * @param \Google\Cloud\Iot\V1\DeviceState $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\DeviceState::class); - $this->state = $var; - - return $this; - } - - /** - * **Beta Feature** - * The logging verbosity for device activity. If unspecified, - * DeviceRegistry.log_level will be used. - * - * Generated from protobuf field .google.cloud.iot.v1.LogLevel log_level = 21; - * @return int - */ - public function getLogLevel() - { - return $this->log_level; - } - - /** - * **Beta Feature** - * The logging verbosity for device activity. If unspecified, - * DeviceRegistry.log_level will be used. - * - * Generated from protobuf field .google.cloud.iot.v1.LogLevel log_level = 21; - * @param int $var - * @return $this - */ - public function setLogLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\LogLevel::class); - $this->log_level = $var; - - return $this; - } - - /** - * The metadata key-value pairs assigned to the device. This metadata is not - * interpreted or indexed by Cloud IoT Core. It can be used to add contextual - * information for the device. - * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and - * be less than 128 bytes in length. - * Values are free-form strings. Each value must be less than or equal to 32 - * KB in size. - * The total size of all keys and values must be less than 256 KB, and the - * maximum number of key-value pairs is 500. - * - * Generated from protobuf field map metadata = 17; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * The metadata key-value pairs assigned to the device. This metadata is not - * interpreted or indexed by Cloud IoT Core. It can be used to add contextual - * information for the device. - * Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and - * be less than 128 bytes in length. - * Values are free-form strings. Each value must be less than or equal to 32 - * KB in size. - * The total size of all keys and values must be less than 256 KB, and the - * maximum number of key-value pairs is 500. - * - * Generated from protobuf field map metadata = 17; - * @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; - } - - /** - * Gateway-related configuration and state. - * - * Generated from protobuf field .google.cloud.iot.v1.GatewayConfig gateway_config = 24; - * @return \Google\Cloud\Iot\V1\GatewayConfig|null - */ - public function getGatewayConfig() - { - return $this->gateway_config; - } - - public function hasGatewayConfig() - { - return isset($this->gateway_config); - } - - public function clearGatewayConfig() - { - unset($this->gateway_config); - } - - /** - * Gateway-related configuration and state. - * - * Generated from protobuf field .google.cloud.iot.v1.GatewayConfig gateway_config = 24; - * @param \Google\Cloud\Iot\V1\GatewayConfig $var - * @return $this - */ - public function setGatewayConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\GatewayConfig::class); - $this->gateway_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceConfig.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceConfig.php deleted file mode 100644 index 0c1ebe6f38ee..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceConfig.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.iot.v1.DeviceConfig - */ -class DeviceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * [Output only] The version of this update. The version number is assigned by - * the server, and is always greater than 0 after device creation. The - * version must be 0 on the `CreateDevice` request if a `config` is - * specified; the response of `CreateDevice` will always have a value of 1. - * - * Generated from protobuf field int64 version = 1; - */ - protected $version = 0; - /** - * [Output only] The time at which this configuration version was updated in - * Cloud IoT Core. This timestamp is set by the server. - * - * Generated from protobuf field .google.protobuf.Timestamp cloud_update_time = 2; - */ - protected $cloud_update_time = null; - /** - * [Output only] The time at which Cloud IoT Core received the - * acknowledgment from the device, indicating that the device has received - * this configuration version. If this field is not present, the device has - * not yet acknowledged that it received this version. Note that when - * the config was sent to the device, many config versions may have been - * available in Cloud IoT Core while the device was disconnected, and on - * connection, only the latest version is sent to the device. Some - * versions may never be sent to the device, and therefore are never - * acknowledged. This timestamp is set by Cloud IoT Core. - * - * Generated from protobuf field .google.protobuf.Timestamp device_ack_time = 3; - */ - protected $device_ack_time = null; - /** - * The device configuration data. - * - * Generated from protobuf field bytes binary_data = 4; - */ - protected $binary_data = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $version - * [Output only] The version of this update. The version number is assigned by - * the server, and is always greater than 0 after device creation. The - * version must be 0 on the `CreateDevice` request if a `config` is - * specified; the response of `CreateDevice` will always have a value of 1. - * @type \Google\Protobuf\Timestamp $cloud_update_time - * [Output only] The time at which this configuration version was updated in - * Cloud IoT Core. This timestamp is set by the server. - * @type \Google\Protobuf\Timestamp $device_ack_time - * [Output only] The time at which Cloud IoT Core received the - * acknowledgment from the device, indicating that the device has received - * this configuration version. If this field is not present, the device has - * not yet acknowledged that it received this version. Note that when - * the config was sent to the device, many config versions may have been - * available in Cloud IoT Core while the device was disconnected, and on - * connection, only the latest version is sent to the device. Some - * versions may never be sent to the device, and therefore are never - * acknowledged. This timestamp is set by Cloud IoT Core. - * @type string $binary_data - * The device configuration data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * [Output only] The version of this update. The version number is assigned by - * the server, and is always greater than 0 after device creation. The - * version must be 0 on the `CreateDevice` request if a `config` is - * specified; the response of `CreateDevice` will always have a value of 1. - * - * Generated from protobuf field int64 version = 1; - * @return int|string - */ - public function getVersion() - { - return $this->version; - } - - /** - * [Output only] The version of this update. The version number is assigned by - * the server, and is always greater than 0 after device creation. The - * version must be 0 on the `CreateDevice` request if a `config` is - * specified; the response of `CreateDevice` will always have a value of 1. - * - * Generated from protobuf field int64 version = 1; - * @param int|string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkInt64($var); - $this->version = $var; - - return $this; - } - - /** - * [Output only] The time at which this configuration version was updated in - * Cloud IoT Core. This timestamp is set by the server. - * - * Generated from protobuf field .google.protobuf.Timestamp cloud_update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCloudUpdateTime() - { - return $this->cloud_update_time; - } - - public function hasCloudUpdateTime() - { - return isset($this->cloud_update_time); - } - - public function clearCloudUpdateTime() - { - unset($this->cloud_update_time); - } - - /** - * [Output only] The time at which this configuration version was updated in - * Cloud IoT Core. This timestamp is set by the server. - * - * Generated from protobuf field .google.protobuf.Timestamp cloud_update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCloudUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->cloud_update_time = $var; - - return $this; - } - - /** - * [Output only] The time at which Cloud IoT Core received the - * acknowledgment from the device, indicating that the device has received - * this configuration version. If this field is not present, the device has - * not yet acknowledged that it received this version. Note that when - * the config was sent to the device, many config versions may have been - * available in Cloud IoT Core while the device was disconnected, and on - * connection, only the latest version is sent to the device. Some - * versions may never be sent to the device, and therefore are never - * acknowledged. This timestamp is set by Cloud IoT Core. - * - * Generated from protobuf field .google.protobuf.Timestamp device_ack_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeviceAckTime() - { - return $this->device_ack_time; - } - - public function hasDeviceAckTime() - { - return isset($this->device_ack_time); - } - - public function clearDeviceAckTime() - { - unset($this->device_ack_time); - } - - /** - * [Output only] The time at which Cloud IoT Core received the - * acknowledgment from the device, indicating that the device has received - * this configuration version. If this field is not present, the device has - * not yet acknowledged that it received this version. Note that when - * the config was sent to the device, many config versions may have been - * available in Cloud IoT Core while the device was disconnected, and on - * connection, only the latest version is sent to the device. Some - * versions may never be sent to the device, and therefore are never - * acknowledged. This timestamp is set by Cloud IoT Core. - * - * Generated from protobuf field .google.protobuf.Timestamp device_ack_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeviceAckTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->device_ack_time = $var; - - return $this; - } - - /** - * The device configuration data. - * - * Generated from protobuf field bytes binary_data = 4; - * @return string - */ - public function getBinaryData() - { - return $this->binary_data; - } - - /** - * The device configuration data. - * - * Generated from protobuf field bytes binary_data = 4; - * @param string $var - * @return $this - */ - public function setBinaryData($var) - { - GPBUtil::checkString($var, False); - $this->binary_data = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceCredential.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceCredential.php deleted file mode 100644 index 36b02b997a45..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceCredential.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.iot.v1.DeviceCredential - */ -class DeviceCredential extends \Google\Protobuf\Internal\Message -{ - /** - * [Optional] The time at which this credential becomes invalid. This - * credential will be ignored for new client authentication requests after - * this timestamp; however, it will not be automatically deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; - */ - protected $expiration_time = null; - protected $credential; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iot\V1\PublicKeyCredential $public_key - * A public key used to verify the signature of JSON Web Tokens (JWTs). - * When adding a new device credential, either via device creation or via - * modifications, this public key credential may be required to be signed by - * one of the registry level certificates. More specifically, if the - * registry contains at least one certificate, any new device credential - * must be signed by one of the registry certificates. As a result, - * when the registry contains certificates, only X.509 certificates are - * accepted as device credentials. However, if the registry does - * not contain a certificate, self-signed certificates and public keys will - * be accepted. New device credentials must be different from every - * registry-level certificate. - * @type \Google\Protobuf\Timestamp $expiration_time - * [Optional] The time at which this credential becomes invalid. This - * credential will be ignored for new client authentication requests after - * this timestamp; however, it will not be automatically deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A public key used to verify the signature of JSON Web Tokens (JWTs). - * When adding a new device credential, either via device creation or via - * modifications, this public key credential may be required to be signed by - * one of the registry level certificates. More specifically, if the - * registry contains at least one certificate, any new device credential - * must be signed by one of the registry certificates. As a result, - * when the registry contains certificates, only X.509 certificates are - * accepted as device credentials. However, if the registry does - * not contain a certificate, self-signed certificates and public keys will - * be accepted. New device credentials must be different from every - * registry-level certificate. - * - * Generated from protobuf field .google.cloud.iot.v1.PublicKeyCredential public_key = 2; - * @return \Google\Cloud\Iot\V1\PublicKeyCredential|null - */ - public function getPublicKey() - { - return $this->readOneof(2); - } - - public function hasPublicKey() - { - return $this->hasOneof(2); - } - - /** - * A public key used to verify the signature of JSON Web Tokens (JWTs). - * When adding a new device credential, either via device creation or via - * modifications, this public key credential may be required to be signed by - * one of the registry level certificates. More specifically, if the - * registry contains at least one certificate, any new device credential - * must be signed by one of the registry certificates. As a result, - * when the registry contains certificates, only X.509 certificates are - * accepted as device credentials. However, if the registry does - * not contain a certificate, self-signed certificates and public keys will - * be accepted. New device credentials must be different from every - * registry-level certificate. - * - * Generated from protobuf field .google.cloud.iot.v1.PublicKeyCredential public_key = 2; - * @param \Google\Cloud\Iot\V1\PublicKeyCredential $var - * @return $this - */ - public function setPublicKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\PublicKeyCredential::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * [Optional] The time at which this credential becomes invalid. This - * credential will be ignored for new client authentication requests after - * this timestamp; however, it will not be automatically deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpirationTime() - { - return $this->expiration_time; - } - - public function hasExpirationTime() - { - return isset($this->expiration_time); - } - - public function clearExpirationTime() - { - unset($this->expiration_time); - } - - /** - * [Optional] The time at which this credential becomes invalid. This - * credential will be ignored for new client authentication requests after - * this timestamp; however, it will not be automatically deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpirationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expiration_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getCredential() - { - return $this->whichOneof("credential"); - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceManagerGrpcClient.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceManagerGrpcClient.php deleted file mode 100644 index e129ea18c2d8..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceManagerGrpcClient.php +++ /dev/null @@ -1,341 +0,0 @@ -_simpleRequest('/google.cloud.iot.v1.DeviceManager/CreateDeviceRegistry', - $argument, - ['\Google\Cloud\Iot\V1\DeviceRegistry', 'decode'], - $metadata, $options); - } - - /** - * Gets a device registry configuration. - * @param \Google\Cloud\Iot\V1\GetDeviceRegistryRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetDeviceRegistry(\Google\Cloud\Iot\V1\GetDeviceRegistryRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/GetDeviceRegistry', - $argument, - ['\Google\Cloud\Iot\V1\DeviceRegistry', 'decode'], - $metadata, $options); - } - - /** - * Updates a device registry configuration. - * @param \Google\Cloud\Iot\V1\UpdateDeviceRegistryRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateDeviceRegistry(\Google\Cloud\Iot\V1\UpdateDeviceRegistryRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/UpdateDeviceRegistry', - $argument, - ['\Google\Cloud\Iot\V1\DeviceRegistry', 'decode'], - $metadata, $options); - } - - /** - * Deletes a device registry configuration. - * @param \Google\Cloud\Iot\V1\DeleteDeviceRegistryRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteDeviceRegistry(\Google\Cloud\Iot\V1\DeleteDeviceRegistryRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/DeleteDeviceRegistry', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Lists device registries. - * @param \Google\Cloud\Iot\V1\ListDeviceRegistriesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListDeviceRegistries(\Google\Cloud\Iot\V1\ListDeviceRegistriesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/ListDeviceRegistries', - $argument, - ['\Google\Cloud\Iot\V1\ListDeviceRegistriesResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates a device in a device registry. - * @param \Google\Cloud\Iot\V1\CreateDeviceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateDevice(\Google\Cloud\Iot\V1\CreateDeviceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/CreateDevice', - $argument, - ['\Google\Cloud\Iot\V1\Device', 'decode'], - $metadata, $options); - } - - /** - * Gets details about a device. - * @param \Google\Cloud\Iot\V1\GetDeviceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetDevice(\Google\Cloud\Iot\V1\GetDeviceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/GetDevice', - $argument, - ['\Google\Cloud\Iot\V1\Device', 'decode'], - $metadata, $options); - } - - /** - * Updates a device. - * @param \Google\Cloud\Iot\V1\UpdateDeviceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateDevice(\Google\Cloud\Iot\V1\UpdateDeviceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/UpdateDevice', - $argument, - ['\Google\Cloud\Iot\V1\Device', 'decode'], - $metadata, $options); - } - - /** - * Deletes a device. - * @param \Google\Cloud\Iot\V1\DeleteDeviceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteDevice(\Google\Cloud\Iot\V1\DeleteDeviceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/DeleteDevice', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * List devices in a device registry. - * @param \Google\Cloud\Iot\V1\ListDevicesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListDevices(\Google\Cloud\Iot\V1\ListDevicesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/ListDevices', - $argument, - ['\Google\Cloud\Iot\V1\ListDevicesResponse', 'decode'], - $metadata, $options); - } - - /** - * Modifies the configuration for the device, which is eventually sent from - * the Cloud IoT Core servers. Returns the modified configuration version and - * its metadata. - * @param \Google\Cloud\Iot\V1\ModifyCloudToDeviceConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ModifyCloudToDeviceConfig(\Google\Cloud\Iot\V1\ModifyCloudToDeviceConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/ModifyCloudToDeviceConfig', - $argument, - ['\Google\Cloud\Iot\V1\DeviceConfig', 'decode'], - $metadata, $options); - } - - /** - * Lists the last few versions of the device configuration in descending - * order (i.e.: newest first). - * @param \Google\Cloud\Iot\V1\ListDeviceConfigVersionsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListDeviceConfigVersions(\Google\Cloud\Iot\V1\ListDeviceConfigVersionsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/ListDeviceConfigVersions', - $argument, - ['\Google\Cloud\Iot\V1\ListDeviceConfigVersionsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists the last few versions of the device state in descending order (i.e.: - * newest first). - * @param \Google\Cloud\Iot\V1\ListDeviceStatesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListDeviceStates(\Google\Cloud\Iot\V1\ListDeviceStatesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/ListDeviceStates', - $argument, - ['\Google\Cloud\Iot\V1\ListDeviceStatesResponse', 'decode'], - $metadata, $options); - } - - /** - * Sets the access control policy on the specified resource. Replaces any - * existing policy. - * @param \Google\Cloud\Iam\V1\SetIamPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SetIamPolicy(\Google\Cloud\Iam\V1\SetIamPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/SetIamPolicy', - $argument, - ['\Google\Cloud\Iam\V1\Policy', 'decode'], - $metadata, $options); - } - - /** - * Gets the access control policy for a resource. - * Returns an empty policy if the resource exists and does not have a policy - * set. - * @param \Google\Cloud\Iam\V1\GetIamPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetIamPolicy(\Google\Cloud\Iam\V1\GetIamPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/GetIamPolicy', - $argument, - ['\Google\Cloud\Iam\V1\Policy', 'decode'], - $metadata, $options); - } - - /** - * 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. - * @param \Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function TestIamPermissions(\Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/TestIamPermissions', - $argument, - ['\Google\Cloud\Iam\V1\TestIamPermissionsResponse', 'decode'], - $metadata, $options); - } - - /** - * Sends a command to the specified device. In order for a device to be able - * to receive commands, it must: - * 1) be connected to Cloud IoT Core using the MQTT protocol, and - * 2) be subscribed to the group of MQTT topics specified by - * /devices/{device-id}/commands/#. This subscription will receive commands - * at the top-level topic /devices/{device-id}/commands as well as commands - * for subfolders, like /devices/{device-id}/commands/subfolder. - * Note that subscribing to specific subfolders is not supported. - * If the command could not be delivered to the device, this method will - * return an error; in particular, if the device is not subscribed, this - * method will return FAILED_PRECONDITION. Otherwise, this method will - * return OK. If the subscription is QoS 1, at least once delivery will be - * guaranteed; for QoS 0, no acknowledgment will be expected from the device. - * @param \Google\Cloud\Iot\V1\SendCommandToDeviceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SendCommandToDevice(\Google\Cloud\Iot\V1\SendCommandToDeviceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/SendCommandToDevice', - $argument, - ['\Google\Cloud\Iot\V1\SendCommandToDeviceResponse', 'decode'], - $metadata, $options); - } - - /** - * Associates the device with the gateway. - * @param \Google\Cloud\Iot\V1\BindDeviceToGatewayRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function BindDeviceToGateway(\Google\Cloud\Iot\V1\BindDeviceToGatewayRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/BindDeviceToGateway', - $argument, - ['\Google\Cloud\Iot\V1\BindDeviceToGatewayResponse', 'decode'], - $metadata, $options); - } - - /** - * Deletes the association between the device and the gateway. - * @param \Google\Cloud\Iot\V1\UnbindDeviceFromGatewayRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UnbindDeviceFromGateway(\Google\Cloud\Iot\V1\UnbindDeviceFromGatewayRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.iot.v1.DeviceManager/UnbindDeviceFromGateway', - $argument, - ['\Google\Cloud\Iot\V1\UnbindDeviceFromGatewayResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceRegistry.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceRegistry.php deleted file mode 100644 index 0e038fc1e748..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceRegistry.php +++ /dev/null @@ -1,435 +0,0 @@ -google.cloud.iot.v1.DeviceRegistry - */ -class DeviceRegistry extends \Google\Protobuf\Internal\Message -{ - /** - * The identifier of this device registry. For example, `myRegistry`. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * The resource path name. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - /** - * The configuration for notification of telemetry events received from the - * device. All telemetry events that were successfully published by the - * device and acknowledged by Cloud IoT Core are guaranteed to be - * delivered to Cloud Pub/Sub. If multiple configurations match a message, - * only the first matching configuration is used. If you try to publish a - * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic - * for the device's registry, the connection closes automatically. If you try - * to do so using an HTTP connection, an error is returned. Up to 10 - * configurations may be provided. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; - */ - private $event_notification_configs; - /** - * The configuration for notification of new states received from the device. - * State updates are guaranteed to be stored in the state history, but - * notifications to Cloud Pub/Sub are not guaranteed. For example, if - * permissions are misconfigured or the specified topic doesn't exist, no - * notification will be published but the state will still be stored in Cloud - * IoT Core. - * - * Generated from protobuf field .google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7; - */ - protected $state_notification_config = null; - /** - * The MQTT configuration for this device registry. - * - * Generated from protobuf field .google.cloud.iot.v1.MqttConfig mqtt_config = 4; - */ - protected $mqtt_config = null; - /** - * The DeviceService (HTTP) configuration for this device registry. - * - * Generated from protobuf field .google.cloud.iot.v1.HttpConfig http_config = 9; - */ - protected $http_config = null; - /** - * **Beta Feature** - * The default logging verbosity for activity from devices in this registry. - * The verbosity level can be overridden by Device.log_level. - * - * Generated from protobuf field .google.cloud.iot.v1.LogLevel log_level = 11; - */ - protected $log_level = 0; - /** - * The credentials used to verify the device credentials. No more than 10 - * credentials can be bound to a single registry at a time. The verification - * process occurs at the time of device creation or update. If this field is - * empty, no verification is performed. Otherwise, the credentials of a newly - * created device or added credentials of an updated device should be signed - * with one of these registry credentials. - * Note, however, that existing devices will never be affected by - * modifications to this list of credentials: after a device has been - * successfully created in a registry, it should be able to connect even if - * its registry credentials are revoked, deleted, or modified. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.RegistryCredential credentials = 8; - */ - private $credentials; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The identifier of this device registry. For example, `myRegistry`. - * @type string $name - * The resource path name. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @type array<\Google\Cloud\Iot\V1\EventNotificationConfig>|\Google\Protobuf\Internal\RepeatedField $event_notification_configs - * The configuration for notification of telemetry events received from the - * device. All telemetry events that were successfully published by the - * device and acknowledged by Cloud IoT Core are guaranteed to be - * delivered to Cloud Pub/Sub. If multiple configurations match a message, - * only the first matching configuration is used. If you try to publish a - * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic - * for the device's registry, the connection closes automatically. If you try - * to do so using an HTTP connection, an error is returned. Up to 10 - * configurations may be provided. - * @type \Google\Cloud\Iot\V1\StateNotificationConfig $state_notification_config - * The configuration for notification of new states received from the device. - * State updates are guaranteed to be stored in the state history, but - * notifications to Cloud Pub/Sub are not guaranteed. For example, if - * permissions are misconfigured or the specified topic doesn't exist, no - * notification will be published but the state will still be stored in Cloud - * IoT Core. - * @type \Google\Cloud\Iot\V1\MqttConfig $mqtt_config - * The MQTT configuration for this device registry. - * @type \Google\Cloud\Iot\V1\HttpConfig $http_config - * The DeviceService (HTTP) configuration for this device registry. - * @type int $log_level - * **Beta Feature** - * The default logging verbosity for activity from devices in this registry. - * The verbosity level can be overridden by Device.log_level. - * @type array<\Google\Cloud\Iot\V1\RegistryCredential>|\Google\Protobuf\Internal\RepeatedField $credentials - * The credentials used to verify the device credentials. No more than 10 - * credentials can be bound to a single registry at a time. The verification - * process occurs at the time of device creation or update. If this field is - * empty, no verification is performed. Otherwise, the credentials of a newly - * created device or added credentials of an updated device should be signed - * with one of these registry credentials. - * Note, however, that existing devices will never be affected by - * modifications to this list of credentials: after a device has been - * successfully created in a registry, it should be able to connect even if - * its registry credentials are revoked, deleted, or modified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The identifier of this device registry. For example, `myRegistry`. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The identifier of this device registry. For example, `myRegistry`. - * - * 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 resource path name. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource path name. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * 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; - } - - /** - * The configuration for notification of telemetry events received from the - * device. All telemetry events that were successfully published by the - * device and acknowledged by Cloud IoT Core are guaranteed to be - * delivered to Cloud Pub/Sub. If multiple configurations match a message, - * only the first matching configuration is used. If you try to publish a - * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic - * for the device's registry, the connection closes automatically. If you try - * to do so using an HTTP connection, an error is returned. Up to 10 - * configurations may be provided. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEventNotificationConfigs() - { - return $this->event_notification_configs; - } - - /** - * The configuration for notification of telemetry events received from the - * device. All telemetry events that were successfully published by the - * device and acknowledged by Cloud IoT Core are guaranteed to be - * delivered to Cloud Pub/Sub. If multiple configurations match a message, - * only the first matching configuration is used. If you try to publish a - * device telemetry event using MQTT without specifying a Cloud Pub/Sub topic - * for the device's registry, the connection closes automatically. If you try - * to do so using an HTTP connection, an error is returned. Up to 10 - * configurations may be provided. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10; - * @param array<\Google\Cloud\Iot\V1\EventNotificationConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEventNotificationConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\EventNotificationConfig::class); - $this->event_notification_configs = $arr; - - return $this; - } - - /** - * The configuration for notification of new states received from the device. - * State updates are guaranteed to be stored in the state history, but - * notifications to Cloud Pub/Sub are not guaranteed. For example, if - * permissions are misconfigured or the specified topic doesn't exist, no - * notification will be published but the state will still be stored in Cloud - * IoT Core. - * - * Generated from protobuf field .google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7; - * @return \Google\Cloud\Iot\V1\StateNotificationConfig|null - */ - public function getStateNotificationConfig() - { - return $this->state_notification_config; - } - - public function hasStateNotificationConfig() - { - return isset($this->state_notification_config); - } - - public function clearStateNotificationConfig() - { - unset($this->state_notification_config); - } - - /** - * The configuration for notification of new states received from the device. - * State updates are guaranteed to be stored in the state history, but - * notifications to Cloud Pub/Sub are not guaranteed. For example, if - * permissions are misconfigured or the specified topic doesn't exist, no - * notification will be published but the state will still be stored in Cloud - * IoT Core. - * - * Generated from protobuf field .google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7; - * @param \Google\Cloud\Iot\V1\StateNotificationConfig $var - * @return $this - */ - public function setStateNotificationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\StateNotificationConfig::class); - $this->state_notification_config = $var; - - return $this; - } - - /** - * The MQTT configuration for this device registry. - * - * Generated from protobuf field .google.cloud.iot.v1.MqttConfig mqtt_config = 4; - * @return \Google\Cloud\Iot\V1\MqttConfig|null - */ - public function getMqttConfig() - { - return $this->mqtt_config; - } - - public function hasMqttConfig() - { - return isset($this->mqtt_config); - } - - public function clearMqttConfig() - { - unset($this->mqtt_config); - } - - /** - * The MQTT configuration for this device registry. - * - * Generated from protobuf field .google.cloud.iot.v1.MqttConfig mqtt_config = 4; - * @param \Google\Cloud\Iot\V1\MqttConfig $var - * @return $this - */ - public function setMqttConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\MqttConfig::class); - $this->mqtt_config = $var; - - return $this; - } - - /** - * The DeviceService (HTTP) configuration for this device registry. - * - * Generated from protobuf field .google.cloud.iot.v1.HttpConfig http_config = 9; - * @return \Google\Cloud\Iot\V1\HttpConfig|null - */ - public function getHttpConfig() - { - return $this->http_config; - } - - public function hasHttpConfig() - { - return isset($this->http_config); - } - - public function clearHttpConfig() - { - unset($this->http_config); - } - - /** - * The DeviceService (HTTP) configuration for this device registry. - * - * Generated from protobuf field .google.cloud.iot.v1.HttpConfig http_config = 9; - * @param \Google\Cloud\Iot\V1\HttpConfig $var - * @return $this - */ - public function setHttpConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\HttpConfig::class); - $this->http_config = $var; - - return $this; - } - - /** - * **Beta Feature** - * The default logging verbosity for activity from devices in this registry. - * The verbosity level can be overridden by Device.log_level. - * - * Generated from protobuf field .google.cloud.iot.v1.LogLevel log_level = 11; - * @return int - */ - public function getLogLevel() - { - return $this->log_level; - } - - /** - * **Beta Feature** - * The default logging verbosity for activity from devices in this registry. - * The verbosity level can be overridden by Device.log_level. - * - * Generated from protobuf field .google.cloud.iot.v1.LogLevel log_level = 11; - * @param int $var - * @return $this - */ - public function setLogLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\LogLevel::class); - $this->log_level = $var; - - return $this; - } - - /** - * The credentials used to verify the device credentials. No more than 10 - * credentials can be bound to a single registry at a time. The verification - * process occurs at the time of device creation or update. If this field is - * empty, no verification is performed. Otherwise, the credentials of a newly - * created device or added credentials of an updated device should be signed - * with one of these registry credentials. - * Note, however, that existing devices will never be affected by - * modifications to this list of credentials: after a device has been - * successfully created in a registry, it should be able to connect even if - * its registry credentials are revoked, deleted, or modified. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.RegistryCredential credentials = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCredentials() - { - return $this->credentials; - } - - /** - * The credentials used to verify the device credentials. No more than 10 - * credentials can be bound to a single registry at a time. The verification - * process occurs at the time of device creation or update. If this field is - * empty, no verification is performed. Otherwise, the credentials of a newly - * created device or added credentials of an updated device should be signed - * with one of these registry credentials. - * Note, however, that existing devices will never be affected by - * modifications to this list of credentials: after a device has been - * successfully created in a registry, it should be able to connect even if - * its registry credentials are revoked, deleted, or modified. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.RegistryCredential credentials = 8; - * @param array<\Google\Cloud\Iot\V1\RegistryCredential>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCredentials($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\RegistryCredential::class); - $this->credentials = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceState.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceState.php deleted file mode 100644 index 0cb78870589e..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/DeviceState.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.iot.v1.DeviceState - */ -class DeviceState extends \Google\Protobuf\Internal\Message -{ - /** - * [Output only] The time at which this state version was updated in Cloud - * IoT Core. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - */ - protected $update_time = null; - /** - * The device state data. - * - * Generated from protobuf field bytes binary_data = 2; - */ - protected $binary_data = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $update_time - * [Output only] The time at which this state version was updated in Cloud - * IoT Core. - * @type string $binary_data - * The device state data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * [Output only] The time at which this state version was updated in Cloud - * IoT Core. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @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 state version was updated in Cloud - * IoT Core. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @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 device state data. - * - * Generated from protobuf field bytes binary_data = 2; - * @return string - */ - public function getBinaryData() - { - return $this->binary_data; - } - - /** - * The device state data. - * - * Generated from protobuf field bytes binary_data = 2; - * @param string $var - * @return $this - */ - public function setBinaryData($var) - { - GPBUtil::checkString($var, False); - $this->binary_data = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/EventNotificationConfig.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/EventNotificationConfig.php deleted file mode 100644 index b34728a02e7f..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/EventNotificationConfig.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.iot.v1.EventNotificationConfig - */ -class EventNotificationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * If the subfolder name matches this string exactly, this configuration will - * be used. The string must not include the leading '/' character. If empty, - * all strings are matched. This field is used only for telemetry events; - * subfolders are not supported for state changes. - * - * Generated from protobuf field string subfolder_matches = 2; - */ - protected $subfolder_matches = ''; - /** - * A Cloud Pub/Sub topic name. For example, - * `projects/myProject/topics/deviceEvents`. - * - * Generated from protobuf field string pubsub_topic_name = 1; - */ - protected $pubsub_topic_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $subfolder_matches - * If the subfolder name matches this string exactly, this configuration will - * be used. The string must not include the leading '/' character. If empty, - * all strings are matched. This field is used only for telemetry events; - * subfolders are not supported for state changes. - * @type string $pubsub_topic_name - * A Cloud Pub/Sub topic name. For example, - * `projects/myProject/topics/deviceEvents`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * If the subfolder name matches this string exactly, this configuration will - * be used. The string must not include the leading '/' character. If empty, - * all strings are matched. This field is used only for telemetry events; - * subfolders are not supported for state changes. - * - * Generated from protobuf field string subfolder_matches = 2; - * @return string - */ - public function getSubfolderMatches() - { - return $this->subfolder_matches; - } - - /** - * If the subfolder name matches this string exactly, this configuration will - * be used. The string must not include the leading '/' character. If empty, - * all strings are matched. This field is used only for telemetry events; - * subfolders are not supported for state changes. - * - * Generated from protobuf field string subfolder_matches = 2; - * @param string $var - * @return $this - */ - public function setSubfolderMatches($var) - { - GPBUtil::checkString($var, True); - $this->subfolder_matches = $var; - - return $this; - } - - /** - * A Cloud Pub/Sub topic name. For example, - * `projects/myProject/topics/deviceEvents`. - * - * Generated from protobuf field string pubsub_topic_name = 1; - * @return string - */ - public function getPubsubTopicName() - { - return $this->pubsub_topic_name; - } - - /** - * A Cloud Pub/Sub topic name. For example, - * `projects/myProject/topics/deviceEvents`. - * - * Generated from protobuf field string pubsub_topic_name = 1; - * @param string $var - * @return $this - */ - public function setPubsubTopicName($var) - { - GPBUtil::checkString($var, True); - $this->pubsub_topic_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayAuthMethod.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayAuthMethod.php deleted file mode 100644 index 9d8691becaf9..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayAuthMethod.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.iot.v1.GatewayAuthMethod - */ -class GatewayAuthMethod -{ - /** - * No authentication/authorization method specified. No devices are allowed to - * access the gateway. - * - * Generated from protobuf enum GATEWAY_AUTH_METHOD_UNSPECIFIED = 0; - */ - const GATEWAY_AUTH_METHOD_UNSPECIFIED = 0; - /** - * The device is authenticated through the gateway association only. Device - * credentials are ignored even if provided. - * - * Generated from protobuf enum ASSOCIATION_ONLY = 1; - */ - const ASSOCIATION_ONLY = 1; - /** - * The device is authenticated through its own credentials. Gateway - * association is not checked. - * - * Generated from protobuf enum DEVICE_AUTH_TOKEN_ONLY = 2; - */ - const DEVICE_AUTH_TOKEN_ONLY = 2; - /** - * The device is authenticated through both device credentials and gateway - * association. The device must be bound to the gateway and must provide its - * own credentials. - * - * Generated from protobuf enum ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3; - */ - const ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3; - - private static $valueToName = [ - self::GATEWAY_AUTH_METHOD_UNSPECIFIED => 'GATEWAY_AUTH_METHOD_UNSPECIFIED', - self::ASSOCIATION_ONLY => 'ASSOCIATION_ONLY', - self::DEVICE_AUTH_TOKEN_ONLY => 'DEVICE_AUTH_TOKEN_ONLY', - self::ASSOCIATION_AND_DEVICE_AUTH_TOKEN => 'ASSOCIATION_AND_DEVICE_AUTH_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); - } -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayConfig.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayConfig.php deleted file mode 100644 index 3f8a0310d4f9..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayConfig.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.iot.v1.GatewayConfig - */ -class GatewayConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates whether the device is a gateway. - * - * Generated from protobuf field .google.cloud.iot.v1.GatewayType gateway_type = 1; - */ - protected $gateway_type = 0; - /** - * Indicates how to authorize and/or authenticate devices to access the - * gateway. - * - * Generated from protobuf field .google.cloud.iot.v1.GatewayAuthMethod gateway_auth_method = 2; - */ - protected $gateway_auth_method = 0; - /** - * [Output only] The ID of the gateway the device accessed most recently. - * - * Generated from protobuf field string last_accessed_gateway_id = 3; - */ - protected $last_accessed_gateway_id = ''; - /** - * [Output only] The most recent time at which the device accessed the gateway - * specified in `last_accessed_gateway`. - * - * Generated from protobuf field .google.protobuf.Timestamp last_accessed_gateway_time = 4; - */ - protected $last_accessed_gateway_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $gateway_type - * Indicates whether the device is a gateway. - * @type int $gateway_auth_method - * Indicates how to authorize and/or authenticate devices to access the - * gateway. - * @type string $last_accessed_gateway_id - * [Output only] The ID of the gateway the device accessed most recently. - * @type \Google\Protobuf\Timestamp $last_accessed_gateway_time - * [Output only] The most recent time at which the device accessed the gateway - * specified in `last_accessed_gateway`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Indicates whether the device is a gateway. - * - * Generated from protobuf field .google.cloud.iot.v1.GatewayType gateway_type = 1; - * @return int - */ - public function getGatewayType() - { - return $this->gateway_type; - } - - /** - * Indicates whether the device is a gateway. - * - * Generated from protobuf field .google.cloud.iot.v1.GatewayType gateway_type = 1; - * @param int $var - * @return $this - */ - public function setGatewayType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\GatewayType::class); - $this->gateway_type = $var; - - return $this; - } - - /** - * Indicates how to authorize and/or authenticate devices to access the - * gateway. - * - * Generated from protobuf field .google.cloud.iot.v1.GatewayAuthMethod gateway_auth_method = 2; - * @return int - */ - public function getGatewayAuthMethod() - { - return $this->gateway_auth_method; - } - - /** - * Indicates how to authorize and/or authenticate devices to access the - * gateway. - * - * Generated from protobuf field .google.cloud.iot.v1.GatewayAuthMethod gateway_auth_method = 2; - * @param int $var - * @return $this - */ - public function setGatewayAuthMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\GatewayAuthMethod::class); - $this->gateway_auth_method = $var; - - return $this; - } - - /** - * [Output only] The ID of the gateway the device accessed most recently. - * - * Generated from protobuf field string last_accessed_gateway_id = 3; - * @return string - */ - public function getLastAccessedGatewayId() - { - return $this->last_accessed_gateway_id; - } - - /** - * [Output only] The ID of the gateway the device accessed most recently. - * - * Generated from protobuf field string last_accessed_gateway_id = 3; - * @param string $var - * @return $this - */ - public function setLastAccessedGatewayId($var) - { - GPBUtil::checkString($var, True); - $this->last_accessed_gateway_id = $var; - - return $this; - } - - /** - * [Output only] The most recent time at which the device accessed the gateway - * specified in `last_accessed_gateway`. - * - * Generated from protobuf field .google.protobuf.Timestamp last_accessed_gateway_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastAccessedGatewayTime() - { - return $this->last_accessed_gateway_time; - } - - public function hasLastAccessedGatewayTime() - { - return isset($this->last_accessed_gateway_time); - } - - public function clearLastAccessedGatewayTime() - { - unset($this->last_accessed_gateway_time); - } - - /** - * [Output only] The most recent time at which the device accessed the gateway - * specified in `last_accessed_gateway`. - * - * Generated from protobuf field .google.protobuf.Timestamp last_accessed_gateway_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastAccessedGatewayTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_accessed_gateway_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayListOptions.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayListOptions.php deleted file mode 100644 index d4ff45e9de56..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayListOptions.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.iot.v1.GatewayListOptions - */ -class GatewayListOptions extends \Google\Protobuf\Internal\Message -{ - protected $filter; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $gateway_type - * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY` - * is specified, only non-gateway devices are returned. If - * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned. - * @type string $associations_gateway_id - * If set, only devices associated with the specified gateway are returned. - * The gateway ID can be numeric (`num_id`) or the user-defined string - * (`id`). For example, if `123` is specified, only devices bound to the - * gateway with `num_id` 123 are returned. - * @type string $associations_device_id - * If set, returns only the gateways with which the specified device is - * associated. The device ID can be numeric (`num_id`) or the user-defined - * string (`id`). For example, if `456` is specified, returns only the - * gateways to which the device with `num_id` 456 is bound. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY` - * is specified, only non-gateway devices are returned. If - * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned. - * - * Generated from protobuf field .google.cloud.iot.v1.GatewayType gateway_type = 1; - * @return int - */ - public function getGatewayType() - { - return $this->readOneof(1); - } - - public function hasGatewayType() - { - return $this->hasOneof(1); - } - - /** - * If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY` - * is specified, only non-gateway devices are returned. If - * `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned. - * - * Generated from protobuf field .google.cloud.iot.v1.GatewayType gateway_type = 1; - * @param int $var - * @return $this - */ - public function setGatewayType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\GatewayType::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * If set, only devices associated with the specified gateway are returned. - * The gateway ID can be numeric (`num_id`) or the user-defined string - * (`id`). For example, if `123` is specified, only devices bound to the - * gateway with `num_id` 123 are returned. - * - * Generated from protobuf field string associations_gateway_id = 2; - * @return string - */ - public function getAssociationsGatewayId() - { - return $this->readOneof(2); - } - - public function hasAssociationsGatewayId() - { - return $this->hasOneof(2); - } - - /** - * If set, only devices associated with the specified gateway are returned. - * The gateway ID can be numeric (`num_id`) or the user-defined string - * (`id`). For example, if `123` is specified, only devices bound to the - * gateway with `num_id` 123 are returned. - * - * Generated from protobuf field string associations_gateway_id = 2; - * @param string $var - * @return $this - */ - public function setAssociationsGatewayId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * If set, returns only the gateways with which the specified device is - * associated. The device ID can be numeric (`num_id`) or the user-defined - * string (`id`). For example, if `456` is specified, returns only the - * gateways to which the device with `num_id` 456 is bound. - * - * Generated from protobuf field string associations_device_id = 3; - * @return string - */ - public function getAssociationsDeviceId() - { - return $this->readOneof(3); - } - - public function hasAssociationsDeviceId() - { - return $this->hasOneof(3); - } - - /** - * If set, returns only the gateways with which the specified device is - * associated. The device ID can be numeric (`num_id`) or the user-defined - * string (`id`). For example, if `456` is specified, returns only the - * gateways to which the device with `num_id` 456 is bound. - * - * Generated from protobuf field string associations_device_id = 3; - * @param string $var - * @return $this - */ - public function setAssociationsDeviceId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getFilter() - { - return $this->whichOneof("filter"); - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayType.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayType.php deleted file mode 100644 index cd6ecd8055bc..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GatewayType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.iot.v1.GatewayType - */ -class GatewayType -{ - /** - * If unspecified, the device is considered a non-gateway device. - * - * Generated from protobuf enum GATEWAY_TYPE_UNSPECIFIED = 0; - */ - const GATEWAY_TYPE_UNSPECIFIED = 0; - /** - * The device is a gateway. - * - * Generated from protobuf enum GATEWAY = 1; - */ - const GATEWAY = 1; - /** - * The device is not a gateway. - * - * Generated from protobuf enum NON_GATEWAY = 2; - */ - const NON_GATEWAY = 2; - - private static $valueToName = [ - self::GATEWAY_TYPE_UNSPECIFIED => 'GATEWAY_TYPE_UNSPECIFIED', - self::GATEWAY => 'GATEWAY', - self::NON_GATEWAY => 'NON_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); - } -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRegistryRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRegistryRequest.php deleted file mode 100644 index f951e10ce054..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRegistryRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.iot.v1.GetDeviceRegistryRequest - */ -class GetDeviceRegistryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * 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 name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated 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 device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRequest.php deleted file mode 100644 index ac34ea9f0c92..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/GetDeviceRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.iot.v1.GetDeviceRequest - */ -class GetDeviceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The fields of the `Device` resource to be returned in the response. If the - * field mask is unset or empty, all fields are returned. Fields have to be - * provided in snake_case format, for example: `last_heartbeat_time`. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 2; - */ - protected $field_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @type \Google\Protobuf\FieldMask $field_mask - * The fields of the `Device` resource to be returned in the response. If the - * field mask is unset or empty, all fields are returned. Fields have to be - * provided in snake_case format, for example: `last_heartbeat_time`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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; - } - - /** - * The fields of the `Device` resource to be returned in the response. If the - * field mask is unset or empty, all fields are returned. Fields have to be - * provided in snake_case format, for example: `last_heartbeat_time`. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getFieldMask() - { - return $this->field_mask; - } - - public function hasFieldMask() - { - return isset($this->field_mask); - } - - public function clearFieldMask() - { - unset($this->field_mask); - } - - /** - * The fields of the `Device` resource to be returned in the response. If the - * field mask is unset or empty, all fields are returned. Fields have to be - * provided in snake_case format, for example: `last_heartbeat_time`. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setFieldMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->field_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpConfig.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpConfig.php deleted file mode 100644 index dd5bab2c0ced..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpConfig.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.iot.v1.HttpConfig - */ -class HttpConfig extends \Google\Protobuf\Internal\Message -{ - /** - * If enabled, allows devices to use DeviceService via the HTTP protocol. - * Otherwise, any requests to DeviceService will fail for this registry. - * - * Generated from protobuf field .google.cloud.iot.v1.HttpState http_enabled_state = 1; - */ - protected $http_enabled_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $http_enabled_state - * If enabled, allows devices to use DeviceService via the HTTP protocol. - * Otherwise, any requests to DeviceService will fail for this registry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * If enabled, allows devices to use DeviceService via the HTTP protocol. - * Otherwise, any requests to DeviceService will fail for this registry. - * - * Generated from protobuf field .google.cloud.iot.v1.HttpState http_enabled_state = 1; - * @return int - */ - public function getHttpEnabledState() - { - return $this->http_enabled_state; - } - - /** - * If enabled, allows devices to use DeviceService via the HTTP protocol. - * Otherwise, any requests to DeviceService will fail for this registry. - * - * Generated from protobuf field .google.cloud.iot.v1.HttpState http_enabled_state = 1; - * @param int $var - * @return $this - */ - public function setHttpEnabledState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\HttpState::class); - $this->http_enabled_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpState.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpState.php deleted file mode 100644 index 1f9675a230cd..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/HttpState.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.iot.v1.HttpState - */ -class HttpState -{ - /** - * No HTTP state specified. If not specified, DeviceService will be - * enabled by default. - * - * Generated from protobuf enum HTTP_STATE_UNSPECIFIED = 0; - */ - const HTTP_STATE_UNSPECIFIED = 0; - /** - * Enables DeviceService (HTTP) service for the registry. - * - * Generated from protobuf enum HTTP_ENABLED = 1; - */ - const HTTP_ENABLED = 1; - /** - * Disables DeviceService (HTTP) service for the registry. - * - * Generated from protobuf enum HTTP_DISABLED = 2; - */ - const HTTP_DISABLED = 2; - - private static $valueToName = [ - self::HTTP_STATE_UNSPECIFIED => 'HTTP_STATE_UNSPECIFIED', - self::HTTP_ENABLED => 'HTTP_ENABLED', - self::HTTP_DISABLED => 'HTTP_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); - } -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsRequest.php deleted file mode 100644 index 4d839db838ea..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsRequest.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.iot.v1.ListDeviceConfigVersionsRequest - */ -class ListDeviceConfigVersionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The number of versions to list. Versions are listed in decreasing order of - * the version number. The maximum number of versions retained is 10. If this - * value is zero, it will return all the versions available. - * - * Generated from protobuf field int32 num_versions = 2; - */ - protected $num_versions = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @type int $num_versions - * The number of versions to list. Versions are listed in decreasing order of - * the version number. The maximum number of versions retained is 10. If this - * value is zero, it will return all the versions available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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; - } - - /** - * The number of versions to list. Versions are listed in decreasing order of - * the version number. The maximum number of versions retained is 10. If this - * value is zero, it will return all the versions available. - * - * Generated from protobuf field int32 num_versions = 2; - * @return int - */ - public function getNumVersions() - { - return $this->num_versions; - } - - /** - * The number of versions to list. Versions are listed in decreasing order of - * the version number. The maximum number of versions retained is 10. If this - * value is zero, it will return all the versions available. - * - * Generated from protobuf field int32 num_versions = 2; - * @param int $var - * @return $this - */ - public function setNumVersions($var) - { - GPBUtil::checkInt32($var); - $this->num_versions = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsResponse.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsResponse.php deleted file mode 100644 index 0b5af15a8ba9..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceConfigVersionsResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.iot.v1.ListDeviceConfigVersionsResponse - */ -class ListDeviceConfigVersionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The device configuration for the last few versions. Versions are listed - * in decreasing order, starting from the most recent one. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceConfig device_configs = 1; - */ - private $device_configs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Iot\V1\DeviceConfig>|\Google\Protobuf\Internal\RepeatedField $device_configs - * The device configuration for the last few versions. Versions are listed - * in decreasing order, starting from the most recent one. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * The device configuration for the last few versions. Versions are listed - * in decreasing order, starting from the most recent one. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceConfig device_configs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeviceConfigs() - { - return $this->device_configs; - } - - /** - * The device configuration for the last few versions. Versions are listed - * in decreasing order, starting from the most recent one. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceConfig device_configs = 1; - * @param array<\Google\Cloud\Iot\V1\DeviceConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeviceConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\DeviceConfig::class); - $this->device_configs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesRequest.php deleted file mode 100644 index b5df1c07d235..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.iot.v1.ListDeviceRegistriesRequest - */ -class ListDeviceRegistriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and cloud region path. For example, - * `projects/example-project/locations/us-central1`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of registries to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListDeviceRegistriesResponse`; indicates - * that this is a continuation of a prior `ListDeviceRegistries` call and - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and cloud region path. For example, - * `projects/example-project/locations/us-central1`. - * @type int $page_size - * The maximum number of registries to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @type string $page_token - * The value returned by the last `ListDeviceRegistriesResponse`; indicates - * that this is a continuation of a prior `ListDeviceRegistries` call and - * the system should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and cloud region path. For example, - * `projects/example-project/locations/us-central1`. - * - * Generated 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 cloud region path. For example, - * `projects/example-project/locations/us-central1`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 registries to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of registries to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * 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 `ListDeviceRegistriesResponse`; indicates - * that this is a continuation of a prior `ListDeviceRegistries` call and - * 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 `ListDeviceRegistriesResponse`; indicates - * that this is a continuation of a prior `ListDeviceRegistries` call and - * 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/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesResponse.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesResponse.php deleted file mode 100644 index ffe6315fe9e3..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceRegistriesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.iot.v1.ListDeviceRegistriesResponse - */ -class ListDeviceRegistriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The registries that matched the query. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1; - */ - private $device_registries; - /** - * If not empty, indicates that there may be more registries that match the - * request; this value should be passed in a new - * `ListDeviceRegistriesRequest`. - * - * 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\Iot\V1\DeviceRegistry>|\Google\Protobuf\Internal\RepeatedField $device_registries - * The registries that matched the query. - * @type string $next_page_token - * If not empty, indicates that there may be more registries that match the - * request; this value should be passed in a new - * `ListDeviceRegistriesRequest`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * The registries that matched the query. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeviceRegistries() - { - return $this->device_registries; - } - - /** - * The registries that matched the query. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceRegistry device_registries = 1; - * @param array<\Google\Cloud\Iot\V1\DeviceRegistry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeviceRegistries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\DeviceRegistry::class); - $this->device_registries = $arr; - - return $this; - } - - /** - * If not empty, indicates that there may be more registries that match the - * request; this value should be passed in a new - * `ListDeviceRegistriesRequest`. - * - * 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 registries that match the - * request; this value should be passed in a new - * `ListDeviceRegistriesRequest`. - * - * 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/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesRequest.php deleted file mode 100644 index e0287af6f36d..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesRequest.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.iot.v1.ListDeviceStatesRequest - */ -class ListDeviceStatesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The number of states to list. States are listed in descending order of - * update time. The maximum number of states retained is 10. If this - * value is zero, it will return all the states available. - * - * Generated from protobuf field int32 num_states = 2; - */ - protected $num_states = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @type int $num_states - * The number of states to list. States are listed in descending order of - * update time. The maximum number of states retained is 10. If this - * value is zero, it will return all the states available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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; - } - - /** - * The number of states to list. States are listed in descending order of - * update time. The maximum number of states retained is 10. If this - * value is zero, it will return all the states available. - * - * Generated from protobuf field int32 num_states = 2; - * @return int - */ - public function getNumStates() - { - return $this->num_states; - } - - /** - * The number of states to list. States are listed in descending order of - * update time. The maximum number of states retained is 10. If this - * value is zero, it will return all the states available. - * - * Generated from protobuf field int32 num_states = 2; - * @param int $var - * @return $this - */ - public function setNumStates($var) - { - GPBUtil::checkInt32($var); - $this->num_states = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesResponse.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesResponse.php deleted file mode 100644 index 8960e230f8a1..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDeviceStatesResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.iot.v1.ListDeviceStatesResponse - */ -class ListDeviceStatesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The last few device states. States are listed in descending order of server - * update time, starting from the most recent one. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceState device_states = 1; - */ - private $device_states; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Iot\V1\DeviceState>|\Google\Protobuf\Internal\RepeatedField $device_states - * The last few device states. States are listed in descending order of server - * update time, starting from the most recent one. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * The last few device states. States are listed in descending order of server - * update time, starting from the most recent one. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceState device_states = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeviceStates() - { - return $this->device_states; - } - - /** - * The last few device states. States are listed in descending order of server - * update time, starting from the most recent one. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.DeviceState device_states = 1; - * @param array<\Google\Cloud\Iot\V1\DeviceState>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeviceStates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\DeviceState::class); - $this->device_states = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesRequest.php deleted file mode 100644 index 74714d826d08..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesRequest.php +++ /dev/null @@ -1,335 +0,0 @@ -google.cloud.iot.v1.ListDevicesRequest - */ -class ListDevicesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The device registry path. Required. For example, - * `projects/my-project/locations/us-central1/registries/my-registry`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * A list of device numeric IDs. If empty, this field is ignored. Maximum - * IDs: 10,000. - * - * Generated from protobuf field repeated uint64 device_num_ids = 2; - */ - private $device_num_ids; - /** - * A list of device string IDs. For example, `['device0', 'device12']`. - * If empty, this field is ignored. Maximum IDs: 10,000 - * - * Generated from protobuf field repeated string device_ids = 3; - */ - private $device_ids; - /** - * The fields of the `Device` resource to be returned in the response. The - * fields `id` and `num_id` are always returned, along with any - * other fields specified in snake_case format, for example: - * `last_heartbeat_time`. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 4; - */ - protected $field_mask = null; - /** - * Options related to gateways. - * - * Generated from protobuf field .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6; - */ - protected $gateway_list_options = null; - /** - * The maximum number of devices to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * Generated from protobuf field int32 page_size = 100; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListDevicesResponse`; indicates - * that this is a continuation of a prior `ListDevices` call and - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 101; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The device registry path. Required. For example, - * `projects/my-project/locations/us-central1/registries/my-registry`. - * @type array|array|\Google\Protobuf\Internal\RepeatedField $device_num_ids - * A list of device numeric IDs. If empty, this field is ignored. Maximum - * IDs: 10,000. - * @type array|\Google\Protobuf\Internal\RepeatedField $device_ids - * A list of device string IDs. For example, `['device0', 'device12']`. - * If empty, this field is ignored. Maximum IDs: 10,000 - * @type \Google\Protobuf\FieldMask $field_mask - * The fields of the `Device` resource to be returned in the response. The - * fields `id` and `num_id` are always returned, along with any - * other fields specified in snake_case format, for example: - * `last_heartbeat_time`. - * @type \Google\Cloud\Iot\V1\GatewayListOptions $gateway_list_options - * Options related to gateways. - * @type int $page_size - * The maximum number of devices to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @type string $page_token - * The value returned by the last `ListDevicesResponse`; indicates - * that this is a continuation of a prior `ListDevices` call and - * the system should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The device registry path. Required. For example, - * `projects/my-project/locations/us-central1/registries/my-registry`. - * - * Generated 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 device registry path. Required. For example, - * `projects/my-project/locations/us-central1/registries/my-registry`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 list of device numeric IDs. If empty, this field is ignored. Maximum - * IDs: 10,000. - * - * Generated from protobuf field repeated uint64 device_num_ids = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeviceNumIds() - { - return $this->device_num_ids; - } - - /** - * A list of device numeric IDs. If empty, this field is ignored. Maximum - * IDs: 10,000. - * - * Generated from protobuf field repeated uint64 device_num_ids = 2; - * @param array|array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeviceNumIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT64); - $this->device_num_ids = $arr; - - return $this; - } - - /** - * A list of device string IDs. For example, `['device0', 'device12']`. - * If empty, this field is ignored. Maximum IDs: 10,000 - * - * Generated from protobuf field repeated string device_ids = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeviceIds() - { - return $this->device_ids; - } - - /** - * A list of device string IDs. For example, `['device0', 'device12']`. - * If empty, this field is ignored. Maximum IDs: 10,000 - * - * Generated from protobuf field repeated string device_ids = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeviceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->device_ids = $arr; - - return $this; - } - - /** - * The fields of the `Device` resource to be returned in the response. The - * fields `id` and `num_id` are always returned, along with any - * other fields specified in snake_case format, for example: - * `last_heartbeat_time`. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 4; - * @return \Google\Protobuf\FieldMask|null - */ - public function getFieldMask() - { - return $this->field_mask; - } - - public function hasFieldMask() - { - return isset($this->field_mask); - } - - public function clearFieldMask() - { - unset($this->field_mask); - } - - /** - * The fields of the `Device` resource to be returned in the response. The - * fields `id` and `num_id` are always returned, along with any - * other fields specified in snake_case format, for example: - * `last_heartbeat_time`. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 4; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setFieldMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->field_mask = $var; - - return $this; - } - - /** - * Options related to gateways. - * - * Generated from protobuf field .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6; - * @return \Google\Cloud\Iot\V1\GatewayListOptions|null - */ - public function getGatewayListOptions() - { - return $this->gateway_list_options; - } - - public function hasGatewayListOptions() - { - return isset($this->gateway_list_options); - } - - public function clearGatewayListOptions() - { - unset($this->gateway_list_options); - } - - /** - * Options related to gateways. - * - * Generated from protobuf field .google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6; - * @param \Google\Cloud\Iot\V1\GatewayListOptions $var - * @return $this - */ - public function setGatewayListOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\GatewayListOptions::class); - $this->gateway_list_options = $var; - - return $this; - } - - /** - * The maximum number of devices to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * Generated from protobuf field int32 page_size = 100; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of devices to return in the response. If this value - * is zero, the service will select a default size. A call may return fewer - * objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * - * Generated from protobuf field int32 page_size = 100; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListDevicesResponse`; indicates - * that this is a continuation of a prior `ListDevices` call and - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 101; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListDevicesResponse`; indicates - * that this is a continuation of a prior `ListDevices` call and - * the system should return the next page of data. - * - * Generated from protobuf field string page_token = 101; - * @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/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesResponse.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesResponse.php deleted file mode 100644 index 18919ee82b01..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ListDevicesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.iot.v1.ListDevicesResponse - */ -class ListDevicesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The devices that match the request. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.Device devices = 1; - */ - private $devices; - /** - * If not empty, indicates that there may be more devices that match the - * request; this value should be passed in a new `ListDevicesRequest`. - * - * 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\Iot\V1\Device>|\Google\Protobuf\Internal\RepeatedField $devices - * The devices that match the request. - * @type string $next_page_token - * If not empty, indicates that there may be more devices that match the - * request; this value should be passed in a new `ListDevicesRequest`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * The devices that match the request. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.Device devices = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDevices() - { - return $this->devices; - } - - /** - * The devices that match the request. - * - * Generated from protobuf field repeated .google.cloud.iot.v1.Device devices = 1; - * @param array<\Google\Cloud\Iot\V1\Device>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDevices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iot\V1\Device::class); - $this->devices = $arr; - - return $this; - } - - /** - * If not empty, indicates that there may be more devices that match the - * request; this value should be passed in a new `ListDevicesRequest`. - * - * 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 devices that match the - * request; this value should be passed in a new `ListDevicesRequest`. - * - * 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/Iot/v1/proto/src/Google/Cloud/Iot/V1/LogLevel.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/LogLevel.php deleted file mode 100644 index ba660f850b50..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/LogLevel.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.iot.v1.LogLevel - */ -class LogLevel -{ - /** - * No logging specified. If not specified, logging will be disabled. - * - * Generated from protobuf enum LOG_LEVEL_UNSPECIFIED = 0; - */ - const LOG_LEVEL_UNSPECIFIED = 0; - /** - * Disables logging. - * - * Generated from protobuf enum NONE = 10; - */ - const NONE = 10; - /** - * Error events will be logged. - * - * Generated from protobuf enum ERROR = 20; - */ - const ERROR = 20; - /** - * Informational events will be logged, such as connections and - * disconnections. - * - * Generated from protobuf enum INFO = 30; - */ - const INFO = 30; - /** - * All events will be logged. - * - * Generated from protobuf enum DEBUG = 40; - */ - const DEBUG = 40; - - private static $valueToName = [ - self::LOG_LEVEL_UNSPECIFIED => 'LOG_LEVEL_UNSPECIFIED', - self::NONE => 'NONE', - self::ERROR => 'ERROR', - self::INFO => 'INFO', - self::DEBUG => 'DEBUG', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Iot/v1/proto/src/Google/Cloud/Iot/V1/ModifyCloudToDeviceConfigRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ModifyCloudToDeviceConfigRequest.php deleted file mode 100644 index f9b87692e059..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/ModifyCloudToDeviceConfigRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.iot.v1.ModifyCloudToDeviceConfigRequest - */ -class ModifyCloudToDeviceConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The version number to update. If this value is zero, it will not check the - * version number of the server and will always update the current version; - * otherwise, this update will fail if the version number found on the server - * does not match this version number. This is used to support multiple - * simultaneous updates without losing data. - * - * Generated from protobuf field int64 version_to_update = 2; - */ - protected $version_to_update = 0; - /** - * Required. The configuration data for the device. - * - * Generated from protobuf field bytes binary_data = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $binary_data = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @type int|string $version_to_update - * The version number to update. If this value is zero, it will not check the - * version number of the server and will always update the current version; - * otherwise, this update will fail if the version number found on the server - * does not match this version number. This is used to support multiple - * simultaneous updates without losing data. - * @type string $binary_data - * Required. The configuration data for the device. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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; - } - - /** - * The version number to update. If this value is zero, it will not check the - * version number of the server and will always update the current version; - * otherwise, this update will fail if the version number found on the server - * does not match this version number. This is used to support multiple - * simultaneous updates without losing data. - * - * Generated from protobuf field int64 version_to_update = 2; - * @return int|string - */ - public function getVersionToUpdate() - { - return $this->version_to_update; - } - - /** - * The version number to update. If this value is zero, it will not check the - * version number of the server and will always update the current version; - * otherwise, this update will fail if the version number found on the server - * does not match this version number. This is used to support multiple - * simultaneous updates without losing data. - * - * Generated from protobuf field int64 version_to_update = 2; - * @param int|string $var - * @return $this - */ - public function setVersionToUpdate($var) - { - GPBUtil::checkInt64($var); - $this->version_to_update = $var; - - return $this; - } - - /** - * Required. The configuration data for the device. - * - * Generated from protobuf field bytes binary_data = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBinaryData() - { - return $this->binary_data; - } - - /** - * Required. The configuration data for the device. - * - * Generated from protobuf field bytes binary_data = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBinaryData($var) - { - GPBUtil::checkString($var, False); - $this->binary_data = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttConfig.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttConfig.php deleted file mode 100644 index 77e319da0575..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttConfig.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.iot.v1.MqttConfig - */ -class MqttConfig extends \Google\Protobuf\Internal\Message -{ - /** - * If enabled, allows connections using the MQTT protocol. Otherwise, MQTT - * connections to this registry will fail. - * - * Generated from protobuf field .google.cloud.iot.v1.MqttState mqtt_enabled_state = 1; - */ - protected $mqtt_enabled_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $mqtt_enabled_state - * If enabled, allows connections using the MQTT protocol. Otherwise, MQTT - * connections to this registry will fail. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * If enabled, allows connections using the MQTT protocol. Otherwise, MQTT - * connections to this registry will fail. - * - * Generated from protobuf field .google.cloud.iot.v1.MqttState mqtt_enabled_state = 1; - * @return int - */ - public function getMqttEnabledState() - { - return $this->mqtt_enabled_state; - } - - /** - * If enabled, allows connections using the MQTT protocol. Otherwise, MQTT - * connections to this registry will fail. - * - * Generated from protobuf field .google.cloud.iot.v1.MqttState mqtt_enabled_state = 1; - * @param int $var - * @return $this - */ - public function setMqttEnabledState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\MqttState::class); - $this->mqtt_enabled_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttState.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttState.php deleted file mode 100644 index d0e96136e694..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/MqttState.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.iot.v1.MqttState - */ -class MqttState -{ - /** - * No MQTT state specified. If not specified, MQTT will be enabled by default. - * - * Generated from protobuf enum MQTT_STATE_UNSPECIFIED = 0; - */ - const MQTT_STATE_UNSPECIFIED = 0; - /** - * Enables a MQTT connection. - * - * Generated from protobuf enum MQTT_ENABLED = 1; - */ - const MQTT_ENABLED = 1; - /** - * Disables a MQTT connection. - * - * Generated from protobuf enum MQTT_DISABLED = 2; - */ - const MQTT_DISABLED = 2; - - private static $valueToName = [ - self::MQTT_STATE_UNSPECIFIED => 'MQTT_STATE_UNSPECIFIED', - self::MQTT_ENABLED => 'MQTT_ENABLED', - self::MQTT_DISABLED => 'MQTT_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); - } -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificate.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificate.php deleted file mode 100644 index 076df9f09890..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificate.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.iot.v1.PublicKeyCertificate - */ -class PublicKeyCertificate extends \Google\Protobuf\Internal\Message -{ - /** - * The certificate format. - * - * Generated from protobuf field .google.cloud.iot.v1.PublicKeyCertificateFormat format = 1; - */ - protected $format = 0; - /** - * The certificate data. - * - * Generated from protobuf field string certificate = 2; - */ - protected $certificate = ''; - /** - * [Output only] The certificate details. Used only for X.509 certificates. - * - * Generated from protobuf field .google.cloud.iot.v1.X509CertificateDetails x509_details = 3; - */ - protected $x509_details = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $format - * The certificate format. - * @type string $certificate - * The certificate data. - * @type \Google\Cloud\Iot\V1\X509CertificateDetails $x509_details - * [Output only] The certificate details. Used only for X.509 certificates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The certificate format. - * - * Generated from protobuf field .google.cloud.iot.v1.PublicKeyCertificateFormat format = 1; - * @return int - */ - public function getFormat() - { - return $this->format; - } - - /** - * The certificate format. - * - * Generated from protobuf field .google.cloud.iot.v1.PublicKeyCertificateFormat format = 1; - * @param int $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\PublicKeyCertificateFormat::class); - $this->format = $var; - - return $this; - } - - /** - * The certificate data. - * - * Generated from protobuf field string certificate = 2; - * @return string - */ - public function getCertificate() - { - return $this->certificate; - } - - /** - * The certificate data. - * - * Generated from protobuf field string certificate = 2; - * @param string $var - * @return $this - */ - public function setCertificate($var) - { - GPBUtil::checkString($var, True); - $this->certificate = $var; - - return $this; - } - - /** - * [Output only] The certificate details. Used only for X.509 certificates. - * - * Generated from protobuf field .google.cloud.iot.v1.X509CertificateDetails x509_details = 3; - * @return \Google\Cloud\Iot\V1\X509CertificateDetails|null - */ - public function getX509Details() - { - return $this->x509_details; - } - - public function hasX509Details() - { - return isset($this->x509_details); - } - - public function clearX509Details() - { - unset($this->x509_details); - } - - /** - * [Output only] The certificate details. Used only for X.509 certificates. - * - * Generated from protobuf field .google.cloud.iot.v1.X509CertificateDetails x509_details = 3; - * @param \Google\Cloud\Iot\V1\X509CertificateDetails $var - * @return $this - */ - public function setX509Details($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\X509CertificateDetails::class); - $this->x509_details = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificateFormat.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificateFormat.php deleted file mode 100644 index 6b0997a00116..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCertificateFormat.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.iot.v1.PublicKeyCertificateFormat - */ -class PublicKeyCertificateFormat -{ - /** - * The format has not been specified. This is an invalid default value and - * must not be used. - * - * Generated from protobuf enum UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0; - */ - const UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0; - /** - * An X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)), - * encoded in base64, and wrapped by `-----BEGIN CERTIFICATE-----` and - * `-----END CERTIFICATE-----`. - * - * Generated from protobuf enum X509_CERTIFICATE_PEM = 1; - */ - const X509_CERTIFICATE_PEM = 1; - - private static $valueToName = [ - self::UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT => 'UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT', - self::X509_CERTIFICATE_PEM => 'X509_CERTIFICATE_PEM', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCredential.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCredential.php deleted file mode 100644 index b0f2278b40bf..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyCredential.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.iot.v1.PublicKeyCredential - */ -class PublicKeyCredential extends \Google\Protobuf\Internal\Message -{ - /** - * The format of the key. - * - * Generated from protobuf field .google.cloud.iot.v1.PublicKeyFormat format = 1; - */ - protected $format = 0; - /** - * The key data. - * - * Generated from protobuf field string key = 2; - */ - protected $key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $format - * The format of the key. - * @type string $key - * The key data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The format of the key. - * - * Generated from protobuf field .google.cloud.iot.v1.PublicKeyFormat format = 1; - * @return int - */ - public function getFormat() - { - return $this->format; - } - - /** - * The format of the key. - * - * Generated from protobuf field .google.cloud.iot.v1.PublicKeyFormat format = 1; - * @param int $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Iot\V1\PublicKeyFormat::class); - $this->format = $var; - - return $this; - } - - /** - * The key data. - * - * Generated from protobuf field string key = 2; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The key data. - * - * Generated from protobuf field string key = 2; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyFormat.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyFormat.php deleted file mode 100644 index 9efc28aae15e..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/PublicKeyFormat.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.iot.v1.PublicKeyFormat - */ -class PublicKeyFormat -{ - /** - * The format has not been specified. This is an invalid default value and - * must not be used. - * - * Generated from protobuf enum UNSPECIFIED_PUBLIC_KEY_FORMAT = 0; - */ - const UNSPECIFIED_PUBLIC_KEY_FORMAT = 0; - /** - * An RSA public key encoded in base64, and wrapped by - * `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`. This can be - * used to verify `RS256` signatures in JWT tokens ([RFC7518]( - * https://www.ietf.org/rfc/rfc7518.txt)). - * - * Generated from protobuf enum RSA_PEM = 3; - */ - const RSA_PEM = 3; - /** - * As RSA_PEM, but wrapped in an X.509v3 certificate ([RFC5280]( - * https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by - * `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. - * - * Generated from protobuf enum RSA_X509_PEM = 1; - */ - const RSA_X509_PEM = 1; - /** - * Public key for the ECDSA algorithm using P-256 and SHA-256, encoded in - * base64, and wrapped by `-----BEGIN PUBLIC KEY-----` and `-----END - * PUBLIC KEY-----`. This can be used to verify JWT tokens with the `ES256` - * algorithm ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)). This curve is - * defined in [OpenSSL](https://www.openssl.org/) as the `prime256v1` curve. - * - * Generated from protobuf enum ES256_PEM = 2; - */ - const ES256_PEM = 2; - /** - * As ES256_PEM, but wrapped in an X.509v3 certificate ([RFC5280]( - * https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by - * `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. - * - * Generated from protobuf enum ES256_X509_PEM = 4; - */ - const ES256_X509_PEM = 4; - - private static $valueToName = [ - self::UNSPECIFIED_PUBLIC_KEY_FORMAT => 'UNSPECIFIED_PUBLIC_KEY_FORMAT', - self::RSA_PEM => 'RSA_PEM', - self::RSA_X509_PEM => 'RSA_X509_PEM', - self::ES256_PEM => 'ES256_PEM', - self::ES256_X509_PEM => 'ES256_X509_PEM', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Iot/v1/proto/src/Google/Cloud/Iot/V1/RegistryCredential.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/RegistryCredential.php deleted file mode 100644 index e39561765d0d..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/RegistryCredential.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.iot.v1.RegistryCredential - */ -class RegistryCredential extends \Google\Protobuf\Internal\Message -{ - protected $credential; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iot\V1\PublicKeyCertificate $public_key_certificate - * A public key certificate used to verify the device credentials. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A public key certificate used to verify the device credentials. - * - * Generated from protobuf field .google.cloud.iot.v1.PublicKeyCertificate public_key_certificate = 1; - * @return \Google\Cloud\Iot\V1\PublicKeyCertificate|null - */ - public function getPublicKeyCertificate() - { - return $this->readOneof(1); - } - - public function hasPublicKeyCertificate() - { - return $this->hasOneof(1); - } - - /** - * A public key certificate used to verify the device credentials. - * - * Generated from protobuf field .google.cloud.iot.v1.PublicKeyCertificate public_key_certificate = 1; - * @param \Google\Cloud\Iot\V1\PublicKeyCertificate $var - * @return $this - */ - public function setPublicKeyCertificate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\PublicKeyCertificate::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getCredential() - { - return $this->whichOneof("credential"); - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceRequest.php deleted file mode 100644 index f00ff670f653..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.iot.v1.SendCommandToDeviceRequest - */ -class SendCommandToDeviceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The command data to send to the device. - * - * Generated from protobuf field bytes binary_data = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $binary_data = ''; - /** - * Optional subfolder for the command. If empty, the command will be delivered - * to the /devices/{device-id}/commands topic, otherwise it will be delivered - * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level - * subfolders are allowed. This field must not have more than 256 characters, - * and must not contain any MQTT wildcards ("+" or "#") or null characters. - * - * Generated from protobuf field string subfolder = 3; - */ - protected $subfolder = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @type string $binary_data - * Required. The command data to send to the device. - * @type string $subfolder - * Optional subfolder for the command. If empty, the command will be delivered - * to the /devices/{device-id}/commands topic, otherwise it will be delivered - * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level - * subfolders are allowed. This field must not have more than 256 characters, - * and must not contain any MQTT wildcards ("+" or "#") or null characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 command data to send to the device. - * - * Generated from protobuf field bytes binary_data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBinaryData() - { - return $this->binary_data; - } - - /** - * Required. The command data to send to the device. - * - * Generated from protobuf field bytes binary_data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBinaryData($var) - { - GPBUtil::checkString($var, False); - $this->binary_data = $var; - - return $this; - } - - /** - * Optional subfolder for the command. If empty, the command will be delivered - * to the /devices/{device-id}/commands topic, otherwise it will be delivered - * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level - * subfolders are allowed. This field must not have more than 256 characters, - * and must not contain any MQTT wildcards ("+" or "#") or null characters. - * - * Generated from protobuf field string subfolder = 3; - * @return string - */ - public function getSubfolder() - { - return $this->subfolder; - } - - /** - * Optional subfolder for the command. If empty, the command will be delivered - * to the /devices/{device-id}/commands topic, otherwise it will be delivered - * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level - * subfolders are allowed. This field must not have more than 256 characters, - * and must not contain any MQTT wildcards ("+" or "#") or null characters. - * - * Generated from protobuf field string subfolder = 3; - * @param string $var - * @return $this - */ - public function setSubfolder($var) - { - GPBUtil::checkString($var, True); - $this->subfolder = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceResponse.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceResponse.php deleted file mode 100644 index b1fb3cdc77d2..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/SendCommandToDeviceResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.iot.v1.SendCommandToDeviceResponse - */ -class SendCommandToDeviceResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/StateNotificationConfig.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/StateNotificationConfig.php deleted file mode 100644 index 11d23dc3089d..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/StateNotificationConfig.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.iot.v1.StateNotificationConfig - */ -class StateNotificationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * A Cloud Pub/Sub topic name. For example, - * `projects/myProject/topics/deviceEvents`. - * - * Generated from protobuf field string pubsub_topic_name = 1; - */ - protected $pubsub_topic_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pubsub_topic_name - * A Cloud Pub/Sub topic name. For example, - * `projects/myProject/topics/deviceEvents`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A Cloud Pub/Sub topic name. For example, - * `projects/myProject/topics/deviceEvents`. - * - * Generated from protobuf field string pubsub_topic_name = 1; - * @return string - */ - public function getPubsubTopicName() - { - return $this->pubsub_topic_name; - } - - /** - * A Cloud Pub/Sub topic name. For example, - * `projects/myProject/topics/deviceEvents`. - * - * Generated from protobuf field string pubsub_topic_name = 1; - * @param string $var - * @return $this - */ - public function setPubsubTopicName($var) - { - GPBUtil::checkString($var, True); - $this->pubsub_topic_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayRequest.php deleted file mode 100644 index a06e4442b852..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.iot.v1.UnbindDeviceFromGatewayRequest - */ -class UnbindDeviceFromGatewayRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * - * Generated from protobuf field string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $gateway_id = ''; - /** - * Required. The device to disassociate from the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * - * Generated from protobuf field string device_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $device_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @type string $gateway_id - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * @type string $device_id - * Required. The device to disassociate from the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated 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 registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * - * Generated from protobuf field string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGatewayId() - { - return $this->gateway_id; - } - - /** - * Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * - * 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. The device to disassociate from the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * - * Generated from protobuf field string device_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDeviceId() - { - return $this->device_id; - } - - /** - * Required. The device to disassociate from the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * - * Generated from protobuf field string device_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDeviceId($var) - { - GPBUtil::checkString($var, True); - $this->device_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayResponse.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayResponse.php deleted file mode 100644 index 9e4c75085e7c..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UnbindDeviceFromGatewayResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.iot.v1.UnbindDeviceFromGatewayResponse - */ -class UnbindDeviceFromGatewayResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRegistryRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRegistryRequest.php deleted file mode 100644 index 31c338e3ea52..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRegistryRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.iot.v1.UpdateDeviceRegistryRequest - */ -class UpdateDeviceRegistryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The new values for the device registry. The `id` field must be empty, and - * the `name` field must indicate the path of the resource. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated from protobuf field .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $device_registry = null; - /** - * Required. Only updates the `device_registry` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `event_notification_config`, `http_config`, - * `mqtt_config`, and `state_notification_config`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iot\V1\DeviceRegistry $device_registry - * Required. The new values for the device registry. The `id` field must be empty, and - * the `name` field must indicate the path of the resource. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Only updates the `device_registry` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `event_notification_config`, `http_config`, - * `mqtt_config`, and `state_notification_config`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The new values for the device registry. The `id` field must be empty, and - * the `name` field must indicate the path of the resource. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated from protobuf field .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iot\V1\DeviceRegistry|null - */ - public function getDeviceRegistry() - { - return $this->device_registry; - } - - public function hasDeviceRegistry() - { - return isset($this->device_registry); - } - - public function clearDeviceRegistry() - { - unset($this->device_registry); - } - - /** - * Required. The new values for the device registry. The `id` field must be empty, and - * the `name` field must indicate the path of the resource. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * - * Generated from protobuf field .google.cloud.iot.v1.DeviceRegistry device_registry = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iot\V1\DeviceRegistry $var - * @return $this - */ - public function setDeviceRegistry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\DeviceRegistry::class); - $this->device_registry = $var; - - return $this; - } - - /** - * Required. Only updates the `device_registry` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `event_notification_config`, `http_config`, - * `mqtt_config`, and `state_notification_config`. - * - * 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. Only updates the `device_registry` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `event_notification_config`, `http_config`, - * `mqtt_config`, and `state_notification_config`. - * - * 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/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRequest.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRequest.php deleted file mode 100644 index 4fe45b6f2f94..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/UpdateDeviceRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.iot.v1.UpdateDeviceRequest - */ -class UpdateDeviceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The new values for the device. The `id` and `num_id` fields must - * be empty, and the field `name` must specify the name path. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * Generated from protobuf field .google.cloud.iot.v1.Device device = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $device = null; - /** - * Required. Only updates the `device` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `credentials`, `blocked`, and `metadata` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Iot\V1\Device $device - * Required. The new values for the device. The `id` and `num_id` fields must - * be empty, and the field `name` must specify the name path. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Only updates the `device` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `credentials`, `blocked`, and `metadata` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The new values for the device. The `id` and `num_id` fields must - * be empty, and the field `name` must specify the name path. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * Generated from protobuf field .google.cloud.iot.v1.Device device = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Iot\V1\Device|null - */ - public function getDevice() - { - return $this->device; - } - - public function hasDevice() - { - return isset($this->device); - } - - public function clearDevice() - { - unset($this->device); - } - - /** - * Required. The new values for the device. The `id` and `num_id` fields must - * be empty, and the field `name` must specify the name path. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * - * Generated from protobuf field .google.cloud.iot.v1.Device device = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Iot\V1\Device $var - * @return $this - */ - public function setDevice($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\Device::class); - $this->device = $var; - - return $this; - } - - /** - * Required. Only updates the `device` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `credentials`, `blocked`, and `metadata` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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. Only updates the `device` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `credentials`, `blocked`, and `metadata` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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/Iot/v1/proto/src/Google/Cloud/Iot/V1/X509CertificateDetails.php b/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/X509CertificateDetails.php deleted file mode 100644 index 0e90598af0bc..000000000000 --- a/owl-bot-staging/Iot/v1/proto/src/Google/Cloud/Iot/V1/X509CertificateDetails.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.iot.v1.X509CertificateDetails - */ -class X509CertificateDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The entity that signed the certificate. - * - * Generated from protobuf field string issuer = 1; - */ - protected $issuer = ''; - /** - * The entity the certificate and public key belong to. - * - * Generated from protobuf field string subject = 2; - */ - protected $subject = ''; - /** - * The time the certificate becomes valid. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - */ - protected $start_time = null; - /** - * The time the certificate becomes invalid. - * - * Generated from protobuf field .google.protobuf.Timestamp expiry_time = 4; - */ - protected $expiry_time = null; - /** - * The algorithm used to sign the certificate. - * - * Generated from protobuf field string signature_algorithm = 5; - */ - protected $signature_algorithm = ''; - /** - * The type of public key in the certificate. - * - * Generated from protobuf field string public_key_type = 6; - */ - protected $public_key_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $issuer - * The entity that signed the certificate. - * @type string $subject - * The entity the certificate and public key belong to. - * @type \Google\Protobuf\Timestamp $start_time - * The time the certificate becomes valid. - * @type \Google\Protobuf\Timestamp $expiry_time - * The time the certificate becomes invalid. - * @type string $signature_algorithm - * The algorithm used to sign the certificate. - * @type string $public_key_type - * The type of public key in the certificate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Iot\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The entity that signed the certificate. - * - * Generated from protobuf field string issuer = 1; - * @return string - */ - public function getIssuer() - { - return $this->issuer; - } - - /** - * The entity that signed the certificate. - * - * Generated from protobuf field string issuer = 1; - * @param string $var - * @return $this - */ - public function setIssuer($var) - { - GPBUtil::checkString($var, True); - $this->issuer = $var; - - return $this; - } - - /** - * The entity the certificate and public key belong to. - * - * Generated from protobuf field string subject = 2; - * @return string - */ - public function getSubject() - { - return $this->subject; - } - - /** - * The entity the certificate and public key belong to. - * - * Generated from protobuf field string subject = 2; - * @param string $var - * @return $this - */ - public function setSubject($var) - { - GPBUtil::checkString($var, True); - $this->subject = $var; - - return $this; - } - - /** - * The time the certificate becomes valid. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @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 time the certificate becomes valid. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @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 time the certificate becomes invalid. - * - * Generated from protobuf field .google.protobuf.Timestamp expiry_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpiryTime() - { - return $this->expiry_time; - } - - public function hasExpiryTime() - { - return isset($this->expiry_time); - } - - public function clearExpiryTime() - { - unset($this->expiry_time); - } - - /** - * The time the certificate becomes invalid. - * - * Generated from protobuf field .google.protobuf.Timestamp expiry_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpiryTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expiry_time = $var; - - return $this; - } - - /** - * The algorithm used to sign the certificate. - * - * Generated from protobuf field string signature_algorithm = 5; - * @return string - */ - public function getSignatureAlgorithm() - { - return $this->signature_algorithm; - } - - /** - * The algorithm used to sign the certificate. - * - * Generated from protobuf field string signature_algorithm = 5; - * @param string $var - * @return $this - */ - public function setSignatureAlgorithm($var) - { - GPBUtil::checkString($var, True); - $this->signature_algorithm = $var; - - return $this; - } - - /** - * The type of public key in the certificate. - * - * Generated from protobuf field string public_key_type = 6; - * @return string - */ - public function getPublicKeyType() - { - return $this->public_key_type; - } - - /** - * The type of public key in the certificate. - * - * Generated from protobuf field string public_key_type = 6; - * @param string $var - * @return $this - */ - public function setPublicKeyType($var) - { - GPBUtil::checkString($var, True); - $this->public_key_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/bind_device_to_gateway.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/bind_device_to_gateway.php deleted file mode 100644 index 6d4095e3ae72..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/bind_device_to_gateway.php +++ /dev/null @@ -1,77 +0,0 @@ -bindDeviceToGateway($formattedParent, $gatewayId, $deviceId); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DeviceManagerClient::registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - $gatewayId = '[GATEWAY_ID]'; - $deviceId = '[DEVICE_ID]'; - - bind_device_to_gateway_sample($formattedParent, $gatewayId, $deviceId); -} -// [END cloudiot_v1_generated_DeviceManager_BindDeviceToGateway_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device.php deleted file mode 100644 index 6ac3170fc068..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device.php +++ /dev/null @@ -1,71 +0,0 @@ -createDevice($formattedParent, $device); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DeviceManagerClient::registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - - create_device_sample($formattedParent); -} -// [END cloudiot_v1_generated_DeviceManager_CreateDevice_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device_registry.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device_registry.php deleted file mode 100644 index c70e74bb3570..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/create_device_registry.php +++ /dev/null @@ -1,70 +0,0 @@ -createDeviceRegistry($formattedParent, $deviceRegistry); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DeviceManagerClient::locationName('[PROJECT]', '[LOCATION]'); - - create_device_registry_sample($formattedParent); -} -// [END cloudiot_v1_generated_DeviceManager_CreateDeviceRegistry_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device.php deleted file mode 100644 index e3539d39de2b..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device.php +++ /dev/null @@ -1,71 +0,0 @@ -deleteDevice($formattedName); - 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 = DeviceManagerClient::deviceName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - - delete_device_sample($formattedName); -} -// [END cloudiot_v1_generated_DeviceManager_DeleteDevice_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device_registry.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device_registry.php deleted file mode 100644 index a5e9ad2212db..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/delete_device_registry.php +++ /dev/null @@ -1,65 +0,0 @@ -deleteDeviceRegistry($formattedName); - 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 = DeviceManagerClient::registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - - delete_device_registry_sample($formattedName); -} -// [END cloudiot_v1_generated_DeviceManager_DeleteDeviceRegistry_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device.php deleted file mode 100644 index 4074a7f01dbc..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device.php +++ /dev/null @@ -1,73 +0,0 @@ -getDevice($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DeviceManagerClient::deviceName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - - get_device_sample($formattedName); -} -// [END cloudiot_v1_generated_DeviceManager_GetDevice_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device_registry.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device_registry.php deleted file mode 100644 index 7a7bd09e39ee..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_device_registry.php +++ /dev/null @@ -1,67 +0,0 @@ -getDeviceRegistry($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DeviceManagerClient::registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - - get_device_registry_sample($formattedName); -} -// [END cloudiot_v1_generated_DeviceManager_GetDeviceRegistry_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_iam_policy.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_iam_policy.php deleted file mode 100644 index 7b2b46ed9546..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/get_iam_policy.php +++ /dev/null @@ -1,68 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 cloudiot_v1_generated_DeviceManager_GetIamPolicy_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_config_versions.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_config_versions.php deleted file mode 100644 index 994d474bd8bb..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_config_versions.php +++ /dev/null @@ -1,74 +0,0 @@ -listDeviceConfigVersions($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DeviceManagerClient::deviceName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - - list_device_config_versions_sample($formattedName); -} -// [END cloudiot_v1_generated_DeviceManager_ListDeviceConfigVersions_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_registries.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_registries.php deleted file mode 100644 index a4f3f0fe1bac..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_registries.php +++ /dev/null @@ -1,72 +0,0 @@ -listDeviceRegistries($formattedParent); - - /** @var DeviceRegistry $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 = DeviceManagerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_device_registries_sample($formattedParent); -} -// [END cloudiot_v1_generated_DeviceManager_ListDeviceRegistries_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_states.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_states.php deleted file mode 100644 index 132b447c80bd..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_device_states.php +++ /dev/null @@ -1,74 +0,0 @@ -listDeviceStates($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DeviceManagerClient::deviceName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - - list_device_states_sample($formattedName); -} -// [END cloudiot_v1_generated_DeviceManager_ListDeviceStates_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_devices.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_devices.php deleted file mode 100644 index 67a272357277..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/list_devices.php +++ /dev/null @@ -1,72 +0,0 @@ -listDevices($formattedParent); - - /** @var Device $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 = DeviceManagerClient::registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - - list_devices_sample($formattedParent); -} -// [END cloudiot_v1_generated_DeviceManager_ListDevices_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/modify_cloud_to_device_config.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/modify_cloud_to_device_config.php deleted file mode 100644 index df21a9a7cfbe..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/modify_cloud_to_device_config.php +++ /dev/null @@ -1,77 +0,0 @@ -modifyCloudToDeviceConfig($formattedName, $binaryData); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DeviceManagerClient::deviceName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - $binaryData = '...'; - - modify_cloud_to_device_config_sample($formattedName, $binaryData); -} -// [END cloudiot_v1_generated_DeviceManager_ModifyCloudToDeviceConfig_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/send_command_to_device.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/send_command_to_device.php deleted file mode 100644 index e57e5dfa9e89..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/send_command_to_device.php +++ /dev/null @@ -1,87 +0,0 @@ -sendCommandToDevice($formattedName, $binaryData); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DeviceManagerClient::deviceName( - '[PROJECT]', - '[LOCATION]', - '[REGISTRY]', - '[DEVICE]' - ); - $binaryData = '...'; - - send_command_to_device_sample($formattedName, $binaryData); -} -// [END cloudiot_v1_generated_DeviceManager_SendCommandToDevice_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/set_iam_policy.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/set_iam_policy.php deleted file mode 100644 index 42a0bf60dacd..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/set_iam_policy.php +++ /dev/null @@ -1,70 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 cloudiot_v1_generated_DeviceManager_SetIamPolicy_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/test_iam_permissions.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/test_iam_permissions.php deleted file mode 100644 index 5b3654ebe1c5..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/test_iam_permissions.php +++ /dev/null @@ -1,76 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 cloudiot_v1_generated_DeviceManager_TestIamPermissions_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/unbind_device_from_gateway.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/unbind_device_from_gateway.php deleted file mode 100644 index f15be0f4177a..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/unbind_device_from_gateway.php +++ /dev/null @@ -1,77 +0,0 @@ -unbindDeviceFromGateway($formattedParent, $gatewayId, $deviceId); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DeviceManagerClient::registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - $gatewayId = '[GATEWAY_ID]'; - $deviceId = '[DEVICE_ID]'; - - unbind_device_from_gateway_sample($formattedParent, $gatewayId, $deviceId); -} -// [END cloudiot_v1_generated_DeviceManager_UnbindDeviceFromGateway_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device.php deleted file mode 100644 index a18c527d4de0..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device.php +++ /dev/null @@ -1,58 +0,0 @@ -updateDevice($device, $updateMask); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudiot_v1_generated_DeviceManager_UpdateDevice_sync] diff --git a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device_registry.php b/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device_registry.php deleted file mode 100644 index 25e217956dfd..000000000000 --- a/owl-bot-staging/Iot/v1/samples/V1/DeviceManagerClient/update_device_registry.php +++ /dev/null @@ -1,58 +0,0 @@ -updateDeviceRegistry($deviceRegistry, $updateMask); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudiot_v1_generated_DeviceManager_UpdateDeviceRegistry_sync] diff --git a/owl-bot-staging/Iot/v1/src/V1/DeviceManagerClient.php b/owl-bot-staging/Iot/v1/src/V1/DeviceManagerClient.php deleted file mode 100644 index f545ce696ad9..000000000000 --- a/owl-bot-staging/Iot/v1/src/V1/DeviceManagerClient.php +++ /dev/null @@ -1,34 +0,0 @@ -registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * $gatewayId = 'gateway_id'; - * $deviceId = 'device_id'; - * $response = $deviceManagerClient->bindDeviceToGateway($formattedParent, $gatewayId, $deviceId); - * } finally { - * $deviceManagerClient->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. - */ -class DeviceManagerGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.iot.v1.DeviceManager'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'cloudiot.googleapis.com'; - - /** 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/cloudiot', - ]; - - private static $deviceNameTemplate; - - private static $locationNameTemplate; - - private static $registryNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/device_manager_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/device_manager_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/device_manager_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/device_manager_rest_client_config.php', - ], - ], - ]; - } - - private static function getDeviceNameTemplate() - { - if (self::$deviceNameTemplate == null) { - self::$deviceNameTemplate = new PathTemplate('projects/{project}/locations/{location}/registries/{registry}/devices/{device}'); - } - - return self::$deviceNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getRegistryNameTemplate() - { - if (self::$registryNameTemplate == null) { - self::$registryNameTemplate = new PathTemplate('projects/{project}/locations/{location}/registries/{registry}'); - } - - return self::$registryNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'device' => self::getDeviceNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'registry' => self::getRegistryNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a device - * resource. - * - * @param string $project - * @param string $location - * @param string $registry - * @param string $device - * - * @return string The formatted device resource. - */ - public static function deviceName($project, $location, $registry, $device) - { - return self::getDeviceNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'registry' => $registry, - 'device' => $device, - ]); - } - - /** - * 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($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a registry - * resource. - * - * @param string $project - * @param string $location - * @param string $registry - * - * @return string The formatted registry resource. - */ - public static function registryName($project, $location, $registry) - { - return self::getRegistryNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'registry' => $registry, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - device: projects/{project}/locations/{location}/registries/{registry}/devices/{device} - * - location: projects/{project}/locations/{location} - * - registry: projects/{project}/locations/{location}/registries/{registry} - * - * 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 'cloudiot.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); - } - - /** - * Associates the device with the gateway. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $formattedParent = $deviceManagerClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * $gatewayId = 'gateway_id'; - * $deviceId = 'device_id'; - * $response = $deviceManagerClient->bindDeviceToGateway($formattedParent, $gatewayId, $deviceId); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param string $gatewayId Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * @param string $deviceId Required. The device to associate with the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * @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\Iot\V1\BindDeviceToGatewayResponse - * - * @throws ApiException if the remote call fails - */ - public function bindDeviceToGateway($parent, $gatewayId, $deviceId, array $optionalArgs = []) - { - $request = new BindDeviceToGatewayRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setGatewayId($gatewayId); - $request->setDeviceId($deviceId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BindDeviceToGateway', BindDeviceToGatewayResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a device in a device registry. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $formattedParent = $deviceManagerClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * $device = new Device(); - * $response = $deviceManagerClient->createDevice($formattedParent, $device); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the device registry where this device should be created. - * For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param Device $device Required. The device registration details. The field `name` must be empty. The server - * generates `name` from the device registry `id` and the - * `parent` field. - * @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\Iot\V1\Device - * - * @throws ApiException if the remote call fails - */ - public function createDevice($parent, $device, array $optionalArgs = []) - { - $request = new CreateDeviceRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDevice($device); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateDevice', Device::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a device registry that contains devices. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $formattedParent = $deviceManagerClient->locationName('[PROJECT]', '[LOCATION]'); - * $deviceRegistry = new DeviceRegistry(); - * $response = $deviceManagerClient->createDeviceRegistry($formattedParent, $deviceRegistry); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and cloud region where this device registry must be created. - * For example, `projects/example-project/locations/us-central1`. - * @param DeviceRegistry $deviceRegistry Required. The device registry. The field `name` must be empty. The server will - * generate that field from the device registry `id` provided and the - * `parent` field. - * @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\Iot\V1\DeviceRegistry - * - * @throws ApiException if the remote call fails - */ - public function createDeviceRegistry($parent, $deviceRegistry, array $optionalArgs = []) - { - $request = new CreateDeviceRegistryRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDeviceRegistry($deviceRegistry); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateDeviceRegistry', DeviceRegistry::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a device. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $formattedName = $deviceManagerClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - * $deviceManagerClient->deleteDevice($formattedName); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_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 deleteDevice($name, array $optionalArgs = []) - { - $request = new DeleteDeviceRequest(); - $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('DeleteDevice', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a device registry configuration. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $formattedName = $deviceManagerClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * $deviceManagerClient->deleteDeviceRegistry($formattedName); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @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 deleteDeviceRegistry($name, array $optionalArgs = []) - { - $request = new DeleteDeviceRegistryRequest(); - $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('DeleteDeviceRegistry', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets details about a device. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $formattedName = $deviceManagerClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - * $response = $deviceManagerClient->getDevice($formattedName); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $fieldMask - * The fields of the `Device` resource to be returned in the response. If the - * field mask is unset or empty, all fields are returned. Fields have to be - * provided in snake_case format, for example: `last_heartbeat_time`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iot\V1\Device - * - * @throws ApiException if the remote call fails - */ - public function getDevice($name, array $optionalArgs = []) - { - $request = new GetDeviceRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['fieldMask'])) { - $request->setFieldMask($optionalArgs['fieldMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDevice', Device::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a device registry configuration. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $formattedName = $deviceManagerClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * $response = $deviceManagerClient->getDeviceRegistry($formattedName); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the device registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @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\Iot\V1\DeviceRegistry - * - * @throws ApiException if the remote call fails - */ - public function getDeviceRegistry($name, array $optionalArgs = []) - { - $request = new GetDeviceRegistryRequest(); - $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('GetDeviceRegistry', DeviceRegistry::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy for a resource. - * Returns an empty policy if the resource exists and does not have a policy - * set. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $resource = 'resource'; - * $response = $deviceManagerClient->getIamPolicy($resource); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the last few versions of the device configuration in descending - * order (i.e.: newest first). - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $formattedName = $deviceManagerClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - * $response = $deviceManagerClient->listDeviceConfigVersions($formattedName); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $numVersions - * The number of versions to list. Versions are listed in decreasing order of - * the version number. The maximum number of versions retained is 10. If this - * value is zero, it will return all the versions available. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iot\V1\ListDeviceConfigVersionsResponse - * - * @throws ApiException if the remote call fails - */ - public function listDeviceConfigVersions($name, array $optionalArgs = []) - { - $request = new ListDeviceConfigVersionsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['numVersions'])) { - $request->setNumVersions($optionalArgs['numVersions']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ListDeviceConfigVersions', ListDeviceConfigVersionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists device registries. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $formattedParent = $deviceManagerClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $deviceManagerClient->listDeviceRegistries($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $deviceManagerClient->listDeviceRegistries($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and cloud region path. For example, - * `projects/example-project/locations/us-central1`. - * @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 listDeviceRegistries($parent, array $optionalArgs = []) - { - $request = new ListDeviceRegistriesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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('ListDeviceRegistries', $optionalArgs, ListDeviceRegistriesResponse::class, $request); - } - - /** - * Lists the last few versions of the device state in descending order (i.e.: - * newest first). - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $formattedName = $deviceManagerClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - * $response = $deviceManagerClient->listDeviceStates($formattedName); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $numStates - * The number of states to list. States are listed in descending order of - * update time. The maximum number of states retained is 10. If this - * value is zero, it will return all the states available. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iot\V1\ListDeviceStatesResponse - * - * @throws ApiException if the remote call fails - */ - public function listDeviceStates($name, array $optionalArgs = []) - { - $request = new ListDeviceStatesRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['numStates'])) { - $request->setNumStates($optionalArgs['numStates']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ListDeviceStates', ListDeviceStatesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * List devices in a device registry. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $formattedParent = $deviceManagerClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * // Iterate over pages of elements - * $pagedResponse = $deviceManagerClient->listDevices($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $deviceManagerClient->listDevices($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $parent Required. The device registry path. Required. For example, - * `projects/my-project/locations/us-central1/registries/my-registry`. - * @param array $optionalArgs { - * Optional. - * - * @type int[] $deviceNumIds - * A list of device numeric IDs. If empty, this field is ignored. Maximum - * IDs: 10,000. - * @type string[] $deviceIds - * A list of device string IDs. For example, `['device0', 'device12']`. - * If empty, this field is ignored. Maximum IDs: 10,000 - * @type FieldMask $fieldMask - * The fields of the `Device` resource to be returned in the response. The - * fields `id` and `num_id` are always returned, along with any - * other fields specified in snake_case format, for example: - * `last_heartbeat_time`. - * @type GatewayListOptions $gatewayListOptions - * Options related to gateways. - * @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 listDevices($parent, array $optionalArgs = []) - { - $request = new ListDevicesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['deviceNumIds'])) { - $request->setDeviceNumIds($optionalArgs['deviceNumIds']); - } - - if (isset($optionalArgs['deviceIds'])) { - $request->setDeviceIds($optionalArgs['deviceIds']); - } - - if (isset($optionalArgs['fieldMask'])) { - $request->setFieldMask($optionalArgs['fieldMask']); - } - - if (isset($optionalArgs['gatewayListOptions'])) { - $request->setGatewayListOptions($optionalArgs['gatewayListOptions']); - } - - 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('ListDevices', $optionalArgs, ListDevicesResponse::class, $request); - } - - /** - * Modifies the configuration for the device, which is eventually sent from - * the Cloud IoT Core servers. Returns the modified configuration version and - * its metadata. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $formattedName = $deviceManagerClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - * $binaryData = '...'; - * $response = $deviceManagerClient->modifyCloudToDeviceConfig($formattedName, $binaryData); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param string $binaryData Required. The configuration data for the device. - * @param array $optionalArgs { - * Optional. - * - * @type int $versionToUpdate - * The version number to update. If this value is zero, it will not check the - * version number of the server and will always update the current version; - * otherwise, this update will fail if the version number found on the server - * does not match this version number. This is used to support multiple - * simultaneous updates without losing data. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iot\V1\DeviceConfig - * - * @throws ApiException if the remote call fails - */ - public function modifyCloudToDeviceConfig($name, $binaryData, array $optionalArgs = []) - { - $request = new ModifyCloudToDeviceConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setBinaryData($binaryData); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['versionToUpdate'])) { - $request->setVersionToUpdate($optionalArgs['versionToUpdate']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ModifyCloudToDeviceConfig', DeviceConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Sends a command to the specified device. In order for a device to be able - * to receive commands, it must: - * 1) be connected to Cloud IoT Core using the MQTT protocol, and - * 2) be subscribed to the group of MQTT topics specified by - * /devices/{device-id}/commands/#. This subscription will receive commands - * at the top-level topic /devices/{device-id}/commands as well as commands - * for subfolders, like /devices/{device-id}/commands/subfolder. - * Note that subscribing to specific subfolders is not supported. - * If the command could not be delivered to the device, this method will - * return an error; in particular, if the device is not subscribed, this - * method will return FAILED_PRECONDITION. Otherwise, this method will - * return OK. If the subscription is QoS 1, at least once delivery will be - * guaranteed; for QoS 0, no acknowledgment will be expected from the device. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $formattedName = $deviceManagerClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - * $binaryData = '...'; - * $response = $deviceManagerClient->sendCommandToDevice($formattedName, $binaryData); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the device. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0` or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param string $binaryData Required. The command data to send to the device. - * @param array $optionalArgs { - * Optional. - * - * @type string $subfolder - * Optional subfolder for the command. If empty, the command will be delivered - * to the /devices/{device-id}/commands topic, otherwise it will be delivered - * to the /devices/{device-id}/commands/{subfolder} topic. Multi-level - * subfolders are allowed. This field must not have more than 256 characters, - * and must not contain any MQTT wildcards ("+" or "#") or null characters. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iot\V1\SendCommandToDeviceResponse - * - * @throws ApiException if the remote call fails - */ - public function sendCommandToDevice($name, $binaryData, array $optionalArgs = []) - { - $request = new SendCommandToDeviceRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setBinaryData($binaryData); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['subfolder'])) { - $request->setSubfolder($optionalArgs['subfolder']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SendCommandToDevice', SendCommandToDeviceResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces any - * existing policy. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $deviceManagerClient->setIamPolicy($resource, $policy); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - 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('SetIamPolicy', Policy::class, $optionalArgs, $request)->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. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $deviceManagerClient->testIamPermissions($resource, $permissions); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @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\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes the association between the device and the gateway. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $formattedParent = $deviceManagerClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - * $gatewayId = 'gateway_id'; - * $deviceId = 'device_id'; - * $response = $deviceManagerClient->unbindDeviceFromGateway($formattedParent, $gatewayId, $deviceId); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the registry. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param string $gatewayId Required. The value of `gateway_id` can be either the device numeric ID or the - * user-defined device identifier. - * @param string $deviceId Required. The device to disassociate from the specified gateway. The value of - * `device_id` can be either the device numeric ID or the user-defined device - * identifier. - * @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\Iot\V1\UnbindDeviceFromGatewayResponse - * - * @throws ApiException if the remote call fails - */ - public function unbindDeviceFromGateway($parent, $gatewayId, $deviceId, array $optionalArgs = []) - { - $request = new UnbindDeviceFromGatewayRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setGatewayId($gatewayId); - $request->setDeviceId($deviceId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UnbindDeviceFromGateway', UnbindDeviceFromGatewayResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a device. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $device = new Device(); - * $updateMask = new FieldMask(); - * $response = $deviceManagerClient->updateDevice($device, $updateMask); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param Device $device Required. The new values for the device. The `id` and `num_id` fields must - * be empty, and the field `name` must specify the name path. For example, - * `projects/p0/locations/us-central1/registries/registry0/devices/device0`or - * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. - * @param FieldMask $updateMask Required. Only updates the `device` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `credentials`, `blocked`, and `metadata` - * @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\Iot\V1\Device - * - * @throws ApiException if the remote call fails - */ - public function updateDevice($device, $updateMask, array $optionalArgs = []) - { - $request = new UpdateDeviceRequest(); - $requestParamHeaders = []; - $request->setDevice($device); - $request->setUpdateMask($updateMask); - $requestParamHeaders['device.name'] = $device->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateDevice', Device::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a device registry configuration. - * - * Sample code: - * ``` - * $deviceManagerClient = new DeviceManagerClient(); - * try { - * $deviceRegistry = new DeviceRegistry(); - * $updateMask = new FieldMask(); - * $response = $deviceManagerClient->updateDeviceRegistry($deviceRegistry, $updateMask); - * } finally { - * $deviceManagerClient->close(); - * } - * ``` - * - * @param DeviceRegistry $deviceRegistry Required. The new values for the device registry. The `id` field must be empty, and - * the `name` field must indicate the path of the resource. For example, - * `projects/example-project/locations/us-central1/registries/my-registry`. - * @param FieldMask $updateMask Required. Only updates the `device_registry` fields indicated by this mask. - * The field mask must not be empty, and it must not contain fields that - * are immutable or only set by the server. - * Mutable top-level fields: `event_notification_config`, `http_config`, - * `mqtt_config`, and `state_notification_config`. - * @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\Iot\V1\DeviceRegistry - * - * @throws ApiException if the remote call fails - */ - public function updateDeviceRegistry($deviceRegistry, $updateMask, array $optionalArgs = []) - { - $request = new UpdateDeviceRegistryRequest(); - $requestParamHeaders = []; - $request->setDeviceRegistry($deviceRegistry); - $request->setUpdateMask($updateMask); - $requestParamHeaders['device_registry.name'] = $deviceRegistry->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateDeviceRegistry', DeviceRegistry::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Iot/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Iot/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 44cbd64530db..000000000000 --- a/owl-bot-staging/Iot/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.iot.v1", - "libraryPackage": "Google\\Cloud\\Iot\\V1", - "services": { - "DeviceManager": { - "clients": { - "grpc": { - "libraryClient": "DeviceManagerGapicClient", - "rpcs": { - "BindDeviceToGateway": { - "methods": [ - "bindDeviceToGateway" - ] - }, - "CreateDevice": { - "methods": [ - "createDevice" - ] - }, - "CreateDeviceRegistry": { - "methods": [ - "createDeviceRegistry" - ] - }, - "DeleteDevice": { - "methods": [ - "deleteDevice" - ] - }, - "DeleteDeviceRegistry": { - "methods": [ - "deleteDeviceRegistry" - ] - }, - "GetDevice": { - "methods": [ - "getDevice" - ] - }, - "GetDeviceRegistry": { - "methods": [ - "getDeviceRegistry" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "ListDeviceConfigVersions": { - "methods": [ - "listDeviceConfigVersions" - ] - }, - "ListDeviceRegistries": { - "methods": [ - "listDeviceRegistries" - ] - }, - "ListDeviceStates": { - "methods": [ - "listDeviceStates" - ] - }, - "ListDevices": { - "methods": [ - "listDevices" - ] - }, - "ModifyCloudToDeviceConfig": { - "methods": [ - "modifyCloudToDeviceConfig" - ] - }, - "SendCommandToDevice": { - "methods": [ - "sendCommandToDevice" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UnbindDeviceFromGateway": { - "methods": [ - "unbindDeviceFromGateway" - ] - }, - "UpdateDevice": { - "methods": [ - "updateDevice" - ] - }, - "UpdateDeviceRegistry": { - "methods": [ - "updateDeviceRegistry" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_client_config.json b/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_client_config.json deleted file mode 100644 index 9221a9430dee..000000000000 --- a/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_client_config.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "interfaces": { - "google.cloud.iot.v1.DeviceManager": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ], - "retry_policy_2_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED", - "RESOURCE_EXHAUSTED" - ] - }, - "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": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 - } - }, - "methods": { - "BindDeviceToGateway": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateDevice": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateDeviceRegistry": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteDevice": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteDeviceRegistry": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetDevice": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetDeviceRegistry": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListDeviceConfigVersions": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDeviceRegistries": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDeviceStates": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDevices": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ModifyCloudToDeviceConfig": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "SendCommandToDevice": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "SetIamPolicy": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UnbindDeviceFromGateway": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateDevice": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateDeviceRegistry": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_descriptor_config.php b/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_descriptor_config.php deleted file mode 100644 index af9ad00a9bc3..000000000000 --- a/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_descriptor_config.php +++ /dev/null @@ -1,28 +0,0 @@ - [ - 'google.cloud.iot.v1.DeviceManager' => [ - 'ListDeviceRegistries' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDeviceRegistries', - ], - ], - 'ListDevices' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDevices', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_rest_client_config.php b/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_rest_client_config.php deleted file mode 100644 index dbf0bf784afc..000000000000 --- a/owl-bot-staging/Iot/v1/src/V1/resources/device_manager_rest_client_config.php +++ /dev/null @@ -1,320 +0,0 @@ - [ - 'google.cloud.iot.v1.DeviceManager' => [ - 'BindDeviceToGateway' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/registries/*}:bindDeviceToGateway', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/registries/*/groups/*}:bindDeviceToGateway', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDevice' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/registries/*}/devices', - 'body' => 'device', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDeviceRegistry' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/registries', - 'body' => 'device_registry', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDevice' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDeviceRegistry' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDevice' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDeviceRegistry' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*}:getIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*/groups/*}:getIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'ListDeviceConfigVersions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}/configVersions', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/configVersions', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDeviceRegistries' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/registries', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDeviceStates' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}/states', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}/states', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDevices' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/registries/*}/devices', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/registries/*/groups/*}/devices', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ModifyCloudToDeviceConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:modifyCloudToDeviceConfig', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SendCommandToDevice' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/devices/*}:sendCommandToDevice', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/registries/*/groups/*/devices/*}:sendCommandToDevice', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*/groups/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/registries/*/groups/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UnbindDeviceFromGateway' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/registries/*}:unbindDeviceFromGateway', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/registries/*/groups/*}:unbindDeviceFromGateway', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDevice' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{device.name=projects/*/locations/*/registries/*/devices/*}', - 'body' => 'device', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{device.name=projects/*/locations/*/registries/*/groups/*/devices/*}', - 'body' => 'device', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'device.name' => [ - 'getters' => [ - 'getDevice', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateDeviceRegistry' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{device_registry.name=projects/*/locations/*/registries/*}', - 'body' => 'device_registry', - 'placeholders' => [ - 'device_registry.name' => [ - 'getters' => [ - 'getDeviceRegistry', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Iot/v1/tests/Unit/V1/DeviceManagerClientTest.php b/owl-bot-staging/Iot/v1/tests/Unit/V1/DeviceManagerClientTest.php deleted file mode 100644 index 08098eaad51d..000000000000 --- a/owl-bot-staging/Iot/v1/tests/Unit/V1/DeviceManagerClientTest.php +++ /dev/null @@ -1,1290 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DeviceManagerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DeviceManagerClient($options); - } - - /** @test */ - public function bindDeviceToGatewayTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BindDeviceToGatewayResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - $gatewayId = 'gatewayId955798774'; - $deviceId = 'deviceId25209764'; - $response = $gapicClient->bindDeviceToGateway($formattedParent, $gatewayId, $deviceId); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/BindDeviceToGateway', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getGatewayId(); - $this->assertProtobufEquals($gatewayId, $actualValue); - $actualValue = $actualRequestObject->getDeviceId(); - $this->assertProtobufEquals($deviceId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function bindDeviceToGatewayExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - $gatewayId = 'gatewayId955798774'; - $deviceId = 'deviceId25209764'; - try { - $gapicClient->bindDeviceToGateway($formattedParent, $gatewayId, $deviceId); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDeviceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name = 'name3373707'; - $numId = 1034366860; - $blocked = true; - $expectedResponse = new Device(); - $expectedResponse->setId($id); - $expectedResponse->setName($name); - $expectedResponse->setNumId($numId); - $expectedResponse->setBlocked($blocked); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - $device = new Device(); - $response = $gapicClient->createDevice($formattedParent, $device); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/CreateDevice', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDevice(); - $this->assertProtobufEquals($device, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDeviceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - $device = new Device(); - try { - $gapicClient->createDevice($formattedParent, $device); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDeviceRegistryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name = 'name3373707'; - $expectedResponse = new DeviceRegistry(); - $expectedResponse->setId($id); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $deviceRegistry = new DeviceRegistry(); - $response = $gapicClient->createDeviceRegistry($formattedParent, $deviceRegistry); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/CreateDeviceRegistry', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDeviceRegistry(); - $this->assertProtobufEquals($deviceRegistry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDeviceRegistryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $deviceRegistry = new DeviceRegistry(); - try { - $gapicClient->createDeviceRegistry($formattedParent, $deviceRegistry); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDeviceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - $gapicClient->deleteDevice($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/DeleteDevice', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDeviceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - try { - $gapicClient->deleteDevice($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 deleteDeviceRegistryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - $gapicClient->deleteDeviceRegistry($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/DeleteDeviceRegistry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDeviceRegistryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - try { - $gapicClient->deleteDeviceRegistry($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 getDeviceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name2 = 'name2-1052831874'; - $numId = 1034366860; - $blocked = true; - $expectedResponse = new Device(); - $expectedResponse->setId($id); - $expectedResponse->setName($name2); - $expectedResponse->setNumId($numId); - $expectedResponse->setBlocked($blocked); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - $response = $gapicClient->getDevice($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/GetDevice', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDeviceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - try { - $gapicClient->getDevice($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 getDeviceRegistryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name2 = 'name2-1052831874'; - $expectedResponse = new DeviceRegistry(); - $expectedResponse->setId($id); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - $response = $gapicClient->getDeviceRegistry($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/GetDeviceRegistry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDeviceRegistryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - try { - $gapicClient->getDeviceRegistry($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 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'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/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'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDeviceConfigVersionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListDeviceConfigVersionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - $response = $gapicClient->listDeviceConfigVersions($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/ListDeviceConfigVersions', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDeviceConfigVersionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - try { - $gapicClient->listDeviceConfigVersions($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 listDeviceRegistriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $deviceRegistriesElement = new DeviceRegistry(); - $deviceRegistries = [ - $deviceRegistriesElement, - ]; - $expectedResponse = new ListDeviceRegistriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDeviceRegistries($deviceRegistries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listDeviceRegistries($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDeviceRegistries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/ListDeviceRegistries', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDeviceRegistriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listDeviceRegistries($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 listDeviceStatesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListDeviceStatesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - $response = $gapicClient->listDeviceStates($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/ListDeviceStates', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDeviceStatesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - try { - $gapicClient->listDeviceStates($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 listDevicesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $devicesElement = new Device(); - $devices = [ - $devicesElement, - ]; - $expectedResponse = new ListDevicesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDevices($devices); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - $response = $gapicClient->listDevices($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDevices()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/ListDevices', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDevicesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - try { - $gapicClient->listDevices($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 modifyCloudToDeviceConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $binaryData2 = '-37'; - $expectedResponse = new DeviceConfig(); - $expectedResponse->setVersion($version); - $expectedResponse->setBinaryData($binaryData2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - $binaryData = '40'; - $response = $gapicClient->modifyCloudToDeviceConfig($formattedName, $binaryData); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/ModifyCloudToDeviceConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getBinaryData(); - $this->assertProtobufEquals($binaryData, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function modifyCloudToDeviceConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - $binaryData = '40'; - try { - $gapicClient->modifyCloudToDeviceConfig($formattedName, $binaryData); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function sendCommandToDeviceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SendCommandToDeviceResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - $binaryData = '40'; - $response = $gapicClient->sendCommandToDevice($formattedName, $binaryData); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/SendCommandToDevice', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getBinaryData(); - $this->assertProtobufEquals($binaryData, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function sendCommandToDeviceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->deviceName('[PROJECT]', '[LOCATION]', '[REGISTRY]', '[DEVICE]'); - $binaryData = '40'; - try { - $gapicClient->sendCommandToDevice($formattedName, $binaryData); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/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(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/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 = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function unbindDeviceFromGatewayTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new UnbindDeviceFromGatewayResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - $gatewayId = 'gatewayId955798774'; - $deviceId = 'deviceId25209764'; - $response = $gapicClient->unbindDeviceFromGateway($formattedParent, $gatewayId, $deviceId); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/UnbindDeviceFromGateway', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getGatewayId(); - $this->assertProtobufEquals($gatewayId, $actualValue); - $actualValue = $actualRequestObject->getDeviceId(); - $this->assertProtobufEquals($deviceId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function unbindDeviceFromGatewayExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->registryName('[PROJECT]', '[LOCATION]', '[REGISTRY]'); - $gatewayId = 'gatewayId955798774'; - $deviceId = 'deviceId25209764'; - try { - $gapicClient->unbindDeviceFromGateway($formattedParent, $gatewayId, $deviceId); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDeviceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name = 'name3373707'; - $numId = 1034366860; - $blocked = true; - $expectedResponse = new Device(); - $expectedResponse->setId($id); - $expectedResponse->setName($name); - $expectedResponse->setNumId($numId); - $expectedResponse->setBlocked($blocked); - $transport->addResponse($expectedResponse); - // Mock request - $device = new Device(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateDevice($device, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/UpdateDevice', $actualFuncCall); - $actualValue = $actualRequestObject->getDevice(); - $this->assertProtobufEquals($device, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDeviceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $device = new Device(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateDevice($device, $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()); - } - - /** @test */ - public function updateDeviceRegistryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $name = 'name3373707'; - $expectedResponse = new DeviceRegistry(); - $expectedResponse->setId($id); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $deviceRegistry = new DeviceRegistry(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateDeviceRegistry($deviceRegistry, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.iot.v1.DeviceManager/UpdateDeviceRegistry', $actualFuncCall); - $actualValue = $actualRequestObject->getDeviceRegistry(); - $this->assertProtobufEquals($deviceRegistry, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDeviceRegistryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $deviceRegistry = new DeviceRegistry(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateDeviceRegistry($deviceRegistry, $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/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/EkmService.php b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/EkmService.php deleted file mode 100644 index 10703d96b004..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/EkmService.php +++ /dev/null @@ -1,86 +0,0 @@ -internalAddGeneratedFile( - ' -â -%google/cloud/kms/v1/ekm_service.protogoogle.cloud.kms.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"³ -ListEkmConnectionsRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"† -ListEkmConnectionsResponse; -ekm_connections ( 2".google.cloud.kms.v1.EkmConnection -next_page_token (  - -total_size ("V -GetEkmConnectionRequest; -name ( B-àAúA\' -%cloudkms.googleapis.com/EkmConnection"¸ -CreateEkmConnectionRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location -ekm_connection_id ( BàA? -ekm_connection ( 2".google.cloud.kms.v1.EkmConnectionBàA"“ -UpdateEkmConnectionRequest? -ekm_connection ( 2".google.cloud.kms.v1.EkmConnectionBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"¿ - Certificate -raw_der ( BàA -parsed (BàA -issuer ( BàA -subject ( BàA* -subject_alternative_dns_names ( BàA8 -not_before_time ( 2.google.protobuf.TimestampBàA7 -not_after_time ( 2.google.protobuf.TimestampBàA - serial_number ( BàA -sha256_fingerprint ( BàA" - EkmConnection -name ( BàA4 - create_time ( 2.google.protobuf.TimestampBàAM -service_resolvers ( 22.google.cloud.kms.v1.EkmConnection.ServiceResolver -etag ( BàAÞ -ServiceResolverR -service_directory_service ( B/àAúA) -\'servicedirectory.googleapis.com/Service -endpoint_filter ( BàA -hostname ( BàAB -server_certificates ( 2 .google.cloud.kms.v1.CertificateBàA:sêAp -%cloudkms.googleapis.com/EkmConnectionGprojects/{project}/locations/{location}/ekmConnections/{ekm_connection}2± - -EkmServiceº -ListEkmConnections..google.cloud.kms.v1.ListEkmConnectionsRequest/.google.cloud.kms.v1.ListEkmConnectionsResponse"C‚Óä“42/v1/{parent=projects/*/locations/*}/ekmConnectionsÚAparent§ -GetEkmConnection,.google.cloud.kms.v1.GetEkmConnectionRequest".google.cloud.kms.v1.EkmConnection"A‚Óä“42/v1/{name=projects/*/locations/*/ekmConnections/*}ÚAnameà -CreateEkmConnection/.google.cloud.kms.v1.CreateEkmConnectionRequest".google.cloud.kms.v1.EkmConnection"t‚Óä“D"2/v1/{parent=projects/*/locations/*}/ekmConnections:ekm_connectionÚA\'parent,ekm_connection_id,ekm_connectionâ -UpdateEkmConnection/.google.cloud.kms.v1.UpdateEkmConnectionRequest".google.cloud.kms.v1.EkmConnection"v‚Óä“S2A/v1/{ekm_connection.name=projects/*/locations/*/ekmConnections/*}:ekm_connectionÚAekm_connection,update_masktÊAcloudkms.googleapis.comÒAWhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloudkmsB’ -com.google.cloud.kms.v1BEkmServiceProtoPZ6google.golang.org/genproto/googleapis/cloud/kms/v1;kmsøªGoogle.Cloud.Kms.V1ÊGoogle\\Cloud\\Kms\\V1êA| -\'servicedirectory.googleapis.com/ServiceQprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Resources.php b/owl-bot-staging/Kms/v1/proto/src/GPBMetadata/Google/Cloud/Kms/V1/Resources.php deleted file mode 100644 index 6389765c617ffed73c9b409f6fc25a1f9f390f72..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6758 zcmc&(OK;oQ6&_iB>G(x4ld<9?4x=QECrzYCane+7GN2?{R$^O%q$o)%3_(-ZHWNw| zNXipW;6;J{h1qpkbdkjXMbRJ7ZI{LTfY}rU@(YTtdhX>zv`ojEWPo~OiszokJ+JTF z%iny}+wZ|Op+vgGRBX}~b`Ax5p9nqEunpDFg`NKHE-?kw==3z5m?=RhR)pnYSu356y)oe}CwQte-N5Zb6 zTLigJuHEf-Ra-N<0%fRlRkHG>;K-zFulEex?IXc6rb-=vn{So7HZi-3-YODHHMO2? zm{nYw%k2@{cN=}P@};Ymiqm$5701S0?u3z#1l#PBpmsqpiQPB5Ys_vc;K+Y!g}6%W zX{~jQ=#CF?{%sOW6itkJ6*_-gE6kHo2UHNm)q7=*N6y|j5AhUGA9*@EmwsiKZhIa%O~5zqwjFx%ZxNV!N)BsUcaM+5IIX5cM2M`!^3fl~ zD8C9bs!6bnWhyu^hLoA?Qp(+hXI09N1LMjm@5Qg-3fm*yqO%%zXQi;{)1JCDWPe3e z+e*K6pN`VHp|V`Sci!Vs`n6*pzQZTkL{pEF-%UZRU>;)aptvy0*I=q=Y8}NqbgjPO zSsnC!%9qi^RKO&3wk;uZ-|QI{NknnW^V#%=nFnI34jUCSG3>pGk-W!00KQA!*fO>Y z<_pL5Q)e-wwgsOB6I(OdiD|}k!86{EmsfHdpYbK&4xFvaHtF=i*`{*3)OGHw8`vQ&|2{_H5~Ytn5e7LYfVk71ntD@Gx5Yv~Tm1Z|pu zC@y!3fuDnk14ZvU6%fmfJ&YuO9|6wK9yjcK5|#_Km(@l^ek#3`tIulHN?nqlZP%+( zp}by}iri=XIarXk*($jxvHx6zz7*>(x3;84tz3}n<z`0+X~%b1W>|m&KOW`JLEO(bFE+`)Mj+wqb!*B`k;lN%6vUdx zN|SYRKy>Ec`Rw)3WU2a#H|bjbIm8rw&oDK6zvC9>SD}o<77XgsHA(cu&Z#2R0FZ4YbR(| zn04O1z-~*h2-JN=>spCPmfb&1Ujg~GT@AY^DKIHa@=_b(Cn#vdtcpO;t6G!lbu5-Bb_So44N}IF|KtMo=Y};52%f+M4W-w~*FwX0 zX2R5|2)+=Kz_c-sn7~eyk7Y41?w=!zqx?F|D1*dxoB!?5{hpGpj)6mr)195xd`Cm%`0Pvp~zs~aS6;8 ziV-7hJqhPsu3bgb`zDcbX0nWKfakf_x~24ixyUYE0XS0Bpt4KaKF0XKGndhhP9vK}>h zg1UP5*AG1E_^H(UnJl+}PFNb~eOjnzj%l6*mUTM;MQWHD}tMY53Zowi+kG-wIjpb z2&H>gWVm01(mfk8TZz{;6(s)yp=VuSqHli_LO>fpVr z<=8YUA2?^AqvRi>5Ua8qA;d^@ceF=3?jfKS96#w%cs~27z|E%tP=TzP>bt5RAEVNT;YAJJH+0{Gq4k=UwS@0c9``grJN_cKSY-NB%TTA`F%ZP z+>4FwU0=@7Kt-<1jBH{FHer2XU7xFiz3wbOcL9Z^WkK*L*ho z;$Ya<7(dn&otd+Yb-=2Qp3xJ|Wyjq!V#aRp@HWU#Qb*L!GzKpT5I>>eSVKtuD+05@ z#NjW)1-FsnL4KoB9BPT~c*5}8$3S*=#xrb9v#3UJiw$_Xq1~04uTZSUR299 zidSdcW%&9(?Jh&}S_gK2=UK)Rz)|vduzbdRodC|C-!VnyzNxvea0M30Yi!|0x9i?) zPtdgHlRlQ1*z#%H6xg)YO_ z-uQv1V-9A$Uvjfr;KuXcMPLyxS;HzPAIA?N-aWlVEi$T+-#&2fa`y~f>F%Wrb1#j@ zIEFmw!Nu*dk1%U^sr#Qu{89weDcYi+l@~=80lF)KuG)0b-uImua)umI za@%Yo&)j))&b{Z}_uhS+FTC7XZlI&7IZ`LK;gWJ{aV_O8lT^dDT&rYNQ;W@|C1R&a zR;^)HiJeZRuH8%Bz4tKn%C(yhkHDjj)wD|_m#SD+rAjiTs?{uKR%%XW^>oG|_NrMT zX*L={b)!a{hEXD^x%t^U#5Kx>YZT_#gN3W~!NRLGr?7DP5<;b_;W()Wd;s(gO2L1P z=3><>r5x9A;eW?Wr)btq*EFi;+kpIXYRRZN1fFfTU24`#u4&a%^nrWz5}7)Y;$u?V zV+{+KUQS6U^OQUgFWjuV#I76F!ZqTQY_s87_B@#8auwn#m(eRzC&X*%aOP5Kiet>> z+CW}TxptHI-=0d@#BJL3OAI$1U|s!H2ys-tVHWcBx<$QU)ty|<rn~ zQ-~v9E-Niuha8zw(W9|Ejy^Kbk*>*sN4ZIwOqDi{Fp}xaG8a-I!{1T^e+r93Vi;xdL^zG#*MFp; z(c7luzDm~aoAruwpS;;5j*Bm%freoNl?g4SO%2YT_#~hBJbx4&sahqj=rkW0NIPk$ zJDJsZVTS!?GKrXkf{#LJm)C^)Bu~ zNy{!1ySTVEu}xjp|E-}t6z^4g4e}gNE5sLC5EqU!$Vbp&=0X~)7Q}*c?||pg@G9sI z^18Tck|zxI&TLMM9}q`c0bSrvv|U($5wPb1k1O`OV8C<1*AnPJzy)Gt<%!7HML9xY z?A;YN(ANKf3qZ9@1vhIA%XV*Bi;DYyQ3YPiy35u@W5FzQ8ZapkoI!&tWUXk^)Pqdh zGBuPv5Go_7)p0aZCvUk$UnbEM8^jnP7bcr3Pdl1j+w`~5-hfcROX9s}&`^nGP!V1) z-+UV&`O9U(iL)m!sg?s(81UkrNqDXEY$lIYH`E(DdrhT68A=U6>G-y;SmTkJrHO6#j z_T^ZWv~5|Em&5RQ!s5+T71CR$B`_$QFDc7(Dw#;a#4}7E(Xft2ZO14Y#3}kM=mLjZ z+<0zwFBH?r~^IM-aMqucOcvATEw?0n$ee*dh}p z4iBk6dFVQNC>twz&Z40v8xkDitO&(U$~elUd|K_DIFb(`ms*gt$TU15IItcP0{4gS z8yY&+f^Xh7Ylgkn0<*^ouKW&)+tZ%#!9eS;qeIXpaBXW%J=gO3jm}H(23Ti76T(x( zCcojI8ru0vol%uq8xPFUgKUo8g0yM2qOTfs7yOpXl*Do`fv3?yqg;l*j0K&OqS1tQ zQXTp=w7XQK4Ih>RB9n7yS3`~g6})sNTbkI;hC7dh${19r#kGf^K{ei)gE5m@%gZN)Lnh}2->$w<7&bL&{plK z=aTpwI;l)z6?K}y$xuJg436uEpJ-@A<*x9S?EKZN$Gcmzu=P3R<+VxhnX z@c}gES^J79k8PM(Y53w2{ ztA<%M7OOnzlk_rK@n5EDN@m}C5sg6u>W)!|LzEgU%Ejp_hF;0Azln^eLT3@biCFwi zo`_+|U8!IG`ky}iAd$v1^kn!QegXYVOd|3K%D|}hMW?`cMv_u=VEncl42-Fcb3EMN))4YK z=lF$C*LnsLZ^u&<{Zc^WvI@;;=gLG92=}=% z)0Y_VFX6{5@iq&1rXi0zBn4W&fr3hxXbQ@tGX-VVpKQEj^ZEJb8rl&!1Hs`_N5DqH z?3{B#Aus7Y%`7=}O7b+npU*}!^4tVEd+KledswrzoFw4zqSaz0(TD3qrG;)Woy_U| z&o((eRC(GT*y(()BL`6 zAFT3u7ylX9bA`ubA8st88?%fRc`?u*Zt5(Y2u}RHoj)Fl;wQTH5*%j9RQZGg494-()elpS{Ln;w4DBk6OJR z%)!0hXfsXk#07tlXgk#DoO&(P`b)hJdFriZUvFV5&o29696GIrXX7Ey8}f|-ul&9J zfGK!@gD-}zE?S%ud?v06R+$PO=y&^_rq^>k!ok-=PCm^~QYHCHuVfEO$FMONk2o;G zXF};lSWBWYD^Z2OMm-*Qjqs^DIlwibpRRqBZ>;DgeHa~jv5&Wr!wu?3@ zJ{lS^)nsMAeVh#M&MKq8hHXxt?KeQv>p8*?@fg^hOoXbbi79N+MvH*0nrxk5E29AH z>w3Ol*z376KYnAVM|kR}Q#AYuGyuFlAZ?*VGysA|Qas^HwpLrgrO9%{fXzq0WWtlg z2%MlXo zws$i^FUTin{3mELtp{h5?#KD@h@X7@G5>hkbsJ7DlX>#wi6EkWmrj4$z`u7n3B}c2 zvh3PSEOYq9`0V>IIl__1ev>fcJM!k}@>`Dd*QxaCj`_*~i zvztpW{y#MBhl$ZS_GwM}D*d!34TGi^PJb+~7Q`1f?2{Y#=4Nq#4SMFd`g~!Af2!j9 SvL*7X7G}x6K3PZW2>l0p_PA;Q diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php deleted file mode 100644 index fd3af09b47d0..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptRequest.php +++ /dev/null @@ -1,297 +0,0 @@ -google.cloud.kms.v1.AsymmetricDecryptRequest - */ -class AsymmetricDecryptRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decryption. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The data encrypted with the named - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using - * OAEP. - * - * Generated from protobuf field bytes ciphertext = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ciphertext = ''; - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) - * is equal to - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ciphertext_crc32c = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decryption. - * @type string $ciphertext - * Required. The data encrypted with the named - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using - * OAEP. - * @type \Google\Protobuf\Int64Value $ciphertext_crc32c - * Optional. An optional CRC32C checksum of the - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) - * is equal to - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decryption. - * - * Generated 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 - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decryption. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 data encrypted with the named - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using - * OAEP. - * - * Generated from protobuf field bytes ciphertext = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCiphertext() - { - return $this->ciphertext; - } - - /** - * Required. The data encrypted with the named - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using - * OAEP. - * - * Generated from protobuf field bytes ciphertext = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCiphertext($var) - { - GPBUtil::checkString($var, False); - $this->ciphertext = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) - * is equal to - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getCiphertextCrc32C() - { - return $this->ciphertext_crc32c; - } - - public function hasCiphertextCrc32C() - { - return isset($this->ciphertext_crc32c); - } - - public function clearCiphertextCrc32C() - { - unset($this->ciphertext_crc32c); - } - - /** - * Returns the unboxed value from getCiphertextCrc32C() - - * Optional. An optional CRC32C checksum of the - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) - * is equal to - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getCiphertextCrc32CUnwrapped() - { - return $this->readWrapperValue("ciphertext_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) - * is equal to - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setCiphertextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->ciphertext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) - * is equal to - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setCiphertextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("ciphertext_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php deleted file mode 100644 index a50201e6aac9..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricDecryptResponse.php +++ /dev/null @@ -1,339 +0,0 @@ -google.cloud.kms.v1.AsymmetricDecryptResponse - */ -class AsymmetricDecryptResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The decrypted data originally encrypted with the matching public key. - * - * Generated from protobuf field bytes plaintext = 1; - */ - protected $plaintext = ''; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. - * An integrity check of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - */ - protected $plaintext_crc32c = null; - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A - * false value of this field indicates either that - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_ciphertext_crc32c = 3; - */ - protected $verified_ciphertext_crc32c = false; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $plaintext - * The decrypted data originally encrypted with the matching public key. - * @type \Google\Protobuf\Int64Value $plaintext_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. - * An integrity check of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * @type bool $verified_ciphertext_crc32c - * Integrity verification field. A flag indicating whether - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A - * false value of this field indicates either that - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The decrypted data originally encrypted with the matching public key. - * - * Generated from protobuf field bytes plaintext = 1; - * @return string - */ - public function getPlaintext() - { - return $this->plaintext; - } - - /** - * The decrypted data originally encrypted with the matching public key. - * - * Generated from protobuf field bytes plaintext = 1; - * @param string $var - * @return $this - */ - public function setPlaintext($var) - { - GPBUtil::checkString($var, False); - $this->plaintext = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. - * An integrity check of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @return \Google\Protobuf\Int64Value|null - */ - public function getPlaintextCrc32C() - { - return $this->plaintext_crc32c; - } - - public function hasPlaintextCrc32C() - { - return isset($this->plaintext_crc32c); - } - - public function clearPlaintextCrc32C() - { - unset($this->plaintext_crc32c); - } - - /** - * Returns the unboxed value from getPlaintextCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. - * An integrity check of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @return int|string|null - */ - public function getPlaintextCrc32CUnwrapped() - { - return $this->readWrapperValue("plaintext_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. - * An integrity check of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setPlaintextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->plaintext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext]. - * An integrity check of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [AsymmetricDecryptResponse.plaintext][google.cloud.kms.v1.AsymmetricDecryptResponse.plaintext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @param int|string|null $var - * @return $this - */ - public function setPlaintextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("plaintext_crc32c", $var); - return $this;} - - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A - * false value of this field indicates either that - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_ciphertext_crc32c = 3; - * @return bool - */ - public function getVerifiedCiphertextCrc32C() - { - return $this->verified_ciphertext_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. A - * false value of this field indicates either that - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_ciphertext_crc32c = 3; - * @param bool $var - * @return $this - */ - public function setVerifiedCiphertextCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_ciphertext_crc32c = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php deleted file mode 100644 index a9e4bdc34ec4..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignRequest.php +++ /dev/null @@ -1,544 +0,0 @@ -google.cloud.kms.v1.AsymmetricSignRequest - */ -class AsymmetricSignRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The digest of the data to sign. The digest must be produced with - * the same digest algorithm as specified by the key version's - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * This field may not be supplied if - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * is supplied. - * - * Generated from protobuf field .google.cloud.kms.v1.Digest digest = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $digest = null; - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) - * is equal to - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $digest_crc32c = null; - /** - * Optional. The data to sign. - * It can't be supplied if - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * is supplied. - * - * Generated from protobuf field bytes data = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data = ''; - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) - * is equal to - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_crc32c = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * @type \Google\Cloud\Kms\V1\Digest $digest - * Optional. The digest of the data to sign. The digest must be produced with - * the same digest algorithm as specified by the key version's - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * This field may not be supplied if - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * is supplied. - * @type \Google\Protobuf\Int64Value $digest_crc32c - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) - * is equal to - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * @type string $data - * Optional. The data to sign. - * It can't be supplied if - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * is supplied. - * @type \Google\Protobuf\Int64Value $data_crc32c - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) - * is equal to - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * - * Generated 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 - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 digest of the data to sign. The digest must be produced with - * the same digest algorithm as specified by the key version's - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * This field may not be supplied if - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * is supplied. - * - * Generated from protobuf field .google.cloud.kms.v1.Digest digest = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Kms\V1\Digest|null - */ - public function getDigest() - { - return $this->digest; - } - - public function hasDigest() - { - return isset($this->digest); - } - - public function clearDigest() - { - unset($this->digest); - } - - /** - * Optional. The digest of the data to sign. The digest must be produced with - * the same digest algorithm as specified by the key version's - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * This field may not be supplied if - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * is supplied. - * - * Generated from protobuf field .google.cloud.kms.v1.Digest digest = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Kms\V1\Digest $var - * @return $this - */ - public function setDigest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\Digest::class); - $this->digest = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) - * is equal to - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getDigestCrc32C() - { - return $this->digest_crc32c; - } - - public function hasDigestCrc32C() - { - return isset($this->digest_crc32c); - } - - public function clearDigestCrc32C() - { - unset($this->digest_crc32c); - } - - /** - * Returns the unboxed value from getDigestCrc32C() - - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) - * is equal to - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getDigestCrc32CUnwrapped() - { - return $this->readWrapperValue("digest_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) - * is equal to - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setDigestCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->digest_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) - * is equal to - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value digest_crc32c = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setDigestCrc32CUnwrapped($var) - { - $this->writeWrapperValue("digest_crc32c", $var); - return $this;} - - /** - * Optional. The data to sign. - * It can't be supplied if - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * is supplied. - * - * Generated from protobuf field bytes data = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * Optional. The data to sign. - * It can't be supplied if - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * is supplied. - * - * Generated from protobuf field bytes data = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkString($var, False); - $this->data = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) - * is equal to - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getDataCrc32C() - { - return $this->data_crc32c; - } - - public function hasDataCrc32C() - { - return isset($this->data_crc32c); - } - - public function clearDataCrc32C() - { - unset($this->data_crc32c); - } - - /** - * Returns the unboxed value from getDataCrc32C() - - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) - * is equal to - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getDataCrc32CUnwrapped() - { - return $this->readWrapperValue("data_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) - * is equal to - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setDataCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->data_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) - * is equal to - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setDataCrc32CUnwrapped($var) - { - $this->writeWrapperValue("data_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php deleted file mode 100644 index efec99a14768..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/AsymmetricSignResponse.php +++ /dev/null @@ -1,463 +0,0 @@ -google.cloud.kms.v1.AsymmetricSignResponse - */ -class AsymmetricSignResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The created signature. - * - * Generated from protobuf field bytes signature = 1; - */ - protected $signature = ''; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. - * An integrity check of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * can be performed by computing the CRC32C checksum of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; - */ - protected $signature_crc32c = null; - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value - * of this field indicates either that - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_digest_crc32c = 3; - */ - protected $verified_digest_crc32c = false; - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * - * Generated from protobuf field string name = 4; - */ - protected $name = ''; - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of - * this field indicates either that - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 5; - */ - protected $verified_data_crc32c = false; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $signature - * The created signature. - * @type \Google\Protobuf\Int64Value $signature_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. - * An integrity check of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * can be performed by computing the CRC32C checksum of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * @type bool $verified_digest_crc32c - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value - * of this field indicates either that - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type string $name - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * @type bool $verified_data_crc32c - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of - * this field indicates either that - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The created signature. - * - * Generated from protobuf field bytes signature = 1; - * @return string - */ - public function getSignature() - { - return $this->signature; - } - - /** - * The created signature. - * - * Generated from protobuf field bytes signature = 1; - * @param string $var - * @return $this - */ - public function setSignature($var) - { - GPBUtil::checkString($var, False); - $this->signature = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. - * An integrity check of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * can be performed by computing the CRC32C checksum of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; - * @return \Google\Protobuf\Int64Value|null - */ - public function getSignatureCrc32C() - { - return $this->signature_crc32c; - } - - public function hasSignatureCrc32C() - { - return isset($this->signature_crc32c); - } - - public function clearSignatureCrc32C() - { - unset($this->signature_crc32c); - } - - /** - * Returns the unboxed value from getSignatureCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. - * An integrity check of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * can be performed by computing the CRC32C checksum of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; - * @return int|string|null - */ - public function getSignatureCrc32CUnwrapped() - { - return $this->readWrapperValue("signature_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. - * An integrity check of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * can be performed by computing the CRC32C checksum of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setSignatureCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->signature_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. - * An integrity check of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * can be performed by computing the CRC32C checksum of - * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value signature_crc32c = 2; - * @param int|string|null $var - * @return $this - */ - public function setSignatureCrc32CUnwrapped($var) - { - $this->writeWrapperValue("signature_crc32c", $var); - return $this;} - - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value - * of this field indicates either that - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_digest_crc32c = 3; - * @return bool - */ - public function getVerifiedDigestCrc32C() - { - return $this->verified_digest_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value - * of this field indicates either that - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_digest_crc32c = 3; - * @param bool $var - * @return $this - */ - public function setVerifiedDigestCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_digest_crc32c = $var; - - return $this; - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * - * Generated from protobuf field string name = 4; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * - * Generated from protobuf field string name = 4; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of - * this field indicates either that - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 5; - * @return bool - */ - public function getVerifiedDataCrc32C() - { - return $this->verified_data_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.AsymmetricSignRequest.data]. A false value of - * this field indicates either that - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 5; - * @param bool $var - * @return $this - */ - public function setVerifiedDataCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_data_crc32c = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php deleted file mode 100644 index db653c93c4a9..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Certificate.php +++ /dev/null @@ -1,388 +0,0 @@ -google.cloud.kms.v1.Certificate - */ -class Certificate extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The raw certificate bytes in DER format. - * - * Generated from protobuf field bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $raw_der = ''; - /** - * Output only. True if the certificate was parsed successfully. - * - * Generated from protobuf field bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $parsed = false; - /** - * Output only. The issuer distinguished name in RFC 2253 format. Only present - * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $issuer = ''; - /** - * Output only. The subject distinguished name in RFC 2253 format. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $subject = ''; - /** - * Output only. The subject Alternative DNS names. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $subject_alternative_dns_names; - /** - * Output only. The certificate is not valid before this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field .google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $not_before_time = null; - /** - * Output only. The certificate is not valid after this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field .google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $not_after_time = null; - /** - * Output only. The certificate serial number as a hex string. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $serial_number = ''; - /** - * Output only. The SHA-256 certificate fingerprint as a hex string. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $sha256_fingerprint = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $raw_der - * Required. The raw certificate bytes in DER format. - * @type bool $parsed - * Output only. True if the certificate was parsed successfully. - * @type string $issuer - * Output only. The issuer distinguished name in RFC 2253 format. Only present - * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * @type string $subject - * Output only. The subject distinguished name in RFC 2253 format. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * @type array|\Google\Protobuf\Internal\RepeatedField $subject_alternative_dns_names - * Output only. The subject Alternative DNS names. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * @type \Google\Protobuf\Timestamp $not_before_time - * Output only. The certificate is not valid before this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * @type \Google\Protobuf\Timestamp $not_after_time - * Output only. The certificate is not valid after this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * @type string $serial_number - * Output only. The certificate serial number as a hex string. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * @type string $sha256_fingerprint - * Output only. The SHA-256 certificate fingerprint as a hex string. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The raw certificate bytes in DER format. - * - * Generated from protobuf field bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRawDer() - { - return $this->raw_der; - } - - /** - * Required. The raw certificate bytes in DER format. - * - * Generated from protobuf field bytes raw_der = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRawDer($var) - { - GPBUtil::checkString($var, False); - $this->raw_der = $var; - - return $this; - } - - /** - * Output only. True if the certificate was parsed successfully. - * - * Generated from protobuf field bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getParsed() - { - return $this->parsed; - } - - /** - * Output only. True if the certificate was parsed successfully. - * - * Generated from protobuf field bool parsed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setParsed($var) - { - GPBUtil::checkBool($var); - $this->parsed = $var; - - return $this; - } - - /** - * Output only. The issuer distinguished name in RFC 2253 format. Only present - * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getIssuer() - { - return $this->issuer; - } - - /** - * Output only. The issuer distinguished name in RFC 2253 format. Only present - * if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string issuer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setIssuer($var) - { - GPBUtil::checkString($var, True); - $this->issuer = $var; - - return $this; - } - - /** - * Output only. The subject distinguished name in RFC 2253 format. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Output only. The subject distinguished name in RFC 2253 format. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSubject($var) - { - GPBUtil::checkString($var, True); - $this->subject = $var; - - return $this; - } - - /** - * Output only. The subject Alternative DNS names. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubjectAlternativeDnsNames() - { - return $this->subject_alternative_dns_names; - } - - /** - * Output only. The subject Alternative DNS names. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field repeated string subject_alternative_dns_names = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubjectAlternativeDnsNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->subject_alternative_dns_names = $arr; - - return $this; - } - - /** - * Output only. The certificate is not valid before this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field .google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNotBeforeTime() - { - return $this->not_before_time; - } - - public function hasNotBeforeTime() - { - return isset($this->not_before_time); - } - - public function clearNotBeforeTime() - { - unset($this->not_before_time); - } - - /** - * Output only. The certificate is not valid before this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field .google.protobuf.Timestamp not_before_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNotBeforeTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->not_before_time = $var; - - return $this; - } - - /** - * Output only. The certificate is not valid after this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field .google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNotAfterTime() - { - return $this->not_after_time; - } - - public function hasNotAfterTime() - { - return isset($this->not_after_time); - } - - public function clearNotAfterTime() - { - unset($this->not_after_time); - } - - /** - * Output only. The certificate is not valid after this time. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field .google.protobuf.Timestamp not_after_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNotAfterTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->not_after_time = $var; - - return $this; - } - - /** - * Output only. The certificate serial number as a hex string. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSerialNumber() - { - return $this->serial_number; - } - - /** - * Output only. The certificate serial number as a hex string. Only present if - * [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string serial_number = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSerialNumber($var) - { - GPBUtil::checkString($var, True); - $this->serial_number = $var; - - return $this; - } - - /** - * Output only. The SHA-256 certificate fingerprint as a hex string. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSha256Fingerprint() - { - return $this->sha256_fingerprint; - } - - /** - * Output only. The SHA-256 certificate fingerprint as a hex string. Only - * present if [parsed][google.cloud.kms.v1.Certificate.parsed] is true. - * - * Generated from protobuf field string sha256_fingerprint = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSha256Fingerprint($var) - { - GPBUtil::checkString($var, True); - $this->sha256_fingerprint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php deleted file mode 100644 index 2871e7dd57a7..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyRequest.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.kms.v1.CreateCryptoKeyRequest - */ -class CreateCryptoKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing - * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $crypto_key_id = ''; - /** - * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $crypto_key = null; - /** - * If set to true, the request will create a - * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must - * manually call - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or - * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] - * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field bool skip_initial_version_creation = 5; - */ - protected $skip_initial_version_creation = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing - * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * @type string $crypto_key_id - * Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * @type \Google\Cloud\Kms\V1\CryptoKey $crypto_key - * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field - * values. - * @type bool $skip_initial_version_creation - * If set to true, the request will create a - * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must - * manually call - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or - * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] - * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing - * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * - * Generated 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][google.cloud.kms.v1.KeyRing.name] of the KeyRing - * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCryptoKeyId() - { - return $this->crypto_key_id; - } - - /** - * Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string crypto_key_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCryptoKeyId($var) - { - GPBUtil::checkString($var, True); - $this->crypto_key_id = $var; - - return $this; - } - - /** - * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\CryptoKey|null - */ - public function getCryptoKey() - { - return $this->crypto_key; - } - - public function hasCryptoKey() - { - return isset($this->crypto_key); - } - - public function clearCryptoKey() - { - unset($this->crypto_key); - } - - /** - * Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\CryptoKey $var - * @return $this - */ - public function setCryptoKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKey::class); - $this->crypto_key = $var; - - return $this; - } - - /** - * If set to true, the request will create a - * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must - * manually call - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or - * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] - * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field bool skip_initial_version_creation = 5; - * @return bool - */ - public function getSkipInitialVersionCreation() - { - return $this->skip_initial_version_creation; - } - - /** - * If set to true, the request will create a - * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must - * manually call - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or - * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] - * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field bool skip_initial_version_creation = 5; - * @param bool $var - * @return $this - */ - public function setSkipInitialVersionCreation($var) - { - GPBUtil::checkBool($var); - $this->skip_initial_version_creation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php deleted file mode 100644 index 0a77daeaca5d..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateCryptoKeyVersionRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.kms.v1.CreateCryptoKeyVersionRequest - */ -class CreateCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * initial field values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $crypto_key_version = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * @type \Google\Cloud\Kms\V1\CryptoKeyVersion $crypto_key_version - * Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * initial field values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated 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][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * initial field values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\CryptoKeyVersion|null - */ - public function getCryptoKeyVersion() - { - return $this->crypto_key_version; - } - - public function hasCryptoKeyVersion() - { - return isset($this->crypto_key_version); - } - - public function clearCryptoKeyVersion() - { - unset($this->crypto_key_version); - } - - /** - * Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * initial field values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $var - * @return $this - */ - public function setCryptoKeyVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); - $this->crypto_key_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php deleted file mode 100644 index f3a7bcc9bcdb..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateEkmConnectionRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.kms.v1.CreateEkmConnectionRequest - */ -class CreateEkmConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location associated with the - * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * - * Generated from protobuf field string ekm_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ekm_connection_id = ''; - /** - * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with - * initial field values. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ekm_connection = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location associated with the - * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format - * `projects/*/locations/*`. - * @type string $ekm_connection_id - * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * @type \Google\Cloud\Kms\V1\EkmConnection $ekm_connection - * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with - * initial field values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location associated with the - * [EkmConnection][google.cloud.kms.v1.EkmConnection], 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 resource name of the location associated with the - * [EkmConnection][google.cloud.kms.v1.EkmConnection], 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. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * - * Generated from protobuf field string ekm_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEkmConnectionId() - { - return $this->ekm_connection_id; - } - - /** - * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * - * Generated from protobuf field string ekm_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEkmConnectionId($var) - { - GPBUtil::checkString($var, True); - $this->ekm_connection_id = $var; - - return $this; - } - - /** - * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with - * initial field values. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\EkmConnection|null - */ - public function getEkmConnection() - { - return $this->ekm_connection; - } - - public function hasEkmConnection() - { - return isset($this->ekm_connection); - } - - public function clearEkmConnection() - { - unset($this->ekm_connection); - } - - /** - * Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with - * initial field values. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\EkmConnection $var - * @return $this - */ - public function setEkmConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\EkmConnection::class); - $this->ekm_connection = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php deleted file mode 100644 index 352e0efd34f9..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateImportJobRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.kms.v1.CreateImportJobRequest - */ -class CreateImportJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the - * [ImportJobs][google.cloud.kms.v1.ImportJob]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $import_job_id = ''; - /** - * Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $import_job = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the - * [ImportJobs][google.cloud.kms.v1.ImportJob]. - * @type string $import_job_id - * Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * @type \Google\Cloud\Kms\V1\ImportJob $import_job - * Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field - * values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the - * [ImportJobs][google.cloud.kms.v1.ImportJob]. - * - * Generated 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][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the - * [ImportJobs][google.cloud.kms.v1.ImportJob]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * 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. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * 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. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\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. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\ImportJob $var - * @return $this - */ - public function setImportJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ImportJob::class); - $this->import_job = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php deleted file mode 100644 index 7a4f6e623ca2..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CreateKeyRingRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.kms.v1.CreateKeyRingRequest - */ -class CreateKeyRingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key_ring_id = ''; - /** - * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key_ring = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. - * @type string $key_ring_id - * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * @type \Google\Cloud\Kms\V1\KeyRing $key_ring - * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field - * values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], 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 resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], 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. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKeyRingId() - { - return $this->key_ring_id; - } - - /** - * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * - * Generated from protobuf field string key_ring_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKeyRingId($var) - { - GPBUtil::checkString($var, True); - $this->key_ring_id = $var; - - return $this; - } - - /** - * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\KeyRing|null - */ - public function getKeyRing() - { - return $this->key_ring; - } - - public function hasKeyRing() - { - return isset($this->key_ring); - } - - public function clearKeyRing() - { - unset($this->key_ring); - } - - /** - * Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyRing key_ring = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\KeyRing $var - * @return $this - */ - public function setKeyRing($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyRing::class); - $this->key_ring = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php deleted file mode 100644 index 9af72cbcf36d..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey.php +++ /dev/null @@ -1,676 +0,0 @@ -google.cloud.kms.v1.CryptoKey - */ -class CryptoKey extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name for this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. A copy of the "primary" - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used - * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in - * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. - * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be - * updated via - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * may have a primary. For other keys, this field will be omitted. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $primary = null; - /** - * Immutable. The immutable purpose of this - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $purpose = 0; - /** - * Output only. The time at which this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], - * the Key Management Service will automatically: - * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * 2. Mark the new version as primary. - * Key rotations performed manually via - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * and - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] - * do not affect - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * support automatic rotation. For other keys, this field must be omitted. - * - * Generated from protobuf field .google.protobuf.Timestamp next_rotation_time = 7; - */ - protected $next_rotation_time = null; - /** - * A template describing settings for new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The - * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * instances created by either - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or auto-rotation are controlled by this template. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11; - */ - protected $version_template = null; - /** - * Labels with user-defined metadata. For more information, see - * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). - * - * Generated from protobuf field map labels = 10; - */ - private $labels; - /** - * Immutable. Whether this key may contain imported versions only. - * - * Generated from protobuf field bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $import_only = false; - /** - * Immutable. The period of time that versions of this key spend in the - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] - * state before transitioning to - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * If not specified at creation time, the default duration is 24 hours. - * - * Generated from protobuf field .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $destroy_scheduled_duration = null; - /** - * Immutable. The resource name of the backend environment where the key - * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and - * where all related cryptographic operations are performed. Only applicable - * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - * [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the - * resource name in the format `projects/*/locations/*/ekmConnections/*`. - * Note, this list is non-exhaustive and may apply to additional - * [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future. - * - * Generated from protobuf field string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $crypto_key_backend = ''; - protected $rotation_schedule; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name for this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * @type \Google\Cloud\Kms\V1\CryptoKeyVersion $primary - * Output only. A copy of the "primary" - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used - * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in - * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. - * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be - * updated via - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * may have a primary. For other keys, this field will be omitted. - * @type int $purpose - * Immutable. The immutable purpose of this - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. - * @type \Google\Protobuf\Timestamp $next_rotation_time - * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], - * the Key Management Service will automatically: - * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * 2. Mark the new version as primary. - * Key rotations performed manually via - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * and - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] - * do not affect - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * support automatic rotation. For other keys, this field must be omitted. - * @type \Google\Protobuf\Duration $rotation_period - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] - * will be advanced by this period when the service automatically rotates a - * key. Must be at least 24 hours and at most 876,000 hours. - * If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is - * set, - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] - * must also be set. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * support automatic rotation. For other keys, this field must be omitted. - * @type \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate $version_template - * A template describing settings for new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The - * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * instances created by either - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or auto-rotation are controlled by this template. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels with user-defined metadata. For more information, see - * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). - * @type bool $import_only - * Immutable. Whether this key may contain imported versions only. - * @type \Google\Protobuf\Duration $destroy_scheduled_duration - * Immutable. The period of time that versions of this key spend in the - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] - * state before transitioning to - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * If not specified at creation time, the default duration is 24 hours. - * @type string $crypto_key_backend - * Immutable. The resource name of the backend environment where the key - * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and - * where all related cryptographic operations are performed. Only applicable - * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - * [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the - * resource name in the format `projects/*/locations/*/ekmConnections/*`. - * Note, this list is non-exhaustive and may apply to additional - * [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name for this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * 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 for this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * 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. A copy of the "primary" - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used - * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in - * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. - * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be - * updated via - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * may have a primary. For other keys, this field will be omitted. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Kms\V1\CryptoKeyVersion|null - */ - public function getPrimary() - { - return $this->primary; - } - - public function hasPrimary() - { - return isset($this->primary); - } - - public function clearPrimary() - { - unset($this->primary); - } - - /** - * Output only. A copy of the "primary" - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used - * by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] is given in - * [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name]. - * The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be - * updated via - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * may have a primary. For other keys, this field will be omitted. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion primary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $var - * @return $this - */ - public function setPrimary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); - $this->primary = $var; - - return $this; - } - - /** - * Immutable. The immutable purpose of this - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getPurpose() - { - return $this->purpose; - } - - /** - * Immutable. The immutable purpose of this - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setPurpose($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKey\CryptoKeyPurpose::class); - $this->purpose = $var; - - return $this; - } - - /** - * Output only. The time at which this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. - * - * 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. The time at which this - * [CryptoKey][google.cloud.kms.v1.CryptoKey] was created. - * - * 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; - } - - /** - * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], - * the Key Management Service will automatically: - * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * 2. Mark the new version as primary. - * Key rotations performed manually via - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * and - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] - * do not affect - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * support automatic rotation. For other keys, this field must be omitted. - * - * Generated from protobuf field .google.protobuf.Timestamp next_rotation_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNextRotationTime() - { - return $this->next_rotation_time; - } - - public function hasNextRotationTime() - { - return isset($this->next_rotation_time); - } - - public function clearNextRotationTime() - { - unset($this->next_rotation_time); - } - - /** - * At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], - * the Key Management Service will automatically: - * 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * 2. Mark the new version as primary. - * Key rotations performed manually via - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * and - * [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion] - * do not affect - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time]. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * support automatic rotation. For other keys, this field must be omitted. - * - * Generated from protobuf field .google.protobuf.Timestamp next_rotation_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNextRotationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->next_rotation_time = $var; - - return $this; - } - - /** - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] - * will be advanced by this period when the service automatically rotates a - * key. Must be at least 24 hours and at most 876,000 hours. - * If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is - * set, - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] - * must also be set. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * support automatic rotation. For other keys, this field must be omitted. - * - * Generated from protobuf field .google.protobuf.Duration rotation_period = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getRotationPeriod() - { - return $this->readOneof(8); - } - - public function hasRotationPeriod() - { - return $this->hasOneof(8); - } - - /** - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] - * will be advanced by this period when the service automatically rotates a - * key. Must be at least 24 hours and at most 876,000 hours. - * If [rotation_period][google.cloud.kms.v1.CryptoKey.rotation_period] is - * set, - * [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time] - * must also be set. - * Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose] - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] - * support automatic rotation. For other keys, this field must be omitted. - * - * Generated from protobuf field .google.protobuf.Duration rotation_period = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRotationPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * A template describing settings for new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The - * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * instances created by either - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or auto-rotation are controlled by this template. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11; - * @return \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate|null - */ - public function getVersionTemplate() - { - return $this->version_template; - } - - public function hasVersionTemplate() - { - return isset($this->version_template); - } - - public function clearVersionTemplate() - { - unset($this->version_template); - } - - /** - * A template describing settings for new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances. The - * properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * instances created by either - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or auto-rotation are controlled by this template. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersionTemplate version_template = 11; - * @param \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate $var - * @return $this - */ - public function setVersionTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersionTemplate::class); - $this->version_template = $var; - - return $this; - } - - /** - * Labels with user-defined metadata. For more information, see - * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). - * - * Generated from protobuf field map labels = 10; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels with user-defined metadata. For more information, see - * [Labeling Keys](https://cloud.google.com/kms/docs/labeling-keys). - * - * Generated from protobuf field map labels = 10; - * @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; - } - - /** - * Immutable. Whether this key may contain imported versions only. - * - * Generated from protobuf field bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE]; - * @return bool - */ - public function getImportOnly() - { - return $this->import_only; - } - - /** - * Immutable. Whether this key may contain imported versions only. - * - * Generated from protobuf field bool import_only = 13 [(.google.api.field_behavior) = IMMUTABLE]; - * @param bool $var - * @return $this - */ - public function setImportOnly($var) - { - GPBUtil::checkBool($var); - $this->import_only = $var; - - return $this; - } - - /** - * Immutable. The period of time that versions of this key spend in the - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] - * state before transitioning to - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * If not specified at creation time, the default duration is 24 hours. - * - * Generated from protobuf field .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Protobuf\Duration|null - */ - public function getDestroyScheduledDuration() - { - return $this->destroy_scheduled_duration; - } - - public function hasDestroyScheduledDuration() - { - return isset($this->destroy_scheduled_duration); - } - - public function clearDestroyScheduledDuration() - { - unset($this->destroy_scheduled_duration); - } - - /** - * Immutable. The period of time that versions of this key spend in the - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] - * state before transitioning to - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * If not specified at creation time, the default duration is 24 hours. - * - * Generated from protobuf field .google.protobuf.Duration destroy_scheduled_duration = 14 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDestroyScheduledDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->destroy_scheduled_duration = $var; - - return $this; - } - - /** - * Immutable. The resource name of the backend environment where the key - * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and - * where all related cryptographic operations are performed. Only applicable - * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - * [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the - * resource name in the format `projects/*/locations/*/ekmConnections/*`. - * Note, this list is non-exhaustive and may apply to additional - * [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future. - * - * Generated from protobuf field string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getCryptoKeyBackend() - { - return $this->crypto_key_backend; - } - - /** - * Immutable. The resource name of the backend environment where the key - * material for all [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * associated with this [CryptoKey][google.cloud.kms.v1.CryptoKey] reside and - * where all related cryptographic operations are performed. Only applicable - * if [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] have a - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of - * [EXTERNAL_VPC][CryptoKeyVersion.ProtectionLevel.EXTERNAL_VPC], with the - * resource name in the format `projects/*/locations/*/ekmConnections/*`. - * Note, this list is non-exhaustive and may apply to additional - * [ProtectionLevels][google.cloud.kms.v1.ProtectionLevel] in the future. - * - * Generated from protobuf field string crypto_key_backend = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCryptoKeyBackend($var) - { - GPBUtil::checkString($var, True); - $this->crypto_key_backend = $var; - - return $this; - } - - /** - * @return string - */ - public function getRotationSchedule() - { - return $this->whichOneof("rotation_schedule"); - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php deleted file mode 100644 index 91a23e63e4e2..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKey/CryptoKeyPurpose.php +++ /dev/null @@ -1,93 +0,0 @@ -google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose - */ -class CryptoKeyPurpose -{ - /** - * Not specified. - * - * Generated from protobuf enum CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0; - */ - const CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0; - /** - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used - * with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and - * [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. - * - * Generated from protobuf enum ENCRYPT_DECRYPT = 1; - */ - const ENCRYPT_DECRYPT = 1; - /** - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used - * with - * [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign] - * and - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. - * - * Generated from protobuf enum ASYMMETRIC_SIGN = 5; - */ - const ASYMMETRIC_SIGN = 5; - /** - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used - * with - * [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt] - * and - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. - * - * Generated from protobuf enum ASYMMETRIC_DECRYPT = 6; - */ - const ASYMMETRIC_DECRYPT = 6; - /** - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used - * with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign]. - * - * Generated from protobuf enum MAC = 9; - */ - const MAC = 9; - - private static $valueToName = [ - self::CRYPTO_KEY_PURPOSE_UNSPECIFIED => 'CRYPTO_KEY_PURPOSE_UNSPECIFIED', - self::ENCRYPT_DECRYPT => 'ENCRYPT_DECRYPT', - self::ASYMMETRIC_SIGN => 'ASYMMETRIC_SIGN', - self::ASYMMETRIC_DECRYPT => 'ASYMMETRIC_DECRYPT', - self::MAC => 'MAC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CryptoKeyPurpose::class, \Google\Cloud\Kms\V1\CryptoKey_CryptoKeyPurpose::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php deleted file mode 100644 index c1c5f455f600..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion.php +++ /dev/null @@ -1,731 +0,0 @@ -google.cloud.kms.v1.CryptoKeyVersion - */ -class CryptoKeyVersion extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name for this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The current state of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3; - */ - protected $state = 0; - /** - * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] - * describing how crypto operations are performed with this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $protection_level = 0; - /** - * Output only. The - * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * supports. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $algorithm = 0; - /** - * Output only. Statement that was generated and signed by the HSM at key - * creation time. Use this statement to verify attributes of the key as stored - * on the HSM, independently of Google. Only provided for key versions with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $attestation = null; - /** - * Output only. The time at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] 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 this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * generated. - * - * Generated from protobuf field .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $generate_time = null; - /** - * Output only. The time this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is - * scheduled for destruction. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. - * - * Generated from protobuf field .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $destroy_time = null; - /** - * Output only. The time this CryptoKeyVersion's key material was - * destroyed. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * - * Generated from protobuf field .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $destroy_event_time = null; - /** - * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] - * used in the most recent import of this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if - * the underlying key material was imported. - * - * Generated from protobuf field string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $import_job = ''; - /** - * Output only. The time at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * most recently imported. - * - * Generated from protobuf field .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $import_time = null; - /** - * Output only. The root cause of the most recent import failure. Only present - * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. - * - * Generated from protobuf field string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $import_failure_reason = ''; - /** - * ExternalProtectionLevelOptions stores a group of additional fields for - * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that - * are specific to the - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level - * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] - * protection levels. - * - * Generated from protobuf field .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; - */ - protected $external_protection_level_options = null; - /** - * Output only. Whether or not this key version is eligible for reimport, by - * being specified as a target in - * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. - * - * Generated from protobuf field bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reimport_eligible = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name for this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. - * @type int $state - * The current state of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * @type int $protection_level - * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] - * describing how crypto operations are performed with this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * @type int $algorithm - * Output only. The - * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * supports. - * @type \Google\Cloud\Kms\V1\KeyOperationAttestation $attestation - * Output only. Statement that was generated and signed by the HSM at key - * creation time. Use this statement to verify attributes of the key as stored - * on the HSM, independently of Google. Only provided for key versions with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created. - * @type \Google\Protobuf\Timestamp $generate_time - * Output only. The time this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * generated. - * @type \Google\Protobuf\Timestamp $destroy_time - * Output only. The time this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is - * scheduled for destruction. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. - * @type \Google\Protobuf\Timestamp $destroy_event_time - * Output only. The time this CryptoKeyVersion's key material was - * destroyed. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * @type string $import_job - * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] - * used in the most recent import of this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if - * the underlying key material was imported. - * @type \Google\Protobuf\Timestamp $import_time - * Output only. The time at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * most recently imported. - * @type string $import_failure_reason - * Output only. The root cause of the most recent import failure. Only present - * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. - * @type \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions $external_protection_level_options - * ExternalProtectionLevelOptions stores a group of additional fields for - * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that - * are specific to the - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level - * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] - * protection levels. - * @type bool $reimport_eligible - * Output only. Whether or not this key version is eligible for reimport, by - * being specified as a target in - * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name for this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. - * - * 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 for this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. - * - * 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 current state of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] - * describing how crypto operations are performed with this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] - * describing how crypto operations are performed with this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - - /** - * Output only. The - * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * supports. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getAlgorithm() - { - return $this->algorithm; - } - - /** - * Output only. The - * [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * that this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * supports. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setAlgorithm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); - $this->algorithm = $var; - - return $this; - } - - /** - * Output only. Statement that was generated and signed by the HSM at key - * creation time. Use this statement to verify attributes of the key as stored - * on the HSM, independently of Google. Only provided for key versions with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Kms\V1\KeyOperationAttestation|null - */ - public function getAttestation() - { - return $this->attestation; - } - - public function hasAttestation() - { - return isset($this->attestation); - } - - public function clearAttestation() - { - unset($this->attestation); - } - - /** - * Output only. Statement that was generated and signed by the HSM at key - * creation time. Use this statement to verify attributes of the key as stored - * on the HSM, independently of Google. Only provided for key versions with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Kms\V1\KeyOperationAttestation $var - * @return $this - */ - public function setAttestation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyOperationAttestation::class); - $this->attestation = $var; - - return $this; - } - - /** - * Output only. The time at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] 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 at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] 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 this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * generated. - * - * Generated from protobuf field .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getGenerateTime() - { - return $this->generate_time; - } - - public function hasGenerateTime() - { - return isset($this->generate_time); - } - - public function clearGenerateTime() - { - unset($this->generate_time); - } - - /** - * Output only. The time this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * generated. - * - * Generated from protobuf field .google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setGenerateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->generate_time = $var; - - return $this; - } - - /** - * Output only. The time this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is - * scheduled for destruction. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. - * - * Generated from protobuf field .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDestroyTime() - { - return $this->destroy_time; - } - - public function hasDestroyTime() - { - return isset($this->destroy_time); - } - - public function clearDestroyTime() - { - unset($this->destroy_time); - } - - /** - * Output only. The time this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is - * scheduled for destruction. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]. - * - * Generated from protobuf field .google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDestroyTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->destroy_time = $var; - - return $this; - } - - /** - * Output only. The time this CryptoKeyVersion's key material was - * destroyed. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * - * Generated from protobuf field .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDestroyEventTime() - { - return $this->destroy_event_time; - } - - public function hasDestroyEventTime() - { - return isset($this->destroy_event_time); - } - - public function clearDestroyEventTime() - { - unset($this->destroy_event_time); - } - - /** - * Output only. The time this CryptoKeyVersion's key material was - * destroyed. Only present if - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED]. - * - * Generated from protobuf field .google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDestroyEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->destroy_event_time = $var; - - return $this; - } - - /** - * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] - * used in the most recent import of this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if - * the underlying key material was imported. - * - * Generated from protobuf field string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getImportJob() - { - return $this->import_job; - } - - /** - * Output only. The name of the [ImportJob][google.cloud.kms.v1.ImportJob] - * used in the most recent import of this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Only present if - * the underlying key material was imported. - * - * Generated from protobuf field string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setImportJob($var) - { - GPBUtil::checkString($var, True); - $this->import_job = $var; - - return $this; - } - - /** - * Output only. The time at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * most recently imported. - * - * Generated from protobuf field .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getImportTime() - { - return $this->import_time; - } - - public function hasImportTime() - { - return isset($this->import_time); - } - - public function clearImportTime() - { - unset($this->import_time); - } - - /** - * Output only. The time at which this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was - * most recently imported. - * - * Generated from protobuf field .google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setImportTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->import_time = $var; - - return $this; - } - - /** - * Output only. The root cause of the most recent import failure. Only present - * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. - * - * Generated from protobuf field string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getImportFailureReason() - { - return $this->import_failure_reason; - } - - /** - * Output only. The root cause of the most recent import failure. Only present - * if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED]. - * - * Generated from protobuf field string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setImportFailureReason($var) - { - GPBUtil::checkString($var, True); - $this->import_failure_reason = $var; - - return $this; - } - - /** - * ExternalProtectionLevelOptions stores a group of additional fields for - * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that - * are specific to the - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level - * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] - * protection levels. - * - * Generated from protobuf field .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; - * @return \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions|null - */ - public function getExternalProtectionLevelOptions() - { - return $this->external_protection_level_options; - } - - public function hasExternalProtectionLevelOptions() - { - return isset($this->external_protection_level_options); - } - - public function clearExternalProtectionLevelOptions() - { - unset($this->external_protection_level_options); - } - - /** - * ExternalProtectionLevelOptions stores a group of additional fields for - * configuring a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that - * are specific to the - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] protection level - * and [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] - * protection levels. - * - * Generated from protobuf field .google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17; - * @param \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions $var - * @return $this - */ - public function setExternalProtectionLevelOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ExternalProtectionLevelOptions::class); - $this->external_protection_level_options = $var; - - return $this; - } - - /** - * Output only. Whether or not this key version is eligible for reimport, by - * being specified as a target in - * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. - * - * Generated from protobuf field bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReimportEligible() - { - return $this->reimport_eligible; - } - - /** - * Output only. Whether or not this key version is eligible for reimport, by - * being specified as a target in - * [ImportCryptoKeyVersionRequest.crypto_key_version][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.crypto_key_version]. - * - * Generated from protobuf field bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReimportEligible($var) - { - GPBUtil::checkBool($var); - $this->reimport_eligible = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php deleted file mode 100644 index aff5f795a9b2..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionAlgorithm.php +++ /dev/null @@ -1,280 +0,0 @@ -google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm - */ -class CryptoKeyVersionAlgorithm -{ - /** - * Not specified. - * - * Generated from protobuf enum CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0; - */ - const CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0; - /** - * Creates symmetric encryption keys. - * - * Generated from protobuf enum GOOGLE_SYMMETRIC_ENCRYPTION = 1; - */ - const GOOGLE_SYMMETRIC_ENCRYPTION = 1; - /** - * RSASSA-PSS 2048 bit key with a SHA256 digest. - * - * Generated from protobuf enum RSA_SIGN_PSS_2048_SHA256 = 2; - */ - const RSA_SIGN_PSS_2048_SHA256 = 2; - /** - * RSASSA-PSS 3072 bit key with a SHA256 digest. - * - * Generated from protobuf enum RSA_SIGN_PSS_3072_SHA256 = 3; - */ - const RSA_SIGN_PSS_3072_SHA256 = 3; - /** - * RSASSA-PSS 4096 bit key with a SHA256 digest. - * - * Generated from protobuf enum RSA_SIGN_PSS_4096_SHA256 = 4; - */ - const RSA_SIGN_PSS_4096_SHA256 = 4; - /** - * RSASSA-PSS 4096 bit key with a SHA512 digest. - * - * Generated from protobuf enum RSA_SIGN_PSS_4096_SHA512 = 15; - */ - const RSA_SIGN_PSS_4096_SHA512 = 15; - /** - * RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. - * - * Generated from protobuf enum RSA_SIGN_PKCS1_2048_SHA256 = 5; - */ - const RSA_SIGN_PKCS1_2048_SHA256 = 5; - /** - * RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. - * - * Generated from protobuf enum RSA_SIGN_PKCS1_3072_SHA256 = 6; - */ - const RSA_SIGN_PKCS1_3072_SHA256 = 6; - /** - * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. - * - * Generated from protobuf enum RSA_SIGN_PKCS1_4096_SHA256 = 7; - */ - const RSA_SIGN_PKCS1_4096_SHA256 = 7; - /** - * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. - * - * Generated from protobuf enum RSA_SIGN_PKCS1_4096_SHA512 = 16; - */ - const RSA_SIGN_PKCS1_4096_SHA512 = 16; - /** - * RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key. - * - * Generated from protobuf enum RSA_SIGN_RAW_PKCS1_2048 = 28; - */ - const RSA_SIGN_RAW_PKCS1_2048 = 28; - /** - * RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key. - * - * Generated from protobuf enum RSA_SIGN_RAW_PKCS1_3072 = 29; - */ - const RSA_SIGN_RAW_PKCS1_3072 = 29; - /** - * RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key. - * - * Generated from protobuf enum RSA_SIGN_RAW_PKCS1_4096 = 30; - */ - const RSA_SIGN_RAW_PKCS1_4096 = 30; - /** - * RSAES-OAEP 2048 bit key with a SHA256 digest. - * - * Generated from protobuf enum RSA_DECRYPT_OAEP_2048_SHA256 = 8; - */ - const RSA_DECRYPT_OAEP_2048_SHA256 = 8; - /** - * RSAES-OAEP 3072 bit key with a SHA256 digest. - * - * Generated from protobuf enum RSA_DECRYPT_OAEP_3072_SHA256 = 9; - */ - const RSA_DECRYPT_OAEP_3072_SHA256 = 9; - /** - * RSAES-OAEP 4096 bit key with a SHA256 digest. - * - * Generated from protobuf enum RSA_DECRYPT_OAEP_4096_SHA256 = 10; - */ - const RSA_DECRYPT_OAEP_4096_SHA256 = 10; - /** - * RSAES-OAEP 4096 bit key with a SHA512 digest. - * - * Generated from protobuf enum RSA_DECRYPT_OAEP_4096_SHA512 = 17; - */ - const RSA_DECRYPT_OAEP_4096_SHA512 = 17; - /** - * RSAES-OAEP 2048 bit key with a SHA1 digest. - * - * Generated from protobuf enum RSA_DECRYPT_OAEP_2048_SHA1 = 37; - */ - const RSA_DECRYPT_OAEP_2048_SHA1 = 37; - /** - * RSAES-OAEP 3072 bit key with a SHA1 digest. - * - * Generated from protobuf enum RSA_DECRYPT_OAEP_3072_SHA1 = 38; - */ - const RSA_DECRYPT_OAEP_3072_SHA1 = 38; - /** - * RSAES-OAEP 4096 bit key with a SHA1 digest. - * - * Generated from protobuf enum RSA_DECRYPT_OAEP_4096_SHA1 = 39; - */ - const RSA_DECRYPT_OAEP_4096_SHA1 = 39; - /** - * ECDSA on the NIST P-256 curve with a SHA256 digest. - * - * Generated from protobuf enum EC_SIGN_P256_SHA256 = 12; - */ - const EC_SIGN_P256_SHA256 = 12; - /** - * ECDSA on the NIST P-384 curve with a SHA384 digest. - * - * Generated from protobuf enum EC_SIGN_P384_SHA384 = 13; - */ - const EC_SIGN_P384_SHA384 = 13; - /** - * ECDSA on the non-NIST secp256k1 curve. This curve is only supported for - * HSM protection level. - * - * Generated from protobuf enum EC_SIGN_SECP256K1_SHA256 = 31; - */ - const EC_SIGN_SECP256K1_SHA256 = 31; - /** - * HMAC-SHA256 signing with a 256 bit key. - * - * Generated from protobuf enum HMAC_SHA256 = 32; - */ - const HMAC_SHA256 = 32; - /** - * HMAC-SHA1 signing with a 160 bit key. - * - * Generated from protobuf enum HMAC_SHA1 = 33; - */ - const HMAC_SHA1 = 33; - /** - * HMAC-SHA384 signing with a 384 bit key. - * - * Generated from protobuf enum HMAC_SHA384 = 34; - */ - const HMAC_SHA384 = 34; - /** - * HMAC-SHA512 signing with a 512 bit key. - * - * Generated from protobuf enum HMAC_SHA512 = 35; - */ - const HMAC_SHA512 = 35; - /** - * HMAC-SHA224 signing with a 224 bit key. - * - * Generated from protobuf enum HMAC_SHA224 = 36; - */ - const HMAC_SHA224 = 36; - /** - * Algorithm representing symmetric encryption by an external key manager. - * - * Generated from protobuf enum EXTERNAL_SYMMETRIC_ENCRYPTION = 18; - */ - const EXTERNAL_SYMMETRIC_ENCRYPTION = 18; - - private static $valueToName = [ - self::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED => 'CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED', - self::GOOGLE_SYMMETRIC_ENCRYPTION => 'GOOGLE_SYMMETRIC_ENCRYPTION', - self::RSA_SIGN_PSS_2048_SHA256 => 'RSA_SIGN_PSS_2048_SHA256', - self::RSA_SIGN_PSS_3072_SHA256 => 'RSA_SIGN_PSS_3072_SHA256', - self::RSA_SIGN_PSS_4096_SHA256 => 'RSA_SIGN_PSS_4096_SHA256', - self::RSA_SIGN_PSS_4096_SHA512 => 'RSA_SIGN_PSS_4096_SHA512', - self::RSA_SIGN_PKCS1_2048_SHA256 => 'RSA_SIGN_PKCS1_2048_SHA256', - self::RSA_SIGN_PKCS1_3072_SHA256 => 'RSA_SIGN_PKCS1_3072_SHA256', - self::RSA_SIGN_PKCS1_4096_SHA256 => 'RSA_SIGN_PKCS1_4096_SHA256', - self::RSA_SIGN_PKCS1_4096_SHA512 => 'RSA_SIGN_PKCS1_4096_SHA512', - self::RSA_SIGN_RAW_PKCS1_2048 => 'RSA_SIGN_RAW_PKCS1_2048', - self::RSA_SIGN_RAW_PKCS1_3072 => 'RSA_SIGN_RAW_PKCS1_3072', - self::RSA_SIGN_RAW_PKCS1_4096 => 'RSA_SIGN_RAW_PKCS1_4096', - self::RSA_DECRYPT_OAEP_2048_SHA256 => 'RSA_DECRYPT_OAEP_2048_SHA256', - self::RSA_DECRYPT_OAEP_3072_SHA256 => 'RSA_DECRYPT_OAEP_3072_SHA256', - self::RSA_DECRYPT_OAEP_4096_SHA256 => 'RSA_DECRYPT_OAEP_4096_SHA256', - self::RSA_DECRYPT_OAEP_4096_SHA512 => 'RSA_DECRYPT_OAEP_4096_SHA512', - self::RSA_DECRYPT_OAEP_2048_SHA1 => 'RSA_DECRYPT_OAEP_2048_SHA1', - self::RSA_DECRYPT_OAEP_3072_SHA1 => 'RSA_DECRYPT_OAEP_3072_SHA1', - self::RSA_DECRYPT_OAEP_4096_SHA1 => 'RSA_DECRYPT_OAEP_4096_SHA1', - self::EC_SIGN_P256_SHA256 => 'EC_SIGN_P256_SHA256', - self::EC_SIGN_P384_SHA384 => 'EC_SIGN_P384_SHA384', - self::EC_SIGN_SECP256K1_SHA256 => 'EC_SIGN_SECP256K1_SHA256', - self::HMAC_SHA256 => 'HMAC_SHA256', - self::HMAC_SHA1 => 'HMAC_SHA1', - self::HMAC_SHA384 => 'HMAC_SHA384', - self::HMAC_SHA512 => 'HMAC_SHA512', - self::HMAC_SHA224 => 'HMAC_SHA224', - self::EXTERNAL_SYMMETRIC_ENCRYPTION => 'EXTERNAL_SYMMETRIC_ENCRYPTION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CryptoKeyVersionAlgorithm::class, \Google\Cloud\Kms\V1\CryptoKeyVersion_CryptoKeyVersionAlgorithm::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php deleted file mode 100644 index a7baabed0346..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionState.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState - */ -class CryptoKeyVersionState -{ - /** - * Not specified. - * - * Generated from protobuf enum CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0; - */ - const CRYPTO_KEY_VERSION_STATE_UNSPECIFIED = 0; - /** - * This version is still being generated. It may not be used, enabled, - * disabled, or destroyed yet. Cloud KMS will automatically mark this - * version - * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] - * as soon as the version is ready. - * - * Generated from protobuf enum PENDING_GENERATION = 5; - */ - const PENDING_GENERATION = 5; - /** - * This version may be used for cryptographic operations. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * This version may not be used, but the key material is still available, - * and the version can be placed back into the - * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] - * state. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - /** - * This version is destroyed, and the key material is no longer stored. - * This version may only become - * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] - * again if this version is - * [reimport_eligible][google.cloud.kms.v1.CryptoKeyVersion.reimport_eligible] - * and the original key material is reimported with a call to - * [KeyManagementService.ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion]. - * - * Generated from protobuf enum DESTROYED = 3; - */ - const DESTROYED = 3; - /** - * This version is scheduled for destruction, and will be destroyed soon. - * Call - * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] - * to put it back into the - * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] - * state. - * - * Generated from protobuf enum DESTROY_SCHEDULED = 4; - */ - const DESTROY_SCHEDULED = 4; - /** - * This version is still being imported. It may not be used, enabled, - * disabled, or destroyed yet. Cloud KMS will automatically mark this - * version - * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] - * as soon as the version is ready. - * - * Generated from protobuf enum PENDING_IMPORT = 6; - */ - const PENDING_IMPORT = 6; - /** - * This version was not imported successfully. It may not be used, enabled, - * disabled, or destroyed. The submitted key material has been discarded. - * Additional details can be found in - * [CryptoKeyVersion.import_failure_reason][google.cloud.kms.v1.CryptoKeyVersion.import_failure_reason]. - * - * Generated from protobuf enum IMPORT_FAILED = 7; - */ - const IMPORT_FAILED = 7; - - private static $valueToName = [ - self::CRYPTO_KEY_VERSION_STATE_UNSPECIFIED => 'CRYPTO_KEY_VERSION_STATE_UNSPECIFIED', - self::PENDING_GENERATION => 'PENDING_GENERATION', - self::ENABLED => 'ENABLED', - self::DISABLED => 'DISABLED', - self::DESTROYED => 'DESTROYED', - self::DESTROY_SCHEDULED => 'DESTROY_SCHEDULED', - self::PENDING_IMPORT => 'PENDING_IMPORT', - self::IMPORT_FAILED => 'IMPORT_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(CryptoKeyVersionState::class, \Google\Cloud\Kms\V1\CryptoKeyVersion_CryptoKeyVersionState::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php deleted file mode 100644 index 33a471de9ad7..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion/CryptoKeyVersionView.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView - */ -class CryptoKeyVersionView -{ - /** - * Default view for each - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not - * include the - * [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field. - * - * Generated from protobuf enum CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0; - */ - const CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED = 0; - /** - * Provides all fields in each - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the - * [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation]. - * - * Generated from protobuf enum FULL = 1; - */ - const FULL = 1; - - private static $valueToName = [ - self::CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED => 'CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CryptoKeyVersionView::class, \Google\Cloud\Kms\V1\CryptoKeyVersion_CryptoKeyVersionView::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php deleted file mode 100644 index 6f88091103eb..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersionTemplate.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.kms.v1.CryptoKeyVersionTemplate - */ -class CryptoKeyVersionTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating - * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. Immutable. Defaults to - * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 1; - */ - protected $protection_level = 0; - /** - * Required. - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * to use when creating a - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. - * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both - * this field is omitted and - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $algorithm = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $protection_level - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating - * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. Immutable. Defaults to - * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. - * @type int $algorithm - * Required. - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * to use when creating a - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. - * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both - * this field is omitted and - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating - * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. Immutable. Defaults to - * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 1; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating - * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. Immutable. Defaults to - * [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 1; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - - /** - * Required. - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * to use when creating a - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. - * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both - * this field is omitted and - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getAlgorithm() - { - return $this->algorithm; - } - - /** - * Required. - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * to use when creating a - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this - * template. - * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both - * this field is omitted and - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setAlgorithm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); - $this->algorithm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion_CryptoKeyVersionAlgorithm.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion_CryptoKeyVersionAlgorithm.php deleted file mode 100644 index e86c255e1880..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/CryptoKeyVersion_CryptoKeyVersionAlgorithm.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.kms.v1.DecryptRequest - */ -class DecryptRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The - * server will choose the appropriate version. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The encrypted data originally returned in - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * - * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ciphertext = ''; - /** - * Optional. Optional data that must match the data originally supplied in - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $additional_authenticated_data = ''; - /** - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) - * is equal to - * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ciphertext_crc32c = null; - /** - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) - * is equal to - * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $additional_authenticated_data_crc32c = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The - * server will choose the appropriate version. - * @type string $ciphertext - * Required. The encrypted data originally returned in - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * @type string $additional_authenticated_data - * Optional. Optional data that must match the data originally supplied in - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * @type \Google\Protobuf\Int64Value $ciphertext_crc32c - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) - * is equal to - * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * @type \Google\Protobuf\Int64Value $additional_authenticated_data_crc32c - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) - * is equal to - * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The - * server will choose the appropriate version. - * - * Generated 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 - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The - * server will choose the appropriate version. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 encrypted data originally returned in - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * - * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCiphertext() - { - return $this->ciphertext; - } - - /** - * Required. The encrypted data originally returned in - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * - * Generated from protobuf field bytes ciphertext = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCiphertext($var) - { - GPBUtil::checkString($var, False); - $this->ciphertext = $var; - - return $this; - } - - /** - * Optional. Optional data that must match the data originally supplied in - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAdditionalAuthenticatedData() - { - return $this->additional_authenticated_data; - } - - /** - * Optional. Optional data that must match the data originally supplied in - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAdditionalAuthenticatedData($var) - { - GPBUtil::checkString($var, False); - $this->additional_authenticated_data = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) - * is equal to - * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getCiphertextCrc32C() - { - return $this->ciphertext_crc32c; - } - - public function hasCiphertextCrc32C() - { - return isset($this->ciphertext_crc32c); - } - - public function clearCiphertextCrc32C() - { - unset($this->ciphertext_crc32c); - } - - /** - * Returns the unboxed value from getCiphertextCrc32C() - - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) - * is equal to - * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getCiphertextCrc32CUnwrapped() - { - return $this->readWrapperValue("ciphertext_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) - * is equal to - * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setCiphertextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->ciphertext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) - * is equal to - * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setCiphertextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("ciphertext_crc32c", $var); - return $this;} - - /** - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) - * is equal to - * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getAdditionalAuthenticatedDataCrc32C() - { - return $this->additional_authenticated_data_crc32c; - } - - public function hasAdditionalAuthenticatedDataCrc32C() - { - return isset($this->additional_authenticated_data_crc32c); - } - - public function clearAdditionalAuthenticatedDataCrc32C() - { - unset($this->additional_authenticated_data_crc32c); - } - - /** - * Returns the unboxed value from getAdditionalAuthenticatedDataCrc32C() - - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) - * is equal to - * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getAdditionalAuthenticatedDataCrc32CUnwrapped() - { - return $this->readWrapperValue("additional_authenticated_data_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) - * is equal to - * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setAdditionalAuthenticatedDataCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->additional_authenticated_data_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) - * is equal to - * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setAdditionalAuthenticatedDataCrc32CUnwrapped($var) - { - $this->writeWrapperValue("additional_authenticated_data_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php deleted file mode 100644 index 3910ec3ae0eb..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DecryptResponse.php +++ /dev/null @@ -1,315 +0,0 @@ -google.cloud.kms.v1.DecryptResponse - */ -class DecryptResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The decrypted data originally supplied in - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * - * Generated from protobuf field bytes plaintext = 1; - */ - protected $plaintext = ''; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. - * An integrity check of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: receiving this response message indicates that - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - */ - protected $plaintext_crc32c = null; - /** - * Whether the Decryption was performed using the primary key version. - * - * Generated from protobuf field bool used_primary = 3; - */ - protected $used_primary = false; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $plaintext - * The decrypted data originally supplied in - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * @type \Google\Protobuf\Int64Value $plaintext_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. - * An integrity check of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: receiving this response message indicates that - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * @type bool $used_primary - * Whether the Decryption was performed using the primary key version. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The decrypted data originally supplied in - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * - * Generated from protobuf field bytes plaintext = 1; - * @return string - */ - public function getPlaintext() - { - return $this->plaintext; - } - - /** - * The decrypted data originally supplied in - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * - * Generated from protobuf field bytes plaintext = 1; - * @param string $var - * @return $this - */ - public function setPlaintext($var) - { - GPBUtil::checkString($var, False); - $this->plaintext = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. - * An integrity check of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: receiving this response message indicates that - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @return \Google\Protobuf\Int64Value|null - */ - public function getPlaintextCrc32C() - { - return $this->plaintext_crc32c; - } - - public function hasPlaintextCrc32C() - { - return isset($this->plaintext_crc32c); - } - - public function clearPlaintextCrc32C() - { - unset($this->plaintext_crc32c); - } - - /** - * Returns the unboxed value from getPlaintextCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. - * An integrity check of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: receiving this response message indicates that - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @return int|string|null - */ - public function getPlaintextCrc32CUnwrapped() - { - return $this->readWrapperValue("plaintext_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. - * An integrity check of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: receiving this response message indicates that - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setPlaintextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->plaintext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext]. - * An integrity check of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * can be performed by computing the CRC32C checksum of - * [DecryptResponse.plaintext][google.cloud.kms.v1.DecryptResponse.plaintext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: receiving this response message indicates that - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] is able to - * successfully decrypt the - * [ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 2; - * @param int|string|null $var - * @return $this - */ - public function setPlaintextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("plaintext_crc32c", $var); - return $this;} - - /** - * Whether the Decryption was performed using the primary key version. - * - * Generated from protobuf field bool used_primary = 3; - * @return bool - */ - public function getUsedPrimary() - { - return $this->used_primary; - } - - /** - * Whether the Decryption was performed using the primary key version. - * - * Generated from protobuf field bool used_primary = 3; - * @param bool $var - * @return $this - */ - public function setUsedPrimary($var) - { - GPBUtil::checkBool($var); - $this->used_primary = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * decryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 4; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php deleted file mode 100644 index c9ade4150c68..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/DestroyCryptoKeyVersionRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.kms.v1.DestroyCryptoKeyVersionRequest - */ -class DestroyCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * - * 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 - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * - * Generated 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 - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php deleted file mode 100644 index 90201ffc30de..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/Digest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.kms.v1.Digest - */ -class Digest extends \Google\Protobuf\Internal\Message -{ - protected $digest; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sha256 - * A message digest produced with the SHA-256 algorithm. - * @type string $sha384 - * A message digest produced with the SHA-384 algorithm. - * @type string $sha512 - * A message digest produced with the SHA-512 algorithm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * A message digest produced with the SHA-256 algorithm. - * - * Generated from protobuf field bytes sha256 = 1; - * @return string - */ - public function getSha256() - { - return $this->readOneof(1); - } - - public function hasSha256() - { - return $this->hasOneof(1); - } - - /** - * A message digest produced with the SHA-256 algorithm. - * - * Generated from protobuf field bytes sha256 = 1; - * @param string $var - * @return $this - */ - public function setSha256($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A message digest produced with the SHA-384 algorithm. - * - * Generated from protobuf field bytes sha384 = 2; - * @return string - */ - public function getSha384() - { - return $this->readOneof(2); - } - - public function hasSha384() - { - return $this->hasOneof(2); - } - - /** - * A message digest produced with the SHA-384 algorithm. - * - * Generated from protobuf field bytes sha384 = 2; - * @param string $var - * @return $this - */ - public function setSha384($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A message digest produced with the SHA-512 algorithm. - * - * Generated from protobuf field bytes sha512 = 3; - * @return string - */ - public function getSha512() - { - return $this->readOneof(3); - } - - public function hasSha512() - { - return $this->hasOneof(3); - } - - /** - * A message digest produced with the SHA-512 algorithm. - * - * Generated from protobuf field bytes sha512 = 3; - * @param string $var - * @return $this - */ - public function setSha512($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getDigest() - { - return $this->whichOneof("digest"); - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php deleted file mode 100644 index ea533eb191f4..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection.php +++ /dev/null @@ -1,222 +0,0 @@ -google.cloud.kms.v1.EkmConnection - */ -class EkmConnection extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name for the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format - * `projects/*/locations/*/ekmConnections/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The time at which the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * A list of - * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where - * the EKM can be reached. There should be one ServiceResolver per EKM - * replica. Currently, only a single - * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is - * supported. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection.ServiceResolver service_resolvers = 3; - */ - private $service_resolvers; - /** - * Optional. Etag of the currently stored - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * - * 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 - * Output only. The resource name for the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format - * `projects/*/locations/*/ekmConnections/*`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] was created. - * @type array<\Google\Cloud\Kms\V1\EkmConnection\ServiceResolver>|\Google\Protobuf\Internal\RepeatedField $service_resolvers - * A list of - * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where - * the EKM can be reached. There should be one ServiceResolver per EKM - * replica. Currently, only a single - * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is - * supported. - * @type string $etag - * Optional. Etag of the currently stored - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name for the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format - * `projects/*/locations/*/ekmConnections/*`. - * - * 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 for the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] in the format - * `projects/*/locations/*/ekmConnections/*`. - * - * 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 time at which the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] 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 at which the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] 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; - } - - /** - * A list of - * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where - * the EKM can be reached. There should be one ServiceResolver per EKM - * replica. Currently, only a single - * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is - * supported. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection.ServiceResolver service_resolvers = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServiceResolvers() - { - return $this->service_resolvers; - } - - /** - * A list of - * [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where - * the EKM can be reached. There should be one ServiceResolver per EKM - * replica. Currently, only a single - * [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is - * supported. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection.ServiceResolver service_resolvers = 3; - * @param array<\Google\Cloud\Kms\V1\EkmConnection\ServiceResolver>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServiceResolvers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\EkmConnection\ServiceResolver::class); - $this->service_resolvers = $arr; - - return $this; - } - - /** - * Optional. Etag of the currently stored - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. Etag of the currently stored - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * - * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php deleted file mode 100644 index 37e72fe4b1a8..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection/ServiceResolver.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.kms.v1.EkmConnection.ServiceResolver - */ -class ServiceResolver extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Service Directory service pointing to - * an EKM replica, in the format - * `projects/*/locations/*/namespaces/*/services/*`. - * - * Generated from protobuf field string service_directory_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $service_directory_service = ''; - /** - * Optional. The filter applied to the endpoints of the resolved service. If - * no filter is specified, all endpoints will be considered. An endpoint - * will be chosen arbitrarily from the filtered list for each request. - * For endpoint filter syntax and examples, see - * https://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest. - * - * Generated from protobuf field string endpoint_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $endpoint_filter = ''; - /** - * Required. The hostname of the EKM replica used at TLS and HTTP layers. - * - * Generated from protobuf field string hostname = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hostname = ''; - /** - * Required. A list of leaf server certificates used to authenticate HTTPS - * connections to the EKM replica. Currently, a maximum of 10 - * [Certificate][google.cloud.kms.v1.Certificate] is supported. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.Certificate server_certificates = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $server_certificates; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_directory_service - * Required. The resource name of the Service Directory service pointing to - * an EKM replica, in the format - * `projects/*/locations/*/namespaces/*/services/*`. - * @type string $endpoint_filter - * Optional. The filter applied to the endpoints of the resolved service. If - * no filter is specified, all endpoints will be considered. An endpoint - * will be chosen arbitrarily from the filtered list for each request. - * For endpoint filter syntax and examples, see - * https://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest. - * @type string $hostname - * Required. The hostname of the EKM replica used at TLS and HTTP layers. - * @type array<\Google\Cloud\Kms\V1\Certificate>|\Google\Protobuf\Internal\RepeatedField $server_certificates - * Required. A list of leaf server certificates used to authenticate HTTPS - * connections to the EKM replica. Currently, a maximum of 10 - * [Certificate][google.cloud.kms.v1.Certificate] is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Service Directory service pointing to - * an EKM replica, in the format - * `projects/*/locations/*/namespaces/*/services/*`. - * - * Generated from protobuf field string service_directory_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceDirectoryService() - { - return $this->service_directory_service; - } - - /** - * Required. The resource name of the Service Directory service pointing to - * an EKM replica, in the format - * `projects/*/locations/*/namespaces/*/services/*`. - * - * Generated from protobuf field string service_directory_service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServiceDirectoryService($var) - { - GPBUtil::checkString($var, True); - $this->service_directory_service = $var; - - return $this; - } - - /** - * Optional. The filter applied to the endpoints of the resolved service. If - * no filter is specified, all endpoints will be considered. An endpoint - * will be chosen arbitrarily from the filtered list for each request. - * For endpoint filter syntax and examples, see - * https://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest. - * - * Generated from protobuf field string endpoint_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEndpointFilter() - { - return $this->endpoint_filter; - } - - /** - * Optional. The filter applied to the endpoints of the resolved service. If - * no filter is specified, all endpoints will be considered. An endpoint - * will be chosen arbitrarily from the filtered list for each request. - * For endpoint filter syntax and examples, see - * https://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest. - * - * Generated from protobuf field string endpoint_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEndpointFilter($var) - { - GPBUtil::checkString($var, True); - $this->endpoint_filter = $var; - - return $this; - } - - /** - * Required. The hostname of the EKM replica used at TLS and HTTP layers. - * - * Generated from protobuf field string hostname = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * Required. The hostname of the EKM replica used at TLS and HTTP layers. - * - * Generated from protobuf field string hostname = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - - /** - * Required. A list of leaf server certificates used to authenticate HTTPS - * connections to the EKM replica. Currently, a maximum of 10 - * [Certificate][google.cloud.kms.v1.Certificate] is supported. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.Certificate server_certificates = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServerCertificates() - { - return $this->server_certificates; - } - - /** - * Required. A list of leaf server certificates used to authenticate HTTPS - * connections to the EKM replica. Currently, a maximum of 10 - * [Certificate][google.cloud.kms.v1.Certificate] is supported. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.Certificate server_certificates = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Kms\V1\Certificate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServerCertificates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\Certificate::class); - $this->server_certificates = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ServiceResolver::class, \Google\Cloud\Kms\V1\EkmConnection_ServiceResolver::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection_ServiceResolver.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection_ServiceResolver.php deleted file mode 100644 index a69117ae72f2..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EkmConnection_ServiceResolver.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.kms.v1.EkmService/ListEkmConnections', - $argument, - ['\Google\Cloud\Kms\V1\ListEkmConnectionsResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns metadata for a given - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * @param \Google\Cloud\Kms\V1\GetEkmConnectionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetEkmConnection(\Google\Cloud\Kms\V1\GetEkmConnectionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.EkmService/GetEkmConnection', - $argument, - ['\Google\Cloud\Kms\V1\EkmConnection', 'decode'], - $metadata, $options); - } - - /** - * Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given - * Project and Location. - * @param \Google\Cloud\Kms\V1\CreateEkmConnectionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateEkmConnection(\Google\Cloud\Kms\V1\CreateEkmConnectionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.EkmService/CreateEkmConnection', - $argument, - ['\Google\Cloud\Kms\V1\EkmConnection', 'decode'], - $metadata, $options); - } - - /** - * Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata. - * @param \Google\Cloud\Kms\V1\UpdateEkmConnectionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateEkmConnection(\Google\Cloud\Kms\V1\UpdateEkmConnectionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.EkmService/UpdateEkmConnection', - $argument, - ['\Google\Cloud\Kms\V1\EkmConnection', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php deleted file mode 100644 index 0a6f7cf1ee97..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptRequest.php +++ /dev/null @@ -1,594 +0,0 @@ -google.cloud.kms.v1.EncryptRequest - */ -class EncryptRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] or - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * encryption. - * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server - * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The data to encrypt. Must be no larger than 64KiB. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $plaintext = ''; - /** - * Optional. Optional data that, if specified, must also be provided during - * decryption through - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the - * AAD must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $additional_authenticated_data = ''; - /** - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) - * is equal to - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $plaintext_crc32c = null; - /** - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) - * is equal to - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $additional_authenticated_data_crc32c = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] or - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * encryption. - * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server - * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. - * @type string $plaintext - * Required. The data to encrypt. Must be no larger than 64KiB. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * @type string $additional_authenticated_data - * Optional. Optional data that, if specified, must also be provided during - * decryption through - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the - * AAD must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * @type \Google\Protobuf\Int64Value $plaintext_crc32c - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) - * is equal to - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * @type \Google\Protobuf\Int64Value $additional_authenticated_data_crc32c - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) - * is equal to - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] or - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * encryption. - * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server - * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. - * - * Generated 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 - * [CryptoKey][google.cloud.kms.v1.CryptoKey] or - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * encryption. - * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server - * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 data to encrypt. Must be no larger than 64KiB. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPlaintext() - { - return $this->plaintext; - } - - /** - * Required. The data to encrypt. Must be no larger than 64KiB. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPlaintext($var) - { - GPBUtil::checkString($var, False); - $this->plaintext = $var; - - return $this; - } - - /** - * Optional. Optional data that, if specified, must also be provided during - * decryption through - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the - * AAD must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAdditionalAuthenticatedData() - { - return $this->additional_authenticated_data; - } - - /** - * Optional. Optional data that, if specified, must also be provided during - * decryption through - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the - * AAD must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * - * Generated from protobuf field bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAdditionalAuthenticatedData($var) - { - GPBUtil::checkString($var, False); - $this->additional_authenticated_data = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) - * is equal to - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getPlaintextCrc32C() - { - return $this->plaintext_crc32c; - } - - public function hasPlaintextCrc32C() - { - return isset($this->plaintext_crc32c); - } - - public function clearPlaintextCrc32C() - { - unset($this->plaintext_crc32c); - } - - /** - * Returns the unboxed value from getPlaintextCrc32C() - - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) - * is equal to - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getPlaintextCrc32CUnwrapped() - { - return $this->readWrapperValue("plaintext_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) - * is equal to - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setPlaintextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->plaintext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) - * is equal to - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setPlaintextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("plaintext_crc32c", $var); - return $this;} - - /** - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) - * is equal to - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getAdditionalAuthenticatedDataCrc32C() - { - return $this->additional_authenticated_data_crc32c; - } - - public function hasAdditionalAuthenticatedDataCrc32C() - { - return isset($this->additional_authenticated_data_crc32c); - } - - public function clearAdditionalAuthenticatedDataCrc32C() - { - unset($this->additional_authenticated_data_crc32c); - } - - /** - * Returns the unboxed value from getAdditionalAuthenticatedDataCrc32C() - - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) - * is equal to - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getAdditionalAuthenticatedDataCrc32CUnwrapped() - { - return $this->readWrapperValue("additional_authenticated_data_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) - * is equal to - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setAdditionalAuthenticatedDataCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->additional_authenticated_data_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) - * is equal to - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setAdditionalAuthenticatedDataCrc32CUnwrapped($var) - { - $this->writeWrapperValue("additional_authenticated_data_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php deleted file mode 100644 index 7a18418344b6..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/EncryptResponse.php +++ /dev/null @@ -1,471 +0,0 @@ -google.cloud.kms.v1.EncryptResponse - */ -class EncryptResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. Check this field to verify that the intended resource was used - * for encryption. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The encrypted data. - * - * Generated from protobuf field bytes ciphertext = 2; - */ - protected $ciphertext = ''; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * An integrity check of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * can be performed by computing the CRC32C checksum of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; - */ - protected $ciphertext_crc32c = null; - /** - * Integrity verification field. A flag indicating whether - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of - * this field indicates either that - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_plaintext_crc32c = 5; - */ - protected $verified_plaintext_crc32c = false; - /** - * Integrity verification field. A flag indicating whether - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A - * false value of this field indicates either that - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 6; - */ - protected $verified_additional_authenticated_data_crc32c = false; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. Check this field to verify that the intended resource was used - * for encryption. - * @type string $ciphertext - * The encrypted data. - * @type \Google\Protobuf\Int64Value $ciphertext_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * An integrity check of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * can be performed by computing the CRC32C checksum of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * @type bool $verified_plaintext_crc32c - * Integrity verification field. A flag indicating whether - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of - * this field indicates either that - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type bool $verified_additional_authenticated_data_crc32c - * Integrity verification field. A flag indicating whether - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A - * false value of this field indicates either that - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. Check this field to verify that the intended resource was used - * for encryption. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. Check this field to verify that the intended resource was used - * for encryption. - * - * 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 encrypted data. - * - * Generated from protobuf field bytes ciphertext = 2; - * @return string - */ - public function getCiphertext() - { - return $this->ciphertext; - } - - /** - * The encrypted data. - * - * Generated from protobuf field bytes ciphertext = 2; - * @param string $var - * @return $this - */ - public function setCiphertext($var) - { - GPBUtil::checkString($var, False); - $this->ciphertext = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * An integrity check of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * can be performed by computing the CRC32C checksum of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; - * @return \Google\Protobuf\Int64Value|null - */ - public function getCiphertextCrc32C() - { - return $this->ciphertext_crc32c; - } - - public function hasCiphertextCrc32C() - { - return isset($this->ciphertext_crc32c); - } - - public function clearCiphertextCrc32C() - { - unset($this->ciphertext_crc32c); - } - - /** - * Returns the unboxed value from getCiphertextCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * An integrity check of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * can be performed by computing the CRC32C checksum of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; - * @return int|string|null - */ - public function getCiphertextCrc32CUnwrapped() - { - return $this->readWrapperValue("ciphertext_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * An integrity check of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * can be performed by computing the CRC32C checksum of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setCiphertextCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->ciphertext_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * An integrity check of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * can be performed by computing the CRC32C checksum of - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value ciphertext_crc32c = 4; - * @param int|string|null $var - * @return $this - */ - public function setCiphertextCrc32CUnwrapped($var) - { - $this->writeWrapperValue("ciphertext_crc32c", $var); - return $this;} - - /** - * Integrity verification field. A flag indicating whether - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of - * this field indicates either that - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_plaintext_crc32c = 5; - * @return bool - */ - public function getVerifiedPlaintextCrc32C() - { - return $this->verified_plaintext_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. A false value of - * this field indicates either that - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_plaintext_crc32c = 5; - * @param bool $var - * @return $this - */ - public function setVerifiedPlaintextCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_plaintext_crc32c = $var; - - return $this; - } - - /** - * Integrity verification field. A flag indicating whether - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A - * false value of this field indicates either that - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 6; - * @return bool - */ - public function getVerifiedAdditionalAuthenticatedDataCrc32C() - { - return $this->verified_additional_authenticated_data_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [AAD][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. A - * false value of this field indicates either that - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_additional_authenticated_data_crc32c = 6; - * @param bool $var - * @return $this - */ - public function setVerifiedAdditionalAuthenticatedDataCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_additional_authenticated_data_crc32c = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used in - * encryption. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 7; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php deleted file mode 100644 index 9a8fb7d4fabb..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ExternalProtectionLevelOptions.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.kms.v1.ExternalProtectionLevelOptions - */ -class ExternalProtectionLevelOptions extends \Google\Protobuf\Internal\Message -{ - /** - * The URI for an external resource that this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. - * - * Generated from protobuf field string external_key_uri = 1; - */ - protected $external_key_uri = ''; - /** - * The path to the external key material on the EKM when using - * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set - * this field instead of external_key_uri when using an - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field string ekm_connection_key_path = 2; - */ - protected $ekm_connection_key_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $external_key_uri - * The URI for an external resource that this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. - * @type string $ekm_connection_key_path - * The path to the external key material on the EKM when using - * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set - * this field instead of external_key_uri when using an - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The URI for an external resource that this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. - * - * Generated from protobuf field string external_key_uri = 1; - * @return string - */ - public function getExternalKeyUri() - { - return $this->external_key_uri; - } - - /** - * The URI for an external resource that this - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents. - * - * Generated from protobuf field string external_key_uri = 1; - * @param string $var - * @return $this - */ - public function setExternalKeyUri($var) - { - GPBUtil::checkString($var, True); - $this->external_key_uri = $var; - - return $this; - } - - /** - * The path to the external key material on the EKM when using - * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set - * this field instead of external_key_uri when using an - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field string ekm_connection_key_path = 2; - * @return string - */ - public function getEkmConnectionKeyPath() - { - return $this->ekm_connection_key_path; - } - - /** - * The path to the external key material on the EKM when using - * [EkmConnection][google.cloud.kms.v1.EkmConnection] e.g., "v0/my/key". Set - * this field instead of external_key_uri when using an - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field string ekm_connection_key_path = 2; - * @param string $var - * @return $this - */ - public function setEkmConnectionKeyPath($var) - { - GPBUtil::checkString($var, True); - $this->ekm_connection_key_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php deleted file mode 100644 index 6d13898c4f0e..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.kms.v1.GenerateRandomBytesRequest - */ -class GenerateRandomBytesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The project-specific location in which to generate random bytes. - * For example, "projects/my-project/locations/us-central1". - * - * Generated from protobuf field string location = 1; - */ - protected $location = ''; - /** - * The length in bytes of the amount of randomness to retrieve. Minimum 8 - * bytes, maximum 1024 bytes. - * - * Generated from protobuf field int32 length_bytes = 2; - */ - protected $length_bytes = 0; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when - * generating the random data. Currently, only - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is - * supported. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $location - * The project-specific location in which to generate random bytes. - * For example, "projects/my-project/locations/us-central1". - * @type int $length_bytes - * The length in bytes of the amount of randomness to retrieve. Minimum 8 - * bytes, maximum 1024 bytes. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when - * generating the random data. Currently, only - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is - * supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The project-specific location in which to generate random bytes. - * For example, "projects/my-project/locations/us-central1". - * - * Generated from protobuf field string location = 1; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * The project-specific location in which to generate random bytes. - * For example, "projects/my-project/locations/us-central1". - * - * 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 length in bytes of the amount of randomness to retrieve. Minimum 8 - * bytes, maximum 1024 bytes. - * - * Generated from protobuf field int32 length_bytes = 2; - * @return int - */ - public function getLengthBytes() - { - return $this->length_bytes; - } - - /** - * The length in bytes of the amount of randomness to retrieve. Minimum 8 - * bytes, maximum 1024 bytes. - * - * Generated from protobuf field int32 length_bytes = 2; - * @param int $var - * @return $this - */ - public function setLengthBytes($var) - { - GPBUtil::checkInt32($var); - $this->length_bytes = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when - * generating the random data. Currently, only - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is - * supported. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when - * generating the random data. Currently, only - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is - * supported. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 3; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php deleted file mode 100644 index 4cf4401fde68..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GenerateRandomBytesResponse.php +++ /dev/null @@ -1,211 +0,0 @@ -google.cloud.kms.v1.GenerateRandomBytesResponse - */ -class GenerateRandomBytesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The generated data. - * - * Generated from protobuf field bytes data = 1; - */ - protected $data = ''; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. - * An integrity check of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * can be performed by computing the CRC32C checksum of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; - */ - protected $data_crc32c = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $data - * The generated data. - * @type \Google\Protobuf\Int64Value $data_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. - * An integrity check of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * can be performed by computing the CRC32C checksum of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The generated data. - * - * Generated from protobuf field bytes data = 1; - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * The generated data. - * - * Generated from protobuf field bytes data = 1; - * @param string $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkString($var, False); - $this->data = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. - * An integrity check of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * can be performed by computing the CRC32C checksum of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; - * @return \Google\Protobuf\Int64Value|null - */ - public function getDataCrc32C() - { - return $this->data_crc32c; - } - - public function hasDataCrc32C() - { - return isset($this->data_crc32c); - } - - public function clearDataCrc32C() - { - unset($this->data_crc32c); - } - - /** - * Returns the unboxed value from getDataCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. - * An integrity check of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * can be performed by computing the CRC32C checksum of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; - * @return int|string|null - */ - public function getDataCrc32CUnwrapped() - { - return $this->readWrapperValue("data_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. - * An integrity check of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * can be performed by computing the CRC32C checksum of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setDataCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->data_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data]. - * An integrity check of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * can be performed by computing the CRC32C checksum of - * [GenerateRandomBytesResponse.data][google.cloud.kms.v1.GenerateRandomBytesResponse.data] - * and comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3; - * @param int|string|null $var - * @return $this - */ - public function setDataCrc32CUnwrapped($var) - { - $this->writeWrapperValue("data_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php deleted file mode 100644 index 37ebfa8f1a2d..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.kms.v1.GetCryptoKeyRequest - */ -class GetCryptoKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. - * - * 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 [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] 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][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php deleted file mode 100644 index 87c283f3d087..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetCryptoKeyVersionRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.kms.v1.GetCryptoKeyVersionRequest - */ -class GetCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. - * - * 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 [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] 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][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php deleted file mode 100644 index fdc11636b7b3..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetEkmConnectionRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.kms.v1.GetEkmConnectionRequest - */ -class GetEkmConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. - * - * 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 [name][google.cloud.kms.v1.EkmConnection.name] of the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] 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][google.cloud.kms.v1.EkmConnection.name] of the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php deleted file mode 100644 index cfba50de0ec1..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetImportJobRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.kms.v1.GetImportJobRequest - */ -class GetImportJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] to get. - * - * 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 [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] 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][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php deleted file mode 100644 index ecad944c5ea4..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetKeyRingRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.kms.v1.GetKeyRingRequest - */ -class GetKeyRingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] to get. - * - * 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 [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] 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][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php deleted file mode 100644 index d778ff4e3c3c..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/GetPublicKeyRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.kms.v1.GetPublicKeyRequest - */ -class GetPublicKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. - * - * 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 [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key 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][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php deleted file mode 100644 index 9018eb71ff7e..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportCryptoKeyVersionRequest.php +++ /dev/null @@ -1,491 +0,0 @@ -google.cloud.kms.v1.ImportCryptoKeyVersionRequest - */ -class ImportCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. - * The create permission is only required on this key when creating a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of - * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to - * target for an import operation. If this field is not present, a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the - * supplied key material is created. - * If this field is present, the supplied key material is imported into - * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To - * import into an existing - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of - * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], - * have been previously created via [ImportCryptoKeyVersion][], and be in - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] - * or - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] - * state. The key material and algorithm must match the previous - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained - * key material. - * - * Generated from protobuf field string crypto_key_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $crypto_key_version = ''; - /** - * Required. The - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * of the key being imported. This does not need to match the - * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $algorithm = 0; - /** - * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key - * material. - * - * Generated from protobuf field string import_job = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $import_job = ''; - /** - * Optional. The wrapped key material to import. - * Before wrapping, key material must be formatted. If importing symmetric key - * material, the expected key material format is plain bytes. If importing - * asymmetric key material, the expected key material format is PKCS#8-encoded - * DER (the PrivateKeyInfo structure from RFC 5208). - * When wrapping with import methods - * ([RSA_OAEP_3072_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] - * or - * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] - * or - * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] - * or - * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256_AES_256]), - * this field must contain the concatenation of: - *

    - *
  1. An ephemeral AES-256 wrapping key wrapped with the - * [public_key][google.cloud.kms.v1.ImportJob.public_key] using - * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty - * label. - *
  2. - *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 - * key using AES-KWP (RFC 5649). - *
  4. - *
- * This format is the same as the format produced by PKCS#11 mechanism - * CKM_RSA_AES_KEY_WRAP. - * When wrapping with import methods - * ([RSA_OAEP_3072_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] - * or - * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), - * this field must contain the formatted key to be imported, wrapped with the - * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP - * with SHA-256, MGF1 with SHA-256, and an empty label. - * - * Generated from protobuf field bytes wrapped_key = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $wrapped_key = ''; - protected $wrapped_key_material; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. - * The create permission is only required on this key when creating a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * @type string $crypto_key_version - * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of - * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to - * target for an import operation. If this field is not present, a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the - * supplied key material is created. - * If this field is present, the supplied key material is imported into - * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To - * import into an existing - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of - * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], - * have been previously created via [ImportCryptoKeyVersion][], and be in - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] - * or - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] - * state. The key material and algorithm must match the previous - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained - * key material. - * @type int $algorithm - * Required. The - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * of the key being imported. This does not need to match the - * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. - * @type string $import_job - * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key - * material. - * @type string $wrapped_key - * Optional. The wrapped key material to import. - * Before wrapping, key material must be formatted. If importing symmetric key - * material, the expected key material format is plain bytes. If importing - * asymmetric key material, the expected key material format is PKCS#8-encoded - * DER (the PrivateKeyInfo structure from RFC 5208). - * When wrapping with import methods - * ([RSA_OAEP_3072_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] - * or - * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] - * or - * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] - * or - * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256_AES_256]), - * this field must contain the concatenation of: - *
    - *
  1. An ephemeral AES-256 wrapping key wrapped with the - * [public_key][google.cloud.kms.v1.ImportJob.public_key] using - * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty - * label. - *
  2. - *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 - * key using AES-KWP (RFC 5649). - *
  4. - *
- * This format is the same as the format produced by PKCS#11 mechanism - * CKM_RSA_AES_KEY_WRAP. - * When wrapping with import methods - * ([RSA_OAEP_3072_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] - * or - * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), - * this field must contain the formatted key to be imported, wrapped with the - * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP - * with SHA-256, MGF1 with SHA-256, and an empty label. - * @type string $rsa_aes_wrapped_key - * Optional. This field has the same meaning as - * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. - * Prefer to use that field in new work. Either that field or this field - * (but not both) must be specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. - * The create permission is only required on this key when creating a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated 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][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. - * The create permission is only required on this key when creating a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of - * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to - * target for an import operation. If this field is not present, a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the - * supplied key material is created. - * If this field is present, the supplied key material is imported into - * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To - * import into an existing - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of - * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], - * have been previously created via [ImportCryptoKeyVersion][], and be in - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] - * or - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] - * state. The key material and algorithm must match the previous - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained - * key material. - * - * Generated from protobuf field string crypto_key_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getCryptoKeyVersion() - { - return $this->crypto_key_version; - } - - /** - * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of - * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to - * target for an import operation. If this field is not present, a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the - * supplied key material is created. - * If this field is present, the supplied key material is imported into - * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To - * import into an existing - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of - * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], - * have been previously created via [ImportCryptoKeyVersion][], and be in - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] - * or - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] - * state. The key material and algorithm must match the previous - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained - * key material. - * - * Generated from protobuf field string crypto_key_version = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCryptoKeyVersion($var) - { - GPBUtil::checkString($var, True); - $this->crypto_key_version = $var; - - return $this; - } - - /** - * Required. The - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * of the key being imported. This does not need to match the - * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getAlgorithm() - { - return $this->algorithm; - } - - /** - * Required. The - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * of the key being imported. This does not need to match the - * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setAlgorithm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); - $this->algorithm = $var; - - return $this; - } - - /** - * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key - * material. - * - * Generated from protobuf field string import_job = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getImportJob() - { - return $this->import_job; - } - - /** - * Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key - * material. - * - * Generated from protobuf field string import_job = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setImportJob($var) - { - GPBUtil::checkString($var, True); - $this->import_job = $var; - - return $this; - } - - /** - * Optional. The wrapped key material to import. - * Before wrapping, key material must be formatted. If importing symmetric key - * material, the expected key material format is plain bytes. If importing - * asymmetric key material, the expected key material format is PKCS#8-encoded - * DER (the PrivateKeyInfo structure from RFC 5208). - * When wrapping with import methods - * ([RSA_OAEP_3072_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] - * or - * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] - * or - * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] - * or - * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256_AES_256]), - * this field must contain the concatenation of: - *
    - *
  1. An ephemeral AES-256 wrapping key wrapped with the - * [public_key][google.cloud.kms.v1.ImportJob.public_key] using - * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty - * label. - *
  2. - *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 - * key using AES-KWP (RFC 5649). - *
  4. - *
- * This format is the same as the format produced by PKCS#11 mechanism - * CKM_RSA_AES_KEY_WRAP. - * When wrapping with import methods - * ([RSA_OAEP_3072_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] - * or - * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), - * this field must contain the formatted key to be imported, wrapped with the - * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP - * with SHA-256, MGF1 with SHA-256, and an empty label. - * - * Generated from protobuf field bytes wrapped_key = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getWrappedKey() - { - return $this->wrapped_key; - } - - /** - * Optional. The wrapped key material to import. - * Before wrapping, key material must be formatted. If importing symmetric key - * material, the expected key material format is plain bytes. If importing - * asymmetric key material, the expected key material format is PKCS#8-encoded - * DER (the PrivateKeyInfo structure from RFC 5208). - * When wrapping with import methods - * ([RSA_OAEP_3072_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] - * or - * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] - * or - * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] - * or - * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256_AES_256]), - * this field must contain the concatenation of: - *
    - *
  1. An ephemeral AES-256 wrapping key wrapped with the - * [public_key][google.cloud.kms.v1.ImportJob.public_key] using - * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty - * label. - *
  2. - *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 - * key using AES-KWP (RFC 5649). - *
  4. - *
- * This format is the same as the format produced by PKCS#11 mechanism - * CKM_RSA_AES_KEY_WRAP. - * When wrapping with import methods - * ([RSA_OAEP_3072_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] - * or - * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), - * this field must contain the formatted key to be imported, wrapped with the - * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP - * with SHA-256, MGF1 with SHA-256, and an empty label. - * - * Generated from protobuf field bytes wrapped_key = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setWrappedKey($var) - { - GPBUtil::checkString($var, False); - $this->wrapped_key = $var; - - return $this; - } - - /** - * Optional. This field has the same meaning as - * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. - * Prefer to use that field in new work. Either that field or this field - * (but not both) must be specified. - * - * Generated from protobuf field bytes rsa_aes_wrapped_key = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRsaAesWrappedKey() - { - return $this->readOneof(5); - } - - public function hasRsaAesWrappedKey() - { - return $this->hasOneof(5); - } - - /** - * Optional. This field has the same meaning as - * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. - * Prefer to use that field in new work. Either that field or this field - * (but not both) must be specified. - * - * Generated from protobuf field bytes rsa_aes_wrapped_key = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRsaAesWrappedKey($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getWrappedKeyMaterial() - { - return $this->whichOneof("wrapped_key_material"); - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php deleted file mode 100644 index 6eae364be08c..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob.php +++ /dev/null @@ -1,549 +0,0 @@ -google.cloud.kms.v1.ImportJob - */ -class ImportJob extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name for this - * [ImportJob][google.cloud.kms.v1.ImportJob] in the format - * `projects/*/locations/*/keyRings/*/importJobs/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. Immutable. The wrapping method to be used for incoming key - * material. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $import_method = 0; - /** - * Required. Immutable. The protection level of the - * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] - * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import - * into. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $protection_level = 0; - /** - * Output only. The time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] 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 time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key - * material was generated. - * - * Generated from protobuf field .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $generate_time = null; - /** - * Output only. The time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and - * can no longer be used to import key material. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] - * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is - * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_event_time = null; - /** - * Output only. The current state of the - * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The public key with which to wrap key material prior to - * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is - * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $public_key = null; - /** - * Output only. Statement that was generated and signed by the key creator - * (for example, an HSM) at key creation time. Use this statement to verify - * attributes of the key as stored on the HSM, independently of Google. - * Only present if the chosen - * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a - * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $attestation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name for this - * [ImportJob][google.cloud.kms.v1.ImportJob] in the format - * `projects/*/locations/*/keyRings/*/importJobs/*`. - * @type int $import_method - * Required. Immutable. The wrapping method to be used for incoming key - * material. - * @type int $protection_level - * Required. Immutable. The protection level of the - * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] - * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import - * into. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] was created. - * @type \Google\Protobuf\Timestamp $generate_time - * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key - * material was generated. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. The time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and - * can no longer be used to import key material. - * @type \Google\Protobuf\Timestamp $expire_event_time - * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] - * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is - * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. - * @type int $state - * Output only. The current state of the - * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. - * @type \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey $public_key - * Output only. The public key with which to wrap key material prior to - * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is - * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. - * @type \Google\Cloud\Kms\V1\KeyOperationAttestation $attestation - * Output only. Statement that was generated and signed by the key creator - * (for example, an HSM) at key creation time. Use this statement to verify - * attributes of the key as stored on the HSM, independently of Google. - * Only present if the chosen - * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a - * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name for this - * [ImportJob][google.cloud.kms.v1.ImportJob] in the format - * `projects/*/locations/*/keyRings/*/importJobs/*`. - * - * 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 for this - * [ImportJob][google.cloud.kms.v1.ImportJob] in the format - * `projects/*/locations/*/keyRings/*/importJobs/*`. - * - * 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; - } - - /** - * Required. Immutable. The wrapping method to be used for incoming key - * material. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getImportMethod() - { - return $this->import_method; - } - - /** - * Required. Immutable. The wrapping method to be used for incoming key - * material. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setImportMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ImportJob\ImportMethod::class); - $this->import_method = $var; - - return $this; - } - - /** - * Required. Immutable. The protection level of the - * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] - * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import - * into. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * Required. Immutable. The protection level of the - * [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] - * on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import - * into. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - - /** - * Output only. The time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] 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 time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] 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 time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key - * material was generated. - * - * Generated from protobuf field .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getGenerateTime() - { - return $this->generate_time; - } - - public function hasGenerateTime() - { - return isset($this->generate_time); - } - - public function clearGenerateTime() - { - unset($this->generate_time); - } - - /** - * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key - * material was generated. - * - * Generated from protobuf field .google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setGenerateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->generate_time = $var; - - return $this; - } - - /** - * Output only. The time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and - * can no longer be used to import key material. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.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. The time at which this - * [ImportJob][google.cloud.kms.v1.ImportJob] is scheduled for expiration and - * can no longer be used to import key material. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.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; - } - - /** - * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] - * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is - * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireEventTime() - { - return $this->expire_event_time; - } - - public function hasExpireEventTime() - { - return isset($this->expire_event_time); - } - - public function clearExpireEventTime() - { - unset($this->expire_event_time); - } - - /** - * Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] - * expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is - * [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED]. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_event_time = $var; - - return $this; - } - - /** - * Output only. The current state of the - * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the - * [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used. - * - * Generated from protobuf field .google.cloud.kms.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\Kms\V1\ImportJob\ImportJobState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The public key with which to wrap key material prior to - * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is - * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey|null - */ - public function getPublicKey() - { - return $this->public_key; - } - - public function hasPublicKey() - { - return isset($this->public_key); - } - - public function clearPublicKey() - { - unset($this->public_key); - } - - /** - * Output only. The public key with which to wrap key material prior to - * import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is - * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE]. - * - * Generated from protobuf field .google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey $var - * @return $this - */ - public function setPublicKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\ImportJob\WrappingPublicKey::class); - $this->public_key = $var; - - return $this; - } - - /** - * Output only. Statement that was generated and signed by the key creator - * (for example, an HSM) at key creation time. Use this statement to verify - * attributes of the key as stored on the HSM, independently of Google. - * Only present if the chosen - * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a - * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Kms\V1\KeyOperationAttestation|null - */ - public function getAttestation() - { - return $this->attestation; - } - - public function hasAttestation() - { - return isset($this->attestation); - } - - public function clearAttestation() - { - unset($this->attestation); - } - - /** - * Output only. Statement that was generated and signed by the key creator - * (for example, an HSM) at key creation time. Use this statement to verify - * attributes of the key as stored on the HSM, independently of Google. - * Only present if the chosen - * [ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a - * protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM]. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Kms\V1\KeyOperationAttestation $var - * @return $this - */ - public function setAttestation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyOperationAttestation::class); - $this->attestation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php deleted file mode 100644 index b6e7a3e918ae..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportJobState.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.kms.v1.ImportJob.ImportJobState - */ -class ImportJobState -{ - /** - * Not specified. - * - * Generated from protobuf enum IMPORT_JOB_STATE_UNSPECIFIED = 0; - */ - const IMPORT_JOB_STATE_UNSPECIFIED = 0; - /** - * The wrapping key for this job is still being generated. It may not be - * used. Cloud KMS will automatically mark this job as - * [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] as soon as - * the wrapping key is generated. - * - * Generated from protobuf enum PENDING_GENERATION = 1; - */ - const PENDING_GENERATION = 1; - /** - * This job may be used in - * [CreateCryptoKey][google.cloud.kms.v1.KeyManagementService.CreateCryptoKey] - * and - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * requests. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * This job can no longer be used and may not leave this state once entered. - * - * Generated from protobuf enum EXPIRED = 3; - */ - const EXPIRED = 3; - - private static $valueToName = [ - self::IMPORT_JOB_STATE_UNSPECIFIED => 'IMPORT_JOB_STATE_UNSPECIFIED', - self::PENDING_GENERATION => 'PENDING_GENERATION', - self::ACTIVE => 'ACTIVE', - self::EXPIRED => 'EXPIRED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Kms\V1\ImportJob_ImportJobState::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php deleted file mode 100644 index f9a854116277..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/ImportMethod.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.kms.v1.ImportJob.ImportMethod - */ -class ImportMethod -{ - /** - * Not specified. - * - * Generated from protobuf enum IMPORT_METHOD_UNSPECIFIED = 0; - */ - const IMPORT_METHOD_UNSPECIFIED = 0; - /** - * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping - * scheme defined in the PKCS #11 standard. In summary, this involves - * wrapping the raw key with an ephemeral AES key, and wrapping the - * ephemeral AES key with a 3072 bit RSA key. For more details, see - * [RSA AES key wrap - * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908). - * - * Generated from protobuf enum RSA_OAEP_3072_SHA1_AES_256 = 1; - */ - const RSA_OAEP_3072_SHA1_AES_256 = 1; - /** - * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping - * scheme defined in the PKCS #11 standard. In summary, this involves - * wrapping the raw key with an ephemeral AES key, and wrapping the - * ephemeral AES key with a 4096 bit RSA key. For more details, see - * [RSA AES key wrap - * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908). - * - * Generated from protobuf enum RSA_OAEP_4096_SHA1_AES_256 = 2; - */ - const RSA_OAEP_4096_SHA1_AES_256 = 2; - /** - * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping - * scheme defined in the PKCS #11 standard. In summary, this involves - * wrapping the raw key with an ephemeral AES key, and wrapping the - * ephemeral AES key with a 3072 bit RSA key. For more details, see - * [RSA AES key wrap - * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908). - * - * Generated from protobuf enum RSA_OAEP_3072_SHA256_AES_256 = 3; - */ - const RSA_OAEP_3072_SHA256_AES_256 = 3; - /** - * This ImportMethod represents the CKM_RSA_AES_KEY_WRAP key wrapping - * scheme defined in the PKCS #11 standard. In summary, this involves - * wrapping the raw key with an ephemeral AES key, and wrapping the - * ephemeral AES key with a 4096 bit RSA key. For more details, see - * [RSA AES key wrap - * mechanism](http://docs.oasis-open.org/pkcs11/pkcs11-curr/v2.40/cos01/pkcs11-curr-v2.40-cos01.html#_Toc408226908). - * - * Generated from protobuf enum RSA_OAEP_4096_SHA256_AES_256 = 4; - */ - const RSA_OAEP_4096_SHA256_AES_256 = 4; - /** - * This ImportMethod represents RSAES-OAEP with a 3072 bit RSA key. The - * key material to be imported is wrapped directly with the RSA key. Due - * to technical limitations of RSA wrapping, this method cannot be used to - * wrap RSA keys for import. - * - * Generated from protobuf enum RSA_OAEP_3072_SHA256 = 5; - */ - const RSA_OAEP_3072_SHA256 = 5; - /** - * This ImportMethod represents RSAES-OAEP with a 4096 bit RSA key. The - * key material to be imported is wrapped directly with the RSA key. Due - * to technical limitations of RSA wrapping, this method cannot be used to - * wrap RSA keys for import. - * - * Generated from protobuf enum RSA_OAEP_4096_SHA256 = 6; - */ - const RSA_OAEP_4096_SHA256 = 6; - - private static $valueToName = [ - self::IMPORT_METHOD_UNSPECIFIED => 'IMPORT_METHOD_UNSPECIFIED', - self::RSA_OAEP_3072_SHA1_AES_256 => 'RSA_OAEP_3072_SHA1_AES_256', - self::RSA_OAEP_4096_SHA1_AES_256 => 'RSA_OAEP_4096_SHA1_AES_256', - self::RSA_OAEP_3072_SHA256_AES_256 => 'RSA_OAEP_3072_SHA256_AES_256', - self::RSA_OAEP_4096_SHA256_AES_256 => 'RSA_OAEP_4096_SHA256_AES_256', - self::RSA_OAEP_3072_SHA256 => 'RSA_OAEP_3072_SHA256', - self::RSA_OAEP_4096_SHA256 => 'RSA_OAEP_4096_SHA256', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ImportMethod::class, \Google\Cloud\Kms\V1\ImportJob_ImportMethod::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php deleted file mode 100644 index 63be4f5d952d..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob/WrappingPublicKey.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.kms.v1.ImportJob.WrappingPublicKey - */ -class WrappingPublicKey extends \Google\Protobuf\Internal\Message -{ - /** - * The public key, encoded in PEM format. For more information, see the [RFC - * 7468](https://tools.ietf.org/html/rfc7468) sections for [General - * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and - * [Textual Encoding of Subject Public Key Info] - * (https://tools.ietf.org/html/rfc7468#section-13). - * - * Generated from protobuf field string pem = 1; - */ - protected $pem = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pem - * The public key, encoded in PEM format. For more information, see the [RFC - * 7468](https://tools.ietf.org/html/rfc7468) sections for [General - * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and - * [Textual Encoding of Subject Public Key Info] - * (https://tools.ietf.org/html/rfc7468#section-13). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The public key, encoded in PEM format. For more information, see the [RFC - * 7468](https://tools.ietf.org/html/rfc7468) sections for [General - * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and - * [Textual Encoding of Subject Public Key Info] - * (https://tools.ietf.org/html/rfc7468#section-13). - * - * Generated from protobuf field string pem = 1; - * @return string - */ - public function getPem() - { - return $this->pem; - } - - /** - * The public key, encoded in PEM format. For more information, see the [RFC - * 7468](https://tools.ietf.org/html/rfc7468) sections for [General - * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and - * [Textual Encoding of Subject Public Key Info] - * (https://tools.ietf.org/html/rfc7468#section-13). - * - * Generated from protobuf field string pem = 1; - * @param string $var - * @return $this - */ - public function setPem($var) - { - GPBUtil::checkString($var, True); - $this->pem = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WrappingPublicKey::class, \Google\Cloud\Kms\V1\ImportJob_WrappingPublicKey::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob_ImportJobState.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob_ImportJobState.php deleted file mode 100644 index fa4e791d1237..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ImportJob_ImportJobState.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.kms.v1.KeyManagementService/ListKeyRings', - $argument, - ['\Google\Cloud\Kms\V1\ListKeyRingsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * @param \Google\Cloud\Kms\V1\ListCryptoKeysRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListCryptoKeys(\Google\Cloud\Kms\V1\ListCryptoKeysRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/ListCryptoKeys', - $argument, - ['\Google\Cloud\Kms\V1\ListCryptoKeysResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * @param \Google\Cloud\Kms\V1\ListCryptoKeyVersionsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListCryptoKeyVersions(\Google\Cloud\Kms\V1\ListCryptoKeyVersionsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/ListCryptoKeyVersions', - $argument, - ['\Google\Cloud\Kms\V1\ListCryptoKeyVersionsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists [ImportJobs][google.cloud.kms.v1.ImportJob]. - * @param \Google\Cloud\Kms\V1\ListImportJobsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListImportJobs(\Google\Cloud\Kms\V1\ListImportJobsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/ListImportJobs', - $argument, - ['\Google\Cloud\Kms\V1\ListImportJobsResponse', 'decode'], - $metadata, $options); - } - - /** - * Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing]. - * @param \Google\Cloud\Kms\V1\GetKeyRingRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetKeyRing(\Google\Cloud\Kms\V1\GetKeyRingRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/GetKeyRing', - $argument, - ['\Google\Cloud\Kms\V1\KeyRing', 'decode'], - $metadata, $options); - } - - /** - * Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as - * well as its [primary][google.cloud.kms.v1.CryptoKey.primary] - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * @param \Google\Cloud\Kms\V1\GetCryptoKeyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetCryptoKey(\Google\Cloud\Kms\V1\GetCryptoKeyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/GetCryptoKey', - $argument, - ['\Google\Cloud\Kms\V1\CryptoKey', 'decode'], - $metadata, $options); - } - - /** - * Returns metadata for a given - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * @param \Google\Cloud\Kms\V1\GetCryptoKeyVersionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetCryptoKeyVersion(\Google\Cloud\Kms\V1\GetCryptoKeyVersionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/GetCryptoKeyVersion', - $argument, - ['\Google\Cloud\Kms\V1\CryptoKeyVersion', 'decode'], - $metadata, $options); - } - - /** - * Returns the public key for the given - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - * [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] - * or - * [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT]. - * @param \Google\Cloud\Kms\V1\GetPublicKeyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetPublicKey(\Google\Cloud\Kms\V1\GetPublicKeyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/GetPublicKey', - $argument, - ['\Google\Cloud\Kms\V1\PublicKey', 'decode'], - $metadata, $options); - } - - /** - * Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob]. - * @param \Google\Cloud\Kms\V1\GetImportJobRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetImportJob(\Google\Cloud\Kms\V1\GetImportJobRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/GetImportJob', - $argument, - ['\Google\Cloud\Kms\V1\ImportJob', 'decode'], - $metadata, $options); - } - - /** - * Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and - * Location. - * @param \Google\Cloud\Kms\V1\CreateKeyRingRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateKeyRing(\Google\Cloud\Kms\V1\CreateKeyRingRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/CreateKeyRing', - $argument, - ['\Google\Cloud\Kms\V1\KeyRing', 'decode'], - $metadata, $options); - } - - /** - * Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a - * [KeyRing][google.cloud.kms.v1.KeyRing]. - * - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and - * [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm] - * are required. - * @param \Google\Cloud\Kms\V1\CreateCryptoKeyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateCryptoKey(\Google\Cloud\Kms\V1\CreateCryptoKeyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/CreateCryptoKey', - $argument, - ['\Google\Cloud\Kms\V1\CryptoKey', 'decode'], - $metadata, $options); - } - - /** - * Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * The server will assign the next sequential id. If unset, - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to - * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]. - * @param \Google\Cloud\Kms\V1\CreateCryptoKeyVersionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateCryptoKeyVersion(\Google\Cloud\Kms\V1\CreateCryptoKeyVersionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/CreateCryptoKeyVersion', - $argument, - ['\Google\Cloud\Kms\V1\CryptoKeyVersion', 'decode'], - $metadata, $options); - } - - /** - * Import wrapped key material into a - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * All requests must specify a [CryptoKey][google.cloud.kms.v1.CryptoKey]. If - * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] is additionally - * specified in the request, key material will be reimported into that - * version. Otherwise, a new version will be created, and will be assigned the - * next sequential id within the [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * @param \Google\Cloud\Kms\V1\ImportCryptoKeyVersionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ImportCryptoKeyVersion(\Google\Cloud\Kms\V1\ImportCryptoKeyVersionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/ImportCryptoKeyVersion', - $argument, - ['\Google\Cloud\Kms\V1\CryptoKeyVersion', 'decode'], - $metadata, $options); - } - - /** - * Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a - * [KeyRing][google.cloud.kms.v1.KeyRing]. - * - * [ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is - * required. - * @param \Google\Cloud\Kms\V1\CreateImportJobRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateImportJob(\Google\Cloud\Kms\V1\CreateImportJobRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/CreateImportJob', - $argument, - ['\Google\Cloud\Kms\V1\ImportJob', 'decode'], - $metadata, $options); - } - - /** - * Update a [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * @param \Google\Cloud\Kms\V1\UpdateCryptoKeyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateCryptoKey(\Google\Cloud\Kms\V1\UpdateCryptoKeyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKey', - $argument, - ['\Google\Cloud\Kms\V1\CryptoKey', 'decode'], - $metadata, $options); - } - - /** - * Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s - * metadata. - * - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between - * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] - * and - * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] - * using this method. See - * [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion] - * and - * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] - * to move between other states. - * @param \Google\Cloud\Kms\V1\UpdateCryptoKeyVersionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateCryptoKeyVersion(\Google\Cloud\Kms\V1\UpdateCryptoKeyVersionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyVersion', - $argument, - ['\Google\Cloud\Kms\V1\CryptoKeyVersion', 'decode'], - $metadata, $options); - } - - /** - * Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that - * will be used in - * [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. - * - * Returns an error if called on a key whose purpose is not - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * @param \Google\Cloud\Kms\V1\UpdateCryptoKeyPrimaryVersionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateCryptoKeyPrimaryVersion(\Google\Cloud\Kms\V1\UpdateCryptoKeyPrimaryVersionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyPrimaryVersion', - $argument, - ['\Google\Cloud\Kms\V1\CryptoKey', 'decode'], - $metadata, $options); - } - - /** - * Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for - * destruction. - * - * Upon calling this method, - * [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will - * be set to - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED], - * and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will - * be set to the time - * [destroy_scheduled_duration][google.cloud.kms.v1.CryptoKey.destroy_scheduled_duration] - * in the future. At that time, the - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will automatically - * change to - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED], - * and the key material will be irrevocably destroyed. - * - * Before the - * [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is - * reached, - * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] - * may be called to reverse the process. - * @param \Google\Cloud\Kms\V1\DestroyCryptoKeyVersionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DestroyCryptoKeyVersion(\Google\Cloud\Kms\V1\DestroyCryptoKeyVersionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/DestroyCryptoKeyVersion', - $argument, - ['\Google\Cloud\Kms\V1\CryptoKeyVersion', 'decode'], - $metadata, $options); - } - - /** - * Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] - * state. - * - * Upon restoration of the CryptoKeyVersion, - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to - * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED], - * and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will - * be cleared. - * @param \Google\Cloud\Kms\V1\RestoreCryptoKeyVersionRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RestoreCryptoKeyVersion(\Google\Cloud\Kms\V1\RestoreCryptoKeyVersionRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/RestoreCryptoKeyVersion', - $argument, - ['\Google\Cloud\Kms\V1\CryptoKeyVersion', 'decode'], - $metadata, $options); - } - - /** - * Encrypts data, so that it can only be recovered by a call to - * [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * @param \Google\Cloud\Kms\V1\EncryptRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function Encrypt(\Google\Cloud\Kms\V1\EncryptRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/Encrypt', - $argument, - ['\Google\Cloud\Kms\V1\EncryptResponse', 'decode'], - $metadata, $options); - } - - /** - * Decrypts data that was protected by - * [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * @param \Google\Cloud\Kms\V1\DecryptRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function Decrypt(\Google\Cloud\Kms\V1\DecryptRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/Decrypt', - $argument, - ['\Google\Cloud\Kms\V1\DecryptResponse', 'decode'], - $metadata, $options); - } - - /** - * Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] - * ASYMMETRIC_SIGN, producing a signature that can be verified with the public - * key retrieved from - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. - * @param \Google\Cloud\Kms\V1\AsymmetricSignRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AsymmetricSign(\Google\Cloud\Kms\V1\AsymmetricSignRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/AsymmetricSign', - $argument, - ['\Google\Cloud\Kms\V1\AsymmetricSignResponse', 'decode'], - $metadata, $options); - } - - /** - * Decrypts data that was encrypted with a public key retrieved from - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] - * ASYMMETRIC_DECRYPT. - * @param \Google\Cloud\Kms\V1\AsymmetricDecryptRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AsymmetricDecrypt(\Google\Cloud\Kms\V1\AsymmetricDecryptRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/AsymmetricDecrypt', - $argument, - ['\Google\Cloud\Kms\V1\AsymmetricDecryptResponse', 'decode'], - $metadata, $options); - } - - /** - * Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, - * producing a tag that can be verified by another source with the same key. - * @param \Google\Cloud\Kms\V1\MacSignRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function MacSign(\Google\Cloud\Kms\V1\MacSignRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/MacSign', - $argument, - ['\Google\Cloud\Kms\V1\MacSignResponse', 'decode'], - $metadata, $options); - } - - /** - * Verifies MAC tag using a - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, and returns - * a response that indicates whether or not the verification was successful. - * @param \Google\Cloud\Kms\V1\MacVerifyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function MacVerify(\Google\Cloud\Kms\V1\MacVerifyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/MacVerify', - $argument, - ['\Google\Cloud\Kms\V1\MacVerifyResponse', 'decode'], - $metadata, $options); - } - - /** - * Generate random bytes using the Cloud KMS randomness source in the provided - * location. - * @param \Google\Cloud\Kms\V1\GenerateRandomBytesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GenerateRandomBytes(\Google\Cloud\Kms\V1\GenerateRandomBytesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.kms.v1.KeyManagementService/GenerateRandomBytes', - $argument, - ['\Google\Cloud\Kms\V1\GenerateRandomBytesResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php deleted file mode 100644 index faed7bffa9e1..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.kms.v1.KeyOperationAttestation - */ -class KeyOperationAttestation extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The format of the attestation data. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $format = 0; - /** - * Output only. The attestation data provided by the HSM when the key - * operation was performed. - * - * Generated from protobuf field bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $content = ''; - /** - * Output only. The certificate chains needed to validate the attestation - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cert_chains = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $format - * Output only. The format of the attestation data. - * @type string $content - * Output only. The attestation data provided by the HSM when the key - * operation was performed. - * @type \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains $cert_chains - * Output only. The certificate chains needed to validate the attestation - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The format of the attestation data. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFormat() - { - return $this->format; - } - - /** - * Output only. The format of the attestation data. - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\KeyOperationAttestation\AttestationFormat::class); - $this->format = $var; - - return $this; - } - - /** - * Output only. The attestation data provided by the HSM when the key - * operation was performed. - * - * Generated from protobuf field bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Output only. The attestation data provided by the HSM when the key - * operation was performed. - * - * Generated from protobuf field bytes content = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->content = $var; - - return $this; - } - - /** - * Output only. The certificate chains needed to validate the attestation - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains|null - */ - public function getCertChains() - { - return $this->cert_chains; - } - - public function hasCertChains() - { - return isset($this->cert_chains); - } - - public function clearCertChains() - { - unset($this->cert_chains); - } - - /** - * Output only. The certificate chains needed to validate the attestation - * - * Generated from protobuf field .google.cloud.kms.v1.KeyOperationAttestation.CertificateChains cert_chains = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains $var - * @return $this - */ - public function setCertChains($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\KeyOperationAttestation\CertificateChains::class); - $this->cert_chains = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php deleted file mode 100644 index 43880fade2c1..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/AttestationFormat.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat - */ -class AttestationFormat -{ - /** - * Not specified. - * - * Generated from protobuf enum ATTESTATION_FORMAT_UNSPECIFIED = 0; - */ - const ATTESTATION_FORMAT_UNSPECIFIED = 0; - /** - * Cavium HSM attestation compressed with gzip. Note that this format is - * defined by Cavium and subject to change at any time. - * See - * https://www.marvell.com/products/security-solutions/nitrox-hs-adapters/software-key-attestation.html. - * - * Generated from protobuf enum CAVIUM_V1_COMPRESSED = 3; - */ - const CAVIUM_V1_COMPRESSED = 3; - /** - * Cavium HSM attestation V2 compressed with gzip. This is a new format - * introduced in Cavium's version 3.2-08. - * - * Generated from protobuf enum CAVIUM_V2_COMPRESSED = 4; - */ - const CAVIUM_V2_COMPRESSED = 4; - - private static $valueToName = [ - self::ATTESTATION_FORMAT_UNSPECIFIED => 'ATTESTATION_FORMAT_UNSPECIFIED', - self::CAVIUM_V1_COMPRESSED => 'CAVIUM_V1_COMPRESSED', - self::CAVIUM_V2_COMPRESSED => 'CAVIUM_V2_COMPRESSED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AttestationFormat::class, \Google\Cloud\Kms\V1\KeyOperationAttestation_AttestationFormat::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php deleted file mode 100644 index b1eef375ad42..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation/CertificateChains.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.kms.v1.KeyOperationAttestation.CertificateChains - */ -class CertificateChains extends \Google\Protobuf\Internal\Message -{ - /** - * Cavium certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string cavium_certs = 1; - */ - private $cavium_certs; - /** - * Google card certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string google_card_certs = 2; - */ - private $google_card_certs; - /** - * Google partition certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string google_partition_certs = 3; - */ - private $google_partition_certs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $cavium_certs - * Cavium certificate chain corresponding to the attestation. - * @type array|\Google\Protobuf\Internal\RepeatedField $google_card_certs - * Google card certificate chain corresponding to the attestation. - * @type array|\Google\Protobuf\Internal\RepeatedField $google_partition_certs - * Google partition certificate chain corresponding to the attestation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Cavium certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string cavium_certs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCaviumCerts() - { - return $this->cavium_certs; - } - - /** - * Cavium certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string cavium_certs = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCaviumCerts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->cavium_certs = $arr; - - return $this; - } - - /** - * Google card certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string google_card_certs = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGoogleCardCerts() - { - return $this->google_card_certs; - } - - /** - * Google card certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string google_card_certs = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGoogleCardCerts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->google_card_certs = $arr; - - return $this; - } - - /** - * Google partition certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string google_partition_certs = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGooglePartitionCerts() - { - return $this->google_partition_certs; - } - - /** - * Google partition certificate chain corresponding to the attestation. - * - * Generated from protobuf field repeated string google_partition_certs = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGooglePartitionCerts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->google_partition_certs = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CertificateChains::class, \Google\Cloud\Kms\V1\KeyOperationAttestation_CertificateChains::class); - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation_AttestationFormat.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation_AttestationFormat.php deleted file mode 100644 index fe81af01dca8..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/KeyOperationAttestation_AttestationFormat.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.kms.v1.KeyRing - */ -class KeyRing extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name for the - * [KeyRing][google.cloud.kms.v1.KeyRing] in the format - * `projects/*/locations/*/keyRings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] - * was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name for the - * [KeyRing][google.cloud.kms.v1.KeyRing] in the format - * `projects/*/locations/*/keyRings/*`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] - * was created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name for the - * [KeyRing][google.cloud.kms.v1.KeyRing] in the format - * `projects/*/locations/*/keyRings/*`. - * - * 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 for the - * [KeyRing][google.cloud.kms.v1.KeyRing] in the format - * `projects/*/locations/*/keyRings/*`. - * - * 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 time at which this [KeyRing][google.cloud.kms.v1.KeyRing] - * 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 at which this [KeyRing][google.cloud.kms.v1.KeyRing] - * 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; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php deleted file mode 100644 index 21058e58aeea..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsRequest.php +++ /dev/null @@ -1,298 +0,0 @@ -google.cloud.kms.v1.ListCryptoKeyVersionsRequest - */ -class ListCryptoKeyVersionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Optional limit on the number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the - * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * can subsequently be obtained by including the - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Optional pagination token, returned earlier via - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * The fields to include in the response. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView view = 4; - */ - protected $view = 0; - /** - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * @type int $page_size - * Optional. Optional limit on the number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the - * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * can subsequently be obtained by including the - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * @type string $page_token - * Optional. Optional pagination token, returned earlier via - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token]. - * @type int $view - * The fields to include in the response. - * @type string $filter - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * @type string $order_by - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated 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 - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 limit on the number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the - * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * can subsequently be obtained by including the - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] - * in a subsequent request. If unspecified, the 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. Optional limit on the number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] to include in the - * response. Further [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] - * can subsequently be obtained by including the - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_page_token] - * in a subsequent request. If unspecified, the 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. Optional pagination token, returned earlier via - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_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. Optional pagination token, returned earlier via - * [ListCryptoKeyVersionsResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeyVersionsResponse.next_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; - } - - /** - * The fields to include in the response. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView view = 4; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * The fields to include in the response. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView view = 4; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionView::class); - $this->view = $var; - - return $this; - } - - /** - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/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. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/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. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/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; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php deleted file mode 100644 index bbbe9ccb0775..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeyVersionsResponse.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.kms.v1.ListCryptoKeyVersionsResponse - */ -class ListCryptoKeyVersionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKeyVersion crypto_key_versions = 1; - */ - private $crypto_key_versions; - /** - * A token to retrieve next page of results. Pass this value in - * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the - * query. - * - * 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\Kms\V1\CryptoKeyVersion>|\Google\Protobuf\Internal\RepeatedField $crypto_key_versions - * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * @type string $next_page_token - * A token to retrieve next page of results. Pass this value in - * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] - * to retrieve the next page of results. - * @type int $total_size - * The total number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the - * query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKeyVersion crypto_key_versions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCryptoKeyVersions() - { - return $this->crypto_key_versions; - } - - /** - * The list of [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKeyVersion crypto_key_versions = 1; - * @param array<\Google\Cloud\Kms\V1\CryptoKeyVersion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCryptoKeyVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); - $this->crypto_key_versions = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] - * to retrieve 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 retrieve next page of results. Pass this value in - * [ListCryptoKeyVersionsRequest.page_token][google.cloud.kms.v1.ListCryptoKeyVersionsRequest.page_token] - * to retrieve 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; - } - - /** - * The total number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the - * query. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] that matched the - * query. - * - * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php deleted file mode 100644 index f721f1bfcbe0..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysRequest.php +++ /dev/null @@ -1,294 +0,0 @@ -google.cloud.kms.v1.ListCryptoKeysRequest - */ -class ListCryptoKeysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Optional limit on the number of - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. - * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be - * obtained by including the - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Optional pagination token, returned earlier via - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * The fields of the primary version to include in the response. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView version_view = 4; - */ - protected $version_view = 0; - /** - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * @type int $page_size - * Optional. Optional limit on the number of - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. - * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be - * obtained by including the - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * @type string $page_token - * Optional. Optional pagination token, returned earlier via - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token]. - * @type int $version_view - * The fields of the primary version to include in the response. - * @type string $filter - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * @type string $order_by - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * - * Generated 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 [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 limit on the number of - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. - * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be - * obtained by including the - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] - * in a subsequent request. If unspecified, the 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. Optional limit on the number of - * [CryptoKeys][google.cloud.kms.v1.CryptoKey] to include in the response. - * Further [CryptoKeys][google.cloud.kms.v1.CryptoKey] can subsequently be - * obtained by including the - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_page_token] - * in a subsequent request. If unspecified, the 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. Optional pagination token, returned earlier via - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_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. Optional pagination token, returned earlier via - * [ListCryptoKeysResponse.next_page_token][google.cloud.kms.v1.ListCryptoKeysResponse.next_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; - } - - /** - * The fields of the primary version to include in the response. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView version_view = 4; - * @return int - */ - public function getVersionView() - { - return $this->version_view; - } - - /** - * The fields of the primary version to include in the response. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionView version_view = 4; - * @param int $var - * @return $this - */ - public function setVersionView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionView::class); - $this->version_view = $var; - - return $this; - } - - /** - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/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. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/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. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/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; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php deleted file mode 100644 index 256c1b36b885..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListCryptoKeysResponse.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.kms.v1.ListCryptoKeysResponse - */ -class ListCryptoKeysResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKey crypto_keys = 1; - */ - private $crypto_keys; - /** - * A token to retrieve next page of results. Pass this value in - * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that - * matched the query. - * - * 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\Kms\V1\CryptoKey>|\Google\Protobuf\Internal\RepeatedField $crypto_keys - * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * @type string $next_page_token - * A token to retrieve next page of results. Pass this value in - * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] - * to retrieve the next page of results. - * @type int $total_size - * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that - * matched the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKey crypto_keys = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCryptoKeys() - { - return $this->crypto_keys; - } - - /** - * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.CryptoKey crypto_keys = 1; - * @param array<\Google\Cloud\Kms\V1\CryptoKey>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCryptoKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\CryptoKey::class); - $this->crypto_keys = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] - * to retrieve 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 retrieve next page of results. Pass this value in - * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] - * to retrieve 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; - } - - /** - * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that - * matched the query. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that - * matched the query. - * - * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php deleted file mode 100644 index 1b4874c79e55..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsRequest.php +++ /dev/null @@ -1,264 +0,0 @@ -google.cloud.kms.v1.ListEkmConnectionsRequest - */ -class ListEkmConnectionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location associated with the - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Optional limit on the number of - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the - * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can - * subsequently be obtained by including the - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Optional pagination token, returned earlier via - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location associated with the - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format - * `projects/*/locations/*`. - * @type int $page_size - * Optional. Optional limit on the number of - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the - * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can - * subsequently be obtained by including the - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * @type string $page_token - * Optional. Optional pagination token, returned earlier via - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token]. - * @type string $filter - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * @type string $order_by - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location associated with the - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, 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 resource name of the location associated with the - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, 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; - } - - /** - * Optional. Optional limit on the number of - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the - * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can - * subsequently be obtained by including the - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] - * in a subsequent request. If unspecified, the 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. Optional limit on the number of - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to include in the - * response. Further [EkmConnections][google.cloud.kms.v1.EkmConnection] can - * subsequently be obtained by including the - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_page_token] - * in a subsequent request. If unspecified, the 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. Optional pagination token, returned earlier via - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_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. Optional pagination token, returned earlier via - * [ListEkmConnectionsResponse.next_page_token][google.cloud.kms.v1.ListEkmConnectionsResponse.next_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. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * 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. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php deleted file mode 100644 index cf84a145df5e..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListEkmConnectionsResponse.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.kms.v1.ListEkmConnectionsResponse - */ -class ListEkmConnectionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection ekm_connections = 1; - */ - private $ekm_connections; - /** - * A token to retrieve next page of results. Pass this value in - * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] - * that matched the query. - * - * 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\Kms\V1\EkmConnection>|\Google\Protobuf\Internal\RepeatedField $ekm_connections - * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. - * @type string $next_page_token - * A token to retrieve next page of results. Pass this value in - * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] - * to retrieve the next page of results. - * @type int $total_size - * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] - * that matched the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection ekm_connections = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEkmConnections() - { - return $this->ekm_connections; - } - - /** - * The list of [EkmConnections][google.cloud.kms.v1.EkmConnection]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.EkmConnection ekm_connections = 1; - * @param array<\Google\Cloud\Kms\V1\EkmConnection>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEkmConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\EkmConnection::class); - $this->ekm_connections = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] - * to retrieve 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 retrieve next page of results. Pass this value in - * [ListEkmConnectionsRequest.page_token][google.cloud.kms.v1.ListEkmConnectionsRequest.page_token] - * to retrieve 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; - } - - /** - * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] - * that matched the query. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of [EkmConnections][google.cloud.kms.v1.EkmConnection] - * that matched the query. - * - * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php deleted file mode 100644 index cd971a12e065..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsRequest.php +++ /dev/null @@ -1,260 +0,0 @@ -google.cloud.kms.v1.ListImportJobsRequest - */ -class ListImportJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Optional limit on the number of - * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. - * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be - * obtained by including the - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Optional pagination token, returned earlier via - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * @type int $page_size - * Optional. Optional limit on the number of - * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. - * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be - * obtained by including the - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * @type string $page_token - * Optional. Optional pagination token, returned earlier via - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token]. - * @type string $filter - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * @type string $order_by - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * - * Generated 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 [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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 limit on the number of - * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. - * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be - * obtained by including the - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] - * in a subsequent request. If unspecified, the 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. Optional limit on the number of - * [ImportJobs][google.cloud.kms.v1.ImportJob] to include in the response. - * Further [ImportJobs][google.cloud.kms.v1.ImportJob] can subsequently be - * obtained by including the - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_page_token] - * in a subsequent request. If unspecified, the 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. Optional pagination token, returned earlier via - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_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. Optional pagination token, returned earlier via - * [ListImportJobsResponse.next_page_token][google.cloud.kms.v1.ListImportJobsResponse.next_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. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * 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. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php deleted file mode 100644 index 04f11ca76dd2..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListImportJobsResponse.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.kms.v1.ListImportJobsResponse - */ -class ListImportJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.ImportJob import_jobs = 1; - */ - private $import_jobs; - /** - * A token to retrieve next page of results. Pass this value in - * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that - * matched the query. - * - * 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\Kms\V1\ImportJob>|\Google\Protobuf\Internal\RepeatedField $import_jobs - * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. - * @type string $next_page_token - * A token to retrieve next page of results. Pass this value in - * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] - * to retrieve the next page of results. - * @type int $total_size - * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that - * matched the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.ImportJob import_jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getImportJobs() - { - return $this->import_jobs; - } - - /** - * The list of [ImportJobs][google.cloud.kms.v1.ImportJob]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.ImportJob import_jobs = 1; - * @param array<\Google\Cloud\Kms\V1\ImportJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setImportJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\ImportJob::class); - $this->import_jobs = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] - * to retrieve 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 retrieve next page of results. Pass this value in - * [ListImportJobsRequest.page_token][google.cloud.kms.v1.ListImportJobsRequest.page_token] - * to retrieve 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; - } - - /** - * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that - * matched the query. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of [ImportJobs][google.cloud.kms.v1.ImportJob] that - * matched the query. - * - * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php deleted file mode 100644 index 0c0fc203c23f..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsRequest.php +++ /dev/null @@ -1,264 +0,0 @@ -google.cloud.kms.v1.ListKeyRingsRequest - */ -class ListKeyRingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Optional limit on the number of - * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further - * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by - * including the - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Optional pagination token, returned earlier via - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token]. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. - * @type int $page_size - * Optional. Optional limit on the number of - * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further - * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by - * including the - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. - * @type string $page_token - * Optional. Optional pagination token, returned earlier via - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token]. - * @type string $filter - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * @type string $order_by - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], 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 resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], 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; - } - - /** - * Optional. Optional limit on the number of - * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further - * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by - * including the - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] - * in a subsequent request. If unspecified, the 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. Optional limit on the number of - * [KeyRings][google.cloud.kms.v1.KeyRing] to include in the response. Further - * [KeyRings][google.cloud.kms.v1.KeyRing] can subsequently be obtained by - * including the - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_page_token] - * in a subsequent request. If unspecified, the 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. Optional pagination token, returned earlier via - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_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. Optional pagination token, returned earlier via - * [ListKeyRingsResponse.next_page_token][google.cloud.kms.v1.ListKeyRingsResponse.next_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. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * 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. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * - * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php deleted file mode 100644 index 3deac0ea2e0f..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ListKeyRingsResponse.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.kms.v1.ListKeyRingsResponse - */ -class ListKeyRingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.KeyRing key_rings = 1; - */ - private $key_rings; - /** - * A token to retrieve next page of results. Pass this value in - * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] - * to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched - * the query. - * - * 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\Kms\V1\KeyRing>|\Google\Protobuf\Internal\RepeatedField $key_rings - * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. - * @type string $next_page_token - * A token to retrieve next page of results. Pass this value in - * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] - * to retrieve the next page of results. - * @type int $total_size - * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched - * the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.KeyRing key_rings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getKeyRings() - { - return $this->key_rings; - } - - /** - * The list of [KeyRings][google.cloud.kms.v1.KeyRing]. - * - * Generated from protobuf field repeated .google.cloud.kms.v1.KeyRing key_rings = 1; - * @param array<\Google\Cloud\Kms\V1\KeyRing>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setKeyRings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\KeyRing::class); - $this->key_rings = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. Pass this value in - * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] - * to retrieve 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 retrieve next page of results. Pass this value in - * [ListKeyRingsRequest.page_token][google.cloud.kms.v1.ListKeyRingsRequest.page_token] - * to retrieve 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; - } - - /** - * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched - * the query. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of [KeyRings][google.cloud.kms.v1.KeyRing] that matched - * the query. - * - * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php deleted file mode 100644 index 656adb13aac7..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/LocationMetadata.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.kms.v1.LocationMetadata - */ -class LocationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this - * location. - * - * Generated from protobuf field bool hsm_available = 1; - */ - protected $hsm_available = false; - /** - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in - * this location. - * - * Generated from protobuf field bool ekm_available = 2; - */ - protected $ekm_available = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $hsm_available - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this - * location. - * @type bool $ekm_available - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in - * this location. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this - * location. - * - * Generated from protobuf field bool hsm_available = 1; - * @return bool - */ - public function getHsmAvailable() - { - return $this->hsm_available; - } - - /** - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] can be created in this - * location. - * - * Generated from protobuf field bool hsm_available = 1; - * @param bool $var - * @return $this - */ - public function setHsmAvailable($var) - { - GPBUtil::checkBool($var); - $this->hsm_available = $var; - - return $this; - } - - /** - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in - * this location. - * - * Generated from protobuf field bool ekm_available = 2; - * @return bool - */ - public function getEkmAvailable() - { - return $this->ekm_available; - } - - /** - * Indicates whether [CryptoKeys][google.cloud.kms.v1.CryptoKey] with - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL] can be created in - * this location. - * - * Generated from protobuf field bool ekm_available = 2; - * @param bool $var - * @return $this - */ - public function setEkmAvailable($var) - { - GPBUtil::checkBool($var); - $this->ekm_available = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php deleted file mode 100644 index 0ec1cc5f73b5..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignRequest.php +++ /dev/null @@ -1,281 +0,0 @@ -google.cloud.kms.v1.MacSignRequest - */ -class MacSignRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The data to sign. The MAC tag is computed over this data field - * based on the specific algorithm. - * - * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data = ''; - /** - * Optional. An optional CRC32C checksum of the - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is - * equal to - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_crc32c = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * @type string $data - * Required. The data to sign. The MAC tag is computed over this data field - * based on the specific algorithm. - * @type \Google\Protobuf\Int64Value $data_crc32c - * Optional. An optional CRC32C checksum of the - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is - * equal to - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * - * Generated 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 - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 data to sign. The MAC tag is computed over this data field - * based on the specific algorithm. - * - * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * Required. The data to sign. The MAC tag is computed over this data field - * based on the specific algorithm. - * - * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkString($var, False); - $this->data = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is - * equal to - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getDataCrc32C() - { - return $this->data_crc32c; - } - - public function hasDataCrc32C() - { - return isset($this->data_crc32c); - } - - public function clearDataCrc32C() - { - unset($this->data_crc32c); - } - - /** - * Returns the unboxed value from getDataCrc32C() - - * Optional. An optional CRC32C checksum of the - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is - * equal to - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getDataCrc32CUnwrapped() - { - return $this->readWrapperValue("data_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is - * equal to - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setDataCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->data_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is - * equal to - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setDataCrc32CUnwrapped($var) - { - $this->writeWrapperValue("data_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php deleted file mode 100644 index 632a972782b3..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacSignResponse.php +++ /dev/null @@ -1,377 +0,0 @@ -google.cloud.kms.v1.MacSignResponse - */ -class MacSignResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The created signature. - * - * Generated from protobuf field bytes mac = 2; - */ - protected $mac = ''; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An - * integrity check of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be - * performed by computing the CRC32C checksum of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] and - * comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; - */ - protected $mac_crc32c = null; - /** - * Integrity verification field. A flag indicating whether - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this - * field indicates either that - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 4; - */ - protected $verified_data_crc32c = false; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * @type string $mac - * The created signature. - * @type \Google\Protobuf\Int64Value $mac_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An - * integrity check of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be - * performed by computing the CRC32C checksum of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] and - * comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * @type bool $verified_data_crc32c - * Integrity verification field. A flag indicating whether - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this - * field indicates either that - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * Check this field to verify that the intended resource was used for signing. - * - * 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 created signature. - * - * Generated from protobuf field bytes mac = 2; - * @return string - */ - public function getMac() - { - return $this->mac; - } - - /** - * The created signature. - * - * Generated from protobuf field bytes mac = 2; - * @param string $var - * @return $this - */ - public function setMac($var) - { - GPBUtil::checkString($var, False); - $this->mac = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An - * integrity check of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be - * performed by computing the CRC32C checksum of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] and - * comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; - * @return \Google\Protobuf\Int64Value|null - */ - public function getMacCrc32C() - { - return $this->mac_crc32c; - } - - public function hasMacCrc32C() - { - return isset($this->mac_crc32c); - } - - public function clearMacCrc32C() - { - unset($this->mac_crc32c); - } - - /** - * Returns the unboxed value from getMacCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An - * integrity check of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be - * performed by computing the CRC32C checksum of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] and - * comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; - * @return int|string|null - */ - public function getMacCrc32CUnwrapped() - { - return $this->readWrapperValue("mac_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An - * integrity check of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be - * performed by computing the CRC32C checksum of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] and - * comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setMacCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->mac_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac]. An - * integrity check of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] can be - * performed by computing the CRC32C checksum of - * [MacSignResponse.mac][google.cloud.kms.v1.MacSignResponse.mac] and - * comparing your results to this field. Discard the response in case of - * non-matching checksum values, and perform a limited number of retries. A - * persistent mismatch may indicate an issue in your computation of the CRC32C - * checksum. Note: This field is defined as int64 for reasons of compatibility - * across different languages. However, it is a non-negative integer, which - * will never exceed 2^32-1, and can be safely downconverted to uint32 in - * languages that support this type. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 3; - * @param int|string|null $var - * @return $this - */ - public function setMacCrc32CUnwrapped($var) - { - $this->writeWrapperValue("mac_crc32c", $var); - return $this;} - - /** - * Integrity verification field. A flag indicating whether - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this - * field indicates either that - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 4; - * @return bool - */ - public function getVerifiedDataCrc32C() - { - return $this->verified_data_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacSignRequest.data]. A false value of this - * field indicates either that - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 4; - * @param bool $var - * @return $this - */ - public function setVerifiedDataCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_data_crc32c = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php deleted file mode 100644 index b25755c32d6d..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyRequest.php +++ /dev/null @@ -1,486 +0,0 @@ -google.cloud.kms.v1.MacVerifyRequest - */ -class MacVerifyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * verification. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The data used previously as a - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate - * the MAC tag. - * - * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data = ''; - /** - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) - * is equal to - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_crc32c = null; - /** - * Required. The signature to verify. - * - * Generated from protobuf field bytes mac = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mac = ''; - /** - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.tag][]) is equal to - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mac_crc32c = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * verification. - * @type string $data - * Required. The data used previously as a - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate - * the MAC tag. - * @type \Google\Protobuf\Int64Value $data_crc32c - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) - * is equal to - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * @type string $mac - * Required. The signature to verify. - * @type \Google\Protobuf\Int64Value $mac_crc32c - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.tag][]) is equal to - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * verification. - * - * Generated 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 - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * verification. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 data used previously as a - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate - * the MAC tag. - * - * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * Required. The data used previously as a - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate - * the MAC tag. - * - * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkString($var, False); - $this->data = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) - * is equal to - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getDataCrc32C() - { - return $this->data_crc32c; - } - - public function hasDataCrc32C() - { - return isset($this->data_crc32c); - } - - public function clearDataCrc32C() - { - unset($this->data_crc32c); - } - - /** - * Returns the unboxed value from getDataCrc32C() - - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) - * is equal to - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getDataCrc32CUnwrapped() - { - return $this->readWrapperValue("data_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) - * is equal to - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setDataCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->data_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) - * is equal to - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value data_crc32c = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setDataCrc32CUnwrapped($var) - { - $this->writeWrapperValue("data_crc32c", $var); - return $this;} - - /** - * Required. The signature to verify. - * - * Generated from protobuf field bytes mac = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMac() - { - return $this->mac; - } - - /** - * Required. The signature to verify. - * - * Generated from protobuf field bytes mac = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMac($var) - { - GPBUtil::checkString($var, False); - $this->mac = $var; - - return $this; - } - - /** - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.tag][]) is equal to - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getMacCrc32C() - { - return $this->mac_crc32c; - } - - public function hasMacCrc32C() - { - return isset($this->mac_crc32c); - } - - public function clearMacCrc32C() - { - unset($this->mac_crc32c); - } - - /** - * Returns the unboxed value from getMacCrc32C() - - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.tag][]) is equal to - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getMacCrc32CUnwrapped() - { - return $this->readWrapperValue("mac_crc32c"); - } - - /** - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.tag][]) is equal to - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setMacCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->mac_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.tag][]) is equal to - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * - * Generated from protobuf field .google.protobuf.Int64Value mac_crc32c = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setMacCrc32CUnwrapped($var) - { - $this->writeWrapperValue("mac_crc32c", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php deleted file mode 100644 index 457f9f454810..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/MacVerifyResponse.php +++ /dev/null @@ -1,386 +0,0 @@ -google.cloud.kms.v1.MacVerifyResponse - */ -class MacVerifyResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. Check this field to verify that the intended resource was - * used for verification. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * This field indicates whether or not the verification operation for - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was - * successful. - * - * Generated from protobuf field bool success = 2; - */ - protected $success = false; - /** - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this - * field indicates either that - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 3; - */ - protected $verified_data_crc32c = false; - /** - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this - * field indicates either that - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_mac_crc32c = 4; - */ - protected $verified_mac_crc32c = false; - /** - * Integrity verification field. This value is used for the integrity - * verification of [MacVerifyResponse.success]. If the value of this field - * contradicts the value of [MacVerifyResponse.success], discard the response - * and perform a limited number of retries. - * - * Generated from protobuf field bool verified_success_integrity = 5; - */ - protected $verified_success_integrity = false; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. Check this field to verify that the intended resource was - * used for verification. - * @type bool $success - * This field indicates whether or not the verification operation for - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was - * successful. - * @type bool $verified_data_crc32c - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this - * field indicates either that - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type bool $verified_mac_crc32c - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this - * field indicates either that - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * @type bool $verified_success_integrity - * Integrity verification field. This value is used for the integrity - * verification of [MacVerifyResponse.success]. If the value of this field - * contradicts the value of [MacVerifyResponse.success], discard the response - * and perform a limited number of retries. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. Check this field to verify that the intended resource was - * used for verification. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. Check this field to verify that the intended resource was - * used for verification. - * - * 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; - } - - /** - * This field indicates whether or not the verification operation for - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was - * successful. - * - * Generated from protobuf field bool success = 2; - * @return bool - */ - public function getSuccess() - { - return $this->success; - } - - /** - * This field indicates whether or not the verification operation for - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was - * successful. - * - * Generated from protobuf field bool success = 2; - * @param bool $var - * @return $this - */ - public function setSuccess($var) - { - GPBUtil::checkBool($var); - $this->success = $var; - - return $this; - } - - /** - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this - * field indicates either that - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 3; - * @return bool - */ - public function getVerifiedDataCrc32C() - { - return $this->verified_data_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this - * field indicates either that - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_data_crc32c = 3; - * @param bool $var - * @return $this - */ - public function setVerifiedDataCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_data_crc32c = $var; - - return $this; - } - - /** - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this - * field indicates either that - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_mac_crc32c = 4; - * @return bool - */ - public function getVerifiedMacCrc32C() - { - return $this->verified_mac_crc32c; - } - - /** - * Integrity verification field. A flag indicating whether - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was received by - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used - * for the integrity verification of the - * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this - * field indicates either that - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * was left unset or that it was not delivered to - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've - * set - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c] - * but this field is still false, discard the response and perform a limited - * number of retries. - * - * Generated from protobuf field bool verified_mac_crc32c = 4; - * @param bool $var - * @return $this - */ - public function setVerifiedMacCrc32C($var) - { - GPBUtil::checkBool($var); - $this->verified_mac_crc32c = $var; - - return $this; - } - - /** - * Integrity verification field. This value is used for the integrity - * verification of [MacVerifyResponse.success]. If the value of this field - * contradicts the value of [MacVerifyResponse.success], discard the response - * and perform a limited number of retries. - * - * Generated from protobuf field bool verified_success_integrity = 5; - * @return bool - */ - public function getVerifiedSuccessIntegrity() - { - return $this->verified_success_integrity; - } - - /** - * Integrity verification field. This value is used for the integrity - * verification of [MacVerifyResponse.success]. If the value of this field - * contradicts the value of [MacVerifyResponse.success], discard the response - * and perform a limited number of retries. - * - * Generated from protobuf field bool verified_success_integrity = 5; - * @param bool $var - * @return $this - */ - public function setVerifiedSuccessIntegrity($var) - { - GPBUtil::checkBool($var); - $this->verified_success_integrity = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for - * verification. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 6; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php deleted file mode 100644 index e6f74d6c62b8..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/ProtectionLevel.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.kms.v1.ProtectionLevel - */ -class ProtectionLevel -{ - /** - * Not specified. - * - * Generated from protobuf enum PROTECTION_LEVEL_UNSPECIFIED = 0; - */ - const PROTECTION_LEVEL_UNSPECIFIED = 0; - /** - * Crypto operations are performed in software. - * - * Generated from protobuf enum SOFTWARE = 1; - */ - const SOFTWARE = 1; - /** - * Crypto operations are performed in a Hardware Security Module. - * - * Generated from protobuf enum HSM = 2; - */ - const HSM = 2; - /** - * Crypto operations are performed by an external key manager. - * - * Generated from protobuf enum EXTERNAL = 3; - */ - const EXTERNAL = 3; - /** - * Crypto operations are performed in an EKM-over-VPC backend. - * - * Generated from protobuf enum EXTERNAL_VPC = 4; - */ - const EXTERNAL_VPC = 4; - - private static $valueToName = [ - self::PROTECTION_LEVEL_UNSPECIFIED => 'PROTECTION_LEVEL_UNSPECIFIED', - self::SOFTWARE => 'SOFTWARE', - self::HSM => 'HSM', - self::EXTERNAL => 'EXTERNAL', - self::EXTERNAL_VPC => 'EXTERNAL_VPC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php deleted file mode 100644 index b5156af3b2c9..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/PublicKey.php +++ /dev/null @@ -1,354 +0,0 @@ -google.cloud.kms.v1.PublicKey - */ -class PublicKey extends \Google\Protobuf\Internal\Message -{ - /** - * The public key, encoded in PEM format. For more information, see the - * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for - * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and - * [Textual Encoding of Subject Public Key Info] - * (https://tools.ietf.org/html/rfc7468#section-13). - * - * Generated from protobuf field string pem = 1; - */ - protected $pem = ''; - /** - * The - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * associated with this key. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2; - */ - protected $algorithm = 0; - /** - * Integrity verification field. A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by - * computing the CRC32C checksum of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your - * results to this field. Discard the response in case of non-matching - * checksum values, and perform a limited number of retries. A persistent - * mismatch may indicate an issue in your computation of the CRC32C checksum. - * Note: This field is defined as int64 for reasons of compatibility across - * different languages. However, it is a non-negative integer, which will - * never exceed 2^32-1, and can be safely downconverted to uint32 in languages - * that support this type. - * NOTE: This field is in Beta. - * - * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; - */ - protected $pem_crc32c = null; - /** - * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * Provided here for verification. - * NOTE: This field is in Beta. - * - * Generated from protobuf field string name = 4; - */ - protected $name = ''; - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; - */ - protected $protection_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pem - * The public key, encoded in PEM format. For more information, see the - * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for - * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and - * [Textual Encoding of Subject Public Key Info] - * (https://tools.ietf.org/html/rfc7468#section-13). - * @type int $algorithm - * The - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * associated with this key. - * @type \Google\Protobuf\Int64Value $pem_crc32c - * Integrity verification field. A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by - * computing the CRC32C checksum of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your - * results to this field. Discard the response in case of non-matching - * checksum values, and perform a limited number of retries. A persistent - * mismatch may indicate an issue in your computation of the CRC32C checksum. - * Note: This field is defined as int64 for reasons of compatibility across - * different languages. However, it is a non-negative integer, which will - * never exceed 2^32-1, and can be safely downconverted to uint32 in languages - * that support this type. - * NOTE: This field is in Beta. - * @type string $name - * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * Provided here for verification. - * NOTE: This field is in Beta. - * @type int $protection_level - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The public key, encoded in PEM format. For more information, see the - * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for - * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and - * [Textual Encoding of Subject Public Key Info] - * (https://tools.ietf.org/html/rfc7468#section-13). - * - * Generated from protobuf field string pem = 1; - * @return string - */ - public function getPem() - { - return $this->pem; - } - - /** - * The public key, encoded in PEM format. For more information, see the - * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for - * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and - * [Textual Encoding of Subject Public Key Info] - * (https://tools.ietf.org/html/rfc7468#section-13). - * - * Generated from protobuf field string pem = 1; - * @param string $var - * @return $this - */ - public function setPem($var) - { - GPBUtil::checkString($var, True); - $this->pem = $var; - - return $this; - } - - /** - * The - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * associated with this key. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2; - * @return int - */ - public function getAlgorithm() - { - return $this->algorithm; - } - - /** - * The - * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * associated with this key. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 2; - * @param int $var - * @return $this - */ - public function setAlgorithm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm::class); - $this->algorithm = $var; - - return $this; - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by - * computing the CRC32C checksum of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your - * results to this field. Discard the response in case of non-matching - * checksum values, and perform a limited number of retries. A persistent - * mismatch may indicate an issue in your computation of the CRC32C checksum. - * Note: This field is defined as int64 for reasons of compatibility across - * different languages. However, it is a non-negative integer, which will - * never exceed 2^32-1, and can be safely downconverted to uint32 in languages - * that support this type. - * NOTE: This field is in Beta. - * - * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; - * @return \Google\Protobuf\Int64Value|null - */ - public function getPemCrc32C() - { - return $this->pem_crc32c; - } - - public function hasPemCrc32C() - { - return isset($this->pem_crc32c); - } - - public function clearPemCrc32C() - { - unset($this->pem_crc32c); - } - - /** - * Returns the unboxed value from getPemCrc32C() - - * Integrity verification field. A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by - * computing the CRC32C checksum of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your - * results to this field. Discard the response in case of non-matching - * checksum values, and perform a limited number of retries. A persistent - * mismatch may indicate an issue in your computation of the CRC32C checksum. - * Note: This field is defined as int64 for reasons of compatibility across - * different languages. However, it is a non-negative integer, which will - * never exceed 2^32-1, and can be safely downconverted to uint32 in languages - * that support this type. - * NOTE: This field is in Beta. - * - * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; - * @return int|string|null - */ - public function getPemCrc32CUnwrapped() - { - return $this->readWrapperValue("pem_crc32c"); - } - - /** - * Integrity verification field. A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by - * computing the CRC32C checksum of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your - * results to this field. Discard the response in case of non-matching - * checksum values, and perform a limited number of retries. A persistent - * mismatch may indicate an issue in your computation of the CRC32C checksum. - * Note: This field is defined as int64 for reasons of compatibility across - * different languages. However, it is a non-negative integer, which will - * never exceed 2^32-1, and can be safely downconverted to uint32 in languages - * that support this type. - * NOTE: This field is in Beta. - * - * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setPemCrc32C($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->pem_crc32c = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Integrity verification field. A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by - * computing the CRC32C checksum of - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your - * results to this field. Discard the response in case of non-matching - * checksum values, and perform a limited number of retries. A persistent - * mismatch may indicate an issue in your computation of the CRC32C checksum. - * Note: This field is defined as int64 for reasons of compatibility across - * different languages. However, it is a non-negative integer, which will - * never exceed 2^32-1, and can be safely downconverted to uint32 in languages - * that support this type. - * NOTE: This field is in Beta. - * - * Generated from protobuf field .google.protobuf.Int64Value pem_crc32c = 3; - * @param int|string|null $var - * @return $this - */ - public function setPemCrc32CUnwrapped($var) - { - $this->writeWrapperValue("pem_crc32c", $var); - return $this;} - - /** - * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * Provided here for verification. - * NOTE: This field is in Beta. - * - * Generated from protobuf field string name = 4; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * Provided here for verification. - * NOTE: This field is in Beta. - * - * Generated from protobuf field string name = 4; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; - * @return int - */ - public function getProtectionLevel() - { - return $this->protection_level; - } - - /** - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key. - * - * Generated from protobuf field .google.cloud.kms.v1.ProtectionLevel protection_level = 5; - * @param int $var - * @return $this - */ - public function setProtectionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class); - $this->protection_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php deleted file mode 100644 index 7d76c4daccbf..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/RestoreCryptoKeyVersionRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.kms.v1.RestoreCryptoKeyVersionRequest - */ -class RestoreCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * - * 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 - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * - * Generated 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 - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php deleted file mode 100644 index 96af3720a987..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyPrimaryVersionRequest.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.kms.v1.UpdateCryptoKeyPrimaryVersionRequest - */ -class UpdateCryptoKeyPrimaryVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The id of the child - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * - * Generated from protobuf field string crypto_key_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $crypto_key_version_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. - * @type string $crypto_key_version_id - * Required. The id of the child - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. - * - * Generated 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 - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. - * - * Generated from protobuf field string name = 1 [(.google.api.field_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 id of the child - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * - * Generated from protobuf field string crypto_key_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCryptoKeyVersionId() - { - return $this->crypto_key_version_id; - } - - /** - * Required. The id of the child - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * - * Generated from protobuf field string crypto_key_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCryptoKeyVersionId($var) - { - GPBUtil::checkString($var, True); - $this->crypto_key_version_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php deleted file mode 100644 index 3e5038629d7c..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.kms.v1.UpdateCryptoKeyRequest - */ -class UpdateCryptoKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $crypto_key = null; - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Kms\V1\CryptoKey $crypto_key - * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. List of fields to be updated in this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\CryptoKey|null - */ - public function getCryptoKey() - { - return $this->crypto_key; - } - - public function hasCryptoKey() - { - return isset($this->crypto_key); - } - - public function clearCryptoKey() - { - unset($this->crypto_key); - } - - /** - * Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\CryptoKey $var - * @return $this - */ - public function setCryptoKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKey::class); - $this->crypto_key = $var; - - return $this; - } - - /** - * Required. List of fields to be updated in this request. - * - * 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. List of fields to be updated in this request. - * - * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php deleted file mode 100644 index e82e397c2ce3..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateCryptoKeyVersionRequest.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.kms.v1.UpdateCryptoKeyVersionRequest - */ -class UpdateCryptoKeyVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * updated values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $crypto_key_version = null; - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Kms\V1\CryptoKeyVersion $crypto_key_version - * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * updated values. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. List of fields to be updated in this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * updated values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\CryptoKeyVersion|null - */ - public function getCryptoKeyVersion() - { - return $this->crypto_key_version; - } - - public function hasCryptoKeyVersion() - { - return isset($this->crypto_key_version); - } - - public function clearCryptoKeyVersion() - { - unset($this->crypto_key_version); - } - - /** - * Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * updated values. - * - * Generated from protobuf field .google.cloud.kms.v1.CryptoKeyVersion crypto_key_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\CryptoKeyVersion $var - * @return $this - */ - public function setCryptoKeyVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\CryptoKeyVersion::class); - $this->crypto_key_version = $var; - - return $this; - } - - /** - * Required. List of fields to be updated in this request. - * - * 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. List of fields to be updated in this request. - * - * 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/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php b/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php deleted file mode 100644 index 461951b34b0b..000000000000 --- a/owl-bot-staging/Kms/v1/proto/src/Google/Cloud/Kms/V1/UpdateEkmConnectionRequest.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.kms.v1.UpdateEkmConnectionRequest - */ -class UpdateEkmConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ekm_connection = null; - /** - * Required. List of fields to be updated in this request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Kms\V1\EkmConnection $ekm_connection - * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated - * values. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. List of fields to be updated in this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Kms\V1\EkmService::initOnce(); - parent::__construct($data); - } - - /** - * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Kms\V1\EkmConnection|null - */ - public function getEkmConnection() - { - return $this->ekm_connection; - } - - public function hasEkmConnection() - { - return isset($this->ekm_connection); - } - - public function clearEkmConnection() - { - unset($this->ekm_connection); - } - - /** - * Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated - * values. - * - * Generated from protobuf field .google.cloud.kms.v1.EkmConnection ekm_connection = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Kms\V1\EkmConnection $var - * @return $this - */ - public function setEkmConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Kms\V1\EkmConnection::class); - $this->ekm_connection = $var; - - return $this; - } - - /** - * Required. List of fields to be updated in this request. - * - * 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. List of fields to be updated in this request. - * - * 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/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php deleted file mode 100644 index 41daf778c2cb..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/create_ekm_connection.php +++ /dev/null @@ -1,79 +0,0 @@ -createEkmConnection( - $formattedParent, - $ekmConnectionId, - $ekmConnection - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = EkmServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $ekmConnectionId = '[EKM_CONNECTION_ID]'; - - create_ekm_connection_sample($formattedParent, $ekmConnectionId); -} -// [END cloudkms_v1_generated_EkmService_CreateEkmConnection_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php deleted file mode 100644 index 8ef924e084e1..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_ekm_connection.php +++ /dev/null @@ -1,68 +0,0 @@ -getEkmConnection($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EkmServiceClient::ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); - - get_ekm_connection_sample($formattedName); -} -// [END cloudkms_v1_generated_EkmService_GetEkmConnection_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php deleted file mode 100644 index df451d4e6c1c..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_iam_policy.php +++ /dev/null @@ -1,67 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 cloudkms_v1_generated_EkmService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php deleted file mode 100644 index 8ff3d3762392..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_EkmService_GetLocation_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php deleted file mode 100644 index 8f4cc0d326d7..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_ekm_connections.php +++ /dev/null @@ -1,73 +0,0 @@ -listEkmConnections($formattedParent); - - /** @var EkmConnection $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 = EkmServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_ekm_connections_sample($formattedParent); -} -// [END cloudkms_v1_generated_EkmService_ListEkmConnections_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php deleted file mode 100644 index 4d1eacf913bb..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @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 cloudkms_v1_generated_EkmService_ListLocations_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php deleted file mode 100644 index a54d132d6f67..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/set_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 cloudkms_v1_generated_EkmService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php deleted file mode 100644 index 269486136270..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,80 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 cloudkms_v1_generated_EkmService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php b/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php deleted file mode 100644 index cb41b55faee0..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/EkmServiceClient/update_ekm_connection.php +++ /dev/null @@ -1,58 +0,0 @@ -updateEkmConnection($ekmConnection, $updateMask); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_EkmService_UpdateEkmConnection_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php deleted file mode 100644 index bc0df8e98216..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_decrypt.php +++ /dev/null @@ -1,82 +0,0 @@ -asymmetricDecrypt($formattedName, $ciphertext); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - $ciphertext = '...'; - - asymmetric_decrypt_sample($formattedName, $ciphertext); -} -// [END cloudkms_v1_generated_KeyManagementService_AsymmetricDecrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php deleted file mode 100644 index 7d8bd3b3229f..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/asymmetric_sign.php +++ /dev/null @@ -1,82 +0,0 @@ -asymmetricSign($formattedName, $digest); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - - asymmetric_sign_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_AsymmetricSign_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php deleted file mode 100644 index 5413c2779688..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key.php +++ /dev/null @@ -1,82 +0,0 @@ -createCryptoKey( - $formattedParent, - $cryptoKeyId, - $cryptoKey - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $cryptoKeyId = '[CRYPTO_KEY_ID]'; - - create_crypto_key_sample($formattedParent, $cryptoKeyId); -} -// [END cloudkms_v1_generated_KeyManagementService_CreateCryptoKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php deleted file mode 100644 index 10b917ae8f85..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_crypto_key_version.php +++ /dev/null @@ -1,84 +0,0 @@ -createCryptoKeyVersion( - $formattedParent, - $cryptoKeyVersion - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = KeyManagementServiceClient::cryptoKeyName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]' - ); - - create_crypto_key_version_sample($formattedParent); -} -// [END cloudkms_v1_generated_KeyManagementService_CreateCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php deleted file mode 100644 index b6d5fd8f30a7..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_import_job.php +++ /dev/null @@ -1,105 +0,0 @@ -setImportMethod($importJobImportMethod) - ->setProtectionLevel($importJobProtectionLevel); - - // Call the API and handle any network failures. - try { - /** @var ImportJob $response */ - $response = $keyManagementServiceClient->createImportJob( - $formattedParent, - $importJobId, - $importJob - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $importJobId = '[IMPORT_JOB_ID]'; - $importJobImportMethod = ImportMethod::IMPORT_METHOD_UNSPECIFIED; - $importJobProtectionLevel = ProtectionLevel::PROTECTION_LEVEL_UNSPECIFIED; - - create_import_job_sample( - $formattedParent, - $importJobId, - $importJobImportMethod, - $importJobProtectionLevel - ); -} -// [END cloudkms_v1_generated_KeyManagementService_CreateImportJob_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php deleted file mode 100644 index dd19be964f9c..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/create_key_ring.php +++ /dev/null @@ -1,75 +0,0 @@ -createKeyRing($formattedParent, $keyRingId, $keyRing); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = KeyManagementServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $keyRingId = '[KEY_RING_ID]'; - - create_key_ring_sample($formattedParent, $keyRingId); -} -// [END cloudkms_v1_generated_KeyManagementService_CreateKeyRing_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php deleted file mode 100644 index 4d4237adf426..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/decrypt.php +++ /dev/null @@ -1,79 +0,0 @@ -decrypt($formattedName, $ciphertext); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]' - ); - $ciphertext = '...'; - - decrypt_sample($formattedName, $ciphertext); -} -// [END cloudkms_v1_generated_KeyManagementService_Decrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php deleted file mode 100644 index e542500711e0..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/destroy_crypto_key_version.php +++ /dev/null @@ -1,93 +0,0 @@ -destroyCryptoKeyVersion($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - - destroy_crypto_key_version_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_DestroyCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php deleted file mode 100644 index 4665ac9a9366..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/encrypt.php +++ /dev/null @@ -1,86 +0,0 @@ -encrypt($name, $plaintext); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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]'; - $plaintext = '...'; - - encrypt_sample($name, $plaintext); -} -// [END cloudkms_v1_generated_KeyManagementService_Encrypt_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php deleted file mode 100644 index 5f2bb6834299..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/generate_random_bytes.php +++ /dev/null @@ -1,54 +0,0 @@ -generateRandomBytes(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_KeyManagementService_GenerateRandomBytes_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php deleted file mode 100644 index 5611b26355be..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key.php +++ /dev/null @@ -1,74 +0,0 @@ -getCryptoKey($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]' - ); - - get_crypto_key_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_GetCryptoKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php deleted file mode 100644 index e3ce994b31af..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_crypto_key_version.php +++ /dev/null @@ -1,74 +0,0 @@ -getCryptoKeyVersion($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - - get_crypto_key_version_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_GetCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php deleted file mode 100644 index 70024e13d0d6..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_iam_policy.php +++ /dev/null @@ -1,67 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 cloudkms_v1_generated_KeyManagementService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php deleted file mode 100644 index 5c6a49c4e3b1..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_import_job.php +++ /dev/null @@ -1,72 +0,0 @@ -getImportJob($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::importJobName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[IMPORT_JOB]' - ); - - get_import_job_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_GetImportJob_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php deleted file mode 100644 index b170c3bb545b..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_key_ring.php +++ /dev/null @@ -1,67 +0,0 @@ -getKeyRing($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - - get_key_ring_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_GetKeyRing_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php deleted file mode 100644 index b31ebb628162..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_KeyManagementService_GetLocation_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php deleted file mode 100644 index 402bc1d54bbe..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/get_public_key.php +++ /dev/null @@ -1,78 +0,0 @@ -getPublicKey($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - - get_public_key_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_GetPublicKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php deleted file mode 100644 index 837811c48ef8..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/import_crypto_key_version.php +++ /dev/null @@ -1,100 +0,0 @@ -importCryptoKeyVersion( - $formattedParent, - $algorithm, - $importJob - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = KeyManagementServiceClient::cryptoKeyName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]' - ); - $algorithm = CryptoKeyVersionAlgorithm::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED; - $importJob = '[IMPORT_JOB]'; - - import_crypto_key_version_sample($formattedParent, $algorithm, $importJob); -} -// [END cloudkms_v1_generated_KeyManagementService_ImportCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php deleted file mode 100644 index 6ceacea981fa..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_key_versions.php +++ /dev/null @@ -1,78 +0,0 @@ -listCryptoKeyVersions($formattedParent); - - /** @var CryptoKeyVersion $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 = KeyManagementServiceClient::cryptoKeyName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]' - ); - - list_crypto_key_versions_sample($formattedParent); -} -// [END cloudkms_v1_generated_KeyManagementService_ListCryptoKeyVersions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php deleted file mode 100644 index c9dafc94eb44..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_crypto_keys.php +++ /dev/null @@ -1,72 +0,0 @@ -listCryptoKeys($formattedParent); - - /** @var CryptoKey $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 = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - - list_crypto_keys_sample($formattedParent); -} -// [END cloudkms_v1_generated_KeyManagementService_ListCryptoKeys_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php deleted file mode 100644 index 0ae84f3da77a..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_import_jobs.php +++ /dev/null @@ -1,72 +0,0 @@ -listImportJobs($formattedParent); - - /** @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 = KeyManagementServiceClient::keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - - list_import_jobs_sample($formattedParent); -} -// [END cloudkms_v1_generated_KeyManagementService_ListImportJobs_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php deleted file mode 100644 index 016f7308d4e7..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_key_rings.php +++ /dev/null @@ -1,73 +0,0 @@ -listKeyRings($formattedParent); - - /** @var KeyRing $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 = KeyManagementServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_key_rings_sample($formattedParent); -} -// [END cloudkms_v1_generated_KeyManagementService_ListKeyRings_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php deleted file mode 100644 index 61f5d7a95592..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @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 cloudkms_v1_generated_KeyManagementService_ListLocations_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php deleted file mode 100644 index 5429c04f5d23..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_sign.php +++ /dev/null @@ -1,79 +0,0 @@ -macSign($formattedName, $data); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - $data = '...'; - - mac_sign_sample($formattedName, $data); -} -// [END cloudkms_v1_generated_KeyManagementService_MacSign_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php deleted file mode 100644 index baa2307364f6..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/mac_verify.php +++ /dev/null @@ -1,83 +0,0 @@ -macVerify($formattedName, $data, $mac); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - $data = '...'; - $mac = '...'; - - mac_verify_sample($formattedName, $data, $mac); -} -// [END cloudkms_v1_generated_KeyManagementService_MacVerify_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php deleted file mode 100644 index a4748c963822..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/restore_crypto_key_version.php +++ /dev/null @@ -1,81 +0,0 @@ -restoreCryptoKeyVersion($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyVersionName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]', - '[CRYPTO_KEY_VERSION]' - ); - - restore_crypto_key_version_sample($formattedName); -} -// [END cloudkms_v1_generated_KeyManagementService_RestoreCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php deleted file mode 100644 index fdd4056f159c..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/set_iam_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 cloudkms_v1_generated_KeyManagementService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php deleted file mode 100644 index f46024162d49..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,80 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - 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 cloudkms_v1_generated_KeyManagementService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php deleted file mode 100644 index 9f11e241b2f7..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key.php +++ /dev/null @@ -1,58 +0,0 @@ -updateCryptoKey($cryptoKey, $updateMask); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_KeyManagementService_UpdateCryptoKey_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php deleted file mode 100644 index 7b47b2334e85..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_primary_version.php +++ /dev/null @@ -1,85 +0,0 @@ -updateCryptoKeyPrimaryVersion( - $formattedName, - $cryptoKeyVersionId - ); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = KeyManagementServiceClient::cryptoKeyName( - '[PROJECT]', - '[LOCATION]', - '[KEY_RING]', - '[CRYPTO_KEY]' - ); - $cryptoKeyVersionId = '[CRYPTO_KEY_VERSION_ID]'; - - update_crypto_key_primary_version_sample($formattedName, $cryptoKeyVersionId); -} -// [END cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyPrimaryVersion_sync] diff --git a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php b/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php deleted file mode 100644 index 5931ac0aaecc..000000000000 --- a/owl-bot-staging/Kms/v1/samples/V1/KeyManagementServiceClient/update_crypto_key_version.php +++ /dev/null @@ -1,69 +0,0 @@ -updateCryptoKeyVersion($cryptoKeyVersion, $updateMask); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyVersion_sync] diff --git a/owl-bot-staging/Kms/v1/src/V1/EkmServiceClient.php b/owl-bot-staging/Kms/v1/src/V1/EkmServiceClient.php deleted file mode 100644 index 3fe03e339fc7..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/EkmServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $ekmConnectionId = 'ekm_connection_id'; - * $ekmConnection = new EkmConnection(); - * $response = $ekmServiceClient->createEkmConnection($formattedParent, $ekmConnectionId, $ekmConnection); - * } finally { - * $ekmServiceClient->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. - */ -class EkmServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.kms.v1.EkmService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'cloudkms.googleapis.com'; - - /** 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/cloudkms', - ]; - - private static $ekmConnectionNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/ekm_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/ekm_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/ekm_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/ekm_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getEkmConnectionNameTemplate() - { - if (self::$ekmConnectionNameTemplate == null) { - self::$ekmConnectionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/ekmConnections/{ekm_connection}'); - } - - return self::$ekmConnectionNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'ekmConnection' => self::getEkmConnectionNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * ekm_connection resource. - * - * @param string $project - * @param string $location - * @param string $ekmConnection - * - * @return string The formatted ekm_connection resource. - */ - public static function ekmConnectionName($project, $location, $ekmConnection) - { - return self::getEkmConnectionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'ekm_connection' => $ekmConnection, - ]); - } - - /** - * 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($project, $location) - { - return self::getLocationNameTemplate()->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 - * - ekmConnection: projects/{project}/locations/{location}/ekmConnections/{ekm_connection} - * - 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($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 'cloudkms.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 [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given - * Project and Location. - * - * Sample code: - * ``` - * $ekmServiceClient = new EkmServiceClient(); - * try { - * $formattedParent = $ekmServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $ekmConnectionId = 'ekm_connection_id'; - * $ekmConnection = new EkmConnection(); - * $response = $ekmServiceClient->createEkmConnection($formattedParent, $ekmConnectionId, $ekmConnection); - * } finally { - * $ekmServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the location associated with the - * [EkmConnection][google.cloud.kms.v1.EkmConnection], in the format - * `projects/*/locations/*`. - * @param string $ekmConnectionId Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}`. - * @param EkmConnection $ekmConnection Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with - * initial field values. - * @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\Kms\V1\EkmConnection - * - * @throws ApiException if the remote call fails - */ - public function createEkmConnection($parent, $ekmConnectionId, $ekmConnection, array $optionalArgs = []) - { - $request = new CreateEkmConnectionRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEkmConnectionId($ekmConnectionId); - $request->setEkmConnection($ekmConnection); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateEkmConnection', EkmConnection::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns metadata for a given - * [EkmConnection][google.cloud.kms.v1.EkmConnection]. - * - * Sample code: - * ``` - * $ekmServiceClient = new EkmServiceClient(); - * try { - * $formattedName = $ekmServiceClient->ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); - * $response = $ekmServiceClient->getEkmConnection($formattedName); - * } finally { - * $ekmServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the - * [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. - * @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\Kms\V1\EkmConnection - * - * @throws ApiException if the remote call fails - */ - public function getEkmConnection($name, array $optionalArgs = []) - { - $request = new GetEkmConnectionRequest(); - $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('GetEkmConnection', EkmConnection::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists [EkmConnections][google.cloud.kms.v1.EkmConnection]. - * - * Sample code: - * ``` - * $ekmServiceClient = new EkmServiceClient(); - * try { - * $formattedParent = $ekmServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $ekmServiceClient->listEkmConnections($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $ekmServiceClient->listEkmConnections($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $ekmServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the location associated with the - * [EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format - * `projects/*/locations/*`. - * @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 - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * @type string $orderBy - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listEkmConnections($parent, array $optionalArgs = []) - { - $request = new ListEkmConnectionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListEkmConnections', $optionalArgs, ListEkmConnectionsResponse::class, $request); - } - - /** - * Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata. - * - * Sample code: - * ``` - * $ekmServiceClient = new EkmServiceClient(); - * try { - * $ekmConnection = new EkmConnection(); - * $updateMask = new FieldMask(); - * $response = $ekmServiceClient->updateEkmConnection($ekmConnection, $updateMask); - * } finally { - * $ekmServiceClient->close(); - * } - * ``` - * - * @param EkmConnection $ekmConnection Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated - * values. - * @param FieldMask $updateMask Required. List of fields to be updated in this request. - * @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\Kms\V1\EkmConnection - * - * @throws ApiException if the remote call fails - */ - public function updateEkmConnection($ekmConnection, $updateMask, array $optionalArgs = []) - { - $request = new UpdateEkmConnectionRequest(); - $requestParamHeaders = []; - $request->setEkmConnection($ekmConnection); - $request->setUpdateMask($updateMask); - $requestParamHeaders['ekm_connection.name'] = $ekmConnection->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateEkmConnection', EkmConnection::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $ekmServiceClient = new EkmServiceClient(); - * try { - * $response = $ekmServiceClient->getLocation(); - * } finally { - * $ekmServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $ekmServiceClient = new EkmServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $ekmServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $ekmServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $ekmServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $ekmServiceClient = new EkmServiceClient(); - * try { - * $resource = 'resource'; - * $response = $ekmServiceClient->getIamPolicy($resource); - * } finally { - * $ekmServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $ekmServiceClient = new EkmServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $ekmServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $ekmServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - 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('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->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. - * - * Sample code: - * ``` - * $ekmServiceClient = new EkmServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $ekmServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $ekmServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @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\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } -} diff --git a/owl-bot-staging/Kms/v1/src/V1/Gapic/KeyManagementServiceGapicClient.php b/owl-bot-staging/Kms/v1/src/V1/Gapic/KeyManagementServiceGapicClient.php deleted file mode 100644 index 7032ff169f78..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/Gapic/KeyManagementServiceGapicClient.php +++ /dev/null @@ -1,2551 +0,0 @@ -cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - * $ciphertext = '...'; - * $response = $keyManagementServiceClient->asymmetricDecrypt($formattedName, $ciphertext); - * } finally { - * $keyManagementServiceClient->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. - */ -class KeyManagementServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.kms.v1.KeyManagementService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'cloudkms.googleapis.com'; - - /** 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/cloudkms', - ]; - - private static $cryptoKeyNameTemplate; - - private static $cryptoKeyVersionNameTemplate; - - private static $importJobNameTemplate; - - private static $keyRingNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/key_management_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/key_management_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/key_management_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/key_management_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getCryptoKeyNameTemplate() - { - if (self::$cryptoKeyNameTemplate == null) { - self::$cryptoKeyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}'); - } - - return self::$cryptoKeyNameTemplate; - } - - private static function getCryptoKeyVersionNameTemplate() - { - if (self::$cryptoKeyVersionNameTemplate == null) { - self::$cryptoKeyVersionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}'); - } - - return self::$cryptoKeyVersionNameTemplate; - } - - private static function getImportJobNameTemplate() - { - if (self::$importJobNameTemplate == null) { - self::$importJobNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job}'); - } - - return self::$importJobNameTemplate; - } - - private static function getKeyRingNameTemplate() - { - if (self::$keyRingNameTemplate == null) { - self::$keyRingNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}'); - } - - return self::$keyRingNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'cryptoKey' => self::getCryptoKeyNameTemplate(), - 'cryptoKeyVersion' => self::getCryptoKeyVersionNameTemplate(), - 'importJob' => self::getImportJobNameTemplate(), - 'keyRing' => self::getKeyRingNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * 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($project, $location, $keyRing, $cryptoKey) - { - return self::getCryptoKeyNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * crypto_key_version resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * @param string $cryptoKeyVersion - * - * @return string The formatted crypto_key_version resource. - */ - public static function cryptoKeyVersionName($project, $location, $keyRing, $cryptoKey, $cryptoKeyVersion) - { - return self::getCryptoKeyVersionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - 'crypto_key_version' => $cryptoKeyVersion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a import_job - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $importJob - * - * @return string The formatted import_job resource. - */ - public static function importJobName($project, $location, $keyRing, $importJob) - { - return self::getImportJobNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'import_job' => $importJob, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a key_ring - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * - * @return string The formatted key_ring resource. - */ - public static function keyRingName($project, $location, $keyRing) - { - return self::getKeyRingNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - ]); - } - - /** - * 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($project, $location) - { - return self::getLocationNameTemplate()->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 - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version} - * - importJob: projects/{project}/locations/{location}/keyRings/{key_ring}/importJobs/{import_job} - * - keyRing: projects/{project}/locations/{location}/keyRings/{key_ring} - * - 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($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 'cloudkms.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); - } - - /** - * Decrypts data that was encrypted with a public key retrieved from - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] - * ASYMMETRIC_DECRYPT. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - * $ciphertext = '...'; - * $response = $keyManagementServiceClient->asymmetricDecrypt($formattedName, $ciphertext); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * decryption. - * @param string $ciphertext Required. The data encrypted with the named - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s public key using - * OAEP. - * @param array $optionalArgs { - * Optional. - * - * @type Int64Value $ciphertextCrc32c - * Optional. An optional CRC32C checksum of the - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricDecryptRequest.ciphertext][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext]) - * is equal to - * [AsymmetricDecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.AsymmetricDecryptRequest.ciphertext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Kms\V1\AsymmetricDecryptResponse - * - * @throws ApiException if the remote call fails - */ - public function asymmetricDecrypt($name, $ciphertext, array $optionalArgs = []) - { - $request = new AsymmetricDecryptRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setCiphertext($ciphertext); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['ciphertextCrc32c'])) { - $request->setCiphertextCrc32c($optionalArgs['ciphertextCrc32c']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('AsymmetricDecrypt', AsymmetricDecryptResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] - * ASYMMETRIC_SIGN, producing a signature that can be verified with the public - * key retrieved from - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - * $digest = new Digest(); - * $response = $keyManagementServiceClient->asymmetricSign($formattedName, $digest); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * @param Digest $digest Optional. The digest of the data to sign. The digest must be produced with - * the same digest algorithm as specified by the key version's - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm]. - * - * This field may not be supplied if - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * is supplied. - * @param array $optionalArgs { - * Optional. - * - * @type Int64Value $digestCrc32c - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]) - * is equal to - * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * @type string $data - * Optional. The data to sign. - * It can't be supplied if - * [AsymmetricSignRequest.digest][google.cloud.kms.v1.AsymmetricSignRequest.digest] - * is supplied. - * @type Int64Value $dataCrc32c - * Optional. An optional CRC32C checksum of the - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([AsymmetricSignRequest.data][google.cloud.kms.v1.AsymmetricSignRequest.data]) - * is equal to - * [AsymmetricSignRequest.data_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Kms\V1\AsymmetricSignResponse - * - * @throws ApiException if the remote call fails - */ - public function asymmetricSign($name, $digest, array $optionalArgs = []) - { - $request = new AsymmetricSignRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setDigest($digest); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['digestCrc32c'])) { - $request->setDigestCrc32c($optionalArgs['digestCrc32c']); - } - - if (isset($optionalArgs['data'])) { - $request->setData($optionalArgs['data']); - } - - if (isset($optionalArgs['dataCrc32c'])) { - $request->setDataCrc32c($optionalArgs['dataCrc32c']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('AsymmetricSign', AsymmetricSignResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a - * [KeyRing][google.cloud.kms.v1.KeyRing]. - * - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and - * [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm] - * are required. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedParent = $keyManagementServiceClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - * $cryptoKeyId = 'crypto_key_id'; - * $cryptoKey = new CryptoKey(); - * $response = $keyManagementServiceClient->createCryptoKey($formattedParent, $cryptoKeyId, $cryptoKey); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The [name][google.cloud.kms.v1.KeyRing.name] of the KeyRing - * associated with the [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * @param string $cryptoKeyId Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * @param CryptoKey $cryptoKey Required. A [CryptoKey][google.cloud.kms.v1.CryptoKey] with initial field - * values. - * @param array $optionalArgs { - * Optional. - * - * @type bool $skipInitialVersionCreation - * If set to true, the request will create a - * [CryptoKey][google.cloud.kms.v1.CryptoKey] without any - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. You must - * manually call - * [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] - * or - * [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion] - * before you can use this [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Kms\V1\CryptoKey - * - * @throws ApiException if the remote call fails - */ - public function createCryptoKey($parent, $cryptoKeyId, $cryptoKey, array $optionalArgs = []) - { - $request = new CreateCryptoKeyRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setCryptoKeyId($cryptoKeyId); - $request->setCryptoKey($cryptoKey); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['skipInitialVersionCreation'])) { - $request->setSkipInitialVersionCreation($optionalArgs['skipInitialVersionCreation']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateCryptoKey', CryptoKey::class, $optionalArgs, $request)->wait(); - } - - /** - * Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a - * [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * The server will assign the next sequential id. If unset, - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to - * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedParent = $keyManagementServiceClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - * $cryptoKeyVersion = new CryptoKeyVersion(); - * $response = $keyManagementServiceClient->createCryptoKeyVersion($formattedParent, $cryptoKeyVersion); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] associated with the - * [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * @param CryptoKeyVersion $cryptoKeyVersion Required. A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * initial field values. - * @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\Kms\V1\CryptoKeyVersion - * - * @throws ApiException if the remote call fails - */ - public function createCryptoKeyVersion($parent, $cryptoKeyVersion, array $optionalArgs = []) - { - $request = new CreateCryptoKeyVersionRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setCryptoKeyVersion($cryptoKeyVersion); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateCryptoKeyVersion', CryptoKeyVersion::class, $optionalArgs, $request)->wait(); - } - - /** - * Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a - * [KeyRing][google.cloud.kms.v1.KeyRing]. - * - * [ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is - * required. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedParent = $keyManagementServiceClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - * $importJobId = 'import_job_id'; - * $importJob = new ImportJob(); - * $response = $keyManagementServiceClient->createImportJob($formattedParent, $importJobId, $importJob); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] associated with the - * [ImportJobs][google.cloud.kms.v1.ImportJob]. - * @param string $importJobId Required. It must be unique within a KeyRing and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * @param ImportJob $importJob Required. An [ImportJob][google.cloud.kms.v1.ImportJob] with initial field - * values. - * @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\Kms\V1\ImportJob - * - * @throws ApiException if the remote call fails - */ - public function createImportJob($parent, $importJobId, $importJob, array $optionalArgs = []) - { - $request = new CreateImportJobRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setImportJobId($importJobId); - $request->setImportJob($importJob); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateImportJob', ImportJob::class, $optionalArgs, $request)->wait(); - } - - /** - * Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and - * Location. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedParent = $keyManagementServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $keyRingId = 'key_ring_id'; - * $keyRing = new KeyRing(); - * $response = $keyManagementServiceClient->createKeyRing($formattedParent, $keyRingId, $keyRing); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. - * @param string $keyRingId Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9_-]{1,63}` - * @param KeyRing $keyRing Required. A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field - * values. - * @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\Kms\V1\KeyRing - * - * @throws ApiException if the remote call fails - */ - public function createKeyRing($parent, $keyRingId, $keyRing, array $optionalArgs = []) - { - $request = new CreateKeyRingRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setKeyRingId($keyRingId); - $request->setKeyRing($keyRing); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateKeyRing', KeyRing::class, $optionalArgs, $request)->wait(); - } - - /** - * Decrypts data that was protected by - * [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedName = $keyManagementServiceClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - * $ciphertext = '...'; - * $response = $keyManagementServiceClient->decrypt($formattedName, $ciphertext); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to use for decryption. The - * server will choose the appropriate version. - * @param string $ciphertext Required. The encrypted data originally returned in - * [EncryptResponse.ciphertext][google.cloud.kms.v1.EncryptResponse.ciphertext]. - * @param array $optionalArgs { - * Optional. - * - * @type string $additionalAuthenticatedData - * Optional. Optional data that must match the data originally supplied in - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * @type Int64Value $ciphertextCrc32c - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.ciphertext][google.cloud.kms.v1.DecryptRequest.ciphertext]) - * is equal to - * [DecryptRequest.ciphertext_crc32c][google.cloud.kms.v1.DecryptRequest.ciphertext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * @type Int64Value $additionalAuthenticatedDataCrc32c - * Optional. An optional CRC32C checksum of the - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]) - * is equal to - * [DecryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Kms\V1\DecryptResponse - * - * @throws ApiException if the remote call fails - */ - public function decrypt($name, $ciphertext, array $optionalArgs = []) - { - $request = new DecryptRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setCiphertext($ciphertext); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['additionalAuthenticatedData'])) { - $request->setAdditionalAuthenticatedData($optionalArgs['additionalAuthenticatedData']); - } - - if (isset($optionalArgs['ciphertextCrc32c'])) { - $request->setCiphertextCrc32c($optionalArgs['ciphertextCrc32c']); - } - - if (isset($optionalArgs['additionalAuthenticatedDataCrc32c'])) { - $request->setAdditionalAuthenticatedDataCrc32c($optionalArgs['additionalAuthenticatedDataCrc32c']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('Decrypt', DecryptResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for - * destruction. - * - * Upon calling this method, - * [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will - * be set to - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED], - * and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will - * be set to the time - * [destroy_scheduled_duration][google.cloud.kms.v1.CryptoKey.destroy_scheduled_duration] - * in the future. At that time, the - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will automatically - * change to - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED], - * and the key material will be irrevocably destroyed. - * - * Before the - * [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is - * reached, - * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] - * may be called to reverse the process. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - * $response = $keyManagementServiceClient->destroyCryptoKeyVersion($formattedName); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to destroy. - * @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\Kms\V1\CryptoKeyVersion - * - * @throws ApiException if the remote call fails - */ - public function destroyCryptoKeyVersion($name, array $optionalArgs = []) - { - $request = new DestroyCryptoKeyVersionRequest(); - $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('DestroyCryptoKeyVersion', CryptoKeyVersion::class, $optionalArgs, $request)->wait(); - } - - /** - * Encrypts data, so that it can only be recovered by a call to - * [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $name = 'name'; - * $plaintext = '...'; - * $response = $keyManagementServiceClient->encrypt($name, $plaintext); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] or - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * encryption. - * - * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server - * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary]. - * @param string $plaintext Required. The data to encrypt. Must be no larger than 64KiB. - * - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the - * plaintext must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * @param array $optionalArgs { - * Optional. - * - * @type string $additionalAuthenticatedData - * Optional. Optional data that, if specified, must also be provided during - * decryption through - * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data]. - * - * The maximum size depends on the key version's - * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level]. - * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE], - * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and - * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the - * AAD must be no larger than 64KiB. For - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of - * the plaintext and additional_authenticated_data fields must be no larger - * than 8KiB. - * @type Int64Value $plaintextCrc32c - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]) - * is equal to - * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * @type Int64Value $additionalAuthenticatedDataCrc32c - * Optional. An optional CRC32C checksum of the - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]. - * If specified, - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * verify the integrity of the received - * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data] - * using this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]) - * is equal to - * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Kms\V1\EncryptResponse - * - * @throws ApiException if the remote call fails - */ - public function encrypt($name, $plaintext, array $optionalArgs = []) - { - $request = new EncryptRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setPlaintext($plaintext); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['additionalAuthenticatedData'])) { - $request->setAdditionalAuthenticatedData($optionalArgs['additionalAuthenticatedData']); - } - - if (isset($optionalArgs['plaintextCrc32c'])) { - $request->setPlaintextCrc32c($optionalArgs['plaintextCrc32c']); - } - - if (isset($optionalArgs['additionalAuthenticatedDataCrc32c'])) { - $request->setAdditionalAuthenticatedDataCrc32c($optionalArgs['additionalAuthenticatedDataCrc32c']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('Encrypt', EncryptResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Generate random bytes using the Cloud KMS randomness source in the provided - * location. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $response = $keyManagementServiceClient->generateRandomBytes(); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $location - * The project-specific location in which to generate random bytes. - * For example, "projects/my-project/locations/us-central1". - * @type int $lengthBytes - * The length in bytes of the amount of randomness to retrieve. Minimum 8 - * bytes, maximum 1024 bytes. - * @type int $protectionLevel - * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when - * generating the random data. Currently, only - * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is - * supported. - * For allowed values, use constants defined on {@see \Google\Cloud\Kms\V1\ProtectionLevel} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Kms\V1\GenerateRandomBytesResponse - * - * @throws ApiException if the remote call fails - */ - public function generateRandomBytes(array $optionalArgs = []) - { - $request = new GenerateRandomBytesRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['location'])) { - $request->setLocation($optionalArgs['location']); - $requestParamHeaders['location'] = $optionalArgs['location']; - } - - if (isset($optionalArgs['lengthBytes'])) { - $request->setLengthBytes($optionalArgs['lengthBytes']); - } - - if (isset($optionalArgs['protectionLevel'])) { - $request->setProtectionLevel($optionalArgs['protectionLevel']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateRandomBytes', GenerateRandomBytesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as - * well as its [primary][google.cloud.kms.v1.CryptoKey.primary] - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedName = $keyManagementServiceClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - * $response = $keyManagementServiceClient->getCryptoKey($formattedName); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to get. - * @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\Kms\V1\CryptoKey - * - * @throws ApiException if the remote call fails - */ - public function getCryptoKey($name, array $optionalArgs = []) - { - $request = new GetCryptoKeyRequest(); - $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('GetCryptoKey', CryptoKey::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns metadata for a given - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - * $response = $keyManagementServiceClient->getCryptoKeyVersion($formattedName); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to get. - * @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\Kms\V1\CryptoKeyVersion - * - * @throws ApiException if the remote call fails - */ - public function getCryptoKeyVersion($name, array $optionalArgs = []) - { - $request = new GetCryptoKeyVersionRequest(); - $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('GetCryptoKeyVersion', CryptoKeyVersion::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedName = $keyManagementServiceClient->importJobName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[IMPORT_JOB]'); - * $response = $keyManagementServiceClient->getImportJob($formattedName); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] to get. - * @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\Kms\V1\ImportJob - * - * @throws ApiException if the remote call fails - */ - public function getImportJob($name, array $optionalArgs = []) - { - $request = new GetImportJobRequest(); - $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('GetImportJob', ImportJob::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedName = $keyManagementServiceClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - * $response = $keyManagementServiceClient->getKeyRing($formattedName); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The [name][google.cloud.kms.v1.KeyRing.name] of the - * [KeyRing][google.cloud.kms.v1.KeyRing] to get. - * @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\Kms\V1\KeyRing - * - * @throws ApiException if the remote call fails - */ - public function getKeyRing($name, array $optionalArgs = []) - { - $request = new GetKeyRingRequest(); - $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('GetKeyRing', KeyRing::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the public key for the given - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be - * [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] - * or - * [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - * $response = $keyManagementServiceClient->getPublicKey($formattedName); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The [name][google.cloud.kms.v1.CryptoKeyVersion.name] of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] public key to get. - * @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\Kms\V1\PublicKey - * - * @throws ApiException if the remote call fails - */ - public function getPublicKey($name, array $optionalArgs = []) - { - $request = new GetPublicKeyRequest(); - $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('GetPublicKey', PublicKey::class, $optionalArgs, $request)->wait(); - } - - /** - * Import wrapped key material into a - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * - * All requests must specify a [CryptoKey][google.cloud.kms.v1.CryptoKey]. If - * a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] is additionally - * specified in the request, key material will be reimported into that - * version. Otherwise, a new version will be created, and will be assigned the - * next sequential id within the [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedParent = $keyManagementServiceClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - * $algorithm = CryptoKeyVersionAlgorithm::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED; - * $importJob = 'import_job'; - * $response = $keyManagementServiceClient->importCryptoKeyVersion($formattedParent, $algorithm, $importJob); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The [name][google.cloud.kms.v1.CryptoKey.name] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to be imported into. - * - * The create permission is only required on this key when creating a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. - * @param int $algorithm Required. The - * [algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] - * of the key being imported. This does not need to match the - * [version_template][google.cloud.kms.v1.CryptoKey.version_template] of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] this version imports into. - * For allowed values, use constants defined on {@see \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionAlgorithm} - * @param string $importJob Required. The [name][google.cloud.kms.v1.ImportJob.name] of the - * [ImportJob][google.cloud.kms.v1.ImportJob] that was used to wrap this key - * material. - * @param array $optionalArgs { - * Optional. - * - * @type string $cryptoKeyVersion - * Optional. The optional [name][google.cloud.kms.v1.CryptoKeyVersion.name] of - * an existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to - * target for an import operation. If this field is not present, a new - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] containing the - * supplied key material is created. - * - * If this field is present, the supplied key material is imported into - * the existing [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. To - * import into an existing - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] must be a child of - * [ImportCryptoKeyVersionRequest.parent][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.parent], - * have been previously created via [ImportCryptoKeyVersion][], and be in - * [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED] - * or - * [IMPORT_FAILED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.IMPORT_FAILED] - * state. The key material and algorithm must match the previous - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] exactly if the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] has ever contained - * key material. - * @type string $wrappedKey - * Optional. The wrapped key material to import. - * - * Before wrapping, key material must be formatted. If importing symmetric key - * material, the expected key material format is plain bytes. If importing - * asymmetric key material, the expected key material format is PKCS#8-encoded - * DER (the PrivateKeyInfo structure from RFC 5208). - * - * When wrapping with import methods - * ([RSA_OAEP_3072_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA1_AES_256] - * or - * [RSA_OAEP_4096_SHA1_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA1_AES_256] - * or - * [RSA_OAEP_3072_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256_AES_256] - * or - * [RSA_OAEP_4096_SHA256_AES_256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256_AES_256]), - * - * this field must contain the concatenation of: - *
    - *
  1. An ephemeral AES-256 wrapping key wrapped with the - * [public_key][google.cloud.kms.v1.ImportJob.public_key] using - * RSAES-OAEP with SHA-1/SHA-256, MGF1 with SHA-1/SHA-256, and an empty - * label. - *
  2. - *
  3. The formatted key to be imported, wrapped with the ephemeral AES-256 - * key using AES-KWP (RFC 5649). - *
  4. - *
- * - * This format is the same as the format produced by PKCS#11 mechanism - * CKM_RSA_AES_KEY_WRAP. - * - * When wrapping with import methods - * ([RSA_OAEP_3072_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_3072_SHA256] - * or - * [RSA_OAEP_4096_SHA256][google.cloud.kms.v1.ImportJob.ImportMethod.RSA_OAEP_4096_SHA256]), - * - * this field must contain the formatted key to be imported, wrapped with the - * [public_key][google.cloud.kms.v1.ImportJob.public_key] using RSAES-OAEP - * with SHA-256, MGF1 with SHA-256, and an empty label. - * @type string $rsaAesWrappedKey - * Optional. This field has the same meaning as - * [wrapped_key][google.cloud.kms.v1.ImportCryptoKeyVersionRequest.wrapped_key]. - * Prefer to use that field in new work. Either that field or this field - * (but not both) must be specified. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Kms\V1\CryptoKeyVersion - * - * @throws ApiException if the remote call fails - */ - public function importCryptoKeyVersion($parent, $algorithm, $importJob, array $optionalArgs = []) - { - $request = new ImportCryptoKeyVersionRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAlgorithm($algorithm); - $request->setImportJob($importJob); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['cryptoKeyVersion'])) { - $request->setCryptoKeyVersion($optionalArgs['cryptoKeyVersion']); - } - - if (isset($optionalArgs['wrappedKey'])) { - $request->setWrappedKey($optionalArgs['wrappedKey']); - } - - if (isset($optionalArgs['rsaAesWrappedKey'])) { - $request->setRsaAesWrappedKey($optionalArgs['rsaAesWrappedKey']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ImportCryptoKeyVersion', CryptoKeyVersion::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedParent = $keyManagementServiceClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - * // Iterate over pages of elements - * $pagedResponse = $keyManagementServiceClient->listCryptoKeyVersions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $keyManagementServiceClient->listCryptoKeyVersions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to list, in the format - * `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - * @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 int $view - * The fields to include in the response. - * For allowed values, use constants defined on {@see \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionView} - * @type string $filter - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * @type string $orderBy - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listCryptoKeyVersions($parent, array $optionalArgs = []) - { - $request = new ListCryptoKeyVersionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListCryptoKeyVersions', $optionalArgs, ListCryptoKeyVersionsResponse::class, $request); - } - - /** - * Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedParent = $keyManagementServiceClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - * // Iterate over pages of elements - * $pagedResponse = $keyManagementServiceClient->listCryptoKeys($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $keyManagementServiceClient->listCryptoKeys($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * @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 int $versionView - * The fields of the primary version to include in the response. - * For allowed values, use constants defined on {@see \Google\Cloud\Kms\V1\CryptoKeyVersion\CryptoKeyVersionView} - * @type string $filter - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * @type string $orderBy - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listCryptoKeys($parent, array $optionalArgs = []) - { - $request = new ListCryptoKeysRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['versionView'])) { - $request->setVersionView($optionalArgs['versionView']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListCryptoKeys', $optionalArgs, ListCryptoKeysResponse::class, $request); - } - - /** - * Lists [ImportJobs][google.cloud.kms.v1.ImportJob]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedParent = $keyManagementServiceClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - * // Iterate over pages of elements - * $pagedResponse = $keyManagementServiceClient->listImportJobs($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $keyManagementServiceClient->listImportJobs($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the [KeyRing][google.cloud.kms.v1.KeyRing] - * to list, in the format `projects/*/locations/*/keyRings/*`. - * @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 - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * @type string $orderBy - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listImportJobs($parent, array $optionalArgs = []) - { - $request = new ListImportJobsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListImportJobs', $optionalArgs, ListImportJobsResponse::class, $request); - } - - /** - * Lists [KeyRings][google.cloud.kms.v1.KeyRing]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedParent = $keyManagementServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $keyManagementServiceClient->listKeyRings($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $keyManagementServiceClient->listKeyRings($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the location associated with the - * [KeyRings][google.cloud.kms.v1.KeyRing], in the format - * `projects/*/locations/*`. - * @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 - * Optional. Only include resources that match the filter in the response. For - * more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * @type string $orderBy - * Optional. Specify how the results should be sorted. If not specified, the - * results will be sorted in the default order. For more information, see - * [Sorting and filtering list - * results](https://cloud.google.com/kms/docs/sorting-and-filtering). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listKeyRings($parent, array $optionalArgs = []) - { - $request = new ListKeyRingsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - 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['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListKeyRings', $optionalArgs, ListKeyRingsResponse::class, $request); - } - - /** - * Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] - * with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, - * producing a tag that can be verified by another source with the same key. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - * $data = '...'; - * $response = $keyManagementServiceClient->macSign($formattedName, $data); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * signing. - * @param string $data Required. The data to sign. The MAC tag is computed over this data field - * based on the specific algorithm. - * @param array $optionalArgs { - * Optional. - * - * @type Int64Value $dataCrc32c - * Optional. An optional CRC32C checksum of the - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data]) is - * equal to - * [MacSignRequest.data_crc32c][google.cloud.kms.v1.MacSignRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Kms\V1\MacSignResponse - * - * @throws ApiException if the remote call fails - */ - public function macSign($name, $data, array $optionalArgs = []) - { - $request = new MacSignRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setData($data); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['dataCrc32c'])) { - $request->setDataCrc32c($optionalArgs['dataCrc32c']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('MacSign', MacSignResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Verifies MAC tag using a - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] MAC, and returns - * a response that indicates whether or not the verification was successful. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - * $data = '...'; - * $mac = '...'; - * $response = $keyManagementServiceClient->macVerify($formattedName, $data, $mac); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for - * verification. - * @param string $data Required. The data used previously as a - * [MacSignRequest.data][google.cloud.kms.v1.MacSignRequest.data] to generate - * the MAC tag. - * @param string $mac Required. The signature to verify. - * @param array $optionalArgs { - * Optional. - * - * @type Int64Value $dataCrc32c - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] using - * this checksum. - * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will - * report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data]) - * is equal to - * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * @type Int64Value $macCrc32c - * Optional. An optional CRC32C checksum of the - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac]. If - * specified, [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will verify the integrity of the received - * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] using this - * checksum. [KeyManagementService][google.cloud.kms.v1.KeyManagementService] - * will report an error if the checksum verification fails. If you receive a - * checksum error, your client should verify that - * CRC32C([MacVerifyRequest.tag][]) is equal to - * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c], - * and if so, perform a limited number of retries. A persistent mismatch may - * indicate an issue in your computation of the CRC32C checksum. Note: This - * field is defined as int64 for reasons of compatibility across different - * languages. However, it is a non-negative integer, which will never exceed - * 2^32-1, and can be safely downconverted to uint32 in languages that support - * this type. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Kms\V1\MacVerifyResponse - * - * @throws ApiException if the remote call fails - */ - public function macVerify($name, $data, $mac, array $optionalArgs = []) - { - $request = new MacVerifyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setData($data); - $request->setMac($mac); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['dataCrc32c'])) { - $request->setDataCrc32c($optionalArgs['dataCrc32c']); - } - - if (isset($optionalArgs['macCrc32c'])) { - $request->setMacCrc32c($optionalArgs['macCrc32c']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('MacVerify', MacVerifyResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the - * [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] - * state. - * - * Upon restoration of the CryptoKeyVersion, - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to - * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED], - * and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will - * be cleared. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedName = $keyManagementServiceClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - * $response = $keyManagementServiceClient->restoreCryptoKeyVersion($formattedName); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to restore. - * @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\Kms\V1\CryptoKeyVersion - * - * @throws ApiException if the remote call fails - */ - public function restoreCryptoKeyVersion($name, array $optionalArgs = []) - { - $request = new RestoreCryptoKeyVersionRequest(); - $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('RestoreCryptoKeyVersion', CryptoKeyVersion::class, $optionalArgs, $request)->wait(); - } - - /** - * Update a [CryptoKey][google.cloud.kms.v1.CryptoKey]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $cryptoKey = new CryptoKey(); - * $updateMask = new FieldMask(); - * $response = $keyManagementServiceClient->updateCryptoKey($cryptoKey, $updateMask); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param CryptoKey $cryptoKey Required. [CryptoKey][google.cloud.kms.v1.CryptoKey] with updated values. - * @param FieldMask $updateMask Required. List of fields to be updated in this request. - * @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\Kms\V1\CryptoKey - * - * @throws ApiException if the remote call fails - */ - public function updateCryptoKey($cryptoKey, $updateMask, array $optionalArgs = []) - { - $request = new UpdateCryptoKeyRequest(); - $requestParamHeaders = []; - $request->setCryptoKey($cryptoKey); - $request->setUpdateMask($updateMask); - $requestParamHeaders['crypto_key.name'] = $cryptoKey->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateCryptoKey', CryptoKey::class, $optionalArgs, $request)->wait(); - } - - /** - * Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that - * will be used in - * [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. - * - * Returns an error if called on a key whose purpose is not - * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $formattedName = $keyManagementServiceClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - * $cryptoKeyVersionId = 'crypto_key_version_id'; - * $response = $keyManagementServiceClient->updateCryptoKeyPrimaryVersion($formattedName, $cryptoKeyVersionId); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the - * [CryptoKey][google.cloud.kms.v1.CryptoKey] to update. - * @param string $cryptoKeyVersionId Required. The id of the child - * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary. - * @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\Kms\V1\CryptoKey - * - * @throws ApiException if the remote call fails - */ - public function updateCryptoKeyPrimaryVersion($name, $cryptoKeyVersionId, array $optionalArgs = []) - { - $request = new UpdateCryptoKeyPrimaryVersionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setCryptoKeyVersionId($cryptoKeyVersionId); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateCryptoKeyPrimaryVersion', CryptoKey::class, $optionalArgs, $request)->wait(); - } - - /** - * Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s - * metadata. - * - * [state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between - * [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] - * and - * [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] - * using this method. See - * [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion] - * and - * [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] - * to move between other states. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $cryptoKeyVersion = new CryptoKeyVersion(); - * $updateMask = new FieldMask(); - * $response = $keyManagementServiceClient->updateCryptoKeyVersion($cryptoKeyVersion, $updateMask); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param CryptoKeyVersion $cryptoKeyVersion Required. [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with - * updated values. - * @param FieldMask $updateMask Required. List of fields to be updated in this request. - * @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\Kms\V1\CryptoKeyVersion - * - * @throws ApiException if the remote call fails - */ - public function updateCryptoKeyVersion($cryptoKeyVersion, $updateMask, array $optionalArgs = []) - { - $request = new UpdateCryptoKeyVersionRequest(); - $requestParamHeaders = []; - $request->setCryptoKeyVersion($cryptoKeyVersion); - $request->setUpdateMask($updateMask); - $requestParamHeaders['crypto_key_version.name'] = $cryptoKeyVersion->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateCryptoKeyVersion', CryptoKeyVersion::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $response = $keyManagementServiceClient->getLocation(); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $keyManagementServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $keyManagementServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @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 listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['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('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $resource = 'resource'; - * $response = $keyManagementServiceClient->getIamPolicy($resource); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $keyManagementServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - 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('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->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. - * - * Sample code: - * ``` - * $keyManagementServiceClient = new KeyManagementServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $keyManagementServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $keyManagementServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @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\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } -} diff --git a/owl-bot-staging/Kms/v1/src/V1/KeyManagementServiceClient.php b/owl-bot-staging/Kms/v1/src/V1/KeyManagementServiceClient.php deleted file mode 100644 index 04b86cf14288..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/KeyManagementServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.kms.v1.EkmService' => [ - 'ListEkmConnections' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEkmConnections', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php deleted file mode 100644 index 55ca57743070..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/ekm_service_rest_client_config.php +++ /dev/null @@ -1,185 +0,0 @@ - [ - 'google.cloud.kms.v1.EkmService' => [ - 'CreateEkmConnection' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/ekmConnections', - 'body' => 'ekm_connection', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'ekm_connection_id', - ], - ], - 'GetEkmConnection' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/ekmConnections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListEkmConnections' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/ekmConnections', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateEkmConnection' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{ekm_connection.name=projects/*/locations/*/ekmConnections/*}', - 'body' => 'ekm_connection', - 'placeholders' => [ - 'ekm_connection.name' => [ - 'getters' => [ - 'getEkmConnection', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - '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.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json deleted file mode 100644 index cce2754f278a..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_client_config.json +++ /dev/null @@ -1,181 +0,0 @@ -{ - "interfaces": { - "google.cloud.kms.v1.KeyManagementService": { - "retry_codes": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "AsymmetricDecrypt": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "AsymmetricSign": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateCryptoKey": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateCryptoKeyVersion": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateImportJob": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateKeyRing": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "Decrypt": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DestroyCryptoKeyVersion": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "Encrypt": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GenerateRandomBytes": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetCryptoKey": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetCryptoKeyVersion": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetImportJob": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetKeyRing": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetPublicKey": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ImportCryptoKeyVersion": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListCryptoKeyVersions": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListCryptoKeys": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListImportJobs": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListKeyRings": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "MacSign": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "MacVerify": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RestoreCryptoKeyVersion": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateCryptoKey": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateCryptoKeyPrimaryVersion": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateCryptoKeyVersion": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php deleted file mode 100644 index ad83c60d4f24..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_descriptor_config.php +++ /dev/null @@ -1,58 +0,0 @@ - [ - 'google.cloud.kms.v1.KeyManagementService' => [ - 'ListCryptoKeyVersions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCryptoKeyVersions', - ], - ], - 'ListCryptoKeys' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCryptoKeys', - ], - ], - 'ListImportJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getImportJobs', - ], - ], - 'ListKeyRings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getKeyRings', - ], - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php b/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php deleted file mode 100644 index 4aba8af3de42..000000000000 --- a/owl-bot-staging/Kms/v1/src/V1/resources/key_management_service_rest_client_config.php +++ /dev/null @@ -1,452 +0,0 @@ - [ - 'google.cloud.kms.v1.KeyManagementService' => [ - 'AsymmetricDecrypt' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricDecrypt', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'AsymmetricSign' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricSign', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateCryptoKey' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys', - 'body' => 'crypto_key', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'crypto_key_id', - ], - ], - 'CreateCryptoKeyVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions', - 'body' => 'crypto_key_version', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateImportJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/importJobs', - 'body' => 'import_job', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'import_job_id', - ], - ], - 'CreateKeyRing' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/keyRings', - 'body' => 'key_ring', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'key_ring_id', - ], - ], - 'Decrypt' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:decrypt', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DestroyCryptoKeyVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:destroy', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'Encrypt' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/**}:encrypt', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateRandomBytes' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{location=projects/*/locations/*}:generateRandomBytes', - 'body' => '*', - 'placeholders' => [ - 'location' => [ - 'getters' => [ - 'getLocation', - ], - ], - ], - ], - 'GetCryptoKey' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCryptoKeyVersion' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetImportJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/importJobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetKeyRing' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPublicKey' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}/publicKey', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportCryptoKeyVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions:import', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListCryptoKeyVersions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*/cryptoKeys/*}/cryptoKeyVersions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListCryptoKeys' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/cryptoKeys', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListImportJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/keyRings/*}/importJobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListKeyRings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/keyRings', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'MacSign' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:macSign', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'MacVerify' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:macVerify', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RestoreCryptoKeyVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:restore', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCryptoKey' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{crypto_key.name=projects/*/locations/*/keyRings/*/cryptoKeys/*}', - 'body' => 'crypto_key', - 'placeholders' => [ - 'crypto_key.name' => [ - 'getters' => [ - 'getCryptoKey', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateCryptoKeyPrimaryVersion' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:updatePrimaryVersion', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCryptoKeyVersion' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{crypto_key_version.name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}', - 'body' => 'crypto_key_version', - 'placeholders' => [ - 'crypto_key_version.name' => [ - 'getters' => [ - 'getCryptoKeyVersion', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - '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.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/cryptoKeys/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/keyRings/*/importJobs/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConfig}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/ekmConnections/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Kms/v1/tests/Unit/V1/EkmServiceClientTest.php b/owl-bot-staging/Kms/v1/tests/Unit/V1/EkmServiceClientTest.php deleted file mode 100644 index 50195ea398ff..000000000000 --- a/owl-bot-staging/Kms/v1/tests/Unit/V1/EkmServiceClientTest.php +++ /dev/null @@ -1,645 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return EkmServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new EkmServiceClient($options); - } - - /** @test */ - public function createEkmConnectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $expectedResponse = new EkmConnection(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $ekmConnectionId = 'ekmConnectionId270499940'; - $ekmConnection = new EkmConnection(); - $response = $gapicClient->createEkmConnection($formattedParent, $ekmConnectionId, $ekmConnection); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.EkmService/CreateEkmConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEkmConnectionId(); - $this->assertProtobufEquals($ekmConnectionId, $actualValue); - $actualValue = $actualRequestObject->getEkmConnection(); - $this->assertProtobufEquals($ekmConnection, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEkmConnectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $ekmConnectionId = 'ekmConnectionId270499940'; - $ekmConnection = new EkmConnection(); - try { - $gapicClient->createEkmConnection($formattedParent, $ekmConnectionId, $ekmConnection); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEkmConnectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $etag = 'etag3123477'; - $expectedResponse = new EkmConnection(); - $expectedResponse->setName($name2); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); - $response = $gapicClient->getEkmConnection($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.EkmService/GetEkmConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEkmConnectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->ekmConnectionName('[PROJECT]', '[LOCATION]', '[EKM_CONNECTION]'); - try { - $gapicClient->getEkmConnection($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 listEkmConnectionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $ekmConnectionsElement = new EkmConnection(); - $ekmConnections = [ - $ekmConnectionsElement, - ]; - $expectedResponse = new ListEkmConnectionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setEkmConnections($ekmConnections); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listEkmConnections($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEkmConnections()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.EkmService/ListEkmConnections', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEkmConnectionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listEkmConnections($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 updateEkmConnectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $expectedResponse = new EkmConnection(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $ekmConnection = new EkmConnection(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateEkmConnection($ekmConnection, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.EkmService/UpdateEkmConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getEkmConnection(); - $this->assertProtobufEquals($ekmConnection, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEkmConnectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $ekmConnection = new EkmConnection(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateEkmConnection($ekmConnection, $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()); - } - - /** @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); - $response = $gapicClient->getLocation(); - $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); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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); - $response = $gapicClient->listLocations(); - $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); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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'; - $response = $gapicClient->getIamPolicy($resource); - $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'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $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(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $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 = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->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/Kms/v1/tests/Unit/V1/KeyManagementServiceClientTest.php b/owl-bot-staging/Kms/v1/tests/Unit/V1/KeyManagementServiceClientTest.php deleted file mode 100644 index 74c4907f3b3f..000000000000 --- a/owl-bot-staging/Kms/v1/tests/Unit/V1/KeyManagementServiceClientTest.php +++ /dev/null @@ -1,2155 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return KeyManagementServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new KeyManagementServiceClient($options); - } - - /** @test */ - public function asymmetricDecryptTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $plaintext = '-9'; - $verifiedCiphertextCrc32c = true; - $expectedResponse = new AsymmetricDecryptResponse(); - $expectedResponse->setPlaintext($plaintext); - $expectedResponse->setVerifiedCiphertextCrc32c($verifiedCiphertextCrc32c); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $ciphertext = '-72'; - $response = $gapicClient->asymmetricDecrypt($formattedName, $ciphertext); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/AsymmetricDecrypt', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getCiphertext(); - $this->assertProtobufEquals($ciphertext, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function asymmetricDecryptExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $ciphertext = '-72'; - try { - $gapicClient->asymmetricDecrypt($formattedName, $ciphertext); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function asymmetricSignTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $signature = '-72'; - $verifiedDigestCrc32c = true; - $name2 = 'name2-1052831874'; - $verifiedDataCrc32c = true; - $expectedResponse = new AsymmetricSignResponse(); - $expectedResponse->setSignature($signature); - $expectedResponse->setVerifiedDigestCrc32c($verifiedDigestCrc32c); - $expectedResponse->setName($name2); - $expectedResponse->setVerifiedDataCrc32c($verifiedDataCrc32c); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $digest = new Digest(); - $response = $gapicClient->asymmetricSign($formattedName, $digest); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/AsymmetricSign', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getDigest(); - $this->assertProtobufEquals($digest, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function asymmetricSignExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $digest = new Digest(); - try { - $gapicClient->asymmetricSign($formattedName, $digest); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCryptoKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $importOnly = true; - $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; - $expectedResponse = new CryptoKey(); - $expectedResponse->setName($name); - $expectedResponse->setImportOnly($importOnly); - $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $cryptoKeyId = 'cryptoKeyId-2123094983'; - $cryptoKey = new CryptoKey(); - $response = $gapicClient->createCryptoKey($formattedParent, $cryptoKeyId, $cryptoKey); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateCryptoKey', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCryptoKeyId(); - $this->assertProtobufEquals($cryptoKeyId, $actualValue); - $actualValue = $actualRequestObject->getCryptoKey(); - $this->assertProtobufEquals($cryptoKey, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCryptoKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $cryptoKeyId = 'cryptoKeyId-2123094983'; - $cryptoKey = new CryptoKey(); - try { - $gapicClient->createCryptoKey($formattedParent, $cryptoKeyId, $cryptoKey); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCryptoKeyVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $importJob = 'importJob2125587491'; - $importFailureReason = 'importFailureReason-494073229'; - $reimportEligible = true; - $expectedResponse = new CryptoKeyVersion(); - $expectedResponse->setName($name); - $expectedResponse->setImportJob($importJob); - $expectedResponse->setImportFailureReason($importFailureReason); - $expectedResponse->setReimportEligible($reimportEligible); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $cryptoKeyVersion = new CryptoKeyVersion(); - $response = $gapicClient->createCryptoKeyVersion($formattedParent, $cryptoKeyVersion); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateCryptoKeyVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCryptoKeyVersion(); - $this->assertProtobufEquals($cryptoKeyVersion, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCryptoKeyVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $cryptoKeyVersion = new CryptoKeyVersion(); - try { - $gapicClient->createCryptoKeyVersion($formattedParent, $cryptoKeyVersion); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createImportJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new ImportJob(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $importJobId = 'importJobId-1620773193'; - $importJob = new ImportJob(); - $importJobImportMethod = ImportMethod::IMPORT_METHOD_UNSPECIFIED; - $importJob->setImportMethod($importJobImportMethod); - $importJobProtectionLevel = ProtectionLevel::PROTECTION_LEVEL_UNSPECIFIED; - $importJob->setProtectionLevel($importJobProtectionLevel); - $response = $gapicClient->createImportJob($formattedParent, $importJobId, $importJob); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateImportJob', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getImportJobId(); - $this->assertProtobufEquals($importJobId, $actualValue); - $actualValue = $actualRequestObject->getImportJob(); - $this->assertProtobufEquals($importJob, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createImportJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $importJobId = 'importJobId-1620773193'; - $importJob = new ImportJob(); - $importJobImportMethod = ImportMethod::IMPORT_METHOD_UNSPECIFIED; - $importJob->setImportMethod($importJobImportMethod); - $importJobProtectionLevel = ProtectionLevel::PROTECTION_LEVEL_UNSPECIFIED; - $importJob->setProtectionLevel($importJobProtectionLevel); - try { - $gapicClient->createImportJob($formattedParent, $importJobId, $importJob); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createKeyRingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new KeyRing(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $keyRingId = 'keyRingId-2056646742'; - $keyRing = new KeyRing(); - $response = $gapicClient->createKeyRing($formattedParent, $keyRingId, $keyRing); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/CreateKeyRing', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getKeyRingId(); - $this->assertProtobufEquals($keyRingId, $actualValue); - $actualValue = $actualRequestObject->getKeyRing(); - $this->assertProtobufEquals($keyRing, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createKeyRingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $keyRingId = 'keyRingId-2056646742'; - $keyRing = new KeyRing(); - try { - $gapicClient->createKeyRing($formattedParent, $keyRingId, $keyRing); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function decryptTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $plaintext = '-9'; - $usedPrimary = true; - $expectedResponse = new DecryptResponse(); - $expectedResponse->setPlaintext($plaintext); - $expectedResponse->setUsedPrimary($usedPrimary); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $ciphertext = '-72'; - $response = $gapicClient->decrypt($formattedName, $ciphertext); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/Decrypt', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getCiphertext(); - $this->assertProtobufEquals($ciphertext, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function decryptExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $ciphertext = '-72'; - try { - $gapicClient->decrypt($formattedName, $ciphertext); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function destroyCryptoKeyVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $importJob = 'importJob2125587491'; - $importFailureReason = 'importFailureReason-494073229'; - $reimportEligible = true; - $expectedResponse = new CryptoKeyVersion(); - $expectedResponse->setName($name2); - $expectedResponse->setImportJob($importJob); - $expectedResponse->setImportFailureReason($importFailureReason); - $expectedResponse->setReimportEligible($reimportEligible); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $response = $gapicClient->destroyCryptoKeyVersion($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/DestroyCryptoKeyVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function destroyCryptoKeyVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - try { - $gapicClient->destroyCryptoKeyVersion($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 encryptTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $ciphertext = '-72'; - $verifiedPlaintextCrc32c = false; - $verifiedAdditionalAuthenticatedDataCrc32c = true; - $expectedResponse = new EncryptResponse(); - $expectedResponse->setName($name2); - $expectedResponse->setCiphertext($ciphertext); - $expectedResponse->setVerifiedPlaintextCrc32c($verifiedPlaintextCrc32c); - $expectedResponse->setVerifiedAdditionalAuthenticatedDataCrc32c($verifiedAdditionalAuthenticatedDataCrc32c); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $plaintext = '-9'; - $response = $gapicClient->encrypt($name, $plaintext); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/Encrypt', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getPlaintext(); - $this->assertProtobufEquals($plaintext, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function encryptExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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'; - $plaintext = '-9'; - try { - $gapicClient->encrypt($name, $plaintext); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateRandomBytesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $data = '-86'; - $expectedResponse = new GenerateRandomBytesResponse(); - $expectedResponse->setData($data); - $transport->addResponse($expectedResponse); - $response = $gapicClient->generateRandomBytes(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GenerateRandomBytes', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateRandomBytesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->generateRandomBytes(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCryptoKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $importOnly = true; - $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; - $expectedResponse = new CryptoKey(); - $expectedResponse->setName($name2); - $expectedResponse->setImportOnly($importOnly); - $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $response = $gapicClient->getCryptoKey($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetCryptoKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCryptoKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - try { - $gapicClient->getCryptoKey($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 getCryptoKeyVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $importJob = 'importJob2125587491'; - $importFailureReason = 'importFailureReason-494073229'; - $reimportEligible = true; - $expectedResponse = new CryptoKeyVersion(); - $expectedResponse->setName($name2); - $expectedResponse->setImportJob($importJob); - $expectedResponse->setImportFailureReason($importFailureReason); - $expectedResponse->setReimportEligible($reimportEligible); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $response = $gapicClient->getCryptoKeyVersion($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetCryptoKeyVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCryptoKeyVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - try { - $gapicClient->getCryptoKeyVersion($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 getImportJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new ImportJob(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[IMPORT_JOB]'); - $response = $gapicClient->getImportJob($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/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]', '[KEY_RING]', '[IMPORT_JOB]'); - try { - $gapicClient->getImportJob($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 getKeyRingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new KeyRing(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $response = $gapicClient->getKeyRing($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetKeyRing', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getKeyRingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - try { - $gapicClient->getKeyRing($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 getPublicKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $pem = 'pem110872'; - $name2 = 'name2-1052831874'; - $expectedResponse = new PublicKey(); - $expectedResponse->setPem($pem); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $response = $gapicClient->getPublicKey($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/GetPublicKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPublicKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - try { - $gapicClient->getPublicKey($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 importCryptoKeyVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $importJob2 = 'importJob2-1714851050'; - $importFailureReason = 'importFailureReason-494073229'; - $reimportEligible = true; - $expectedResponse = new CryptoKeyVersion(); - $expectedResponse->setName($name); - $expectedResponse->setImportJob($importJob2); - $expectedResponse->setImportFailureReason($importFailureReason); - $expectedResponse->setReimportEligible($reimportEligible); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $algorithm = CryptoKeyVersionAlgorithm::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED; - $importJob = 'importJob2125587491'; - $response = $gapicClient->importCryptoKeyVersion($formattedParent, $algorithm, $importJob); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ImportCryptoKeyVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAlgorithm(); - $this->assertProtobufEquals($algorithm, $actualValue); - $actualValue = $actualRequestObject->getImportJob(); - $this->assertProtobufEquals($importJob, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importCryptoKeyVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $algorithm = CryptoKeyVersionAlgorithm::CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED; - $importJob = 'importJob2125587491'; - try { - $gapicClient->importCryptoKeyVersion($formattedParent, $algorithm, $importJob); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCryptoKeyVersionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $cryptoKeyVersionsElement = new CryptoKeyVersion(); - $cryptoKeyVersions = [ - $cryptoKeyVersionsElement, - ]; - $expectedResponse = new ListCryptoKeyVersionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setCryptoKeyVersions($cryptoKeyVersions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $response = $gapicClient->listCryptoKeyVersions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCryptoKeyVersions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListCryptoKeyVersions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCryptoKeyVersionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - try { - $gapicClient->listCryptoKeyVersions($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 listCryptoKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $cryptoKeysElement = new CryptoKey(); - $cryptoKeys = [ - $cryptoKeysElement, - ]; - $expectedResponse = new ListCryptoKeysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setCryptoKeys($cryptoKeys); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $response = $gapicClient->listCryptoKeys($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCryptoKeys()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListCryptoKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCryptoKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - try { - $gapicClient->listCryptoKeys($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 listImportJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $importJobsElement = new ImportJob(); - $importJobs = [ - $importJobsElement, - ]; - $expectedResponse = new ListImportJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setImportJobs($importJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - $response = $gapicClient->listImportJobs($formattedParent); - $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.kms.v1.KeyManagementService/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->keyRingName('[PROJECT]', '[LOCATION]', '[KEY_RING]'); - try { - $gapicClient->listImportJobs($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 listKeyRingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $keyRingsElement = new KeyRing(); - $keyRings = [ - $keyRingsElement, - ]; - $expectedResponse = new ListKeyRingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setKeyRings($keyRings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listKeyRings($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getKeyRings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/ListKeyRings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listKeyRingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listKeyRings($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 macSignTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $mac = '79'; - $verifiedDataCrc32c = true; - $expectedResponse = new MacSignResponse(); - $expectedResponse->setName($name2); - $expectedResponse->setMac($mac); - $expectedResponse->setVerifiedDataCrc32c($verifiedDataCrc32c); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $data = '-86'; - $response = $gapicClient->macSign($formattedName, $data); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/MacSign', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getData(); - $this->assertProtobufEquals($data, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function macSignExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $data = '-86'; - try { - $gapicClient->macSign($formattedName, $data); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function macVerifyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $success = false; - $verifiedDataCrc32c = true; - $verifiedMacCrc32c = false; - $verifiedSuccessIntegrity = true; - $expectedResponse = new MacVerifyResponse(); - $expectedResponse->setName($name2); - $expectedResponse->setSuccess($success); - $expectedResponse->setVerifiedDataCrc32c($verifiedDataCrc32c); - $expectedResponse->setVerifiedMacCrc32c($verifiedMacCrc32c); - $expectedResponse->setVerifiedSuccessIntegrity($verifiedSuccessIntegrity); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $data = '-86'; - $mac = '79'; - $response = $gapicClient->macVerify($formattedName, $data, $mac); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/MacVerify', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getData(); - $this->assertProtobufEquals($data, $actualValue); - $actualValue = $actualRequestObject->getMac(); - $this->assertProtobufEquals($mac, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function macVerifyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $data = '-86'; - $mac = '79'; - try { - $gapicClient->macVerify($formattedName, $data, $mac); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function restoreCryptoKeyVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $importJob = 'importJob2125587491'; - $importFailureReason = 'importFailureReason-494073229'; - $reimportEligible = true; - $expectedResponse = new CryptoKeyVersion(); - $expectedResponse->setName($name2); - $expectedResponse->setImportJob($importJob); - $expectedResponse->setImportFailureReason($importFailureReason); - $expectedResponse->setReimportEligible($reimportEligible); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - $response = $gapicClient->restoreCryptoKeyVersion($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/RestoreCryptoKeyVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function restoreCryptoKeyVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyVersionName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]', '[CRYPTO_KEY_VERSION]'); - try { - $gapicClient->restoreCryptoKeyVersion($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 updateCryptoKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $importOnly = true; - $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; - $expectedResponse = new CryptoKey(); - $expectedResponse->setName($name); - $expectedResponse->setImportOnly($importOnly); - $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); - $transport->addResponse($expectedResponse); - // Mock request - $cryptoKey = new CryptoKey(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateCryptoKey($cryptoKey, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKey', $actualFuncCall); - $actualValue = $actualRequestObject->getCryptoKey(); - $this->assertProtobufEquals($cryptoKey, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCryptoKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $cryptoKey = new CryptoKey(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateCryptoKey($cryptoKey, $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()); - } - - /** @test */ - public function updateCryptoKeyPrimaryVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $importOnly = true; - $cryptoKeyBackend = 'cryptoKeyBackend-1526615498'; - $expectedResponse = new CryptoKey(); - $expectedResponse->setName($name2); - $expectedResponse->setImportOnly($importOnly); - $expectedResponse->setCryptoKeyBackend($cryptoKeyBackend); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $cryptoKeyVersionId = 'cryptoKeyVersionId729489152'; - $response = $gapicClient->updateCryptoKeyPrimaryVersion($formattedName, $cryptoKeyVersionId); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyPrimaryVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getCryptoKeyVersionId(); - $this->assertProtobufEquals($cryptoKeyVersionId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCryptoKeyPrimaryVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cryptoKeyName('[PROJECT]', '[LOCATION]', '[KEY_RING]', '[CRYPTO_KEY]'); - $cryptoKeyVersionId = 'cryptoKeyVersionId729489152'; - try { - $gapicClient->updateCryptoKeyPrimaryVersion($formattedName, $cryptoKeyVersionId); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCryptoKeyVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $importJob = 'importJob2125587491'; - $importFailureReason = 'importFailureReason-494073229'; - $reimportEligible = true; - $expectedResponse = new CryptoKeyVersion(); - $expectedResponse->setName($name); - $expectedResponse->setImportJob($importJob); - $expectedResponse->setImportFailureReason($importFailureReason); - $expectedResponse->setReimportEligible($reimportEligible); - $transport->addResponse($expectedResponse); - // Mock request - $cryptoKeyVersion = new CryptoKeyVersion(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateCryptoKeyVersion($cryptoKeyVersion, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.kms.v1.KeyManagementService/UpdateCryptoKeyVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getCryptoKeyVersion(); - $this->assertProtobufEquals($cryptoKeyVersion, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCryptoKeyVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $cryptoKeyVersion = new CryptoKeyVersion(); - $updateMask = new FieldMask(); - try { - $gapicClient->updateCryptoKeyVersion($cryptoKeyVersion, $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()); - } - - /** @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); - $response = $gapicClient->getLocation(); - $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); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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); - $response = $gapicClient->listLocations(); - $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); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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'; - $response = $gapicClient->getIamPolicy($resource); - $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'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $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(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $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 = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->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/Language/v1/proto/src/GPBMetadata/Google/Cloud/Language/V1/LanguageService.php b/owl-bot-staging/Language/v1/proto/src/GPBMetadata/Google/Cloud/Language/V1/LanguageService.php deleted file mode 100644 index 35a8aa915bc23fbffa64302469965aea000ca635..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9584 zcmd5?&2Jmm5f4dyP){FTufG(fiJ7$%%Z^Q1bmBO2oOneprM1c3&2mXAt_osBtz;q; zmnBz@l_Dt6dx5q=4?XqJUJ4Xwk1fz!dnl4y3-l25kVAp~1qFI*fAiihMarT~89`HB z^!RpW-pst2-@G@w@4nx9)M6J>D_+xUyMecv+Sp44kGxc??FW9%Z=^PMx3;`?s^;&s z>J6`*PNi~Y$}pXjmeZYA!P@b6+cj?~we9=c4R4{=@OL*C8g6rY*WLCO9xrys)sEMG zT(5a)E}OBYyW@3QZp}-rSj$B(a5vq+U0>m1*0UsLy%367uPokXtk!Tlom4be64KcB zSPFlw-Hk@Qmg)pV?F0}YVCR}@Y@zhmzK7@pzBSVnZFz^OXBKV zsd=H}($Z5(-bn@RU9WfbRI2R-yY1#}t~Uwzv^!cq#A|A+zOFW#K6$}!c9xd*ZQ2(x zh%wu!d(Gf@Jo&oU*j)A=xsU69`*2q7!E5i;Lw~88n_c(h5mED9gUGx~>@$rm95a;U zS;3Izv6qfwFa3CN?p!F!ZPgK(WS@w>x$`{_w#bO;Mref~Q2rQW$(&!?-2spM78?on zTHb6d6`P;QtY1nGS}+~4q#e-9C)s$-hvCg&HV)Q_)feO!*@^91ry5RIciZ*ZMEFQz z$w>Fv5t>tOvJo!lG?SbUEv;HMN|u(@^SYLkUXW)PvkIziR2^;2kz#U^jjTGwf)rm) zvN4gCO2CpOEbk$%G7SA{l3!O-uOF<3I3SLPPjbiZ1YEb)=I7rJJejXri8 zyPk-YrTDFw^7~l0|C4OIY}_}@2L`sCu`x@tOQwM>pJK^^nN=Mfzv3`+%CuKhLw_h{ z67mEa)he3dNF(wIHu=D`?^n%yRka;y6u~*2HH}iasM*yO)67X@L~c5(nk|i!ENj&? zw5m}qE@Ngwh7xKnXKSUB#3o z?V##!RXZ)ut33*1@AbjkZh_w1DsgIAWhXYhme<_GhVNCq&25k8*kopYuz*~bK?A*v z-Dr3_J8qbW*Vsfiy5YEq9d{emVs}&QR-DK?HNP#^i7US#@AYc*HcJHVc8DKW25ZsF zly=;0`3@U%;e(n;znRRnA$e8KgfJhexgDX_Oy-RtnX_Oa)-Aui!yPa@YaT45^fr0F zjntw%A697;1~AdeJHEd;OQ|*d%0;ly%FW%K4XiwVtd$MUMC>iE-SL~V$z!owoQboy zeMp#{I37D^l2_Pd+pE=aJgNaXXBn4~8FJ6;eNOo{8wKKH+b6k*t3!%#h=-UT`#7e} zP92N6LOjY3V=O^o+XqDJ0#NZmMM@Bi0E6xUo-mcu2$nEqm}LWKgef2k zun1F@4TMY5lm+mb;7C(8vW|eFie@hZibh#%P2wn|=JWa*P{?FsVJ66IMy2BEpom6D zN(EH2^O)2t8uUZf>cyU!IDsZsULnvUl7#YaKr&Ac&}P*VmE<02YBpOg0eiW$X*Qwe zNHbkUO%`xlvHOe(HN{$V1HXN{z?IS&?$EoxiW>Gf; zcar>VE*JC<${Kuwg)Kn5ki}?W%hoKjgbCAtut^!tu(fz%YMXe_Bb7AabHXLKGgiajapfMH>;hZfmy8r7b;xYB`|9J%0EM>G0z@(erKyFvW1urgnE$~NsZ zfr|>;6SN6Pl#)0uAs)I|fRH4pD3n8Nz?LktQI2@DnH3X9o*t!PxEetU#AMY76XJXc zHNujgCfUq^W5+C$9(nF&HK3CduCSZl6MkqIMQs^vxEo%BABAR)Isx~KOc#ht`PDcZ zJp3NdPAwJ8+PZA49eGb)Gigjt45|9r$+l;6OmUKc497!UAoLPl7!?;aLP2&)~tebii4=Bl^*EMs&ty>b)q;!qoQixm(G&3;sZ@OCk7R1mIj8l zBE3k88iq7SLJTXk`6W^tXJknE7Ae4oT*H?+Bg)e&94o{j`8<^%OG*(bAXs(OHGtTw zV%u$pe5a5^i#y^1>1C0I7sUwvdX3YXC5Lo+o&P|v)2^&v>i$B(oac#dYg98Yb8h6P zbR`^F(i?mk6wQKkl{BTQd5ui8N>Z9k{GhBFT%iS`w6mn!b$Y;us07j?e~?28OBoVD z3)~&CK;p~d78C|u&9-!4@gmi8*D58jIrtdE9ddA z?n_LxEW}Owh$CR%LgK>RckQR{#Bdi}1zPfU1w0nEE26UzEbi6sY_6ZV=x=%rv&9<$vc-~*7ppro#Zh-M^X}lI^I$pY$|4twZVyS!gc4~d zo?BujlsGrR#zXOQe~)1-9>{xaE@~;kE98&5*Qq{6%}0wPymywL&ls^nIx8Akp|>Hu zB7`dyHaqB8AgnZ4~SWMpL#b%_3F(8QWzjBiCX zKr2o8EXK~M=(p~D;&pH0w)fp#uM!PJHdG@!Y%g7Ak{)YW>}KE7a-=az106p4US}C-_x#BeiCD6 zdl!PVZ$5si-Js@rbDh3ctA7+@r=tMfYXYe8ocz7eXG`2r$ia3`l8r`9mzKb>pHl= zDC_I&bicZx2XiQTUHA`^<@&HoM1@rOTY{YmUn6;6lQ)Vix#hWdmxUY_h4AKJwGLT3 zoe#MOz&35;OlC;fp8FSG?nDCRvup-C-gaw2wZl_{*N~))yI3^eg&$HqDJyI)dU6QB zlPXC$#bzTK&b`-D0_f#VQa;0`!vNW<2B78r&ZPXTxS_V-Wajze=8HI?0e?RjZtVX! z^Ln9NyvlhtlpkJ3$%oHTMyVk^A@`@r7)Om`r^%IDY^wJ#ATAK-9=$-LvXj3hF4Y(< z-V~Q=3~ywlMCP}QojC9wTmEy5Nf9hk#L(+0dGV+uIrK0zcSOVZpm-ba-|3{H6o2s7 ze|#3dpu9rw>!XnFEV&2HTT8JkU#e%L=T~vG*grUZsdmp`@}FYtM7Wj~7H;_n_Z}b( zv3Ks-wnxIdb`-cBit_TIc0}aEn(@_v6T@Ej)Fi+C%zfdD?Q=v%-8w#FxJM;!+hyhA zVB7YW8`i`>;HDWx1;;-5h*zt9gpolD&ornMo;yN2?r}R(%1ejZA&7@n|K~Au;YE?< zWm`VtO;ayjr2G-a_LGOYU+21?SLXV4k6@f?C0Bhv6+VZCy@-31hP`w{XxL94YWVHL zHFSGGpKEx&o5fLCKA6rYpQ4!ipjDSu~Ruq~fHfT#RJ9V_CLC?Q^x)ac2@qH diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesRequest.php deleted file mode 100644 index 9896cc452301..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.language.v1.AnalyzeEntitiesRequest - */ -class AnalyzeEntitiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesResponse.php deleted file mode 100644 index 963741329c42..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitiesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.language.v1.AnalyzeEntitiesResponse - */ -class AnalyzeEntitiesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The recognized entities in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; - */ - private $entities; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - */ - protected $language = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * The recognized entities in the input document. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The recognized entities in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * The recognized entities in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; - * @param array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentRequest.php deleted file mode 100644 index 01c5d0978b01..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.language.v1.AnalyzeEntitySentimentRequest - */ -class AnalyzeEntitySentimentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentResponse.php deleted file mode 100644 index 574aed78b8c7..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeEntitySentimentResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.language.v1.AnalyzeEntitySentimentResponse - */ -class AnalyzeEntitySentimentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The recognized entities in the input document with associated sentiments. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; - */ - private $entities; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - */ - protected $language = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * The recognized entities in the input document with associated sentiments. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The recognized entities in the input document with associated sentiments. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * The recognized entities in the input document with associated sentiments. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 1; - * @param array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentRequest.php deleted file mode 100644 index 314a41ef2423..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.language.v1.AnalyzeSentimentRequest - */ -class AnalyzeSentimentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate sentence offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate sentence offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate sentence offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate sentence offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentResponse.php deleted file mode 100644 index b901a7a3a44e..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSentimentResponse.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.language.v1.AnalyzeSentimentResponse - */ -class AnalyzeSentimentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The overall sentiment of the input document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 1; - */ - protected $document_sentiment = null; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - */ - protected $language = ''; - /** - * The sentiment for all the sentences in the document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 3; - */ - private $sentences; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\Sentiment $document_sentiment - * The overall sentiment of the input document. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * @type array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences - * The sentiment for all the sentences in the document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The overall sentiment of the input document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 1; - * @return \Google\Cloud\Language\V1\Sentiment|null - */ - public function getDocumentSentiment() - { - return $this->document_sentiment; - } - - public function hasDocumentSentiment() - { - return isset($this->document_sentiment); - } - - public function clearDocumentSentiment() - { - unset($this->document_sentiment); - } - - /** - * The overall sentiment of the input document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 1; - * @param \Google\Cloud\Language\V1\Sentiment $var - * @return $this - */ - public function setDocumentSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Sentiment::class); - $this->document_sentiment = $var; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - - /** - * The sentiment for all the sentences in the document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSentences() - { - return $this->sentences; - } - - /** - * The sentiment for all the sentences in the document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 3; - * @param array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSentences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Sentence::class); - $this->sentences = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxRequest.php deleted file mode 100644 index 905be9e6b840..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.language.v1.AnalyzeSyntaxRequest - */ -class AnalyzeSyntaxRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxResponse.php deleted file mode 100644 index e9c06d2073d5..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnalyzeSyntaxResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.language.v1.AnalyzeSyntaxResponse - */ -class AnalyzeSyntaxResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Sentences in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; - */ - private $sentences; - /** - * Tokens, along with their syntactic information, in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; - */ - private $tokens; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * - * Generated from protobuf field string language = 3; - */ - protected $language = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences - * Sentences in the input document. - * @type array<\Google\Cloud\Language\V1\Token>|\Google\Protobuf\Internal\RepeatedField $tokens - * Tokens, along with their syntactic information, in the input document. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Sentences in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSentences() - { - return $this->sentences; - } - - /** - * Sentences in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; - * @param array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSentences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Sentence::class); - $this->sentences = $arr; - - return $this; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTokens() - { - return $this->tokens; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; - * @param array<\Google\Cloud\Language\V1\Token>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTokens($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Token::class); - $this->tokens = $arr; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * - * Generated from protobuf field string language = 3; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * - * Generated from protobuf field string language = 3; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest.php deleted file mode 100644 index 090940444ecd..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.language.v1.AnnotateTextRequest - */ -class AnnotateTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * Required. The enabled features. - * - * Generated from protobuf field .google.cloud.language.v1.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $features = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 3; - */ - protected $encoding_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\Document $document - * Required. Input document. - * @type \Google\Cloud\Language\V1\AnnotateTextRequest\Features $features - * Required. The enabled features. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * Required. The enabled features. - * - * Generated from protobuf field .google.cloud.language.v1.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1\AnnotateTextRequest\Features|null - */ - public function getFeatures() - { - return $this->features; - } - - public function hasFeatures() - { - return isset($this->features); - } - - public function clearFeatures() - { - unset($this->features); - } - - /** - * Required. The enabled features. - * - * Generated from protobuf field .google.cloud.language.v1.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1\AnnotateTextRequest\Features $var - * @return $this - */ - public function setFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\AnnotateTextRequest\Features::class); - $this->features = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 3; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1.EncodingType encoding_type = 3; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest/Features.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest/Features.php deleted file mode 100644 index a22187d595ae..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest/Features.php +++ /dev/null @@ -1,255 +0,0 @@ -google.cloud.language.v1.AnnotateTextRequest.Features - */ -class Features extends \Google\Protobuf\Internal\Message -{ - /** - * Extract syntax information. - * - * Generated from protobuf field bool extract_syntax = 1; - */ - protected $extract_syntax = false; - /** - * Extract entities. - * - * Generated from protobuf field bool extract_entities = 2; - */ - protected $extract_entities = false; - /** - * Extract document-level sentiment. - * - * Generated from protobuf field bool extract_document_sentiment = 3; - */ - protected $extract_document_sentiment = false; - /** - * Extract entities and their associated sentiment. - * - * Generated from protobuf field bool extract_entity_sentiment = 4; - */ - protected $extract_entity_sentiment = false; - /** - * Classify the full document into categories. - * - * Generated from protobuf field bool classify_text = 6; - */ - protected $classify_text = false; - /** - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10; - */ - protected $classification_model_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $extract_syntax - * Extract syntax information. - * @type bool $extract_entities - * Extract entities. - * @type bool $extract_document_sentiment - * Extract document-level sentiment. - * @type bool $extract_entity_sentiment - * Extract entities and their associated sentiment. - * @type bool $classify_text - * Classify the full document into categories. - * @type \Google\Cloud\Language\V1\ClassificationModelOptions $classification_model_options - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Extract syntax information. - * - * Generated from protobuf field bool extract_syntax = 1; - * @return bool - */ - public function getExtractSyntax() - { - return $this->extract_syntax; - } - - /** - * Extract syntax information. - * - * Generated from protobuf field bool extract_syntax = 1; - * @param bool $var - * @return $this - */ - public function setExtractSyntax($var) - { - GPBUtil::checkBool($var); - $this->extract_syntax = $var; - - return $this; - } - - /** - * Extract entities. - * - * Generated from protobuf field bool extract_entities = 2; - * @return bool - */ - public function getExtractEntities() - { - return $this->extract_entities; - } - - /** - * Extract entities. - * - * Generated from protobuf field bool extract_entities = 2; - * @param bool $var - * @return $this - */ - public function setExtractEntities($var) - { - GPBUtil::checkBool($var); - $this->extract_entities = $var; - - return $this; - } - - /** - * Extract document-level sentiment. - * - * Generated from protobuf field bool extract_document_sentiment = 3; - * @return bool - */ - public function getExtractDocumentSentiment() - { - return $this->extract_document_sentiment; - } - - /** - * Extract document-level sentiment. - * - * Generated from protobuf field bool extract_document_sentiment = 3; - * @param bool $var - * @return $this - */ - public function setExtractDocumentSentiment($var) - { - GPBUtil::checkBool($var); - $this->extract_document_sentiment = $var; - - return $this; - } - - /** - * Extract entities and their associated sentiment. - * - * Generated from protobuf field bool extract_entity_sentiment = 4; - * @return bool - */ - public function getExtractEntitySentiment() - { - return $this->extract_entity_sentiment; - } - - /** - * Extract entities and their associated sentiment. - * - * Generated from protobuf field bool extract_entity_sentiment = 4; - * @param bool $var - * @return $this - */ - public function setExtractEntitySentiment($var) - { - GPBUtil::checkBool($var); - $this->extract_entity_sentiment = $var; - - return $this; - } - - /** - * Classify the full document into categories. - * - * Generated from protobuf field bool classify_text = 6; - * @return bool - */ - public function getClassifyText() - { - return $this->classify_text; - } - - /** - * Classify the full document into categories. - * - * Generated from protobuf field bool classify_text = 6; - * @param bool $var - * @return $this - */ - public function setClassifyText($var) - { - GPBUtil::checkBool($var); - $this->classify_text = $var; - - return $this; - } - - /** - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10; - * @return \Google\Cloud\Language\V1\ClassificationModelOptions|null - */ - public function getClassificationModelOptions() - { - return $this->classification_model_options; - } - - public function hasClassificationModelOptions() - { - return isset($this->classification_model_options); - } - - public function clearClassificationModelOptions() - { - unset($this->classification_model_options); - } - - /** - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 10; - * @param \Google\Cloud\Language\V1\ClassificationModelOptions $var - * @return $this - */ - public function setClassificationModelOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\ClassificationModelOptions::class); - $this->classification_model_options = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Features::class, \Google\Cloud\Language\V1\AnnotateTextRequest_Features::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest_Features.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest_Features.php deleted file mode 100644 index e02aca7493ec..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/AnnotateTextRequest_Features.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.language.v1.AnnotateTextResponse - */ -class AnnotateTextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; - */ - private $sentences; - /** - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; - */ - private $tokens; - /** - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 3; - */ - private $entities; - /** - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 4; - */ - protected $document_sentiment = null; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * - * Generated from protobuf field string language = 5; - */ - protected $language = ''; - /** - * Categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 6; - */ - private $categories; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * @type array<\Google\Cloud\Language\V1\Token>|\Google\Protobuf\Internal\RepeatedField $tokens - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * @type array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities]. - * @type \Google\Cloud\Language\V1\Sentiment $document_sentiment - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * @type array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $categories - * Categories identified in the input document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSentences() - { - return $this->sentences; - } - - /** - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Sentence sentences = 1; - * @param array<\Google\Cloud\Language\V1\Sentence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSentences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Sentence::class); - $this->sentences = $arr; - - return $this; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTokens() - { - return $this->tokens; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Token tokens = 2; - * @param array<\Google\Cloud\Language\V1\Token>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTokens($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Token::class); - $this->tokens = $arr; - - return $this; - } - - /** - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entities]. - * - * Generated from protobuf field repeated .google.cloud.language.v1.Entity entities = 3; - * @param array<\Google\Cloud\Language\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 4; - * @return \Google\Cloud\Language\V1\Sentiment|null - */ - public function getDocumentSentiment() - { - return $this->document_sentiment; - } - - public function hasDocumentSentiment() - { - return isset($this->document_sentiment); - } - - public function clearDocumentSentiment() - { - unset($this->document_sentiment); - } - - /** - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment document_sentiment = 4; - * @param \Google\Cloud\Language\V1\Sentiment $var - * @return $this - */ - public function setDocumentSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Sentiment::class); - $this->document_sentiment = $var; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * - * Generated from protobuf field string language = 5; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1.Document.language] field for more details. - * - * Generated from protobuf field string language = 5; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - - /** - * Categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * Categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 6; - * @param array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\ClassificationCategory::class); - $this->categories = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationCategory.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationCategory.php deleted file mode 100644 index 48536b20188e..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationCategory.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.language.v1.ClassificationCategory - */ -class ClassificationCategory extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the category representing the document, from the [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the category representing the document, from the [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * @type float $confidence - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the category representing the document, from the [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the category representing the document, from the [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * - * 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 classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions.php deleted file mode 100644 index dc546f8a8822..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.language.v1.ClassificationModelOptions - */ -class ClassificationModelOptions extends \Google\Protobuf\Internal\Message -{ - protected $model_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\ClassificationModelOptions\V1Model $v1_model - * Setting this field will use the V1 model and V1 content categories - * version. The V1 model is a legacy model; support for this will be - * discontinued in the future. - * @type \Google\Cloud\Language\V1\ClassificationModelOptions\V2Model $v2_model - * Setting this field will use the V2 model with the appropriate content - * categories version. The V2 model is a better performing model. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Setting this field will use the V1 model and V1 content categories - * version. The V1 model is a legacy model; support for this will be - * discontinued in the future. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V1Model v1_model = 1; - * @return \Google\Cloud\Language\V1\ClassificationModelOptions\V1Model|null - */ - public function getV1Model() - { - return $this->readOneof(1); - } - - public function hasV1Model() - { - return $this->hasOneof(1); - } - - /** - * Setting this field will use the V1 model and V1 content categories - * version. The V1 model is a legacy model; support for this will be - * discontinued in the future. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V1Model v1_model = 1; - * @param \Google\Cloud\Language\V1\ClassificationModelOptions\V1Model $var - * @return $this - */ - public function setV1Model($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\ClassificationModelOptions\V1Model::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Setting this field will use the V2 model with the appropriate content - * categories version. The V2 model is a better performing model. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V2Model v2_model = 2; - * @return \Google\Cloud\Language\V1\ClassificationModelOptions\V2Model|null - */ - public function getV2Model() - { - return $this->readOneof(2); - } - - public function hasV2Model() - { - return $this->hasOneof(2); - } - - /** - * Setting this field will use the V2 model with the appropriate content - * categories version. The V2 model is a better performing model. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V2Model v2_model = 2; - * @param \Google\Cloud\Language\V1\ClassificationModelOptions\V2Model $var - * @return $this - */ - public function setV2Model($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\ClassificationModelOptions\V2Model::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getModelType() - { - return $this->whichOneof("model_type"); - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V1Model.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V1Model.php deleted file mode 100644 index e6ac49f77646..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V1Model.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.language.v1.ClassificationModelOptions.V1Model - */ -class V1Model extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(V1Model::class, \Google\Cloud\Language\V1\ClassificationModelOptions_V1Model::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model.php deleted file mode 100644 index d4bbc1b08794..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.language.v1.ClassificationModelOptions.V2Model - */ -class V2Model extends \Google\Protobuf\Internal\Message -{ - /** - * The content categories used for classification. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; - */ - protected $content_categories_version = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $content_categories_version - * The content categories used for classification. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The content categories used for classification. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; - * @return int - */ - public function getContentCategoriesVersion() - { - return $this->content_categories_version; - } - - /** - * The content categories used for classification. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; - * @param int $var - * @return $this - */ - public function setContentCategoriesVersion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\ClassificationModelOptions\V2Model\ContentCategoriesVersion::class); - $this->content_categories_version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(V2Model::class, \Google\Cloud\Language\V1\ClassificationModelOptions_V2Model::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php deleted file mode 100644 index 5c9434822a5b..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.language.v1.ClassificationModelOptions.V2Model.ContentCategoriesVersion - */ -class ContentCategoriesVersion -{ - /** - * If `ContentCategoriesVersion` is not specified, this option will - * default to `V1`. - * - * Generated from protobuf enum CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0; - */ - const CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0; - /** - * Legacy content categories of our initial launch in 2017. - * - * Generated from protobuf enum V1 = 1; - */ - const V1 = 1; - /** - * Updated content categories in 2022. - * - * Generated from protobuf enum V2 = 2; - */ - const V2 = 2; - - private static $valueToName = [ - self::CONTENT_CATEGORIES_VERSION_UNSPECIFIED => 'CONTENT_CATEGORIES_VERSION_UNSPECIFIED', - self::V1 => 'V1', - self::V2 => '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(ContentCategoriesVersion::class, \Google\Cloud\Language\V1\ClassificationModelOptions_V2Model_ContentCategoriesVersion::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions_V1Model.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions_V1Model.php deleted file mode 100644 index b1b22eddc453..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassificationModelOptions_V1Model.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.language.v1.ClassifyTextRequest - */ -class ClassifyTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * Model options to use for classification. Defaults to v1 options if not - * specified. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 3; - */ - protected $classification_model_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\Document $document - * Required. Input document. - * @type \Google\Cloud\Language\V1\ClassificationModelOptions $classification_model_options - * Model options to use for classification. Defaults to v1 options if not - * specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * Model options to use for classification. Defaults to v1 options if not - * specified. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 3; - * @return \Google\Cloud\Language\V1\ClassificationModelOptions|null - */ - public function getClassificationModelOptions() - { - return $this->classification_model_options; - } - - public function hasClassificationModelOptions() - { - return isset($this->classification_model_options); - } - - public function clearClassificationModelOptions() - { - unset($this->classification_model_options); - } - - /** - * Model options to use for classification. Defaults to v1 options if not - * specified. - * - * Generated from protobuf field .google.cloud.language.v1.ClassificationModelOptions classification_model_options = 3; - * @param \Google\Cloud\Language\V1\ClassificationModelOptions $var - * @return $this - */ - public function setClassificationModelOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\ClassificationModelOptions::class); - $this->classification_model_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextResponse.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextResponse.php deleted file mode 100644 index 3ace816bfb6e..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/ClassifyTextResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.language.v1.ClassifyTextResponse - */ -class ClassifyTextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 1; - */ - private $categories; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $categories - * Categories representing the input document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * Categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1.ClassificationCategory categories = 1; - * @param array<\Google\Cloud\Language\V1\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\ClassificationCategory::class); - $this->categories = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge.php deleted file mode 100644 index 87559c773111..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.language.v1.DependencyEdge - */ -class DependencyEdge extends \Google\Protobuf\Internal\Message -{ - /** - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * - * Generated from protobuf field int32 head_token_index = 1; - */ - protected $head_token_index = 0; - /** - * The parse label for the token. - * - * Generated from protobuf field .google.cloud.language.v1.DependencyEdge.Label label = 2; - */ - protected $label = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $head_token_index - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * @type int $label - * The parse label for the token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * - * Generated from protobuf field int32 head_token_index = 1; - * @return int - */ - public function getHeadTokenIndex() - { - return $this->head_token_index; - } - - /** - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * - * Generated from protobuf field int32 head_token_index = 1; - * @param int $var - * @return $this - */ - public function setHeadTokenIndex($var) - { - GPBUtil::checkInt32($var); - $this->head_token_index = $var; - - return $this; - } - - /** - * The parse label for the token. - * - * Generated from protobuf field .google.cloud.language.v1.DependencyEdge.Label label = 2; - * @return int - */ - public function getLabel() - { - return $this->label; - } - - /** - * The parse label for the token. - * - * Generated from protobuf field .google.cloud.language.v1.DependencyEdge.Label label = 2; - * @param int $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\DependencyEdge\Label::class); - $this->label = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge/Label.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge/Label.php deleted file mode 100644 index cd6d7039830c..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge/Label.php +++ /dev/null @@ -1,628 +0,0 @@ -google.cloud.language.v1.DependencyEdge.Label - */ -class Label -{ - /** - * Unknown - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Abbreviation modifier - * - * Generated from protobuf enum ABBREV = 1; - */ - const ABBREV = 1; - /** - * Adjectival complement - * - * Generated from protobuf enum ACOMP = 2; - */ - const ACOMP = 2; - /** - * Adverbial clause modifier - * - * Generated from protobuf enum ADVCL = 3; - */ - const ADVCL = 3; - /** - * Adverbial modifier - * - * Generated from protobuf enum ADVMOD = 4; - */ - const ADVMOD = 4; - /** - * Adjectival modifier of an NP - * - * Generated from protobuf enum AMOD = 5; - */ - const AMOD = 5; - /** - * Appositional modifier of an NP - * - * Generated from protobuf enum APPOS = 6; - */ - const APPOS = 6; - /** - * Attribute dependent of a copular verb - * - * Generated from protobuf enum ATTR = 7; - */ - const ATTR = 7; - /** - * Auxiliary (non-main) verb - * - * Generated from protobuf enum AUX = 8; - */ - const AUX = 8; - /** - * Passive auxiliary - * - * Generated from protobuf enum AUXPASS = 9; - */ - const AUXPASS = 9; - /** - * Coordinating conjunction - * - * Generated from protobuf enum CC = 10; - */ - const CC = 10; - /** - * Clausal complement of a verb or adjective - * - * Generated from protobuf enum CCOMP = 11; - */ - const CCOMP = 11; - /** - * Conjunct - * - * Generated from protobuf enum CONJ = 12; - */ - const CONJ = 12; - /** - * Clausal subject - * - * Generated from protobuf enum CSUBJ = 13; - */ - const CSUBJ = 13; - /** - * Clausal passive subject - * - * Generated from protobuf enum CSUBJPASS = 14; - */ - const CSUBJPASS = 14; - /** - * Dependency (unable to determine) - * - * Generated from protobuf enum DEP = 15; - */ - const DEP = 15; - /** - * Determiner - * - * Generated from protobuf enum DET = 16; - */ - const DET = 16; - /** - * Discourse - * - * Generated from protobuf enum DISCOURSE = 17; - */ - const DISCOURSE = 17; - /** - * Direct object - * - * Generated from protobuf enum DOBJ = 18; - */ - const DOBJ = 18; - /** - * Expletive - * - * Generated from protobuf enum EXPL = 19; - */ - const EXPL = 19; - /** - * Goes with (part of a word in a text not well edited) - * - * Generated from protobuf enum GOESWITH = 20; - */ - const GOESWITH = 20; - /** - * Indirect object - * - * Generated from protobuf enum IOBJ = 21; - */ - const IOBJ = 21; - /** - * Marker (word introducing a subordinate clause) - * - * Generated from protobuf enum MARK = 22; - */ - const MARK = 22; - /** - * Multi-word expression - * - * Generated from protobuf enum MWE = 23; - */ - const MWE = 23; - /** - * Multi-word verbal expression - * - * Generated from protobuf enum MWV = 24; - */ - const MWV = 24; - /** - * Negation modifier - * - * Generated from protobuf enum NEG = 25; - */ - const NEG = 25; - /** - * Noun compound modifier - * - * Generated from protobuf enum NN = 26; - */ - const NN = 26; - /** - * Noun phrase used as an adverbial modifier - * - * Generated from protobuf enum NPADVMOD = 27; - */ - const NPADVMOD = 27; - /** - * Nominal subject - * - * Generated from protobuf enum NSUBJ = 28; - */ - const NSUBJ = 28; - /** - * Passive nominal subject - * - * Generated from protobuf enum NSUBJPASS = 29; - */ - const NSUBJPASS = 29; - /** - * Numeric modifier of a noun - * - * Generated from protobuf enum NUM = 30; - */ - const NUM = 30; - /** - * Element of compound number - * - * Generated from protobuf enum NUMBER = 31; - */ - const NUMBER = 31; - /** - * Punctuation mark - * - * Generated from protobuf enum P = 32; - */ - const P = 32; - /** - * Parataxis relation - * - * Generated from protobuf enum PARATAXIS = 33; - */ - const PARATAXIS = 33; - /** - * Participial modifier - * - * Generated from protobuf enum PARTMOD = 34; - */ - const PARTMOD = 34; - /** - * The complement of a preposition is a clause - * - * Generated from protobuf enum PCOMP = 35; - */ - const PCOMP = 35; - /** - * Object of a preposition - * - * Generated from protobuf enum POBJ = 36; - */ - const POBJ = 36; - /** - * Possession modifier - * - * Generated from protobuf enum POSS = 37; - */ - const POSS = 37; - /** - * Postverbal negative particle - * - * Generated from protobuf enum POSTNEG = 38; - */ - const POSTNEG = 38; - /** - * Predicate complement - * - * Generated from protobuf enum PRECOMP = 39; - */ - const PRECOMP = 39; - /** - * Preconjunt - * - * Generated from protobuf enum PRECONJ = 40; - */ - const PRECONJ = 40; - /** - * Predeterminer - * - * Generated from protobuf enum PREDET = 41; - */ - const PREDET = 41; - /** - * Prefix - * - * Generated from protobuf enum PREF = 42; - */ - const PREF = 42; - /** - * Prepositional modifier - * - * Generated from protobuf enum PREP = 43; - */ - const PREP = 43; - /** - * The relationship between a verb and verbal morpheme - * - * Generated from protobuf enum PRONL = 44; - */ - const PRONL = 44; - /** - * Particle - * - * Generated from protobuf enum PRT = 45; - */ - const PRT = 45; - /** - * Associative or possessive marker - * - * Generated from protobuf enum PS = 46; - */ - const PS = 46; - /** - * Quantifier phrase modifier - * - * Generated from protobuf enum QUANTMOD = 47; - */ - const QUANTMOD = 47; - /** - * Relative clause modifier - * - * Generated from protobuf enum RCMOD = 48; - */ - const RCMOD = 48; - /** - * Complementizer in relative clause - * - * Generated from protobuf enum RCMODREL = 49; - */ - const RCMODREL = 49; - /** - * Ellipsis without a preceding predicate - * - * Generated from protobuf enum RDROP = 50; - */ - const RDROP = 50; - /** - * Referent - * - * Generated from protobuf enum REF = 51; - */ - const REF = 51; - /** - * Remnant - * - * Generated from protobuf enum REMNANT = 52; - */ - const REMNANT = 52; - /** - * Reparandum - * - * Generated from protobuf enum REPARANDUM = 53; - */ - const REPARANDUM = 53; - /** - * Root - * - * Generated from protobuf enum ROOT = 54; - */ - const ROOT = 54; - /** - * Suffix specifying a unit of number - * - * Generated from protobuf enum SNUM = 55; - */ - const SNUM = 55; - /** - * Suffix - * - * Generated from protobuf enum SUFF = 56; - */ - const SUFF = 56; - /** - * Temporal modifier - * - * Generated from protobuf enum TMOD = 57; - */ - const TMOD = 57; - /** - * Topic marker - * - * Generated from protobuf enum TOPIC = 58; - */ - const TOPIC = 58; - /** - * Clause headed by an infinite form of the verb that modifies a noun - * - * Generated from protobuf enum VMOD = 59; - */ - const VMOD = 59; - /** - * Vocative - * - * Generated from protobuf enum VOCATIVE = 60; - */ - const VOCATIVE = 60; - /** - * Open clausal complement - * - * Generated from protobuf enum XCOMP = 61; - */ - const XCOMP = 61; - /** - * Name suffix - * - * Generated from protobuf enum SUFFIX = 62; - */ - const SUFFIX = 62; - /** - * Name title - * - * Generated from protobuf enum TITLE = 63; - */ - const TITLE = 63; - /** - * Adverbial phrase modifier - * - * Generated from protobuf enum ADVPHMOD = 64; - */ - const ADVPHMOD = 64; - /** - * Causative auxiliary - * - * Generated from protobuf enum AUXCAUS = 65; - */ - const AUXCAUS = 65; - /** - * Helper auxiliary - * - * Generated from protobuf enum AUXVV = 66; - */ - const AUXVV = 66; - /** - * Rentaishi (Prenominal modifier) - * - * Generated from protobuf enum DTMOD = 67; - */ - const DTMOD = 67; - /** - * Foreign words - * - * Generated from protobuf enum FOREIGN = 68; - */ - const FOREIGN = 68; - /** - * Keyword - * - * Generated from protobuf enum KW = 69; - */ - const KW = 69; - /** - * List for chains of comparable items - * - * Generated from protobuf enum LIST = 70; - */ - const PBLIST = 70; - /** - * Nominalized clause - * - * Generated from protobuf enum NOMC = 71; - */ - const NOMC = 71; - /** - * Nominalized clausal subject - * - * Generated from protobuf enum NOMCSUBJ = 72; - */ - const NOMCSUBJ = 72; - /** - * Nominalized clausal passive - * - * Generated from protobuf enum NOMCSUBJPASS = 73; - */ - const NOMCSUBJPASS = 73; - /** - * Compound of numeric modifier - * - * Generated from protobuf enum NUMC = 74; - */ - const NUMC = 74; - /** - * Copula - * - * Generated from protobuf enum COP = 75; - */ - const COP = 75; - /** - * Dislocated relation (for fronted/topicalized elements) - * - * Generated from protobuf enum DISLOCATED = 76; - */ - const DISLOCATED = 76; - /** - * Aspect marker - * - * Generated from protobuf enum ASP = 77; - */ - const ASP = 77; - /** - * Genitive modifier - * - * Generated from protobuf enum GMOD = 78; - */ - const GMOD = 78; - /** - * Genitive object - * - * Generated from protobuf enum GOBJ = 79; - */ - const GOBJ = 79; - /** - * Infinitival modifier - * - * Generated from protobuf enum INFMOD = 80; - */ - const INFMOD = 80; - /** - * Measure - * - * Generated from protobuf enum MES = 81; - */ - const MES = 81; - /** - * Nominal complement of a noun - * - * Generated from protobuf enum NCOMP = 82; - */ - const NCOMP = 82; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::ABBREV => 'ABBREV', - self::ACOMP => 'ACOMP', - self::ADVCL => 'ADVCL', - self::ADVMOD => 'ADVMOD', - self::AMOD => 'AMOD', - self::APPOS => 'APPOS', - self::ATTR => 'ATTR', - self::AUX => 'AUX', - self::AUXPASS => 'AUXPASS', - self::CC => 'CC', - self::CCOMP => 'CCOMP', - self::CONJ => 'CONJ', - self::CSUBJ => 'CSUBJ', - self::CSUBJPASS => 'CSUBJPASS', - self::DEP => 'DEP', - self::DET => 'DET', - self::DISCOURSE => 'DISCOURSE', - self::DOBJ => 'DOBJ', - self::EXPL => 'EXPL', - self::GOESWITH => 'GOESWITH', - self::IOBJ => 'IOBJ', - self::MARK => 'MARK', - self::MWE => 'MWE', - self::MWV => 'MWV', - self::NEG => 'NEG', - self::NN => 'NN', - self::NPADVMOD => 'NPADVMOD', - self::NSUBJ => 'NSUBJ', - self::NSUBJPASS => 'NSUBJPASS', - self::NUM => 'NUM', - self::NUMBER => 'NUMBER', - self::P => 'P', - self::PARATAXIS => 'PARATAXIS', - self::PARTMOD => 'PARTMOD', - self::PCOMP => 'PCOMP', - self::POBJ => 'POBJ', - self::POSS => 'POSS', - self::POSTNEG => 'POSTNEG', - self::PRECOMP => 'PRECOMP', - self::PRECONJ => 'PRECONJ', - self::PREDET => 'PREDET', - self::PREF => 'PREF', - self::PREP => 'PREP', - self::PRONL => 'PRONL', - self::PRT => 'PRT', - self::PS => 'PS', - self::QUANTMOD => 'QUANTMOD', - self::RCMOD => 'RCMOD', - self::RCMODREL => 'RCMODREL', - self::RDROP => 'RDROP', - self::REF => 'REF', - self::REMNANT => 'REMNANT', - self::REPARANDUM => 'REPARANDUM', - self::ROOT => 'ROOT', - self::SNUM => 'SNUM', - self::SUFF => 'SUFF', - self::TMOD => 'TMOD', - self::TOPIC => 'TOPIC', - self::VMOD => 'VMOD', - self::VOCATIVE => 'VOCATIVE', - self::XCOMP => 'XCOMP', - self::SUFFIX => 'SUFFIX', - self::TITLE => 'TITLE', - self::ADVPHMOD => 'ADVPHMOD', - self::AUXCAUS => 'AUXCAUS', - self::AUXVV => 'AUXVV', - self::DTMOD => 'DTMOD', - self::FOREIGN => 'FOREIGN', - self::KW => 'KW', - self::PBLIST => 'LIST', - self::NOMC => 'NOMC', - self::NOMCSUBJ => 'NOMCSUBJ', - self::NOMCSUBJPASS => 'NOMCSUBJPASS', - self::NUMC => 'NUMC', - self::COP => 'COP', - self::DISLOCATED => 'DISLOCATED', - self::ASP => 'ASP', - self::GMOD => 'GMOD', - self::GOBJ => 'GOBJ', - self::INFMOD => 'INFMOD', - self::MES => 'MES', - self::NCOMP => 'NCOMP', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has 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(Label::class, \Google\Cloud\Language\V1\DependencyEdge_Label::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge_Label.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge_Label.php deleted file mode 100644 index 4d8f234314ba..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/DependencyEdge_Label.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.language.v1.Document - */ -class Document extends \Google\Protobuf\Internal\Message -{ - /** - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field .google.cloud.language.v1.Document.Type type = 1; - */ - protected $type = 0; - /** - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string language = 4; - */ - protected $language = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * @type string $content - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * @type string $gcs_content_uri - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * @type string $language - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field .google.cloud.language.v1.Document.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field .google.cloud.language.v1.Document.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\Document\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * - * Generated from protobuf field string content = 2; - * @return string - */ - public function getContent() - { - return $this->readOneof(2); - } - - public function hasContent() - { - return $this->hasOneof(2); - } - - /** - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * - * 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; - } - - /** - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * - * Generated from protobuf field string gcs_content_uri = 3; - * @return string - */ - public function getGcsContentUri() - { - return $this->readOneof(3); - } - - public function hasGcsContentUri() - { - return $this->hasOneof(3); - } - - /** - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * - * Generated from protobuf field string gcs_content_uri = 3; - * @param string $var - * @return $this - */ - public function setGcsContentUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string language = 4; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string language = 4; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document/Type.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document/Type.php deleted file mode 100644 index 00069f59a85c..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.language.v1.Document.Type - */ -class Type -{ - /** - * The content type is not specified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Plain text - * - * Generated from protobuf enum PLAIN_TEXT = 1; - */ - const PLAIN_TEXT = 1; - /** - * HTML - * - * Generated from protobuf enum HTML = 2; - */ - const HTML = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::PLAIN_TEXT => 'PLAIN_TEXT', - self::HTML => 'HTML', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Language\V1\Document_Type::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document_Type.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document_Type.php deleted file mode 100644 index a28599b289b6..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Document_Type.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.language.v1.EncodingType - */ -class EncodingType -{ - /** - * If `EncodingType` is not specified, encoding-dependent information (such as - * `begin_offset`) will be set at `-1`. - * - * Generated from protobuf enum NONE = 0; - */ - const NONE = 0; - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-8 encoding of the input. C++ and Go are examples of languages - * that use this encoding natively. - * - * Generated from protobuf enum UTF8 = 1; - */ - const UTF8 = 1; - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-16 encoding of the input. Java and JavaScript are examples of - * languages that use this encoding natively. - * - * Generated from protobuf enum UTF16 = 2; - */ - const UTF16 = 2; - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-32 encoding of the input. Python is an example of a language - * that uses this encoding natively. - * - * Generated from protobuf enum UTF32 = 3; - */ - const UTF32 = 3; - - private static $valueToName = [ - self::NONE => 'NONE', - self::UTF8 => 'UTF8', - self::UTF16 => 'UTF16', - self::UTF32 => 'UTF32', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Language/v1/proto/src/Google/Cloud/Language/V1/Entity.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity.php deleted file mode 100644 index 648f8346f2b3..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity.php +++ /dev/null @@ -1,293 +0,0 @@ -google.cloud.language.v1.Entity - */ -class Entity extends \Google\Protobuf\Internal\Message -{ - /** - * The representative name for the entity. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The entity type. - * - * Generated from protobuf field .google.cloud.language.v1.Entity.Type type = 2; - */ - protected $type = 0; - /** - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - */ - private $metadata; - /** - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * Generated from protobuf field float salience = 4; - */ - protected $salience = 0.0; - /** - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * Generated from protobuf field repeated .google.cloud.language.v1.EntityMention mentions = 5; - */ - private $mentions; - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the aggregate sentiment expressed for this - * entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 6; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The representative name for the entity. - * @type int $type - * The entity type. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * @type float $salience - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * @type array<\Google\Cloud\Language\V1\EntityMention>|\Google\Protobuf\Internal\RepeatedField $mentions - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * @type \Google\Cloud\Language\V1\Sentiment $sentiment - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the aggregate sentiment expressed for this - * entity in the provided document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The representative name for the entity. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The representative name for the entity. - * - * 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 entity type. - * - * Generated from protobuf field .google.cloud.language.v1.Entity.Type type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The entity type. - * - * Generated from protobuf field .google.cloud.language.v1.Entity.Type type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\Entity\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * 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; - } - - /** - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * Generated from protobuf field float salience = 4; - * @return float - */ - public function getSalience() - { - return $this->salience; - } - - /** - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * Generated from protobuf field float salience = 4; - * @param float $var - * @return $this - */ - public function setSalience($var) - { - GPBUtil::checkFloat($var); - $this->salience = $var; - - return $this; - } - - /** - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * Generated from protobuf field repeated .google.cloud.language.v1.EntityMention mentions = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMentions() - { - return $this->mentions; - } - - /** - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * Generated from protobuf field repeated .google.cloud.language.v1.EntityMention mentions = 5; - * @param array<\Google\Cloud\Language\V1\EntityMention>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMentions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1\EntityMention::class); - $this->mentions = $arr; - - return $this; - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the aggregate sentiment expressed for this - * entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 6; - * @return \Google\Cloud\Language\V1\Sentiment|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the aggregate sentiment expressed for this - * entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 6; - * @param \Google\Cloud\Language\V1\Sentiment $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Sentiment::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity/Type.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity/Type.php deleted file mode 100644 index a54bb0c4b4fb..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Entity/Type.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.language.v1.Entity.Type - */ -class Type -{ - /** - * Unknown - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Person - * - * Generated from protobuf enum PERSON = 1; - */ - const PERSON = 1; - /** - * Location - * - * Generated from protobuf enum LOCATION = 2; - */ - const LOCATION = 2; - /** - * Organization - * - * Generated from protobuf enum ORGANIZATION = 3; - */ - const ORGANIZATION = 3; - /** - * Event - * - * Generated from protobuf enum EVENT = 4; - */ - const EVENT = 4; - /** - * Artwork - * - * Generated from protobuf enum WORK_OF_ART = 5; - */ - const WORK_OF_ART = 5; - /** - * Consumer product - * - * Generated from protobuf enum CONSUMER_GOOD = 6; - */ - const CONSUMER_GOOD = 6; - /** - * Other types of entities - * - * Generated from protobuf enum OTHER = 7; - */ - const OTHER = 7; - /** - * Phone number - * The metadata lists the phone number, formatted according to local - * convention, plus whichever additional elements appear in the text: - * * `number` - the actual number, broken down into sections as per local - * convention - * * `national_prefix` - country code, if detected - * * `area_code` - region or area code, if detected - * * `extension` - phone extension (to be dialed after connection), if - * detected - * - * Generated from protobuf enum PHONE_NUMBER = 9; - */ - const PHONE_NUMBER = 9; - /** - * Address - * The metadata identifies the street number and locality plus whichever - * additional elements appear in the text: - * * `street_number` - street number - * * `locality` - city or town - * * `street_name` - street/route name, if detected - * * `postal_code` - postal code, if detected - * * `country` - country, if detected< - * * `broad_region` - administrative area, such as the state, if detected - * * `narrow_region` - smaller administrative area, such as county, if - * detected - * * `sublocality` - used in Asian addresses to demark a district within a - * city, if detected - * - * Generated from protobuf enum ADDRESS = 10; - */ - const ADDRESS = 10; - /** - * Date - * The metadata identifies the components of the date: - * * `year` - four digit year, if detected - * * `month` - two digit month number, if detected - * * `day` - two digit day number, if detected - * - * Generated from protobuf enum DATE = 11; - */ - const DATE = 11; - /** - * Number - * The metadata is the number itself. - * - * Generated from protobuf enum NUMBER = 12; - */ - const NUMBER = 12; - /** - * Price - * The metadata identifies the `value` and `currency`. - * - * Generated from protobuf enum PRICE = 13; - */ - const PRICE = 13; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::PERSON => 'PERSON', - self::LOCATION => 'LOCATION', - self::ORGANIZATION => 'ORGANIZATION', - self::EVENT => 'EVENT', - self::WORK_OF_ART => 'WORK_OF_ART', - self::CONSUMER_GOOD => 'CONSUMER_GOOD', - self::OTHER => 'OTHER', - self::PHONE_NUMBER => 'PHONE_NUMBER', - self::ADDRESS => 'ADDRESS', - self::DATE => 'DATE', - self::NUMBER => 'NUMBER', - self::PRICE => 'PRICE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Language\V1\Entity_Type::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention.php deleted file mode 100644 index 38322b158136..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.language.v1.EntityMention - */ -class EntityMention extends \Google\Protobuf\Internal\Message -{ - /** - * The mention text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - */ - protected $text = null; - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.language.v1.EntityMention.Type type = 2; - */ - protected $type = 0; - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the sentiment expressed for this mention of - * the entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 3; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\TextSpan $text - * The mention text. - * @type int $type - * The type of the entity mention. - * @type \Google\Cloud\Language\V1\Sentiment $sentiment - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the sentiment expressed for this mention of - * the entity in the provided document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The mention text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - * @return \Google\Cloud\Language\V1\TextSpan|null - */ - public function getText() - { - return $this->text; - } - - public function hasText() - { - return isset($this->text); - } - - public function clearText() - { - unset($this->text); - } - - /** - * The mention text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - * @param \Google\Cloud\Language\V1\TextSpan $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\TextSpan::class); - $this->text = $var; - - return $this; - } - - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.language.v1.EntityMention.Type type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.language.v1.EntityMention.Type type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EntityMention\Type::class); - $this->type = $var; - - return $this; - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the sentiment expressed for this mention of - * the entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 3; - * @return \Google\Cloud\Language\V1\Sentiment|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the sentiment expressed for this mention of - * the entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 3; - * @param \Google\Cloud\Language\V1\Sentiment $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Sentiment::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention/Type.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention/Type.php deleted file mode 100644 index 2fd75a738dfd..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.language.v1.EntityMention.Type - */ -class Type -{ - /** - * Unknown - * - * Generated from protobuf enum TYPE_UNKNOWN = 0; - */ - const TYPE_UNKNOWN = 0; - /** - * Proper name - * - * Generated from protobuf enum PROPER = 1; - */ - const PROPER = 1; - /** - * Common noun (or noun compound) - * - * Generated from protobuf enum COMMON = 2; - */ - const COMMON = 2; - - private static $valueToName = [ - self::TYPE_UNKNOWN => 'TYPE_UNKNOWN', - self::PROPER => 'PROPER', - self::COMMON => 'COMMON', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Language\V1\EntityMention_Type::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention_Type.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention_Type.php deleted file mode 100644 index 187da39bbc0a..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/EntityMention_Type.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.language.v1.LanguageService/AnalyzeSentiment', - $argument, - ['\Google\Cloud\Language\V1\AnalyzeSentimentResponse', 'decode'], - $metadata, $options); - } - - /** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * @param \Google\Cloud\Language\V1\AnalyzeEntitiesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AnalyzeEntities(\Google\Cloud\Language\V1\AnalyzeEntitiesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.language.v1.LanguageService/AnalyzeEntities', - $argument, - ['\Google\Cloud\Language\V1\AnalyzeEntitiesResponse', 'decode'], - $metadata, $options); - } - - /** - * Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes - * sentiment associated with each entity and its mentions. - * @param \Google\Cloud\Language\V1\AnalyzeEntitySentimentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AnalyzeEntitySentiment(\Google\Cloud\Language\V1\AnalyzeEntitySentimentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.language.v1.LanguageService/AnalyzeEntitySentiment', - $argument, - ['\Google\Cloud\Language\V1\AnalyzeEntitySentimentResponse', 'decode'], - $metadata, $options); - } - - /** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part of speech tags, dependency trees, and other - * properties. - * @param \Google\Cloud\Language\V1\AnalyzeSyntaxRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AnalyzeSyntax(\Google\Cloud\Language\V1\AnalyzeSyntaxRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.language.v1.LanguageService/AnalyzeSyntax', - $argument, - ['\Google\Cloud\Language\V1\AnalyzeSyntaxResponse', 'decode'], - $metadata, $options); - } - - /** - * Classifies a document into categories. - * @param \Google\Cloud\Language\V1\ClassifyTextRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ClassifyText(\Google\Cloud\Language\V1\ClassifyTextRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.language.v1.LanguageService/ClassifyText', - $argument, - ['\Google\Cloud\Language\V1\ClassifyTextResponse', 'decode'], - $metadata, $options); - } - - /** - * A convenience method that provides all the features that analyzeSentiment, - * analyzeEntities, and analyzeSyntax provide in one call. - * @param \Google\Cloud\Language\V1\AnnotateTextRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AnnotateText(\Google\Cloud\Language\V1\AnnotateTextRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.language.v1.LanguageService/AnnotateText', - $argument, - ['\Google\Cloud\Language\V1\AnnotateTextResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech.php deleted file mode 100644 index 91ec89536ef9..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech.php +++ /dev/null @@ -1,443 +0,0 @@ -google.cloud.language.v1.PartOfSpeech - */ -class PartOfSpeech extends \Google\Protobuf\Internal\Message -{ - /** - * The part of speech tag. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tag tag = 1; - */ - protected $tag = 0; - /** - * The grammatical aspect. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Aspect aspect = 2; - */ - protected $aspect = 0; - /** - * The grammatical case. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Case case = 3; - */ - protected $case = 0; - /** - * The grammatical form. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Form form = 4; - */ - protected $form = 0; - /** - * The grammatical gender. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Gender gender = 5; - */ - protected $gender = 0; - /** - * The grammatical mood. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Mood mood = 6; - */ - protected $mood = 0; - /** - * The grammatical number. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Number number = 7; - */ - protected $number = 0; - /** - * The grammatical person. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Person person = 8; - */ - protected $person = 0; - /** - * The grammatical properness. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Proper proper = 9; - */ - protected $proper = 0; - /** - * The grammatical reciprocity. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Reciprocity reciprocity = 10; - */ - protected $reciprocity = 0; - /** - * The grammatical tense. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tense tense = 11; - */ - protected $tense = 0; - /** - * The grammatical voice. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Voice voice = 12; - */ - protected $voice = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $tag - * The part of speech tag. - * @type int $aspect - * The grammatical aspect. - * @type int $case - * The grammatical case. - * @type int $form - * The grammatical form. - * @type int $gender - * The grammatical gender. - * @type int $mood - * The grammatical mood. - * @type int $number - * The grammatical number. - * @type int $person - * The grammatical person. - * @type int $proper - * The grammatical properness. - * @type int $reciprocity - * The grammatical reciprocity. - * @type int $tense - * The grammatical tense. - * @type int $voice - * The grammatical voice. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The part of speech tag. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tag tag = 1; - * @return int - */ - public function getTag() - { - return $this->tag; - } - - /** - * The part of speech tag. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tag tag = 1; - * @param int $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Tag::class); - $this->tag = $var; - - return $this; - } - - /** - * The grammatical aspect. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Aspect aspect = 2; - * @return int - */ - public function getAspect() - { - return $this->aspect; - } - - /** - * The grammatical aspect. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Aspect aspect = 2; - * @param int $var - * @return $this - */ - public function setAspect($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Aspect::class); - $this->aspect = $var; - - return $this; - } - - /** - * The grammatical case. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Case case = 3; - * @return int - */ - public function getCase() - { - return $this->case; - } - - /** - * The grammatical case. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Case case = 3; - * @param int $var - * @return $this - */ - public function setCase($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\PBCase::class); - $this->case = $var; - - return $this; - } - - /** - * The grammatical form. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Form form = 4; - * @return int - */ - public function getForm() - { - return $this->form; - } - - /** - * The grammatical form. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Form form = 4; - * @param int $var - * @return $this - */ - public function setForm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Form::class); - $this->form = $var; - - return $this; - } - - /** - * The grammatical gender. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Gender gender = 5; - * @return int - */ - public function getGender() - { - return $this->gender; - } - - /** - * The grammatical gender. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Gender gender = 5; - * @param int $var - * @return $this - */ - public function setGender($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Gender::class); - $this->gender = $var; - - return $this; - } - - /** - * The grammatical mood. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Mood mood = 6; - * @return int - */ - public function getMood() - { - return $this->mood; - } - - /** - * The grammatical mood. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Mood mood = 6; - * @param int $var - * @return $this - */ - public function setMood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Mood::class); - $this->mood = $var; - - return $this; - } - - /** - * The grammatical number. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Number number = 7; - * @return int - */ - public function getNumber() - { - return $this->number; - } - - /** - * The grammatical number. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Number number = 7; - * @param int $var - * @return $this - */ - public function setNumber($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Number::class); - $this->number = $var; - - return $this; - } - - /** - * The grammatical person. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Person person = 8; - * @return int - */ - public function getPerson() - { - return $this->person; - } - - /** - * The grammatical person. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Person person = 8; - * @param int $var - * @return $this - */ - public function setPerson($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Person::class); - $this->person = $var; - - return $this; - } - - /** - * The grammatical properness. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Proper proper = 9; - * @return int - */ - public function getProper() - { - return $this->proper; - } - - /** - * The grammatical properness. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Proper proper = 9; - * @param int $var - * @return $this - */ - public function setProper($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Proper::class); - $this->proper = $var; - - return $this; - } - - /** - * The grammatical reciprocity. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Reciprocity reciprocity = 10; - * @return int - */ - public function getReciprocity() - { - return $this->reciprocity; - } - - /** - * The grammatical reciprocity. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Reciprocity reciprocity = 10; - * @param int $var - * @return $this - */ - public function setReciprocity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Reciprocity::class); - $this->reciprocity = $var; - - return $this; - } - - /** - * The grammatical tense. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tense tense = 11; - * @return int - */ - public function getTense() - { - return $this->tense; - } - - /** - * The grammatical tense. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Tense tense = 11; - * @param int $var - * @return $this - */ - public function setTense($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Tense::class); - $this->tense = $var; - - return $this; - } - - /** - * The grammatical voice. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Voice voice = 12; - * @return int - */ - public function getVoice() - { - return $this->voice; - } - - /** - * The grammatical voice. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech.Voice voice = 12; - * @param int $var - * @return $this - */ - public function setVoice($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech\Voice::class); - $this->voice = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Aspect.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Aspect.php deleted file mode 100644 index 95abc9c0df68..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Aspect.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Aspect - */ -class Aspect -{ - /** - * Aspect is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum ASPECT_UNKNOWN = 0; - */ - const ASPECT_UNKNOWN = 0; - /** - * Perfective - * - * Generated from protobuf enum PERFECTIVE = 1; - */ - const PERFECTIVE = 1; - /** - * Imperfective - * - * Generated from protobuf enum IMPERFECTIVE = 2; - */ - const IMPERFECTIVE = 2; - /** - * Progressive - * - * Generated from protobuf enum PROGRESSIVE = 3; - */ - const PROGRESSIVE = 3; - - private static $valueToName = [ - self::ASPECT_UNKNOWN => 'ASPECT_UNKNOWN', - self::PERFECTIVE => 'PERFECTIVE', - self::IMPERFECTIVE => 'IMPERFECTIVE', - self::PROGRESSIVE => 'PROGRESSIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Aspect::class, \Google\Cloud\Language\V1\PartOfSpeech_Aspect::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Form.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Form.php deleted file mode 100644 index 0d3977bbd54a..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Form.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Form - */ -class Form -{ - /** - * Form is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum FORM_UNKNOWN = 0; - */ - const FORM_UNKNOWN = 0; - /** - * Adnomial - * - * Generated from protobuf enum ADNOMIAL = 1; - */ - const ADNOMIAL = 1; - /** - * Auxiliary - * - * Generated from protobuf enum AUXILIARY = 2; - */ - const AUXILIARY = 2; - /** - * Complementizer - * - * Generated from protobuf enum COMPLEMENTIZER = 3; - */ - const COMPLEMENTIZER = 3; - /** - * Final ending - * - * Generated from protobuf enum FINAL_ENDING = 4; - */ - const FINAL_ENDING = 4; - /** - * Gerund - * - * Generated from protobuf enum GERUND = 5; - */ - const GERUND = 5; - /** - * Realis - * - * Generated from protobuf enum REALIS = 6; - */ - const REALIS = 6; - /** - * Irrealis - * - * Generated from protobuf enum IRREALIS = 7; - */ - const IRREALIS = 7; - /** - * Short form - * - * Generated from protobuf enum SHORT = 8; - */ - const SHORT = 8; - /** - * Long form - * - * Generated from protobuf enum LONG = 9; - */ - const LONG = 9; - /** - * Order form - * - * Generated from protobuf enum ORDER = 10; - */ - const ORDER = 10; - /** - * Specific form - * - * Generated from protobuf enum SPECIFIC = 11; - */ - const SPECIFIC = 11; - - private static $valueToName = [ - self::FORM_UNKNOWN => 'FORM_UNKNOWN', - self::ADNOMIAL => 'ADNOMIAL', - self::AUXILIARY => 'AUXILIARY', - self::COMPLEMENTIZER => 'COMPLEMENTIZER', - self::FINAL_ENDING => 'FINAL_ENDING', - self::GERUND => 'GERUND', - self::REALIS => 'REALIS', - self::IRREALIS => 'IRREALIS', - self::SHORT => 'SHORT', - self::LONG => 'LONG', - self::ORDER => 'ORDER', - self::SPECIFIC => 'SPECIFIC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Form::class, \Google\Cloud\Language\V1\PartOfSpeech_Form::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Gender.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Gender.php deleted file mode 100644 index 510fead88faf..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Gender.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Gender - */ -class Gender -{ - /** - * Gender is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum GENDER_UNKNOWN = 0; - */ - const GENDER_UNKNOWN = 0; - /** - * Feminine - * - * Generated from protobuf enum FEMININE = 1; - */ - const FEMININE = 1; - /** - * Masculine - * - * Generated from protobuf enum MASCULINE = 2; - */ - const MASCULINE = 2; - /** - * Neuter - * - * Generated from protobuf enum NEUTER = 3; - */ - const NEUTER = 3; - - private static $valueToName = [ - self::GENDER_UNKNOWN => 'GENDER_UNKNOWN', - self::FEMININE => 'FEMININE', - self::MASCULINE => 'MASCULINE', - self::NEUTER => 'NEUTER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Gender::class, \Google\Cloud\Language\V1\PartOfSpeech_Gender::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Mood.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Mood.php deleted file mode 100644 index 3b0c97066083..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Mood.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Mood - */ -class Mood -{ - /** - * Mood is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum MOOD_UNKNOWN = 0; - */ - const MOOD_UNKNOWN = 0; - /** - * Conditional - * - * Generated from protobuf enum CONDITIONAL_MOOD = 1; - */ - const CONDITIONAL_MOOD = 1; - /** - * Imperative - * - * Generated from protobuf enum IMPERATIVE = 2; - */ - const IMPERATIVE = 2; - /** - * Indicative - * - * Generated from protobuf enum INDICATIVE = 3; - */ - const INDICATIVE = 3; - /** - * Interrogative - * - * Generated from protobuf enum INTERROGATIVE = 4; - */ - const INTERROGATIVE = 4; - /** - * Jussive - * - * Generated from protobuf enum JUSSIVE = 5; - */ - const JUSSIVE = 5; - /** - * Subjunctive - * - * Generated from protobuf enum SUBJUNCTIVE = 6; - */ - const SUBJUNCTIVE = 6; - - private static $valueToName = [ - self::MOOD_UNKNOWN => 'MOOD_UNKNOWN', - self::CONDITIONAL_MOOD => 'CONDITIONAL_MOOD', - self::IMPERATIVE => 'IMPERATIVE', - self::INDICATIVE => 'INDICATIVE', - self::INTERROGATIVE => 'INTERROGATIVE', - self::JUSSIVE => 'JUSSIVE', - self::SUBJUNCTIVE => 'SUBJUNCTIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Mood::class, \Google\Cloud\Language\V1\PartOfSpeech_Mood::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Number.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Number.php deleted file mode 100644 index 1663eed86eb7..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Number.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Number - */ -class Number -{ - /** - * Number is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum NUMBER_UNKNOWN = 0; - */ - const NUMBER_UNKNOWN = 0; - /** - * Singular - * - * Generated from protobuf enum SINGULAR = 1; - */ - const SINGULAR = 1; - /** - * Plural - * - * Generated from protobuf enum PLURAL = 2; - */ - const PLURAL = 2; - /** - * Dual - * - * Generated from protobuf enum DUAL = 3; - */ - const DUAL = 3; - - private static $valueToName = [ - self::NUMBER_UNKNOWN => 'NUMBER_UNKNOWN', - self::SINGULAR => 'SINGULAR', - self::PLURAL => 'PLURAL', - self::DUAL => 'DUAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Number::class, \Google\Cloud\Language\V1\PartOfSpeech_Number::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/PBCase.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/PBCase.php deleted file mode 100644 index 156b6963e012..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/PBCase.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Case - */ -class PBCase -{ - /** - * Case is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum CASE_UNKNOWN = 0; - */ - const CASE_UNKNOWN = 0; - /** - * Accusative - * - * Generated from protobuf enum ACCUSATIVE = 1; - */ - const ACCUSATIVE = 1; - /** - * Adverbial - * - * Generated from protobuf enum ADVERBIAL = 2; - */ - const ADVERBIAL = 2; - /** - * Complementive - * - * Generated from protobuf enum COMPLEMENTIVE = 3; - */ - const COMPLEMENTIVE = 3; - /** - * Dative - * - * Generated from protobuf enum DATIVE = 4; - */ - const DATIVE = 4; - /** - * Genitive - * - * Generated from protobuf enum GENITIVE = 5; - */ - const GENITIVE = 5; - /** - * Instrumental - * - * Generated from protobuf enum INSTRUMENTAL = 6; - */ - const INSTRUMENTAL = 6; - /** - * Locative - * - * Generated from protobuf enum LOCATIVE = 7; - */ - const LOCATIVE = 7; - /** - * Nominative - * - * Generated from protobuf enum NOMINATIVE = 8; - */ - const NOMINATIVE = 8; - /** - * Oblique - * - * Generated from protobuf enum OBLIQUE = 9; - */ - const OBLIQUE = 9; - /** - * Partitive - * - * Generated from protobuf enum PARTITIVE = 10; - */ - const PARTITIVE = 10; - /** - * Prepositional - * - * Generated from protobuf enum PREPOSITIONAL = 11; - */ - const PREPOSITIONAL = 11; - /** - * Reflexive - * - * Generated from protobuf enum REFLEXIVE_CASE = 12; - */ - const REFLEXIVE_CASE = 12; - /** - * Relative - * - * Generated from protobuf enum RELATIVE_CASE = 13; - */ - const RELATIVE_CASE = 13; - /** - * Vocative - * - * Generated from protobuf enum VOCATIVE = 14; - */ - const VOCATIVE = 14; - - private static $valueToName = [ - self::CASE_UNKNOWN => 'CASE_UNKNOWN', - self::ACCUSATIVE => 'ACCUSATIVE', - self::ADVERBIAL => 'ADVERBIAL', - self::COMPLEMENTIVE => 'COMPLEMENTIVE', - self::DATIVE => 'DATIVE', - self::GENITIVE => 'GENITIVE', - self::INSTRUMENTAL => 'INSTRUMENTAL', - self::LOCATIVE => 'LOCATIVE', - self::NOMINATIVE => 'NOMINATIVE', - self::OBLIQUE => 'OBLIQUE', - self::PARTITIVE => 'PARTITIVE', - self::PREPOSITIONAL => 'PREPOSITIONAL', - self::REFLEXIVE_CASE => 'REFLEXIVE_CASE', - self::RELATIVE_CASE => 'RELATIVE_CASE', - self::VOCATIVE => 'VOCATIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PBCase::class, \Google\Cloud\Language\V1\PartOfSpeech_Case::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Person.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Person.php deleted file mode 100644 index ba1a5a463fed..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Person.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Person - */ -class Person -{ - /** - * Person is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum PERSON_UNKNOWN = 0; - */ - const PERSON_UNKNOWN = 0; - /** - * First - * - * Generated from protobuf enum FIRST = 1; - */ - const FIRST = 1; - /** - * Second - * - * Generated from protobuf enum SECOND = 2; - */ - const SECOND = 2; - /** - * Third - * - * Generated from protobuf enum THIRD = 3; - */ - const THIRD = 3; - /** - * Reflexive - * - * Generated from protobuf enum REFLEXIVE_PERSON = 4; - */ - const REFLEXIVE_PERSON = 4; - - private static $valueToName = [ - self::PERSON_UNKNOWN => 'PERSON_UNKNOWN', - self::FIRST => 'FIRST', - self::SECOND => 'SECOND', - self::THIRD => 'THIRD', - self::REFLEXIVE_PERSON => 'REFLEXIVE_PERSON', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Person::class, \Google\Cloud\Language\V1\PartOfSpeech_Person::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Proper.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Proper.php deleted file mode 100644 index 694ba0a32b40..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Proper.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Proper - */ -class Proper -{ - /** - * Proper is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum PROPER_UNKNOWN = 0; - */ - const PROPER_UNKNOWN = 0; - /** - * Proper - * - * Generated from protobuf enum PROPER = 1; - */ - const PROPER = 1; - /** - * Not proper - * - * Generated from protobuf enum NOT_PROPER = 2; - */ - const NOT_PROPER = 2; - - private static $valueToName = [ - self::PROPER_UNKNOWN => 'PROPER_UNKNOWN', - self::PROPER => 'PROPER', - self::NOT_PROPER => 'NOT_PROPER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Proper::class, \Google\Cloud\Language\V1\PartOfSpeech_Proper::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Reciprocity.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Reciprocity.php deleted file mode 100644 index c849d6e3463c..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Reciprocity.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Reciprocity - */ -class Reciprocity -{ - /** - * Reciprocity is not applicable in the analyzed language or is not - * predicted. - * - * Generated from protobuf enum RECIPROCITY_UNKNOWN = 0; - */ - const RECIPROCITY_UNKNOWN = 0; - /** - * Reciprocal - * - * Generated from protobuf enum RECIPROCAL = 1; - */ - const RECIPROCAL = 1; - /** - * Non-reciprocal - * - * Generated from protobuf enum NON_RECIPROCAL = 2; - */ - const NON_RECIPROCAL = 2; - - private static $valueToName = [ - self::RECIPROCITY_UNKNOWN => 'RECIPROCITY_UNKNOWN', - self::RECIPROCAL => 'RECIPROCAL', - self::NON_RECIPROCAL => 'NON_RECIPROCAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Reciprocity::class, \Google\Cloud\Language\V1\PartOfSpeech_Reciprocity::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tag.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tag.php deleted file mode 100644 index 3e67b7be11ae..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tag.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Tag - */ -class Tag -{ - /** - * Unknown - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Adjective - * - * Generated from protobuf enum ADJ = 1; - */ - const ADJ = 1; - /** - * Adposition (preposition and postposition) - * - * Generated from protobuf enum ADP = 2; - */ - const ADP = 2; - /** - * Adverb - * - * Generated from protobuf enum ADV = 3; - */ - const ADV = 3; - /** - * Conjunction - * - * Generated from protobuf enum CONJ = 4; - */ - const CONJ = 4; - /** - * Determiner - * - * Generated from protobuf enum DET = 5; - */ - const DET = 5; - /** - * Noun (common and proper) - * - * Generated from protobuf enum NOUN = 6; - */ - const NOUN = 6; - /** - * Cardinal number - * - * Generated from protobuf enum NUM = 7; - */ - const NUM = 7; - /** - * Pronoun - * - * Generated from protobuf enum PRON = 8; - */ - const PRON = 8; - /** - * Particle or other function word - * - * Generated from protobuf enum PRT = 9; - */ - const PRT = 9; - /** - * Punctuation - * - * Generated from protobuf enum PUNCT = 10; - */ - const PUNCT = 10; - /** - * Verb (all tenses and modes) - * - * Generated from protobuf enum VERB = 11; - */ - const VERB = 11; - /** - * Other: foreign words, typos, abbreviations - * - * Generated from protobuf enum X = 12; - */ - const X = 12; - /** - * Affix - * - * Generated from protobuf enum AFFIX = 13; - */ - const AFFIX = 13; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::ADJ => 'ADJ', - self::ADP => 'ADP', - self::ADV => 'ADV', - self::CONJ => 'CONJ', - self::DET => 'DET', - self::NOUN => 'NOUN', - self::NUM => 'NUM', - self::PRON => 'PRON', - self::PRT => 'PRT', - self::PUNCT => 'PUNCT', - self::VERB => 'VERB', - self::X => 'X', - self::AFFIX => 'AFFIX', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Tag::class, \Google\Cloud\Language\V1\PartOfSpeech_Tag::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tense.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tense.php deleted file mode 100644 index 3d0e65618a04..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Tense.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Tense - */ -class Tense -{ - /** - * Tense is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum TENSE_UNKNOWN = 0; - */ - const TENSE_UNKNOWN = 0; - /** - * Conditional - * - * Generated from protobuf enum CONDITIONAL_TENSE = 1; - */ - const CONDITIONAL_TENSE = 1; - /** - * Future - * - * Generated from protobuf enum FUTURE = 2; - */ - const FUTURE = 2; - /** - * Past - * - * Generated from protobuf enum PAST = 3; - */ - const PAST = 3; - /** - * Present - * - * Generated from protobuf enum PRESENT = 4; - */ - const PRESENT = 4; - /** - * Imperfect - * - * Generated from protobuf enum IMPERFECT = 5; - */ - const IMPERFECT = 5; - /** - * Pluperfect - * - * Generated from protobuf enum PLUPERFECT = 6; - */ - const PLUPERFECT = 6; - - private static $valueToName = [ - self::TENSE_UNKNOWN => 'TENSE_UNKNOWN', - self::CONDITIONAL_TENSE => 'CONDITIONAL_TENSE', - self::FUTURE => 'FUTURE', - self::PAST => 'PAST', - self::PRESENT => 'PRESENT', - self::IMPERFECT => 'IMPERFECT', - self::PLUPERFECT => 'PLUPERFECT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Tense::class, \Google\Cloud\Language\V1\PartOfSpeech_Tense::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Voice.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Voice.php deleted file mode 100644 index ea5996d4fe4d..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech/Voice.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.language.v1.PartOfSpeech.Voice - */ -class Voice -{ - /** - * Voice is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum VOICE_UNKNOWN = 0; - */ - const VOICE_UNKNOWN = 0; - /** - * Active - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Causative - * - * Generated from protobuf enum CAUSATIVE = 2; - */ - const CAUSATIVE = 2; - /** - * Passive - * - * Generated from protobuf enum PASSIVE = 3; - */ - const PASSIVE = 3; - - private static $valueToName = [ - self::VOICE_UNKNOWN => 'VOICE_UNKNOWN', - self::ACTIVE => 'ACTIVE', - self::CAUSATIVE => 'CAUSATIVE', - self::PASSIVE => 'PASSIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Voice::class, \Google\Cloud\Language\V1\PartOfSpeech_Voice::class); - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Aspect.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Aspect.php deleted file mode 100644 index 87d4732dd0ef..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/PartOfSpeech_Aspect.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.language.v1.Sentence - */ -class Sentence extends \Google\Protobuf\Internal\Message -{ - /** - * The sentence text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - */ - protected $text = null; - /** - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to - * true, this field will contain the sentiment for the sentence. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 2; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\TextSpan $text - * The sentence text. - * @type \Google\Cloud\Language\V1\Sentiment $sentiment - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to - * true, this field will contain the sentiment for the sentence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The sentence text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - * @return \Google\Cloud\Language\V1\TextSpan|null - */ - public function getText() - { - return $this->text; - } - - public function hasText() - { - return isset($this->text); - } - - public function clearText() - { - unset($this->text); - } - - /** - * The sentence text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - * @param \Google\Cloud\Language\V1\TextSpan $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\TextSpan::class); - $this->text = $var; - - return $this; - } - - /** - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to - * true, this field will contain the sentiment for the sentence. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 2; - * @return \Google\Cloud\Language\V1\Sentiment|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to - * true, this field will contain the sentiment for the sentence. - * - * Generated from protobuf field .google.cloud.language.v1.Sentiment sentiment = 2; - * @param \Google\Cloud\Language\V1\Sentiment $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\Sentiment::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentiment.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentiment.php deleted file mode 100644 index f58d7d6a31be..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Sentiment.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.language.v1.Sentiment - */ -class Sentiment extends \Google\Protobuf\Internal\Message -{ - /** - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * Generated from protobuf field float magnitude = 2; - */ - protected $magnitude = 0.0; - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * Generated from protobuf field float score = 3; - */ - protected $score = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $magnitude - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * @type float $score - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * Generated from protobuf field float magnitude = 2; - * @return float - */ - public function getMagnitude() - { - return $this->magnitude; - } - - /** - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * Generated from protobuf field float magnitude = 2; - * @param float $var - * @return $this - */ - public function setMagnitude($var) - { - GPBUtil::checkFloat($var); - $this->magnitude = $var; - - return $this; - } - - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * Generated from protobuf field float score = 3; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * Generated from protobuf field float score = 3; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/TextSpan.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/TextSpan.php deleted file mode 100644 index 4b2fc550c4d6..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/TextSpan.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.language.v1.TextSpan - */ -class TextSpan extends \Google\Protobuf\Internal\Message -{ - /** - * The content of the output text. - * - * Generated from protobuf field string content = 1; - */ - protected $content = ''; - /** - * The API calculates the beginning offset of the content in the original - * document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request. - * - * Generated from protobuf field int32 begin_offset = 2; - */ - protected $begin_offset = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * The content of the output text. - * @type int $begin_offset - * The API calculates the beginning offset of the content in the original - * document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The content of the output text. - * - * Generated from protobuf field string content = 1; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * The content of the output text. - * - * 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 API calculates the beginning offset of the content in the original - * document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request. - * - * Generated from protobuf field int32 begin_offset = 2; - * @return int - */ - public function getBeginOffset() - { - return $this->begin_offset; - } - - /** - * The API calculates the beginning offset of the content in the original - * document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request. - * - * Generated from protobuf field int32 begin_offset = 2; - * @param int $var - * @return $this - */ - public function setBeginOffset($var) - { - GPBUtil::checkInt32($var); - $this->begin_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Token.php b/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Token.php deleted file mode 100644 index f01477f0c5d6..000000000000 --- a/owl-bot-staging/Language/v1/proto/src/Google/Cloud/Language/V1/Token.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.language.v1.Token - */ -class Token extends \Google\Protobuf\Internal\Message -{ - /** - * The token text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - */ - protected $text = null; - /** - * Parts of speech tag for this token. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech part_of_speech = 2; - */ - protected $part_of_speech = null; - /** - * Dependency tree parse for this token. - * - * Generated from protobuf field .google.cloud.language.v1.DependencyEdge dependency_edge = 3; - */ - protected $dependency_edge = null; - /** - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * - * Generated from protobuf field string lemma = 4; - */ - protected $lemma = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1\TextSpan $text - * The token text. - * @type \Google\Cloud\Language\V1\PartOfSpeech $part_of_speech - * Parts of speech tag for this token. - * @type \Google\Cloud\Language\V1\DependencyEdge $dependency_edge - * Dependency tree parse for this token. - * @type string $lemma - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The token text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - * @return \Google\Cloud\Language\V1\TextSpan|null - */ - public function getText() - { - return $this->text; - } - - public function hasText() - { - return isset($this->text); - } - - public function clearText() - { - unset($this->text); - } - - /** - * The token text. - * - * Generated from protobuf field .google.cloud.language.v1.TextSpan text = 1; - * @param \Google\Cloud\Language\V1\TextSpan $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\TextSpan::class); - $this->text = $var; - - return $this; - } - - /** - * Parts of speech tag for this token. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech part_of_speech = 2; - * @return \Google\Cloud\Language\V1\PartOfSpeech|null - */ - public function getPartOfSpeech() - { - return $this->part_of_speech; - } - - public function hasPartOfSpeech() - { - return isset($this->part_of_speech); - } - - public function clearPartOfSpeech() - { - unset($this->part_of_speech); - } - - /** - * Parts of speech tag for this token. - * - * Generated from protobuf field .google.cloud.language.v1.PartOfSpeech part_of_speech = 2; - * @param \Google\Cloud\Language\V1\PartOfSpeech $var - * @return $this - */ - public function setPartOfSpeech($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\PartOfSpeech::class); - $this->part_of_speech = $var; - - return $this; - } - - /** - * Dependency tree parse for this token. - * - * Generated from protobuf field .google.cloud.language.v1.DependencyEdge dependency_edge = 3; - * @return \Google\Cloud\Language\V1\DependencyEdge|null - */ - public function getDependencyEdge() - { - return $this->dependency_edge; - } - - public function hasDependencyEdge() - { - return isset($this->dependency_edge); - } - - public function clearDependencyEdge() - { - unset($this->dependency_edge); - } - - /** - * Dependency tree parse for this token. - * - * Generated from protobuf field .google.cloud.language.v1.DependencyEdge dependency_edge = 3; - * @param \Google\Cloud\Language\V1\DependencyEdge $var - * @return $this - */ - public function setDependencyEdge($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1\DependencyEdge::class); - $this->dependency_edge = $var; - - return $this; - } - - /** - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * - * Generated from protobuf field string lemma = 4; - * @return string - */ - public function getLemma() - { - return $this->lemma; - } - - /** - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * - * Generated from protobuf field string lemma = 4; - * @param string $var - * @return $this - */ - public function setLemma($var) - { - GPBUtil::checkString($var, True); - $this->lemma = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entities.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entities.php deleted file mode 100644 index a596ec513e84..000000000000 --- a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entities.php +++ /dev/null @@ -1,59 +0,0 @@ -analyzeEntities($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1_generated_LanguageService_AnalyzeEntities_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entity_sentiment.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entity_sentiment.php deleted file mode 100644 index de5fd87a34ef..000000000000 --- a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_entity_sentiment.php +++ /dev/null @@ -1,58 +0,0 @@ -analyzeEntitySentiment($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1_generated_LanguageService_AnalyzeEntitySentiment_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_sentiment.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_sentiment.php deleted file mode 100644 index dcb0684e807e..000000000000 --- a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_sentiment.php +++ /dev/null @@ -1,57 +0,0 @@ -analyzeSentiment($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1_generated_LanguageService_AnalyzeSentiment_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_syntax.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_syntax.php deleted file mode 100644 index 1ed678625848..000000000000 --- a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/analyze_syntax.php +++ /dev/null @@ -1,59 +0,0 @@ -analyzeSyntax($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1_generated_LanguageService_AnalyzeSyntax_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/annotate_text.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/annotate_text.php deleted file mode 100644 index 189925a4fad9..000000000000 --- a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/annotate_text.php +++ /dev/null @@ -1,60 +0,0 @@ -annotateText($document, $features); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1_generated_LanguageService_AnnotateText_sync] diff --git a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/classify_text.php b/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/classify_text.php deleted file mode 100644 index 0e197e02cf44..000000000000 --- a/owl-bot-staging/Language/v1/samples/V1/LanguageServiceClient/classify_text.php +++ /dev/null @@ -1,57 +0,0 @@ -classifyText($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1_generated_LanguageService_ClassifyText_sync] diff --git a/owl-bot-staging/Language/v1/src/V1/Gapic/LanguageServiceGapicClient.php b/owl-bot-staging/Language/v1/src/V1/Gapic/LanguageServiceGapicClient.php deleted file mode 100644 index 867b904b5b26..000000000000 --- a/owl-bot-staging/Language/v1/src/V1/Gapic/LanguageServiceGapicClient.php +++ /dev/null @@ -1,428 +0,0 @@ -analyzeEntities($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - */ -class LanguageServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.language.v1.LanguageService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'language.googleapis.com'; - - /** 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-language', - '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/language_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/language_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/language_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/language_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 'language.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); - } - - /** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeEntities($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Language\V1\AnalyzeEntitiesResponse - * - * @throws ApiException if the remote call fails - */ - public function analyzeEntities($document, array $optionalArgs = []) - { - $request = new AnalyzeEntitiesRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeEntities', AnalyzeEntitiesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes - * sentiment associated with each entity and its mentions. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeEntitySentiment($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Language\V1\AnalyzeEntitySentimentResponse - * - * @throws ApiException if the remote call fails - */ - public function analyzeEntitySentiment($document, array $optionalArgs = []) - { - $request = new AnalyzeEntitySentimentRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeEntitySentiment', AnalyzeEntitySentimentResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Analyzes the sentiment of the provided text. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeSentiment($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate sentence offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Language\V1\AnalyzeSentimentResponse - * - * @throws ApiException if the remote call fails - */ - public function analyzeSentiment($document, array $optionalArgs = []) - { - $request = new AnalyzeSentimentRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeSentiment', AnalyzeSentimentResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part of speech tags, dependency trees, and other - * properties. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeSyntax($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Language\V1\AnalyzeSyntaxResponse - * - * @throws ApiException if the remote call fails - */ - public function analyzeSyntax($document, array $optionalArgs = []) - { - $request = new AnalyzeSyntaxRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeSyntax', AnalyzeSyntaxResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * A convenience method that provides all the features that analyzeSentiment, - * analyzeEntities, and analyzeSyntax provide in one call. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $features = new Features(); - * $response = $languageServiceClient->annotateText($document, $features); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param Features $features Required. The enabled features. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1\EncodingType} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Language\V1\AnnotateTextResponse - * - * @throws ApiException if the remote call fails - */ - public function annotateText($document, $features, array $optionalArgs = []) - { - $request = new AnnotateTextRequest(); - $request->setDocument($document); - $request->setFeatures($features); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnnotateText', AnnotateTextResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Classifies a document into categories. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->classifyText($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type ClassificationModelOptions $classificationModelOptions - * Model options to use for classification. Defaults to v1 options if not - * specified. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Language\V1\ClassifyTextResponse - * - * @throws ApiException if the remote call fails - */ - public function classifyText($document, array $optionalArgs = []) - { - $request = new ClassifyTextRequest(); - $request->setDocument($document); - if (isset($optionalArgs['classificationModelOptions'])) { - $request->setClassificationModelOptions($optionalArgs['classificationModelOptions']); - } - - return $this->startCall('ClassifyText', ClassifyTextResponse::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Language/v1/src/V1/LanguageServiceClient.php b/owl-bot-staging/Language/v1/src/V1/LanguageServiceClient.php deleted file mode 100644 index 09380dea0630..000000000000 --- a/owl-bot-staging/Language/v1/src/V1/LanguageServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.language.v1.LanguageService' => [], - ], -]; diff --git a/owl-bot-staging/Language/v1/src/V1/resources/language_service_rest_client_config.php b/owl-bot-staging/Language/v1/src/V1/resources/language_service_rest_client_config.php deleted file mode 100644 index 3713de7e1366..000000000000 --- a/owl-bot-staging/Language/v1/src/V1/resources/language_service_rest_client_config.php +++ /dev/null @@ -1,39 +0,0 @@ - [ - 'google.cloud.language.v1.LanguageService' => [ - 'AnalyzeEntities' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/documents:analyzeEntities', - 'body' => '*', - ], - 'AnalyzeEntitySentiment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/documents:analyzeEntitySentiment', - 'body' => '*', - ], - 'AnalyzeSentiment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/documents:analyzeSentiment', - 'body' => '*', - ], - 'AnalyzeSyntax' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/documents:analyzeSyntax', - 'body' => '*', - ], - 'AnnotateText' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/documents:annotateText', - 'body' => '*', - ], - 'ClassifyText' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/documents:classifyText', - 'body' => '*', - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Language/v1/tests/Unit/V1/LanguageServiceClientTest.php b/owl-bot-staging/Language/v1/tests/Unit/V1/LanguageServiceClientTest.php deleted file mode 100644 index 07f843489a80..000000000000 --- a/owl-bot-staging/Language/v1/tests/Unit/V1/LanguageServiceClientTest.php +++ /dev/null @@ -1,430 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return LanguageServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new LanguageServiceClient($options); - } - - /** @test */ - public function analyzeEntitiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeEntitiesResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeEntities($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1.LanguageService/AnalyzeEntities', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeEntitiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - try { - $gapicClient->analyzeEntities($document); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeEntitySentimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeEntitySentimentResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeEntitySentiment($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1.LanguageService/AnalyzeEntitySentiment', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeEntitySentimentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - try { - $gapicClient->analyzeEntitySentiment($document); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeSentimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeSentimentResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeSentiment($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1.LanguageService/AnalyzeSentiment', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeSentimentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - try { - $gapicClient->analyzeSentiment($document); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeSyntaxTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeSyntaxResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeSyntax($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1.LanguageService/AnalyzeSyntax', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeSyntaxExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - try { - $gapicClient->analyzeSyntax($document); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function annotateTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnnotateTextResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $features = new Features(); - $response = $gapicClient->annotateText($document, $features); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1.LanguageService/AnnotateText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $actualValue = $actualRequestObject->getFeatures(); - $this->assertProtobufEquals($features, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function annotateTextExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - $features = new Features(); - try { - $gapicClient->annotateText($document, $features); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function classifyTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ClassifyTextResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->classifyText($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1.LanguageService/ClassifyText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function classifyTextExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - try { - $gapicClient->classifyText($document); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->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/Language/v1beta2/proto/src/GPBMetadata/Google/Cloud/Language/V1Beta2/LanguageService.php b/owl-bot-staging/Language/v1beta2/proto/src/GPBMetadata/Google/Cloud/Language/V1Beta2/LanguageService.php deleted file mode 100644 index 672e35c4c6187a10a6dca6f61fa31ce5dee4b063..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10213 zcmd5?&2Jmm5f4dyP>+(lUVkZSQZpMTmK~dl=#MzEon%QarM1c3^>Qi8h6;8?u4p0@ zmnA7XN|6-Eu|Q9`rR}MQqL=nopnpMu_SPJV=F%3(sh3`gqUfo=d2g2@Wh<1N0F5qs zd^xn5?k0PWykxuM_x!5gOm6OMZF!w!)!%M6 znqDWBOy97!yUJip>h^^2;SMyTRpGSa+@1DuUqXj+C9HxfpmGf?)Cb9rJ02b z!LlT-v6Wm9Ixa6irR42oue0L~uAWSGyxvZyb(8B&0zT@GHlE=+wcXfITP>fw;J3QV z%X>EMi8zQc+iZBP-qCpS4X;_tc#qu24ZrhjR_?*e?=%8`skK_)J$b~|Lf;@V?>zgL z&aOUBP{}U~t`rZ&R2Yh>AQb1%1VY_*1JO#BieQ{SJMdtO%&BY!_6P#ymoXO4`PH3m z@W{(-thd|t<|4_+!fg6d>MIvbg={GYJo0fiS@q$DR&Oo}_NmnuD*RW@b;uY9K% z3sO|6vlGt{C!b@*=Q!tCIlKO zAG3G~-X;IY*RWCE2R*(~iS)+#5iW2*TWY&4`6ip{LPmpjn{QJhy)c58*5vfcr(?n$}BRFb)k~^+uZTQ zFq8j=`F%y%g z*toW)8ICk2A7hF8rhT_!<}0f0NaHw}Gg;Fpm5Z8PSuxF=G(qI1v#QzBB+0T?O+%{~ zEIj^ zJRHdeBvWvb4%@z83jqH}HWa}}I<$7SH=)Di(RDC5C&_4govz=SiyvKv#W}f*jt?<& zQ_mrTbIJvl=y=rzYRxK;c#d&FZyjY@?LBt+JvNSvg78RiIZH>8;}9cBcI89jq!YPhgWh3hdSX(BRAu3Z% zpxJp$>T4SG!-?0612a(qV641C07@h=VXu&ZW(;DK$r$ z=_<+$0o_HbpcR4bTo}PH0GY;PloeJqL+8K7xh6)*u>tgk1NMo%tO4pts%8wcs2hSi zPX0DC1^r%GgKw~~g>)fgF`QSi3@Iz-u70HIzF2sTo>x zjb|#XIjj5zrgIp8>3P#G4ww!?HAf0TdW6AVIX>IUsSlrE~JY#BA42Bj%OYGsF%Rer?AIP^g2B69A42-JB9 zU)(ggV=MF&qOdtUjKtpzy@qdhK+N?qs?41Q9cbQ4a3zCQXnR)hL{lLOQ<21 zd=_W3`%0EMCOz`pTBS!-7&-$r?*m?Nj3eKSH{DII$qTC4k+t=(+*E;Bm0wM=aXunF z_JE7@&17tC4W7ZCt8`k$_5;7N2p@_H42y{FG4hv6qj64a0atKJY0`111|?`Ouj71T z2@K%c5{~Eui)OPppAetr;uFNep`YV*mI7Xyp;O3*oNZPl1xq?6296{VK~67a&9V*9 zI!;1zCOBmpY3o)&I>C|D)JpetXH_~$^Ey$SqES(`?@FghTJgRnoe_gIX^sYlwj#Yq ziW-JAPeKeUu=zWrHi~XYd5IL@L$2Y=oDn(dyBsh?)qR%okR>IF6gaFp>N=3@6|wiW zL%vf;qQxEYD(PjBhUdfx{(6nmnk9#HdY%73#M7>9obUfa)?DDH-PR~^Uf|p~q|(J; zWJz!EWso@w(k0TAQs-qd(JDzPGVxwnHMl~HL}_P9w>RklA0iz{OZ-6&=U7UU2wLC@ z>0oO`1I*G@IvPkXFx1Gw6W3^U+cX{NI*m${!QbMeay~EJpb=m3Z4&I5mY$WCX_80R zOP|tE-X(hMlC?^jzejo@=IFplDpBFb+M1N1VUDkw zB@!erO6)Pb1{9th7RsX~egEl@eC?i|@S7Da)X|LvG2!KX=I! z2u^;vL(ic=4^VSRMWS6H4Glh`%{Iv(-N@6dMTAAIB;6xL4Q{Zl{5!&ChA*C=Ie<~ z2V&=^*krKA{NE!OiwE+@Y(8w=!9V1ghS#k;MoECSN^qrp_%+ND%cQcRYZy2mORR|% zlr=VY&@=fWdmV`Yso6m(>S!ybt!t$U3g;54Dx}rHE*=i-+7i+f{ZC8L%rs+sXDZa| zRDK>|XH>MhcR%#{H+|dt!H(DMQ5UHe^hSei9NB6Mo1&T6-_$4)@C<^+uc2GXR|^vH zsLqBK@K9?~`E`WNJ*{B3jngi|r(@q|-#tjnz`Jj;IQg`Ppv3-Dd-Amr@hqdhQ3`Dj)nb!cOheE^xunaS)Mk=;I(?WfQzK z@8a}R44oShLk{nz4xUN=)}Q^Z$*ocqmmq&1Ml09k<%6bosgB=_)ScY8cMu^D&b>R3V(6t^Tt3BSg2>se^gzoyv~hVgY62L4r|sw_Z2O>{X$N@b+~QgEAFv{M&5o-?!eY{Zfi=p zFv8Tmg%4}-A8~;WBZmX2JnDt?5OrwZ)x+6W3TmLhER&n{nvy)&EWvSDYjAa#9!$LQ zsF!bp#Gx&t95Boim~xGqa!xt>3{%34L1~&>vUiUD0)+>0eWb#J#D`UQm?u#9`(L53 zJCJF(!e{%45S9k}q2c&b6!RbcK|K?G^AdyyKG*4{@EO{l)bBm&_1fL##lgoogle.cloud.language.v1beta2.AnalyzeEntitiesRequest - */ -class AnalyzeEntitiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1beta2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1beta2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesResponse.php deleted file mode 100644 index d2c871818b1f..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitiesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.language.v1beta2.AnalyzeEntitiesResponse - */ -class AnalyzeEntitiesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The recognized entities in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; - */ - private $entities; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - */ - protected $language = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * The recognized entities in the input document. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The recognized entities in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * The recognized entities in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; - * @param array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentRequest.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentRequest.php deleted file mode 100644 index 0518237c96b6..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest - */ -class AnalyzeEntitySentimentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1beta2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1beta2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentResponse.php deleted file mode 100644 index df3732121135..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeEntitySentimentResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse - */ -class AnalyzeEntitySentimentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The recognized entities in the input document with associated sentiments. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; - */ - private $entities; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - */ - protected $language = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * The recognized entities in the input document with associated sentiments. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The recognized entities in the input document with associated sentiments. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * The recognized entities in the input document with associated sentiments. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 1; - * @param array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentRequest.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentRequest.php deleted file mode 100644 index 80c589be0ee6..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.language.v1beta2.AnalyzeSentimentRequest - */ -class AnalyzeSentimentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1beta2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1beta2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentResponse.php deleted file mode 100644 index 85f6940a0de1..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSentimentResponse.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.language.v1beta2.AnalyzeSentimentResponse - */ -class AnalyzeSentimentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The overall sentiment of the input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 1; - */ - protected $document_sentiment = null; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - */ - protected $language = ''; - /** - * The sentiment for all the sentences in the document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 3; - */ - private $sentences; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\Sentiment $document_sentiment - * The overall sentiment of the input document. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * @type array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences - * The sentiment for all the sentences in the document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The overall sentiment of the input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 1; - * @return \Google\Cloud\Language\V1beta2\Sentiment|null - */ - public function getDocumentSentiment() - { - return $this->document_sentiment; - } - - public function hasDocumentSentiment() - { - return isset($this->document_sentiment); - } - - public function clearDocumentSentiment() - { - unset($this->document_sentiment); - } - - /** - * The overall sentiment of the input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 1; - * @param \Google\Cloud\Language\V1beta2\Sentiment $var - * @return $this - */ - public function setDocumentSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Sentiment::class); - $this->document_sentiment = $var; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * - * Generated from protobuf field string language = 2; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - - /** - * The sentiment for all the sentences in the document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSentences() - { - return $this->sentences; - } - - /** - * The sentiment for all the sentences in the document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 3; - * @param array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSentences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Sentence::class); - $this->sentences = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxRequest.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxRequest.php deleted file mode 100644 index 4efdf49b5efc..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.language.v1beta2.AnalyzeSyntaxRequest - */ -class AnalyzeSyntaxRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - */ - protected $encoding_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\Document $document - * Required. Input document. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1beta2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1beta2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 2; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxResponse.php deleted file mode 100644 index 9ade9fd01ee7..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnalyzeSyntaxResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.language.v1beta2.AnalyzeSyntaxResponse - */ -class AnalyzeSyntaxResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Sentences in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; - */ - private $sentences; - /** - * Tokens, along with their syntactic information, in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; - */ - private $tokens; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * - * Generated from protobuf field string language = 3; - */ - protected $language = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences - * Sentences in the input document. - * @type array<\Google\Cloud\Language\V1beta2\Token>|\Google\Protobuf\Internal\RepeatedField $tokens - * Tokens, along with their syntactic information, in the input document. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Sentences in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSentences() - { - return $this->sentences; - } - - /** - * Sentences in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; - * @param array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSentences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Sentence::class); - $this->sentences = $arr; - - return $this; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTokens() - { - return $this->tokens; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; - * @param array<\Google\Cloud\Language\V1beta2\Token>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTokens($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Token::class); - $this->tokens = $arr; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * - * Generated from protobuf field string language = 3; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * - * Generated from protobuf field string language = 3; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest.php deleted file mode 100644 index 811df80d0e3f..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.language.v1beta2.AnnotateTextRequest - */ -class AnnotateTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * Required. The enabled features. - * - * Generated from protobuf field .google.cloud.language.v1beta2.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $features = null; - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 3; - */ - protected $encoding_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\Document $document - * Required. Input document. - * @type \Google\Cloud\Language\V1beta2\AnnotateTextRequest\Features $features - * Required. The enabled features. - * @type int $encoding_type - * The encoding type used by the API to calculate offsets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1beta2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1beta2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * Required. The enabled features. - * - * Generated from protobuf field .google.cloud.language.v1beta2.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1beta2\AnnotateTextRequest\Features|null - */ - public function getFeatures() - { - return $this->features; - } - - public function hasFeatures() - { - return isset($this->features); - } - - public function clearFeatures() - { - unset($this->features); - } - - /** - * Required. The enabled features. - * - * Generated from protobuf field .google.cloud.language.v1beta2.AnnotateTextRequest.Features features = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1beta2\AnnotateTextRequest\Features $var - * @return $this - */ - public function setFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\AnnotateTextRequest\Features::class); - $this->features = $var; - - return $this; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 3; - * @return int - */ - public function getEncodingType() - { - return $this->encoding_type; - } - - /** - * The encoding type used by the API to calculate offsets. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EncodingType encoding_type = 3; - * @param int $var - * @return $this - */ - public function setEncodingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EncodingType::class); - $this->encoding_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest/Features.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest/Features.php deleted file mode 100644 index 222c37b72e94..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest/Features.php +++ /dev/null @@ -1,268 +0,0 @@ -google.cloud.language.v1beta2.AnnotateTextRequest.Features - */ -class Features extends \Google\Protobuf\Internal\Message -{ - /** - * Extract syntax information. - * - * Generated from protobuf field bool extract_syntax = 1; - */ - protected $extract_syntax = false; - /** - * Extract entities. - * - * Generated from protobuf field bool extract_entities = 2; - */ - protected $extract_entities = false; - /** - * Extract document-level sentiment. - * - * Generated from protobuf field bool extract_document_sentiment = 3; - */ - protected $extract_document_sentiment = false; - /** - * Extract entities and their associated sentiment. - * - * Generated from protobuf field bool extract_entity_sentiment = 4; - */ - protected $extract_entity_sentiment = false; - /** - * Classify the full document into categories. If this is true, - * the API will use the default model which classifies into a - * [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * - * Generated from protobuf field bool classify_text = 6; - */ - protected $classify_text = false; - /** - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10; - */ - protected $classification_model_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $extract_syntax - * Extract syntax information. - * @type bool $extract_entities - * Extract entities. - * @type bool $extract_document_sentiment - * Extract document-level sentiment. - * @type bool $extract_entity_sentiment - * Extract entities and their associated sentiment. - * @type bool $classify_text - * Classify the full document into categories. If this is true, - * the API will use the default model which classifies into a - * [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * @type \Google\Cloud\Language\V1beta2\ClassificationModelOptions $classification_model_options - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Extract syntax information. - * - * Generated from protobuf field bool extract_syntax = 1; - * @return bool - */ - public function getExtractSyntax() - { - return $this->extract_syntax; - } - - /** - * Extract syntax information. - * - * Generated from protobuf field bool extract_syntax = 1; - * @param bool $var - * @return $this - */ - public function setExtractSyntax($var) - { - GPBUtil::checkBool($var); - $this->extract_syntax = $var; - - return $this; - } - - /** - * Extract entities. - * - * Generated from protobuf field bool extract_entities = 2; - * @return bool - */ - public function getExtractEntities() - { - return $this->extract_entities; - } - - /** - * Extract entities. - * - * Generated from protobuf field bool extract_entities = 2; - * @param bool $var - * @return $this - */ - public function setExtractEntities($var) - { - GPBUtil::checkBool($var); - $this->extract_entities = $var; - - return $this; - } - - /** - * Extract document-level sentiment. - * - * Generated from protobuf field bool extract_document_sentiment = 3; - * @return bool - */ - public function getExtractDocumentSentiment() - { - return $this->extract_document_sentiment; - } - - /** - * Extract document-level sentiment. - * - * Generated from protobuf field bool extract_document_sentiment = 3; - * @param bool $var - * @return $this - */ - public function setExtractDocumentSentiment($var) - { - GPBUtil::checkBool($var); - $this->extract_document_sentiment = $var; - - return $this; - } - - /** - * Extract entities and their associated sentiment. - * - * Generated from protobuf field bool extract_entity_sentiment = 4; - * @return bool - */ - public function getExtractEntitySentiment() - { - return $this->extract_entity_sentiment; - } - - /** - * Extract entities and their associated sentiment. - * - * Generated from protobuf field bool extract_entity_sentiment = 4; - * @param bool $var - * @return $this - */ - public function setExtractEntitySentiment($var) - { - GPBUtil::checkBool($var); - $this->extract_entity_sentiment = $var; - - return $this; - } - - /** - * Classify the full document into categories. If this is true, - * the API will use the default model which classifies into a - * [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * - * Generated from protobuf field bool classify_text = 6; - * @return bool - */ - public function getClassifyText() - { - return $this->classify_text; - } - - /** - * Classify the full document into categories. If this is true, - * the API will use the default model which classifies into a - * [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * - * Generated from protobuf field bool classify_text = 6; - * @param bool $var - * @return $this - */ - public function setClassifyText($var) - { - GPBUtil::checkBool($var); - $this->classify_text = $var; - - return $this; - } - - /** - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10; - * @return \Google\Cloud\Language\V1beta2\ClassificationModelOptions|null - */ - public function getClassificationModelOptions() - { - return $this->classification_model_options; - } - - public function hasClassificationModelOptions() - { - return isset($this->classification_model_options); - } - - public function clearClassificationModelOptions() - { - unset($this->classification_model_options); - } - - /** - * The model options to use for classification. Defaults to v1 options - * if not specified. Only used if `classify_text` is set to true. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 10; - * @param \Google\Cloud\Language\V1beta2\ClassificationModelOptions $var - * @return $this - */ - public function setClassificationModelOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions::class); - $this->classification_model_options = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Features::class, \Google\Cloud\Language\V1beta2\AnnotateTextRequest_Features::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest_Features.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest_Features.php deleted file mode 100644 index e1f981a34755..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/AnnotateTextRequest_Features.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.language.v1beta2.AnnotateTextResponse - */ -class AnnotateTextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; - */ - private $sentences; - /** - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; - */ - private $tokens; - /** - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 3; - */ - private $entities; - /** - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 4; - */ - protected $document_sentiment = null; - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * - * Generated from protobuf field string language = 5; - */ - protected $language = ''; - /** - * Categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6; - */ - private $categories; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $sentences - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * @type array<\Google\Cloud\Language\V1beta2\Token>|\Google\Protobuf\Internal\RepeatedField $tokens - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * @type array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities]. - * @type \Google\Cloud\Language\V1beta2\Sentiment $document_sentiment - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]. - * @type string $language - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * @type array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $categories - * Categories identified in the input document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSentences() - { - return $this->sentences; - } - - /** - * Sentences in the input document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Sentence sentences = 1; - * @param array<\Google\Cloud\Language\V1beta2\Sentence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSentences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Sentence::class); - $this->sentences = $arr; - - return $this; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTokens() - { - return $this->tokens; - } - - /** - * Tokens, along with their syntactic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_syntax][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_syntax]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Token tokens = 2; - * @param array<\Google\Cloud\Language\V1beta2\Token>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTokens($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Token::class); - $this->tokens = $arr; - - return $this; - } - - /** - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * Entities, along with their semantic information, in the input document. - * Populated if the user enables - * [AnnotateTextRequest.Features.extract_entities][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entities]. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.Entity entities = 3; - * @param array<\Google\Cloud\Language\V1beta2\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 4; - * @return \Google\Cloud\Language\V1beta2\Sentiment|null - */ - public function getDocumentSentiment() - { - return $this->document_sentiment; - } - - public function hasDocumentSentiment() - { - return isset($this->document_sentiment); - } - - public function clearDocumentSentiment() - { - unset($this->document_sentiment); - } - - /** - * The overall sentiment for the document. Populated if the user enables - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment document_sentiment = 4; - * @param \Google\Cloud\Language\V1beta2\Sentiment $var - * @return $this - */ - public function setDocumentSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Sentiment::class); - $this->document_sentiment = $var; - - return $this; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * - * Generated from protobuf field string language = 5; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the text, which will be the same as the language specified - * in the request or, if not specified, the automatically-detected language. - * See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details. - * - * Generated from protobuf field string language = 5; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - - /** - * Categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * Categories identified in the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 6; - * @param array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\ClassificationCategory::class); - $this->categories = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationCategory.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationCategory.php deleted file mode 100644 index 8303e14ba8f4..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationCategory.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.language.v1beta2.ClassificationCategory - */ -class ClassificationCategory extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the category representing the document, from the [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the category representing the document, from the [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * @type float $confidence - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the category representing the document, from the [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the category representing the document, from the [predefined - * taxonomy](https://cloud.google.com/natural-language/docs/categories). - * - * 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 classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * The classifier's confidence of the category. Number represents how certain - * the classifier is that this category represents the given text. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions.php deleted file mode 100644 index 75c27dd88790..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.language.v1beta2.ClassificationModelOptions - */ -class ClassificationModelOptions extends \Google\Protobuf\Internal\Message -{ - protected $model_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model $v1_model - * Setting this field will use the V1 model and V1 content categories - * version. The V1 model is a legacy model; support for this will be - * discontinued in the future. - * @type \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model $v2_model - * Setting this field will use the V2 model with the appropriate content - * categories version. The V2 model is a better performing model. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Setting this field will use the V1 model and V1 content categories - * version. The V1 model is a legacy model; support for this will be - * discontinued in the future. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V1Model v1_model = 1; - * @return \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model|null - */ - public function getV1Model() - { - return $this->readOneof(1); - } - - public function hasV1Model() - { - return $this->hasOneof(1); - } - - /** - * Setting this field will use the V1 model and V1 content categories - * version. The V1 model is a legacy model; support for this will be - * discontinued in the future. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V1Model v1_model = 1; - * @param \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model $var - * @return $this - */ - public function setV1Model($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Setting this field will use the V2 model with the appropriate content - * categories version. The V2 model is a better performing model. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V2Model v2_model = 2; - * @return \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model|null - */ - public function getV2Model() - { - return $this->readOneof(2); - } - - public function hasV2Model() - { - return $this->hasOneof(2); - } - - /** - * Setting this field will use the V2 model with the appropriate content - * categories version. The V2 model is a better performing model. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V2Model v2_model = 2; - * @param \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model $var - * @return $this - */ - public function setV2Model($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getModelType() - { - return $this->whichOneof("model_type"); - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V1Model.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V1Model.php deleted file mode 100644 index ae781d4d3d46..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V1Model.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.language.v1beta2.ClassificationModelOptions.V1Model - */ -class V1Model extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(V1Model::class, \Google\Cloud\Language\V1beta2\ClassificationModelOptions_V1Model::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model.php deleted file mode 100644 index d312077d7246..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.language.v1beta2.ClassificationModelOptions.V2Model - */ -class V2Model extends \Google\Protobuf\Internal\Message -{ - /** - * The content categories used for classification. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; - */ - protected $content_categories_version = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $content_categories_version - * The content categories used for classification. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The content categories used for classification. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; - * @return int - */ - public function getContentCategoriesVersion() - { - return $this->content_categories_version; - } - - /** - * The content categories used for classification. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion content_categories_version = 1; - * @param int $var - * @return $this - */ - public function setContentCategoriesVersion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model\ContentCategoriesVersion::class); - $this->content_categories_version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(V2Model::class, \Google\Cloud\Language\V1beta2\ClassificationModelOptions_V2Model::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php deleted file mode 100644 index 7b495d2a084a..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions/V2Model/ContentCategoriesVersion.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.language.v1beta2.ClassificationModelOptions.V2Model.ContentCategoriesVersion - */ -class ContentCategoriesVersion -{ - /** - * If `ContentCategoriesVersion` is not specified, this option will - * default to `V1`. - * - * Generated from protobuf enum CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0; - */ - const CONTENT_CATEGORIES_VERSION_UNSPECIFIED = 0; - /** - * Legacy content categories of our initial launch in 2017. - * - * Generated from protobuf enum V1 = 1; - */ - const V1 = 1; - /** - * Updated content categories in 2022. - * - * Generated from protobuf enum V2 = 2; - */ - const V2 = 2; - - private static $valueToName = [ - self::CONTENT_CATEGORIES_VERSION_UNSPECIFIED => 'CONTENT_CATEGORIES_VERSION_UNSPECIFIED', - self::V1 => 'V1', - self::V2 => '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(ContentCategoriesVersion::class, \Google\Cloud\Language\V1beta2\ClassificationModelOptions_V2Model_ContentCategoriesVersion::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions_V1Model.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions_V1Model.php deleted file mode 100644 index 8d869319c8e1..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassificationModelOptions_V1Model.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.language.v1beta2.ClassifyTextRequest - */ -class ClassifyTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * Model options to use for classification. Defaults to v1 options if not - * specified. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 3; - */ - protected $classification_model_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\Document $document - * Required. Input document. - * @type \Google\Cloud\Language\V1beta2\ClassificationModelOptions $classification_model_options - * Model options to use for classification. Defaults to v1 options if not - * specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Language\V1beta2\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. Input document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Language\V1beta2\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Document::class); - $this->document = $var; - - return $this; - } - - /** - * Model options to use for classification. Defaults to v1 options if not - * specified. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 3; - * @return \Google\Cloud\Language\V1beta2\ClassificationModelOptions|null - */ - public function getClassificationModelOptions() - { - return $this->classification_model_options; - } - - public function hasClassificationModelOptions() - { - return isset($this->classification_model_options); - } - - public function clearClassificationModelOptions() - { - unset($this->classification_model_options); - } - - /** - * Model options to use for classification. Defaults to v1 options if not - * specified. - * - * Generated from protobuf field .google.cloud.language.v1beta2.ClassificationModelOptions classification_model_options = 3; - * @param \Google\Cloud\Language\V1beta2\ClassificationModelOptions $var - * @return $this - */ - public function setClassificationModelOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions::class); - $this->classification_model_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextResponse.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextResponse.php deleted file mode 100644 index a919aba1e73f..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/ClassifyTextResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.language.v1beta2.ClassifyTextResponse - */ -class ClassifyTextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 1; - */ - private $categories; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $categories - * Categories representing the input document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * Categories representing the input document. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.ClassificationCategory categories = 1; - * @param array<\Google\Cloud\Language\V1beta2\ClassificationCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\ClassificationCategory::class); - $this->categories = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge.php deleted file mode 100644 index 17f1fd96606c..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.language.v1beta2.DependencyEdge - */ -class DependencyEdge extends \Google\Protobuf\Internal\Message -{ - /** - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * - * Generated from protobuf field int32 head_token_index = 1; - */ - protected $head_token_index = 0; - /** - * The parse label for the token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge.Label label = 2; - */ - protected $label = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $head_token_index - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * @type int $label - * The parse label for the token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * - * Generated from protobuf field int32 head_token_index = 1; - * @return int - */ - public function getHeadTokenIndex() - { - return $this->head_token_index; - } - - /** - * Represents the head of this token in the dependency tree. - * This is the index of the token which has an arc going to this token. - * The index is the position of the token in the array of tokens returned - * by the API method. If this token is a root token, then the - * `head_token_index` is its own index. - * - * Generated from protobuf field int32 head_token_index = 1; - * @param int $var - * @return $this - */ - public function setHeadTokenIndex($var) - { - GPBUtil::checkInt32($var); - $this->head_token_index = $var; - - return $this; - } - - /** - * The parse label for the token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge.Label label = 2; - * @return int - */ - public function getLabel() - { - return $this->label; - } - - /** - * The parse label for the token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge.Label label = 2; - * @param int $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\DependencyEdge\Label::class); - $this->label = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge/Label.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge/Label.php deleted file mode 100644 index 81e822ce5295..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge/Label.php +++ /dev/null @@ -1,628 +0,0 @@ -google.cloud.language.v1beta2.DependencyEdge.Label - */ -class Label -{ - /** - * Unknown - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Abbreviation modifier - * - * Generated from protobuf enum ABBREV = 1; - */ - const ABBREV = 1; - /** - * Adjectival complement - * - * Generated from protobuf enum ACOMP = 2; - */ - const ACOMP = 2; - /** - * Adverbial clause modifier - * - * Generated from protobuf enum ADVCL = 3; - */ - const ADVCL = 3; - /** - * Adverbial modifier - * - * Generated from protobuf enum ADVMOD = 4; - */ - const ADVMOD = 4; - /** - * Adjectival modifier of an NP - * - * Generated from protobuf enum AMOD = 5; - */ - const AMOD = 5; - /** - * Appositional modifier of an NP - * - * Generated from protobuf enum APPOS = 6; - */ - const APPOS = 6; - /** - * Attribute dependent of a copular verb - * - * Generated from protobuf enum ATTR = 7; - */ - const ATTR = 7; - /** - * Auxiliary (non-main) verb - * - * Generated from protobuf enum AUX = 8; - */ - const AUX = 8; - /** - * Passive auxiliary - * - * Generated from protobuf enum AUXPASS = 9; - */ - const AUXPASS = 9; - /** - * Coordinating conjunction - * - * Generated from protobuf enum CC = 10; - */ - const CC = 10; - /** - * Clausal complement of a verb or adjective - * - * Generated from protobuf enum CCOMP = 11; - */ - const CCOMP = 11; - /** - * Conjunct - * - * Generated from protobuf enum CONJ = 12; - */ - const CONJ = 12; - /** - * Clausal subject - * - * Generated from protobuf enum CSUBJ = 13; - */ - const CSUBJ = 13; - /** - * Clausal passive subject - * - * Generated from protobuf enum CSUBJPASS = 14; - */ - const CSUBJPASS = 14; - /** - * Dependency (unable to determine) - * - * Generated from protobuf enum DEP = 15; - */ - const DEP = 15; - /** - * Determiner - * - * Generated from protobuf enum DET = 16; - */ - const DET = 16; - /** - * Discourse - * - * Generated from protobuf enum DISCOURSE = 17; - */ - const DISCOURSE = 17; - /** - * Direct object - * - * Generated from protobuf enum DOBJ = 18; - */ - const DOBJ = 18; - /** - * Expletive - * - * Generated from protobuf enum EXPL = 19; - */ - const EXPL = 19; - /** - * Goes with (part of a word in a text not well edited) - * - * Generated from protobuf enum GOESWITH = 20; - */ - const GOESWITH = 20; - /** - * Indirect object - * - * Generated from protobuf enum IOBJ = 21; - */ - const IOBJ = 21; - /** - * Marker (word introducing a subordinate clause) - * - * Generated from protobuf enum MARK = 22; - */ - const MARK = 22; - /** - * Multi-word expression - * - * Generated from protobuf enum MWE = 23; - */ - const MWE = 23; - /** - * Multi-word verbal expression - * - * Generated from protobuf enum MWV = 24; - */ - const MWV = 24; - /** - * Negation modifier - * - * Generated from protobuf enum NEG = 25; - */ - const NEG = 25; - /** - * Noun compound modifier - * - * Generated from protobuf enum NN = 26; - */ - const NN = 26; - /** - * Noun phrase used as an adverbial modifier - * - * Generated from protobuf enum NPADVMOD = 27; - */ - const NPADVMOD = 27; - /** - * Nominal subject - * - * Generated from protobuf enum NSUBJ = 28; - */ - const NSUBJ = 28; - /** - * Passive nominal subject - * - * Generated from protobuf enum NSUBJPASS = 29; - */ - const NSUBJPASS = 29; - /** - * Numeric modifier of a noun - * - * Generated from protobuf enum NUM = 30; - */ - const NUM = 30; - /** - * Element of compound number - * - * Generated from protobuf enum NUMBER = 31; - */ - const NUMBER = 31; - /** - * Punctuation mark - * - * Generated from protobuf enum P = 32; - */ - const P = 32; - /** - * Parataxis relation - * - * Generated from protobuf enum PARATAXIS = 33; - */ - const PARATAXIS = 33; - /** - * Participial modifier - * - * Generated from protobuf enum PARTMOD = 34; - */ - const PARTMOD = 34; - /** - * The complement of a preposition is a clause - * - * Generated from protobuf enum PCOMP = 35; - */ - const PCOMP = 35; - /** - * Object of a preposition - * - * Generated from protobuf enum POBJ = 36; - */ - const POBJ = 36; - /** - * Possession modifier - * - * Generated from protobuf enum POSS = 37; - */ - const POSS = 37; - /** - * Postverbal negative particle - * - * Generated from protobuf enum POSTNEG = 38; - */ - const POSTNEG = 38; - /** - * Predicate complement - * - * Generated from protobuf enum PRECOMP = 39; - */ - const PRECOMP = 39; - /** - * Preconjunt - * - * Generated from protobuf enum PRECONJ = 40; - */ - const PRECONJ = 40; - /** - * Predeterminer - * - * Generated from protobuf enum PREDET = 41; - */ - const PREDET = 41; - /** - * Prefix - * - * Generated from protobuf enum PREF = 42; - */ - const PREF = 42; - /** - * Prepositional modifier - * - * Generated from protobuf enum PREP = 43; - */ - const PREP = 43; - /** - * The relationship between a verb and verbal morpheme - * - * Generated from protobuf enum PRONL = 44; - */ - const PRONL = 44; - /** - * Particle - * - * Generated from protobuf enum PRT = 45; - */ - const PRT = 45; - /** - * Associative or possessive marker - * - * Generated from protobuf enum PS = 46; - */ - const PS = 46; - /** - * Quantifier phrase modifier - * - * Generated from protobuf enum QUANTMOD = 47; - */ - const QUANTMOD = 47; - /** - * Relative clause modifier - * - * Generated from protobuf enum RCMOD = 48; - */ - const RCMOD = 48; - /** - * Complementizer in relative clause - * - * Generated from protobuf enum RCMODREL = 49; - */ - const RCMODREL = 49; - /** - * Ellipsis without a preceding predicate - * - * Generated from protobuf enum RDROP = 50; - */ - const RDROP = 50; - /** - * Referent - * - * Generated from protobuf enum REF = 51; - */ - const REF = 51; - /** - * Remnant - * - * Generated from protobuf enum REMNANT = 52; - */ - const REMNANT = 52; - /** - * Reparandum - * - * Generated from protobuf enum REPARANDUM = 53; - */ - const REPARANDUM = 53; - /** - * Root - * - * Generated from protobuf enum ROOT = 54; - */ - const ROOT = 54; - /** - * Suffix specifying a unit of number - * - * Generated from protobuf enum SNUM = 55; - */ - const SNUM = 55; - /** - * Suffix - * - * Generated from protobuf enum SUFF = 56; - */ - const SUFF = 56; - /** - * Temporal modifier - * - * Generated from protobuf enum TMOD = 57; - */ - const TMOD = 57; - /** - * Topic marker - * - * Generated from protobuf enum TOPIC = 58; - */ - const TOPIC = 58; - /** - * Clause headed by an infinite form of the verb that modifies a noun - * - * Generated from protobuf enum VMOD = 59; - */ - const VMOD = 59; - /** - * Vocative - * - * Generated from protobuf enum VOCATIVE = 60; - */ - const VOCATIVE = 60; - /** - * Open clausal complement - * - * Generated from protobuf enum XCOMP = 61; - */ - const XCOMP = 61; - /** - * Name suffix - * - * Generated from protobuf enum SUFFIX = 62; - */ - const SUFFIX = 62; - /** - * Name title - * - * Generated from protobuf enum TITLE = 63; - */ - const TITLE = 63; - /** - * Adverbial phrase modifier - * - * Generated from protobuf enum ADVPHMOD = 64; - */ - const ADVPHMOD = 64; - /** - * Causative auxiliary - * - * Generated from protobuf enum AUXCAUS = 65; - */ - const AUXCAUS = 65; - /** - * Helper auxiliary - * - * Generated from protobuf enum AUXVV = 66; - */ - const AUXVV = 66; - /** - * Rentaishi (Prenominal modifier) - * - * Generated from protobuf enum DTMOD = 67; - */ - const DTMOD = 67; - /** - * Foreign words - * - * Generated from protobuf enum FOREIGN = 68; - */ - const FOREIGN = 68; - /** - * Keyword - * - * Generated from protobuf enum KW = 69; - */ - const KW = 69; - /** - * List for chains of comparable items - * - * Generated from protobuf enum LIST = 70; - */ - const PBLIST = 70; - /** - * Nominalized clause - * - * Generated from protobuf enum NOMC = 71; - */ - const NOMC = 71; - /** - * Nominalized clausal subject - * - * Generated from protobuf enum NOMCSUBJ = 72; - */ - const NOMCSUBJ = 72; - /** - * Nominalized clausal passive - * - * Generated from protobuf enum NOMCSUBJPASS = 73; - */ - const NOMCSUBJPASS = 73; - /** - * Compound of numeric modifier - * - * Generated from protobuf enum NUMC = 74; - */ - const NUMC = 74; - /** - * Copula - * - * Generated from protobuf enum COP = 75; - */ - const COP = 75; - /** - * Dislocated relation (for fronted/topicalized elements) - * - * Generated from protobuf enum DISLOCATED = 76; - */ - const DISLOCATED = 76; - /** - * Aspect marker - * - * Generated from protobuf enum ASP = 77; - */ - const ASP = 77; - /** - * Genitive modifier - * - * Generated from protobuf enum GMOD = 78; - */ - const GMOD = 78; - /** - * Genitive object - * - * Generated from protobuf enum GOBJ = 79; - */ - const GOBJ = 79; - /** - * Infinitival modifier - * - * Generated from protobuf enum INFMOD = 80; - */ - const INFMOD = 80; - /** - * Measure - * - * Generated from protobuf enum MES = 81; - */ - const MES = 81; - /** - * Nominal complement of a noun - * - * Generated from protobuf enum NCOMP = 82; - */ - const NCOMP = 82; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::ABBREV => 'ABBREV', - self::ACOMP => 'ACOMP', - self::ADVCL => 'ADVCL', - self::ADVMOD => 'ADVMOD', - self::AMOD => 'AMOD', - self::APPOS => 'APPOS', - self::ATTR => 'ATTR', - self::AUX => 'AUX', - self::AUXPASS => 'AUXPASS', - self::CC => 'CC', - self::CCOMP => 'CCOMP', - self::CONJ => 'CONJ', - self::CSUBJ => 'CSUBJ', - self::CSUBJPASS => 'CSUBJPASS', - self::DEP => 'DEP', - self::DET => 'DET', - self::DISCOURSE => 'DISCOURSE', - self::DOBJ => 'DOBJ', - self::EXPL => 'EXPL', - self::GOESWITH => 'GOESWITH', - self::IOBJ => 'IOBJ', - self::MARK => 'MARK', - self::MWE => 'MWE', - self::MWV => 'MWV', - self::NEG => 'NEG', - self::NN => 'NN', - self::NPADVMOD => 'NPADVMOD', - self::NSUBJ => 'NSUBJ', - self::NSUBJPASS => 'NSUBJPASS', - self::NUM => 'NUM', - self::NUMBER => 'NUMBER', - self::P => 'P', - self::PARATAXIS => 'PARATAXIS', - self::PARTMOD => 'PARTMOD', - self::PCOMP => 'PCOMP', - self::POBJ => 'POBJ', - self::POSS => 'POSS', - self::POSTNEG => 'POSTNEG', - self::PRECOMP => 'PRECOMP', - self::PRECONJ => 'PRECONJ', - self::PREDET => 'PREDET', - self::PREF => 'PREF', - self::PREP => 'PREP', - self::PRONL => 'PRONL', - self::PRT => 'PRT', - self::PS => 'PS', - self::QUANTMOD => 'QUANTMOD', - self::RCMOD => 'RCMOD', - self::RCMODREL => 'RCMODREL', - self::RDROP => 'RDROP', - self::REF => 'REF', - self::REMNANT => 'REMNANT', - self::REPARANDUM => 'REPARANDUM', - self::ROOT => 'ROOT', - self::SNUM => 'SNUM', - self::SUFF => 'SUFF', - self::TMOD => 'TMOD', - self::TOPIC => 'TOPIC', - self::VMOD => 'VMOD', - self::VOCATIVE => 'VOCATIVE', - self::XCOMP => 'XCOMP', - self::SUFFIX => 'SUFFIX', - self::TITLE => 'TITLE', - self::ADVPHMOD => 'ADVPHMOD', - self::AUXCAUS => 'AUXCAUS', - self::AUXVV => 'AUXVV', - self::DTMOD => 'DTMOD', - self::FOREIGN => 'FOREIGN', - self::KW => 'KW', - self::PBLIST => 'LIST', - self::NOMC => 'NOMC', - self::NOMCSUBJ => 'NOMCSUBJ', - self::NOMCSUBJPASS => 'NOMCSUBJPASS', - self::NUMC => 'NUMC', - self::COP => 'COP', - self::DISLOCATED => 'DISLOCATED', - self::ASP => 'ASP', - self::GMOD => 'GMOD', - self::GOBJ => 'GOBJ', - self::INFMOD => 'INFMOD', - self::MES => 'MES', - self::NCOMP => 'NCOMP', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has 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(Label::class, \Google\Cloud\Language\V1beta2\DependencyEdge_Label::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge_Label.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge_Label.php deleted file mode 100644 index ec8b85fdba85..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/DependencyEdge_Label.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.language.v1beta2.Document - */ -class Document extends \Google\Protobuf\Internal\Message -{ - /** - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document.Type type = 1; - */ - protected $type = 0; - /** - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string language = 4; - */ - protected $language = ''; - /** - * The web URI where the document comes from. This URI is not used for - * fetching the content, but as a hint for analyzing the document. - * - * Generated from protobuf field string reference_web_uri = 5; - */ - protected $reference_web_uri = ''; - /** - * Indicates how detected boilerplate(e.g. advertisements, copyright - * declarations, banners) should be handled for this document. If not - * specified, boilerplate will be treated the same as content. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document.BoilerplateHandling boilerplate_handling = 6; - */ - protected $boilerplate_handling = 0; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * @type string $content - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * @type string $gcs_content_uri - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * @type string $language - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * @type string $reference_web_uri - * The web URI where the document comes from. This URI is not used for - * fetching the content, but as a hint for analyzing the document. - * @type int $boilerplate_handling - * Indicates how detected boilerplate(e.g. advertisements, copyright - * declarations, banners) should be handled for this document. If not - * specified, boilerplate will be treated the same as content. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. If the type is not set or is `TYPE_UNSPECIFIED`, - * returns an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\Document\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * - * Generated from protobuf field string content = 2; - * @return string - */ - public function getContent() - { - return $this->readOneof(2); - } - - public function hasContent() - { - return $this->hasOneof(2); - } - - /** - * The content of the input in string format. - * Cloud audit logging exempt since it is based on user data. - * - * 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; - } - - /** - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * - * Generated from protobuf field string gcs_content_uri = 3; - * @return string - */ - public function getGcsContentUri() - { - return $this->readOneof(3); - } - - public function hasGcsContentUri() - { - return $this->hasOneof(3); - } - - /** - * The Google Cloud Storage URI where the file content is located. - * This URI must be of the form: gs://bucket_name/object_name. For more - * details, see https://cloud.google.com/storage/docs/reference-uris. - * NOTE: Cloud Storage object versioning is not supported. - * - * Generated from protobuf field string gcs_content_uri = 3; - * @param string $var - * @return $this - */ - public function setGcsContentUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string language = 4; - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * The language of the document (if not specified, the language is - * automatically detected). Both ISO and BCP-47 language codes are - * accepted.
- * [Language - * Support](https://cloud.google.com/natural-language/docs/languages) lists - * currently supported languages for each API method. If the language (either - * specified by the caller or automatically detected) is not supported by the - * called API method, an `INVALID_ARGUMENT` error is returned. - * - * Generated from protobuf field string language = 4; - * @param string $var - * @return $this - */ - public function setLanguage($var) - { - GPBUtil::checkString($var, True); - $this->language = $var; - - return $this; - } - - /** - * The web URI where the document comes from. This URI is not used for - * fetching the content, but as a hint for analyzing the document. - * - * Generated from protobuf field string reference_web_uri = 5; - * @return string - */ - public function getReferenceWebUri() - { - return $this->reference_web_uri; - } - - /** - * The web URI where the document comes from. This URI is not used for - * fetching the content, but as a hint for analyzing the document. - * - * Generated from protobuf field string reference_web_uri = 5; - * @param string $var - * @return $this - */ - public function setReferenceWebUri($var) - { - GPBUtil::checkString($var, True); - $this->reference_web_uri = $var; - - return $this; - } - - /** - * Indicates how detected boilerplate(e.g. advertisements, copyright - * declarations, banners) should be handled for this document. If not - * specified, boilerplate will be treated the same as content. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document.BoilerplateHandling boilerplate_handling = 6; - * @return int - */ - public function getBoilerplateHandling() - { - return $this->boilerplate_handling; - } - - /** - * Indicates how detected boilerplate(e.g. advertisements, copyright - * declarations, banners) should be handled for this document. If not - * specified, boilerplate will be treated the same as content. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Document.BoilerplateHandling boilerplate_handling = 6; - * @param int $var - * @return $this - */ - public function setBoilerplateHandling($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\Document\BoilerplateHandling::class); - $this->boilerplate_handling = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/BoilerplateHandling.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/BoilerplateHandling.php deleted file mode 100644 index 0b2e8a4c21c7..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/BoilerplateHandling.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.language.v1beta2.Document.BoilerplateHandling - */ -class BoilerplateHandling -{ - /** - * The boilerplate handling is not specified. - * - * Generated from protobuf enum BOILERPLATE_HANDLING_UNSPECIFIED = 0; - */ - const BOILERPLATE_HANDLING_UNSPECIFIED = 0; - /** - * Do not analyze detected boilerplate. Reference web URI is required for - * detecting boilerplate. - * - * Generated from protobuf enum SKIP_BOILERPLATE = 1; - */ - const SKIP_BOILERPLATE = 1; - /** - * Treat boilerplate the same as content. - * - * Generated from protobuf enum KEEP_BOILERPLATE = 2; - */ - const KEEP_BOILERPLATE = 2; - - private static $valueToName = [ - self::BOILERPLATE_HANDLING_UNSPECIFIED => 'BOILERPLATE_HANDLING_UNSPECIFIED', - self::SKIP_BOILERPLATE => 'SKIP_BOILERPLATE', - self::KEEP_BOILERPLATE => 'KEEP_BOILERPLATE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BoilerplateHandling::class, \Google\Cloud\Language\V1beta2\Document_BoilerplateHandling::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/Type.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/Type.php deleted file mode 100644 index 382148db46a1..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.language.v1beta2.Document.Type - */ -class Type -{ - /** - * The content type is not specified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Plain text - * - * Generated from protobuf enum PLAIN_TEXT = 1; - */ - const PLAIN_TEXT = 1; - /** - * HTML - * - * Generated from protobuf enum HTML = 2; - */ - const HTML = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::PLAIN_TEXT => 'PLAIN_TEXT', - self::HTML => 'HTML', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Language\V1beta2\Document_Type::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document_BoilerplateHandling.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document_BoilerplateHandling.php deleted file mode 100644 index 780023885950..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Document_BoilerplateHandling.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.language.v1beta2.EncodingType - */ -class EncodingType -{ - /** - * If `EncodingType` is not specified, encoding-dependent information (such as - * `begin_offset`) will be set at `-1`. - * - * Generated from protobuf enum NONE = 0; - */ - const NONE = 0; - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-8 encoding of the input. C++ and Go are examples of languages - * that use this encoding natively. - * - * Generated from protobuf enum UTF8 = 1; - */ - const UTF8 = 1; - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-16 encoding of the input. Java and JavaScript are examples of - * languages that use this encoding natively. - * - * Generated from protobuf enum UTF16 = 2; - */ - const UTF16 = 2; - /** - * Encoding-dependent information (such as `begin_offset`) is calculated based - * on the UTF-32 encoding of the input. Python is an example of a language - * that uses this encoding natively. - * - * Generated from protobuf enum UTF32 = 3; - */ - const UTF32 = 3; - - private static $valueToName = [ - self::NONE => 'NONE', - self::UTF8 => 'UTF8', - self::UTF16 => 'UTF16', - self::UTF32 => 'UTF32', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity.php deleted file mode 100644 index 846e4fa93d5b..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity.php +++ /dev/null @@ -1,293 +0,0 @@ -google.cloud.language.v1beta2.Entity - */ -class Entity extends \Google\Protobuf\Internal\Message -{ - /** - * The representative name for the entity. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The entity type. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Entity.Type type = 2; - */ - protected $type = 0; - /** - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - */ - private $metadata; - /** - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * Generated from protobuf field float salience = 4; - */ - protected $salience = 0.0; - /** - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.EntityMention mentions = 5; - */ - private $mentions; - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the aggregate sentiment expressed for this - * entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 6; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The representative name for the entity. - * @type int $type - * The entity type. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * @type float $salience - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * @type array<\Google\Cloud\Language\V1beta2\EntityMention>|\Google\Protobuf\Internal\RepeatedField $mentions - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * @type \Google\Cloud\Language\V1beta2\Sentiment $sentiment - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the aggregate sentiment expressed for this - * entity in the provided document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The representative name for the entity. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The representative name for the entity. - * - * 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 entity type. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Entity.Type type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The entity type. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Entity.Type type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\Entity\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * Generated from protobuf field map metadata = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Metadata associated with the entity. - * For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) - * and Knowledge Graph MID (`mid`), if they are available. For the metadata - * associated with other entity types, see the Type table below. - * - * 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; - } - - /** - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * Generated from protobuf field float salience = 4; - * @return float - */ - public function getSalience() - { - return $this->salience; - } - - /** - * The salience score associated with the entity in the [0, 1.0] range. - * The salience score for an entity provides information about the - * importance or centrality of that entity to the entire document text. - * Scores closer to 0 are less salient, while scores closer to 1.0 are highly - * salient. - * - * Generated from protobuf field float salience = 4; - * @param float $var - * @return $this - */ - public function setSalience($var) - { - GPBUtil::checkFloat($var); - $this->salience = $var; - - return $this; - } - - /** - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.EntityMention mentions = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMentions() - { - return $this->mentions; - } - - /** - * The mentions of this entity in the input document. The API currently - * supports proper noun mentions. - * - * Generated from protobuf field repeated .google.cloud.language.v1beta2.EntityMention mentions = 5; - * @param array<\Google\Cloud\Language\V1beta2\EntityMention>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMentions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Language\V1beta2\EntityMention::class); - $this->mentions = $arr; - - return $this; - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the aggregate sentiment expressed for this - * entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 6; - * @return \Google\Cloud\Language\V1beta2\Sentiment|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the aggregate sentiment expressed for this - * entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 6; - * @param \Google\Cloud\Language\V1beta2\Sentiment $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Sentiment::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity/Type.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity/Type.php deleted file mode 100644 index 128bbb2c7e0b..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Entity/Type.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.language.v1beta2.Entity.Type - */ -class Type -{ - /** - * Unknown - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Person - * - * Generated from protobuf enum PERSON = 1; - */ - const PERSON = 1; - /** - * Location - * - * Generated from protobuf enum LOCATION = 2; - */ - const LOCATION = 2; - /** - * Organization - * - * Generated from protobuf enum ORGANIZATION = 3; - */ - const ORGANIZATION = 3; - /** - * Event - * - * Generated from protobuf enum EVENT = 4; - */ - const EVENT = 4; - /** - * Artwork - * - * Generated from protobuf enum WORK_OF_ART = 5; - */ - const WORK_OF_ART = 5; - /** - * Consumer product - * - * Generated from protobuf enum CONSUMER_GOOD = 6; - */ - const CONSUMER_GOOD = 6; - /** - * Other types of entities - * - * Generated from protobuf enum OTHER = 7; - */ - const OTHER = 7; - /** - * Phone number - * The metadata lists the phone number, formatted according to local - * convention, plus whichever additional elements appear in the text: - * * `number` - the actual number, broken down into sections as per local - * convention - * * `national_prefix` - country code, if detected - * * `area_code` - region or area code, if detected - * * `extension` - phone extension (to be dialed after connection), if - * detected - * - * Generated from protobuf enum PHONE_NUMBER = 9; - */ - const PHONE_NUMBER = 9; - /** - * Address - * The metadata identifies the street number and locality plus whichever - * additional elements appear in the text: - * * `street_number` - street number - * * `locality` - city or town - * * `street_name` - street/route name, if detected - * * `postal_code` - postal code, if detected - * * `country` - country, if detected< - * * `broad_region` - administrative area, such as the state, if detected - * * `narrow_region` - smaller administrative area, such as county, if - * detected - * * `sublocality` - used in Asian addresses to demark a district within a - * city, if detected - * - * Generated from protobuf enum ADDRESS = 10; - */ - const ADDRESS = 10; - /** - * Date - * The metadata identifies the components of the date: - * * `year` - four digit year, if detected - * * `month` - two digit month number, if detected - * * `day` - two digit day number, if detected - * - * Generated from protobuf enum DATE = 11; - */ - const DATE = 11; - /** - * Number - * The metadata is the number itself. - * - * Generated from protobuf enum NUMBER = 12; - */ - const NUMBER = 12; - /** - * Price - * The metadata identifies the `value` and `currency`. - * - * Generated from protobuf enum PRICE = 13; - */ - const PRICE = 13; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::PERSON => 'PERSON', - self::LOCATION => 'LOCATION', - self::ORGANIZATION => 'ORGANIZATION', - self::EVENT => 'EVENT', - self::WORK_OF_ART => 'WORK_OF_ART', - self::CONSUMER_GOOD => 'CONSUMER_GOOD', - self::OTHER => 'OTHER', - self::PHONE_NUMBER => 'PHONE_NUMBER', - self::ADDRESS => 'ADDRESS', - self::DATE => 'DATE', - self::NUMBER => 'NUMBER', - self::PRICE => 'PRICE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Language\V1beta2\Entity_Type::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention.php deleted file mode 100644 index 9f3769212df5..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.language.v1beta2.EntityMention - */ -class EntityMention extends \Google\Protobuf\Internal\Message -{ - /** - * The mention text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - */ - protected $text = null; - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EntityMention.Type type = 2; - */ - protected $type = 0; - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the sentiment expressed for this mention of - * the entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 3; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\TextSpan $text - * The mention text. - * @type int $type - * The type of the entity mention. - * @type \Google\Cloud\Language\V1beta2\Sentiment $sentiment - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the sentiment expressed for this mention of - * the entity in the provided document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The mention text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - * @return \Google\Cloud\Language\V1beta2\TextSpan|null - */ - public function getText() - { - return $this->text; - } - - public function hasText() - { - return isset($this->text); - } - - public function clearText() - { - unset($this->text); - } - - /** - * The mention text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - * @param \Google\Cloud\Language\V1beta2\TextSpan $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\TextSpan::class); - $this->text = $var; - - return $this; - } - - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EntityMention.Type type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the entity mention. - * - * Generated from protobuf field .google.cloud.language.v1beta2.EntityMention.Type type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\EntityMention\Type::class); - $this->type = $var; - - return $this; - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the sentiment expressed for this mention of - * the entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 3; - * @return \Google\Cloud\Language\V1beta2\Sentiment|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * For calls to [AnalyzeEntitySentiment][] or if - * [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - * true, this field will contain the sentiment expressed for this mention of - * the entity in the provided document. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 3; - * @param \Google\Cloud\Language\V1beta2\Sentiment $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Sentiment::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention/Type.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention/Type.php deleted file mode 100644 index 75131e71c1d9..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.language.v1beta2.EntityMention.Type - */ -class Type -{ - /** - * Unknown - * - * Generated from protobuf enum TYPE_UNKNOWN = 0; - */ - const TYPE_UNKNOWN = 0; - /** - * Proper name - * - * Generated from protobuf enum PROPER = 1; - */ - const PROPER = 1; - /** - * Common noun (or noun compound) - * - * Generated from protobuf enum COMMON = 2; - */ - const COMMON = 2; - - private static $valueToName = [ - self::TYPE_UNKNOWN => 'TYPE_UNKNOWN', - self::PROPER => 'PROPER', - self::COMMON => 'COMMON', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Language\V1beta2\EntityMention_Type::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention_Type.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention_Type.php deleted file mode 100644 index 1202dcaa1ec0..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/EntityMention_Type.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.language.v1beta2.LanguageService/AnalyzeSentiment', - $argument, - ['\Google\Cloud\Language\V1beta2\AnalyzeSentimentResponse', 'decode'], - $metadata, $options); - } - - /** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * @param \Google\Cloud\Language\V1beta2\AnalyzeEntitiesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AnalyzeEntities(\Google\Cloud\Language\V1beta2\AnalyzeEntitiesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.language.v1beta2.LanguageService/AnalyzeEntities', - $argument, - ['\Google\Cloud\Language\V1beta2\AnalyzeEntitiesResponse', 'decode'], - $metadata, $options); - } - - /** - * Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes - * sentiment associated with each entity and its mentions. - * @param \Google\Cloud\Language\V1beta2\AnalyzeEntitySentimentRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AnalyzeEntitySentiment(\Google\Cloud\Language\V1beta2\AnalyzeEntitySentimentRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.language.v1beta2.LanguageService/AnalyzeEntitySentiment', - $argument, - ['\Google\Cloud\Language\V1beta2\AnalyzeEntitySentimentResponse', 'decode'], - $metadata, $options); - } - - /** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part of speech tags, dependency trees, and other - * properties. - * @param \Google\Cloud\Language\V1beta2\AnalyzeSyntaxRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AnalyzeSyntax(\Google\Cloud\Language\V1beta2\AnalyzeSyntaxRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.language.v1beta2.LanguageService/AnalyzeSyntax', - $argument, - ['\Google\Cloud\Language\V1beta2\AnalyzeSyntaxResponse', 'decode'], - $metadata, $options); - } - - /** - * Classifies a document into categories. - * @param \Google\Cloud\Language\V1beta2\ClassifyTextRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ClassifyText(\Google\Cloud\Language\V1beta2\ClassifyTextRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.language.v1beta2.LanguageService/ClassifyText', - $argument, - ['\Google\Cloud\Language\V1beta2\ClassifyTextResponse', 'decode'], - $metadata, $options); - } - - /** - * A convenience method that provides all syntax, sentiment, entity, and - * classification features in one call. - * @param \Google\Cloud\Language\V1beta2\AnnotateTextRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function AnnotateText(\Google\Cloud\Language\V1beta2\AnnotateTextRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.language.v1beta2.LanguageService/AnnotateText', - $argument, - ['\Google\Cloud\Language\V1beta2\AnnotateTextResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech.php deleted file mode 100644 index 5c739918469e..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech.php +++ /dev/null @@ -1,441 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech - */ -class PartOfSpeech extends \Google\Protobuf\Internal\Message -{ - /** - * The part of speech tag. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tag tag = 1; - */ - protected $tag = 0; - /** - * The grammatical aspect. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Aspect aspect = 2; - */ - protected $aspect = 0; - /** - * The grammatical case. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Case case = 3; - */ - protected $case = 0; - /** - * The grammatical form. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Form form = 4; - */ - protected $form = 0; - /** - * The grammatical gender. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Gender gender = 5; - */ - protected $gender = 0; - /** - * The grammatical mood. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Mood mood = 6; - */ - protected $mood = 0; - /** - * The grammatical number. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Number number = 7; - */ - protected $number = 0; - /** - * The grammatical person. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Person person = 8; - */ - protected $person = 0; - /** - * The grammatical properness. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Proper proper = 9; - */ - protected $proper = 0; - /** - * The grammatical reciprocity. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10; - */ - protected $reciprocity = 0; - /** - * The grammatical tense. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tense tense = 11; - */ - protected $tense = 0; - /** - * The grammatical voice. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12; - */ - protected $voice = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $tag - * The part of speech tag. - * @type int $aspect - * The grammatical aspect. - * @type int $case - * The grammatical case. - * @type int $form - * The grammatical form. - * @type int $gender - * The grammatical gender. - * @type int $mood - * The grammatical mood. - * @type int $number - * The grammatical number. - * @type int $person - * The grammatical person. - * @type int $proper - * The grammatical properness. - * @type int $reciprocity - * The grammatical reciprocity. - * @type int $tense - * The grammatical tense. - * @type int $voice - * The grammatical voice. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The part of speech tag. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tag tag = 1; - * @return int - */ - public function getTag() - { - return $this->tag; - } - - /** - * The part of speech tag. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tag tag = 1; - * @param int $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Tag::class); - $this->tag = $var; - - return $this; - } - - /** - * The grammatical aspect. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Aspect aspect = 2; - * @return int - */ - public function getAspect() - { - return $this->aspect; - } - - /** - * The grammatical aspect. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Aspect aspect = 2; - * @param int $var - * @return $this - */ - public function setAspect($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Aspect::class); - $this->aspect = $var; - - return $this; - } - - /** - * The grammatical case. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Case case = 3; - * @return int - */ - public function getCase() - { - return $this->case; - } - - /** - * The grammatical case. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Case case = 3; - * @param int $var - * @return $this - */ - public function setCase($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\PBCase::class); - $this->case = $var; - - return $this; - } - - /** - * The grammatical form. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Form form = 4; - * @return int - */ - public function getForm() - { - return $this->form; - } - - /** - * The grammatical form. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Form form = 4; - * @param int $var - * @return $this - */ - public function setForm($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Form::class); - $this->form = $var; - - return $this; - } - - /** - * The grammatical gender. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Gender gender = 5; - * @return int - */ - public function getGender() - { - return $this->gender; - } - - /** - * The grammatical gender. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Gender gender = 5; - * @param int $var - * @return $this - */ - public function setGender($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Gender::class); - $this->gender = $var; - - return $this; - } - - /** - * The grammatical mood. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Mood mood = 6; - * @return int - */ - public function getMood() - { - return $this->mood; - } - - /** - * The grammatical mood. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Mood mood = 6; - * @param int $var - * @return $this - */ - public function setMood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Mood::class); - $this->mood = $var; - - return $this; - } - - /** - * The grammatical number. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Number number = 7; - * @return int - */ - public function getNumber() - { - return $this->number; - } - - /** - * The grammatical number. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Number number = 7; - * @param int $var - * @return $this - */ - public function setNumber($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Number::class); - $this->number = $var; - - return $this; - } - - /** - * The grammatical person. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Person person = 8; - * @return int - */ - public function getPerson() - { - return $this->person; - } - - /** - * The grammatical person. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Person person = 8; - * @param int $var - * @return $this - */ - public function setPerson($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Person::class); - $this->person = $var; - - return $this; - } - - /** - * The grammatical properness. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Proper proper = 9; - * @return int - */ - public function getProper() - { - return $this->proper; - } - - /** - * The grammatical properness. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Proper proper = 9; - * @param int $var - * @return $this - */ - public function setProper($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Proper::class); - $this->proper = $var; - - return $this; - } - - /** - * The grammatical reciprocity. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10; - * @return int - */ - public function getReciprocity() - { - return $this->reciprocity; - } - - /** - * The grammatical reciprocity. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10; - * @param int $var - * @return $this - */ - public function setReciprocity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Reciprocity::class); - $this->reciprocity = $var; - - return $this; - } - - /** - * The grammatical tense. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tense tense = 11; - * @return int - */ - public function getTense() - { - return $this->tense; - } - - /** - * The grammatical tense. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Tense tense = 11; - * @param int $var - * @return $this - */ - public function setTense($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Tense::class); - $this->tense = $var; - - return $this; - } - - /** - * The grammatical voice. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12; - * @return int - */ - public function getVoice() - { - return $this->voice; - } - - /** - * The grammatical voice. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12; - * @param int $var - * @return $this - */ - public function setVoice($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Language\V1beta2\PartOfSpeech\Voice::class); - $this->voice = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Aspect.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Aspect.php deleted file mode 100644 index 48882ba09ced..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Aspect.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Aspect - */ -class Aspect -{ - /** - * Aspect is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum ASPECT_UNKNOWN = 0; - */ - const ASPECT_UNKNOWN = 0; - /** - * Perfective - * - * Generated from protobuf enum PERFECTIVE = 1; - */ - const PERFECTIVE = 1; - /** - * Imperfective - * - * Generated from protobuf enum IMPERFECTIVE = 2; - */ - const IMPERFECTIVE = 2; - /** - * Progressive - * - * Generated from protobuf enum PROGRESSIVE = 3; - */ - const PROGRESSIVE = 3; - - private static $valueToName = [ - self::ASPECT_UNKNOWN => 'ASPECT_UNKNOWN', - self::PERFECTIVE => 'PERFECTIVE', - self::IMPERFECTIVE => 'IMPERFECTIVE', - self::PROGRESSIVE => 'PROGRESSIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Aspect::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Aspect::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Form.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Form.php deleted file mode 100644 index b3c1847352d3..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Form.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Form - */ -class Form -{ - /** - * Form is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum FORM_UNKNOWN = 0; - */ - const FORM_UNKNOWN = 0; - /** - * Adnomial - * - * Generated from protobuf enum ADNOMIAL = 1; - */ - const ADNOMIAL = 1; - /** - * Auxiliary - * - * Generated from protobuf enum AUXILIARY = 2; - */ - const AUXILIARY = 2; - /** - * Complementizer - * - * Generated from protobuf enum COMPLEMENTIZER = 3; - */ - const COMPLEMENTIZER = 3; - /** - * Final ending - * - * Generated from protobuf enum FINAL_ENDING = 4; - */ - const FINAL_ENDING = 4; - /** - * Gerund - * - * Generated from protobuf enum GERUND = 5; - */ - const GERUND = 5; - /** - * Realis - * - * Generated from protobuf enum REALIS = 6; - */ - const REALIS = 6; - /** - * Irrealis - * - * Generated from protobuf enum IRREALIS = 7; - */ - const IRREALIS = 7; - /** - * Short form - * - * Generated from protobuf enum SHORT = 8; - */ - const SHORT = 8; - /** - * Long form - * - * Generated from protobuf enum LONG = 9; - */ - const LONG = 9; - /** - * Order form - * - * Generated from protobuf enum ORDER = 10; - */ - const ORDER = 10; - /** - * Specific form - * - * Generated from protobuf enum SPECIFIC = 11; - */ - const SPECIFIC = 11; - - private static $valueToName = [ - self::FORM_UNKNOWN => 'FORM_UNKNOWN', - self::ADNOMIAL => 'ADNOMIAL', - self::AUXILIARY => 'AUXILIARY', - self::COMPLEMENTIZER => 'COMPLEMENTIZER', - self::FINAL_ENDING => 'FINAL_ENDING', - self::GERUND => 'GERUND', - self::REALIS => 'REALIS', - self::IRREALIS => 'IRREALIS', - self::SHORT => 'SHORT', - self::LONG => 'LONG', - self::ORDER => 'ORDER', - self::SPECIFIC => 'SPECIFIC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Form::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Form::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Gender.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Gender.php deleted file mode 100644 index 8481abbc6b93..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Gender.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Gender - */ -class Gender -{ - /** - * Gender is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum GENDER_UNKNOWN = 0; - */ - const GENDER_UNKNOWN = 0; - /** - * Feminine - * - * Generated from protobuf enum FEMININE = 1; - */ - const FEMININE = 1; - /** - * Masculine - * - * Generated from protobuf enum MASCULINE = 2; - */ - const MASCULINE = 2; - /** - * Neuter - * - * Generated from protobuf enum NEUTER = 3; - */ - const NEUTER = 3; - - private static $valueToName = [ - self::GENDER_UNKNOWN => 'GENDER_UNKNOWN', - self::FEMININE => 'FEMININE', - self::MASCULINE => 'MASCULINE', - self::NEUTER => 'NEUTER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Gender::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Gender::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Mood.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Mood.php deleted file mode 100644 index 8857bc7dcd44..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Mood.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Mood - */ -class Mood -{ - /** - * Mood is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum MOOD_UNKNOWN = 0; - */ - const MOOD_UNKNOWN = 0; - /** - * Conditional - * - * Generated from protobuf enum CONDITIONAL_MOOD = 1; - */ - const CONDITIONAL_MOOD = 1; - /** - * Imperative - * - * Generated from protobuf enum IMPERATIVE = 2; - */ - const IMPERATIVE = 2; - /** - * Indicative - * - * Generated from protobuf enum INDICATIVE = 3; - */ - const INDICATIVE = 3; - /** - * Interrogative - * - * Generated from protobuf enum INTERROGATIVE = 4; - */ - const INTERROGATIVE = 4; - /** - * Jussive - * - * Generated from protobuf enum JUSSIVE = 5; - */ - const JUSSIVE = 5; - /** - * Subjunctive - * - * Generated from protobuf enum SUBJUNCTIVE = 6; - */ - const SUBJUNCTIVE = 6; - - private static $valueToName = [ - self::MOOD_UNKNOWN => 'MOOD_UNKNOWN', - self::CONDITIONAL_MOOD => 'CONDITIONAL_MOOD', - self::IMPERATIVE => 'IMPERATIVE', - self::INDICATIVE => 'INDICATIVE', - self::INTERROGATIVE => 'INTERROGATIVE', - self::JUSSIVE => 'JUSSIVE', - self::SUBJUNCTIVE => 'SUBJUNCTIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Mood::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Mood::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Number.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Number.php deleted file mode 100644 index f3c9eddeaf95..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Number.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Number - */ -class Number -{ - /** - * Number is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum NUMBER_UNKNOWN = 0; - */ - const NUMBER_UNKNOWN = 0; - /** - * Singular - * - * Generated from protobuf enum SINGULAR = 1; - */ - const SINGULAR = 1; - /** - * Plural - * - * Generated from protobuf enum PLURAL = 2; - */ - const PLURAL = 2; - /** - * Dual - * - * Generated from protobuf enum DUAL = 3; - */ - const DUAL = 3; - - private static $valueToName = [ - self::NUMBER_UNKNOWN => 'NUMBER_UNKNOWN', - self::SINGULAR => 'SINGULAR', - self::PLURAL => 'PLURAL', - self::DUAL => 'DUAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Number::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Number::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/PBCase.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/PBCase.php deleted file mode 100644 index f110d8846a1a..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/PBCase.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Case - */ -class PBCase -{ - /** - * Case is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum CASE_UNKNOWN = 0; - */ - const CASE_UNKNOWN = 0; - /** - * Accusative - * - * Generated from protobuf enum ACCUSATIVE = 1; - */ - const ACCUSATIVE = 1; - /** - * Adverbial - * - * Generated from protobuf enum ADVERBIAL = 2; - */ - const ADVERBIAL = 2; - /** - * Complementive - * - * Generated from protobuf enum COMPLEMENTIVE = 3; - */ - const COMPLEMENTIVE = 3; - /** - * Dative - * - * Generated from protobuf enum DATIVE = 4; - */ - const DATIVE = 4; - /** - * Genitive - * - * Generated from protobuf enum GENITIVE = 5; - */ - const GENITIVE = 5; - /** - * Instrumental - * - * Generated from protobuf enum INSTRUMENTAL = 6; - */ - const INSTRUMENTAL = 6; - /** - * Locative - * - * Generated from protobuf enum LOCATIVE = 7; - */ - const LOCATIVE = 7; - /** - * Nominative - * - * Generated from protobuf enum NOMINATIVE = 8; - */ - const NOMINATIVE = 8; - /** - * Oblique - * - * Generated from protobuf enum OBLIQUE = 9; - */ - const OBLIQUE = 9; - /** - * Partitive - * - * Generated from protobuf enum PARTITIVE = 10; - */ - const PARTITIVE = 10; - /** - * Prepositional - * - * Generated from protobuf enum PREPOSITIONAL = 11; - */ - const PREPOSITIONAL = 11; - /** - * Reflexive - * - * Generated from protobuf enum REFLEXIVE_CASE = 12; - */ - const REFLEXIVE_CASE = 12; - /** - * Relative - * - * Generated from protobuf enum RELATIVE_CASE = 13; - */ - const RELATIVE_CASE = 13; - /** - * Vocative - * - * Generated from protobuf enum VOCATIVE = 14; - */ - const VOCATIVE = 14; - - private static $valueToName = [ - self::CASE_UNKNOWN => 'CASE_UNKNOWN', - self::ACCUSATIVE => 'ACCUSATIVE', - self::ADVERBIAL => 'ADVERBIAL', - self::COMPLEMENTIVE => 'COMPLEMENTIVE', - self::DATIVE => 'DATIVE', - self::GENITIVE => 'GENITIVE', - self::INSTRUMENTAL => 'INSTRUMENTAL', - self::LOCATIVE => 'LOCATIVE', - self::NOMINATIVE => 'NOMINATIVE', - self::OBLIQUE => 'OBLIQUE', - self::PARTITIVE => 'PARTITIVE', - self::PREPOSITIONAL => 'PREPOSITIONAL', - self::REFLEXIVE_CASE => 'REFLEXIVE_CASE', - self::RELATIVE_CASE => 'RELATIVE_CASE', - self::VOCATIVE => 'VOCATIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PBCase::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Case::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Person.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Person.php deleted file mode 100644 index 9584fd35c7ca..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Person.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Person - */ -class Person -{ - /** - * Person is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum PERSON_UNKNOWN = 0; - */ - const PERSON_UNKNOWN = 0; - /** - * First - * - * Generated from protobuf enum FIRST = 1; - */ - const FIRST = 1; - /** - * Second - * - * Generated from protobuf enum SECOND = 2; - */ - const SECOND = 2; - /** - * Third - * - * Generated from protobuf enum THIRD = 3; - */ - const THIRD = 3; - /** - * Reflexive - * - * Generated from protobuf enum REFLEXIVE_PERSON = 4; - */ - const REFLEXIVE_PERSON = 4; - - private static $valueToName = [ - self::PERSON_UNKNOWN => 'PERSON_UNKNOWN', - self::FIRST => 'FIRST', - self::SECOND => 'SECOND', - self::THIRD => 'THIRD', - self::REFLEXIVE_PERSON => 'REFLEXIVE_PERSON', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Person::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Person::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Proper.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Proper.php deleted file mode 100644 index d71aded410d6..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Proper.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Proper - */ -class Proper -{ - /** - * Proper is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum PROPER_UNKNOWN = 0; - */ - const PROPER_UNKNOWN = 0; - /** - * Proper - * - * Generated from protobuf enum PROPER = 1; - */ - const PROPER = 1; - /** - * Not proper - * - * Generated from protobuf enum NOT_PROPER = 2; - */ - const NOT_PROPER = 2; - - private static $valueToName = [ - self::PROPER_UNKNOWN => 'PROPER_UNKNOWN', - self::PROPER => 'PROPER', - self::NOT_PROPER => 'NOT_PROPER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Proper::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Proper::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Reciprocity.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Reciprocity.php deleted file mode 100644 index aae22e4dd765..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Reciprocity.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Reciprocity - */ -class Reciprocity -{ - /** - * Reciprocity is not applicable in the analyzed language or is not - * predicted. - * - * Generated from protobuf enum RECIPROCITY_UNKNOWN = 0; - */ - const RECIPROCITY_UNKNOWN = 0; - /** - * Reciprocal - * - * Generated from protobuf enum RECIPROCAL = 1; - */ - const RECIPROCAL = 1; - /** - * Non-reciprocal - * - * Generated from protobuf enum NON_RECIPROCAL = 2; - */ - const NON_RECIPROCAL = 2; - - private static $valueToName = [ - self::RECIPROCITY_UNKNOWN => 'RECIPROCITY_UNKNOWN', - self::RECIPROCAL => 'RECIPROCAL', - self::NON_RECIPROCAL => 'NON_RECIPROCAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Reciprocity::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Reciprocity::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tag.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tag.php deleted file mode 100644 index 0fb0d7e7e813..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tag.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Tag - */ -class Tag -{ - /** - * Unknown - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Adjective - * - * Generated from protobuf enum ADJ = 1; - */ - const ADJ = 1; - /** - * Adposition (preposition and postposition) - * - * Generated from protobuf enum ADP = 2; - */ - const ADP = 2; - /** - * Adverb - * - * Generated from protobuf enum ADV = 3; - */ - const ADV = 3; - /** - * Conjunction - * - * Generated from protobuf enum CONJ = 4; - */ - const CONJ = 4; - /** - * Determiner - * - * Generated from protobuf enum DET = 5; - */ - const DET = 5; - /** - * Noun (common and proper) - * - * Generated from protobuf enum NOUN = 6; - */ - const NOUN = 6; - /** - * Cardinal number - * - * Generated from protobuf enum NUM = 7; - */ - const NUM = 7; - /** - * Pronoun - * - * Generated from protobuf enum PRON = 8; - */ - const PRON = 8; - /** - * Particle or other function word - * - * Generated from protobuf enum PRT = 9; - */ - const PRT = 9; - /** - * Punctuation - * - * Generated from protobuf enum PUNCT = 10; - */ - const PUNCT = 10; - /** - * Verb (all tenses and modes) - * - * Generated from protobuf enum VERB = 11; - */ - const VERB = 11; - /** - * Other: foreign words, typos, abbreviations - * - * Generated from protobuf enum X = 12; - */ - const X = 12; - /** - * Affix - * - * Generated from protobuf enum AFFIX = 13; - */ - const AFFIX = 13; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::ADJ => 'ADJ', - self::ADP => 'ADP', - self::ADV => 'ADV', - self::CONJ => 'CONJ', - self::DET => 'DET', - self::NOUN => 'NOUN', - self::NUM => 'NUM', - self::PRON => 'PRON', - self::PRT => 'PRT', - self::PUNCT => 'PUNCT', - self::VERB => 'VERB', - self::X => 'X', - self::AFFIX => 'AFFIX', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Tag::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Tag::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tense.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tense.php deleted file mode 100644 index e9e4e2000ad0..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Tense.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Tense - */ -class Tense -{ - /** - * Tense is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum TENSE_UNKNOWN = 0; - */ - const TENSE_UNKNOWN = 0; - /** - * Conditional - * - * Generated from protobuf enum CONDITIONAL_TENSE = 1; - */ - const CONDITIONAL_TENSE = 1; - /** - * Future - * - * Generated from protobuf enum FUTURE = 2; - */ - const FUTURE = 2; - /** - * Past - * - * Generated from protobuf enum PAST = 3; - */ - const PAST = 3; - /** - * Present - * - * Generated from protobuf enum PRESENT = 4; - */ - const PRESENT = 4; - /** - * Imperfect - * - * Generated from protobuf enum IMPERFECT = 5; - */ - const IMPERFECT = 5; - /** - * Pluperfect - * - * Generated from protobuf enum PLUPERFECT = 6; - */ - const PLUPERFECT = 6; - - private static $valueToName = [ - self::TENSE_UNKNOWN => 'TENSE_UNKNOWN', - self::CONDITIONAL_TENSE => 'CONDITIONAL_TENSE', - self::FUTURE => 'FUTURE', - self::PAST => 'PAST', - self::PRESENT => 'PRESENT', - self::IMPERFECT => 'IMPERFECT', - self::PLUPERFECT => 'PLUPERFECT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Tense::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Tense::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Voice.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Voice.php deleted file mode 100644 index b1cfd65aeaa9..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech/Voice.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.language.v1beta2.PartOfSpeech.Voice - */ -class Voice -{ - /** - * Voice is not applicable in the analyzed language or is not predicted. - * - * Generated from protobuf enum VOICE_UNKNOWN = 0; - */ - const VOICE_UNKNOWN = 0; - /** - * Active - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Causative - * - * Generated from protobuf enum CAUSATIVE = 2; - */ - const CAUSATIVE = 2; - /** - * Passive - * - * Generated from protobuf enum PASSIVE = 3; - */ - const PASSIVE = 3; - - private static $valueToName = [ - self::VOICE_UNKNOWN => 'VOICE_UNKNOWN', - self::ACTIVE => 'ACTIVE', - self::CAUSATIVE => 'CAUSATIVE', - self::PASSIVE => 'PASSIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Voice::class, \Google\Cloud\Language\V1beta2\PartOfSpeech_Voice::class); - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Aspect.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Aspect.php deleted file mode 100644 index 15059e3520b9..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/PartOfSpeech_Aspect.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.language.v1beta2.Sentence - */ -class Sentence extends \Google\Protobuf\Internal\Message -{ - /** - * The sentence text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - */ - protected $text = null; - /** - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to - * true, this field will contain the sentiment for the sentence. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 2; - */ - protected $sentiment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\TextSpan $text - * The sentence text. - * @type \Google\Cloud\Language\V1beta2\Sentiment $sentiment - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to - * true, this field will contain the sentiment for the sentence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The sentence text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - * @return \Google\Cloud\Language\V1beta2\TextSpan|null - */ - public function getText() - { - return $this->text; - } - - public function hasText() - { - return isset($this->text); - } - - public function clearText() - { - unset($this->text); - } - - /** - * The sentence text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - * @param \Google\Cloud\Language\V1beta2\TextSpan $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\TextSpan::class); - $this->text = $var; - - return $this; - } - - /** - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to - * true, this field will contain the sentiment for the sentence. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 2; - * @return \Google\Cloud\Language\V1beta2\Sentiment|null - */ - public function getSentiment() - { - return $this->sentiment; - } - - public function hasSentiment() - { - return isset($this->sentiment); - } - - public function clearSentiment() - { - unset($this->sentiment); - } - - /** - * For calls to [AnalyzeSentiment][] or if - * [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to - * true, this field will contain the sentiment for the sentence. - * - * Generated from protobuf field .google.cloud.language.v1beta2.Sentiment sentiment = 2; - * @param \Google\Cloud\Language\V1beta2\Sentiment $var - * @return $this - */ - public function setSentiment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\Sentiment::class); - $this->sentiment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentiment.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentiment.php deleted file mode 100644 index 5dd926e6ae2d..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Sentiment.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.language.v1beta2.Sentiment - */ -class Sentiment extends \Google\Protobuf\Internal\Message -{ - /** - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * Generated from protobuf field float magnitude = 2; - */ - protected $magnitude = 0.0; - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * Generated from protobuf field float score = 3; - */ - protected $score = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $magnitude - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * @type float $score - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * Generated from protobuf field float magnitude = 2; - * @return float - */ - public function getMagnitude() - { - return $this->magnitude; - } - - /** - * A non-negative number in the [0, +inf) range, which represents - * the absolute magnitude of sentiment regardless of score (positive or - * negative). - * - * Generated from protobuf field float magnitude = 2; - * @param float $var - * @return $this - */ - public function setMagnitude($var) - { - GPBUtil::checkFloat($var); - $this->magnitude = $var; - - return $this; - } - - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * Generated from protobuf field float score = 3; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Sentiment score between -1.0 (negative sentiment) and 1.0 - * (positive sentiment). - * - * Generated from protobuf field float score = 3; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/TextSpan.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/TextSpan.php deleted file mode 100644 index 6e2c1de1b691..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/TextSpan.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.language.v1beta2.TextSpan - */ -class TextSpan extends \Google\Protobuf\Internal\Message -{ - /** - * The content of the output text. - * - * Generated from protobuf field string content = 1; - */ - protected $content = ''; - /** - * The API calculates the beginning offset of the content in the original - * document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request. - * - * Generated from protobuf field int32 begin_offset = 2; - */ - protected $begin_offset = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * The content of the output text. - * @type int $begin_offset - * The API calculates the beginning offset of the content in the original - * document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The content of the output text. - * - * Generated from protobuf field string content = 1; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * The content of the output text. - * - * 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 API calculates the beginning offset of the content in the original - * document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request. - * - * Generated from protobuf field int32 begin_offset = 2; - * @return int - */ - public function getBeginOffset() - { - return $this->begin_offset; - } - - /** - * The API calculates the beginning offset of the content in the original - * document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request. - * - * Generated from protobuf field int32 begin_offset = 2; - * @param int $var - * @return $this - */ - public function setBeginOffset($var) - { - GPBUtil::checkInt32($var); - $this->begin_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Token.php b/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Token.php deleted file mode 100644 index f441782ad3a0..000000000000 --- a/owl-bot-staging/Language/v1beta2/proto/src/Google/Cloud/Language/V1beta2/Token.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.language.v1beta2.Token - */ -class Token extends \Google\Protobuf\Internal\Message -{ - /** - * The token text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - */ - protected $text = null; - /** - * Parts of speech tag for this token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech part_of_speech = 2; - */ - protected $part_of_speech = null; - /** - * Dependency tree parse for this token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge dependency_edge = 3; - */ - protected $dependency_edge = null; - /** - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * - * Generated from protobuf field string lemma = 4; - */ - protected $lemma = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Language\V1beta2\TextSpan $text - * The token text. - * @type \Google\Cloud\Language\V1beta2\PartOfSpeech $part_of_speech - * Parts of speech tag for this token. - * @type \Google\Cloud\Language\V1beta2\DependencyEdge $dependency_edge - * Dependency tree parse for this token. - * @type string $lemma - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce(); - parent::__construct($data); - } - - /** - * The token text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - * @return \Google\Cloud\Language\V1beta2\TextSpan|null - */ - public function getText() - { - return $this->text; - } - - public function hasText() - { - return isset($this->text); - } - - public function clearText() - { - unset($this->text); - } - - /** - * The token text. - * - * Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1; - * @param \Google\Cloud\Language\V1beta2\TextSpan $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\TextSpan::class); - $this->text = $var; - - return $this; - } - - /** - * Parts of speech tag for this token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech part_of_speech = 2; - * @return \Google\Cloud\Language\V1beta2\PartOfSpeech|null - */ - public function getPartOfSpeech() - { - return $this->part_of_speech; - } - - public function hasPartOfSpeech() - { - return isset($this->part_of_speech); - } - - public function clearPartOfSpeech() - { - unset($this->part_of_speech); - } - - /** - * Parts of speech tag for this token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech part_of_speech = 2; - * @param \Google\Cloud\Language\V1beta2\PartOfSpeech $var - * @return $this - */ - public function setPartOfSpeech($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\PartOfSpeech::class); - $this->part_of_speech = $var; - - return $this; - } - - /** - * Dependency tree parse for this token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge dependency_edge = 3; - * @return \Google\Cloud\Language\V1beta2\DependencyEdge|null - */ - public function getDependencyEdge() - { - return $this->dependency_edge; - } - - public function hasDependencyEdge() - { - return isset($this->dependency_edge); - } - - public function clearDependencyEdge() - { - unset($this->dependency_edge); - } - - /** - * Dependency tree parse for this token. - * - * Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge dependency_edge = 3; - * @param \Google\Cloud\Language\V1beta2\DependencyEdge $var - * @return $this - */ - public function setDependencyEdge($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\DependencyEdge::class); - $this->dependency_edge = $var; - - return $this; - } - - /** - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * - * Generated from protobuf field string lemma = 4; - * @return string - */ - public function getLemma() - { - return $this->lemma; - } - - /** - * [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - * - * Generated from protobuf field string lemma = 4; - * @param string $var - * @return $this - */ - public function setLemma($var) - { - GPBUtil::checkString($var, True); - $this->lemma = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entities.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entities.php deleted file mode 100644 index f73a7447b62f..000000000000 --- a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entities.php +++ /dev/null @@ -1,59 +0,0 @@ -analyzeEntities($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1beta2_generated_LanguageService_AnalyzeEntities_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entity_sentiment.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entity_sentiment.php deleted file mode 100644 index 29b7cea16c02..000000000000 --- a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_entity_sentiment.php +++ /dev/null @@ -1,58 +0,0 @@ -analyzeEntitySentiment($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1beta2_generated_LanguageService_AnalyzeEntitySentiment_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_sentiment.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_sentiment.php deleted file mode 100644 index 1977653f913d..000000000000 --- a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_sentiment.php +++ /dev/null @@ -1,57 +0,0 @@ -analyzeSentiment($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1beta2_generated_LanguageService_AnalyzeSentiment_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_syntax.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_syntax.php deleted file mode 100644 index b4e09eace78d..000000000000 --- a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/analyze_syntax.php +++ /dev/null @@ -1,59 +0,0 @@ -analyzeSyntax($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1beta2_generated_LanguageService_AnalyzeSyntax_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/annotate_text.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/annotate_text.php deleted file mode 100644 index b38967b84fce..000000000000 --- a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/annotate_text.php +++ /dev/null @@ -1,60 +0,0 @@ -annotateText($document, $features); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1beta2_generated_LanguageService_AnnotateText_sync] diff --git a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/classify_text.php b/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/classify_text.php deleted file mode 100644 index 7b7b8c8957d2..000000000000 --- a/owl-bot-staging/Language/v1beta2/samples/V1beta2/LanguageServiceClient/classify_text.php +++ /dev/null @@ -1,57 +0,0 @@ -classifyText($document); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END language_v1beta2_generated_LanguageService_ClassifyText_sync] diff --git a/owl-bot-staging/Language/v1beta2/src/V1beta2/Gapic/LanguageServiceGapicClient.php b/owl-bot-staging/Language/v1beta2/src/V1beta2/Gapic/LanguageServiceGapicClient.php deleted file mode 100644 index eea191f93593..000000000000 --- a/owl-bot-staging/Language/v1beta2/src/V1beta2/Gapic/LanguageServiceGapicClient.php +++ /dev/null @@ -1,447 +0,0 @@ -analyzeEntities($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @experimental - */ -class LanguageServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.language.v1beta2.LanguageService'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'language.googleapis.com'; - - /** 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-language', - '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/language_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/language_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/language_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/language_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 'language.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); - } - - /** - * Finds named entities (currently proper names and common nouns) in the text - * along with entity types, salience, mentions for each entity, and - * other properties. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeEntities($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1beta2\EncodingType} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Language\V1beta2\AnalyzeEntitiesResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function analyzeEntities($document, array $optionalArgs = []) - { - $request = new AnalyzeEntitiesRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeEntities', AnalyzeEntitiesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes - * sentiment associated with each entity and its mentions. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeEntitySentiment($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1beta2\EncodingType} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Language\V1beta2\AnalyzeEntitySentimentResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function analyzeEntitySentiment($document, array $optionalArgs = []) - { - $request = new AnalyzeEntitySentimentRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeEntitySentiment', AnalyzeEntitySentimentResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Analyzes the sentiment of the provided text. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeSentiment($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate sentence offsets for the - * sentence sentiment. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1beta2\EncodingType} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Language\V1beta2\AnalyzeSentimentResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function analyzeSentiment($document, array $optionalArgs = []) - { - $request = new AnalyzeSentimentRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeSentiment', AnalyzeSentimentResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Analyzes the syntax of the text and provides sentence boundaries and - * tokenization along with part of speech tags, dependency trees, and other - * properties. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->analyzeSyntax($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1beta2\EncodingType} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Language\V1beta2\AnalyzeSyntaxResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function analyzeSyntax($document, array $optionalArgs = []) - { - $request = new AnalyzeSyntaxRequest(); - $request->setDocument($document); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnalyzeSyntax', AnalyzeSyntaxResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * A convenience method that provides all syntax, sentiment, entity, and - * classification features in one call. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $features = new Features(); - * $response = $languageServiceClient->annotateText($document, $features); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param Features $features Required. The enabled features. - * @param array $optionalArgs { - * Optional. - * - * @type int $encodingType - * The encoding type used by the API to calculate offsets. - * For allowed values, use constants defined on {@see \Google\Cloud\Language\V1beta2\EncodingType} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Language\V1beta2\AnnotateTextResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function annotateText($document, $features, array $optionalArgs = []) - { - $request = new AnnotateTextRequest(); - $request->setDocument($document); - $request->setFeatures($features); - if (isset($optionalArgs['encodingType'])) { - $request->setEncodingType($optionalArgs['encodingType']); - } - - return $this->startCall('AnnotateText', AnnotateTextResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Classifies a document into categories. - * - * Sample code: - * ``` - * $languageServiceClient = new LanguageServiceClient(); - * try { - * $document = new Document(); - * $response = $languageServiceClient->classifyText($document); - * } finally { - * $languageServiceClient->close(); - * } - * ``` - * - * @param Document $document Required. Input document. - * @param array $optionalArgs { - * Optional. - * - * @type ClassificationModelOptions $classificationModelOptions - * Model options to use for classification. Defaults to v1 options if not - * specified. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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\Language\V1beta2\ClassifyTextResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function classifyText($document, array $optionalArgs = []) - { - $request = new ClassifyTextRequest(); - $request->setDocument($document); - if (isset($optionalArgs['classificationModelOptions'])) { - $request->setClassificationModelOptions($optionalArgs['classificationModelOptions']); - } - - return $this->startCall('ClassifyText', ClassifyTextResponse::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Language/v1beta2/src/V1beta2/LanguageServiceClient.php b/owl-bot-staging/Language/v1beta2/src/V1beta2/LanguageServiceClient.php deleted file mode 100644 index de60107ce0f9..000000000000 --- a/owl-bot-staging/Language/v1beta2/src/V1beta2/LanguageServiceClient.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - 'google.cloud.language.v1beta2.LanguageService' => [], - ], -]; diff --git a/owl-bot-staging/Language/v1beta2/src/V1beta2/resources/language_service_rest_client_config.php b/owl-bot-staging/Language/v1beta2/src/V1beta2/resources/language_service_rest_client_config.php deleted file mode 100644 index dd8a7e56d036..000000000000 --- a/owl-bot-staging/Language/v1beta2/src/V1beta2/resources/language_service_rest_client_config.php +++ /dev/null @@ -1,39 +0,0 @@ - [ - 'google.cloud.language.v1beta2.LanguageService' => [ - 'AnalyzeEntities' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta2/documents:analyzeEntities', - 'body' => '*', - ], - 'AnalyzeEntitySentiment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta2/documents:analyzeEntitySentiment', - 'body' => '*', - ], - 'AnalyzeSentiment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta2/documents:analyzeSentiment', - 'body' => '*', - ], - 'AnalyzeSyntax' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta2/documents:analyzeSyntax', - 'body' => '*', - ], - 'AnnotateText' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta2/documents:annotateText', - 'body' => '*', - ], - 'ClassifyText' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta2/documents:classifyText', - 'body' => '*', - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Language/v1beta2/tests/Unit/V1beta2/LanguageServiceClientTest.php b/owl-bot-staging/Language/v1beta2/tests/Unit/V1beta2/LanguageServiceClientTest.php deleted file mode 100644 index 9def42fac620..000000000000 --- a/owl-bot-staging/Language/v1beta2/tests/Unit/V1beta2/LanguageServiceClientTest.php +++ /dev/null @@ -1,430 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return LanguageServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new LanguageServiceClient($options); - } - - /** @test */ - public function analyzeEntitiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeEntitiesResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeEntities($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1beta2.LanguageService/AnalyzeEntities', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeEntitiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - try { - $gapicClient->analyzeEntities($document); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeEntitySentimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeEntitySentimentResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeEntitySentiment($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1beta2.LanguageService/AnalyzeEntitySentiment', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeEntitySentimentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - try { - $gapicClient->analyzeEntitySentiment($document); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeSentimentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeSentimentResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeSentiment($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1beta2.LanguageService/AnalyzeSentiment', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeSentimentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - try { - $gapicClient->analyzeSentiment($document); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeSyntaxTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnalyzeSyntaxResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->analyzeSyntax($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1beta2.LanguageService/AnalyzeSyntax', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function analyzeSyntaxExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - try { - $gapicClient->analyzeSyntax($document); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function annotateTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $language = 'language-1613589672'; - $expectedResponse = new AnnotateTextResponse(); - $expectedResponse->setLanguage($language); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $features = new Features(); - $response = $gapicClient->annotateText($document, $features); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1beta2.LanguageService/AnnotateText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $actualValue = $actualRequestObject->getFeatures(); - $this->assertProtobufEquals($features, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function annotateTextExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - $features = new Features(); - try { - $gapicClient->annotateText($document, $features); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function classifyTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ClassifyTextResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $response = $gapicClient->classifyText($document); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.language.v1beta2.LanguageService/ClassifyText', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function classifyTextExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - try { - $gapicClient->classifyText($document); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -}